@functionalui/functionalui 0.2.1 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/dist/Avatar-BK9MFMsZ.cjs +1 -0
  2. package/dist/Avatar-CQA0mEVW.js +118 -0
  3. package/dist/Button-CpTXDsI7.js +215 -0
  4. package/dist/Button-rg5gSHcQ.cjs +1 -0
  5. package/dist/Checkbox-BHpT6PHl.cjs +1 -0
  6. package/dist/Checkbox-C29jP71p.js +96 -0
  7. package/dist/GlobalEventContext-D9ug9s1O.cjs +1 -0
  8. package/dist/GlobalEventContext-DUmT3Vay.js +49 -0
  9. package/dist/GlobalEventPortal-BIdCGd-m.cjs +1 -0
  10. package/dist/GlobalEventPortal-GjfUDr2B.js +17 -0
  11. package/dist/LabelText-BUslE9cx.cjs +1 -0
  12. package/dist/LabelText-D7QIWtWj.js +35 -0
  13. package/dist/Modal-BRIYhcOg.cjs +3 -0
  14. package/dist/Modal-DXLyt-j4.js +1290 -0
  15. package/dist/SpringEnterOffsetBy-BVN6rm57.cjs +1 -0
  16. package/dist/SpringEnterOffsetBy-DMSIQgV3.js +56 -0
  17. package/dist/TableHeader-BAdYoCbb.cjs +1 -0
  18. package/dist/TableHeader-Da0XxILB.js +103 -0
  19. package/dist/TableRow-BlJSvake.js +90 -0
  20. package/dist/TableRow-Bq58CTbU.cjs +1 -0
  21. package/dist/TagColor-BYKxfOU6.js +957 -0
  22. package/dist/TagColor-QGINp77p.cjs +1 -0
  23. package/dist/UIcon-B5rpDmHC.cjs +1 -0
  24. package/dist/UIcon-BHzbeYWw.js +245 -0
  25. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  26. package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  27. package/dist/admonition/index.cjs +1 -0
  28. package/dist/admonition/index.d.ts +27 -0
  29. package/dist/admonition/index.mjs +88 -0
  30. package/dist/avatar/index.cjs +1 -0
  31. package/dist/avatar/index.d.ts +115 -0
  32. package/dist/avatar/index.mjs +4 -0
  33. package/dist/avatar-group/index.cjs +1 -0
  34. package/dist/avatar-group/index.d.ts +120 -0
  35. package/dist/avatar-group/index.mjs +52 -0
  36. package/dist/button/index.cjs +1 -0
  37. package/dist/button/index.d.ts +249 -0
  38. package/dist/button/index.mjs +4 -0
  39. package/dist/checkbox/index.cjs +1 -0
  40. package/dist/checkbox/index.d.ts +32 -0
  41. package/dist/checkbox/index.mjs +4 -0
  42. package/dist/checkboxes/index.cjs +1 -0
  43. package/dist/checkboxes/index.d.ts +38 -0
  44. package/dist/checkboxes/index.mjs +80 -0
  45. package/dist/chip/index.cjs +1 -0
  46. package/dist/chip/index.d.ts +159 -0
  47. package/dist/chip/index.mjs +132 -0
  48. package/dist/classes-CBD1K4L1.js +779 -0
  49. package/dist/classes-CVxy1f4M.js +137 -0
  50. package/dist/classes-CtwIjJdw.cjs +1 -0
  51. package/dist/classes-HsjFV5aN.cjs +1 -0
  52. package/dist/color-picker/index.cjs +1 -0
  53. package/dist/color-picker/index.d.ts +14 -0
  54. package/dist/color-picker/index.mjs +234 -0
  55. package/dist/component-B1mkowwk.cjs +1 -0
  56. package/dist/component-B6F6g6i4.cjs +1 -0
  57. package/dist/component-BbvCmqLI.cjs +1 -0
  58. package/dist/component-Bh3EPTN0.cjs +1 -0
  59. package/dist/component-BvHdlcdE.js +9 -0
  60. package/dist/component-C1Gs4nVu.js +55 -0
  61. package/dist/component-CBIQe7z5.js +29 -0
  62. package/dist/component-CW2JPBAq.js +59 -0
  63. package/dist/component-D-EEi7NI.cjs +1 -0
  64. package/dist/component-D0wwK4KY.js +9 -0
  65. package/dist/component-D5nxKQnT.js +55 -0
  66. package/dist/component-D92LT0Mq.cjs +1 -0
  67. package/dist/component-DCHO9d6d.js +55 -0
  68. package/dist/component-DRXQXr2G.js +36 -0
  69. package/dist/component-D_igOAz3.cjs +1 -0
  70. package/dist/component-DdQu0mLI.js +31 -0
  71. package/dist/component-FS_2VwVz.cjs +1 -0
  72. package/dist/component-JigdcRMd.cjs +1 -0
  73. package/dist/container/index.cjs +1 -0
  74. package/dist/container/index.d.ts +238 -0
  75. package/dist/container/index.mjs +4 -0
  76. package/dist/contexts/notifications/index.cjs +1 -0
  77. package/dist/contexts/notifications/index.d.ts +2 -0
  78. package/dist/contexts/notifications/index.mjs +6 -0
  79. package/dist/contexts/ui/index.cjs +1 -0
  80. package/dist/contexts/ui/index.d.ts +2 -0
  81. package/dist/contexts/ui/index.mjs +35 -0
  82. package/dist/createTextElement-Cgrvdwvh.js +32 -0
  83. package/dist/createTextElement-DITFvK9p.cjs +1 -0
  84. package/dist/css/index.cjs +1 -0
  85. package/dist/css/index.css +1 -0
  86. package/dist/css/index.d.ts +1 -0
  87. package/dist/css/index.mjs +1 -0
  88. package/dist/div-measure/index.cjs +1 -0
  89. package/dist/div-measure/index.d.ts +13 -0
  90. package/dist/div-measure/index.mjs +26 -0
  91. package/dist/feather-sprite.svg +1 -0
  92. package/dist/gallery-modal/index.cjs +1 -0
  93. package/dist/gallery-modal/index.d.ts +11 -0
  94. package/dist/gallery-modal/index.mjs +464 -0
  95. package/dist/generics-9F1CmKPb.cjs +1 -0
  96. package/dist/generics-BrMr2-Gs.js +5 -0
  97. package/dist/generics-C-WSPclF.js +19 -0
  98. package/dist/generics-D33J7ILI.js +5 -0
  99. package/dist/generics-DE1oV0MV.cjs +1 -0
  100. package/dist/generics-nyvJhwQE.cjs +1 -0
  101. package/dist/global-event-portal/index.cjs +1 -0
  102. package/dist/global-event-portal/index.d.ts +8 -0
  103. package/dist/global-event-portal/index.mjs +4 -0
  104. package/dist/icons/index.cjs +1 -0
  105. package/dist/icons/index.d.ts +457 -0
  106. package/dist/icons/index.mjs +5 -0
  107. package/dist/icons-B8R1UT86.js +147 -0
  108. package/dist/icons-DSpaHhtT.cjs +1 -0
  109. package/dist/input-image/index.cjs +1 -0
  110. package/dist/input-image/index.d.ts +18 -0
  111. package/dist/input-image/index.mjs +106 -0
  112. package/dist/input-text/index.cjs +1 -0
  113. package/dist/input-text/index.d.ts +199 -0
  114. package/dist/input-text/index.mjs +246 -0
  115. package/dist/inset-group/index.cjs +1 -0
  116. package/dist/inset-group/index.d.ts +33 -0
  117. package/dist/inset-group/index.mjs +105 -0
  118. package/dist/label-text/index.cjs +1 -0
  119. package/dist/label-text/index.d.ts +11 -0
  120. package/dist/label-text/index.mjs +4 -0
  121. package/dist/layout/index.cjs +1 -0
  122. package/dist/layout/index.d.ts +163 -0
  123. package/dist/layout/index.mjs +4 -0
  124. package/dist/loading-spinner/index.cjs +1 -0
  125. package/dist/loading-spinner/index.d.ts +33 -0
  126. package/dist/loading-spinner/index.mjs +101 -0
  127. package/dist/modal/index.cjs +1 -0
  128. package/dist/modal/index.d.ts +105 -0
  129. package/dist/modal/index.mjs +4 -0
  130. package/dist/notification-system/index.cjs +1 -0
  131. package/dist/notification-system/index.d.ts +5 -0
  132. package/dist/notification-system/index.mjs +158 -0
  133. package/dist/portals/index.cjs +1 -0
  134. package/dist/portals/index.d.ts +10 -0
  135. package/dist/portals/index.mjs +4 -0
  136. package/dist/radio/index.cjs +1 -0
  137. package/dist/radio/index.d.ts +36 -0
  138. package/dist/radio/index.mjs +121 -0
  139. package/dist/react-spring_web.modern-DgQDaJ06.js +2304 -0
  140. package/dist/react-spring_web.modern-W3Nkoq_6.cjs +1 -0
  141. package/dist/select-spring/index.cjs +1 -0
  142. package/dist/select-spring/index.d.ts +70 -0
  143. package/dist/select-spring/index.mjs +471 -0
  144. package/dist/spring-enter/index.cjs +1 -0
  145. package/dist/spring-enter/index.d.ts +16 -0
  146. package/dist/spring-enter/index.mjs +45 -0
  147. package/dist/spring-enter-offset-by/index.cjs +1 -0
  148. package/dist/spring-enter-offset-by/index.d.ts +17 -0
  149. package/dist/spring-enter-offset-by/index.mjs +5 -0
  150. package/dist/spring-menu-transition/index.cjs +1 -0
  151. package/dist/spring-menu-transition/index.d.ts +15 -0
  152. package/dist/spring-menu-transition/index.mjs +43 -0
  153. package/dist/spring-open-close-height/index.cjs +1 -0
  154. package/dist/spring-open-close-height/index.d.ts +9 -0
  155. package/dist/spring-open-close-height/index.mjs +19 -0
  156. package/dist/styled/button/index.cjs +1 -0
  157. package/dist/styled/button/index.d.ts +2 -0
  158. package/dist/styled/button/index.mjs +4 -0
  159. package/dist/styled/inputs/text/index.cjs +1 -0
  160. package/dist/styled/inputs/text/index.d.ts +2 -0
  161. package/dist/styled/inputs/text/index.mjs +4 -0
  162. package/dist/styled/inputs/text-area/index.cjs +1 -0
  163. package/dist/styled/inputs/text-area/index.d.ts +2 -0
  164. package/dist/styled/inputs/text-area/index.mjs +4 -0
  165. package/dist/styled/li/index.cjs +1 -0
  166. package/dist/styled/li/index.d.ts +2 -0
  167. package/dist/styled/li/index.mjs +4 -0
  168. package/dist/styled/ul/index.cjs +1 -0
  169. package/dist/styled/ul/index.d.ts +2 -0
  170. package/dist/styled/ul/index.mjs +4 -0
  171. package/dist/table-grid/index.cjs +1 -0
  172. package/dist/table-grid/index.d.ts +70 -0
  173. package/dist/table-grid/index.mjs +49 -0
  174. package/dist/table-header/index.cjs +1 -0
  175. package/dist/table-header/index.d.ts +53 -0
  176. package/dist/table-header/index.mjs +4 -0
  177. package/dist/table-row/index.cjs +1 -0
  178. package/dist/table-row/index.d.ts +54 -0
  179. package/dist/table-row/index.mjs +4 -0
  180. package/dist/tabs/index.cjs +1 -0
  181. package/dist/tabs/index.d.ts +21 -0
  182. package/dist/tabs/index.mjs +134 -0
  183. package/dist/tag-color/index.cjs +1 -0
  184. package/dist/tag-color/index.d.ts +104 -0
  185. package/dist/tag-color/index.mjs +4 -0
  186. package/dist/text-area/index.cjs +1 -0
  187. package/dist/text-area/index.d.ts +212 -0
  188. package/dist/text-area/index.mjs +160 -0
  189. package/dist/texts/header/index.cjs +1 -0
  190. package/dist/texts/header/index.d.ts +2 -0
  191. package/dist/texts/header/index.mjs +28 -0
  192. package/dist/texts/p/index.cjs +1 -0
  193. package/dist/texts/p/index.d.ts +2 -0
  194. package/dist/texts/p/index.mjs +4 -0
  195. package/dist/texts/span/index.cjs +1 -0
  196. package/dist/texts/span/index.d.ts +2 -0
  197. package/dist/texts/span/index.mjs +4 -0
  198. package/dist/toggle-switch/index.cjs +1 -0
  199. package/dist/toggle-switch/index.d.ts +35 -0
  200. package/dist/toggle-switch/index.mjs +100 -0
  201. package/dist/types-34thzuQ5.js +134 -0
  202. package/dist/types-B3Ew5Ber.cjs +1 -0
  203. package/dist/types-B6XaG3V2.js +65 -0
  204. package/dist/types-BL1gBa8J.cjs +1 -0
  205. package/dist/types-BNUi2DUD.js +234 -0
  206. package/dist/types-BWsKfOhf.js +76 -0
  207. package/dist/types-BXyuQRbv.js +52 -0
  208. package/dist/types-BciByhvn.cjs +1 -0
  209. package/dist/types-BhBb436R.cjs +1 -0
  210. package/dist/types-Bh_j-nXM.js +168 -0
  211. package/dist/types-BnEsY_pc.cjs +1 -0
  212. package/dist/types-BuixDDod.js +12 -0
  213. package/dist/types-BzOxElrp.cjs +1 -0
  214. package/dist/types-CQP0_A_u.cjs +1 -0
  215. package/dist/types-Cev70RJC.cjs +1 -0
  216. package/dist/types-Cj8dOa0j.cjs +1 -0
  217. package/dist/types-CyVpnRmY.cjs +1 -0
  218. package/dist/types-DDcRx4Wz.cjs +1 -0
  219. package/dist/types-DNLw5jE2.js +151 -0
  220. package/dist/types-DZ_qlO_d.cjs +1 -0
  221. package/dist/types-DamZRbFt.js +4 -0
  222. package/dist/types-DevrYOgX.cjs +1 -0
  223. package/dist/types-DgSz2H9f.js +14 -0
  224. package/dist/types-DmnAtXuW.js +17 -0
  225. package/dist/types-Dyu7oUOO.js +4 -0
  226. package/dist/types-OOX58qQg.js +17 -0
  227. package/dist/types.cjs +1 -0
  228. package/dist/types.d.ts +2062 -0
  229. package/dist/types.mjs +177 -0
  230. package/dist/useClickOutsideDOM-CBmttEFU.js +16 -0
  231. package/dist/useClickOutsideDOM-Dd6ewH8B.cjs +1 -0
  232. package/dist/useCombinedRef-COuiqHjO.js +14 -0
  233. package/dist/useCombinedRef-DZxHQ7PL.cjs +1 -0
  234. package/dist/values-B5r2bYNJ.js +75 -0
  235. package/dist/values-C40_Fyfk.cjs +1 -0
  236. package/dist/values-CSE3dLnv.js +200 -0
  237. package/dist/values-D-Y_dNaF.cjs +1 -0
  238. package/dist/web-B_p0FWHf.js +132 -0
  239. package/dist/web-yC_cLoAC.cjs +1 -0
  240. package/package.json +2 -4
@@ -0,0 +1 @@
1
+ "use strict";const R=require("react"),$n=require("react-dom");function Nn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ye=Nn(R);var gt=Ce(),S=e=>Ve(e,gt),vt=Ce();S.write=e=>Ve(e,vt);var De=Ce();S.onStart=e=>Ve(e,De);var yt=Ce();S.onFrame=e=>Ve(e,yt);var bt=Ce();S.onFinish=e=>Ve(e,bt);var ce=[];S.setTimeout=(e,t)=>{const n=S.now()+t,i=()=>{const r=ce.findIndex(a=>a.cancel==i);~r&&ce.splice(r,1),ne-=~r?1:0},s={time:n,handler:e,cancel:i};return ce.splice(Jt(n),0,s),ne+=1,Xt(),s};var Jt=e=>~(~ce.findIndex(t=>t.time>e)||~ce.length);S.cancel=e=>{De.delete(e),yt.delete(e),bt.delete(e),gt.delete(e),vt.delete(e)};S.sync=e=>{it=!0,S.batchedUpdates(e),it=!1};S.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function i(...s){t=s,S.onStart(n)}return i.handler=e,i.cancel=()=>{De.delete(n),t=null},i};var _t=typeof window<"u"?window.requestAnimationFrame:(()=>{});S.use=e=>_t=e;S.now=typeof performance<"u"?()=>performance.now():Date.now;S.batchedUpdates=e=>e();S.catch=console.error;S.frameLoop="always";S.advance=()=>{S.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):en()};var te=-1,ne=0,it=!1;function Ve(e,t){it?(t.delete(e),e(0)):(t.add(e),Xt())}function Xt(){te<0&&(te=0,S.frameLoop!=="demand"&&_t(Yt))}function zn(){te=-1}function Yt(){~te&&(_t(Yt),S.batchedUpdates(en))}function en(){const e=te;te=S.now();const t=Jt(te);if(t&&(tn(ce.splice(0,t),n=>n.handler()),ne-=t),!ne){zn();return}De.flush(),gt.flush(e?Math.min(64,te-e):16.667),yt.flush(),vt.flush(),bt.flush()}function Ce(){let e=new Set,t=e;return{add(n){ne+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ne-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ne-=t.size,tn(t,i=>i(n)&&e.add(i)),ne+=e.size,t=e)}}}function tn(e,t){e.forEach(n=>{try{t(n)}catch(i){S.catch(i)}})}var Dn=Object.defineProperty,Mn=(e,t)=>{for(var n in t)Dn(e,n,{get:t[n],enumerable:!0})},L={};Mn(L,{assign:()=>Ln,colors:()=>ie,createStringInterpolator:()=>St,skipAnimation:()=>sn,to:()=>nn,willAdvance:()=>xt});function st(){}var Qn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),o={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function X(e,t){if(o.arr(e)){if(!o.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var b=(e,t)=>e.forEach(t);function W(e,t,n){if(o.arr(e)){for(let i=0;i<e.length;i++)t.call(n,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i)}var E=e=>o.und(e)?[]:o.arr(e)?e:[e];function be(e,t){if(e.size){const n=Array.from(e);e.clear(),b(n,t)}}var ve=(e,...t)=>be(e,n=>n(...t)),wt=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),St,nn,ie=null,sn=!1,xt=st,Ln=e=>{e.to&&(nn=e.to),e.now&&(S.now=e.now),e.colors!==void 0&&(ie=e.colors),e.skipAnimation!=null&&(sn=e.skipAnimation),e.createStringInterpolator&&(St=e.createStringInterpolator),e.requestAnimationFrame&&S.use(e.requestAnimationFrame),e.batchedUpdates&&(S.batchedUpdates=e.batchedUpdates),e.willAdvance&&(xt=e.willAdvance),e.frameLoop&&(S.frameLoop=e.frameLoop)},_e=new Set,z=[],Je=[],Ue=0,Me={get idle(){return!_e.size&&!z.length},start(e){Ue>e.priority?(_e.add(e),S.onStart(Bn)):(rn(e),S(rt))},advance:rt,sort(e){if(Ue)S.onFrame(()=>Me.sort(e));else{const t=z.indexOf(e);~t&&(z.splice(t,1),an(e))}},clear(){z=[],_e.clear()}};function Bn(){_e.forEach(rn),_e.clear(),S(rt)}function rn(e){z.includes(e)||an(e)}function an(e){z.splice(Gn(z,t=>t.priority>e.priority),0,e)}function rt(e){const t=Je;for(let n=0;n<z.length;n++){const i=z[n];Ue=i.priority,i.idle||(xt(i),i.advance(e),i.idle||t.push(i))}return Ue=0,Je=z,Je.length=0,z=t,z.length>0}function Gn(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Hn={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+",$e=Q+"%";function Qe(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Wn=new RegExp("rgb"+Qe(Q,Q,Q)),Kn=new RegExp("rgba"+Qe(Q,Q,Q,Q)),Zn=new RegExp("hsl"+Qe(Q,$e,$e)),Jn=new RegExp("hsla"+Qe(Q,$e,$e,Q)),Xn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ei=/^#([0-9a-fA-F]{6})$/,ti=/^#([0-9a-fA-F]{8})$/;function ni(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ei.exec(e))?parseInt(t[1]+"ff",16)>>>0:ie&&ie[e]!==void 0?ie[e]:(t=Wn.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|255)>>>0:(t=Kn.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|Ot(t[4]))>>>0:(t=Xn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ti.exec(e))?parseInt(t[1],16)>>>0:(t=Yn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Zn.exec(e))?(Ct(Et(t[1]),Oe(t[2]),Oe(t[3]))|255)>>>0:(t=Jn.exec(e))?(Ct(Et(t[1]),Oe(t[2]),Oe(t[3]))|Ot(t[4]))>>>0:null}function Xe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ct(e,t,n){const i=n<.5?n*(1+t):n+t-n*t,s=2*n-i,r=Xe(s,i,e+1/3),a=Xe(s,i,e),u=Xe(s,i,e-1/3);return Math.round(r*255)<<24|Math.round(a*255)<<16|Math.round(u*255)<<8}function ue(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Et(e){return(parseFloat(e)%360+360)%360/360}function Ot(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Oe(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function jt(e){let t=ni(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,i=(t&16711680)>>>16,s=(t&65280)>>>8,r=(t&255)/255;return`rgba(${n}, ${i}, ${s}, ${r})`}var xe=(e,t,n)=>{if(o.fun(e))return e;if(o.arr(e))return xe({range:e,output:t,extrapolate:n});if(o.str(e.output[0]))return St(e);const i=e,s=i.output,r=i.range||[0,1],a=i.extrapolateLeft||i.extrapolate||"extend",u=i.extrapolateRight||i.extrapolate||"extend",l=i.easing||(c=>c);return c=>{const p=si(c,r);return ii(c,r[p],r[p+1],s[p],s[p+1],l,a,u,i.map)}};function ii(e,t,n,i,s,r,a,u,l){let c=l?l(e):e;if(c<t){if(a==="identity")return c;a==="clamp"&&(c=t)}if(c>n){if(u==="identity")return c;u==="clamp"&&(c=n)}return i===s?i:t===n?e<=t?i:s:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=r(c),i===-1/0?c=-c:s===1/0?c=c+i:c=c*(s-i)+i,c)}function si(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var ri={linear:e=>e},Ae=Symbol.for("FluidValue.get"),de=Symbol.for("FluidValue.observers"),N=e=>!!(e&&e[Ae]),O=e=>e&&e[Ae]?e[Ae]():e,qt=e=>e[de]||null;function ai(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pe(e,t){const n=e[de];n&&n.forEach(i=>{ai(i,t)})}var on=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");oi(this,e)}},oi=(e,t)=>un(e,Ae,t);function fe(e,t){if(e[Ae]){let n=e[de];n||un(e,de,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Re(e,t){const n=e[de];if(n&&n.has(t)){const i=n.size-1;i?n.delete(t):e[de]=null,e.observerRemoved&&e.observerRemoved(i,t)}}var un=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),je=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ui=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ut=new RegExp(`(${je.source})(%|[a-z]+)`,"i"),ci=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Le=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,cn=e=>{const[t,n]=li(e);if(!t||wt())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(i)return i.trim();if(n&&n.startsWith("--")){const s=window.getComputedStyle(document.documentElement).getPropertyValue(n);return s||e}else{if(n&&Le.test(n))return cn(n);if(n)return n}return e},li=e=>{const t=Le.exec(e);if(!t)return[,];const[,n,i]=t;return[n,i]},Ye,di=(e,t,n,i,s)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`,ln=e=>{Ye||(Ye=ie?new RegExp(`(${Object.keys(ie).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(r=>O(r).replace(Le,cn).replace(ui,jt).replace(Ye,jt)),n=t.map(r=>r.match(je).map(Number)),s=n[0].map((r,a)=>n.map(u=>{if(!(a in u))throw Error('The arity of each "output" value must be equal');return u[a]})).map(r=>xe({...e,output:r}));return r=>{var l;const a=!Ut.test(t[0])&&((l=t.find(c=>Ut.test(c)))==null?void 0:l.replace(je,""));let u=0;return t[0].replace(je,()=>`${s[u++](r)}${a||""}`).replace(ci,di)}},At="react-spring: ",dn=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${At}once requires a function parameter`);return(...i)=>{n||(t(...i),n=!0)}},fi=dn(console.warn);function hi(){fi(`${At}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var mi=dn(console.warn);function pi(){mi(`${At}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Be(e){return o.str(e)&&(e[0]=="#"||/\d/.test(e)||!wt()&&Le.test(e)||e in(ie||{}))}var ae=wt()?R.useEffect:R.useLayoutEffect,gi=()=>{const e=R.useRef(!1);return ae(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Pt(){const e=R.useState()[1],t=gi();return()=>{t.current&&e(Math.random())}}var Rt=e=>R.useEffect(e,vi),vi=[];function at(e){const t=R.useRef(void 0);return R.useEffect(()=>{t.current=e}),t.current}var ke=Symbol.for("Animated:node"),yi=e=>!!e&&e[ke]===e,H=e=>e&&e[ke],kt=(e,t)=>Qn(e,ke,t),Ge=e=>e&&e[ke]&&e[ke].getPayload(),fn=class{constructor(){kt(this,this)}getPayload(){return this.payload||[]}},He=class hn extends fn{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,o.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new hn(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,n){return o.num(t)&&(this.lastPosition=t,n&&(t=Math.round(t/n)*n,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,o.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ne=class mn extends He{constructor(t){super(0),this._string=null,this._toString=xe({output:[t,t]})}static create(t){return new mn(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(o.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=xe({output:[this.getValue(),t]})),this._value=0,super.reset()}},ze={dependencies:null},We=class extends fn{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return W(this.source,(n,i)=>{yi(n)?t[i]=n.getValue(e):N(n)?t[i]=O(n):e||(t[i]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&b(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return W(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ze.dependencies&&N(e)&&ze.dependencies.add(e);const t=Ge(e);t&&b(t,n=>this.add(n))}},bi=class pn extends We{constructor(t){super(t)}static create(t){return new pn(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const n=this.getPayload();return t.length==n.length?n.map((i,s)=>i.setValue(t[s])).some(Boolean):(super.setValue(t.map(_i)),!0)}};function _i(e){return(Be(e)?Ne:He).create(e)}function ot(e){const t=H(e);return t?t.constructor:o.arr(e)?bi:Be(e)?Ne:He}var $t=(e,t)=>{const n=!o.fun(e)||e.prototype&&e.prototype.isReactComponent;return R.forwardRef((i,s)=>{const r=R.useRef(null),a=n&&R.useCallback(f=>{r.current=xi(s,f)},[s]),[u,l]=Si(i,t),c=Pt(),p=()=>{const f=r.current;if(n&&!f)return;(f?t.applyAnimatedValues(f,u.getValue(!0)):!1)===!1&&c()},h=new wi(p,l),d=R.useRef(void 0);ae(()=>(d.current=h,b(l,f=>fe(f,h)),()=>{d.current&&(b(d.current.deps,f=>Re(f,d.current)),S.cancel(d.current.update))})),R.useEffect(p,[]),Rt(()=>()=>{const f=d.current;b(f.deps,v=>Re(v,f))});const g=t.getComponentProps(u.getValue());return ye.createElement(e,{...g,ref:a})})},wi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&S.write(this.update)}};function Si(e,t){const n=new Set;return ze.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new We(e),ze.dependencies=null,[e,n]}function xi(e,t){return e&&(o.fun(e)?e(t):e.current=t),t}var Nt=Symbol.for("AnimatedComponent"),Ai=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=s=>new We(s),getComponentProps:i=s=>s}={})=>{const s={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:i},r=a=>{const u=zt(a)||"Anonymous";return o.str(a)?a=r[a]||(r[a]=$t(a,s)):a=a[Nt]||(a[Nt]=$t(a,s)),a.displayName=`Animated(${u})`,a};return W(e,(a,u)=>{o.arr(e)&&(u=zt(a)),r[u]=r(a)}),{animated:r}},zt=e=>o.str(e)?e:e&&o.str(e.displayName)?e.displayName:o.fun(e)&&e.name||null;function j(e,...t){return o.fun(e)?e(...t):e}var we=(e,t)=>e===!0||!!(t&&e&&(o.fun(e)?e(t):E(e).includes(t))),gn=(e,t)=>o.obj(e)?t&&e[t]:e,vn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Pi=e=>e,Ke=(e,t=Pi)=>{let n=Ri;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const i={};for(const s of n){const r=t(e[s],s);o.und(r)||(i[s]=r)}return i},Ri=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ki={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ii(e){const t={};let n=0;if(W(e,(i,s)=>{ki[s]||(t[s]=i,n++)}),n)return t}function It(e){const t=Ii(e);if(t){const n={to:t};return W(e,(i,s)=>s in t||(n[s]=i)),n}return{...e}}function Ie(e){return e=O(e),o.arr(e)?e.map(Ie):Be(e)?L.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yn(e){for(const t in e)return!0;return!1}function ut(e){return o.fun(e)||o.arr(e)&&o.obj(e[0])}function ct(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function bn(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var _n={default:{tension:170,friction:26},stiff:{tension:210,friction:20}},lt={..._n.default,mass:1,damping:1,easing:ri.linear,clamp:!1},Ti=class{constructor(){this.velocity=0,Object.assign(this,lt)}};function Fi(e,t,n){n&&(n={...n},Dt(n,t),t={...n,...t}),Dt(e,t),Object.assign(e,t);for(const a in lt)e[a]==null&&(e[a]=lt[a]);let{frequency:i,damping:s}=e;const{mass:r}=e;return o.und(i)||(i<.01&&(i=.01),s<0&&(s=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*s*r/i),e}function Dt(e,t){if(!o.und(t.decay))e.duration=void 0;else{const n=!o.und(t.tension)||!o.und(t.friction);(n||!o.und(t.frequency)||!o.und(t.damping)||!o.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Mt=[],Vi=class{constructor(){this.changed=!1,this.values=Mt,this.toValues=null,this.fromValues=Mt,this.config=new Ti,this.immediate=!1}};function wn(e,{key:t,props:n,defaultProps:i,state:s,actions:r}){return new Promise((a,u)=>{let l,c,p=we(n.cancel??(i==null?void 0:i.cancel),t);if(p)g();else{o.und(n.pause)||(s.paused=we(n.pause,t));let f=i==null?void 0:i.pause;f!==!0&&(f=s.paused||we(f,t)),l=j(n.delay||0,t),f?(s.resumeQueue.add(d),r.pause()):(r.resume(),d())}function h(){s.resumeQueue.add(d),s.timeouts.delete(c),c.cancel(),l=c.time-S.now()}function d(){l>0&&!L.skipAnimation?(s.delayed=!0,c=S.setTimeout(g,l),s.pauseQueue.add(h),s.timeouts.add(c)):g()}function g(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(h),s.timeouts.delete(c),e<=(s.cancelId||0)&&(p=!0);try{r.start({...n,callId:e,cancel:p},a)}catch(f){u(f)}}})}var Tt=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?le(e.get()):t.every(n=>n.noop)?Sn(e.get()):M(e.get(),t.every(n=>n.finished)),Sn=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),M=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),le=e=>({value:e,cancelled:!0,finished:!1});function xn(e,t,n,i){const{callId:s,parentId:r,onRest:a}=t,{asyncTo:u,promise:l}=n;return!r&&e===u&&!t.reset?l:n.promise=(async()=>{n.asyncId=s,n.asyncTo=e;const c=Ke(t,(_,m)=>m==="onRest"?void 0:_);let p,h;const d=new Promise((_,m)=>(p=_,h=m)),g=_=>{const m=s<=(n.cancelId||0)&&le(i)||s!==n.asyncId&&M(i,!1);if(m)throw _.result=m,h(_),_},f=(_,m)=>{const x=new Qt,y=new Lt;return(async()=>{if(L.skipAnimation)throw Te(n),y.result=M(i,!1),h(y),y;g(x);const P=o.obj(_)?{..._}:{...m,to:_};P.parentId=s,W(c,(B,I)=>{o.und(P[I])&&(P[I]=B)});const k=await i.start(P);return g(x),n.paused&&await new Promise(B=>{n.resumeQueue.add(B)}),k})()};let v;if(L.skipAnimation)return Te(n),M(i,!1);try{let _;o.arr(e)?_=(async m=>{for(const x of m)await f(x)})(e):_=Promise.resolve(e(f,i.stop.bind(i))),await Promise.all([_.then(p),d]),v=M(i.get(),!0,!1)}catch(_){if(_ instanceof Qt)v=_.result;else if(_ instanceof Lt)v=_.result;else throw _}finally{s==n.asyncId&&(n.asyncId=r,n.asyncTo=r?u:void 0,n.promise=r?l:void 0)}return o.fun(a)&&S.batchedUpdates(()=>{a(v,i,i.item)}),v})()}function Te(e,t){be(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Qt=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Lt=class extends Error{constructor(){super("SkipAnimationSignal")}},dt=e=>e instanceof Ft,Ci=1,Ft=class extends on{constructor(){super(...arguments),this.id=Ci++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=H(this);return e&&e.getValue()}to(...e){return L.to(this,e)}interpolate(...e){return hi(),L.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Pe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Me.sort(this),Pe(this,{type:"priority",parent:this,priority:e})}},oe=Symbol.for("SpringPhase"),An=1,ft=2,ht=4,et=e=>(e[oe]&An)>0,ee=e=>(e[oe]&ft)>0,me=e=>(e[oe]&ht)>0,Bt=(e,t)=>t?e[oe]|=ft|An:e[oe]&=~ft,Gt=(e,t)=>t?e[oe]|=ht:e[oe]&=~ht,Ei=class extends Ft{constructor(e,t){if(super(),this.animation=new Vi,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!o.und(e)||!o.und(t)){const n=o.obj(e)?{...e}:{...t,from:e};o.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ee(this)||this._state.asyncTo)||me(this)}get goal(){return O(this.animation.to)}get velocity(){const e=H(this);return e instanceof He?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return et(this)}get isAnimating(){return ee(this)}get isPaused(){return me(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const i=this.animation;let{toValues:s}=i;const{config:r}=i,a=Ge(i.to);!a&&N(i.to)&&(s=E(O(i.to))),i.values.forEach((c,p)=>{if(c.done)return;const h=c.constructor==Ne?1:a?a[p].lastPosition:s[p];let d=i.immediate,g=h;if(!d){if(g=c.lastPosition,r.tension<=0){c.done=!0;return}let f=c.elapsedTime+=e;const v=i.fromValues[p],_=c.v0!=null?c.v0:c.v0=o.arr(r.velocity)?r.velocity[p]:r.velocity;let m;const x=r.precision||(v==h?.005:Math.min(1,Math.abs(h-v)*.001));if(o.und(r.duration))if(r.decay){const y=r.decay===!0?.998:r.decay,P=Math.exp(-(1-y)*f);g=v+_/(1-y)*(1-P),d=Math.abs(c.lastPosition-g)<=x,m=_*P}else{m=c.lastVelocity==null?_:c.lastVelocity;const y=r.restVelocity||x/10,P=r.clamp?0:r.bounce,k=!o.und(P),B=v==h?c.v0>0:v<h;let I,G=!1;const T=1,$=Math.ceil(e/T);for(let q=0;q<$&&(I=Math.abs(m)>y,!(!I&&(d=Math.abs(h-g)<=x,d)));++q){k&&(G=g==h||g>h==B,G&&(m=-m*P,g=h));const K=-r.tension*1e-6*(g-h),Z=-r.friction*.001*m,w=(K+Z)/r.mass;m=m+w*T,g=g+m*T}}else{let y=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,c.durationProgress>0&&(c.elapsedTime=r.duration*c.durationProgress,f=c.elapsedTime+=e)),y=(r.progress||0)+f/this._memoizedDuration,y=y>1?1:y<0?0:y,c.durationProgress=y),g=v+r.easing(y)*(h-v),m=(g-c.lastPosition)/e,d=y==1}c.lastVelocity=m,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[p].done&&(d=!1),d?c.done=!0:t=!1,c.setValue(g,r.round)&&(n=!0)});const u=H(this),l=u.getValue();if(t){const c=O(i.to);(l!==c||n)&&!r.decay?(u.setValue(c),this._onChange(c)):n&&r.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return S.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ee(this)){const{to:e,config:t}=this.animation;S.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return o.und(e)?(n=this.queue||[],this.queue=[]):n=[o.obj(e)?e:{...t,to:e}],Promise.all(n.map(i=>this._update(i))).then(i=>Tt(this,i))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Te(this._state,e&&this._lastCallId),S.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:i}=e;n=o.obj(n)?n[t]:n,(n==null||ut(n))&&(n=void 0),i=o.obj(i)?i[t]:i,i==null&&(i=void 0);const s={to:n,from:i};return et(this)||(e.reverse&&([n,i]=[i,n]),i=O(i),o.und(i)?H(this)||this._set(n):this._set(i)),s}_update({...e},t){const{key:n,defaultProps:i}=this;e.default&&Object.assign(i,Ke(e,(a,u)=>/^on/.test(u)?gn(a,n):a)),Wt(this,e,"onProps"),ge(this,"onProps",e,this);const s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const r=this._state;return wn(++this._lastCallId,{key:n,props:e,defaultProps:i,state:r,actions:{pause:()=>{me(this)||(Gt(this,!0),ve(r.pauseQueue),ge(this,"onPause",M(this,pe(this,this.animation.to)),this))},resume:()=>{me(this)&&(Gt(this,!1),ee(this)&&this._resume(),ve(r.resumeQueue),ge(this,"onResume",M(this,pe(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const u=Pn(e);if(u)return this._update(u,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(le(this));const i=!o.und(e.to),s=!o.und(e.from);if(i||s)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(le(this));const{key:r,defaultProps:a,animation:u}=this,{to:l,from:c}=u;let{to:p=l,from:h=c}=e;s&&!i&&(!t.default||o.und(p))&&(p=h),t.reverse&&([p,h]=[h,p]);const d=!X(h,c);d&&(u.from=h),h=O(h);const g=!X(p,l);g&&this._focus(p);const f=ut(t.to),{config:v}=u,{decay:_,velocity:m}=v;(i||s)&&(v.velocity=0),t.config&&!f&&Fi(v,j(t.config,r),t.config!==a.config?j(a.config,r):void 0);let x=H(this);if(!x||o.und(p))return n(M(this,!0));const y=o.und(t.reset)?s&&!t.default:!o.und(h)&&we(t.reset,r),P=y?h:this.get(),k=Ie(p),B=o.num(k)||o.arr(k)||Be(k),I=!f&&(!B||we(a.immediate||t.immediate,r));if(g){const q=ot(p);if(q!==x.constructor)if(I)x=this._set(k);else throw Error(`Cannot animate between ${x.constructor.name} and ${q.name}, as the "to" prop suggests`)}const G=x.constructor;let T=N(p),$=!1;if(!T){const q=y||!et(this)&&d;(g||q)&&($=X(Ie(P),k),T=!$),(!X(u.immediate,I)&&!I||!X(v.decay,_)||!X(v.velocity,m))&&(T=!0)}if($&&ee(this)&&(u.changed&&!y?T=!0:T||this._stop(l)),!f&&((T||N(l))&&(u.values=x.getPayload(),u.toValues=N(p)?null:G==Ne?[1]:E(k)),u.immediate!=I&&(u.immediate=I,!I&&!y&&this._set(l)),T)){const{onRest:q}=u;b(ji,Z=>Wt(this,t,Z));const K=M(this,pe(this,l));ve(this._pendingCalls,K),this._pendingCalls.add(n),u.changed&&S.batchedUpdates(()=>{var Z;u.changed=!y,q==null||q(K,this),y?j(a.onRest,K):(Z=u.onStart)==null||Z.call(u,K,this)})}y&&this._set(P),f?n(xn(t.to,t,this._state,this)):T?this._start():ee(this)&&!g?this._pendingCalls.add(n):n(Sn(P))}_focus(e){const t=this.animation;e!==t.to&&(qt(this)&&this._detach(),t.to=e,qt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;N(t)&&(fe(t,this),dt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;N(e)&&Re(e,this)}_set(e,t=!0){const n=O(e);if(!o.und(n)){const i=H(this);if(!i||!X(n,i.getValue())){const s=ot(n);!i||i.constructor!=s?kt(this,s.create(n)):i.setValue(n),i&&S.batchedUpdates(()=>{this._onChange(n,t)})}}return H(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ge(this,"onStart",M(this,pe(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),j(this.animation.onChange,e,this)),j(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;H(this).reset(O(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ee(this)||(Bt(this,!0),me(this)||this._resume())}_resume(){L.skipAnimation?this.finish():Me.start(this)}_stop(e,t){if(ee(this)){Bt(this,!1);const n=this.animation;b(n.values,s=>{s.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pe(this,{type:"idle",parent:this});const i=t?le(this.get()):M(this.get(),pe(this,e??n.to));ve(this._pendingCalls,i),n.changed&&(n.changed=!1,ge(this,"onRest",i,this))}}};function pe(e,t){const n=Ie(t),i=Ie(e.get());return X(i,n)}function Pn(e,t=e.loop,n=e.to){const i=j(t);if(i){const s=i!==!0&&It(i),r=(s||e).reverse,a=!s||s.reset;return Fe({...e,loop:t,default:!1,pause:void 0,to:!r||ut(n)?n:void 0,from:a?e.from:void 0,reset:a,...s})}}function Fe(e){const{to:t,from:n}=e=It(e),i=new Set;return o.obj(t)&&Ht(t,i),o.obj(n)&&Ht(n,i),e.keys=i.size?Array.from(i):null,e}function Oi(e){const t=Fe(e);return o.und(t.default)&&(t.default=Ke(t)),t}function Ht(e,t){W(e,(n,i)=>n!=null&&t.add(i))}var ji=["onStart","onRest","onChange","onPause","onResume"];function Wt(e,t,n){e.animation[n]=t[n]!==vn(t,n)?gn(t[n],e.key):void 0}function ge(e,t,...n){var i,s,r,a;(s=(i=e.animation)[t])==null||s.call(i,...n),(a=(r=e.defaultProps)[t])==null||a.call(r,...n)}var qi=["onStart","onChange","onRest"],Ui=1,Rn=class{constructor(e,t){this.id=Ui++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];o.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Fe(e)),this}start(e){let{queue:t}=this;return e?t=E(e).map(Fe):this.queue=[],this._flush?this._flush(this,t):(Vn(this,t),mt(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;b(E(t),i=>n[i].stop(!!e))}else Te(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(o.und(e))this.start({pause:!0});else{const t=this.springs;b(E(e),n=>t[n].pause())}return this}resume(e){if(o.und(e))this.start({pause:!1});else{const t=this.springs;b(E(e),n=>t[n].resume())}return this}each(e){W(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,be(e,([u,l])=>{l.value=this.get(),u(l,this,this._item)}));const r=!i&&this._started,a=s||r&&n.size?this.get():null;s&&t.size&&be(t,([u,l])=>{l.value=a,u(l,this,this._item)}),r&&(this._started=!1,be(n,([u,l])=>{l.value=a,u(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;S.onFrame(this._onFrame)}};function mt(e,t){return Promise.all(t.map(n=>kn(e,n))).then(n=>Tt(e,n))}async function kn(e,t,n){const{keys:i,to:s,from:r,loop:a,onRest:u,onResolve:l}=t,c=o.obj(t.default)&&t.default;a&&(t.loop=!1),s===!1&&(t.to=null),r===!1&&(t.from=null);const p=o.arr(s)||o.fun(s)?s:void 0;p?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):b(qi,v=>{const _=t[v];if(o.fun(_)){const m=e._events[v];t[v]=({finished:x,cancelled:y})=>{const P=m.get(_);P?(x||(P.finished=!1),y&&(P.cancelled=!0)):m.set(_,{value:null,finished:x||!1,cancelled:y||!1})},c&&(c[v]=t[v])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,ve(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const d=(i||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),g=t.cancel===!0||vn(t,"cancel")===!0;(p||g&&h.asyncId)&&d.push(wn(++e._lastAsyncId,{props:t,state:h,actions:{pause:st,resume:st,start(v,_){g?(Te(h,e._lastAsyncId),_(le(e))):(v.onRest=u,_(xn(p,v,h,e)))}}})),h.paused&&await new Promise(v=>{h.resumeQueue.add(v)});const f=Tt(e,await Promise.all(d));if(a&&f.finished&&!(n&&f.noop)){const v=Pn(t,a,s);if(v)return Vn(e,[v]),kn(e,v,!0)}return l&&S.batchedUpdates(()=>l(f,e,e.item)),f}function pt(e,t){const n={...e.springs};return t&&b(E(t),i=>{o.und(i.keys)&&(i=Fe(i)),o.obj(i.to)||(i={...i,to:void 0}),Fn(n,i,s=>Tn(s))}),In(e,n),n}function In(e,t){W(t,(n,i)=>{e.springs[i]||(e.springs[i]=n,fe(n,e))})}function Tn(e,t){const n=new Ei;return n.key=e,t&&fe(n,t),n}function Fn(e,t,n){t.keys&&b(t.keys,i=>{(e[i]||(e[i]=n(i)))._prepareNode(t)})}function Vn(e,t){b(t,n=>{Fn(e.springs,n,i=>Tn(i,e))})}var Cn=ye.createContext({pause:!1,immediate:!1}),En=()=>{const e=[],t=function(i){pi();const s=[];return b(e,(r,a)=>{if(o.und(i))s.push(r.start());else{const u=n(i,r,a);u&&s.push(r.start(u))}}),s};t.current=e,t.add=function(i){e.includes(i)||e.push(i)},t.delete=function(i){const s=e.indexOf(i);~s&&e.splice(s,1)},t.pause=function(){return b(e,i=>i.pause(...arguments)),this},t.resume=function(){return b(e,i=>i.resume(...arguments)),this},t.set=function(i){b(e,(s,r)=>{const a=o.fun(i)?i(r,s):i;a&&s.set(a)})},t.start=function(i){const s=[];return b(e,(r,a)=>{if(o.und(i))s.push(r.start());else{const u=this._getProps(i,r,a);u&&s.push(r.start(u))}}),s},t.stop=function(){return b(e,i=>i.stop(...arguments)),this},t.update=function(i){return b(e,(s,r)=>s.update(this._getProps(i,s,r))),this};const n=function(i,s,r){return o.fun(i)?i(r,s):i};return t._getProps=n,t};function On(e,t,n){const i=o.fun(t)&&t;i&&!n&&(n=[]);const s=R.useMemo(()=>i||arguments.length==3?En():void 0,[]),r=R.useRef(0),a=Pt(),u=R.useMemo(()=>({ctrls:[],queue:[],flush(m,x){const y=pt(m,x);return r.current>0&&!u.queue.length&&!Object.keys(y).some(k=>!m.springs[k])?mt(m,x):new Promise(k=>{In(m,y),u.queue.push(()=>{k(mt(m,x))}),a()})}}),[]),l=R.useRef([...u.ctrls]),c=R.useRef([]),p=at(e)||0;R.useMemo(()=>{b(l.current.slice(e,p),m=>{ct(m,s),m.stop(!0)}),l.current.length=e,h(p,e)},[e]),R.useMemo(()=>{h(0,Math.min(p,e))},n);function h(m,x){for(let y=m;y<x;y++){const P=l.current[y]||(l.current[y]=new Rn(null,u.flush)),k=i?i(y,P):t[y];k&&(c.current[y]=Oi(k))}}const d=l.current.map((m,x)=>pt(m,c.current[x])),g=R.useContext(Cn),f=at(g),v=g!==f&&yn(g);ae(()=>{r.current++,u.ctrls=l.current;const{queue:m}=u;m.length&&(u.queue=[],b(m,x=>x())),b(l.current,(x,y)=>{s==null||s.add(x),v&&x.start({default:g});const P=c.current[y];P&&(bn(x,P.ref),x.ref?x.queue.push(P):x.start(P))})}),Rt(()=>()=>{b(u.ctrls,m=>m.stop(!0))});const _=d.map(m=>({...m}));return s?[_,s]:_}function $i(e,t){const n=o.fun(e),[[i],s]=On(1,n?e:[e],n?[]:t);return n||arguments.length==2?[i,s]:i}function Ni(e,t,n){const i=o.fun(t)&&t,{reset:s,sort:r,trail:a=0,expires:u=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:p,config:h}=i?i():t,d=R.useMemo(()=>i||arguments.length==3?En():void 0,[]),g=E(e),f=[],v=R.useRef(null),_=s?null:v.current;ae(()=>{v.current=f}),Rt(()=>(b(f,w=>{d==null||d.add(w.ctrl),w.ctrl.ref=d}),()=>{b(v.current,w=>{w.expired&&clearTimeout(w.expirationId),ct(w.ctrl,d),w.ctrl.stop(!0)})}));const m=Di(g,i?i():t,_),x=s&&v.current||[];ae(()=>b(x,({ctrl:w,item:A,key:V})=>{ct(w,d),j(c,A,V)}));const y=[];if(_&&b(_,(w,A)=>{w.expired?(clearTimeout(w.expirationId),x.push(w)):(A=y[A]=m.indexOf(w.key),~A&&(f[A]=w))}),b(g,(w,A)=>{f[A]||(f[A]={key:m[A],item:w,phase:"mount",ctrl:new Rn},f[A].ctrl.item=w)}),y.length){let w=-1;const{leave:A}=i?i():t;b(y,(V,C)=>{const F=_[C];~V?(w=f.indexOf(F),f[w]={...F,item:g[V]}):A&&f.splice(++w,0,F)})}o.fun(r)&&f.sort((w,A)=>r(w.item,A.item));let P=-a;const k=Pt(),B=Ke(t),I=new Map,G=R.useRef(new Map),T=R.useRef(!1);b(f,(w,A)=>{const V=w.key,C=w.phase,F=i?i():t;let U,J;const qn=j(F.delay||0,V);if(C=="mount")U=F.enter,J="enter";else{const D=m.indexOf(V)<0;if(C!="leave")if(D)U=F.leave,J="leave";else if(U=F.update)J="update";else return;else if(!D)U=F.enter,J="enter";else return}if(U=j(U,w.item,A),U=o.obj(U)?It(U):{to:U},!U.config){const D=h||B.config;U.config=j(D,w.item,A,J)}P+=a;const se={...B,delay:qn+P,ref:p,immediate:F.immediate,reset:!1,...U};if(J=="enter"&&o.und(se.from)){const D=i?i():t,he=o.und(D.initial)||_?D.from:D.initial;se.from=j(he,w.item,A)}const{onResolve:Un}=se;se.onResolve=D=>{j(Un,D);const he=v.current,Y=he.find(Ee=>Ee.key===V);if(Y&&!(D.cancelled&&Y.phase!="update")&&Y.ctrl.idle){const Ee=he.every(re=>re.ctrl.idle);if(Y.phase=="leave"){const re=j(u,Y.item);if(re!==!1){const Ze=re===!0?0:re;if(Y.expired=!0,!Ee&&Ze>0){Ze<=2147483647&&(Y.expirationId=setTimeout(k,Ze));return}}}Ee&&he.some(re=>re.expired)&&(G.current.delete(Y),l&&(T.current=!0),k())}};const Vt=pt(w.ctrl,se);J==="leave"&&l?G.current.set(w,{phase:J,springs:Vt,payload:se}):I.set(w,{phase:J,springs:Vt,payload:se})});const $=R.useContext(Cn),q=at($),K=$!==q&&yn($);ae(()=>{K&&b(f,w=>{w.ctrl.start({default:$})})},[$]),b(I,(w,A)=>{if(G.current.size){const V=f.findIndex(C=>C.key===A.key);f.splice(V,1)}}),ae(()=>{b(G.current.size?G.current:I,({phase:w,payload:A},V)=>{const{ctrl:C}=V;V.phase=w,d==null||d.add(C),K&&w=="enter"&&C.start({default:$}),A&&(bn(C,A.ref),(C.ref||d)&&!T.current?C.update(A):(C.start(A),T.current&&(T.current=!1)))})},s?void 0:n);const Z=w=>ye.createElement(ye.Fragment,null,f.map((A,V)=>{const{springs:C}=I.get(A)||A.ctrl,F=w({...C},A.item,A,V);return F&&F.type?ye.createElement(F.type,{...F.props,key:o.str(A.key)||o.num(A.key)?A.key:A.ctrl.id,ref:F.ref}):F}));return d?[Z,d]:Z}var zi=1;function Di(e,{key:t,keys:n=t},i){if(n===null){const s=new Set;return e.map(r=>{const a=i&&i.find(u=>u.item===r&&u.phase!=="leave"&&!s.has(u));return a?(s.add(a),a.key):zi++})}return o.und(n)?e:o.fun(n)?e.map(n):E(n)}var Mi=class extends Ft{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=xe(...t);const n=this._get(),i=ot(n);kt(this,i.create(n))}advance(e){const t=this._get(),n=this.get();X(t,n)||(H(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Kt(this._active)&&tt(this)}_get(){const e=o.arr(this.source)?this.source.map(O):E(O(this.source));return this.calc(...e)}_start(){this.idle&&!Kt(this._active)&&(this.idle=!1,b(Ge(this),e=>{e.done=!1}),L.skipAnimation?(S.batchedUpdates(()=>this.advance()),tt(this)):Me.start(this))}_attach(){let e=1;b(E(this.source),t=>{N(t)&&fe(t,this),dt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){b(E(this.source),e=>{N(e)&&Re(e,this)}),this._active.clear(),tt(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=E(this.source).reduce((t,n)=>Math.max(t,(dt(n)?n.priority:0)+1),0))}};function Qi(e){return e.idle!==!1}function Kt(e){return!e.size||Array.from(e).every(Qi)}function tt(e){e.idle||(e.idle=!0,b(Ge(e),t=>{t.done=!0}),Pe(e,{type:"idle",parent:e}))}L.assign({createStringInterpolator:ln,to:(e,t)=>new Mi(e,t)});var jn=/^--/;function Li(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!jn.test(e)&&!(Se.hasOwnProperty(e)&&Se[e])?t+"px":(""+t).trim()}var Zt={};function Bi(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:s,children:r,scrollTop:a,scrollLeft:u,viewBox:l,...c}=t,p=Object.values(c),h=Object.keys(c).map(d=>n||e.hasAttribute(d)?d:Zt[d]||(Zt[d]=d.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));r!==void 0&&(e.textContent=r);for(const d in s)if(s.hasOwnProperty(d)){const g=Li(d,s[d]);jn.test(d)?e.style.setProperty(d,g):e.style[d]=g}h.forEach((d,g)=>{e.setAttribute(d,p[g])}),i!==void 0&&(e.className=i),a!==void 0&&(e.scrollTop=a),u!==void 0&&(e.scrollLeft=u),l!==void 0&&e.setAttribute("viewBox",l)}var Se={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gi=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Hi=["Webkit","Ms","Moz","O"];Se=Object.keys(Se).reduce((e,t)=>(Hi.forEach(n=>e[Gi(n,t)]=e[t]),e),Se);var Wi=/^(matrix|translate|scale|rotate|skew)/,Ki=/^(translate)/,Zi=/^(rotate|skew)/,nt=(e,t)=>o.num(e)&&e!==0?e+t:e,qe=(e,t)=>o.arr(e)?e.every(n=>qe(n,t)):o.num(e)?e===t:parseFloat(e)===t,Ji=class extends We{constructor({x:e,y:t,z:n,...i}){const s=[],r=[];(e||t||n)&&(s.push([e||0,t||0,n||0]),r.push(a=>[`translate3d(${a.map(u=>nt(u,"px")).join(",")})`,qe(a,0)])),W(i,(a,u)=>{if(u==="transform")s.push([a||""]),r.push(l=>[l,l===""]);else if(Wi.test(u)){if(delete i[u],o.und(a))return;const l=Ki.test(u)?"px":Zi.test(u)?"deg":"";s.push(E(a)),r.push(u==="rotate3d"?([c,p,h,d])=>[`rotate3d(${c},${p},${h},${nt(d,l)})`,qe(d,0)]:c=>[`${u}(${c.map(p=>nt(p,l)).join(",")})`,qe(c,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new Xi(s,r)),super(i)}},Xi=class extends on{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return b(this.inputs,(n,i)=>{const s=O(n[0]),[r,a]=this.transforms[i](o.arr(s)?s:n.map(O));e+=" "+r,t=t&&a}),t?"none":e}observerAdded(e){e==1&&b(this.inputs,t=>b(t,n=>N(n)&&fe(n,this)))}observerRemoved(e){e==0&&b(this.inputs,t=>b(t,n=>N(n)&&Re(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Pe(this,e)}},Yi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];L.assign({batchedUpdates:$n.unstable_batchedUpdates,createStringInterpolator:ln,colors:Hn});var es=Ai(Yi,{applyAnimatedValues:Bi,createAnimatedStyle:e=>new Ji(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),ts=es.animated;exports.animated=ts;exports.config=_n;exports.useSpring=$i;exports.useSprings=On;exports.useTransition=Ni;
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),M=require("../component-B1mkowwk.cjs"),T=require("../generics-DE1oV0MV.cjs"),y=require("../classes-HsjFV5aN.cjs"),n=require("../types-DevrYOgX.cjs"),f=require("react"),F=require("../web-yC_cLoAC.cjs"),N=require("../useClickOutsideDOM-Dd6ewH8B.cjs"),b=require("../component-D-EEi7NI.cjs"),_=require("../component-Bh3EPTN0.cjs"),a=require("../generics-9F1CmKPb.cjs"),w=require("../react-spring_web.modern-W3Nkoq_6.cjs"),P=require("../component-D_igOAz3.cjs"),V=require("../component-BbvCmqLI.cjs"),h=require("../values-C40_Fyfk.cjs"),$=require("../UIcon-B5rpDmHC.cjs"),Z="_ul_5jv7w_1",G="_li_5jv7w_5",z={ul:Z,li:G},R={[n.DropdownPositions.Top]:{from:{y:-10},enter:{y:-1},leave:{y:-10}},[n.DropdownPositions.Bottom]:{from:{y:10},enter:{y:-1},leave:{y:10}}},J=({dropdownHeightStyle:e,isOpen:t,dropdownPosition:s,position:o,selectState:i,children:l})=>{switch(e){case n.DropdownHeightStyles.Default:return r.jsx(B,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:s,position:o,selectState:i,children:l});case n.DropdownHeightStyles.AutoHeight:return r.jsx(X,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:s,position:o,selectState:i,children:l});default:return r.jsx(B,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:s,position:o,selectState:i,children:l})}},B=({isOpen:e,dropdownPosition:t,position:s,children:o})=>w.useTransition(e,{from:{opacity:0,...R[t].from},enter:{opacity:1,...R[t].enter},leave:{opacity:0,...R[t].leave}})((l,c)=>c&&r.jsx(P.F__Ul,{style:{...l,transformOrigin:t===n.DropdownPositions.Top?"bottom center":t===n.DropdownPositions.Bottom?"top center":s<0?"bottom center":"top center"},className:z.ul,children:o})),X=({isOpen:e,dropdownPosition:t,position:s,children:o})=>w.useTransition(e,{from:{opacity:0,scaleY:0},enter:{opacity:1,scaleY:1},leave:{opacity:0,scaleY:.5},config(l,c,d){return d==="leave"?{duration:100}:w.config.default}})((l,c)=>c&&r.jsx(P.F__Ul,{style:{...l,transformOrigin:t===n.DropdownPositions.Top?"bottom center":t===n.DropdownPositions.Bottom?"top center":s<0?"bottom center":"top center"},className:z.ul,children:o})),K=({handleSelectItem:e,id:t,idx:s,children:o,colorSet:i})=>{const[l,c]=w.useSpring(()=>({backgroundColor:h.COLOR_VALUES[T.ColorPalettes.Grey2]}));return r.jsx(V.F__Li,{className:z.li,paddingTop:a.Spacings.Size1,paddingBottom:a.Spacings.Size1,paddingLeft:a.Spacings.Size2,paddingRight:a.Spacings.Size2,marginTop:a.Spacings.Size0,style:{listStyle:"none",cursor:"pointer",userSelect:"none",...l},onMouseEnter:()=>{c.start({backgroundColor:h.COLOR_VALUES[h.ColorRanges[i][0]+2]})},onMouseLeave:()=>{c.start({backgroundColor:h.COLOR_VALUES[T.ColorPalettes.Grey2]})},onMouseDown:()=>{c.start({backgroundColor:h.COLOR_VALUES[h.ColorRanges[i][0]+3]})},onClick:()=>e(t,s),children:o})},Q=(e,t)=>{const[s,o]=f.useState(null);f.useEffect(()=>{const l=()=>{o({width:window?window.innerWidth:0,height:window?window.innerHeight:0})};return window&&window.addEventListener("resize",l),()=>{window&&window.removeEventListener("resize",l)}},[]);const i=e.height+10;return s&&i+e.top>s.height?-1:1},ee=({isSelectOpen:e,selectOptions:t,handleSelectItem:s,selectState:o,dropdownHeightStyle:i,dropdownPosition:l=n.DropdownPositions.Bottom,colorSet:c,headerHeight:d,w:m})=>{const[v,x]=F.useMeasure(),C=Q(x),g=C>0?d-1:-x.height;return r.jsx(b.Container,{ref:v,borderRadius:n.SELECT_STATES[o].dropdown.borderRadius,borderBottomLeftRadius:a.Radiuses.Size0,borderBottomRightRadius:a.Radiuses.Size0,borderWidth:n.SELECT_STATES[o].header.borderWidth,borderColor:n.SELECT_STATES[o].header.borderColor,style:{maxHeight:250,width:m,overflowY:"scroll",position:"absolute",transform:`translateY(${g}px)`,overscrollBehaviorY:"none"},children:r.jsx(J,{dropdownHeightStyle:i,isOpen:e,dropdownPosition:l,selectState:o,position:C,children:t.map((u,E)=>r.jsx(K,{handleSelectItem:s,id:u.id,idx:E,colorSet:c,children:r.jsx(b.Container,{paddingTop:a.Spacings.Size1,paddingBottom:a.Spacings.Size1,paddingLeft:a.Spacings.Size2,paddingRight:a.Spacings.Size2,children:r.jsx(_.Text_Span,{children:u.text})})},u.id))})})},te=({selectedValues:e,doubleZero:t,title:s,selectedValueStyles:o=n.SelectedValuesStyles.Text,sizes:i=n.SelectSizes.Medium})=>(e.length===1&&e[0].text,e.length<1?r.jsx(oe,{sizes:i,title:s}):o===n.SelectedValuesStyles.Text?r.jsx(r.Fragment,{children:e.map((l,c)=>r.jsx(_.Text_Span,{fontSize:n.SELECT_SIZES[i].font.size,children:l.text},c))}):r.jsx(r.Fragment,{children:e.map((l,c)=>r.jsx(_.Text_Span,{fontSize:n.SELECT_SIZES[i].font.size,children:l.text},c))})),oe=({title:e,sizes:t})=>r.jsx(_.Text_Span,{fontSize:n.SELECT_SIZES[t].font.size,children:e}),ne=({setOpenDropdown:e,openDropdown:t,title:s,doubleZero:o,selectState:i,selectedValues:l,selectedValueStyles:c,sizes:d=n.SelectSizes.Medium})=>r.jsx(b.Container,{style:{cursor:"pointer"},paddingTop:a.Spacings.Size1,paddingBottom:a.Spacings.Size1,paddingLeft:a.Spacings.Size2,paddingRight:a.Spacings.Size2,borderRadius:n.SELECT_STATES[i].header.borderRadius,borderWidth:n.SELECT_STATES[i].header.borderWidth,borderColor:n.SELECT_STATES[i].header.borderColor,borderTopLeftRadius:t?a.Radiuses.Size0:void 0,borderTopRightRadius:t?a.Radiuses.Size0:void 0,bgColor:n.SELECT_STATES[i].header.bgColor,onClick:()=>e(m=>!m),children:r.jsxs(M.Layout,{display:y.Displays.Flex,flexAlignItem:y.FlexAlignItems.Center,flexJustifyContent:y.FlexJustifyContents.SpaceBetween,children:[r.jsx(te,{sizes:d,selectedValues:l,doubleZero:o,title:s,selectedValueStyles:c}),r.jsx("div",{className:"icon",children:r.jsx(re,{isSelectOpen:t,sizes:d})})]})}),re=({isSelectOpen:e,sizes:t,cursor:s=a.Cursors.Pointer})=>{const o=w.useSpring({rotateX:e?180:0});return r.jsx(b.Container,{style:o,children:r.jsx($.UIcon,{name:"chevron-down",colorLight:T.ColorPalettes.Grey5,colorDark:T.ColorPalettes.Grey5,size:n.SELECT_SIZES[t].icon.size,cursor:s})})};function se(e,t){switch(t.type){case"field":return{...e,[t.field]:t.value};case"select":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((s,o)=>t.value===o?{...s,selected:!0}:{...s,selected:!1}),openDropdown:!1,selectState:n.SelectStates.Selected};case"open":return{...e,openDropdown:!0};case"close":return{...e,openDropdown:!1};case"open-close":return{...e,openDropdown:!e.openDropdown};case"parent-update-selected":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((s,o)=>({...s,selected:o===t.value}))};default:return e}}const ie=({id:e,title:t,options:s,selectedIdx:o=null,w:i=225,doubleZero:l=!1,required:c=!1,dropdownHeightStyle:d=n.DropdownHeightStyles.AutoHeight,state:m=n.SelectStates.Default,selectedValuesStyle:v=n.SelectedValuesStyles.Text,colorSet:x=T.ColorSets.Primarys,dropdownPosition:C=n.DropdownPositions.Bottom,setSelectedIdx:g,setInput:u})=>{const[E,k]=f.useState(!1),[H,p]=f.useReducer(se,{selectState:m,openDropdown:!1,selectedItemIdx:o,selectOptions:s}),{openDropdown:D,selectedItemIdx:j,selectOptions:L,selectState:A}=H;f.useEffect(()=>{k(!0),typeof o=="number"&&(g&&g(o),u&&u(S=>({...S,[e]:s[o]})))},[]),f.useEffect(()=>{typeof o=="number"&&p({type:"parent-update-selected",value:o})},[o]),f.useEffect(()=>{c&&E&&!D&&p(typeof j=="number"&&j!==-1?{type:"field",field:"selectState",value:n.SelectStates.Default}:{type:"field",field:"selectState",value:n.SelectStates.Error})},[E,D,c,j]);const I=(S,O)=>{p({type:"select",value:O}),g&&g(O),u&&u(Y=>({...Y,[S]:L[O]}))},W=N.useClickOutsideDOM(()=>{p({type:"close"})}),[U,q]=F.useMeasure();return r.jsxs(M.Layout,{ref:W,display:y.Displays.Flex,flexDirection:y.FlexDirections.Column,style:{width:i,maxWidth:i},children:[r.jsx("div",{ref:U,children:r.jsx(ne,{w:i,setOpenDropdown:()=>p({type:"open-close"}),selectState:A,setSelectState:S=>p({type:"field",field:"selectState",value:S}),openDropdown:D,title:t,doubleZero:l,selectedValues:L.filter(S=>S.selected===!0),selectedValueStyles:v,options:s})}),r.jsx(ee,{isSelectOpen:D,closeSelect:()=>p({type:"close"}),selectOptions:L,handleSelectItem:I,selectState:A,dropdownHeightStyle:d,dropdownPosition:C,colorSet:x,headerHeight:q.height,w:q.width})]})};exports.SelectSpring=ie;
@@ -0,0 +1,70 @@
1
+ import { FC } from 'react';
2
+
3
+ declare enum ColorSets {
4
+ Transparents = 1,
5
+ Greys = 2,
6
+ Primarys = 3,
7
+ Secondarys = 4,
8
+ Reds = 5,
9
+ Greens = 6,
10
+ Blues = 7,
11
+ Yellows = 8,
12
+ Accents1 = 9,
13
+ Accents2 = 10
14
+ }
15
+
16
+ /**
17
+ * border styles - has border | no border - dont include here
18
+ * dont do too many border styles - its confusing
19
+ * dropdown styles
20
+ */
21
+ declare enum DropdownHeightStyles {
22
+ Default = 1,
23
+ AutoHeight = 2
24
+ }
25
+
26
+ declare enum DropdownPositions {
27
+ Top = 1,
28
+ Bottom = 2
29
+ }
30
+
31
+ declare interface P {
32
+ id: string | number;
33
+ title: string;
34
+ options: SelectOption[];
35
+ selectedIdx?: number | null;
36
+ w?: number;
37
+ doubleZero?: boolean;
38
+ required?: boolean;
39
+ dropdownHeightStyle?: DropdownHeightStyles;
40
+ state?: SelectStates;
41
+ selectedValuesStyle?: SelectedValuesStyles;
42
+ colorSet?: ColorSets;
43
+ dropdownPosition?: DropdownPositions;
44
+ setSelectedIdx: (idx: number) => void;
45
+ setInput?: (a: any) => void;
46
+ }
47
+
48
+ declare enum SelectedValuesStyles {
49
+ Text = 1,
50
+ Chip = 2
51
+ }
52
+
53
+ declare interface SelectOption {
54
+ id: string | number;
55
+ text: string;
56
+ selected: boolean;
57
+ }
58
+
59
+ export declare const SelectSpring: FC<P>;
60
+
61
+ declare enum SelectStates {
62
+ Default = 1,
63
+ Selected = 2,
64
+ Error = 3,
65
+ Disabled = 4,
66
+ ReadOnly = 5,
67
+ Required = 6
68
+ }
69
+
70
+ export { }
@@ -0,0 +1,471 @@
1
+ "use client";
2
+ import { jsx as n, Fragment as Y, jsxs as I } from "react/jsx-runtime";
3
+ import { L as G } from "../component-DRXQXr2G.js";
4
+ import { C as T, a as oe } from "../generics-D33J7ILI.js";
5
+ import { j as ne, h as ie, b as U, i as se } from "../classes-CVxy1f4M.js";
6
+ import { D as M, a as p, b as m, c as J, e as A, S as z, d as C } from "../types-Bh_j-nXM.js";
7
+ import { useState as Z, useEffect as D, useReducer as ae } from "react";
8
+ import { u as V } from "../web-B_p0FWHf.js";
9
+ import { u as le } from "../useClickOutsideDOM-CBmttEFU.js";
10
+ import { C as R } from "../component-C1Gs4nVu.js";
11
+ import { T as O } from "../component-BvHdlcdE.js";
12
+ import { S as l, R as x, C as de } from "../generics-C-WSPclF.js";
13
+ import { d as X, c as ce, u as $ } from "../react-spring_web.modern-DgQDaJ06.js";
14
+ import { F as K } from "../component-D5nxKQnT.js";
15
+ import { F as ue } from "../component-DCHO9d6d.js";
16
+ import { a as v, c as N } from "../values-CSE3dLnv.js";
17
+ import { U as pe } from "../UIcon-BHzbeYWw.js";
18
+ const fe = "_ul_5jv7w_1", me = "_li_5jv7w_5", W = {
19
+ ul: fe,
20
+ li: me
21
+ }, F = {
22
+ [p.Top]: {
23
+ from: { y: -10 },
24
+ enter: { y: -1 },
25
+ leave: { y: -10 }
26
+ },
27
+ [p.Bottom]: {
28
+ from: { y: 10 },
29
+ enter: { y: -1 },
30
+ leave: { y: 10 }
31
+ }
32
+ }, he = ({
33
+ dropdownHeightStyle: e,
34
+ isOpen: t,
35
+ dropdownPosition: o,
36
+ position: r,
37
+ selectState: i,
38
+ children: s
39
+ }) => {
40
+ switch (e) {
41
+ case M.Default:
42
+ return /* @__PURE__ */ n(
43
+ j,
44
+ {
45
+ dropdownHeightStyle: e,
46
+ isOpen: t,
47
+ dropdownPosition: o,
48
+ position: r,
49
+ selectState: i,
50
+ children: s
51
+ }
52
+ );
53
+ case M.AutoHeight:
54
+ return /* @__PURE__ */ n(
55
+ Se,
56
+ {
57
+ dropdownHeightStyle: e,
58
+ isOpen: t,
59
+ dropdownPosition: o,
60
+ position: r,
61
+ selectState: i,
62
+ children: s
63
+ }
64
+ );
65
+ default:
66
+ return /* @__PURE__ */ n(
67
+ j,
68
+ {
69
+ dropdownHeightStyle: e,
70
+ isOpen: t,
71
+ dropdownPosition: o,
72
+ position: r,
73
+ selectState: i,
74
+ children: s
75
+ }
76
+ );
77
+ }
78
+ }, j = ({
79
+ isOpen: e,
80
+ dropdownPosition: t,
81
+ // dropdownHeightStyle,
82
+ // hasSelect,
83
+ position: o,
84
+ children: r
85
+ }) => X(e, {
86
+ from: {
87
+ opacity: 0,
88
+ ...F[t].from
89
+ },
90
+ enter: {
91
+ opacity: 1,
92
+ ...F[t].enter
93
+ },
94
+ leave: {
95
+ opacity: 0,
96
+ ...F[t].leave
97
+ }
98
+ })(
99
+ (s, a) => a && /* @__PURE__ */ n(
100
+ K,
101
+ {
102
+ style: {
103
+ ...s,
104
+ transformOrigin: t === p.Top ? "bottom center" : t === p.Bottom ? "top center" : o < 0 ? "bottom center" : "top center"
105
+ },
106
+ className: W.ul,
107
+ children: r
108
+ }
109
+ )
110
+ ), Se = ({
111
+ isOpen: e,
112
+ // dropdownHeightStyle,
113
+ // hasSelect,
114
+ dropdownPosition: t,
115
+ position: o,
116
+ children: r
117
+ }) => X(e, {
118
+ from: {
119
+ opacity: 0,
120
+ scaleY: 0
121
+ },
122
+ enter: {
123
+ opacity: 1,
124
+ scaleY: 1
125
+ },
126
+ leave: {
127
+ opacity: 0,
128
+ scaleY: 0.5
129
+ },
130
+ config(s, a, d) {
131
+ return d === "leave" ? { duration: 100 } : ce.default;
132
+ }
133
+ })(
134
+ (s, a) => a && /* @__PURE__ */ n(
135
+ K,
136
+ {
137
+ style: {
138
+ ...s,
139
+ transformOrigin: t === p.Top ? "bottom center" : t === p.Bottom ? "top center" : o < 0 ? "bottom center" : "top center"
140
+ },
141
+ className: W.ul,
142
+ children: r
143
+ }
144
+ )
145
+ ), ge = ({
146
+ handleSelectItem: e,
147
+ id: t,
148
+ idx: o,
149
+ children: r,
150
+ colorSet: i
151
+ }) => {
152
+ const [s, a] = $(() => ({
153
+ backgroundColor: v[T.Grey2]
154
+ // same as SelectHeader bgColor
155
+ }));
156
+ return /* @__PURE__ */ n(
157
+ ue,
158
+ {
159
+ className: W.li,
160
+ paddingTop: l.Size1,
161
+ paddingBottom: l.Size1,
162
+ paddingLeft: l.Size2,
163
+ paddingRight: l.Size2,
164
+ marginTop: l.Size0,
165
+ style: {
166
+ listStyle: "none",
167
+ cursor: "pointer",
168
+ userSelect: "none",
169
+ ...s
170
+ },
171
+ onMouseEnter: () => {
172
+ a.start({
173
+ backgroundColor: v[N[i][0] + 2]
174
+ });
175
+ },
176
+ onMouseLeave: () => {
177
+ a.start({ backgroundColor: v[T.Grey2] });
178
+ },
179
+ onMouseDown: () => {
180
+ a.start({
181
+ backgroundColor: v[N[i][0] + 3]
182
+ });
183
+ },
184
+ onClick: () => e(t, o),
185
+ children: r
186
+ }
187
+ );
188
+ }, ye = (e, t) => {
189
+ const [o, r] = Z(null);
190
+ D(() => {
191
+ const s = () => {
192
+ r({
193
+ width: window ? window.innerWidth : 0,
194
+ height: window ? window.innerHeight : 0
195
+ });
196
+ };
197
+ return window && window.addEventListener("resize", s), () => {
198
+ window && window.removeEventListener("resize", s);
199
+ };
200
+ }, []);
201
+ const i = e.height + 10;
202
+ return o && i + e.top > o.height ? -1 : 1;
203
+ }, we = ({
204
+ isSelectOpen: e,
205
+ selectOptions: t,
206
+ handleSelectItem: o,
207
+ selectState: r,
208
+ dropdownHeightStyle: i,
209
+ dropdownPosition: s = p.Bottom,
210
+ colorSet: a,
211
+ headerHeight: d,
212
+ w: S
213
+ // closeSelect,
214
+ }) => {
215
+ const [L, g] = V(), y = ye(g), h = y > 0 ? d - 1 : -g.height;
216
+ return /* @__PURE__ */ n(
217
+ R,
218
+ {
219
+ ref: L,
220
+ borderRadius: m[r].dropdown.borderRadius,
221
+ borderBottomLeftRadius: x.Size0,
222
+ borderBottomRightRadius: x.Size0,
223
+ borderWidth: m[r].header.borderWidth,
224
+ borderColor: m[r].header.borderColor,
225
+ style: {
226
+ maxHeight: 250,
227
+ width: S,
228
+ overflowY: "scroll",
229
+ position: "absolute",
230
+ transform: `translateY(${h}px)`,
231
+ overscrollBehaviorY: "none"
232
+ },
233
+ children: /* @__PURE__ */ n(
234
+ he,
235
+ {
236
+ dropdownHeightStyle: i,
237
+ isOpen: e,
238
+ dropdownPosition: s,
239
+ selectState: r,
240
+ position: y,
241
+ children: t.map((c, w) => /* @__PURE__ */ n(
242
+ ge,
243
+ {
244
+ handleSelectItem: o,
245
+ id: c.id,
246
+ idx: w,
247
+ colorSet: a,
248
+ children: /* @__PURE__ */ n(
249
+ R,
250
+ {
251
+ paddingTop: l.Size1,
252
+ paddingBottom: l.Size1,
253
+ paddingLeft: l.Size2,
254
+ paddingRight: l.Size2,
255
+ children: /* @__PURE__ */ n(O, { children: c.text })
256
+ }
257
+ )
258
+ },
259
+ c.id
260
+ ))
261
+ }
262
+ )
263
+ }
264
+ );
265
+ }, be = ({
266
+ selectedValues: e,
267
+ doubleZero: t,
268
+ title: o,
269
+ selectedValueStyles: r = A.Text,
270
+ sizes: i = J.Medium
271
+ }) => (e.length === 1 && e[0].text, e.length < 1 ? /* @__PURE__ */ n(ve, { sizes: i, title: o }) : r === A.Text ? /* @__PURE__ */ n(Y, { children: e.map((s, a) => /* @__PURE__ */ n(O, { fontSize: z[i].font.size, children: s.text }, a)) }) : (
272
+ // @todo_20240503_1350("chip")
273
+ /* @__PURE__ */ n(Y, { children: e.map((s, a) => /* @__PURE__ */ n(O, { fontSize: z[i].font.size, children: s.text }, a)) })
274
+ )), ve = ({ title: e, sizes: t }) => /* @__PURE__ */ n(O, { fontSize: z[t].font.size, children: e }), Ce = ({
275
+ // w,
276
+ setOpenDropdown: e,
277
+ openDropdown: t,
278
+ title: o,
279
+ doubleZero: r,
280
+ selectState: i,
281
+ // selectedItemIdx,
282
+ selectedValues: s,
283
+ selectedValueStyles: a,
284
+ sizes: d = J.Medium
285
+ }) => /* @__PURE__ */ n(
286
+ R,
287
+ {
288
+ style: { cursor: "pointer" },
289
+ paddingTop: l.Size1,
290
+ paddingBottom: l.Size1,
291
+ paddingLeft: l.Size2,
292
+ paddingRight: l.Size2,
293
+ borderRadius: m[i].header.borderRadius,
294
+ borderWidth: m[i].header.borderWidth,
295
+ borderColor: m[i].header.borderColor,
296
+ borderTopLeftRadius: t ? x.Size0 : void 0,
297
+ borderTopRightRadius: t ? x.Size0 : void 0,
298
+ bgColor: m[i].header.bgColor,
299
+ onClick: () => e((S) => !S),
300
+ children: /* @__PURE__ */ I(
301
+ G,
302
+ {
303
+ display: U.Flex,
304
+ flexAlignItem: ie.Center,
305
+ flexJustifyContent: ne.SpaceBetween,
306
+ children: [
307
+ /* @__PURE__ */ n(
308
+ be,
309
+ {
310
+ sizes: d,
311
+ selectedValues: s,
312
+ doubleZero: r,
313
+ title: o,
314
+ selectedValueStyles: a
315
+ }
316
+ ),
317
+ /* @__PURE__ */ n("div", { className: "icon", children: /* @__PURE__ */ n(De, { isSelectOpen: t, sizes: d }) })
318
+ ]
319
+ }
320
+ )
321
+ }
322
+ ), De = ({
323
+ isSelectOpen: e,
324
+ sizes: t,
325
+ cursor: o = de.Pointer
326
+ }) => {
327
+ const r = $({
328
+ rotateX: e ? 180 : 0
329
+ });
330
+ return (
331
+ // @todo_20241105_1045("tech debt")
332
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
333
+ // @ts-expect-error
334
+ /* @__PURE__ */ n(R, { style: r, children: /* @__PURE__ */ n(
335
+ pe,
336
+ {
337
+ name: "chevron-down",
338
+ colorLight: T.Grey5,
339
+ colorDark: T.Grey5,
340
+ size: z[t].icon.size,
341
+ cursor: o
342
+ }
343
+ ) })
344
+ );
345
+ };
346
+ function Te(e, t) {
347
+ switch (t.type) {
348
+ case "field":
349
+ return { ...e, [t.field]: t.value };
350
+ case "select":
351
+ return {
352
+ ...e,
353
+ selectedItemIdx: t.value,
354
+ selectOptions: e.selectOptions.map(
355
+ (o, r) => t.value === r ? { ...o, selected: !0 } : { ...o, selected: !1 }
356
+ ),
357
+ openDropdown: !1,
358
+ selectState: C.Selected
359
+ };
360
+ case "open":
361
+ return { ...e, openDropdown: !0 };
362
+ case "close":
363
+ return { ...e, openDropdown: !1 };
364
+ case "open-close":
365
+ return { ...e, openDropdown: !e.openDropdown };
366
+ case "parent-update-selected":
367
+ return {
368
+ ...e,
369
+ selectedItemIdx: t.value,
370
+ selectOptions: e.selectOptions.map((o, r) => ({
371
+ ...o,
372
+ selected: r === t.value
373
+ }))
374
+ };
375
+ default:
376
+ return e;
377
+ }
378
+ }
379
+ const je = ({
380
+ id: e,
381
+ title: t,
382
+ options: o,
383
+ selectedIdx: r = null,
384
+ w: i = 225,
385
+ doubleZero: s = !1,
386
+ required: a = !1,
387
+ dropdownHeightStyle: d = M.AutoHeight,
388
+ state: S = C.Default,
389
+ selectedValuesStyle: L = A.Text,
390
+ colorSet: g = oe.Primarys,
391
+ dropdownPosition: y = p.Bottom,
392
+ setSelectedIdx: h,
393
+ setInput: c
394
+ }) => {
395
+ const [w, Q] = Z(!1), [q, u] = ae(Te, {
396
+ selectState: S,
397
+ openDropdown: !1,
398
+ selectedItemIdx: r,
399
+ selectOptions: o
400
+ }), { openDropdown: b, selectedItemIdx: _, selectOptions: B, selectState: k } = q;
401
+ D(() => {
402
+ Q(!0), typeof r == "number" && (h && h(r), c && c((f) => ({ ...f, [e]: o[r] })));
403
+ }, []), D(() => {
404
+ typeof r == "number" && u({ type: "parent-update-selected", value: r });
405
+ }, [r]), D(() => {
406
+ a && w && !b && u(typeof _ == "number" && _ !== -1 ? {
407
+ type: "field",
408
+ field: "selectState",
409
+ value: C.Default
410
+ } : {
411
+ type: "field",
412
+ field: "selectState",
413
+ value: C.Error
414
+ });
415
+ }, [w, b, a, _]);
416
+ const P = (f, E) => {
417
+ u({ type: "select", value: E }), h && h(E), c && c((re) => ({
418
+ ...re,
419
+ [f]: B[E]
420
+ }));
421
+ }, ee = le(() => {
422
+ u({ type: "close" });
423
+ }), [te, H] = V();
424
+ return (
425
+ // <div ref={nodeDOM}>
426
+ /* @__PURE__ */ I(
427
+ G,
428
+ {
429
+ ref: ee,
430
+ display: U.Flex,
431
+ flexDirection: se.Column,
432
+ style: { width: i, maxWidth: i },
433
+ children: [
434
+ /* @__PURE__ */ n("div", { ref: te, children: /* @__PURE__ */ n(
435
+ Ce,
436
+ {
437
+ w: i,
438
+ setOpenDropdown: () => u({ type: "open-close" }),
439
+ selectState: k,
440
+ setSelectState: (f) => u({ type: "field", field: "selectState", value: f }),
441
+ openDropdown: b,
442
+ title: t,
443
+ doubleZero: s,
444
+ selectedValues: B.filter((f) => f.selected === !0),
445
+ selectedValueStyles: L,
446
+ options: o
447
+ }
448
+ ) }),
449
+ /* @__PURE__ */ n(
450
+ we,
451
+ {
452
+ isSelectOpen: b,
453
+ closeSelect: () => u({ type: "close" }),
454
+ selectOptions: B,
455
+ handleSelectItem: P,
456
+ selectState: k,
457
+ dropdownHeightStyle: d,
458
+ dropdownPosition: y,
459
+ colorSet: g,
460
+ headerHeight: H.height,
461
+ w: H.width
462
+ }
463
+ )
464
+ ]
465
+ }
466
+ )
467
+ );
468
+ };
469
+ export {
470
+ je as SelectSpring
471
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),l=require("../react-spring_web.modern-W3Nkoq_6.cjs"),c=require("../component-D-EEi7NI.cjs"),r={horizontal:{from:{x:10},enter:{x:0},leave:{x:-10}},vertical:{from:{y:10},enter:{y:0},leave:{y:-10}},verticalInverted:{from:{y:-10},enter:{y:0},leave:{y:10}}},y=({direction:e,isShown:t=!0,children:i})=>{const o=l.useTransition(t,{from:{...r[e].from,opacity:0,display:"none"},enter:{...r[e].enter,opacity:1,display:"block"},leave:{...r[e].leave,opacity:0,display:"none"}});return n.jsx(n.Fragment,{children:o((a,s)=>s&&n.jsx(c.Container,{style:{...a,height:"inherit",width:"inherit",overflow:"hidden"},children:i}))})};exports.SpringEnter=y;