freemium-ui 2.0.91 → 2.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Accordion-Ccv-p2G6.js +134 -0
- package/lib/Accordion.d.ts +56 -0
- package/lib/Accordion.js +7 -0
- package/lib/Alert-BtEbkVK1.js +52 -0
- package/lib/Alert.d.ts +66 -0
- package/lib/Alert.js +6 -0
- package/lib/AutoComplete-DF33_uur.js +608 -0
- package/lib/AutoComplete.d.ts +105 -0
- package/lib/AutoComplete.js +14 -0
- package/lib/BoxedRadio-D5Kiintm.js +75 -0
- package/lib/BoxedRadio.d.ts +61 -0
- package/lib/BoxedRadio.js +10 -0
- package/lib/Button-Bd1O8_k7.js +34 -0
- package/lib/Button.d.ts +34 -0
- package/lib/Button.js +2 -0
- package/lib/ButtonDropdown-BZvCwUDe.js +37 -0
- package/lib/ButtonDropdown.d.ts +82 -0
- package/lib/ButtonDropdown.js +11 -0
- package/lib/Calendar-C0xW_pPO.js +32 -0
- package/lib/Calendar.d.ts +25 -0
- package/lib/Calendar.js +2 -0
- package/lib/Checkbox-By1CgFUJ.js +66 -0
- package/lib/Checkbox.d.ts +28 -0
- package/lib/Checkbox.js +7 -0
- package/lib/ChevronUp-BWiG3XYd.js +7 -0
- package/lib/Combination-AmN1Cqrf.js +210 -0
- package/lib/Confirmation-49GhlyzQ.js +66 -0
- package/lib/Confirmation.d.ts +72 -0
- package/lib/Confirmation.js +8 -0
- package/lib/Cross-CIeKwtq6.js +7 -0
- package/lib/CustomizeColumns-BSF8e_we.js +865 -0
- package/lib/Drawer-CnmXL5_B.js +33 -0
- package/lib/Drawer.d.ts +50 -0
- package/lib/Drawer.js +8 -0
- package/lib/Dropdown-D59u6zOt.js +89 -0
- package/lib/Dropdown.d.ts +162 -0
- package/lib/Dropdown.js +15 -0
- package/lib/ErrorText-Uvye7uop.js +8 -0
- package/lib/Info-BsILbpCG.js +9 -0
- package/lib/Input.d.ts +66 -0
- package/lib/Input.js +5 -0
- package/lib/Loader-b8lHCp4N.js +13 -0
- package/lib/Loader.d.ts +21 -0
- package/lib/Loader.js +3 -0
- package/lib/Menu-DoE00Mg-.js +19 -0
- package/lib/Menu.d.ts +80 -0
- package/lib/Menu.js +11 -0
- package/lib/Modal-D5RJHnbn.js +51 -0
- package/lib/Modal.d.ts +51 -0
- package/lib/Modal.js +7 -0
- package/lib/MultiSelectDropdown-DblSkVpv.js +84 -0
- package/lib/MultiSelectDropdown.d.ts +116 -0
- package/lib/MultiSelectDropdown.js +14 -0
- package/lib/Pickers.d.ts +94 -0
- package/lib/Pickers.js +16 -0
- package/lib/Popover-BU73-g73.js +90 -0
- package/lib/Popover.d.ts +94 -0
- package/lib/Popover.js +8 -0
- package/lib/QuillEditor.d.ts +29 -0
- package/lib/QuillEditor.js +3369 -0
- package/lib/Radio.d.ts +69 -0
- package/lib/Radio.js +10 -0
- package/lib/RadioGroup-DM_Y48_b.js +42 -0
- package/lib/Reorder-DUSHsq7i.js +697 -0
- package/lib/Reorder.d.ts +36 -0
- package/lib/Reorder.js +5 -0
- package/lib/SortDropdown-B0SSCJX6.js +17 -0
- package/lib/SortDropdown.d.ts +47 -0
- package/lib/SortDropdown.js +10 -0
- package/lib/Table-cidceyn5.js +117 -0
- package/lib/Table.d.ts +95 -0
- package/lib/Table.js +18 -0
- package/lib/Tabs-j1c7ybY-.js +50 -0
- package/lib/Tabs.d.ts +68 -0
- package/lib/Tabs.js +6 -0
- package/lib/Tag-Cu75ReQP.js +49 -0
- package/lib/Tag.d.ts +50 -0
- package/lib/Tag.js +4 -0
- package/lib/TextArea--fiwZ_QM.js +98 -0
- package/lib/ThemeProvider-bWL8hyYA.js +7 -0
- package/lib/ThemeProvider.d.ts +158 -0
- package/lib/ThemeProvider.js +9 -0
- package/lib/TickIcon-BJqSAG4_.js +7 -0
- package/lib/TimePicker-7Uqb3xJn.js +6598 -0
- package/lib/Toast.d.ts +61 -0
- package/lib/Toast.js +10 -0
- package/lib/ToastProvider-CMk1PSzB.js +264 -0
- package/lib/Toggle-BGV7Nc6t.js +59 -0
- package/lib/Toggle.d.ts +35 -0
- package/lib/Toggle.js +6 -0
- package/lib/Tooltip-DU_ATFRB.js +127 -0
- package/lib/Tooltip.d.ts +53 -0
- package/lib/Tooltip.js +8 -0
- package/lib/Typography-BcAppjDF.js +11 -0
- package/lib/Typography.d.ts +20 -0
- package/lib/Typography.js +2 -0
- package/lib/WorkspaceTable-BV5zccyt.js +100 -0
- package/lib/WorkspaceTable.d.ts +85 -0
- package/lib/WorkspaceTable.js +18 -0
- package/lib/_commonjsHelpers-fGXyuM93.js +4 -0
- package/lib/allPaths-DKtiSqHL.js +19 -0
- package/lib/allPathsLoader-Drb6xO2O.js +5 -0
- package/lib/index-B9EcTy5B.js +46 -0
- package/lib/index-BPxkexqj.js +60 -0
- package/lib/index-BROhcSiX.js +8 -0
- package/lib/index-BT1o947S.js +8 -0
- package/lib/index-BY9lf-do.js +2 -0
- package/lib/index-BdTXfGkV.js +24 -0
- package/lib/index-BnDw8kbT.js +135 -0
- package/lib/index-BrF1HKA1.js +338 -0
- package/lib/index-BxNZ3C71.js +4 -0
- package/lib/index-ByHJlnsx.js +26 -0
- package/lib/index-COoRg_pp.js +55 -0
- package/lib/index-CeIB4COQ.js +10 -0
- package/lib/index-Cjkk7z9c.js +19 -0
- package/lib/index-D6iTv28r.js +607 -0
- package/lib/index-D8E8s0tV.js +60 -0
- package/lib/index-DtILdK5l.js +48 -0
- package/lib/index-DtzckyT3.js +4 -0
- package/lib/index-Dy5ztCxm.js +27 -0
- package/lib/index-KMLwCm58.js +607 -0
- package/lib/index-_WvIFKTM.js +6 -0
- package/lib/index.d.ts +1826 -1842
- package/lib/index.js +54 -17049
- package/lib/isTypedArray-DN-UDJh5.js +89 -0
- package/lib/keyframes-PnzFl0I5.js +20 -0
- package/lib/package.json +133 -3
- package/lib/rollup.config.d.ts.map +1 -0
- package/lib/splitPathsBySizeLoader-Cm_vHo5k.js +23 -0
- package/lib/styled-components.browser.esm-Bq2p-e5F.js +479 -0
- package/lib/styles-BbwNLGy3.js +177 -0
- package/lib/styles-BlCCKAZq.js +1192 -0
- package/lib/use-toasts-GqvPVmSy.js +5 -0
- package/package.json +148 -12
- package/buildspec.yml +0 -22
- package/freemium-ui-2.0.91.tgz +0 -0
- package/lib/index.cjs.js +0 -17225
|
@@ -0,0 +1,1192 @@
|
|
|
1
|
+
import{_ as e,$ as t,a as n,b as o}from"./index-ByHJlnsx.js"
|
|
2
|
+
;import{g as r}from"./_commonjsHelpers-fGXyuM93.js"
|
|
3
|
+
;import i,{useRef as s,useCallback as a,useEffect as c,useMemo as u,cloneElement as l,Component as d,useLayoutEffect as p,useReducer as f,forwardRef as h,useState as m,createElement as g,Fragment as v}from"react"
|
|
4
|
+
;import{b as y,u as b,_ as I}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
5
|
+
;import{createPortal as x}from"react-dom"
|
|
6
|
+
;import{$ as _,a as w}from"./index-CeIB4COQ.js"
|
|
7
|
+
;import{$ as E}from"./index-Cjkk7z9c.js"
|
|
8
|
+
;import{$ as S,c as O,b as D}from"./index-BdTXfGkV.js"
|
|
9
|
+
;import{$ as N}from"./index-BY9lf-do.js"
|
|
10
|
+
;import{a as k,$ as C}from"./index-COoRg_pp.js"
|
|
11
|
+
;import{h as V,$ as P,R as T,a as M}from"./Combination-AmN1Cqrf.js"
|
|
12
|
+
;import{$ as R}from"./index-BxNZ3C71.js"
|
|
13
|
+
;import{$ as H,a as K,b as $,c as A}from"./index-BrF1HKA1.js"
|
|
14
|
+
;import{$ as j}from"./index-DtzckyT3.js";import{a as L}from"./index-_WvIFKTM.js"
|
|
15
|
+
;import{b as F,a as B}from"./keyframes-PnzFl0I5.js"
|
|
16
|
+
;import{Z as z,h as W}from"./index-BnDw8kbT.js"
|
|
17
|
+
;import{C as q}from"./ChevronUp-BWiG3XYd.js";function U(e,t){if(null==e)return{}
|
|
18
|
+
;var n,o,r={},i=Object.keys(e)
|
|
19
|
+
;for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}
|
|
20
|
+
function Y(e,t){
|
|
21
|
+
return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){
|
|
22
|
+
return e.__proto__=t,e},Y(e,t)}function X(e,t){
|
|
23
|
+
e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Y(e,t)}
|
|
24
|
+
var J,Z={exports:{}},G={exports:{}},Q={}
|
|
25
|
+
;var ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,pe,fe,he={};function me(){
|
|
26
|
+
return te||(te=1,"production"===process.env.NODE_ENV?G.exports=function(){
|
|
27
|
+
if(J)return Q;J=1
|
|
28
|
+
;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119
|
|
29
|
+
;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){
|
|
30
|
+
case t:switch(e=e.type){case c:case u:case o:case i:case r:case d:return e
|
|
31
|
+
;default:switch(e=e&&e.$$typeof){case a:case l:case h:case f:case s:return e
|
|
32
|
+
;default:return p}}case n:return p}}}function I(e){return b(e)===u}
|
|
33
|
+
return Q.AsyncMode=c,Q.ConcurrentMode=u,Q.ContextConsumer=a,Q.ContextProvider=s,
|
|
34
|
+
Q.Element=t,
|
|
35
|
+
Q.ForwardRef=l,Q.Fragment=o,Q.Lazy=h,Q.Memo=f,Q.Portal=n,Q.Profiler=i,
|
|
36
|
+
Q.StrictMode=r,Q.Suspense=d,Q.isAsyncMode=function(e){return I(e)||b(e)===c
|
|
37
|
+
},Q.isConcurrentMode=I,Q.isContextConsumer=function(e){return b(e)===a
|
|
38
|
+
},Q.isContextProvider=function(e){return b(e)===s},Q.isElement=function(e){
|
|
39
|
+
return"object"==typeof e&&null!==e&&e.$$typeof===t},Q.isForwardRef=function(e){
|
|
40
|
+
return b(e)===l},Q.isFragment=function(e){return b(e)===o},Q.isLazy=function(e){
|
|
41
|
+
return b(e)===h},Q.isMemo=function(e){return b(e)===f},Q.isPortal=function(e){
|
|
42
|
+
return b(e)===n},Q.isProfiler=function(e){return b(e)===i
|
|
43
|
+
},Q.isStrictMode=function(e){return b(e)===r},Q.isSuspense=function(e){
|
|
44
|
+
return b(e)===d},Q.isValidElementType=function(e){
|
|
45
|
+
return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||e===r||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)
|
|
46
|
+
},Q.typeOf=b,Q
|
|
47
|
+
}():G.exports=(ee||(ee=1,"production"!==process.env.NODE_ENV&&function(){
|
|
48
|
+
var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119
|
|
49
|
+
;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){
|
|
50
|
+
case t:var m=e.type;switch(m){case c:case u:case o:case i:case r:case d:return m
|
|
51
|
+
;default:var g=m&&m.$$typeof;switch(g){case a:case l:case h:case f:case s:
|
|
52
|
+
return g;default:return p}}case n:return p}}}
|
|
53
|
+
var I=c,x=u,_=a,w=s,E=t,S=l,O=o,D=h,N=f,k=n,C=i,V=r,P=d,T=!1;function M(e){
|
|
54
|
+
return b(e)===u}
|
|
55
|
+
he.AsyncMode=I,he.ConcurrentMode=x,he.ContextConsumer=_,he.ContextProvider=w,
|
|
56
|
+
he.Element=E,
|
|
57
|
+
he.ForwardRef=S,he.Fragment=O,he.Lazy=D,he.Memo=N,he.Portal=k,he.Profiler=C,
|
|
58
|
+
he.StrictMode=V,he.Suspense=P,he.isAsyncMode=function(e){
|
|
59
|
+
return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
60
|
+
M(e)||b(e)===c},he.isConcurrentMode=M,he.isContextConsumer=function(e){
|
|
61
|
+
return b(e)===a},he.isContextProvider=function(e){return b(e)===s
|
|
62
|
+
},he.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t
|
|
63
|
+
},he.isForwardRef=function(e){return b(e)===l},he.isFragment=function(e){
|
|
64
|
+
return b(e)===o},he.isLazy=function(e){return b(e)===h},he.isMemo=function(e){
|
|
65
|
+
return b(e)===f},he.isPortal=function(e){return b(e)===n
|
|
66
|
+
},he.isProfiler=function(e){return b(e)===i},he.isStrictMode=function(e){
|
|
67
|
+
return b(e)===r},he.isSuspense=function(e){return b(e)===d
|
|
68
|
+
},he.isValidElementType=function(e){
|
|
69
|
+
return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||e===r||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)
|
|
70
|
+
},he.typeOf=b}()),he)),G.exports}function ge(){if(oe)return ne;oe=1
|
|
71
|
+
;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable
|
|
72
|
+
;return ne=function(){try{if(!Object.assign)return!1;var e=new String("abc")
|
|
73
|
+
;if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1
|
|
74
|
+
;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n
|
|
75
|
+
;var o=Object.getOwnPropertyNames(t).map((function(e){return t[e]}))
|
|
76
|
+
;if("0123456789"!==o.join(""))return!1;var r={}
|
|
77
|
+
;return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e
|
|
78
|
+
})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){
|
|
79
|
+
return!1}}()?Object.assign:function(o,r){for(var i,s,a=function(e){
|
|
80
|
+
if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined")
|
|
81
|
+
;return Object(e)}(o),c=1;c<arguments.length;c++){
|
|
82
|
+
for(var u in i=Object(arguments[c]))t.call(i,u)&&(a[u]=i[u]);if(e){s=e(i)
|
|
83
|
+
;for(var l=0;l<s.length;l++)n.call(i,s[l])&&(a[s[l]]=i[s[l]])}}return a},ne}
|
|
84
|
+
function ve(){if(ie)return re;ie=1
|
|
85
|
+
;return re="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ye(){
|
|
86
|
+
return ae?se:(ae=1,se=Function.call.bind(Object.prototype.hasOwnProperty))}
|
|
87
|
+
if("production"!==process.env.NODE_ENV){var be=me();Z.exports=function(){
|
|
88
|
+
if(de)return le;de=1;var e=me(),t=ge(),n=ve(),o=ye(),r=function(){
|
|
89
|
+
if(ue)return ce;ue=1;var e=function(){};if("production"!==process.env.NODE_ENV){
|
|
90
|
+
var t=ve(),n={},o=ye();e=function(e){var t="Warning: "+e
|
|
91
|
+
;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}
|
|
92
|
+
}}function r(r,i,s,a,c){
|
|
93
|
+
if("production"!==process.env.NODE_ENV)for(var u in r)if(o(r,u)){var l;try{
|
|
94
|
+
if("function"!=typeof r[u]){
|
|
95
|
+
var d=Error((a||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")
|
|
96
|
+
;throw d.name="Invariant Violation",d}l=r[u](i,u,a,s,null,t)}catch(e){l=e}
|
|
97
|
+
if(!l||l instanceof Error||e((a||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),
|
|
98
|
+
l instanceof Error&&!(l.message in n)){n[l.message]=!0;var p=c?c():""
|
|
99
|
+
;e("Failed "+s+" type: "+l.message+(null!=p?p:""))}}}
|
|
100
|
+
return r.resetWarningCache=function(){
|
|
101
|
+
"production"!==process.env.NODE_ENV&&(n={})},ce=r}(),i=function(){}
|
|
102
|
+
;function s(){return null}
|
|
103
|
+
return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e
|
|
104
|
+
;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}
|
|
105
|
+
}),le=function(a,c){
|
|
106
|
+
var u="function"==typeof Symbol&&Symbol.iterator,l="@@iterator",d="<<anonymous>>",p={
|
|
107
|
+
array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),
|
|
108
|
+
number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),
|
|
109
|
+
any:m(s),arrayOf:function(e){return m((function(t,o,r,i,s){
|
|
110
|
+
if("function"!=typeof e)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.")
|
|
111
|
+
;var a=t[o]
|
|
112
|
+
;if(!Array.isArray(a))return new h("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+r+"`, expected an array.")
|
|
113
|
+
;for(var c=0;c<a.length;c++){var u=e(a,c,r,i,s+"["+c+"]",n)
|
|
114
|
+
;if(u instanceof Error)return u}return null}))},element:m((function(e,t,n,o,r){
|
|
115
|
+
var i=e[t]
|
|
116
|
+
;return a(i)?null:new h("Invalid "+o+" `"+r+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")
|
|
117
|
+
})),elementType:m((function(t,n,o,r,i){var s=t[n]
|
|
118
|
+
;return e.isValidElementType(s)?null:new h("Invalid "+r+" `"+i+"` of type `"+b(s)+"` supplied to `"+o+"`, expected a single ReactElement type.")
|
|
119
|
+
})),instanceOf:function(e){return m((function(t,n,o,r,i){
|
|
120
|
+
if(!(t[n]instanceof e)){var s=e.name||d
|
|
121
|
+
;return new h("Invalid "+r+" `"+i+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `"+o+"`, expected instance of `"+s+"`.")
|
|
122
|
+
}var a;return null}))},node:m((function(e,t,n,o,r){
|
|
123
|
+
return y(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")
|
|
124
|
+
})),objectOf:function(e){return m((function(t,r,i,s,a){
|
|
125
|
+
if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.")
|
|
126
|
+
;var c=t[r],u=b(c)
|
|
127
|
+
;if("object"!==u)return new h("Invalid "+s+" `"+a+"` of type `"+u+"` supplied to `"+i+"`, expected an object.")
|
|
128
|
+
;for(var l in c)if(o(c,l)){var d=e(c,l,i,s,a+"."+l,n)
|
|
129
|
+
;if(d instanceof Error)return d}return null}))},oneOf:function(e){
|
|
130
|
+
return Array.isArray(e)?m((function(t,n,o,r,i){
|
|
131
|
+
for(var s=t[n],a=0;a<e.length;a++)if(f(s,e[a]))return null
|
|
132
|
+
;var c=JSON.stringify(e,(function(e,t){return"symbol"===I(t)?String(t):t}))
|
|
133
|
+
;return new h("Invalid "+r+" `"+i+"` of value `"+String(s)+"` supplied to `"+o+"`, expected one of "+c+".")
|
|
134
|
+
})):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"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."),
|
|
135
|
+
s)},oneOfType:function(e){
|
|
136
|
+
if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
137
|
+
s;for(var t=0;t<e.length;t++){var r=e[t]
|
|
138
|
+
;if("function"!=typeof r)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(r)+" at index "+t+"."),
|
|
139
|
+
s}return m((function(t,r,i,s,a){for(var c=[],u=0;u<e.length;u++){
|
|
140
|
+
var l=(0,e[u])(t,r,i,s,a,n);if(null==l)return null
|
|
141
|
+
;l.data&&o(l.data,"expectedType")&&c.push(l.data.expectedType)}
|
|
142
|
+
return new h("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")
|
|
143
|
+
}))},shape:function(e){return m((function(t,o,r,i,s){var a=t[o],c=b(a)
|
|
144
|
+
;if("object"!==c)return new h("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.")
|
|
145
|
+
;for(var u in e){var l=e[u];if("function"!=typeof l)return v(r,i,s,u,I(l))
|
|
146
|
+
;var d=l(a,u,r,i,s+"."+u,n);if(d)return d}return null}))},exact:function(e){
|
|
147
|
+
return m((function(r,i,s,a,c){var u=r[i],l=b(u)
|
|
148
|
+
;if("object"!==l)return new h("Invalid "+a+" `"+c+"` of type `"+l+"` supplied to `"+s+"`, expected `object`.")
|
|
149
|
+
;var d=t({},r[i],e);for(var p in d){var f=e[p]
|
|
150
|
+
;if(o(e,p)&&"function"!=typeof f)return v(s,a,c,p,I(f))
|
|
151
|
+
;if(!f)return new h("Invalid "+a+" `"+c+"` key `"+p+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(r[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "))
|
|
152
|
+
;var m=f(u,p,s,a,c+"."+p,n);if(m)return m}return null}))}};function f(e,t){
|
|
153
|
+
return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){
|
|
154
|
+
this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){
|
|
155
|
+
if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,s,a,u,l,p,f){
|
|
156
|
+
if(u=u||d,p=p||a,f!==n){if(c){
|
|
157
|
+
var m=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")
|
|
158
|
+
;throw m.name="Invariant Violation",m}
|
|
159
|
+
if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){
|
|
160
|
+
var g=u+":"+a
|
|
161
|
+
;!t[g]&&o<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+u+"`. 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."),
|
|
162
|
+
t[g]=!0,o++)}}
|
|
163
|
+
return null==s[a]?r?null===s[a]?new h("The "+l+" `"+p+"` is marked as required in `"+u+"`, but its value is `null`."):new h("The "+l+" `"+p+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(s,a,u,l,p)
|
|
164
|
+
}var s=r.bind(null,!1);return s.isRequired=r.bind(null,!0),s}function g(e){
|
|
165
|
+
return m((function(t,n,o,r,i,s){var a=t[n]
|
|
166
|
+
;return b(a)!==e?new h("Invalid "+r+" `"+i+"` of type `"+I(a)+"` supplied to `"+o+"`, expected `"+e+"`.",{
|
|
167
|
+
expectedType:e}):null}))}function v(e,t,n,o,r){
|
|
168
|
+
return new h((e||"React class")+": "+t+" type `"+n+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")
|
|
169
|
+
}function y(e){switch(typeof e){case"number":case"string":case"undefined":
|
|
170
|
+
return!0;case"boolean":return!e;case"object":
|
|
171
|
+
if(Array.isArray(e))return e.every(y);if(null===e||a(e))return!0
|
|
172
|
+
;var t=function(e){var t=e&&(u&&e[u]||e[l]);if("function"==typeof t)return t}(e)
|
|
173
|
+
;if(!t)return!1;var n,o=t.call(e);if(t!==e.entries){
|
|
174
|
+
for(;!(n=o.next()).done;)if(!y(n.value))return!1}else for(;!(n=o.next()).done;){
|
|
175
|
+
var r=n.value;if(r&&!y(r[1]))return!1}return!0;default:return!1}}function b(e){
|
|
176
|
+
var t=typeof e
|
|
177
|
+
;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){
|
|
178
|
+
return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)
|
|
179
|
+
}(t,e)?"symbol":t}function I(e){if(null==e)return""+e;var t=b(e)
|
|
180
|
+
;if("object"===t){if(e instanceof Date)return"date"
|
|
181
|
+
;if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=I(e)
|
|
182
|
+
;switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":
|
|
183
|
+
case"regexp":return"a "+t;default:return t}}
|
|
184
|
+
return h.prototype=Error.prototype,p.checkPropTypes=r,
|
|
185
|
+
p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},le}()(be.isElement,!0)
|
|
186
|
+
}else Z.exports=function(){if(fe)return pe;fe=1;var e=ve();function t(){}
|
|
187
|
+
function n(){}return n.resetWarningCache=t,pe=function(){
|
|
188
|
+
function o(t,n,o,r,i,s){if(s!==e){
|
|
189
|
+
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")
|
|
190
|
+
;throw a.name="Invariant Violation",a}}function r(){return o}o.isRequired=o
|
|
191
|
+
;var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,
|
|
192
|
+
any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,
|
|
193
|
+
oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t}
|
|
194
|
+
;return i.PropTypes=i,i}}()();var Ie,xe=r(Z.exports),_e={exports:{}},we={}
|
|
195
|
+
;var Ee,Se={};"production"===process.env.NODE_ENV?_e.exports=function(){
|
|
196
|
+
if(Ie)return we;Ie=1
|
|
197
|
+
;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen")
|
|
198
|
+
;function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){
|
|
199
|
+
case t:switch(e=e.type){case o:case i:case r:case l:case d:return e;default:
|
|
200
|
+
switch(e=e&&e.$$typeof){case c:case a:case u:case f:case p:case s:return e
|
|
201
|
+
;default:return h}}case n:return h}}}
|
|
202
|
+
return e=Symbol.for("react.module.reference"),
|
|
203
|
+
we.ContextConsumer=a,we.ContextProvider=s,
|
|
204
|
+
we.Element=t,we.ForwardRef=u,we.Fragment=o,
|
|
205
|
+
we.Lazy=f,we.Memo=p,we.Portal=n,we.Profiler=i,
|
|
206
|
+
we.StrictMode=r,we.Suspense=l,we.SuspenseList=d,we.isAsyncMode=function(){
|
|
207
|
+
return!1},we.isConcurrentMode=function(){return!1
|
|
208
|
+
},we.isContextConsumer=function(e){return m(e)===a
|
|
209
|
+
},we.isContextProvider=function(e){return m(e)===s},we.isElement=function(e){
|
|
210
|
+
return"object"==typeof e&&null!==e&&e.$$typeof===t},we.isForwardRef=function(e){
|
|
211
|
+
return m(e)===u},we.isFragment=function(e){return m(e)===o
|
|
212
|
+
},we.isLazy=function(e){return m(e)===f},we.isMemo=function(e){return m(e)===p},
|
|
213
|
+
we.isPortal=function(e){return m(e)===n},we.isProfiler=function(e){
|
|
214
|
+
return m(e)===i},we.isStrictMode=function(e){return m(e)===r
|
|
215
|
+
},we.isSuspense=function(e){return m(e)===l},we.isSuspenseList=function(e){
|
|
216
|
+
return m(e)===d},we.isValidElementType=function(t){
|
|
217
|
+
return"string"==typeof t||"function"==typeof t||t===o||t===i||t===r||t===l||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)
|
|
218
|
+
},we.typeOf=m,we
|
|
219
|
+
}():_e.exports=(Ee||(Ee=1,"production"!==process.env.NODE_ENV&&function(){
|
|
220
|
+
var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen")
|
|
221
|
+
;function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){
|
|
222
|
+
case t:var m=e.type;switch(m){case o:case i:case r:case l:case d:return m
|
|
223
|
+
;default:var g=m&&m.$$typeof;switch(g){case c:case a:case u:case f:case p:
|
|
224
|
+
case s:return g;default:return h}}case n:return h}}}
|
|
225
|
+
e=Symbol.for("react.module.reference")
|
|
226
|
+
;var g=a,v=s,y=t,b=u,I=o,x=f,_=p,w=n,E=i,S=r,O=l,D=d,N=!1,k=!1
|
|
227
|
+
;Se.ContextConsumer=g,
|
|
228
|
+
Se.ContextProvider=v,Se.Element=y,Se.ForwardRef=b,Se.Fragment=I,
|
|
229
|
+
Se.Lazy=x,Se.Memo=_,
|
|
230
|
+
Se.Portal=w,Se.Profiler=E,Se.StrictMode=S,Se.Suspense=O,Se.SuspenseList=D,
|
|
231
|
+
Se.isAsyncMode=function(e){
|
|
232
|
+
return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),
|
|
233
|
+
!1},Se.isConcurrentMode=function(e){
|
|
234
|
+
return k||(k=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),
|
|
235
|
+
!1},Se.isContextConsumer=function(e){return m(e)===a
|
|
236
|
+
},Se.isContextProvider=function(e){return m(e)===s},Se.isElement=function(e){
|
|
237
|
+
return"object"==typeof e&&null!==e&&e.$$typeof===t},Se.isForwardRef=function(e){
|
|
238
|
+
return m(e)===u},Se.isFragment=function(e){return m(e)===o
|
|
239
|
+
},Se.isLazy=function(e){return m(e)===f},Se.isMemo=function(e){return m(e)===p},
|
|
240
|
+
Se.isPortal=function(e){return m(e)===n},Se.isProfiler=function(e){
|
|
241
|
+
return m(e)===i},Se.isStrictMode=function(e){return m(e)===r
|
|
242
|
+
},Se.isSuspense=function(e){return m(e)===l},Se.isSuspenseList=function(e){
|
|
243
|
+
return m(e)===d},Se.isValidElementType=function(t){
|
|
244
|
+
return"string"==typeof t||"function"==typeof t||t===o||t===i||t===r||t===l||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)
|
|
245
|
+
},Se.typeOf=m}()),Se);var Oe=_e.exports
|
|
246
|
+
;const De=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Ne=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,ke=(e,t)=>{
|
|
247
|
+
if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){
|
|
248
|
+
const n=getComputedStyle(e,null)
|
|
249
|
+
;return Ne(n.overflowY,t)||Ne(n.overflowX,t)||(e=>{const t=(e=>{
|
|
250
|
+
if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{
|
|
251
|
+
return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e)
|
|
252
|
+
;return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}
|
|
253
|
+
return!1
|
|
254
|
+
},Ce=(e,t,n,o,r,i,s,a)=>i<e&&s>t||i>e&&s<t?0:i<=e&&a<=n||s>=t&&a>=n?i-e-o:s>t&&a<n||i<e&&a>n?s-t+r:0,Ve=e=>{
|
|
255
|
+
const t=e.parentElement;return null==t?e.getRootNode().host||null:t};var Pe=0
|
|
256
|
+
;function Te(e){return"function"==typeof e?e:Me}function Me(){}function Re(e,t){
|
|
257
|
+
if(e){var n=((e,t)=>{var n,o,r,i;if("undefined"==typeof document)return[]
|
|
258
|
+
;const{scrollMode:s,block:a,inline:c,boundary:u,skipOverflowHiddenElements:l}=t,d="function"==typeof u?u:e=>e!==u
|
|
259
|
+
;if(!De(e))throw new TypeError("Invalid target")
|
|
260
|
+
;const p=document.scrollingElement||document.documentElement,f=[];let h=e
|
|
261
|
+
;for(;De(h)&&d(h);){if(h=Ve(h),h===p){f.push(h);break}
|
|
262
|
+
null!=h&&h===document.body&&ke(h)&&!ke(document.documentElement)||null!=h&&ke(h,l)&&f.push(h)
|
|
263
|
+
}
|
|
264
|
+
const m=null!=(o=null==(n=window.visualViewport)?void 0:n.width)?o:innerWidth,g=null!=(i=null==(r=window.visualViewport)?void 0:r.height)?i:innerHeight,{scrollX:v,scrollY:y}=window,{height:b,width:I,top:x,right:_,bottom:w,left:E}=e.getBoundingClientRect(),{top:S,right:O,bottom:D,left:N}=(e=>{
|
|
265
|
+
const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,
|
|
266
|
+
right:parseFloat(t.scrollMarginRight)||0,
|
|
267
|
+
bottom:parseFloat(t.scrollMarginBottom)||0,
|
|
268
|
+
left:parseFloat(t.scrollMarginLeft)||0}})(e)
|
|
269
|
+
;let k="start"===a||"nearest"===a?x-S:"end"===a?w+D:x+b/2-S+D,C="center"===c?E+I/2-N+O:"end"===c?_+O:E-N
|
|
270
|
+
;const V=[];for(let e=0;e<f.length;e++){
|
|
271
|
+
const t=f[e],{height:n,width:o,top:r,right:i,bottom:u,left:l}=t.getBoundingClientRect()
|
|
272
|
+
;if("if-needed"===s&&x>=0&&E>=0&&w<=g&&_<=m&&x>=r&&w<=u&&E>=l&&_<=i)return V
|
|
273
|
+
;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),D=parseInt(d.borderBottomWidth,10)
|
|
274
|
+
;let N=0,P=0
|
|
275
|
+
;const T="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,M="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-D:0,R="offsetWidth"in t?0===t.offsetWidth?0:o/t.offsetWidth:0,H="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0
|
|
276
|
+
;if(p===t)N="start"===a?k:"end"===a?k-g:"nearest"===a?Ce(y,y+g,g,S,D,y+k,y+k+b,b):k-g/2,
|
|
277
|
+
P="start"===c?C:"center"===c?C-m/2:"end"===c?C-m:Ce(v,v+m,m,h,O,v+C,v+C+I,I),
|
|
278
|
+
N=Math.max(0,N+y),P=Math.max(0,P+v);else{
|
|
279
|
+
N="start"===a?k-r-S:"end"===a?k-u+D+M:"nearest"===a?Ce(r,u,n,S,D+M,k,k+b,b):k-(r+n/2)+M/2,
|
|
280
|
+
P="start"===c?C-l-h:"center"===c?C-(l+o/2)+T/2:"end"===c?C-i+O+T:Ce(l,i,o,h,O+T,C,C+I,I)
|
|
281
|
+
;const{scrollLeft:e,scrollTop:s}=t
|
|
282
|
+
;N=0===H?0:Math.max(0,Math.min(s+N/H,t.scrollHeight-n/H+M)),
|
|
283
|
+
P=0===R?0:Math.max(0,Math.min(e+P/R,t.scrollWidth-o/R+T)),k+=s-N,C+=e-P}V.push({
|
|
284
|
+
el:t,top:N,left:P})}return V})(e,{boundary:t,block:"nearest",
|
|
285
|
+
scrollMode:"if-needed"});n.forEach((function(e){var t=e.el,n=e.top,o=e.left
|
|
286
|
+
;t.scrollTop=n,t.scrollLeft=o}))}}function He(e,t,n){
|
|
287
|
+
return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function Ke(e,t){
|
|
288
|
+
var n;function o(){n&&clearTimeout(n)}function r(){
|
|
289
|
+
for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s]
|
|
290
|
+
;o(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return r.cancel=o,r}
|
|
291
|
+
function $e(){
|
|
292
|
+
for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
|
293
|
+
;return function(e){
|
|
294
|
+
for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r]
|
|
295
|
+
;return t.some((function(t){
|
|
296
|
+
return t&&t.apply(void 0,[e].concat(o)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault
|
|
297
|
+
}))}}function Ae(){
|
|
298
|
+
for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
|
299
|
+
;return function(e){t.forEach((function(t){
|
|
300
|
+
"function"==typeof t?t(e):t&&(t.current=e)}))}}function je(){return String(Pe++)
|
|
301
|
+
}function Le(e){var t=e.isOpen,n=e.resultCount,o=e.previousResultCount
|
|
302
|
+
;return t?n?n!==o?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""
|
|
303
|
+
}function Fe(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function Be(e){
|
|
304
|
+
return"string"==typeof e.type}function ze(e){return e.props}
|
|
305
|
+
var We=["highlightedIndex","inputValue","isOpen","selectedItem","type"]
|
|
306
|
+
;function qe(e){void 0===e&&(e={});var t={};return We.forEach((function(n){
|
|
307
|
+
e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function Ue(e,t){
|
|
308
|
+
return e&&t?Object.keys(e).reduce((function(n,o){return n[o]=Ye(t,o)?t[o]:e[o],n
|
|
309
|
+
}),{}):e}function Ye(e,t){return void 0!==e[t]}function Xe(e){
|
|
310
|
+
var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}
|
|
311
|
+
function Je(e,t,n,o,r){var i=n.length;if(0===i)return-1;var s=i-1
|
|
312
|
+
;("number"!=typeof e||e<0||e>s)&&(e=t>0?-1:s+1);var a=e+t;a<0?a=s:a>s&&(a=0)
|
|
313
|
+
;var c=Ze(a,t<0,n,o,r);return-1===c?e>=i?-1:e:c}function Ze(e,t,n,o,r){
|
|
314
|
+
void 0===r&&(r=!1);var i=n.length;if(t){
|
|
315
|
+
for(var s=e;s>=0;s--)if(!o(n[s],s))return s
|
|
316
|
+
}else for(var a=e;a<i;a++)if(!o(n[a],a))return a;return r?Ze(t?i-1:0,t,n,o):-1}
|
|
317
|
+
function Ge(e,t,n,o){return void 0===o&&(o=!0),n&&t.some((function(t){
|
|
318
|
+
return t&&(He(t,e,n)||o&&He(t,n.document.activeElement,n))}))}var Qe=Me
|
|
319
|
+
;"production"!==process.env.NODE_ENV&&(Qe=function(e,t,n){
|
|
320
|
+
var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props"
|
|
321
|
+
;Object.keys(e).forEach((function(e){
|
|
322
|
+
void 0!==t[e]&&void 0===n[e]?console.error('downshift: A component has changed the controlled prop "'+e+'" to be uncontrolled. '+o):void 0===t[e]&&void 0!==n[e]&&console.error('downshift: A component has changed the uncontrolled prop "'+e+'" to be controlled. '+o)
|
|
323
|
+
}))});var et=Ke((function(e){tt(e).textContent=""}),500);function tt(e){
|
|
324
|
+
var t=e.getElementById("a11y-status-message")
|
|
325
|
+
;return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),
|
|
326
|
+
t.setAttribute("role","status"),
|
|
327
|
+
t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),
|
|
328
|
+
Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",
|
|
329
|
+
margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"
|
|
330
|
+
}),e.body.appendChild(t),t)}function nt(e,t){e&&t&&(tt(t).textContent=e,et(t))}
|
|
331
|
+
var ot="production"!==process.env.NODE_ENV?"__autocomplete_unknown__":0,rt="production"!==process.env.NODE_ENV?"__autocomplete_mouseup__":1,it="production"!==process.env.NODE_ENV?"__autocomplete_item_mouseenter__":2,st="production"!==process.env.NODE_ENV?"__autocomplete_keydown_arrow_up__":3,at="production"!==process.env.NODE_ENV?"__autocomplete_keydown_arrow_down__":4,ct="production"!==process.env.NODE_ENV?"__autocomplete_keydown_escape__":5,ut="production"!==process.env.NODE_ENV?"__autocomplete_keydown_enter__":6,lt="production"!==process.env.NODE_ENV?"__autocomplete_keydown_home__":7,dt="production"!==process.env.NODE_ENV?"__autocomplete_keydown_end__":8,pt="production"!==process.env.NODE_ENV?"__autocomplete_click_item__":9,ft="production"!==process.env.NODE_ENV?"__autocomplete_blur_input__":10,ht="production"!==process.env.NODE_ENV?"__autocomplete_change_input__":11,mt="production"!==process.env.NODE_ENV?"__autocomplete_keydown_space_button__":12,gt="production"!==process.env.NODE_ENV?"__autocomplete_click_button__":13,vt="production"!==process.env.NODE_ENV?"__autocomplete_blur_button__":14,yt="production"!==process.env.NODE_ENV?"__autocomplete_controlled_prop_updated_selected_item__":15,bt="production"!==process.env.NODE_ENV?"__autocomplete_touchend__":16,It=Object.freeze({
|
|
332
|
+
__proto__:null,unknown:ot,mouseUp:rt,itemMouseEnter:it,keyDownArrowUp:st,
|
|
333
|
+
keyDownArrowDown:at,keyDownEscape:ct,keyDownEnter:ut,keyDownHome:lt,
|
|
334
|
+
keyDownEnd:dt,clickItem:pt,blurInput:ft,changeInput:ht,keyDownSpaceButton:mt,
|
|
335
|
+
clickButton:gt,blurButton:vt,controlledPropUpdatedSelectedItem:yt,touchEnd:bt
|
|
336
|
+
}),xt=["refKey","ref"],_t=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],wt=["onKeyDown","onBlur","onChange","onInput","onChangeText"],Et=["refKey","ref"],St=["onMouseMove","onMouseDown","onClick","onPress","index","item"],Ot=function(){
|
|
337
|
+
var t=function(t){function n(n){var o
|
|
338
|
+
;(o=t.call(this,n)||this).id=o.props.id||"downshift-"+je(),
|
|
339
|
+
o.menuId=o.props.menuId||o.id+"-menu",
|
|
340
|
+
o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",
|
|
341
|
+
o.getItemId=o.props.getItemId||function(e){return o.id+"-item-"+e
|
|
342
|
+
},o.items=[],o.itemCount=null,
|
|
343
|
+
o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(e,t){
|
|
344
|
+
var n=setTimeout((function(){o.timeoutIds=o.timeoutIds.filter((function(e){
|
|
345
|
+
return e!==n})),e()}),t);o.timeoutIds.push(n)},o.setItemCount=function(e){
|
|
346
|
+
o.itemCount=e},o.unsetItemCount=function(){o.itemCount=null
|
|
347
|
+
},o.isItemDisabled=function(e,t){var n=o.getItemNodeFromIndex(t)
|
|
348
|
+
;return n&&n.hasAttribute("disabled")},o.setHighlightedIndex=function(t,n){
|
|
349
|
+
void 0===t&&(t=o.props.defaultHighlightedIndex),
|
|
350
|
+
void 0===n&&(n={}),n=qe(n),o.internalSetState(e({highlightedIndex:t},n))
|
|
351
|
+
},o.clearSelection=function(e){o.internalSetState({selectedItem:null,
|
|
352
|
+
inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,
|
|
353
|
+
isOpen:o.props.defaultIsOpen},e)},o.selectItem=function(t,n,r){
|
|
354
|
+
n=qe(n),o.internalSetState(e({isOpen:o.props.defaultIsOpen,
|
|
355
|
+
highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:t,
|
|
356
|
+
inputValue:o.props.itemToString(t)},n),r)},o.selectItemAtIndex=function(e,t,n){
|
|
357
|
+
var r=o.items[e];null!=r&&o.selectItem(r,t,n)
|
|
358
|
+
},o.selectHighlightedItem=function(e,t){
|
|
359
|
+
return o.selectItemAtIndex(o.getState().highlightedIndex,e,t)
|
|
360
|
+
},o.internalSetState=function(t,n){var r,i,s={},a="function"==typeof t
|
|
361
|
+
;return!a&&t.hasOwnProperty("inputValue")&&o.props.onInputValueChange(t.inputValue,e({},o.getStateAndHelpers(),t)),
|
|
362
|
+
o.setState((function(n){var c;n=o.getState(n);var u=a?t(n):t
|
|
363
|
+
;u=o.props.stateReducer(n,u),r=u.hasOwnProperty("selectedItem");var l={}
|
|
364
|
+
;return r&&u.selectedItem!==n.selectedItem&&(i=u.selectedItem),
|
|
365
|
+
(c=u).type||(c.type=ot),Object.keys(u).forEach((function(e){
|
|
366
|
+
n[e]!==u[e]&&(s[e]=u[e]),"type"!==e&&(u[e],Ye(o.props,e)||(l[e]=u[e]))
|
|
367
|
+
})),a&&u.hasOwnProperty("inputValue")&&o.props.onInputValueChange(u.inputValue,e({},o.getStateAndHelpers(),u)),
|
|
368
|
+
l}),(function(){
|
|
369
|
+
Te(n)(),Object.keys(s).length>1&&o.props.onStateChange(s,o.getStateAndHelpers()),
|
|
370
|
+
r&&o.props.onSelect(t.selectedItem,o.getStateAndHelpers()),
|
|
371
|
+
void 0!==i&&o.props.onChange(i,o.getStateAndHelpers()),
|
|
372
|
+
o.props.onUserAction(s,o.getStateAndHelpers())}))},o.rootRef=function(e){
|
|
373
|
+
return o._rootNode=e},o.getRootProps=function(t,n){
|
|
374
|
+
var r,i=void 0===t?{}:t,s=i.refKey,a=void 0===s?"ref":s,c=i.ref,u=U(i,xt),l=(void 0===n?{}:n).suppressRefError,d=void 0!==l&&l
|
|
375
|
+
;o.getRootProps.called=!0,
|
|
376
|
+
o.getRootProps.refKey=a,o.getRootProps.suppressRefError=d
|
|
377
|
+
;var p=o.getState().isOpen
|
|
378
|
+
;return e(((r={})[a]=Ae(c,o.rootRef),r.role="combobox",
|
|
379
|
+
r["aria-expanded"]=p,r["aria-haspopup"]="listbox",
|
|
380
|
+
r["aria-owns"]=p?o.menuId:void 0,r["aria-labelledby"]=o.labelId,r),u)
|
|
381
|
+
},o.keyDownHandlers={ArrowDown:function(e){var t=this
|
|
382
|
+
;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1
|
|
383
|
+
;this.moveHighlightedIndex(n,{type:at})}else this.internalSetState({isOpen:!0,
|
|
384
|
+
type:at},(function(){var e=t.getItemCount();if(e>0){
|
|
385
|
+
var n=Je(t.getState().highlightedIndex,1,{length:e},t.isItemDisabled,!0)
|
|
386
|
+
;t.setHighlightedIndex(n,{type:at})}}))},ArrowUp:function(e){var t=this
|
|
387
|
+
;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1
|
|
388
|
+
;this.moveHighlightedIndex(n,{type:st})}else this.internalSetState({isOpen:!0,
|
|
389
|
+
type:st},(function(){var e=t.getItemCount();if(e>0){
|
|
390
|
+
var n=Je(t.getState().highlightedIndex,-1,{length:e},t.isItemDisabled,!0)
|
|
391
|
+
;t.setHighlightedIndex(n,{type:st})}}))},Enter:function(e){if(229!==e.which){
|
|
392
|
+
var t=this.getState(),n=t.isOpen,o=t.highlightedIndex;if(n&&null!=o){
|
|
393
|
+
e.preventDefault();var r=this.items[o],i=this.getItemNodeFromIndex(o)
|
|
394
|
+
;if(null==r||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({
|
|
395
|
+
type:ut})}}},Escape:function(t){t.preventDefault(),this.reset(e({type:ct
|
|
396
|
+
},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}
|
|
397
|
+
},o.buttonKeyDownHandlers=e({},o.keyDownHandlers,{" ":function(e){
|
|
398
|
+
e.preventDefault(),this.toggleMenu({type:mt})}
|
|
399
|
+
}),o.inputKeyDownHandlers=e({},o.keyDownHandlers,{Home:function(e){
|
|
400
|
+
var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount()
|
|
401
|
+
;if(!(n<=0)&&t){var o=Ze(0,!1,{length:n},this.isItemDisabled)
|
|
402
|
+
;this.setHighlightedIndex(o,{type:lt})}}},End:function(e){
|
|
403
|
+
var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount()
|
|
404
|
+
;if(!(n<=0)&&t){var o=Ze(n-1,!0,{length:n},this.isItemDisabled)
|
|
405
|
+
;this.setHighlightedIndex(o,{type:dt})}}}}),o.getToggleButtonProps=function(t){
|
|
406
|
+
var n=void 0===t?{}:t,r=n.onClick;n.onPress
|
|
407
|
+
;var i=n.onKeyDown,s=n.onKeyUp,a=n.onBlur,c=U(n,_t),u=o.getState().isOpen,l={
|
|
408
|
+
onClick:$e(r,o.buttonHandleClick),onKeyDown:$e(i,o.buttonHandleKeyDown),
|
|
409
|
+
onKeyUp:$e(s,o.buttonHandleKeyUp),onBlur:$e(a,o.buttonHandleBlur)
|
|
410
|
+
},d=c.disabled?{}:l;return e({type:"button",role:"button",
|
|
411
|
+
"aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0
|
|
412
|
+
},d,c)},o.buttonHandleKeyUp=function(e){e.preventDefault()
|
|
413
|
+
},o.buttonHandleKeyDown=function(e){var t=Xe(e)
|
|
414
|
+
;o.buttonKeyDownHandlers[t]&&o.buttonKeyDownHandlers[t].call(o,e)
|
|
415
|
+
},o.buttonHandleClick=function(e){if(e.preventDefault(),o.props.environment){
|
|
416
|
+
var t=o.props.environment.document,n=t.body,r=t.activeElement
|
|
417
|
+
;n&&n===r&&e.target.focus()}"test"===process.env.NODE_ENV?o.toggleMenu({type:gt
|
|
418
|
+
}):o.internalSetTimeout((function(){return o.toggleMenu({type:gt})}))
|
|
419
|
+
},o.buttonHandleBlur=function(e){var t=e.target
|
|
420
|
+
;o.internalSetTimeout((function(){if(!o.isMouseDown&&o.props.environment){
|
|
421
|
+
var e=o.props.environment.document.activeElement
|
|
422
|
+
;null!=e&&e.id===o.inputId||e===t||o.reset({type:vt})}}))
|
|
423
|
+
},o.getLabelProps=function(t){return e({htmlFor:o.inputId,id:o.labelId},t)
|
|
424
|
+
},o.getInputProps=function(t){
|
|
425
|
+
var n=void 0===t?{}:t,r=n.onKeyDown,i=n.onBlur,s=n.onChange,a=n.onInput
|
|
426
|
+
;n.onChangeText;var c=U(n,wt),u={}
|
|
427
|
+
;var l,d=o.getState(),p=d.inputValue,f=d.isOpen,h=d.highlightedIndex
|
|
428
|
+
;c.disabled||((l={}).onChange=$e(s,a,o.inputHandleChange),
|
|
429
|
+
l.onKeyDown=$e(r,o.inputHandleKeyDown),l.onBlur=$e(i,o.inputHandleBlur),u=l)
|
|
430
|
+
;return e({"aria-autocomplete":"list",
|
|
431
|
+
"aria-activedescendant":f&&"number"==typeof h&&h>=0?o.getItemId(h):void 0,
|
|
432
|
+
"aria-controls":f?o.menuId:void 0,
|
|
433
|
+
"aria-labelledby":c&&c["aria-label"]?void 0:o.labelId,autoComplete:"off",
|
|
434
|
+
value:p,id:o.inputId},u,c)},o.inputHandleKeyDown=function(e){var t=Xe(e)
|
|
435
|
+
;t&&o.inputKeyDownHandlers[t]&&o.inputKeyDownHandlers[t].call(o,e)
|
|
436
|
+
},o.inputHandleChange=function(e){o.internalSetState({type:ht,isOpen:!0,
|
|
437
|
+
inputValue:e.target.value,highlightedIndex:o.props.defaultHighlightedIndex})
|
|
438
|
+
},o.inputHandleBlur=function(){o.internalSetTimeout((function(){var e
|
|
439
|
+
;if(!o.isMouseDown&&o.props.environment){
|
|
440
|
+
var t=o.props.environment.document.activeElement
|
|
441
|
+
;(null==t||null==(e=t.dataset)?void 0:e.toggle)&&o._rootNode&&o._rootNode.contains(t)||o.reset({
|
|
442
|
+
type:ft})}}))},o.menuRef=function(e){o._menuNode=e
|
|
443
|
+
},o.getMenuProps=function(t,n){
|
|
444
|
+
var r,i=void 0===t?{}:t,s=i.refKey,a=void 0===s?"ref":s,c=i.ref,u=U(i,Et),l=(void 0===n?{}:n).suppressRefError,d=void 0!==l&&l
|
|
445
|
+
;return o.getMenuProps.called=!0,
|
|
446
|
+
o.getMenuProps.refKey=a,o.getMenuProps.suppressRefError=d,
|
|
447
|
+
e(((r={})[a]=Ae(c,o.menuRef),
|
|
448
|
+
r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?void 0:o.labelId,
|
|
449
|
+
r.id=o.menuId,r),u)},o.getItemProps=function(t){
|
|
450
|
+
var n,r=void 0===t?{}:t,i=r.onMouseMove,s=r.onMouseDown,a=r.onClick;r.onPress
|
|
451
|
+
;var c,u,l=r.index,d=r.item,p=void 0===d?"production"===process.env.NODE_ENV?void 0:(c="getItemProps",
|
|
452
|
+
u="item",
|
|
453
|
+
void console.error('The property "'+u+'" is required in "'+c+'"')):d,f=U(r,St)
|
|
454
|
+
;void 0===l?(o.items.push(p),l=o.items.indexOf(p)):o.items[l]=p;var h=a,m=((n={
|
|
455
|
+
onMouseMove:$e(i,(function(){
|
|
456
|
+
l!==o.getState().highlightedIndex&&(o.setHighlightedIndex(l,{type:it
|
|
457
|
+
}),o.avoidScrolling=!0,o.internalSetTimeout((function(){
|
|
458
|
+
return o.avoidScrolling=!1}),250))})),onMouseDown:$e(s,(function(e){
|
|
459
|
+
e.preventDefault()}))}).onClick=$e(h,(function(){o.selectItemAtIndex(l,{type:pt
|
|
460
|
+
})})),n),g=f.disabled?{onMouseDown:m.onMouseDown}:m;return e({id:o.getItemId(l),
|
|
461
|
+
role:"option","aria-selected":o.getState().highlightedIndex===l},g,f)
|
|
462
|
+
},o.clearItems=function(){o.items=[]},o.reset=function(t,n){
|
|
463
|
+
void 0===t&&(t={}),t=qe(t),o.internalSetState((function(n){var r=n.selectedItem
|
|
464
|
+
;return e({isOpen:o.props.defaultIsOpen,
|
|
465
|
+
highlightedIndex:o.props.defaultHighlightedIndex,
|
|
466
|
+
inputValue:o.props.itemToString(r)},t)}),n)},o.toggleMenu=function(t,n){
|
|
467
|
+
void 0===t&&(t={}),t=qe(t),o.internalSetState((function(n){var r=n.isOpen
|
|
468
|
+
;return e({isOpen:!r},r&&{highlightedIndex:o.props.defaultHighlightedIndex},t)
|
|
469
|
+
}),(function(){var e=o.getState(),r=e.isOpen,i=e.highlightedIndex
|
|
470
|
+
;r&&o.getItemCount()>0&&"number"==typeof i&&o.setHighlightedIndex(i,t),Te(n)()
|
|
471
|
+
}))},o.openMenu=function(e){o.internalSetState({isOpen:!0},e)
|
|
472
|
+
},o.closeMenu=function(e){o.internalSetState({isOpen:!1},e)
|
|
473
|
+
},o.updateStatus=Ke((function(){var t
|
|
474
|
+
;if(null!=(t=o.props)&&null!=(t=t.environment)&&t.document){
|
|
475
|
+
var n=o.getState(),r=o.items[n.highlightedIndex],i=o.getItemCount(),s=o.props.getA11yStatusMessage(e({
|
|
476
|
+
itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,
|
|
477
|
+
resultCount:i,highlightedItem:r},n))
|
|
478
|
+
;o.previousResultCount=i,nt(s,o.props.environment.document)}}),200)
|
|
479
|
+
;var r=o.props,i=r.defaultHighlightedIndex,s=r.initialHighlightedIndex,a=void 0===s?i:s,c=r.defaultIsOpen,u=r.initialIsOpen,l=void 0===u?c:u,d=r.initialInputValue,p=void 0===d?"":d,f=r.initialSelectedItem,h=void 0===f?null:f,m=o.getState({
|
|
480
|
+
highlightedIndex:a,isOpen:l,inputValue:p,selectedItem:h})
|
|
481
|
+
;return null!=m.selectedItem&&void 0===o.props.initialInputValue&&(m.inputValue=o.props.itemToString(m.selectedItem)),
|
|
482
|
+
o.state=m,o}X(n,t);var o=n.prototype;return o.internalClearTimeouts=function(){
|
|
483
|
+
this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]
|
|
484
|
+
},o.getState=function(e){return void 0===e&&(e=this.state),Ue(e,this.props)
|
|
485
|
+
},o.getItemCount=function(){var e=this.items.length
|
|
486
|
+
;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),
|
|
487
|
+
e},o.getItemNodeFromIndex=function(e){
|
|
488
|
+
return this.props.environment?this.props.environment.document.getElementById(this.getItemId(e)):null
|
|
489
|
+
},o.scrollHighlightedItemIntoView=function(){
|
|
490
|
+
var e=this.getItemNodeFromIndex(this.getState().highlightedIndex)
|
|
491
|
+
;this.props.scrollIntoView(e,this._menuNode)
|
|
492
|
+
},o.moveHighlightedIndex=function(e,t){
|
|
493
|
+
var n=this.getItemCount(),o=this.getState().highlightedIndex;if(n>0){
|
|
494
|
+
var r=Je(o,e,{length:n},this.isItemDisabled,!0);this.setHighlightedIndex(r,t)}},
|
|
495
|
+
o.getStateAndHelpers=function(){
|
|
496
|
+
var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,o=e.selectedItem,r=e.isOpen,i=this.props.itemToString,s=this.id,a=this.getRootProps,c=this.getToggleButtonProps,u=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,g=this.selectItem,v=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,I=this.clearSelection,x=this.clearItems
|
|
497
|
+
;return{getRootProps:a,getToggleButtonProps:c,getLabelProps:u,getMenuProps:l,
|
|
498
|
+
getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:h,
|
|
499
|
+
toggleMenu:m,selectItem:g,selectItemAtIndex:v,selectHighlightedItem:y,
|
|
500
|
+
setHighlightedIndex:b,clearSelection:I,clearItems:x,
|
|
501
|
+
setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,
|
|
502
|
+
setState:this.internalSetState,itemToString:i,id:s,highlightedIndex:t,
|
|
503
|
+
inputValue:n,isOpen:r,selectedItem:o}},o.componentDidMount=function(){var e=this
|
|
504
|
+
;if("production"!==process.env.NODE_ENV&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Dt(this._menuNode,this.getMenuProps),
|
|
505
|
+
this.props.environment){var t=function(){e.isMouseDown=!0},n=function(t){
|
|
506
|
+
e.isMouseDown=!1,
|
|
507
|
+
!Ge(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({
|
|
508
|
+
type:rt},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))
|
|
509
|
+
},o=function(){e.isTouchMove=!1},r=function(){e.isTouchMove=!0},i=function(t){
|
|
510
|
+
var n=Ge(t.target,[e._rootNode,e._menuNode],e.props.environment,!1)
|
|
511
|
+
;e.isTouchMove||n||!e.getState().isOpen||e.reset({type:bt},(function(){
|
|
512
|
+
return e.props.onOuterClick(e.getStateAndHelpers())}))},s=this.props.environment
|
|
513
|
+
;s.addEventListener("mousedown",t),
|
|
514
|
+
s.addEventListener("mouseup",n),s.addEventListener("touchstart",o),
|
|
515
|
+
s.addEventListener("touchmove",r),
|
|
516
|
+
s.addEventListener("touchend",i),this.cleanup=function(){
|
|
517
|
+
e.internalClearTimeouts(),
|
|
518
|
+
e.updateStatus.cancel(),s.removeEventListener("mousedown",t),
|
|
519
|
+
s.removeEventListener("mouseup",n),
|
|
520
|
+
s.removeEventListener("touchstart",o),s.removeEventListener("touchmove",r),
|
|
521
|
+
s.removeEventListener("touchend",i)}}else this.cleanup=function(){
|
|
522
|
+
e.internalClearTimeouts()}},o.shouldScroll=function(e,t){
|
|
523
|
+
var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,o=(void 0===t.highlightedIndex?e:t).highlightedIndex
|
|
524
|
+
;return n&&this.getState().isOpen&&!e.isOpen||n!==o
|
|
525
|
+
},o.componentDidUpdate=function(e,t){
|
|
526
|
+
"production"!==process.env.NODE_ENV&&(Qe(this.state,e,this.props),
|
|
527
|
+
this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Dt(this._menuNode,this.getMenuProps)),
|
|
528
|
+
Ye(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({
|
|
529
|
+
type:yt,inputValue:this.props.itemToString(this.props.selectedItem)
|
|
530
|
+
}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),
|
|
531
|
+
this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()
|
|
532
|
+
},o.render=function(){var e=Fe(this.props.children,Me)
|
|
533
|
+
;this.clearItems(),this.getRootProps.called=!1,
|
|
534
|
+
this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,
|
|
535
|
+
this.getMenuProps.called=!1,
|
|
536
|
+
this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,
|
|
537
|
+
this.getLabelProps.called=!1,this.getInputProps.called=!1
|
|
538
|
+
;var t=Fe(e(this.getStateAndHelpers()));if(!t)return null
|
|
539
|
+
;if(this.getRootProps.called||this.props.suppressRefError)return"production"===process.env.NODE_ENV||this.getRootProps.suppressRefError||this.props.suppressRefError||function(e,t){
|
|
540
|
+
var n=t.refKey,o="ref"!==n,r=!Be(e)
|
|
541
|
+
;!r||o||Oe.isForwardRef(e)?!r&&o&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'):console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps")
|
|
542
|
+
;Oe.isForwardRef(e)||ze(e)[n]||console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')
|
|
543
|
+
}(t,this.getRootProps),t;if(Be(t))return l(t,this.getRootProps(ze(t)))
|
|
544
|
+
;if("production"!==process.env.NODE_ENV)throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")
|
|
545
|
+
},n}(d);return t.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,
|
|
546
|
+
getA11yStatusMessage:Le,itemToString:function(e){
|
|
547
|
+
return null==e?"":("production"===process.env.NODE_ENV||(t=e,
|
|
548
|
+
"[object Object]"!==Object.prototype.toString.call(t))||e.hasOwnProperty("toString")||console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",e),
|
|
549
|
+
String(e));var t},onStateChange:Me,onInputValueChange:Me,onUserAction:Me,
|
|
550
|
+
onChange:Me,onSelect:Me,onOuterClick:Me,selectedItemChanged:function(e,t){
|
|
551
|
+
return e!==t},environment:"undefined"==typeof window?void 0:window,
|
|
552
|
+
stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:Re
|
|
553
|
+
},t.stateChangeTypes=It,t}();function Dt(e,t){var n=t.refKey
|
|
554
|
+
;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')
|
|
555
|
+
}"production"!==process.env.NODE_ENV&&(Ot.propTypes={children:xe.func,
|
|
556
|
+
defaultHighlightedIndex:xe.number,defaultIsOpen:xe.bool,
|
|
557
|
+
initialHighlightedIndex:xe.number,initialSelectedItem:xe.any,
|
|
558
|
+
initialInputValue:xe.string,initialIsOpen:xe.bool,getA11yStatusMessage:xe.func,
|
|
559
|
+
itemToString:xe.func,onChange:xe.func,onSelect:xe.func,onStateChange:xe.func,
|
|
560
|
+
onInputValueChange:xe.func,onUserAction:xe.func,onOuterClick:xe.func,
|
|
561
|
+
selectedItemChanged:xe.func,stateReducer:xe.func,itemCount:xe.number,
|
|
562
|
+
id:xe.string,environment:xe.shape({addEventListener:xe.func.isRequired,
|
|
563
|
+
removeEventListener:xe.func.isRequired,document:xe.shape({
|
|
564
|
+
createElement:xe.func.isRequired,getElementById:xe.func.isRequired,
|
|
565
|
+
activeElement:xe.any.isRequired,body:xe.any.isRequired}).isRequired,
|
|
566
|
+
Node:xe.func.isRequired}),suppressRefError:xe.bool,scrollIntoView:xe.func,
|
|
567
|
+
selectedItem:xe.any,isOpen:xe.bool,inputValue:xe.string,
|
|
568
|
+
highlightedIndex:xe.number,labelId:xe.string,inputId:xe.string,menuId:xe.string,
|
|
569
|
+
getItemId:xe.func});var Nt={highlightedIndex:-1,isOpen:!1,selectedItem:null,
|
|
570
|
+
inputValue:""};function kt(t,n,o){var r=t.props,i=t.type,s={}
|
|
571
|
+
;Object.keys(n).forEach((function(r){!function(t,n,o,r){
|
|
572
|
+
var i=n.props,s=n.type,a="on"+Mt(t)+"Change"
|
|
573
|
+
;i[a]&&void 0!==r[t]&&r[t]!==o[t]&&i[a](e({type:s},r))
|
|
574
|
+
}(r,t,n,o),o[r]!==n[r]&&(s[r]=o[r])
|
|
575
|
+
})),r.onStateChange&&Object.keys(s).length&&r.onStateChange(e({type:i},s))}
|
|
576
|
+
var Ct=Ke((function(e,t){nt(e,t)
|
|
577
|
+
}),200),Vt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?p:c,Pt="useId"in i?function(e){
|
|
578
|
+
var t=e.id,n=e.labelId,o=e.menuId,r=e.getItemId,a=e.toggleButtonId,c=e.inputId,u="downshift-"+i.useId()
|
|
579
|
+
;return t||(t=u),s({labelId:n||t+"-label",menuId:o||t+"-menu",
|
|
580
|
+
getItemId:r||function(e){return t+"-item-"+e},
|
|
581
|
+
toggleButtonId:a||t+"-toggle-button",inputId:c||t+"-input"}).current
|
|
582
|
+
}:function(e){
|
|
583
|
+
var t=e.id,n=void 0===t?"downshift-"+je():t,o=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,c=e.inputId
|
|
584
|
+
;return s({labelId:o||n+"-label",menuId:r||n+"-menu",getItemId:i||function(e){
|
|
585
|
+
return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:c||n+"-input"
|
|
586
|
+
}).current};function Tt(e,t,n,o){var r,i;if(void 0===e){
|
|
587
|
+
if(void 0===t)throw new Error(o);r=n[t],i=t}else i=void 0===t?n.indexOf(e):t,r=e
|
|
588
|
+
;return[r,i]}function Mt(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}
|
|
589
|
+
function Rt(e){var t=s(e);return t.current=e,t}function Ht(t,n,o,r){
|
|
590
|
+
var i=s(),u=s(),l=a((function(n,o){u.current=o,n=Ue(n,o.props);var r=t(n,o)
|
|
591
|
+
;return o.props.stateReducer(n,e({},o,{changes:r}))
|
|
592
|
+
}),[t]),d=f(l,n,o),p=d[0],h=d[1],m=Rt(n),g=a((function(t){return h(e({
|
|
593
|
+
props:m.current},t))}),[m]),v=u.current;return c((function(){
|
|
594
|
+
var e=Ue(i.current,null==v?void 0:v.props)
|
|
595
|
+
;v&&i.current&&!r(e,p)&&kt(v,e,p),i.current=p}),[p,v,r]),[p,g]}var Kt={
|
|
596
|
+
itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},
|
|
597
|
+
stateReducer:function(e,t){return t.changes},scrollIntoView:Re,
|
|
598
|
+
environment:"undefined"==typeof window?void 0:window};function $t(e,t,n){
|
|
599
|
+
void 0===n&&(n=Nt);var o=e["default"+Mt(t)];return void 0!==o?o:n[t]}
|
|
600
|
+
function At(e,t,n){void 0===n&&(n=Nt);var o=e[t];if(void 0!==o)return o
|
|
601
|
+
;var r=e["initial"+Mt(t)];return void 0!==r?r:$t(e,t,n)}function jt(e,t,n){
|
|
602
|
+
var o=e.items,r=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,s=e.isItemDisabled,a=e.itemToKey,c=t.selectedItem,u=t.highlightedIndex
|
|
603
|
+
;return 0===o.length?-1:void 0===r||u!==r||s(o[r])?void 0===i||s(o[i])?c?o.findIndex((function(e){
|
|
604
|
+
return a(c)===a(e)})):n<0&&!s(o[o.length-1])?o.length-1:n>0&&!s(o[0])?0:-1:i:r}
|
|
605
|
+
var Lt=function(){return Me};function Ft(e,t,n,o){void 0===o&&(o={})
|
|
606
|
+
;var r=o.document,i=qt();c((function(){if(e&&!i&&r){var n=e(t);Ct(n,r)}
|
|
607
|
+
}),n),c((function(){return function(){var e,t
|
|
608
|
+
;Ct.cancel(),(t=null==(e=r)?void 0:e.getElementById("a11y-status-message"))&&t.remove()
|
|
609
|
+
}}),[r])}"production"!==process.env.NODE_ENV&&(Lt=function(){
|
|
610
|
+
for(var e=s(!0),t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o]
|
|
611
|
+
;var r=s(n.reduce((function(e,t){return e[t]={},e}),{}));return c((function(){
|
|
612
|
+
Object.keys(r.current).forEach((function(t){var n=r.current[t]
|
|
613
|
+
;if(!e.current||Object.keys(n).length){
|
|
614
|
+
var o=n.suppressRefError,i=n.refKey,s=n.elementRef
|
|
615
|
+
;s&&s.current||o||console.error('downshift: The ref prop "'+i+'" from '+t+" was not applied correctly on your element.")
|
|
616
|
+
}else console.error("downshift: You forgot to call the "+t+" getter function on your component / element.")
|
|
617
|
+
})),e.current=!1})),a((function(e,t,n,o){r.current[e]={suppressRefError:t,
|
|
618
|
+
refKey:n,elementRef:o}}),[])});var Bt=Me;function zt(t,n,o){var r
|
|
619
|
+
;void 0===o&&(o=!0);var i=(null==(r=t.items)?void 0:r.length)&&n>=0;return e({
|
|
620
|
+
isOpen:!1,highlightedIndex:-1},i&&e({selectedItem:t.items[n],
|
|
621
|
+
isOpen:$t(t,"isOpen"),highlightedIndex:$t(t,"highlightedIndex")},o&&{
|
|
622
|
+
inputValue:t.itemToString(t.items[n])}))}function Wt(e,t){
|
|
623
|
+
return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem
|
|
624
|
+
}function qt(){var e=i.useRef(!0);return i.useEffect((function(){
|
|
625
|
+
return e.current=!1,function(){e.current=!0}}),[]),e.current}
|
|
626
|
+
"production"!==process.env.NODE_ENV&&(Bt=function(e){
|
|
627
|
+
var t=e.props,n=e.state,o=s(t),r=qt();c((function(){
|
|
628
|
+
r||(Qe(n,o.current,t),o.current=t)}),[n,t,r])});var Ut={environment:xe.shape({
|
|
629
|
+
addEventListener:xe.func.isRequired,removeEventListener:xe.func.isRequired,
|
|
630
|
+
document:xe.shape({createElement:xe.func.isRequired,
|
|
631
|
+
getElementById:xe.func.isRequired,activeElement:xe.any.isRequired,
|
|
632
|
+
body:xe.any.isRequired}).isRequired,Node:xe.func.isRequired}),
|
|
633
|
+
itemToString:xe.func,itemToKey:xe.func,stateReducer:xe.func},Yt=e({},Ut,{
|
|
634
|
+
getA11yStatusMessage:xe.func,highlightedIndex:xe.number,
|
|
635
|
+
defaultHighlightedIndex:xe.number,initialHighlightedIndex:xe.number,
|
|
636
|
+
isOpen:xe.bool,defaultIsOpen:xe.bool,initialIsOpen:xe.bool,selectedItem:xe.any,
|
|
637
|
+
initialSelectedItem:xe.any,defaultSelectedItem:xe.any,id:xe.string,
|
|
638
|
+
labelId:xe.string,menuId:xe.string,getItemId:xe.func,toggleButtonId:xe.string,
|
|
639
|
+
onSelectedItemChange:xe.func,onHighlightedIndexChange:xe.func,
|
|
640
|
+
onStateChange:xe.func,onIsOpenChange:xe.func,scrollIntoView:xe.func})
|
|
641
|
+
;y(y({},Yt),{items:xe.array.isRequired,isItemDisabled:xe.func}),y(y({},Kt),{
|
|
642
|
+
isItemDisabled:function(){return!1}}),process.env.NODE_ENV,process.env.NODE_ENV,
|
|
643
|
+
process.env.NODE_ENV,
|
|
644
|
+
process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,
|
|
645
|
+
process.env.NODE_ENV,
|
|
646
|
+
process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,
|
|
647
|
+
process.env.NODE_ENV,
|
|
648
|
+
process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,
|
|
649
|
+
process.env.NODE_ENV,
|
|
650
|
+
process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,
|
|
651
|
+
process.env.NODE_ENV,
|
|
652
|
+
process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,
|
|
653
|
+
process.env.NODE_ENV
|
|
654
|
+
;var Xt="production"!==process.env.NODE_ENV?"__input_keydown_arrow_down__":0,Jt="production"!==process.env.NODE_ENV?"__input_keydown_arrow_up__":1,Zt="production"!==process.env.NODE_ENV?"__input_keydown_escape__":2,Gt="production"!==process.env.NODE_ENV?"__input_keydown_home__":3,Qt="production"!==process.env.NODE_ENV?"__input_keydown_end__":4,en="production"!==process.env.NODE_ENV?"__input_keydown_page_up__":5,tn="production"!==process.env.NODE_ENV?"__input_keydown_page_down__":6,nn="production"!==process.env.NODE_ENV?"__input_keydown_enter__":7,on="production"!==process.env.NODE_ENV?"__input_change__":8,rn="production"!==process.env.NODE_ENV?"__input_blur__":9,sn="production"!==process.env.NODE_ENV?"__input_click__":10,an="production"!==process.env.NODE_ENV?"__menu_mouse_leave__":11,cn="production"!==process.env.NODE_ENV?"__item_mouse_move__":12,un="production"!==process.env.NODE_ENV?"__item_click__":13,ln="production"!==process.env.NODE_ENV?"__togglebutton_click__":14,dn="production"!==process.env.NODE_ENV?"__function_toggle_menu__":15,pn="production"!==process.env.NODE_ENV?"__function_open_menu__":16,fn="production"!==process.env.NODE_ENV?"__function_close_menu__":17,hn="production"!==process.env.NODE_ENV?"__function_set_highlighted_index__":18,mn="production"!==process.env.NODE_ENV?"__function_select_item__":19,gn="production"!==process.env.NODE_ENV?"__function_set_input_value__":20,vn="production"!==process.env.NODE_ENV?"__function_reset__":21,yn="production"!==process.env.NODE_ENV?"__controlled_prop_updated_selected_item__":22,bn=Object.freeze({
|
|
655
|
+
__proto__:null,InputKeyDownArrowDown:Xt,InputKeyDownArrowUp:Jt,
|
|
656
|
+
InputKeyDownEscape:Zt,InputKeyDownHome:Gt,InputKeyDownEnd:Qt,
|
|
657
|
+
InputKeyDownPageUp:en,InputKeyDownPageDown:tn,InputKeyDownEnter:nn,
|
|
658
|
+
InputChange:on,InputBlur:rn,InputClick:sn,MenuMouseLeave:an,ItemMouseMove:cn,
|
|
659
|
+
ItemClick:un,ToggleButtonClick:ln,FunctionToggleMenu:dn,FunctionOpenMenu:pn,
|
|
660
|
+
FunctionCloseMenu:fn,FunctionSetHighlightedIndex:hn,FunctionSelectItem:mn,
|
|
661
|
+
FunctionSetInputValue:gn,FunctionReset:vn,ControlledPropUpdatedSelectedItem:yn})
|
|
662
|
+
;function In(t){var n=function(e){
|
|
663
|
+
var t=At(e,"selectedItem"),n=At(e,"isOpen"),o=At(e,"highlightedIndex"),r=At(e,"inputValue")
|
|
664
|
+
;return{highlightedIndex:o<0&&t&&n?e.items.findIndex((function(n){
|
|
665
|
+
return e.itemToKey(n)===e.itemToKey(t)})):o,isOpen:n,selectedItem:t,inputValue:r
|
|
666
|
+
}}(t),o=n.selectedItem,r=n.inputValue
|
|
667
|
+
;return""===r&&o&&void 0===t.defaultInputValue&&void 0===t.initialInputValue&&void 0===t.inputValue&&(r=t.itemToString(o)),
|
|
668
|
+
e({},n,{inputValue:r})}var xn=e({},Yt,{items:xe.array.isRequired,
|
|
669
|
+
isItemDisabled:xe.func,inputValue:xe.string,defaultInputValue:xe.string,
|
|
670
|
+
initialInputValue:xe.string,inputId:xe.string,onInputValueChange:xe.func})
|
|
671
|
+
;var _n=Me;"production"!==process.env.NODE_ENV&&(_n=function(e,t){
|
|
672
|
+
xe.checkPropTypes(xn,e,"prop",t.name)});var wn=e({},Kt,{
|
|
673
|
+
isItemDisabled:function(){return!1}});function En(t,n){
|
|
674
|
+
var o,r,i=n.type,s=n.props,a=n.altKey;switch(i){case un:r={
|
|
675
|
+
isOpen:$t(s,"isOpen"),highlightedIndex:$t(s,"highlightedIndex"),
|
|
676
|
+
selectedItem:s.items[n.index],inputValue:s.itemToString(s.items[n.index])};break
|
|
677
|
+
;case Xt:r=t.isOpen?{
|
|
678
|
+
highlightedIndex:Je(t.highlightedIndex,1,s.items,s.isItemDisabled,!0)}:{
|
|
679
|
+
highlightedIndex:a&&null==t.selectedItem?-1:jt(s,t,1),isOpen:s.items.length>=0}
|
|
680
|
+
;break;case Jt:r=t.isOpen?a?zt(s,t.highlightedIndex):{
|
|
681
|
+
highlightedIndex:Je(t.highlightedIndex,-1,s.items,s.isItemDisabled,!0)}:{
|
|
682
|
+
highlightedIndex:jt(s,t,-1),isOpen:s.items.length>=0};break;case nn:
|
|
683
|
+
r=zt(s,t.highlightedIndex);break;case Zt:r=e({isOpen:!1,highlightedIndex:-1
|
|
684
|
+
},!t.isOpen&&{selectedItem:null,inputValue:""});break;case en:r={
|
|
685
|
+
highlightedIndex:Je(t.highlightedIndex,-10,s.items,s.isItemDisabled,!0)};break
|
|
686
|
+
;case tn:r={
|
|
687
|
+
highlightedIndex:Je(t.highlightedIndex,10,s.items,s.isItemDisabled,!0)};break
|
|
688
|
+
;case Gt:r={highlightedIndex:Ze(0,!1,s.items,s.isItemDisabled)};break;case Qt:
|
|
689
|
+
r={highlightedIndex:Ze(s.items.length-1,!0,s.items,s.isItemDisabled)};break
|
|
690
|
+
;case rn:r=e({isOpen:!1,highlightedIndex:-1
|
|
691
|
+
},t.highlightedIndex>=0&&(null==(o=s.items)?void 0:o.length)&&n.selectItem&&{
|
|
692
|
+
selectedItem:s.items[t.highlightedIndex],
|
|
693
|
+
inputValue:s.itemToString(s.items[t.highlightedIndex])});break;case on:r={
|
|
694
|
+
isOpen:!0,highlightedIndex:$t(s,"highlightedIndex"),inputValue:n.inputValue}
|
|
695
|
+
;break;case sn:r={isOpen:!t.isOpen,highlightedIndex:t.isOpen?-1:jt(s,t,0)};break
|
|
696
|
+
;case mn:r={selectedItem:n.selectedItem,
|
|
697
|
+
inputValue:s.itemToString(n.selectedItem)};break;case yn:r={
|
|
698
|
+
inputValue:n.inputValue};break;default:return function(t,n,o){
|
|
699
|
+
var r,i=n.type,s=n.props;switch(i){case o.ItemMouseMove:r={
|
|
700
|
+
highlightedIndex:n.disabled?-1:n.index};break;case o.MenuMouseLeave:r={
|
|
701
|
+
highlightedIndex:-1};break;case o.ToggleButtonClick:case o.FunctionToggleMenu:
|
|
702
|
+
r={isOpen:!t.isOpen,highlightedIndex:t.isOpen?-1:jt(s,t,0)};break
|
|
703
|
+
;case o.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:jt(s,t,0)};break
|
|
704
|
+
;case o.FunctionCloseMenu:r={isOpen:!1};break
|
|
705
|
+
;case o.FunctionSetHighlightedIndex:r={highlightedIndex:n.highlightedIndex}
|
|
706
|
+
;break;case o.FunctionSetInputValue:r={inputValue:n.inputValue};break
|
|
707
|
+
;case o.FunctionReset:r={highlightedIndex:$t(s,"highlightedIndex"),
|
|
708
|
+
isOpen:$t(s,"isOpen"),selectedItem:$t(s,"selectedItem"),
|
|
709
|
+
inputValue:$t(s,"inputValue")};break;default:
|
|
710
|
+
throw new Error("Reducer called without proper action type.")}return e({},t,r)
|
|
711
|
+
}(t,n,bn)}return e({},t,r)}
|
|
712
|
+
var Sn=["onMouseLeave","refKey","ref"],On=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Dn=["onClick","onPress","refKey","ref"],Nn=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"]
|
|
713
|
+
;function kn(t){void 0===t&&(t={}),_n(t,kn)
|
|
714
|
+
;var n=e({},wn,t),o=n.items,r=n.scrollIntoView,i=n.environment,l=n.getA11yStatusMessage,d=function(e,t,n,o){
|
|
715
|
+
var r=s(),i=Ht(e,t,n,o),a=i[0],u=i[1],l=qt();return c((function(){
|
|
716
|
+
Ye(t,"selectedItem")&&(l||t.itemToKey(t.selectedItem)!==t.itemToKey(r.current)&&u({
|
|
717
|
+
type:yn,inputValue:t.itemToString(t.selectedItem)
|
|
718
|
+
}),r.current=a.selectedItem===r.current?t.selectedItem:a.selectedItem)
|
|
719
|
+
}),[a.selectedItem,t.selectedItem]),[Ue(a,t),u]
|
|
720
|
+
}(En,n,In,Wt),p=d[0],f=d[1],h=p.isOpen,m=p.highlightedIndex,g=p.selectedItem,v=p.inputValue,y=s(null),b=s({}),I=s(null),x=s(null),_=qt(),w=Pt(n),E=s(),S=Rt({
|
|
721
|
+
state:p,props:n}),O=a((function(e){return b.current[w.getItemId(e)]}),[w])
|
|
722
|
+
;Ft(l,p,[h,m,g,v],i);var D=function(e){
|
|
723
|
+
var t=e.highlightedIndex,n=e.isOpen,o=e.itemRefs,r=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,c=s(!0)
|
|
724
|
+
;return Vt((function(){
|
|
725
|
+
t<0||!n||!Object.keys(o.current).length||(!1===c.current?c.current=!0:a(r(t),i))
|
|
726
|
+
}),[t]),c}({menuElement:y.current,highlightedIndex:m,isOpen:h,itemRefs:b,
|
|
727
|
+
scrollIntoView:r,getItemNodeFromIndex:O});Bt({props:n,state:p}),c((function(){
|
|
728
|
+
At(n,"isOpen")&&I.current&&I.current.focus()}),[]),c((function(){
|
|
729
|
+
_||(E.current=o.length)}));var N=function(e,t,n){var o=s({isMouseDown:!1,
|
|
730
|
+
isTouchMove:!1,isTouchEnd:!1});return c((function(){if(!e)return Me
|
|
731
|
+
;var r=t.map((function(e){return e.current}));function i(){
|
|
732
|
+
o.current.isTouchEnd=!1,o.current.isMouseDown=!0}function s(t){
|
|
733
|
+
o.current.isMouseDown=!1,Ge(t.target,r,e)||n()}function a(){
|
|
734
|
+
o.current.isTouchEnd=!1,o.current.isTouchMove=!1}function c(){
|
|
735
|
+
o.current.isTouchMove=!0}function u(t){
|
|
736
|
+
o.current.isTouchEnd=!0,o.current.isTouchMove||Ge(t.target,r,e,!1)||n()}
|
|
737
|
+
return e.addEventListener("mousedown",i),
|
|
738
|
+
e.addEventListener("mouseup",s),e.addEventListener("touchstart",a),
|
|
739
|
+
e.addEventListener("touchmove",c),e.addEventListener("touchend",u),function(){
|
|
740
|
+
e.removeEventListener("mousedown",i),
|
|
741
|
+
e.removeEventListener("mouseup",s),e.removeEventListener("touchstart",a),
|
|
742
|
+
e.removeEventListener("touchmove",c),e.removeEventListener("touchend",u)}
|
|
743
|
+
}),[e,n]),o.current}(i,[x,y,I],a((function(){S.current.state.isOpen&&f({type:rn,
|
|
744
|
+
selectItem:!1})}),[f,S])),k=Lt("getInputProps","getMenuProps");c((function(){
|
|
745
|
+
h||(b.current={})}),[h]),c((function(){var e
|
|
746
|
+
;h&&null!=i&&i.document&&null!=I&&null!=(e=I.current)&&e.focus&&i.document.activeElement!==I.current&&I.current.focus()
|
|
747
|
+
}),[h,i]);var C=u((function(){return{ArrowDown:function(e){
|
|
748
|
+
e.preventDefault(),f({type:Xt,altKey:e.altKey})},ArrowUp:function(e){
|
|
749
|
+
e.preventDefault(),f({type:Jt,altKey:e.altKey})},Home:function(e){
|
|
750
|
+
S.current.state.isOpen&&(e.preventDefault(),f({type:Gt}))},End:function(e){
|
|
751
|
+
S.current.state.isOpen&&(e.preventDefault(),f({type:Qt}))},Escape:function(e){
|
|
752
|
+
var t=S.current.state
|
|
753
|
+
;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),
|
|
754
|
+
f({type:Zt}))},Enter:function(e){
|
|
755
|
+
S.current.state.isOpen&&229!==e.which&&(e.preventDefault(),f({type:nn}))},
|
|
756
|
+
PageUp:function(e){S.current.state.isOpen&&(e.preventDefault(),f({type:en}))},
|
|
757
|
+
PageDown:function(e){S.current.state.isOpen&&(e.preventDefault(),f({type:tn}))}}
|
|
758
|
+
}),[f,S]),V=a((function(t){return e({id:w.labelId,htmlFor:w.inputId},t)
|
|
759
|
+
}),[w]),P=a((function(t,n){
|
|
760
|
+
var o,r=void 0===t?{}:t,i=r.onMouseLeave,s=r.refKey,a=void 0===s?"ref":s,c=r.ref,u=U(r,Sn),l=(void 0===n?{}:n).suppressRefError
|
|
761
|
+
;return k("getMenuProps",void 0!==l&&l,a,y),e(((o={})[a]=Ae(c,(function(e){
|
|
762
|
+
y.current=e
|
|
763
|
+
})),o.id=w.menuId,o.role="listbox",o["aria-labelledby"]=u&&u["aria-label"]?void 0:""+w.labelId,
|
|
764
|
+
o.onMouseLeave=$e(i,(function(){f({type:an})})),o),u)
|
|
765
|
+
}),[f,k,w]),T=a((function(t){
|
|
766
|
+
var n,o,r=void 0===t?{}:t,i=r.item,s=r.index,a=r.refKey,c=void 0===a?"ref":a,u=r.ref,l=r.onMouseMove,d=r.onMouseDown,p=r.onClick
|
|
767
|
+
;r.onPress;var h=r.disabled,m=U(r,On)
|
|
768
|
+
;void 0!==h&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.')
|
|
769
|
+
;var g=S.current,v=g.props,y=g.state,I=Tt(i,s,v.items,"Pass either item or index to getItemProps!"),x=I[0],_=I[1],E=v.isItemDisabled(x,_),O=p
|
|
770
|
+
;return e(((n={})[c]=Ae(u,(function(e){e&&(b.current[w.getItemId(_)]=e)
|
|
771
|
+
})),n["aria-disabled"]=E,
|
|
772
|
+
n["aria-selected"]=""+(_===y.highlightedIndex),n.id=w.getItemId(_),
|
|
773
|
+
n.role="option",n),!E&&((o={}).onClick=$e(O,(function(){f({type:un,index:_})})),
|
|
774
|
+
o),{onMouseMove:$e(l,(function(){
|
|
775
|
+
N.isTouchEnd||_===y.highlightedIndex||(D.current=!1,f({type:cn,index:_,
|
|
776
|
+
disabled:E}))})),onMouseDown:$e(d,(function(e){return e.preventDefault()}))},m)
|
|
777
|
+
}),[f,w,S,N,D]),M=a((function(t){var n,o=void 0===t?{}:t,r=o.onClick;o.onPress
|
|
778
|
+
;var i=o.refKey,s=void 0===i?"ref":i,a=o.ref,c=U(o,Dn),u=S.current.state
|
|
779
|
+
;return e(((n={})[s]=Ae(a,(function(e){x.current=e
|
|
780
|
+
})),n["aria-controls"]=w.menuId,
|
|
781
|
+
n["aria-expanded"]=u.isOpen,n.id=w.toggleButtonId,
|
|
782
|
+
n.tabIndex=-1,n),!c.disabled&&e({},{onClick:$e(r,(function(){f({type:ln})}))
|
|
783
|
+
}),c)}),[f,S,w]),R=a((function(t,n){
|
|
784
|
+
var o,r=void 0===t?{}:t,s=r.onKeyDown,a=r.onChange,c=r.onInput,u=r.onBlur
|
|
785
|
+
;r.onChangeText
|
|
786
|
+
;var l=r.onClick,d=r.refKey,p=void 0===d?"ref":d,h=r.ref,m=U(r,Nn),g=(void 0===n?{}:n).suppressRefError
|
|
787
|
+
;k("getInputProps",void 0!==g&&g,p,I);var v,y=S.current.state,b={}
|
|
788
|
+
;m.disabled||((v={}).onChange=$e(a,c,(function(e){f({type:on,
|
|
789
|
+
inputValue:e.target.value})})),v.onKeyDown=$e(s,(function(e){var t=Xe(e)
|
|
790
|
+
;t&&C[t]&&C[t](e)})),v.onBlur=$e(u,(function(e){
|
|
791
|
+
if(null!=i&&i.document&&y.isOpen&&!N.isMouseDown){
|
|
792
|
+
var t=null===e.relatedTarget&&i.document.activeElement!==i.document.body;f({
|
|
793
|
+
type:rn,selectItem:!t})}})),v.onClick=$e(l,(function(){f({type:sn})})),b=v)
|
|
794
|
+
;return e(((o={})[p]=Ae(h,(function(e){I.current=e
|
|
795
|
+
})),o["aria-activedescendant"]=y.isOpen&&y.highlightedIndex>-1?w.getItemId(y.highlightedIndex):"",
|
|
796
|
+
o["aria-autocomplete"]="list",
|
|
797
|
+
o["aria-controls"]=w.menuId,o["aria-expanded"]=y.isOpen,
|
|
798
|
+
o["aria-labelledby"]=m&&m["aria-label"]?void 0:w.labelId,
|
|
799
|
+
o.autoComplete="off",o.id=w.inputId,
|
|
800
|
+
o.role="combobox",o.value=y.inputValue,o),b,m)
|
|
801
|
+
}),[f,w,i,C,S,N,k]),H=a((function(){f({type:dn})}),[f]),K=a((function(){f({
|
|
802
|
+
type:fn})}),[f]),$=a((function(){f({type:pn})}),[f]),A=a((function(e){f({
|
|
803
|
+
type:hn,highlightedIndex:e})}),[f]),j=a((function(e){f({type:mn,selectedItem:e})
|
|
804
|
+
}),[f]);return{getItemProps:T,getLabelProps:V,getMenuProps:P,getInputProps:R,
|
|
805
|
+
getToggleButtonProps:M,toggleMenu:H,openMenu:$,closeMenu:K,
|
|
806
|
+
setHighlightedIndex:A,setInputValue:a((function(e){f({type:gn,inputValue:e})
|
|
807
|
+
}),[f]),selectItem:j,reset:a((function(){f({type:vn})}),[f]),highlightedIndex:m,
|
|
808
|
+
isOpen:h,selectedItem:g,inputValue:v}}kn.stateChangeTypes=bn;var Cn={
|
|
809
|
+
activeIndex:-1,selectedItems:[]};function Vn(e,t){return At(e,t,Cn)}
|
|
810
|
+
function Pn(e,t){return $t(e,t,Cn)}function Tn(e){return{
|
|
811
|
+
activeIndex:Vn(e,"activeIndex"),selectedItems:Vn(e,"selectedItems")}}
|
|
812
|
+
function Mn(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1
|
|
813
|
+
;var t=e.target
|
|
814
|
+
;return!(t instanceof HTMLInputElement&&""!==t.value)||0===t.selectionStart&&0===t.selectionEnd
|
|
815
|
+
}function Rn(e,t){
|
|
816
|
+
return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var Hn={
|
|
817
|
+
stateReducer:Ut.stateReducer,itemToKey:Ut.itemToKey,environment:Ut.environment,
|
|
818
|
+
selectedItems:xe.array,initialSelectedItems:xe.array,
|
|
819
|
+
defaultSelectedItems:xe.array,getA11yStatusMessage:xe.func,
|
|
820
|
+
activeIndex:xe.number,initialActiveIndex:xe.number,defaultActiveIndex:xe.number,
|
|
821
|
+
onActiveIndexChange:xe.func,onSelectedItemsChange:xe.func,
|
|
822
|
+
keyNavigationNext:xe.string,keyNavigationPrevious:xe.string},Kn={
|
|
823
|
+
itemToKey:Kt.itemToKey,stateReducer:Kt.stateReducer,environment:Kt.environment,
|
|
824
|
+
keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},$n=Me
|
|
825
|
+
;"production"!==process.env.NODE_ENV&&($n=function(e,t){
|
|
826
|
+
xe.checkPropTypes(Hn,e,"prop",t.name)})
|
|
827
|
+
;var An="production"!==process.env.NODE_ENV?"__selected_item_click__":0,jn="production"!==process.env.NODE_ENV?"__selected_item_keydown_delete__":1,Ln="production"!==process.env.NODE_ENV?"__selected_item_keydown_backspace__":2,Fn="production"!==process.env.NODE_ENV?"__selected_item_keydown_navigation_next__":3,Bn="production"!==process.env.NODE_ENV?"__selected_item_keydown_navigation_previous__":4,zn="production"!==process.env.NODE_ENV?"__dropdown_keydown_navigation_previous__":5,Wn="production"!==process.env.NODE_ENV?"__dropdown_keydown_backspace__":6,qn="production"!==process.env.NODE_ENV?"__dropdown_click__":7,Un="production"!==process.env.NODE_ENV?"__function_add_selected_item__":8,Yn="production"!==process.env.NODE_ENV?"__function_remove_selected_item__":9,Xn="production"!==process.env.NODE_ENV?"__function_set_selected_items__":10,Jn="production"!==process.env.NODE_ENV?"__function_set_active_index__":11,Zn="production"!==process.env.NODE_ENV?"__function_reset__":12,Gn=Object.freeze({
|
|
828
|
+
__proto__:null,SelectedItemClick:An,SelectedItemKeyDownDelete:jn,
|
|
829
|
+
SelectedItemKeyDownBackspace:Ln,SelectedItemKeyDownNavigationNext:Fn,
|
|
830
|
+
SelectedItemKeyDownNavigationPrevious:Bn,DropdownKeyDownNavigationPrevious:zn,
|
|
831
|
+
DropdownKeyDownBackspace:Wn,DropdownClick:qn,FunctionAddSelectedItem:Un,
|
|
832
|
+
FunctionRemoveSelectedItem:Yn,FunctionSetSelectedItems:Xn,
|
|
833
|
+
FunctionSetActiveIndex:Jn,FunctionReset:Zn});function Qn(t,n){
|
|
834
|
+
var o,r=n.type,i=n.index,s=n.props,a=n.selectedItem,c=t.activeIndex,u=t.selectedItems
|
|
835
|
+
;switch(r){case An:o={activeIndex:i};break;case Bn:o={activeIndex:c-1<0?0:c-1}
|
|
836
|
+
;break;case Fn:o={activeIndex:c+1>=u.length?-1:c+1};break;case Ln:case jn:
|
|
837
|
+
if(c<0)break;var l=c;1===u.length?l=-1:c===u.length-1&&(l=u.length-2),o=e({
|
|
838
|
+
selectedItems:[].concat(u.slice(0,c),u.slice(c+1))},{activeIndex:l});break
|
|
839
|
+
;case zn:o={activeIndex:u.length-1};break;case Wn:o={
|
|
840
|
+
selectedItems:u.slice(0,u.length-1)};break;case Un:o={
|
|
841
|
+
selectedItems:[].concat(u,[a])};break;case qn:o={activeIndex:-1};break;case Yn:
|
|
842
|
+
var d=c,p=u.findIndex((function(e){return s.itemToKey(e)===s.itemToKey(a)}))
|
|
843
|
+
;if(p<0)break;1===u.length?d=-1:p===u.length-1&&(d=u.length-2),o={
|
|
844
|
+
selectedItems:[].concat(u.slice(0,p),u.slice(p+1)),activeIndex:d};break;case Xn:
|
|
845
|
+
o={selectedItems:n.selectedItems};break;case Jn:o={activeIndex:n.activeIndex}
|
|
846
|
+
;break;case Zn:o={activeIndex:Pn(s,"activeIndex"),
|
|
847
|
+
selectedItems:Pn(s,"selectedItems")};break;default:
|
|
848
|
+
throw new Error("Reducer called without proper action type.")}return e({},t,o)}
|
|
849
|
+
var eo=["refKey","ref","onClick","onKeyDown","selectedItem","index"],to=["refKey","ref","onKeyDown","onClick","preventKeyAction"]
|
|
850
|
+
;function no(t){void 0===t&&(t={}),$n(t,no)
|
|
851
|
+
;var n=e({},Kn,t),o=n.getA11yStatusMessage,r=n.environment,i=n.keyNavigationNext,l=n.keyNavigationPrevious,d=function(e,t,n,o){
|
|
852
|
+
var r=Ht(e,t,n,o),i=r[0],s=r[1];return[Ue(i,t),s]
|
|
853
|
+
}(Qn,n,Tn,Rn),p=d[0],f=d[1],h=p.activeIndex,m=p.selectedItems,g=qt(),v=s(null),y=s()
|
|
854
|
+
;y.current=[];var b=Rt({state:p,props:n});Ft(o,p,[h,m],r),c((function(){
|
|
855
|
+
g||(-1===h&&v.current?v.current.focus():y.current[h]&&y.current[h].focus())
|
|
856
|
+
}),[h]),Bt({props:n,state:p});var I=Lt("getDropdownProps"),x=u((function(){var e
|
|
857
|
+
;return(e={})[l]=function(){f({type:Bn})},e[i]=function(){f({type:Fn})
|
|
858
|
+
},e.Delete=function(){f({type:jn})},e.Backspace=function(){f({type:Ln})},e
|
|
859
|
+
}),[f,i,l]),_=u((function(){var e;return(e={})[l]=function(e){Mn(e)&&f({type:zn
|
|
860
|
+
})},e.Backspace=function(e){Mn(e)&&f({type:Wn})},e}),[f,l]);return{
|
|
861
|
+
getSelectedItemProps:a((function(t){
|
|
862
|
+
var n,o=void 0===t?{}:t,r=o.refKey,i=void 0===r?"ref":r,s=o.ref,a=o.onClick,c=o.onKeyDown,u=o.selectedItem,l=o.index,d=U(o,eo),p=b.current.state,h=Tt(u,l,p.selectedItems,"Pass either item or index to getSelectedItemProps!")[1],m=h>-1&&h===p.activeIndex
|
|
863
|
+
;return e(((n={})[i]=Ae(s,(function(e){e&&y.current.push(e)
|
|
864
|
+
})),n.tabIndex=m?0:-1,n.onClick=$e(a,(function(){f({type:An,index:h})
|
|
865
|
+
})),n.onKeyDown=$e(c,(function(e){var t=Xe(e);t&&x[t]&&x[t](e)})),n),d)
|
|
866
|
+
}),[f,b,x]),getDropdownProps:a((function(t,n){
|
|
867
|
+
var o,r=void 0===t?{}:t,i=r.refKey,s=void 0===i?"ref":i,a=r.ref,c=r.onKeyDown,u=r.onClick,l=r.preventKeyAction,d=void 0!==l&&l,p=U(r,to),h=(void 0===n?{}:n).suppressRefError
|
|
868
|
+
;I("getDropdownProps",void 0!==h&&h,s,v);return e(((o={})[s]=Ae(a,(function(e){
|
|
869
|
+
e&&(v.current=e)})),o),!d&&{onKeyDown:$e(c,(function(e){var t=Xe(e)
|
|
870
|
+
;t&&_[t]&&_[t](e)})),onClick:$e(u,(function(){f({type:qn})}))},p)}),[f,_,I]),
|
|
871
|
+
addSelectedItem:a((function(e){f({type:Un,selectedItem:e})}),[f]),
|
|
872
|
+
removeSelectedItem:a((function(e){f({type:Yn,selectedItem:e})}),[f]),
|
|
873
|
+
setSelectedItems:a((function(e){f({type:Xn,selectedItems:e})}),[f]),
|
|
874
|
+
setActiveIndex:a((function(e){f({type:Jn,activeIndex:e})}),[f]),
|
|
875
|
+
reset:a((function(){f({type:Zn})}),[f]),selectedItems:m,activeIndex:h}}
|
|
876
|
+
function oo(e,[t,n]){return Math.min(n,Math.max(t,e))}no.stateChangeTypes=Gn
|
|
877
|
+
;const ro=[" ","Enter","ArrowUp","ArrowDown"],io=[" ","Enter"],so="Select",[ao,co,uo]=E(so),[lo,po]=S(so,[uo,H]),fo=H(),[ho,mo]=lo(so),[go,vo]=lo(so),yo=h(((o,r)=>{
|
|
878
|
+
const{__scopeSelect:i,disabled:s=!1,...a}=o,c=fo(i),u=mo("SelectTrigger",i),l=u.disabled||s,d=t(r,u.onTriggerChange),p=co(i),[f,h,m]=Zo((e=>{
|
|
879
|
+
const t=p().filter((e=>!e.disabled)),n=t.find((e=>e.value===u.value)),o=Go(t,e,n)
|
|
880
|
+
;void 0!==o&&u.onValueChange(o.value)})),v=()=>{l||(u.onOpenChange(!0),m())}
|
|
881
|
+
;return g($,e({asChild:!0},c),g(n.button,e({type:"button",role:"combobox",
|
|
882
|
+
"aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,
|
|
883
|
+
"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",
|
|
884
|
+
disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Xo(u.value)?"":void 0
|
|
885
|
+
},a,{ref:d,onClick:_(a.onClick,(e=>{e.currentTarget.focus()})),
|
|
886
|
+
onPointerDown:_(a.onPointerDown,(e=>{const t=e.target
|
|
887
|
+
;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),
|
|
888
|
+
0===e.button&&!1===e.ctrlKey&&(v(),u.triggerPointerDownPosRef.current={
|
|
889
|
+
x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),
|
|
890
|
+
onKeyDown:_(a.onKeyDown,(e=>{const t=""!==f.current
|
|
891
|
+
;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),
|
|
892
|
+
t&&" "===e.key||ro.includes(e.key)&&(v(),e.preventDefault())}))})))
|
|
893
|
+
})),bo=h(((o,r)=>{
|
|
894
|
+
const{__scopeSelect:i,className:s,style:a,children:c,placeholder:u="",...l}=o,d=mo("SelectValue",i),{onValueNodeHasChildrenChange:p}=d,f=void 0!==c,h=t(r,d.onValueNodeChange)
|
|
895
|
+
;return O((()=>{p(f)}),[p,f]),g(n.span,e({},l,{ref:h,style:{pointerEvents:"none"
|
|
896
|
+
}}),Xo(d.value)?g(v,null,u):c)})),Io=h(((t,o)=>{
|
|
897
|
+
const{__scopeSelect:r,children:i,...s}=t;return g(n.span,e({"aria-hidden":!0
|
|
898
|
+
},s,{ref:o}),i||"▼")})),xo="SelectContent",_o=h(((t,n)=>{
|
|
899
|
+
const o=mo(xo,t.__scopeSelect),[r,i]=m();if(O((()=>{i(new DocumentFragment)
|
|
900
|
+
}),[]),!o.open){const e=r;return e?x(g(Eo,{scope:t.__scopeSelect},g(ao.Slot,{
|
|
901
|
+
scope:t.__scopeSelect},g("div",null,t.children))),e):null}return g(Oo,e({},t,{
|
|
902
|
+
ref:n}))})),wo=10,[Eo,So]=lo(xo),Oo=h(((n,r)=>{
|
|
903
|
+
const{__scopeSelect:i,position:u="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:d,onPointerDownOutside:p,side:f,sideOffset:h,align:v,alignOffset:y,arrowPadding:b,collisionBoundary:I,collisionPadding:x,sticky:w,hideWhenDetached:E,avoidCollisions:S,...O}=n,D=mo(xo,i),[N,k]=m(null),[R,H]=m(null),K=t(r,(e=>k(e))),[$,A]=m(null),[j,L]=m(null),F=co(i),[B,z]=m(!1),W=s(!1)
|
|
904
|
+
;c((()=>{if(N)return V(N)}),[N]),P();const q=a((e=>{
|
|
905
|
+
const[t,...n]=F().map((e=>e.ref.current)),[o]=n.slice(-1),r=document.activeElement
|
|
906
|
+
;for(const n of e){if(n===r)return;if(null==n||n.scrollIntoView({block:"nearest"
|
|
907
|
+
}),
|
|
908
|
+
n===t&&R&&(R.scrollTop=0),n===o&&R&&(R.scrollTop=R.scrollHeight),null==n||n.focus(),
|
|
909
|
+
document.activeElement!==r)return}}),[F,R]),U=a((()=>q([$,N])),[q,$,N]);c((()=>{
|
|
910
|
+
B&&U()}),[B,U]);const{onOpenChange:Y,triggerPointerDownPosRef:X}=D;c((()=>{
|
|
911
|
+
if(N){let e={x:0,y:0};const t=t=>{var n,o,r,i;e={
|
|
912
|
+
x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(o=X.current)||void 0===o?void 0:o.x)&&void 0!==n?n:0)),
|
|
913
|
+
y:Math.abs(Math.round(t.pageY)-(null!==(r=null===(i=X.current)||void 0===i?void 0:i.y)&&void 0!==r?r:0))
|
|
914
|
+
}},n=n=>{
|
|
915
|
+
e.x<=10&&e.y<=10?n.preventDefault():N.contains(n.target)||Y(!1),document.removeEventListener("pointermove",t),
|
|
916
|
+
X.current=null}
|
|
917
|
+
;return null!==X.current&&(document.addEventListener("pointermove",t),
|
|
918
|
+
document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{
|
|
919
|
+
document.removeEventListener("pointermove",t),
|
|
920
|
+
document.removeEventListener("pointerup",n,{capture:!0})}}}),[N,Y,X]),c((()=>{
|
|
921
|
+
const e=()=>Y(!1)
|
|
922
|
+
;return window.addEventListener("blur",e),window.addEventListener("resize",e),
|
|
923
|
+
()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)
|
|
924
|
+
}}),[Y]);const[J,Z]=Zo((e=>{
|
|
925
|
+
const t=F().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),o=Go(t,e,n)
|
|
926
|
+
;o&&setTimeout((()=>o.ref.current.focus()))})),G=a(((e,t,n)=>{
|
|
927
|
+
const o=!W.current&&!n
|
|
928
|
+
;(void 0!==D.value&&D.value===t||o)&&(A(e),o&&(W.current=!0))
|
|
929
|
+
}),[D.value]),Q=a((()=>null==N?void 0:N.focus()),[N]),ee=a(((e,t,n)=>{
|
|
930
|
+
const o=!W.current&&!n;(void 0!==D.value&&D.value===t||o)&&L(e)
|
|
931
|
+
}),[D.value]),te="popper"===u?No:Do,ne=te===No?{side:f,sideOffset:h,align:v,
|
|
932
|
+
alignOffset:y,arrowPadding:b,collisionBoundary:I,collisionPadding:x,sticky:w,
|
|
933
|
+
hideWhenDetached:E,avoidCollisions:S}:{};return g(Eo,{scope:i,content:N,
|
|
934
|
+
viewport:R,onViewportChange:H,itemRefCallback:G,selectedItem:$,onItemLeave:Q,
|
|
935
|
+
itemTextRefCallback:ee,focusSelectedItem:U,selectedItemText:j,position:u,
|
|
936
|
+
isPositioned:B,searchRef:J},g(T,{as:o,allowPinchZoom:!0},g(M,{asChild:!0,
|
|
937
|
+
trapped:D.open,onMountAutoFocus:e=>{e.preventDefault()},
|
|
938
|
+
onUnmountAutoFocus:_(l,(e=>{var t;null===(t=D.trigger)||void 0===t||t.focus({
|
|
939
|
+
preventScroll:!0}),e.preventDefault()}))},g(C,{asChild:!0,
|
|
940
|
+
disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,
|
|
941
|
+
onFocusOutside:e=>e.preventDefault(),onDismiss:()=>D.onOpenChange(!1)},g(te,e({
|
|
942
|
+
role:"listbox",id:D.contentId,"data-state":D.open?"open":"closed",dir:D.dir,
|
|
943
|
+
onContextMenu:e=>e.preventDefault()},O,ne,{onPlaced:()=>z(!0),ref:K,style:{
|
|
944
|
+
display:"flex",flexDirection:"column",outline:"none",...O.style},
|
|
945
|
+
onKeyDown:_(O.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey
|
|
946
|
+
;if("Tab"===e.key&&e.preventDefault(),
|
|
947
|
+
t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){
|
|
948
|
+
let t=F().filter((e=>!e.disabled)).map((e=>e.ref.current))
|
|
949
|
+
;if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),
|
|
950
|
+
["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,o=t.indexOf(n)
|
|
951
|
+
;t=t.slice(o+1)}setTimeout((()=>q(t))),e.preventDefault()}}))}))))))
|
|
952
|
+
})),Do=h(((o,r)=>{
|
|
953
|
+
const{__scopeSelect:i,onPlaced:c,...u}=o,l=mo(xo,i),d=So(xo,i),[p,f]=m(null),[h,v]=m(null),y=t(r,(e=>v(e))),b=co(i),I=s(!1),x=s(!0),{viewport:_,selectedItem:w,selectedItemText:E,focusSelectedItem:S}=d,D=a((()=>{
|
|
954
|
+
if(l.trigger&&l.valueNode&&p&&h&&_&&w&&E){
|
|
955
|
+
const e=l.trigger.getBoundingClientRect(),t=h.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),o=E.getBoundingClientRect()
|
|
956
|
+
;if("rtl"!==l.dir){
|
|
957
|
+
const r=o.left-t.left,i=n.left-r,s=e.left-i,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-wo,l=oo(i,[wo,u-c])
|
|
958
|
+
;p.style.minWidth=a+"px",p.style.left=l+"px"}else{
|
|
959
|
+
const r=t.right-o.right,i=window.innerWidth-n.right-r,s=window.innerWidth-e.right-i,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-wo,l=oo(i,[wo,u-c])
|
|
960
|
+
;p.style.minWidth=a+"px",p.style.right=l+"px"}
|
|
961
|
+
const r=b(),i=window.innerHeight-2*wo,s=_.scrollHeight,a=window.getComputedStyle(h),u=parseInt(a.borderTopWidth,10),d=parseInt(a.paddingTop,10),f=parseInt(a.borderBottomWidth,10),m=u+d+s+parseInt(a.paddingBottom,10)+f,g=Math.min(5*w.offsetHeight,m),v=window.getComputedStyle(_),y=parseInt(v.paddingTop,10),x=parseInt(v.paddingBottom,10),S=e.top+e.height/2-wo,O=i-S,D=w.offsetHeight/2,N=u+d+(w.offsetTop+D),k=m-N
|
|
962
|
+
;if(N<=S){const e=w===r[r.length-1].ref.current;p.style.bottom="0px"
|
|
963
|
+
;const t=h.clientHeight-_.offsetTop-_.offsetHeight,n=N+Math.max(O,D+(e?x:0)+t+f)
|
|
964
|
+
;p.style.height=n+"px"}else{const e=w===r[0].ref.current;p.style.top="0px"
|
|
965
|
+
;const t=Math.max(S,u+_.offsetTop+(e?y:0)+D)+k
|
|
966
|
+
;p.style.height=t+"px",_.scrollTop=N-S+_.offsetTop}
|
|
967
|
+
p.style.margin=`${wo}px 0`,p.style.minHeight=g+"px",
|
|
968
|
+
p.style.maxHeight=i+"px",null==c||c(),requestAnimationFrame((()=>I.current=!0))}
|
|
969
|
+
}),[b,l.trigger,l.valueNode,p,h,_,w,E,l.dir,c]);O((()=>D()),[D]);const[N,k]=m()
|
|
970
|
+
;O((()=>{h&&k(window.getComputedStyle(h).zIndex)}),[h]);const C=a((e=>{
|
|
971
|
+
e&&!0===x.current&&(D(),null==S||S(),x.current=!1)}),[D,S]);return g(ko,{
|
|
972
|
+
scope:i,contentWrapper:p,shouldExpandOnScrollRef:I,onScrollButtonChange:C
|
|
973
|
+
},g("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",
|
|
974
|
+
zIndex:N}},g(n.div,e({},u,{ref:y,style:{boxSizing:"border-box",maxHeight:"100%",
|
|
975
|
+
...u.style}}))))})),No=h(((t,n)=>{
|
|
976
|
+
const{__scopeSelect:o,align:r="start",collisionPadding:i=wo,...s}=t,a=fo(o)
|
|
977
|
+
;return g(A,e({},a,s,{ref:n,align:r,collisionPadding:i,style:{
|
|
978
|
+
boxSizing:"border-box",...s.style,
|
|
979
|
+
"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)",
|
|
980
|
+
"--radix-select-content-available-width":"var(--radix-popper-available-width)",
|
|
981
|
+
"--radix-select-content-available-height":"var(--radix-popper-available-height)",
|
|
982
|
+
"--radix-select-trigger-width":"var(--radix-popper-anchor-width)",
|
|
983
|
+
"--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))
|
|
984
|
+
})),[ko,Co]=lo(xo,{}),Vo="SelectViewport",Po=h(((o,r)=>{
|
|
985
|
+
const{__scopeSelect:i,...a}=o,c=So(Vo,i),u=Co(Vo,i),l=t(r,c.onViewportChange),d=s(0)
|
|
986
|
+
;return g(v,null,g("style",{dangerouslySetInnerHTML:{
|
|
987
|
+
__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
988
|
+
}}),g(ao.Slot,{scope:i},g(n.div,e({"data-radix-select-viewport":"",
|
|
989
|
+
role:"presentation"},a,{ref:l,style:{position:"relative",flex:1,overflow:"auto",
|
|
990
|
+
...a.style},onScroll:_(a.onScroll,(e=>{
|
|
991
|
+
const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=u
|
|
992
|
+
;if(null!=o&&o.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){
|
|
993
|
+
const o=window.innerHeight-2*wo,r=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),s=Math.max(r,i)
|
|
994
|
+
;if(s<o){const r=s+e,i=Math.min(o,r),a=r-i
|
|
995
|
+
;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,
|
|
996
|
+
n.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))}))))
|
|
997
|
+
})),[To,Mo]=lo("SelectGroup"),Ro=h(((t,o)=>{const{__scopeSelect:r,...i}=t,s=R()
|
|
998
|
+
;return g(To,{scope:r,id:s},g(n.div,e({role:"group","aria-labelledby":s},i,{
|
|
999
|
+
ref:o})))})),Ho=h(((t,o)=>{const{__scopeSelect:r,...i}=t,s=Mo("SelectLabel",r)
|
|
1000
|
+
;return g(n.div,e({id:s.id},i,{ref:o}))
|
|
1001
|
+
})),Ko="SelectItem",[$o,Ao]=lo(Ko),jo=h(((o,r)=>{
|
|
1002
|
+
const{__scopeSelect:i,value:s,disabled:c=!1,textValue:u,...l}=o,d=mo(Ko,i),p=So(Ko,i),f=d.value===s,[h,v]=m(null!=u?u:""),[y,b]=m(!1),I=t(r,(e=>{
|
|
1003
|
+
var t;return null===(t=p.itemRefCallback)||void 0===t?void 0:t.call(p,e,s,c)
|
|
1004
|
+
})),x=R(),w=()=>{c||(d.onValueChange(s),d.onOpenChange(!1))}
|
|
1005
|
+
;if(""===s)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.")
|
|
1006
|
+
;return g($o,{scope:i,value:s,disabled:c,textId:x,isSelected:f,
|
|
1007
|
+
onItemTextChange:a((e=>{v((t=>{var n
|
|
1008
|
+
;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))
|
|
1009
|
+
}),[])},g(ao.ItemSlot,{scope:i,value:s,disabled:c,textValue:h},g(n.div,e({
|
|
1010
|
+
role:"option","aria-labelledby":x,"data-highlighted":y?"":void 0,
|
|
1011
|
+
"aria-selected":f&&y,"data-state":f?"checked":"unchecked",
|
|
1012
|
+
"aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1},l,{
|
|
1013
|
+
ref:I,onFocus:_(l.onFocus,(()=>b(!0))),onBlur:_(l.onBlur,(()=>b(!1))),
|
|
1014
|
+
onPointerUp:_(l.onPointerUp,w),onPointerMove:_(l.onPointerMove,(e=>{var t
|
|
1015
|
+
;c?null===(t=p.onItemLeave)||void 0===t||t.call(p):e.currentTarget.focus({
|
|
1016
|
+
preventScroll:!0})})),onPointerLeave:_(l.onPointerLeave,(e=>{var t
|
|
1017
|
+
;e.currentTarget===document.activeElement&&(null===(t=p.onItemLeave)||void 0===t||t.call(p))
|
|
1018
|
+
})),onKeyDown:_(l.onKeyDown,(e=>{var t
|
|
1019
|
+
;""!==(null===(t=p.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(io.includes(e.key)&&w(),
|
|
1020
|
+
" "===e.key&&e.preventDefault())}))}))))})),Lo="SelectItemText",Fo=h(((o,r)=>{
|
|
1021
|
+
const{__scopeSelect:i,className:s,style:a,...c}=o,l=mo(Lo,i),d=So(Lo,i),p=Ao(Lo,i),f=vo(Lo,i),[h,y]=m(null),b=t(r,(e=>y(e)),p.onItemTextChange,(e=>{
|
|
1022
|
+
var t
|
|
1023
|
+
;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,p.value,p.disabled)
|
|
1024
|
+
})),I=null==h?void 0:h.textContent,_=u((()=>g("option",{key:p.value,
|
|
1025
|
+
value:p.value,disabled:p.disabled
|
|
1026
|
+
},I)),[p.disabled,p.value,I]),{onNativeOptionAdd:w,onNativeOptionRemove:E}=f
|
|
1027
|
+
;return O((()=>(w(_),()=>E(_))),[w,E,_]),g(v,null,g(n.span,e({id:p.textId},c,{
|
|
1028
|
+
ref:b
|
|
1029
|
+
})),p.isSelected&&l.valueNode&&!l.valueNodeHasChildren?x(c.children,l.valueNode):null)
|
|
1030
|
+
})),Bo=h(((t,o)=>{const{__scopeSelect:r,...i}=t
|
|
1031
|
+
;return Ao("SelectItemIndicator",r).isSelected?g(n.span,e({"aria-hidden":!0},i,{
|
|
1032
|
+
ref:o})):null})),zo="SelectScrollUpButton",Wo=h(((n,o)=>{
|
|
1033
|
+
const r=So(zo,n.__scopeSelect),i=Co(zo,n.__scopeSelect),[s,a]=m(!1),c=t(o,i.onScrollButtonChange)
|
|
1034
|
+
;return O((()=>{if(r.viewport&&r.isPositioned){const e=r.viewport;function t(){
|
|
1035
|
+
const t=e.scrollTop>0;a(t)}
|
|
1036
|
+
return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}
|
|
1037
|
+
}),[r.viewport,r.isPositioned]),s?g(Yo,e({},n,{ref:c,onAutoScroll:()=>{
|
|
1038
|
+
const{viewport:e,selectedItem:t}=r
|
|
1039
|
+
;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null
|
|
1040
|
+
})),qo="SelectScrollDownButton",Uo=h(((n,o)=>{
|
|
1041
|
+
const r=So(qo,n.__scopeSelect),i=Co(qo,n.__scopeSelect),[s,a]=m(!1),c=t(o,i.onScrollButtonChange)
|
|
1042
|
+
;return O((()=>{if(r.viewport&&r.isPositioned){const e=r.viewport;function t(){
|
|
1043
|
+
const t=e.scrollHeight-e.clientHeight,n=Math.ceil(e.scrollTop)<t;a(n)}
|
|
1044
|
+
return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}
|
|
1045
|
+
}),[r.viewport,r.isPositioned]),s?g(Yo,e({},n,{ref:c,onAutoScroll:()=>{
|
|
1046
|
+
const{viewport:e,selectedItem:t}=r
|
|
1047
|
+
;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),Yo=h(((t,o)=>{
|
|
1048
|
+
const{__scopeSelect:r,onAutoScroll:i,...u}=t,l=So("SelectScrollButton",r),d=s(null),p=co(r),f=a((()=>{
|
|
1049
|
+
null!==d.current&&(window.clearInterval(d.current),d.current=null)}),[])
|
|
1050
|
+
;return c((()=>()=>f()),[f]),O((()=>{var e
|
|
1051
|
+
;const t=p().find((e=>e.ref.current===document.activeElement))
|
|
1052
|
+
;null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({
|
|
1053
|
+
block:"nearest"})}),[p]),g(n.div,e({"aria-hidden":!0},u,{ref:o,style:{
|
|
1054
|
+
flexShrink:0,...u.style},onPointerDown:_(u.onPointerDown,(()=>{
|
|
1055
|
+
null===d.current&&(d.current=window.setInterval(i,50))})),
|
|
1056
|
+
onPointerMove:_(u.onPointerMove,(()=>{var e
|
|
1057
|
+
;null===(e=l.onItemLeave)||void 0===e||e.call(l),
|
|
1058
|
+
null===d.current&&(d.current=window.setInterval(i,50))})),
|
|
1059
|
+
onPointerLeave:_(u.onPointerLeave,(()=>{f()}))}))}));function Xo(e){
|
|
1060
|
+
return""===e||void 0===e}const Jo=h(((n,o)=>{
|
|
1061
|
+
const{value:r,...i}=n,a=s(null),u=t(o,a),l=j(r);return c((()=>{
|
|
1062
|
+
const e=a.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set
|
|
1063
|
+
;if(l!==r&&n){const t=new Event("change",{bubbles:!0})
|
|
1064
|
+
;n.call(e,r),e.dispatchEvent(t)}}),[l,r]),g(L,{asChild:!0},g("select",e({},i,{
|
|
1065
|
+
ref:u,defaultValue:r})))}));function Zo(e){const t=D(e),n=s(""),o=s(0),r=a((e=>{
|
|
1066
|
+
const r=n.current+e;t(r),function e(t){
|
|
1067
|
+
n.current=t,window.clearTimeout(o.current),
|
|
1068
|
+
""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(r)}),[t]),i=a((()=>{
|
|
1069
|
+
n.current="",window.clearTimeout(o.current)}),[])
|
|
1070
|
+
;return c((()=>()=>window.clearTimeout(o.current)),[]),[n,r,i]}
|
|
1071
|
+
function Go(e,t,n){
|
|
1072
|
+
const o=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,r=n?e.indexOf(n):-1
|
|
1073
|
+
;let i=(s=e,a=Math.max(r,0),s.map(((e,t)=>s[(a+t)%s.length])));var s,a
|
|
1074
|
+
;1===o.length&&(i=i.filter((e=>e!==n)))
|
|
1075
|
+
;const c=i.find((e=>e.textValue.toLowerCase().startsWith(o.toLowerCase())))
|
|
1076
|
+
;return c!==n?c:void 0}Jo.displayName="BubbleSelect";const Qo=e=>{
|
|
1077
|
+
const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:i,value:c,defaultValue:u,onValueChange:l,dir:d,name:p,autoComplete:f,disabled:h,required:v}=e,y=fo(t),[b,I]=m(null),[x,_]=m(null),[E,S]=m(!1),O=N(d),[D=!1,k]=w({
|
|
1078
|
+
prop:o,defaultProp:r,onChange:i}),[C,V]=w({prop:c,defaultProp:u,onChange:l
|
|
1079
|
+
}),P=s(null),T=!b||Boolean(b.closest("form")),[M,H]=m(new Set),$=Array.from(M).map((e=>e.props.value)).join(";")
|
|
1080
|
+
;return g(K,y,g(ho,{required:v,scope:t,trigger:b,onTriggerChange:I,valueNode:x,
|
|
1081
|
+
onValueNodeChange:_,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,
|
|
1082
|
+
contentId:R(),value:C,onValueChange:V,open:D,onOpenChange:k,dir:O,
|
|
1083
|
+
triggerPointerDownPosRef:P,disabled:h},g(ao.Provider,{scope:t},g(go,{
|
|
1084
|
+
scope:e.__scopeSelect,onNativeOptionAdd:a((e=>{H((t=>new Set(t).add(e)))}),[]),
|
|
1085
|
+
onNativeOptionRemove:a((e=>{H((t=>{const n=new Set(t);return n.delete(e),n}))
|
|
1086
|
+
}),[])},n)),T?g(Jo,{key:$,"aria-hidden":!0,required:v,tabIndex:-1,name:p,
|
|
1087
|
+
autoComplete:f,value:C,onChange:e=>V(e.target.value),disabled:h
|
|
1088
|
+
},void 0===C?g("option",{value:""}):null,Array.from(M)):null))
|
|
1089
|
+
},er=yo,tr=bo,nr=Io,or=t=>g(k,e({asChild:!0
|
|
1090
|
+
},t)),rr=_o,ir=Po,sr=Ro,ar=Ho,cr=jo,ur=Fo,lr=Bo,dr=Wo,pr=Uo
|
|
1091
|
+
;var fr=b(q)(Mr||(Mr=I(["\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n"],["\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n"])),(function(e){
|
|
1092
|
+
return e.$isOpen?"0deg":"-180deg"
|
|
1093
|
+
})),hr=b.div(Rr||(Rr=I(["\n position: relative;\n width: ",";\n direction: "," !important;\n div.input-container {\n padding-right: 8px;\n }\n label.input-label {\n margin: 0 2px 4px 2px;\n }\n span.input-helper {\n margin: 2px 2px 0 2px;\n display: block;\n }\n"],["\n position: relative;\n width: ",";\n direction: "," !important;\n div.input-container {\n padding-right: 8px;\n }\n label.input-label {\n margin: 0 2px 4px 2px;\n }\n span.input-helper {\n margin: 2px 2px 0 2px;\n display: block;\n }\n"])),(function(e){
|
|
1094
|
+
return e.width||"auto"}),(function(e){return e.theme.direction
|
|
1095
|
+
})),mr=b.div(Hr||(Hr=I(["\n outline: none;\n padding: 6px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n direction: "," !important;\n &:hover {\n border-color: ",";\n }\n &:focus-within,\n &:focus {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n"],["\n outline: none;\n padding: 6px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n direction: "," !important;\n &:hover {\n border-color: ",";\n }\n &:focus-within,\n &:focus {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n"])),(function(e){
|
|
1096
|
+
return e.theme.typography.fontFamily}),(function(e){
|
|
1097
|
+
return e.theme.typography.primary.fontSize}),(function(e){
|
|
1098
|
+
return e.theme.typography.primary.lineHeight}),(function(e){
|
|
1099
|
+
return e.theme.colors.text.primary}),(function(e){
|
|
1100
|
+
var t=e.theme,n=e.disabled,o=e.$isErrored
|
|
1101
|
+
;return n?t.colors.border.disabled:o?t.colors.border.error:t.colors.border.normal
|
|
1102
|
+
}),(function(e){var t=e.theme
|
|
1103
|
+
;return e.disabled?t.colors.fill.disabled:t.colors.fill.surface}),(function(e){
|
|
1104
|
+
return e.theme.direction}),(function(e){
|
|
1105
|
+
var t=e.theme,n=e.disabled,o=e.$isErrored
|
|
1106
|
+
;return n?t.colors.border.disabled:o?t.colors.border.error:t.colors.border.hover
|
|
1107
|
+
}),(function(e){var t=e.theme,n=e.$isErrored
|
|
1108
|
+
;return e.disabled?"transparent":n?t.colors.border.error:t.colors.border.active
|
|
1109
|
+
}),(function(e){var t=e.theme,n=e.$isErrored
|
|
1110
|
+
;return e.disabled?"transparent":n?t.colors.border.error:t.colors.border.active
|
|
1111
|
+
}))
|
|
1112
|
+
;b.span(Kr||(Kr=I(["\n direction: "," !important;\n color: ",";\n margin-right: 8px;\n max-width: 256px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"],["\n direction: "," !important;\n color: ",";\n margin-right: 8px;\n max-width: 256px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"])),(function(e){
|
|
1113
|
+
return e.theme.direction}),(function(e){var t=e.isP,n=e.theme
|
|
1114
|
+
;return t?n.colors.text.placeholder:"inherit"}))
|
|
1115
|
+
;var gr=b.ul($r||($r=I(["\n direction: "," !important;\n position: absolute;\n width: calc(100% - 16px);\n padding: 8px;\n margin: 4px 0 0 0;\n overflow: auto;\n scrollbar-width: thin;\n max-height: 200px;\n display: ",";\n list-style: none;\n z-index: ",";\n border-radius: 6px;\n border: 1px solid ",";\n background: ",";\n box-shadow:\n "," 0px 2px 3px,\n "," 0px 4px 20px;\n max-height: 200px;\n"],["\n direction: "," !important;\n position: absolute;\n width: calc(100% - 16px);\n padding: 8px;\n margin: 4px 0 0 0;\n overflow: auto;\n scrollbar-width: thin;\n max-height: 200px;\n display: ",";\n list-style: none;\n z-index: ",";\n border-radius: 6px;\n border: 1px solid ",";\n background: ",";\n box-shadow:\n "," 0px 2px 3px,\n "," 0px 4px 20px;\n max-height: 200px;\n"])),(function(e){
|
|
1116
|
+
return e.theme.direction}),(function(e){return e.$isOpen?"block":"none"
|
|
1117
|
+
}),(function(e){return e.theme.zIndex.dropdown||z.dropdown}),(function(e){
|
|
1118
|
+
return e.theme.colors.border.light}),(function(e){
|
|
1119
|
+
return e.theme.colors.fill.surface}),(function(e){var t=e.theme
|
|
1120
|
+
;return W(t.colors.shadow,.06)}),(function(e){var t=e.theme
|
|
1121
|
+
;return W(t.colors.shadow,.16)
|
|
1122
|
+
})),vr=b.li(Ar||(Ar=I(["\n direction: "," !important;\n padding: 8px 12px;\n border-radius: 4px;\n display: flex;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n background: ",";\n &:hover {\n background: ",";\n }\n"],["\n direction: "," !important;\n padding: 8px 12px;\n border-radius: 4px;\n display: flex;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n background: ",";\n &:hover {\n background: ",";\n }\n"])),(function(e){
|
|
1123
|
+
return e.theme.direction}),(function(e){return e.theme.typography.fontFamily
|
|
1124
|
+
}),(function(e){return e.theme.typography.primary.fontSize}),(function(e){
|
|
1125
|
+
return e.theme.typography.primary.lineHeight}),(function(e){
|
|
1126
|
+
return e.theme.colors.text.primary}),(function(e){
|
|
1127
|
+
var t=e.theme,n=e.$isHilighted,o=e.$isSelected
|
|
1128
|
+
;return n||o?"dark"===t.mode?t.colors.fill.medium:t.colors.fill.hilight:"inherit"
|
|
1129
|
+
}),(function(e){var t=e.theme,n=e.$isSelected
|
|
1130
|
+
;return e.readOnly?"inherit":n&&"dark"!==t.mode?t.colors.fill.hilight:t.colors.fill.medium
|
|
1131
|
+
})),yr=b.div(jr||(jr=I(["\n cursor: pointer;\n color: ",";\n direction: "," !important;\n"],["\n cursor: pointer;\n color: ",";\n direction: "," !important;\n"])),(function(e){
|
|
1132
|
+
return e.theme.colors.text.link}),(function(e){return e.theme.direction
|
|
1133
|
+
})),br=b.div(Lr||(Lr=I(["\n min-height: 128px;\n display: grid;\n place-content: center;\n direction: "," !important;\n"],["\n min-height: 128px;\n display: grid;\n place-content: center;\n direction: "," !important;\n"])),(function(e){
|
|
1134
|
+
return e.theme.direction
|
|
1135
|
+
})),Ir=b.div(Fr||(Fr=I(["\n display: flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n direction: "," !important;\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n direction: "," !important;\n"])),(function(e){
|
|
1136
|
+
return e.theme.direction
|
|
1137
|
+
})),xr=b.div(Br||(Br=I(["\n direction: "," !important;\n"],["\n direction: "," !important;\n"])),(function(e){
|
|
1138
|
+
return e.theme.direction
|
|
1139
|
+
})),_r=b.div(zr||(zr=I(["\n height: ",";\n"],["\n height: ",";\n"])),(function(e){
|
|
1140
|
+
var t=e.theme;return"calc(1.5 * ".concat(t.typography.primary.fontSize,")")
|
|
1141
|
+
})),wr=b(Qo)(Wr||(Wr=I([""],[""]))),Er=b(sr)(qr||(qr=I([""],[""]))),Sr=b(tr)(Ur||(Ur=I(["\n flex: 1;\n"],["\n flex: 1;\n"]))),Or=b(or)(Yr||(Yr=I([""],[""]))),Dr=b(cr)(Xr||(Xr=I(["\n direction: "," !important;\n padding: 8px 12px;\n border-radius: 4px;\n display: flex;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n position: relative;\n user-select: none;\n outline: none;\n &[data-disabled] {\n background-color: inherit;\n cursor: not-allowed;\n opacity: 0.7;\n }\n &[data-state='checked'] {\n background-color: ",";\n }\n &[data-highlighted] {\n background-color: ",";\n }\n"],["\n direction: "," !important;\n padding: 8px 12px;\n border-radius: 4px;\n display: flex;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n position: relative;\n user-select: none;\n outline: none;\n &[data-disabled] {\n background-color: inherit;\n cursor: not-allowed;\n opacity: 0.7;\n }\n &[data-state='checked'] {\n background-color: ",";\n }\n &[data-highlighted] {\n background-color: ",";\n }\n"])),(function(e){
|
|
1142
|
+
return e.theme.direction}),(function(e){return e.theme.typography.fontFamily
|
|
1143
|
+
}),(function(e){return e.theme.typography.primary.fontSize}),(function(e){
|
|
1144
|
+
return e.theme.typography.primary.lineHeight}),(function(e){
|
|
1145
|
+
return e.theme.colors.text.primary}),(function(e){var t=e.theme
|
|
1146
|
+
;return"dark"===t.mode?t.colors.fill.medium:t.colors.fill.hilight
|
|
1147
|
+
}),(function(e){var t=e.theme
|
|
1148
|
+
;return"dark"===t.mode?t.colors.fill.medium:t.colors.fill.hover
|
|
1149
|
+
})),Nr=b.hr(Jr||(Jr=I(["\n flex: 1;\n height: 0px;\n border-style: solid;\n border-top: unset;\n border-right: unset;\n border-left: unset;\n border-bottom: 1px solid ",";\n margin: 0;\n"],["\n flex: 1;\n height: 0px;\n border-style: solid;\n border-top: unset;\n border-right: unset;\n border-left: unset;\n border-bottom: 1px solid ",";\n margin: 0;\n"])),(function(e){
|
|
1150
|
+
return e.theme.colors.border.light
|
|
1151
|
+
})),kr=b(ar)(Zr||(Zr=I(["\n direction: "," !important;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n padding: 8px 12px;\n display: flex;\n gap: 8px;\n align-items: center;\n"],["\n direction: "," !important;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n padding: 8px 12px;\n display: flex;\n gap: 8px;\n align-items: center;\n"])),(function(e){
|
|
1152
|
+
return e.theme.direction}),(function(e){return e.theme.typography.fontFamily
|
|
1153
|
+
}),(function(e){return e.theme.typography.secondary.fontSize}),(function(e){
|
|
1154
|
+
return e.theme.typography.secondary.lineHeight}),(function(e){
|
|
1155
|
+
return e.theme.colors.text.placeholder
|
|
1156
|
+
})),Cr=b(rr)(Gr||(Gr=I(["\n direction: "," !important;\n padding: 8px;\n overflow: auto;\n list-style: none;\n position: relative;\n z-index: ",";\n border-radius: 6px;\n border: 1px solid ",";\n background: ",";\n box-shadow:\n "," 0px 2px 3px,\n "," 0px 4px 20px;\n width: ",";\n max-height: min(var(--radix-select-content-available-height), 232px);\n animation-duration: ",";\n animation-timing-function: ",";\n &[data-state='open'] {\n animation-name: ",";\n }\n &[data-state='closed'] {\n animation-name: ",";\n }\n"],["\n direction: "," !important;\n padding: 8px;\n overflow: auto;\n list-style: none;\n position: relative;\n z-index: ",";\n border-radius: 6px;\n border: 1px solid ",";\n background: ",";\n box-shadow:\n "," 0px 2px 3px,\n "," 0px 4px 20px;\n width: ",";\n max-height: min(var(--radix-select-content-available-height), 232px);\n animation-duration: ",";\n animation-timing-function: ",";\n &[data-state='open'] {\n animation-name: ",";\n }\n &[data-state='closed'] {\n animation-name: ",";\n }\n"])),(function(e){
|
|
1157
|
+
return e.theme.direction}),(function(e){
|
|
1158
|
+
return e.theme.zIndex.dropdown||z.dropdown}),(function(e){
|
|
1159
|
+
return e.theme.colors.border.light}),(function(e){
|
|
1160
|
+
return e.theme.colors.fill.surface}),(function(e){var t=e.theme
|
|
1161
|
+
;return W(t.colors.shadow,.06)}),(function(e){var t=e.theme
|
|
1162
|
+
;return W(t.colors.shadow,.16)}),(function(e){
|
|
1163
|
+
return e.$matchButtonWidth?"var(--radix-select-trigger-width)":"auto"
|
|
1164
|
+
}),(function(e){return e.theme.transitions.duration.standard}),(function(e){
|
|
1165
|
+
return e.theme.transitions.easing.easeIn
|
|
1166
|
+
}),F,B),Vr=b(ur)(Qr||(Qr=I(["\n direction: "," !important;\n display: flex;\n align-items: center;\n"],["\n direction: "," !important;\n display: flex;\n align-items: center;\n"])),(function(e){
|
|
1167
|
+
return e.theme.direction
|
|
1168
|
+
})),Pr=b(ir)(ei||(ei=I(["\n direction: "," !important;\n scrollbar-width: thin !important;\n"],["\n direction: "," !important;\n scrollbar-width: thin !important;\n"])),(function(e){
|
|
1169
|
+
return e.theme.direction})),Tr=b(lr)(ti||(ti=I([""],[""])))
|
|
1170
|
+
;b(dr)(ni||(ni=I(["\n direction: "," !important;\n display: grid;\n place-content: center;\n margin-bottom: 8px;\n"],["\n direction: "," !important;\n display: grid;\n place-content: center;\n margin-bottom: 8px;\n"])),(function(e){
|
|
1171
|
+
return e.theme.direction
|
|
1172
|
+
})),b(pr)(oi||(oi=I(["\n direction: "," !important;\n display: grid;\n place-content: center;\n margin-top: 8px;\n transform: rotate(-180deg);\n"],["\n direction: "," !important;\n display: grid;\n place-content: center;\n margin-top: 8px;\n transform: rotate(-180deg);\n"])),(function(e){
|
|
1173
|
+
return e.theme.direction}))
|
|
1174
|
+
;var Mr,Rr,Hr,Kr,$r,Ar,jr,Lr,Fr,Br,zr,Wr,qr,Ur,Yr,Xr,Jr,Zr,Gr,Qr,ei,ti,ni,oi,ri,ii,si=b(nr)(ri||(ri=I(["\n direction: "," !important;\n cursor: pointer;\n transform: rotate(-180deg);\n transition: transform 0.2s ease-in-out;\n display: grid;\n place-content: center;\n"],["\n direction: "," !important;\n cursor: pointer;\n transform: rotate(-180deg);\n transition: transform 0.2s ease-in-out;\n display: grid;\n place-content: center;\n"])),(function(e){
|
|
1175
|
+
return e.theme.direction
|
|
1176
|
+
})),ai=b(er)(ii||(ii=I(["\n direction: "," !important;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n width: ",";\n padding: 6px 12px;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: space-between;\n outline: none;\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n span:first-child {\n flex: 1;\n text-align: ",";\n }\n &:hover {\n border-color: ",";\n }\n &:focus,\n &[data-state='open'] {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n &[data-placeholder] {\n color: ",";\n white-space: nowrap;\n }\n &[data-state='open'] {\n .SelectIcon {\n transform: rotate(0deg);\n }\n }\n &[data-disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n"],["\n direction: "," !important;\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n width: ",";\n padding: 6px 12px;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: space-between;\n outline: none;\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n span:first-child {\n flex: 1;\n text-align: ",";\n }\n &:hover {\n border-color: ",";\n }\n &:focus,\n &[data-state='open'] {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n &[data-placeholder] {\n color: ",";\n white-space: nowrap;\n }\n &[data-state='open'] {\n .SelectIcon {\n transform: rotate(0deg);\n }\n }\n &[data-disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n"])),(function(e){
|
|
1177
|
+
return e.theme.direction}),(function(e){return e.theme.typography.fontFamily
|
|
1178
|
+
}),(function(e){return e.theme.typography.primary.fontSize}),(function(e){
|
|
1179
|
+
return e.theme.typography.primary.lineHeight}),(function(e){
|
|
1180
|
+
return e.theme.colors.text.primary}),(function(e){return e.width||"100%"
|
|
1181
|
+
}),(function(e){var t=e.theme
|
|
1182
|
+
;return e.$isErrored?t.colors.border.error:t.colors.border.normal
|
|
1183
|
+
}),(function(e){return e.theme.colors.fill.surface}),(function(e){
|
|
1184
|
+
return"ltr"===e.theme.direction?"left":"right"}),(function(e){
|
|
1185
|
+
var t=e.theme,n=e.disabled,o=e.$isErrored
|
|
1186
|
+
;return n?t.colors.border.normal:o?t.colors.border.error:t.colors.border.hover
|
|
1187
|
+
}),(function(e){var t=e.theme
|
|
1188
|
+
;return e.$isErrored?t.colors.border.error:t.colors.border.active
|
|
1189
|
+
}),(function(e){var t=e.theme
|
|
1190
|
+
;return e.$isErrored?t.colors.border.error:t.colors.border.active
|
|
1191
|
+
}),(function(e){return e.theme.colors.text.placeholder}))
|
|
1192
|
+
;export{cr as $,Ir as A,hr as D,_r as E,gr as I,vr as L,xe as P,Dr as S,yr as T,X as _,Vr as a,Tr as b,xr as c,wr as d,ai as e,Sr as f,si as g,Or as h,Cr as i,br as j,Pr as k,Er as l,kr as m,Nr as n,fr as o,no as p,mr as q,U as r,Y as s,kn as u};
|