@lifesg/react-design-system 1.0.0-alpha.21 → 1.0.0-alpha.23

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 (125) hide show
  1. package/accordion/index.js +5 -5
  2. package/accordion/index.js.map +1 -1
  3. package/alert/index.js +23 -23
  4. package/alert/index.js.map +1 -1
  5. package/animations/index.d.ts +1 -0
  6. package/animations/index.js +3 -4
  7. package/animations/index.js.map +1 -1
  8. package/animations/loading-dots/loading-dots.d.ts +2 -1
  9. package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -1
  10. package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -1
  11. package/animations/loading-spinner/loading-spinner.d.ts +2 -1
  12. package/animations/types.d.ts +10 -0
  13. package/box-container/index.js +18 -18
  14. package/box-container/index.js.map +1 -1
  15. package/breadcrumb/index.js +3 -3
  16. package/breadcrumb/index.js.map +1 -1
  17. package/button/index.js +2 -2
  18. package/button/index.js.map +1 -1
  19. package/calendar/index.js +57 -57
  20. package/calendar/index.js.map +1 -1
  21. package/card/index.js +1 -1
  22. package/card/index.js.map +1 -1
  23. package/checkbox/index.js +3 -3
  24. package/checkbox/index.js.map +1 -1
  25. package/cjs/index.js +704 -238
  26. package/cjs/index.js.map +1 -1
  27. package/color/index.js +1 -1
  28. package/color/index.js.map +1 -1
  29. package/color/types.d.ts +1 -0
  30. package/date-input/index.js +5 -3
  31. package/date-input/index.js.map +1 -1
  32. package/design-token/index.js +6 -4
  33. package/design-token/index.js.map +1 -1
  34. package/design-token/types.d.ts +1 -0
  35. package/error-display/index.js +38 -38
  36. package/error-display/index.js.map +1 -1
  37. package/feedback-rating/index.js +118 -118
  38. package/feedback-rating/index.js.map +1 -1
  39. package/filter/addons/filter-item-checkbox.d.ts +3 -0
  40. package/filter/addons/filter-item-checkbox.styles.d.ts +12 -0
  41. package/filter/filter-context.d.ts +7 -0
  42. package/filter/filter-item-page.d.ts +3 -0
  43. package/filter/filter-item-page.styles.d.ts +1 -0
  44. package/filter/filter-item.d.ts +3 -0
  45. package/filter/filter-item.styles.d.ts +26 -0
  46. package/filter/filter.d.ts +7 -0
  47. package/filter/filter.styles.d.ts +17 -0
  48. package/filter/index.d.ts +2 -0
  49. package/filter/index.js +696 -0
  50. package/filter/index.js.map +1 -0
  51. package/filter/package.json +7 -0
  52. package/filter/types.d.ts +49 -0
  53. package/footer/index.js +5 -5
  54. package/footer/index.js.map +1 -1
  55. package/form/index.js +52 -50
  56. package/form/index.js.map +1 -1
  57. package/icon-button/index.js +1 -1
  58. package/icon-button/index.js.map +1 -1
  59. package/index.d.ts +3 -0
  60. package/index.js +701 -235
  61. package/index.js.map +1 -1
  62. package/input/index.js +7 -5
  63. package/input/index.js.map +1 -1
  64. package/input-group/index.js +5 -3
  65. package/input-group/index.js.map +1 -1
  66. package/input-select/index.js +8 -6
  67. package/input-select/index.js.map +1 -1
  68. package/input-textarea/index.js +4 -2
  69. package/input-textarea/index.js.map +1 -1
  70. package/link-list/index.js +1 -1
  71. package/link-list/index.js.map +1 -1
  72. package/modal/index.js +4 -4
  73. package/modal/index.js.map +1 -1
  74. package/navbar/brand.d.ts +5 -4
  75. package/navbar/brand.styles.d.ts +2 -0
  76. package/navbar/index.js +267 -129
  77. package/navbar/index.js.map +1 -1
  78. package/navbar/menu.d.ts +10 -0
  79. package/navbar/menu.styles.d.ts +5 -0
  80. package/navbar/navbar-items.styles.d.ts +7 -0
  81. package/navbar/navbar.styles.d.ts +4 -2
  82. package/navbar/types.d.ts +13 -5
  83. package/notification-banner/index.js +1 -1
  84. package/notification-banner/index.js.map +1 -1
  85. package/otp-input/index.js +8 -6
  86. package/otp-input/index.js.map +1 -1
  87. package/otp-input/otp-input.d.ts +1 -1
  88. package/otp-input/types.d.ts +5 -5
  89. package/overlay/index.js +1 -1
  90. package/overlay/index.js.map +1 -1
  91. package/package.json +1 -1
  92. package/phone-number-input/index.js +16 -14
  93. package/phone-number-input/index.js.map +1 -1
  94. package/popover/index.js +2 -2
  95. package/popover/index.js.map +1 -1
  96. package/progress-indicator/index.js +1 -1
  97. package/progress-indicator/index.js.map +1 -1
  98. package/radio-button/index.js +4 -4
  99. package/radio-button/index.js.map +1 -1
  100. package/shared/toggle-icon/toggle-icon.d.ts +9 -0
  101. package/shared/toggle-icon/toggle-icon.styles.d.ts +6 -0
  102. package/smart-app-banner/index.js +6 -6
  103. package/smart-app-banner/index.js.map +1 -1
  104. package/text/index.js +2 -2
  105. package/text/index.js.map +1 -1
  106. package/text-list/index.js +1 -1
  107. package/text-list/index.js.map +1 -1
  108. package/timeline/index.js +19 -19
  109. package/timeline/index.js.map +1 -1
  110. package/timepicker/index.js +23 -21
  111. package/timepicker/index.js.map +1 -1
  112. package/toggle/index.d.ts +2 -0
  113. package/toggle/index.js +230 -0
  114. package/toggle/index.js.map +1 -0
  115. package/toggle/package.json +7 -0
  116. package/toggle/toggle.d.ts +3 -0
  117. package/toggle/toggle.styles.d.ts +18 -0
  118. package/toggle/types.d.ts +30 -0
  119. package/toggle-button/index.js +22 -22
  120. package/toggle-button/index.js.map +1 -1
  121. package/toggle-button/toggle-button.d.ts +3 -0
  122. package/tooltip/index.js +1 -1
  123. package/tooltip/index.js.map +1 -1
  124. package/unit-number/index.js +10 -8
  125. package/unit-number/index.js.map +1 -1
@@ -1,4 +1,4 @@
1
- import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i from"react";import o,{useEffect as a,useLayoutEffect as s,useState as l,useRef as c,forwardRef as u,useCallback as d,useContext as h,useMemo as p}from"react";import{unstable_batchedUpdates as f}from"react-dom";import g,{keyframes as m,css as y}from"styled-components";var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var b=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var w=function(){this.__data__=[],this.size=0};var _=function(e,t){return e===t||e!=e&&t!=t},S=_;var x=function(e,t){for(var n=e.length;n--;)if(S(e[n][0],t))return n;return-1},$=x,C=Array.prototype.splice;var k=x;var F=x;var j=x;var O=w,B=function(e){var t=this.__data__,n=$(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),--this.size,!0)},A=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},I=function(e){return F(this.__data__,e)>-1},P=function(e,t){var n=this.__data__,r=j(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=O,z.prototype.delete=B,z.prototype.get=A,z.prototype.has=I,z.prototype.set=P;var D=z,E=D;var H=function(){this.__data__=new E,this.size=0};var M=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var N=function(e){return this.__data__.get(e)};var T=function(e){return this.__data__.has(e)},L="object"==typeof v&&v&&v.Object===Object&&v,V=L,R="object"==typeof self&&self&&self.Object===Object&&self,W=V||R||Function("return this")(),q=W.Symbol,U=q,Q=Object.prototype,Z=Q.hasOwnProperty,G=Q.toString,X=U?U.toStringTag:void 0;var K=function(e){var t=Z.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var i=G.call(e);return r&&(t?e[X]=n:delete e[X]),i},Y=Object.prototype.toString;var J=K,ee=function(e){return Y.call(e)},te=q?q.toStringTag:void 0;var ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?J(e):ee(e)};var re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ie=ne,oe=re;var ae,se=function(e){if(!oe(e))return!1;var t=ie(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},le=W["__core-js_shared__"],ce=(ae=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||""))?"Symbol(src)_1."+ae:"";var ue=function(e){return!!ce&&ce in e},de=Function.prototype.toString;var he=function(e){if(null!=e){try{return de.call(e)}catch(e){}try{return e+""}catch(e){}}return""},pe=se,fe=ue,ge=re,me=he,ye=/^\[object .+?Constructor\]$/,ve=Function.prototype,be=Object.prototype,we=ve.toString,_e=be.hasOwnProperty,Se=RegExp("^"+we.call(_e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!ge(e)||fe(e))&&(pe(e)?Se:ye).test(me(e))},$e=function(e,t){return null==e?void 0:e[t]};var Ce=function(e,t){var n=$e(e,t);return xe(n)?n:void 0},ke=Ce(W,"Map"),Fe=Ce(Object,"create"),je=Fe;var Oe=function(){this.__data__=je?je(null):{},this.size=0};var Be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ae=Fe,Ie=Object.prototype.hasOwnProperty;var Pe=function(e){var t=this.__data__;if(Ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ie.call(t,e)?t[e]:void 0},ze=Fe,De=Object.prototype.hasOwnProperty;var Ee=Fe;var He=Oe,Me=Be,Ne=Pe,Te=function(e){var t=this.__data__;return ze?void 0!==t[e]:De.call(t,e)},Le=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ee&&void 0===t?"__lodash_hash_undefined__":t,this};function Ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ve.prototype.clear=He,Ve.prototype.delete=Me,Ve.prototype.get=Ne,Ve.prototype.has=Te,Ve.prototype.set=Le;var Re=Ve,We=D,qe=ke;var Ue=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Qe=function(e,t){var n=e.__data__;return Ue(t)?n["string"==typeof t?"string":"hash"]:n.map},Ze=Qe;var Ge=Qe;var Xe=Qe;var Ke=Qe;var Ye=function(){this.size=0,this.__data__={hash:new Re,map:new(qe||We),string:new Re}},Je=function(e){var t=Ze(this,e).delete(e);return this.size-=t?1:0,t},et=function(e){return Ge(this,e).get(e)},tt=function(e){return Xe(this,e).has(e)},nt=function(e,t){var n=Ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function rt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rt.prototype.clear=Ye,rt.prototype.delete=Je,rt.prototype.get=et,rt.prototype.has=tt,rt.prototype.set=nt;var it=rt,ot=D,at=ke,st=it;var lt=D,ct=H,ut=M,dt=N,ht=T,pt=function(e,t){var n=this.__data__;if(n instanceof ot){var r=n.__data__;if(!at||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new st(r)}return n.set(e,t),this.size=n.size,this};function ft(e){var t=this.__data__=new lt(e);this.size=t.size}ft.prototype.clear=ct,ft.prototype.delete=ut,ft.prototype.get=dt,ft.prototype.has=ht,ft.prototype.set=pt;var gt=ft;var mt=it,yt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},vt=function(e){return this.__data__.has(e)};function bt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new mt;++t<n;)this.add(e[t])}bt.prototype.add=bt.prototype.push=yt,bt.prototype.has=vt;var wt=bt,_t=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},St=function(e,t){return e.has(t)};var xt=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new wt:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var f=e[d],g=t[d];if(r)var m=a?r(g,f,d,t,e,o):r(f,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(p){if(!_t(t,(function(e,t){if(!St(p,t)&&(f===e||i(f,e,n,r,o)))return p.push(t)}))){h=!1;break}}else if(f!==g&&!i(f,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var $t=W.Uint8Array,Ct=_,kt=xt,Ft=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},jt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ot=q?q.prototype:void 0,Bt=Ot?Ot.valueOf:void 0;var At=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new $t(e),new $t(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ct(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ft;case"[object Set]":var l=1&r;if(s||(s=jt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=kt(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(Bt)return Bt.call(e)==Bt.call(t)}return!1};var It=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Pt=Array.isArray,zt=It,Dt=Pt;var Et=function(e,t,n){var r=t(e);return Dt(e)?r:zt(r,n(e))};var Ht=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},Mt=function(){return[]},Nt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,Lt=Tt?function(e){return null==e?[]:(e=Object(e),Ht(Tt(e),(function(t){return Nt.call(e,t)})))}:Mt;var Vt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Rt=function(e){return null!=e&&"object"==typeof e},Wt=ne,qt=Rt;var Ut=function(e){return qt(e)&&"[object Arguments]"==Wt(e)},Qt=Rt,Zt=Object.prototype,Gt=Zt.hasOwnProperty,Xt=Zt.propertyIsEnumerable,Kt=Ut(function(){return arguments}())?Ut:function(e){return Qt(e)&&Gt.call(e,"callee")&&!Xt.call(e,"callee")},Yt={exports:{}};var Jt=function(){return!1};!function(e,t){var n=W,r=Jt,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(Yt,Yt.exports);var en=/^(?:0|[1-9]\d*)$/;var tn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&en.test(e))&&e>-1&&e%1==0&&e<t};var nn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},rn=ne,on=nn,an=Rt,sn={};sn["[object Float32Array]"]=sn["[object Float64Array]"]=sn["[object Int8Array]"]=sn["[object Int16Array]"]=sn["[object Int32Array]"]=sn["[object Uint8Array]"]=sn["[object Uint8ClampedArray]"]=sn["[object Uint16Array]"]=sn["[object Uint32Array]"]=!0,sn["[object Arguments]"]=sn["[object Array]"]=sn["[object ArrayBuffer]"]=sn["[object Boolean]"]=sn["[object DataView]"]=sn["[object Date]"]=sn["[object Error]"]=sn["[object Function]"]=sn["[object Map]"]=sn["[object Number]"]=sn["[object Object]"]=sn["[object RegExp]"]=sn["[object Set]"]=sn["[object String]"]=sn["[object WeakMap]"]=!1;var ln=function(e){return an(e)&&on(e.length)&&!!sn[rn(e)]};var cn=function(e){return function(t){return e(t)}},un={exports:{}};!function(e,t){var n=L,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(un,un.exports);var dn=ln,hn=cn,pn=un.exports,fn=pn&&pn.isTypedArray,gn=fn?hn(fn):dn,mn=Vt,yn=Kt,vn=Pt,bn=Yt.exports,wn=tn,_n=gn,Sn=Object.prototype.hasOwnProperty;var xn=function(e,t){var n=vn(e),r=!n&&yn(e),i=!n&&!r&&bn(e),o=!n&&!r&&!i&&_n(e),a=n||r||i||o,s=a?mn(e.length,String):[],l=s.length;for(var c in e)!t&&!Sn.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wn(c,l))||s.push(c);return s},$n=Object.prototype;var Cn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$n)};var kn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Fn=Cn,jn=kn,On=Object.prototype.hasOwnProperty;var Bn=se,An=nn;var In=xn,Pn=function(e){if(!Fn(e))return jn(e);var t=[];for(var n in Object(e))On.call(e,n)&&"constructor"!=n&&t.push(n);return t},zn=function(e){return null!=e&&An(e.length)&&!Bn(e)};var Dn=function(e){return zn(e)?In(e):Pn(e)},En=Et,Hn=Lt,Mn=Dn;var Nn=function(e){return En(e,Mn,Hn)},Tn=Object.prototype.hasOwnProperty;var Ln=function(e,t,n,r,i,o){var a=1&n,s=Nn(e),l=s.length;if(l!=Nn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Tn.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p},Vn=Ce(W,"DataView"),Rn=ke,Wn=Ce(W,"Promise"),qn=Ce(W,"Set"),Un=Ce(W,"WeakMap"),Qn=ne,Zn=he,Gn=Zn(Vn),Xn=Zn(Rn),Kn=Zn(Wn),Yn=Zn(qn),Jn=Zn(Un),er=Qn;(Vn&&"[object DataView]"!=er(new Vn(new ArrayBuffer(1)))||Rn&&"[object Map]"!=er(new Rn)||Wn&&"[object Promise]"!=er(Wn.resolve())||qn&&"[object Set]"!=er(new qn)||Un&&"[object WeakMap]"!=er(new Un))&&(er=function(e){var t=Qn(e),n="[object Object]"==t?e.constructor:void 0,r=n?Zn(n):"";if(r)switch(r){case Gn:return"[object DataView]";case Xn:return"[object Map]";case Kn:return"[object Promise]";case Yn:return"[object Set]";case Jn:return"[object WeakMap]"}return t});var tr=gt,nr=xt,rr=At,ir=Ln,or=er,ar=Pt,sr=Yt.exports,lr=gn,cr="[object Object]",ur=Object.prototype.hasOwnProperty;var dr=function(e,t,n,r,i,o){var a=ar(e),s=ar(t),l=a?"[object Array]":or(e),c=s?"[object Array]":or(t),u=(l="[object Arguments]"==l?cr:l)==cr,d=(c="[object Arguments]"==c?cr:c)==cr,h=l==c;if(h&&sr(e)){if(!sr(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new tr),a||lr(e)?nr(e,t,n,r,i,o):rr(e,t,l,n,r,i,o);if(!(1&n)){var p=u&&ur.call(e,"__wrapped__"),f=d&&ur.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return o||(o=new tr),i(g,m,n,r,o)}}return!!h&&(o||(o=new tr),ir(e,t,n,r,i,o))},hr=Rt;var pr=function e(t,n,r,i,o){return t===n||(null==t||null==n||!hr(t)&&!hr(n)?t!=t&&n!=n:dr(t,n,r,i,e,o))},fr=gt,gr=pr;var mr=re;var yr=function(e){return e==e&&!mr(e)},vr=yr,br=Dn;var wr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},_r=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new fr;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?gr(u,c,3,r,d):h))return!1}}return!0},Sr=function(e){for(var t=br(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vr(i)]}return t},xr=wr;var $r=function(e){var t=Sr(e);return 1==t.length&&t[0][2]?xr(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}},Cr=ne,kr=Rt;var Fr=function(e){return"symbol"==typeof e||kr(e)&&"[object Symbol]"==Cr(e)},jr=Pt,Or=Fr,Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ar=/^\w*$/;var Ir=function(e,t){if(jr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Or(e))||(Ar.test(e)||!Br.test(e)||null!=t&&e in Object(t))},Pr=it;function zr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zr.Cache||Pr),n}zr.Cache=Pr;var Dr=zr;var Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hr=/\\(\\)?/g,Mr=function(e){var t=Dr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Er,(function(e,n,r,i){t.push(r?i.replace(Hr,"$1"):n||e)})),t}));var Nr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Tr=Pt,Lr=Fr,Vr=q?q.prototype:void 0,Rr=Vr?Vr.toString:void 0;var Wr=function e(t){if("string"==typeof t)return t;if(Tr(t))return Nr(t,e)+"";if(Lr(t))return Rr?Rr.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},qr=Wr;var Ur=Pt,Qr=Ir,Zr=Mr,Gr=function(e){return null==e?"":qr(e)};var Xr=function(e,t){return Ur(e)?e:Qr(e,t)?[e]:Zr(Gr(e))},Kr=Fr;var Yr=function(e){if("string"==typeof e||Kr(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Jr=Xr,ei=Yr;var ti=function(e,t){for(var n=0,r=(t=Jr(t,e)).length;null!=e&&n<r;)e=e[ei(t[n++])];return n&&n==r?e:void 0},ni=ti;var ri=function(e,t,n){var r=null==e?void 0:ni(e,t);return void 0===r?n:r};var ii=Xr,oi=Kt,ai=Pt,si=tn,li=nn,ci=Yr;var ui=function(e,t){return null!=e&&t in Object(e)},di=function(e,t,n){for(var r=-1,i=(t=ii(t,e)).length,o=!1;++r<i;){var a=ci(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&li(i)&&si(a,i)&&(ai(e)||oi(e))};var hi=pr,pi=ri,fi=function(e,t){return null!=e&&di(e,t,ui)},gi=Ir,mi=yr,yi=wr,vi=Yr;var bi=ti;var wi=function(e){return function(t){return null==t?void 0:t[e]}},_i=function(e){return function(t){return bi(t,e)}},Si=Ir,xi=Yr;var $i=$r,Ci=function(e,t){return gi(e)&&mi(t)?yi(vi(e),t):function(n){var r=pi(n,e);return void 0===r&&r===t?fi(n,e):hi(t,r,3)}},ki=function(e){return e},Fi=Pt,ji=function(e){return Si(e)?wi(xi(e)):_i(e)};var Oi=/\s/;var Bi=function(e){for(var t=e.length;t--&&Oi.test(e.charAt(t)););return t},Ai=/^\s+/;var Ii=function(e){return e?e.slice(0,Bi(e)+1).replace(Ai,""):e},Pi=re,zi=Fr,Di=/^[-+]0x[0-9a-f]+$/i,Ei=/^0b[01]+$/i,Hi=/^0o[0-7]+$/i,Mi=parseInt;var Ni=function(e){if("number"==typeof e)return e;if(zi(e))return NaN;if(Pi(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Pi(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ii(e);var n=Ei.test(e);return n||Hi.test(e)?Mi(e.slice(2),n?2:8):Di.test(e)?NaN:+e};var Ti=function(e){return e?Infinity===(e=Ni(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var Li=b,Vi=function(e){return"function"==typeof e?e:null==e?ki:"object"==typeof e?Fi(e)?Ci(e[0],e[1]):$i(e):ji(e)},Ri=function(e){var t=Ti(e),n=t%1;return t==t?n?t-n:t:0},Wi=Math.max;var qi=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ri(n);return i<0&&(i=Wi(r+i,0)),Li(e,Vi(t),i)};let Ui=lo();const Qi=e=>io(e,Ui);let Zi=lo();Qi.write=e=>io(e,Zi);let Gi=lo();Qi.onStart=e=>io(e,Gi);let Xi=lo();Qi.onFrame=e=>io(e,Xi);let Ki=lo();Qi.onFinish=e=>io(e,Ki);let Yi=[];Qi.setTimeout=(e,t)=>{let n=Qi.now()+t,r=()=>{let e=Yi.findIndex((e=>e.cancel==r));~e&&Yi.splice(e,1),no-=~e?1:0},i={time:n,handler:e,cancel:r};return Yi.splice(Ji(n),0,i),no+=1,oo(),i};let Ji=e=>~(~Yi.findIndex((t=>t.time>e))||~Yi.length);Qi.cancel=e=>{Gi.delete(e),Xi.delete(e),Ki.delete(e),Ui.delete(e),Zi.delete(e)},Qi.sync=e=>{ro=!0,Qi.batchedUpdates(e),ro=!1},Qi.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Qi.onStart(n)}return r.handler=e,r.cancel=()=>{Gi.delete(n),t=null},r};let eo="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Qi.use=e=>eo=e,Qi.now="undefined"!=typeof performance?()=>performance.now():Date.now,Qi.batchedUpdates=e=>e(),Qi.catch=console.error,Qi.frameLoop="always",Qi.advance=()=>{"demand"!==Qi.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):so()};let to=-1,no=0,ro=!1;function io(e,t){ro?(t.delete(e),e(0)):(t.add(e),oo())}function oo(){to<0&&(to=0,"demand"!==Qi.frameLoop&&eo(ao))}function ao(){~to&&(eo(ao),Qi.batchedUpdates(so))}function so(){let e=to;to=Qi.now();let t=Ji(to);t&&(co(Yi.splice(0,t),(e=>e.handler())),no-=t),no?(Gi.flush(),Ui.flush(e?Math.min(64,to-e):16.667),Xi.flush(),Zi.flush(),Ki.flush()):to=-1}function lo(){let e=new Set,t=e;return{add(n){no+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(no-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,no-=t.size,co(t,(t=>t(n)&&e.add(t))),no+=e.size,t=e)}}}function co(e,t){e.forEach((e=>{try{t(e)}catch(e){Qi.catch(e)}}))}function uo(){}const ho={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function po(e,t){if(ho.arr(e)){if(!ho.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}const fo=(e,t)=>e.forEach(t);function go(e,t,n){if(ho.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}const mo=e=>ho.und(e)?[]:ho.arr(e)?e:[e];function yo(e,t){if(e.size){const n=Array.from(e);e.clear(),fo(n,t)}}const vo=(e,...t)=>yo(e,(e=>e(...t))),bo=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let wo,_o,So=null,xo=!1,$o=uo;var Co=Object.freeze({__proto__:null,get createStringInterpolator(){return wo},get to(){return _o},get colors(){return So},get skipAnimation(){return xo},get willAdvance(){return $o},assign:e=>{e.to&&(_o=e.to),e.now&&(Qi.now=e.now),void 0!==e.colors&&(So=e.colors),null!=e.skipAnimation&&(xo=e.skipAnimation),e.createStringInterpolator&&(wo=e.createStringInterpolator),e.requestAnimationFrame&&Qi.use(e.requestAnimationFrame),e.batchedUpdates&&(Qi.batchedUpdates=e.batchedUpdates),e.willAdvance&&($o=e.willAdvance),e.frameLoop&&(Qi.frameLoop=e.frameLoop)}});const ko=new Set;let Fo=[],jo=[],Oo=0;const Bo={get idle(){return!ko.size&&!Fo.length},start(e){Oo>e.priority?(ko.add(e),Qi.onStart(Ao)):(Io(e),Qi(zo))},advance:zo,sort(e){if(Oo)Qi.onFrame((()=>Bo.sort(e)));else{const t=Fo.indexOf(e);~t&&(Fo.splice(t,1),Po(e))}},clear(){Fo=[],ko.clear()}};function Ao(){ko.forEach(Io),ko.clear(),Qi(zo)}function Io(e){Fo.includes(e)||Po(e)}function Po(e){Fo.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Fo,(t=>t.priority>e.priority)),0,e)}function zo(e){const t=jo;for(let n=0;n<Fo.length;n++){const r=Fo[n];Oo=r.priority,r.idle||($o(r),r.advance(e),r.idle||t.push(r))}return Oo=0,jo=Fo,jo.length=0,Fo=t,Fo.length>0}const Do="[-+]?\\d*\\.?\\d+";function Eo(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Ho=new RegExp("rgb"+Eo(Do,Do,Do)),Mo=new RegExp("rgba"+Eo(Do,Do,Do,Do)),No=new RegExp("hsl"+Eo(Do,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),To=new RegExp("hsla"+Eo(Do,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Do)),Lo=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Vo=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ro=/^#([0-9a-fA-F]{6})$/,Wo=/^#([0-9a-fA-F]{8})$/;function qo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Uo(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=qo(i,r,e+1/3),a=qo(i,r,e),s=qo(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Qo(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Zo(e){return(parseFloat(e)%360+360)%360/360}function Go(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Xo(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ko(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ro.exec(e))?parseInt(t[1]+"ff",16)>>>0:So&&void 0!==So[e]?So[e]:(t=Ho.exec(e))?(Qo(t[1])<<24|Qo(t[2])<<16|Qo(t[3])<<8|255)>>>0:(t=Mo.exec(e))?(Qo(t[1])<<24|Qo(t[2])<<16|Qo(t[3])<<8|Go(t[4]))>>>0:(t=Lo.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Wo.exec(e))?parseInt(t[1],16)>>>0:(t=Vo.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=No.exec(e))?(255|Uo(Zo(t[1]),Xo(t[2]),Xo(t[3])))>>>0:(t=To.exec(e))?(Uo(Zo(t[1]),Xo(t[2]),Xo(t[3]))|Go(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Yo=(e,t,n)=>{if(ho.fun(e))return e;if(ho.arr(e))return Yo({range:e,output:t,extrapolate:n});if(ho.str(e.output[0]))return wo(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}};function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(this,arguments)}const ea=Symbol.for("FluidValue.get"),ta=Symbol.for("FluidValue.observers"),na=e=>Boolean(e&&e[ea]),ra=e=>e&&e[ea]?e[ea]():e,ia=e=>e[ta]||null;function oa(e,t){let n=e[ta];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class aa{constructor(e){if(this[ea]=void 0,this[ta]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");sa(this,e)}}const sa=(e,t)=>ua(e,ea,t);function la(e,t){if(e[ea]){let n=e[ta];n||ua(e,ta,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ca(e,t){let n=e[ta];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ta]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const ua=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),da=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ha=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pa=new RegExp(`(${da.source})(%|[a-z]+)`,"i"),fa=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ga=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ma=e=>{const[t,n]=ya(e);if(!t||bo())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&ga.test(n)?ma(n):n||e},ya=e=>{const t=ga.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let va;const ba=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,wa=e=>{va||(va=So?new RegExp(`(${Object.keys(So).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ra(e).replace(ga,ma).replace(ha,Ko).replace(va,Ko))),n=t.map((e=>e.match(da).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Yo(Jo({},e,{output:t}))));return e=>{var n;const i=!pa.test(t[0])&&(null==(n=t.find((e=>pa.test(e))))?void 0:n.replace(da,""));let o=0;return t[0].replace(da,(()=>`${r[o++](e)}${i||""}`)).replace(fa,ba)}},_a="react-spring: ",Sa=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${_a}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},xa=Sa(console.warn);const $a=Sa(console.warn);function Ca(e){return ho.str(e)&&("#"==e[0]||/\d/.test(e)||!bo()&&ga.test(e)||e in(So||{}))}const ka=bo()?a:s;function Fa(){const e=l()[1],t=(()=>{const e=c(!1);return ka((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const ja=e=>a(e,Oa),Oa=[];function Ba(e){const t=c();return a((()=>{t.current=e})),t.current}const Aa=Symbol.for("Animated:node"),Ia=e=>e&&e[Aa],Pa=(e,t)=>{return n=e,r=Aa,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},za=e=>e&&e[Aa]&&e[Aa].getPayload();class Da{constructor(){this.payload=void 0,Pa(this,this)}getPayload(){return this.payload||[]}}class Ea extends Da{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,ho.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ea(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ho.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ho.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class Ha extends Ea{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Yo({output:[e,e]})}static create(e){return new Ha(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(ho.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Yo({output:[this.getValue(),e]})),this._value=0,super.reset()}}const Ma={dependencies:null};class Na extends Da{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return go(this.source,((n,r)=>{var i;(i=n)&&i[Aa]===i?t[r]=n.getValue(e):na(n)?t[r]=ra(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&fo(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return go(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ma.dependencies&&na(e)&&Ma.dependencies.add(e);const t=za(e);t&&fo(t,(e=>this.add(e)))}}class Ta extends Na{constructor(e){super(e)}static create(e){return new Ta(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(La)),!0)}}function La(e){return(Ca(e)?Ha:Ea).create(e)}function Va(e){const t=Ia(e);return t?t.constructor:ho.arr(e)?Ta:Ca(e)?Ha:Ea}function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ra.apply(this,arguments)}const Wa=(e,t)=>{const n=!ho.fun(e)||e.prototype&&e.prototype.isReactComponent;return u(((r,o)=>{const s=c(null),l=n&&d((e=>{s.current=function(e,t){e&&(ho.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[u,h]=function(e,t){const n=new Set;Ma.dependencies=n,e.style&&(e=Ra({},e,{style:t.createAnimatedStyle(e.style)}));return e=new Na(e),Ma.dependencies=null,[e,n]}(r,t),p=Fa(),f=()=>{const e=s.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,u.getValue(!0)))&&p()},g=new qa(f,h),m=c();ka((()=>(m.current=g,fo(h,(e=>la(e,g))),()=>{m.current&&(fo(m.current.deps,(e=>ca(e,m.current))),Qi.cancel(m.current.update))}))),a(f,[]),ja((()=>()=>{const e=m.current;fo(e.deps,(t=>ca(t,e)))}));const y=t.getComponentProps(u.getValue());return i.createElement(e,Ra({},y,{ref:l}))}))};class qa{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Qi.write(this.update)}}const Ua=Symbol.for("AnimatedComponent"),Qa=e=>ho.str(e)?e:e&&ho.str(e.displayName)?e.displayName:ho.fun(e)&&e.name||null;function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(this,arguments)}function Ga(e,...t){return ho.fun(e)?e(...t):e}const Xa=(e,t)=>!0===e||!!(t&&e&&(ho.fun(e)?e(t):mo(e).includes(t))),Ka=(e,t)=>ho.obj(e)?t&&e[t]:e,Ya=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ja=e=>e,es=(e,t=Ja)=>{let n=ts;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);ho.und(n)||(r[i]=n)}return r},ts=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ns={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 rs(e){const t=function(e){const t={};let n=0;if(go(e,((e,r)=>{ns[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return go(e,((e,r)=>r in t||(n[r]=e))),n}return Za({},e)}function is(e){return e=ra(e),ho.arr(e)?e.map(is):Ca(e)?Co.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function os(e){for(const t in e)return!0;return!1}function as(e){return ho.fun(e)||ho.arr(e)&&ho.obj(e[0])}function ss(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function ls(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const cs=1.70158,us=1.525*cs,ds=2*Math.PI/3,hs=2*Math.PI/4.5,ps=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},fs=Za({},{tension:170,friction:26},{mass:1,damping:1,easing:{linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>2.70158*e*e*e-cs*e*e,easeOutBack:e=>1+2.70158*Math.pow(e-1,3)+cs*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-us)/2:(Math.pow(2*e-2,2)*((us+1)*(2*e-2)+us)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ds),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ds)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*hs)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*hs)/2+1,easeInBounce:e=>1-ps(1-e),easeOutBounce:ps,easeInOutBounce:e=>e<.5?(1-ps(1-2*e))/2:(1+ps(2*e-1))/2}.linear,clamp:!1});class gs{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,fs)}}function ms(e,t){if(ho.und(t.decay)){const n=!ho.und(t.tension)||!ho.und(t.friction);!n&&ho.und(t.frequency)&&ho.und(t.damping)&&ho.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const ys=[];class vs{constructor(){this.changed=!1,this.values=ys,this.toValues=null,this.fromValues=ys,this.to=void 0,this.from=void 0,this.config=new gs,this.immediate=!1}}function bs(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise(((a,s)=>{var l;let c,u,d=Xa(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(d)f();else{ho.und(n.pause)||(i.paused=Xa(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||Xa(e,t)),c=Ga(n.delay||0,t),e?(i.resumeQueue.add(p),o.pause()):(o.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(u),u.cancel(),c=u.time-Qi.now()}function p(){c>0&&!Co.skipAnimation?(i.delayed=!0,u=Qi.setTimeout(f,c),i.pauseQueue.add(h),i.timeouts.add(u)):f()}function f(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(u),e<=(i.cancelId||0)&&(d=!0);try{o.start(Za({},n,{callId:e,cancel:d}),a)}catch(e){s(e)}}}))}const ws=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?xs(e.get()):t.every((e=>e.noop))?_s(e.get()):Ss(e.get(),t.every((e=>e.finished))),_s=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ss=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),xs=e=>({value:e,cancelled:!0,finished:!1});function $s(e,t,n,r){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=es(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const h=new Promise(((e,t)=>(u=e,d=t))),p=e=>{const t=i<=(n.cancelId||0)&&xs(r)||i!==n.asyncId&&Ss(r,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const o=new ks,a=new Fs;return(async()=>{if(Co.skipAnimation)throw Cs(n),a.result=Ss(r,!1),d(a),a;p(o);const s=ho.obj(e)?Za({},e):Za({},t,{to:e});s.parentId=i,go(c,((e,t)=>{ho.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return p(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let g;if(Co.skipAnimation)return Cs(n),Ss(r,!1);try{let t;t=ho.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(u),h]),g=Ss(r.get(),!0,!1)}catch(e){if(e instanceof ks)g=e.result;else{if(!(e instanceof Fs))throw e;g=e.result}}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return ho.fun(a)&&Qi.batchedUpdates((()=>{a(g,r,r.item)})),g})():l}function Cs(e,t){yo(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class ks 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."),this.result=void 0}}class Fs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const js=e=>e instanceof Bs;let Os=1;class Bs extends aa{constructor(...e){super(...e),this.id=Os++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ia(this);return e&&e.getValue()}to(...e){return Co.to(this,e)}interpolate(...e){return xa(`${_a}The "interpolate" function is deprecated in v9 (use "to" instead)`),Co.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){oa(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Bo.sort(this),oa(this,{type:"priority",parent:this,priority:e})}}const As=Symbol.for("SpringPhase"),Is=e=>(1&e[As])>0,Ps=e=>(2&e[As])>0,zs=e=>(4&e[As])>0,Ds=(e,t)=>t?e[As]|=3:e[As]&=-3,Es=(e,t)=>t?e[As]|=4:e[As]&=-5;class Hs extends Bs{constructor(e,t){if(super(),this.key=void 0,this.animation=new vs,this.queue=void 0,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,!ho.und(e)||!ho.und(t)){const n=ho.obj(e)?Za({},e):Za({},t,{from:e});ho.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ps(this)||this._state.asyncTo)||zs(this)}get goal(){return ra(this.animation.to)}get velocity(){const e=Ia(this);return e instanceof Ea?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Is(this)}get isAnimating(){return Ps(this)}get isPaused(){return zs(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:i,toValues:o}=r;const a=za(r.to);!a&&na(r.to)&&(o=mo(ra(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==Ha?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=ho.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const h=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(ho.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=h,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,l=!ho.und(r),p=n==c?s.v0>0:n<c;let f,g=!1;const m=1,y=Math.ceil(e/m);for(let e=0;e<y&&(f=Math.abs(a)>t,f||(u=Math.abs(c-d)<=h,!u));++e){l&&(g=d==c||d>c==p,g&&(a=-a*r,d=c));a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*m,d+=a*m}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)}));const s=Ia(this),l=s.getValue();if(t){const e=ra(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return Qi.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ps(this)){const{to:e,config:t}=this.animation;Qi.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 ho.und(e)?(n=this.queue||[],this.queue=[]):n=[ho.obj(e)?e:Za({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>ws(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Cs(this._state,e&&this._lastCallId),Qi.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ho.obj(n)?n[t]:n,(null==n||as(n))&&(n=void 0),r=ho.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return Is(this)||(e.reverse&&([n,r]=[r,n]),r=ra(r),ho.und(r)?Ia(this)||this._set(n):this._set(r)),i}_update(e,t){let n=Za({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,es(n,((e,t)=>/^on/.test(t)?Ka(e,r):e))),Ws(this,n,"onProps"),qs(this,"onProps",n,this);const o=this._prepareNode(n);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 a=this._state;return bs(++this._lastCallId,{key:r,props:n,defaultProps:i,state:a,actions:{pause:()=>{zs(this)||(Es(this,!0),vo(a.pauseQueue),qs(this,"onPause",Ss(this,Ms(this,this.animation.to)),this))},resume:()=>{zs(this)&&(Es(this,!1),Ps(this)&&this._resume(),vo(a.resumeQueue),qs(this,"onResume",Ss(this,Ms(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=Ns(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(xs(this));const r=!ho.und(e.to),i=!ho.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(xs(this));this._lastToId=t.callId}const{key:o,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!i||r||t.default&&!ho.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const h=!po(d,c);h&&(s.from=d),d=ra(d);const p=!po(u,l);p&&this._focus(u);const f=as(t.to),{config:g}=s,{decay:m,velocity:y}=g;(r||i)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(ms(n=Za({},n),t),t=Za({},n,t)),ms(e,t),Object.assign(e,t);for(const t in fs)null==e[t]&&(e[t]=fs[t]);let{mass:r,frequency:i,damping:o}=e;ho.und(i)||(i<.01&&(i=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*o*r/i)}(g,Ga(t.config,o),t.config!==a.config?Ga(a.config,o):void 0);let v=Ia(this);if(!v||ho.und(u))return n(Ss(this,!0));const b=ho.und(t.reset)?i&&!t.default:!ho.und(d)&&Xa(t.reset,o),w=b?d:this.get(),_=is(u),S=ho.num(_)||ho.arr(_)||Ca(_),x=!f&&(!S||Xa(a.immediate||t.immediate,o));if(p){const e=Va(u);if(e!==v.constructor){if(!x)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(_)}}const $=v.constructor;let C=na(u),k=!1;if(!C){const e=b||!Is(this)&&h;(p||e)&&(k=po(is(w),_),C=!k),(po(s.immediate,x)||x)&&po(g.decay,m)&&po(g.velocity,y)||(C=!0)}if(k&&Ps(this)&&(s.changed&&!b?C=!0:C||this._stop(l)),!f&&((C||na(l))&&(s.values=v.getPayload(),s.toValues=na(u)?null:$==Ha?[1]:mo(_)),s.immediate!=x&&(s.immediate=x,x||b||this._set(l)),C)){const{onRest:e}=s;fo(Rs,(e=>Ws(this,t,e)));const r=Ss(this,Ms(this,l));vo(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&Qi.batchedUpdates((()=>{s.changed=!b,null==e||e(r,this),b?Ga(a.onRest,r):null==s.onStart||s.onStart(r,this)}))}b&&this._set(w),f?n($s(t.to,t,this._state,this)):C?this._start():Ps(this)&&!p?this._pendingCalls.add(n):n(_s(w))}_focus(e){const t=this.animation;e!==t.to&&(ia(this)&&this._detach(),t.to=e,ia(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;na(t)&&(la(t,this),js(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;na(e)&&ca(e,this)}_set(e,t=!0){const n=ra(e);if(!ho.und(n)){const e=Ia(this);if(!e||!po(n,e.getValue())){const r=Va(n);e&&e.constructor==r?e.setValue(n):Pa(this,r.create(n)),e&&Qi.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ia(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,qs(this,"onStart",Ss(this,Ms(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ga(this.animation.onChange,e,this)),Ga(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ia(this).reset(ra(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Ps(this)||(Ds(this,!0),zs(this)||this._resume())}_resume(){Co.skipAnimation?this.finish():Bo.start(this)}_stop(e,t){if(Ps(this)){Ds(this,!1);const n=this.animation;fo(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),oa(this,{type:"idle",parent:this});const r=t?xs(this.get()):Ss(this.get(),Ms(this,null!=e?e:n.to));vo(this._pendingCalls,r),n.changed&&(n.changed=!1,qs(this,"onRest",r,this))}}}function Ms(e,t){const n=is(t);return po(is(e.get()),n)}function Ns(e,t=e.loop,n=e.to){let r=Ga(t);if(r){const i=!0!==r&&rs(r),o=(i||e).reverse,a=!i||i.reset;return Ts(Za({},e,{loop:t,default:!1,pause:void 0,to:!o||as(n)?n:void 0,from:a?e.from:void 0,reset:a},i))}}function Ts(e){const{to:t,from:n}=e=rs(e),r=new Set;return ho.obj(t)&&Vs(t,r),ho.obj(n)&&Vs(n,r),e.keys=r.size?Array.from(r):null,e}function Ls(e){const t=Ts(e);return ho.und(t.default)&&(t.default=es(t)),t}function Vs(e,t){go(e,((e,n)=>null!=e&&t.add(n)))}const Rs=["onStart","onRest","onChange","onPause","onResume"];function Ws(e,t,n){e.animation[n]=t[n]!==Ya(t,n)?Ka(t[n],e.key):void 0}function qs(e,t,...n){var r,i,o,a;null==(r=(i=e.animation)[t])||r.call(i,...n),null==(o=(a=e.defaultProps)[t])||o.call(a,...n)}const Us=["onStart","onChange","onRest"];let Qs=1;class Zs{constructor(e,t){this.id=Qs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,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(Za({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];ho.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ts(e)),this}start(e){let{queue:t}=this;return e?t=mo(e).map(Ts):this.queue=[],this._flush?this._flush(this,t):(tl(this,t),Gs(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;fo(mo(t),(t=>n[t].stop(!!e)))}else Cs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(ho.und(e))this.start({pause:!0});else{const t=this.springs;fo(mo(e),(e=>t[e].pause()))}return this}resume(e){if(ho.und(e))this.start({pause:!1});else{const t=this.springs;fo(mo(e),(e=>t[e].resume()))}return this}each(e){go(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,yo(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&yo(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),o&&(this._started=!1,yo(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Qi.onFrame(this._onFrame)}}function Gs(e,t){return Promise.all(t.map((t=>Xs(e,t)))).then((t=>ws(e,t)))}async function Xs(e,t,n){const{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,c=ho.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);const u=ho.arr(i)||ho.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):fo(Us,(n=>{const r=t[n];if(ho.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,vo(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Ya(t,"cancel");(u||p&&d.asyncId)&&h.push(bs(++e._lastAsyncId,{props:t,state:d,actions:{pause:uo,resume:uo,start(t,n){p?(Cs(d,e._lastAsyncId),n(xs(e))):(t.onRest=s,n($s(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=ws(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){const n=Ns(t,a,i);if(n)return tl(e,[n]),Xs(e,n,!0)}return l&&Qi.batchedUpdates((()=>l(f,e,e.item))),f}function Ks(e,t){const n=Za({},e.springs);return t&&fo(mo(t),(e=>{ho.und(e.keys)&&(e=Ts(e)),ho.obj(e.to)||(e=Za({},e,{to:void 0})),el(n,e,(e=>Js(e)))})),Ys(e,n),n}function Ys(e,t){go(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,la(t,e))}))}function Js(e,t){const n=new Hs;return n.key=e,t&&la(n,t),n}function el(e,t,n){t.keys&&fo(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function tl(e,t){fo(t,(t=>{el(e.springs,t,(t=>Js(t,e)))}))}const nl=["children"],rl=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,nl);const r=h(il),o=n.pause||!!r.pause,s=n.immediate||!!r.immediate;n=function(e,t){const[n]=l((()=>({inputs:t,result:e()}))),r=c(),i=r.current;let o=i;o?Boolean(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.inputs))||(o={inputs:t,result:e()}):o=n;return a((()=>{r.current=o,i==n&&(n.inputs=n.result=void 0)}),[o]),o.result}((()=>({pause:o,immediate:s})),[o,s]);const{Provider:u}=il;return i.createElement(u,{value:n},t)},il=(ol=rl,al={},Object.assign(ol,i.createContext(al)),ol.Provider._context=ol,ol.Consumer._context=ol,ol);var ol,al;rl.Provider=il.Provider,rl.Consumer=il.Consumer;const sl=()=>{const e=[],t=function(t){$a(`${_a}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`);const r=[];return fo(e,((e,i)=>{if(ho.und(t))r.push(e.start());else{const o=n(t,e,i);o&&r.push(e.start(o))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return fo(e,(e=>e.pause(...arguments))),this},t.resume=function(){return fo(e,(e=>e.resume(...arguments))),this},t.set=function(t){fo(e,(e=>e.set(t)))},t.start=function(t){const n=[];return fo(e,((e,r)=>{if(ho.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return fo(e,(e=>e.stop(...arguments))),this},t.update=function(t){return fo(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return ho.fun(e)?e(n,t):e};return t._getProps=n,t};function ll(e,t,n){const r=ho.fun(t)&&t;r&&!n&&(n=[]);const i=p((()=>r||3==arguments.length?sl():void 0),[]),o=c(0),a=Fa(),s=p((()=>({ctrls:[],queue:[],flush(e,t){const n=Ks(e,t);return o.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Gs(e,t):new Promise((r=>{Ys(e,n),s.queue.push((()=>{r(Gs(e,t))})),a()}))}})),[]),l=c([...s.ctrls]),u=[],d=Ba(e)||0;function f(e,n){for(let i=e;i<n;i++){const e=l.current[i]||(l.current[i]=new Zs(null,s.flush)),n=r?r(i,e):t[i];n&&(u[i]=Ls(n))}}p((()=>{fo(l.current.slice(e,d),(e=>{ss(e,i),e.stop(!0)})),l.current.length=e,f(d,e)}),[e]),p((()=>{f(0,Math.min(d,e))}),n);const g=l.current.map(((e,t)=>Ks(e,u[t]))),m=h(rl),y=Ba(m),v=m!==y&&os(m);ka((()=>{o.current++,s.ctrls=l.current;const{queue:e}=s;e.length&&(s.queue=[],fo(e,(e=>e()))),fo(l.current,((e,t)=>{null==i||i.add(e),v&&e.start({default:m});const n=u[t];n&&(ls(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ja((()=>()=>{fo(s.ctrls,(e=>e.stop(!0)))}));const b=g.map((e=>Za({},e)));return i?[b,i]:b}let cl;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(cl||(cl={}));class ul extends Bs{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Yo(...t);const n=this._get(),r=Va(n);Pa(this,r.create(n))}advance(e){const t=this._get();po(t,this.get())||(Ia(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&hl(this._active)&&pl(this)}_get(){const e=ho.arr(this.source)?this.source.map(ra):mo(ra(this.source));return this.calc(...e)}_start(){this.idle&&!hl(this._active)&&(this.idle=!1,fo(za(this),(e=>{e.done=!1})),Co.skipAnimation?(Qi.batchedUpdates((()=>this.advance())),pl(this)):Bo.start(this))}_attach(){let e=1;fo(mo(this.source),(t=>{na(t)&&la(t,this),js(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){fo(mo(this.source),(e=>{na(e)&&ca(e,this)})),this._active.clear(),pl(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=mo(this.source).reduce(((e,t)=>Math.max(e,(js(t)?t.priority:0)+1)),0))}}function dl(e){return!1!==e.idle}function hl(e){return!e.size||Array.from(e).every(dl)}function pl(e){e.idle||(e.idle=!0,fo(za(e),(e=>{e.done=!0})),oa(e,{type:"idle",parent:e}))}function fl(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}Co.assign({createStringInterpolator:wa,to:(e,t)=>new ul(e,t)});const gl=["style","children","scrollTop","scrollLeft"],ml=/^--/;function yl(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||ml.test(e)||bl.hasOwnProperty(e)&&bl[e]?(""+t).trim():t+"px"}const vl={};let bl={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};const wl=["Webkit","Ms","Moz","O"];bl=Object.keys(bl).reduce(((e,t)=>(wl.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),bl);const _l=["x","y","z"],Sl=/^(matrix|translate|scale|rotate|skew)/,xl=/^(translate)/,$l=/^(rotate|skew)/,Cl=(e,t)=>ho.num(e)&&0!==e?e+t:e,kl=(e,t)=>ho.arr(e)?e.every((e=>kl(e,t))):ho.num(e)?e===t:parseFloat(e)===t;class Fl extends Na{constructor(e){let{x:t,y:n,z:r}=e,i=fl(e,_l);const o=[],a=[];(t||n||r)&&(o.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>Cl(e,"px"))).join(",")})`,kl(e,0)]))),go(i,((e,t)=>{if("transform"===t)o.push([e||""]),a.push((e=>[e,""===e]));else if(Sl.test(t)){if(delete i[t],ho.und(e))return;const n=xl.test(t)?"px":$l.test(t)?"deg":"";o.push(mo(e)),a.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Cl(i,n)})`,kl(i,0)]:e=>[`${t}(${e.map((e=>Cl(e,n))).join(",")})`,kl(e,t.startsWith("scale")?1:0)])}})),o.length&&(i.transform=new jl(o,a)),super(i)}}class jl extends aa{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return fo(this.inputs,((n,r)=>{const i=ra(n[0]),[o,a]=this.transforms[r](ho.arr(i)?i:n.map(ra));e+=" "+o,t=t&&a})),t?"none":e}observerAdded(e){1==e&&fo(this.inputs,(e=>fo(e,(e=>na(e)&&la(e,this)))))}observerRemoved(e){0==e&&fo(this.inputs,(e=>fo(e,(e=>na(e)&&ca(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),oa(this,e)}}const Ol=["scrollTop","scrollLeft"];Co.assign({batchedUpdates:f,createStringInterpolator:wa,colors:{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}});const Bl=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Na(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{const t=Qa(e)||"Anonymous";return(e=ho.str(e)?o[e]||(o[e]=Wa(e,i)):e[Ua]||(e[Ua]=Wa(e,i))).displayName=`Animated(${t})`,e};return go(e,((t,n)=>{ho.arr(e)&&(n=Qa(t)),o[n]=o(t)})),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,{style:i,children:o,scrollTop:a,scrollLeft:s}=r,l=fl(r,gl),c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:vl[t]||(vl[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){const n=yl(t,i[t]);ml.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Fl(e),getComponentProps:e=>fl(e,Ol)}),Al=Bl.animated,Il=(e,t,n)=>t?ri(n,t)||ri(e,t):n||e,Pl=(e,t)=>{const n=t||e.defaultValue;return ri(e.collections,n)};var zl;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme"}(zl||(zl={}));const Dl={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}}},defaultValue:"base"},El=e=>t=>{const n=t.theme,r=Pl(Dl,n[zl.colorScheme]);return n.options&&n.options.color?Il(r,e,n.options.color):Il(r,e)},Hl={Brand:{1:El("Brand.1"),2:El("Brand.2"),3:El("Brand.3"),4:El("Brand.4"),5:El("Brand.5"),6:El("Brand.6")},Primary:El("Primary"),PrimaryDark:El("PrimaryDark"),Secondary:El("Secondary"),Accent:{Light:{1:El("Accent.Light.1"),2:El("Accent.Light.2"),3:El("Accent.Light.3"),4:El("Accent.Light.4"),5:El("Accent.Light.5"),6:El("Accent.Light.6")},Dark:{1:El("Accent.Dark.1"),2:El("Accent.Dark.2"),3:El("Accent.Dark.3")}},Neutral:{1:El("Neutral.1"),2:El("Neutral.2"),3:El("Neutral.3"),4:El("Neutral.4"),5:El("Neutral.5"),6:El("Neutral.6"),7:El("Neutral.7"),8:El("Neutral.8")},Validation:{Green:{Text:El("Validation.Green.Text"),Icon:El("Validation.Green.Icon"),Border:El("Validation.Green.Border"),Background:El("Validation.Green.Background")},Orange:{Text:El("Validation.Orange.Text"),Icon:El("Validation.Orange.Icon"),Border:El("Validation.Orange.Border"),Background:El("Validation.Orange.Background"),Badge:El("Validation.Orange.Badge")},Red:{Text:El("Validation.Red.Text"),Icon:El("Validation.Red.Icon"),Border:El("Validation.Red.Border"),Background:El("Validation.Red.Background")}},Shadow:{Accent:El("Shadow.Accent"),Red:El("Shadow.Red")}},Ml={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},Nl=e=>Object.keys(Ml).reduce(((t,n)=>{const r=Ml[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),Tl=Nl("max-width"),Ll=(Nl("min-width"),g.div`
1
+ import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i from"react";import o,{useEffect as a,useLayoutEffect as s,useState as l,useRef as c,forwardRef as u,useCallback as d,useContext as h,useMemo as p}from"react";import{unstable_batchedUpdates as f}from"react-dom";import g,{keyframes as m,css as y}from"styled-components";var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var b=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var w=function(){this.__data__=[],this.size=0};var _=function(e,t){return e===t||e!=e&&t!=t},S=_;var x=function(e,t){for(var n=e.length;n--;)if(S(e[n][0],t))return n;return-1},$=x,C=Array.prototype.splice;var k=x;var F=x;var j=x;var O=w,B=function(e){var t=this.__data__,n=$(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),--this.size,!0)},A=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},I=function(e){return F(this.__data__,e)>-1},P=function(e,t){var n=this.__data__,r=j(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=O,z.prototype.delete=B,z.prototype.get=A,z.prototype.has=I,z.prototype.set=P;var E=z,D=E;var H=function(){this.__data__=new D,this.size=0};var M=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var N=function(e){return this.__data__.get(e)};var T=function(e){return this.__data__.has(e)},L="object"==typeof v&&v&&v.Object===Object&&v,V=L,R="object"==typeof self&&self&&self.Object===Object&&self,W=V||R||Function("return this")(),q=W.Symbol,U=q,Q=Object.prototype,Z=Q.hasOwnProperty,G=Q.toString,X=U?U.toStringTag:void 0;var K=function(e){var t=Z.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var i=G.call(e);return r&&(t?e[X]=n:delete e[X]),i},Y=Object.prototype.toString;var J=K,ee=function(e){return Y.call(e)},te=q?q.toStringTag:void 0;var ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?J(e):ee(e)};var re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ie=ne,oe=re;var ae,se=function(e){if(!oe(e))return!1;var t=ie(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},le=W["__core-js_shared__"],ce=(ae=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||""))?"Symbol(src)_1."+ae:"";var ue=function(e){return!!ce&&ce in e},de=Function.prototype.toString;var he=function(e){if(null!=e){try{return de.call(e)}catch(e){}try{return e+""}catch(e){}}return""},pe=se,fe=ue,ge=re,me=he,ye=/^\[object .+?Constructor\]$/,ve=Function.prototype,be=Object.prototype,we=ve.toString,_e=be.hasOwnProperty,Se=RegExp("^"+we.call(_e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!ge(e)||fe(e))&&(pe(e)?Se:ye).test(me(e))},$e=function(e,t){return null==e?void 0:e[t]};var Ce=function(e,t){var n=$e(e,t);return xe(n)?n:void 0},ke=Ce(W,"Map"),Fe=Ce(Object,"create"),je=Fe;var Oe=function(){this.__data__=je?je(null):{},this.size=0};var Be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ae=Fe,Ie=Object.prototype.hasOwnProperty;var Pe=function(e){var t=this.__data__;if(Ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ie.call(t,e)?t[e]:void 0},ze=Fe,Ee=Object.prototype.hasOwnProperty;var De=Fe;var He=Oe,Me=Be,Ne=Pe,Te=function(e){var t=this.__data__;return ze?void 0!==t[e]:Ee.call(t,e)},Le=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=De&&void 0===t?"__lodash_hash_undefined__":t,this};function Ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ve.prototype.clear=He,Ve.prototype.delete=Me,Ve.prototype.get=Ne,Ve.prototype.has=Te,Ve.prototype.set=Le;var Re=Ve,We=E,qe=ke;var Ue=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Qe=function(e,t){var n=e.__data__;return Ue(t)?n["string"==typeof t?"string":"hash"]:n.map},Ze=Qe;var Ge=Qe;var Xe=Qe;var Ke=Qe;var Ye=function(){this.size=0,this.__data__={hash:new Re,map:new(qe||We),string:new Re}},Je=function(e){var t=Ze(this,e).delete(e);return this.size-=t?1:0,t},et=function(e){return Ge(this,e).get(e)},tt=function(e){return Xe(this,e).has(e)},nt=function(e,t){var n=Ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function rt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rt.prototype.clear=Ye,rt.prototype.delete=Je,rt.prototype.get=et,rt.prototype.has=tt,rt.prototype.set=nt;var it=rt,ot=E,at=ke,st=it;var lt=E,ct=H,ut=M,dt=N,ht=T,pt=function(e,t){var n=this.__data__;if(n instanceof ot){var r=n.__data__;if(!at||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new st(r)}return n.set(e,t),this.size=n.size,this};function ft(e){var t=this.__data__=new lt(e);this.size=t.size}ft.prototype.clear=ct,ft.prototype.delete=ut,ft.prototype.get=dt,ft.prototype.has=ht,ft.prototype.set=pt;var gt=ft;var mt=it,yt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},vt=function(e){return this.__data__.has(e)};function bt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new mt;++t<n;)this.add(e[t])}bt.prototype.add=bt.prototype.push=yt,bt.prototype.has=vt;var wt=bt,_t=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},St=function(e,t){return e.has(t)};var xt=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new wt:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var f=e[d],g=t[d];if(r)var m=a?r(g,f,d,t,e,o):r(f,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(p){if(!_t(t,(function(e,t){if(!St(p,t)&&(f===e||i(f,e,n,r,o)))return p.push(t)}))){h=!1;break}}else if(f!==g&&!i(f,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var $t=W.Uint8Array,Ct=_,kt=xt,Ft=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},jt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ot=q?q.prototype:void 0,Bt=Ot?Ot.valueOf:void 0;var At=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new $t(e),new $t(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ct(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ft;case"[object Set]":var l=1&r;if(s||(s=jt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=kt(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(Bt)return Bt.call(e)==Bt.call(t)}return!1};var It=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Pt=Array.isArray,zt=It,Et=Pt;var Dt=function(e,t,n){var r=t(e);return Et(e)?r:zt(r,n(e))};var Ht=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},Mt=function(){return[]},Nt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,Lt=Tt?function(e){return null==e?[]:(e=Object(e),Ht(Tt(e),(function(t){return Nt.call(e,t)})))}:Mt;var Vt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Rt=function(e){return null!=e&&"object"==typeof e},Wt=ne,qt=Rt;var Ut=function(e){return qt(e)&&"[object Arguments]"==Wt(e)},Qt=Rt,Zt=Object.prototype,Gt=Zt.hasOwnProperty,Xt=Zt.propertyIsEnumerable,Kt=Ut(function(){return arguments}())?Ut:function(e){return Qt(e)&&Gt.call(e,"callee")&&!Xt.call(e,"callee")},Yt={exports:{}};var Jt=function(){return!1};!function(e,t){var n=W,r=Jt,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(Yt,Yt.exports);var en=/^(?:0|[1-9]\d*)$/;var tn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&en.test(e))&&e>-1&&e%1==0&&e<t};var nn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},rn=ne,on=nn,an=Rt,sn={};sn["[object Float32Array]"]=sn["[object Float64Array]"]=sn["[object Int8Array]"]=sn["[object Int16Array]"]=sn["[object Int32Array]"]=sn["[object Uint8Array]"]=sn["[object Uint8ClampedArray]"]=sn["[object Uint16Array]"]=sn["[object Uint32Array]"]=!0,sn["[object Arguments]"]=sn["[object Array]"]=sn["[object ArrayBuffer]"]=sn["[object Boolean]"]=sn["[object DataView]"]=sn["[object Date]"]=sn["[object Error]"]=sn["[object Function]"]=sn["[object Map]"]=sn["[object Number]"]=sn["[object Object]"]=sn["[object RegExp]"]=sn["[object Set]"]=sn["[object String]"]=sn["[object WeakMap]"]=!1;var ln=function(e){return an(e)&&on(e.length)&&!!sn[rn(e)]};var cn=function(e){return function(t){return e(t)}},un={exports:{}};!function(e,t){var n=L,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(un,un.exports);var dn=ln,hn=cn,pn=un.exports,fn=pn&&pn.isTypedArray,gn=fn?hn(fn):dn,mn=Vt,yn=Kt,vn=Pt,bn=Yt.exports,wn=tn,_n=gn,Sn=Object.prototype.hasOwnProperty;var xn=function(e,t){var n=vn(e),r=!n&&yn(e),i=!n&&!r&&bn(e),o=!n&&!r&&!i&&_n(e),a=n||r||i||o,s=a?mn(e.length,String):[],l=s.length;for(var c in e)!t&&!Sn.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wn(c,l))||s.push(c);return s},$n=Object.prototype;var Cn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$n)};var kn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Fn=Cn,jn=kn,On=Object.prototype.hasOwnProperty;var Bn=se,An=nn;var In=xn,Pn=function(e){if(!Fn(e))return jn(e);var t=[];for(var n in Object(e))On.call(e,n)&&"constructor"!=n&&t.push(n);return t},zn=function(e){return null!=e&&An(e.length)&&!Bn(e)};var En=function(e){return zn(e)?In(e):Pn(e)},Dn=Dt,Hn=Lt,Mn=En;var Nn=function(e){return Dn(e,Mn,Hn)},Tn=Object.prototype.hasOwnProperty;var Ln=function(e,t,n,r,i,o){var a=1&n,s=Nn(e),l=s.length;if(l!=Nn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Tn.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p},Vn=Ce(W,"DataView"),Rn=ke,Wn=Ce(W,"Promise"),qn=Ce(W,"Set"),Un=Ce(W,"WeakMap"),Qn=ne,Zn=he,Gn=Zn(Vn),Xn=Zn(Rn),Kn=Zn(Wn),Yn=Zn(qn),Jn=Zn(Un),er=Qn;(Vn&&"[object DataView]"!=er(new Vn(new ArrayBuffer(1)))||Rn&&"[object Map]"!=er(new Rn)||Wn&&"[object Promise]"!=er(Wn.resolve())||qn&&"[object Set]"!=er(new qn)||Un&&"[object WeakMap]"!=er(new Un))&&(er=function(e){var t=Qn(e),n="[object Object]"==t?e.constructor:void 0,r=n?Zn(n):"";if(r)switch(r){case Gn:return"[object DataView]";case Xn:return"[object Map]";case Kn:return"[object Promise]";case Yn:return"[object Set]";case Jn:return"[object WeakMap]"}return t});var tr=gt,nr=xt,rr=At,ir=Ln,or=er,ar=Pt,sr=Yt.exports,lr=gn,cr="[object Object]",ur=Object.prototype.hasOwnProperty;var dr=function(e,t,n,r,i,o){var a=ar(e),s=ar(t),l=a?"[object Array]":or(e),c=s?"[object Array]":or(t),u=(l="[object Arguments]"==l?cr:l)==cr,d=(c="[object Arguments]"==c?cr:c)==cr,h=l==c;if(h&&sr(e)){if(!sr(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new tr),a||lr(e)?nr(e,t,n,r,i,o):rr(e,t,l,n,r,i,o);if(!(1&n)){var p=u&&ur.call(e,"__wrapped__"),f=d&&ur.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return o||(o=new tr),i(g,m,n,r,o)}}return!!h&&(o||(o=new tr),ir(e,t,n,r,i,o))},hr=Rt;var pr=function e(t,n,r,i,o){return t===n||(null==t||null==n||!hr(t)&&!hr(n)?t!=t&&n!=n:dr(t,n,r,i,e,o))},fr=gt,gr=pr;var mr=re;var yr=function(e){return e==e&&!mr(e)},vr=yr,br=En;var wr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},_r=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new fr;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?gr(u,c,3,r,d):h))return!1}}return!0},Sr=function(e){for(var t=br(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vr(i)]}return t},xr=wr;var $r=function(e){var t=Sr(e);return 1==t.length&&t[0][2]?xr(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}},Cr=ne,kr=Rt;var Fr=function(e){return"symbol"==typeof e||kr(e)&&"[object Symbol]"==Cr(e)},jr=Pt,Or=Fr,Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ar=/^\w*$/;var Ir=function(e,t){if(jr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Or(e))||(Ar.test(e)||!Br.test(e)||null!=t&&e in Object(t))},Pr=it;function zr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zr.Cache||Pr),n}zr.Cache=Pr;var Er=zr;var Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hr=/\\(\\)?/g,Mr=function(e){var t=Er(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Dr,(function(e,n,r,i){t.push(r?i.replace(Hr,"$1"):n||e)})),t}));var Nr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Tr=Pt,Lr=Fr,Vr=q?q.prototype:void 0,Rr=Vr?Vr.toString:void 0;var Wr=function e(t){if("string"==typeof t)return t;if(Tr(t))return Nr(t,e)+"";if(Lr(t))return Rr?Rr.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},qr=Wr;var Ur=Pt,Qr=Ir,Zr=Mr,Gr=function(e){return null==e?"":qr(e)};var Xr=function(e,t){return Ur(e)?e:Qr(e,t)?[e]:Zr(Gr(e))},Kr=Fr;var Yr=function(e){if("string"==typeof e||Kr(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Jr=Xr,ei=Yr;var ti=function(e,t){for(var n=0,r=(t=Jr(t,e)).length;null!=e&&n<r;)e=e[ei(t[n++])];return n&&n==r?e:void 0},ni=ti;var ri=function(e,t,n){var r=null==e?void 0:ni(e,t);return void 0===r?n:r};var ii=Xr,oi=Kt,ai=Pt,si=tn,li=nn,ci=Yr;var ui=function(e,t){return null!=e&&t in Object(e)},di=function(e,t,n){for(var r=-1,i=(t=ii(t,e)).length,o=!1;++r<i;){var a=ci(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&li(i)&&si(a,i)&&(ai(e)||oi(e))};var hi=pr,pi=ri,fi=function(e,t){return null!=e&&di(e,t,ui)},gi=Ir,mi=yr,yi=wr,vi=Yr;var bi=ti;var wi=function(e){return function(t){return null==t?void 0:t[e]}},_i=function(e){return function(t){return bi(t,e)}},Si=Ir,xi=Yr;var $i=$r,Ci=function(e,t){return gi(e)&&mi(t)?yi(vi(e),t):function(n){var r=pi(n,e);return void 0===r&&r===t?fi(n,e):hi(t,r,3)}},ki=function(e){return e},Fi=Pt,ji=function(e){return Si(e)?wi(xi(e)):_i(e)};var Oi=/\s/;var Bi=function(e){for(var t=e.length;t--&&Oi.test(e.charAt(t)););return t},Ai=/^\s+/;var Ii=function(e){return e?e.slice(0,Bi(e)+1).replace(Ai,""):e},Pi=re,zi=Fr,Ei=/^[-+]0x[0-9a-f]+$/i,Di=/^0b[01]+$/i,Hi=/^0o[0-7]+$/i,Mi=parseInt;var Ni=function(e){if("number"==typeof e)return e;if(zi(e))return NaN;if(Pi(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Pi(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ii(e);var n=Di.test(e);return n||Hi.test(e)?Mi(e.slice(2),n?2:8):Ei.test(e)?NaN:+e};var Ti=function(e){return e?Infinity===(e=Ni(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var Li=b,Vi=function(e){return"function"==typeof e?e:null==e?ki:"object"==typeof e?Fi(e)?Ci(e[0],e[1]):$i(e):ji(e)},Ri=function(e){var t=Ti(e),n=t%1;return t==t?n?t-n:t:0},Wi=Math.max;var qi=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ri(n);return i<0&&(i=Wi(r+i,0)),Li(e,Vi(t),i)};let Ui=lo();const Qi=e=>io(e,Ui);let Zi=lo();Qi.write=e=>io(e,Zi);let Gi=lo();Qi.onStart=e=>io(e,Gi);let Xi=lo();Qi.onFrame=e=>io(e,Xi);let Ki=lo();Qi.onFinish=e=>io(e,Ki);let Yi=[];Qi.setTimeout=(e,t)=>{let n=Qi.now()+t,r=()=>{let e=Yi.findIndex((e=>e.cancel==r));~e&&Yi.splice(e,1),no-=~e?1:0},i={time:n,handler:e,cancel:r};return Yi.splice(Ji(n),0,i),no+=1,oo(),i};let Ji=e=>~(~Yi.findIndex((t=>t.time>e))||~Yi.length);Qi.cancel=e=>{Gi.delete(e),Xi.delete(e),Ki.delete(e),Ui.delete(e),Zi.delete(e)},Qi.sync=e=>{ro=!0,Qi.batchedUpdates(e),ro=!1},Qi.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Qi.onStart(n)}return r.handler=e,r.cancel=()=>{Gi.delete(n),t=null},r};let eo="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Qi.use=e=>eo=e,Qi.now="undefined"!=typeof performance?()=>performance.now():Date.now,Qi.batchedUpdates=e=>e(),Qi.catch=console.error,Qi.frameLoop="always",Qi.advance=()=>{"demand"!==Qi.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):so()};let to=-1,no=0,ro=!1;function io(e,t){ro?(t.delete(e),e(0)):(t.add(e),oo())}function oo(){to<0&&(to=0,"demand"!==Qi.frameLoop&&eo(ao))}function ao(){~to&&(eo(ao),Qi.batchedUpdates(so))}function so(){let e=to;to=Qi.now();let t=Ji(to);t&&(co(Yi.splice(0,t),(e=>e.handler())),no-=t),no?(Gi.flush(),Ui.flush(e?Math.min(64,to-e):16.667),Xi.flush(),Zi.flush(),Ki.flush()):to=-1}function lo(){let e=new Set,t=e;return{add(n){no+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(no-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,no-=t.size,co(t,(t=>t(n)&&e.add(t))),no+=e.size,t=e)}}}function co(e,t){e.forEach((e=>{try{t(e)}catch(e){Qi.catch(e)}}))}function uo(){}const ho={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function po(e,t){if(ho.arr(e)){if(!ho.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}const fo=(e,t)=>e.forEach(t);function go(e,t,n){if(ho.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}const mo=e=>ho.und(e)?[]:ho.arr(e)?e:[e];function yo(e,t){if(e.size){const n=Array.from(e);e.clear(),fo(n,t)}}const vo=(e,...t)=>yo(e,(e=>e(...t))),bo=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let wo,_o,So=null,xo=!1,$o=uo;var Co=Object.freeze({__proto__:null,get createStringInterpolator(){return wo},get to(){return _o},get colors(){return So},get skipAnimation(){return xo},get willAdvance(){return $o},assign:e=>{e.to&&(_o=e.to),e.now&&(Qi.now=e.now),void 0!==e.colors&&(So=e.colors),null!=e.skipAnimation&&(xo=e.skipAnimation),e.createStringInterpolator&&(wo=e.createStringInterpolator),e.requestAnimationFrame&&Qi.use(e.requestAnimationFrame),e.batchedUpdates&&(Qi.batchedUpdates=e.batchedUpdates),e.willAdvance&&($o=e.willAdvance),e.frameLoop&&(Qi.frameLoop=e.frameLoop)}});const ko=new Set;let Fo=[],jo=[],Oo=0;const Bo={get idle(){return!ko.size&&!Fo.length},start(e){Oo>e.priority?(ko.add(e),Qi.onStart(Ao)):(Io(e),Qi(zo))},advance:zo,sort(e){if(Oo)Qi.onFrame((()=>Bo.sort(e)));else{const t=Fo.indexOf(e);~t&&(Fo.splice(t,1),Po(e))}},clear(){Fo=[],ko.clear()}};function Ao(){ko.forEach(Io),ko.clear(),Qi(zo)}function Io(e){Fo.includes(e)||Po(e)}function Po(e){Fo.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Fo,(t=>t.priority>e.priority)),0,e)}function zo(e){const t=jo;for(let n=0;n<Fo.length;n++){const r=Fo[n];Oo=r.priority,r.idle||($o(r),r.advance(e),r.idle||t.push(r))}return Oo=0,jo=Fo,jo.length=0,Fo=t,Fo.length>0}const Eo="[-+]?\\d*\\.?\\d+";function Do(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Ho=new RegExp("rgb"+Do(Eo,Eo,Eo)),Mo=new RegExp("rgba"+Do(Eo,Eo,Eo,Eo)),No=new RegExp("hsl"+Do(Eo,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),To=new RegExp("hsla"+Do(Eo,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Eo)),Lo=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Vo=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ro=/^#([0-9a-fA-F]{6})$/,Wo=/^#([0-9a-fA-F]{8})$/;function qo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Uo(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=qo(i,r,e+1/3),a=qo(i,r,e),s=qo(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Qo(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Zo(e){return(parseFloat(e)%360+360)%360/360}function Go(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Xo(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ko(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ro.exec(e))?parseInt(t[1]+"ff",16)>>>0:So&&void 0!==So[e]?So[e]:(t=Ho.exec(e))?(Qo(t[1])<<24|Qo(t[2])<<16|Qo(t[3])<<8|255)>>>0:(t=Mo.exec(e))?(Qo(t[1])<<24|Qo(t[2])<<16|Qo(t[3])<<8|Go(t[4]))>>>0:(t=Lo.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Wo.exec(e))?parseInt(t[1],16)>>>0:(t=Vo.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=No.exec(e))?(255|Uo(Zo(t[1]),Xo(t[2]),Xo(t[3])))>>>0:(t=To.exec(e))?(Uo(Zo(t[1]),Xo(t[2]),Xo(t[3]))|Go(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Yo=(e,t,n)=>{if(ho.fun(e))return e;if(ho.arr(e))return Yo({range:e,output:t,extrapolate:n});if(ho.str(e.output[0]))return wo(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}};function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(this,arguments)}const ea=Symbol.for("FluidValue.get"),ta=Symbol.for("FluidValue.observers"),na=e=>Boolean(e&&e[ea]),ra=e=>e&&e[ea]?e[ea]():e,ia=e=>e[ta]||null;function oa(e,t){let n=e[ta];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class aa{constructor(e){if(this[ea]=void 0,this[ta]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");sa(this,e)}}const sa=(e,t)=>ua(e,ea,t);function la(e,t){if(e[ea]){let n=e[ta];n||ua(e,ta,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ca(e,t){let n=e[ta];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ta]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const ua=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),da=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ha=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pa=new RegExp(`(${da.source})(%|[a-z]+)`,"i"),fa=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ga=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ma=e=>{const[t,n]=ya(e);if(!t||bo())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&ga.test(n)?ma(n):n||e},ya=e=>{const t=ga.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let va;const ba=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,wa=e=>{va||(va=So?new RegExp(`(${Object.keys(So).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ra(e).replace(ga,ma).replace(ha,Ko).replace(va,Ko))),n=t.map((e=>e.match(da).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Yo(Jo({},e,{output:t}))));return e=>{var n;const i=!pa.test(t[0])&&(null==(n=t.find((e=>pa.test(e))))?void 0:n.replace(da,""));let o=0;return t[0].replace(da,(()=>`${r[o++](e)}${i||""}`)).replace(fa,ba)}},_a="react-spring: ",Sa=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${_a}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},xa=Sa(console.warn);const $a=Sa(console.warn);function Ca(e){return ho.str(e)&&("#"==e[0]||/\d/.test(e)||!bo()&&ga.test(e)||e in(So||{}))}const ka=bo()?a:s;function Fa(){const e=l()[1],t=(()=>{const e=c(!1);return ka((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const ja=e=>a(e,Oa),Oa=[];function Ba(e){const t=c();return a((()=>{t.current=e})),t.current}const Aa=Symbol.for("Animated:node"),Ia=e=>e&&e[Aa],Pa=(e,t)=>{return n=e,r=Aa,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},za=e=>e&&e[Aa]&&e[Aa].getPayload();class Ea{constructor(){this.payload=void 0,Pa(this,this)}getPayload(){return this.payload||[]}}class Da extends Ea{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,ho.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Da(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ho.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ho.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class Ha extends Da{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Yo({output:[e,e]})}static create(e){return new Ha(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(ho.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Yo({output:[this.getValue(),e]})),this._value=0,super.reset()}}const Ma={dependencies:null};class Na extends Ea{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return go(this.source,((n,r)=>{var i;(i=n)&&i[Aa]===i?t[r]=n.getValue(e):na(n)?t[r]=ra(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&fo(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return go(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ma.dependencies&&na(e)&&Ma.dependencies.add(e);const t=za(e);t&&fo(t,(e=>this.add(e)))}}class Ta extends Na{constructor(e){super(e)}static create(e){return new Ta(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(La)),!0)}}function La(e){return(Ca(e)?Ha:Da).create(e)}function Va(e){const t=Ia(e);return t?t.constructor:ho.arr(e)?Ta:Ca(e)?Ha:Da}function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ra.apply(this,arguments)}const Wa=(e,t)=>{const n=!ho.fun(e)||e.prototype&&e.prototype.isReactComponent;return u(((r,o)=>{const s=c(null),l=n&&d((e=>{s.current=function(e,t){e&&(ho.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[u,h]=function(e,t){const n=new Set;Ma.dependencies=n,e.style&&(e=Ra({},e,{style:t.createAnimatedStyle(e.style)}));return e=new Na(e),Ma.dependencies=null,[e,n]}(r,t),p=Fa(),f=()=>{const e=s.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,u.getValue(!0)))&&p()},g=new qa(f,h),m=c();ka((()=>(m.current=g,fo(h,(e=>la(e,g))),()=>{m.current&&(fo(m.current.deps,(e=>ca(e,m.current))),Qi.cancel(m.current.update))}))),a(f,[]),ja((()=>()=>{const e=m.current;fo(e.deps,(t=>ca(t,e)))}));const y=t.getComponentProps(u.getValue());return i.createElement(e,Ra({},y,{ref:l}))}))};class qa{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Qi.write(this.update)}}const Ua=Symbol.for("AnimatedComponent"),Qa=e=>ho.str(e)?e:e&&ho.str(e.displayName)?e.displayName:ho.fun(e)&&e.name||null;function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(this,arguments)}function Ga(e,...t){return ho.fun(e)?e(...t):e}const Xa=(e,t)=>!0===e||!!(t&&e&&(ho.fun(e)?e(t):mo(e).includes(t))),Ka=(e,t)=>ho.obj(e)?t&&e[t]:e,Ya=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ja=e=>e,es=(e,t=Ja)=>{let n=ts;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);ho.und(n)||(r[i]=n)}return r},ts=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ns={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 rs(e){const t=function(e){const t={};let n=0;if(go(e,((e,r)=>{ns[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return go(e,((e,r)=>r in t||(n[r]=e))),n}return Za({},e)}function is(e){return e=ra(e),ho.arr(e)?e.map(is):Ca(e)?Co.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function os(e){for(const t in e)return!0;return!1}function as(e){return ho.fun(e)||ho.arr(e)&&ho.obj(e[0])}function ss(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function ls(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const cs=1.70158,us=1.525*cs,ds=2*Math.PI/3,hs=2*Math.PI/4.5,ps=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},fs=Za({},{tension:170,friction:26},{mass:1,damping:1,easing:{linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>2.70158*e*e*e-cs*e*e,easeOutBack:e=>1+2.70158*Math.pow(e-1,3)+cs*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-us)/2:(Math.pow(2*e-2,2)*((us+1)*(2*e-2)+us)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ds),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ds)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*hs)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*hs)/2+1,easeInBounce:e=>1-ps(1-e),easeOutBounce:ps,easeInOutBounce:e=>e<.5?(1-ps(1-2*e))/2:(1+ps(2*e-1))/2}.linear,clamp:!1});class gs{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,fs)}}function ms(e,t){if(ho.und(t.decay)){const n=!ho.und(t.tension)||!ho.und(t.friction);!n&&ho.und(t.frequency)&&ho.und(t.damping)&&ho.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const ys=[];class vs{constructor(){this.changed=!1,this.values=ys,this.toValues=null,this.fromValues=ys,this.to=void 0,this.from=void 0,this.config=new gs,this.immediate=!1}}function bs(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise(((a,s)=>{var l;let c,u,d=Xa(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(d)f();else{ho.und(n.pause)||(i.paused=Xa(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||Xa(e,t)),c=Ga(n.delay||0,t),e?(i.resumeQueue.add(p),o.pause()):(o.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(u),u.cancel(),c=u.time-Qi.now()}function p(){c>0&&!Co.skipAnimation?(i.delayed=!0,u=Qi.setTimeout(f,c),i.pauseQueue.add(h),i.timeouts.add(u)):f()}function f(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(u),e<=(i.cancelId||0)&&(d=!0);try{o.start(Za({},n,{callId:e,cancel:d}),a)}catch(e){s(e)}}}))}const ws=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?xs(e.get()):t.every((e=>e.noop))?_s(e.get()):Ss(e.get(),t.every((e=>e.finished))),_s=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ss=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),xs=e=>({value:e,cancelled:!0,finished:!1});function $s(e,t,n,r){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=es(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const h=new Promise(((e,t)=>(u=e,d=t))),p=e=>{const t=i<=(n.cancelId||0)&&xs(r)||i!==n.asyncId&&Ss(r,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const o=new ks,a=new Fs;return(async()=>{if(Co.skipAnimation)throw Cs(n),a.result=Ss(r,!1),d(a),a;p(o);const s=ho.obj(e)?Za({},e):Za({},t,{to:e});s.parentId=i,go(c,((e,t)=>{ho.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return p(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let g;if(Co.skipAnimation)return Cs(n),Ss(r,!1);try{let t;t=ho.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(u),h]),g=Ss(r.get(),!0,!1)}catch(e){if(e instanceof ks)g=e.result;else{if(!(e instanceof Fs))throw e;g=e.result}}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return ho.fun(a)&&Qi.batchedUpdates((()=>{a(g,r,r.item)})),g})():l}function Cs(e,t){yo(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class ks 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."),this.result=void 0}}class Fs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const js=e=>e instanceof Bs;let Os=1;class Bs extends aa{constructor(...e){super(...e),this.id=Os++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ia(this);return e&&e.getValue()}to(...e){return Co.to(this,e)}interpolate(...e){return xa(`${_a}The "interpolate" function is deprecated in v9 (use "to" instead)`),Co.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){oa(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Bo.sort(this),oa(this,{type:"priority",parent:this,priority:e})}}const As=Symbol.for("SpringPhase"),Is=e=>(1&e[As])>0,Ps=e=>(2&e[As])>0,zs=e=>(4&e[As])>0,Es=(e,t)=>t?e[As]|=3:e[As]&=-3,Ds=(e,t)=>t?e[As]|=4:e[As]&=-5;class Hs extends Bs{constructor(e,t){if(super(),this.key=void 0,this.animation=new vs,this.queue=void 0,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,!ho.und(e)||!ho.und(t)){const n=ho.obj(e)?Za({},e):Za({},t,{from:e});ho.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ps(this)||this._state.asyncTo)||zs(this)}get goal(){return ra(this.animation.to)}get velocity(){const e=Ia(this);return e instanceof Da?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Is(this)}get isAnimating(){return Ps(this)}get isPaused(){return zs(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:i,toValues:o}=r;const a=za(r.to);!a&&na(r.to)&&(o=mo(ra(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==Ha?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=ho.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const h=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(ho.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=h,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,l=!ho.und(r),p=n==c?s.v0>0:n<c;let f,g=!1;const m=1,y=Math.ceil(e/m);for(let e=0;e<y&&(f=Math.abs(a)>t,f||(u=Math.abs(c-d)<=h,!u));++e){l&&(g=d==c||d>c==p,g&&(a=-a*r,d=c));a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*m,d+=a*m}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)}));const s=Ia(this),l=s.getValue();if(t){const e=ra(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return Qi.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ps(this)){const{to:e,config:t}=this.animation;Qi.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 ho.und(e)?(n=this.queue||[],this.queue=[]):n=[ho.obj(e)?e:Za({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>ws(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Cs(this._state,e&&this._lastCallId),Qi.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ho.obj(n)?n[t]:n,(null==n||as(n))&&(n=void 0),r=ho.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return Is(this)||(e.reverse&&([n,r]=[r,n]),r=ra(r),ho.und(r)?Ia(this)||this._set(n):this._set(r)),i}_update(e,t){let n=Za({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,es(n,((e,t)=>/^on/.test(t)?Ka(e,r):e))),Ws(this,n,"onProps"),qs(this,"onProps",n,this);const o=this._prepareNode(n);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 a=this._state;return bs(++this._lastCallId,{key:r,props:n,defaultProps:i,state:a,actions:{pause:()=>{zs(this)||(Ds(this,!0),vo(a.pauseQueue),qs(this,"onPause",Ss(this,Ms(this,this.animation.to)),this))},resume:()=>{zs(this)&&(Ds(this,!1),Ps(this)&&this._resume(),vo(a.resumeQueue),qs(this,"onResume",Ss(this,Ms(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=Ns(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(xs(this));const r=!ho.und(e.to),i=!ho.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(xs(this));this._lastToId=t.callId}const{key:o,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!i||r||t.default&&!ho.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const h=!po(d,c);h&&(s.from=d),d=ra(d);const p=!po(u,l);p&&this._focus(u);const f=as(t.to),{config:g}=s,{decay:m,velocity:y}=g;(r||i)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(ms(n=Za({},n),t),t=Za({},n,t)),ms(e,t),Object.assign(e,t);for(const t in fs)null==e[t]&&(e[t]=fs[t]);let{mass:r,frequency:i,damping:o}=e;ho.und(i)||(i<.01&&(i=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*o*r/i)}(g,Ga(t.config,o),t.config!==a.config?Ga(a.config,o):void 0);let v=Ia(this);if(!v||ho.und(u))return n(Ss(this,!0));const b=ho.und(t.reset)?i&&!t.default:!ho.und(d)&&Xa(t.reset,o),w=b?d:this.get(),_=is(u),S=ho.num(_)||ho.arr(_)||Ca(_),x=!f&&(!S||Xa(a.immediate||t.immediate,o));if(p){const e=Va(u);if(e!==v.constructor){if(!x)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(_)}}const $=v.constructor;let C=na(u),k=!1;if(!C){const e=b||!Is(this)&&h;(p||e)&&(k=po(is(w),_),C=!k),(po(s.immediate,x)||x)&&po(g.decay,m)&&po(g.velocity,y)||(C=!0)}if(k&&Ps(this)&&(s.changed&&!b?C=!0:C||this._stop(l)),!f&&((C||na(l))&&(s.values=v.getPayload(),s.toValues=na(u)?null:$==Ha?[1]:mo(_)),s.immediate!=x&&(s.immediate=x,x||b||this._set(l)),C)){const{onRest:e}=s;fo(Rs,(e=>Ws(this,t,e)));const r=Ss(this,Ms(this,l));vo(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&Qi.batchedUpdates((()=>{s.changed=!b,null==e||e(r,this),b?Ga(a.onRest,r):null==s.onStart||s.onStart(r,this)}))}b&&this._set(w),f?n($s(t.to,t,this._state,this)):C?this._start():Ps(this)&&!p?this._pendingCalls.add(n):n(_s(w))}_focus(e){const t=this.animation;e!==t.to&&(ia(this)&&this._detach(),t.to=e,ia(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;na(t)&&(la(t,this),js(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;na(e)&&ca(e,this)}_set(e,t=!0){const n=ra(e);if(!ho.und(n)){const e=Ia(this);if(!e||!po(n,e.getValue())){const r=Va(n);e&&e.constructor==r?e.setValue(n):Pa(this,r.create(n)),e&&Qi.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ia(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,qs(this,"onStart",Ss(this,Ms(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ga(this.animation.onChange,e,this)),Ga(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ia(this).reset(ra(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Ps(this)||(Es(this,!0),zs(this)||this._resume())}_resume(){Co.skipAnimation?this.finish():Bo.start(this)}_stop(e,t){if(Ps(this)){Es(this,!1);const n=this.animation;fo(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),oa(this,{type:"idle",parent:this});const r=t?xs(this.get()):Ss(this.get(),Ms(this,null!=e?e:n.to));vo(this._pendingCalls,r),n.changed&&(n.changed=!1,qs(this,"onRest",r,this))}}}function Ms(e,t){const n=is(t);return po(is(e.get()),n)}function Ns(e,t=e.loop,n=e.to){let r=Ga(t);if(r){const i=!0!==r&&rs(r),o=(i||e).reverse,a=!i||i.reset;return Ts(Za({},e,{loop:t,default:!1,pause:void 0,to:!o||as(n)?n:void 0,from:a?e.from:void 0,reset:a},i))}}function Ts(e){const{to:t,from:n}=e=rs(e),r=new Set;return ho.obj(t)&&Vs(t,r),ho.obj(n)&&Vs(n,r),e.keys=r.size?Array.from(r):null,e}function Ls(e){const t=Ts(e);return ho.und(t.default)&&(t.default=es(t)),t}function Vs(e,t){go(e,((e,n)=>null!=e&&t.add(n)))}const Rs=["onStart","onRest","onChange","onPause","onResume"];function Ws(e,t,n){e.animation[n]=t[n]!==Ya(t,n)?Ka(t[n],e.key):void 0}function qs(e,t,...n){var r,i,o,a;null==(r=(i=e.animation)[t])||r.call(i,...n),null==(o=(a=e.defaultProps)[t])||o.call(a,...n)}const Us=["onStart","onChange","onRest"];let Qs=1;class Zs{constructor(e,t){this.id=Qs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,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(Za({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];ho.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ts(e)),this}start(e){let{queue:t}=this;return e?t=mo(e).map(Ts):this.queue=[],this._flush?this._flush(this,t):(tl(this,t),Gs(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;fo(mo(t),(t=>n[t].stop(!!e)))}else Cs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(ho.und(e))this.start({pause:!0});else{const t=this.springs;fo(mo(e),(e=>t[e].pause()))}return this}resume(e){if(ho.und(e))this.start({pause:!1});else{const t=this.springs;fo(mo(e),(e=>t[e].resume()))}return this}each(e){go(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,yo(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&yo(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),o&&(this._started=!1,yo(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Qi.onFrame(this._onFrame)}}function Gs(e,t){return Promise.all(t.map((t=>Xs(e,t)))).then((t=>ws(e,t)))}async function Xs(e,t,n){const{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,c=ho.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);const u=ho.arr(i)||ho.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):fo(Us,(n=>{const r=t[n];if(ho.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,vo(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Ya(t,"cancel");(u||p&&d.asyncId)&&h.push(bs(++e._lastAsyncId,{props:t,state:d,actions:{pause:uo,resume:uo,start(t,n){p?(Cs(d,e._lastAsyncId),n(xs(e))):(t.onRest=s,n($s(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=ws(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){const n=Ns(t,a,i);if(n)return tl(e,[n]),Xs(e,n,!0)}return l&&Qi.batchedUpdates((()=>l(f,e,e.item))),f}function Ks(e,t){const n=Za({},e.springs);return t&&fo(mo(t),(e=>{ho.und(e.keys)&&(e=Ts(e)),ho.obj(e.to)||(e=Za({},e,{to:void 0})),el(n,e,(e=>Js(e)))})),Ys(e,n),n}function Ys(e,t){go(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,la(t,e))}))}function Js(e,t){const n=new Hs;return n.key=e,t&&la(n,t),n}function el(e,t,n){t.keys&&fo(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function tl(e,t){fo(t,(t=>{el(e.springs,t,(t=>Js(t,e)))}))}const nl=["children"],rl=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,nl);const r=h(il),o=n.pause||!!r.pause,s=n.immediate||!!r.immediate;n=function(e,t){const[n]=l((()=>({inputs:t,result:e()}))),r=c(),i=r.current;let o=i;o?Boolean(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.inputs))||(o={inputs:t,result:e()}):o=n;return a((()=>{r.current=o,i==n&&(n.inputs=n.result=void 0)}),[o]),o.result}((()=>({pause:o,immediate:s})),[o,s]);const{Provider:u}=il;return i.createElement(u,{value:n},t)},il=(ol=rl,al={},Object.assign(ol,i.createContext(al)),ol.Provider._context=ol,ol.Consumer._context=ol,ol);var ol,al;rl.Provider=il.Provider,rl.Consumer=il.Consumer;const sl=()=>{const e=[],t=function(t){$a(`${_a}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`);const r=[];return fo(e,((e,i)=>{if(ho.und(t))r.push(e.start());else{const o=n(t,e,i);o&&r.push(e.start(o))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return fo(e,(e=>e.pause(...arguments))),this},t.resume=function(){return fo(e,(e=>e.resume(...arguments))),this},t.set=function(t){fo(e,(e=>e.set(t)))},t.start=function(t){const n=[];return fo(e,((e,r)=>{if(ho.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return fo(e,(e=>e.stop(...arguments))),this},t.update=function(t){return fo(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return ho.fun(e)?e(n,t):e};return t._getProps=n,t};function ll(e,t,n){const r=ho.fun(t)&&t;r&&!n&&(n=[]);const i=p((()=>r||3==arguments.length?sl():void 0),[]),o=c(0),a=Fa(),s=p((()=>({ctrls:[],queue:[],flush(e,t){const n=Ks(e,t);return o.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Gs(e,t):new Promise((r=>{Ys(e,n),s.queue.push((()=>{r(Gs(e,t))})),a()}))}})),[]),l=c([...s.ctrls]),u=[],d=Ba(e)||0;function f(e,n){for(let i=e;i<n;i++){const e=l.current[i]||(l.current[i]=new Zs(null,s.flush)),n=r?r(i,e):t[i];n&&(u[i]=Ls(n))}}p((()=>{fo(l.current.slice(e,d),(e=>{ss(e,i),e.stop(!0)})),l.current.length=e,f(d,e)}),[e]),p((()=>{f(0,Math.min(d,e))}),n);const g=l.current.map(((e,t)=>Ks(e,u[t]))),m=h(rl),y=Ba(m),v=m!==y&&os(m);ka((()=>{o.current++,s.ctrls=l.current;const{queue:e}=s;e.length&&(s.queue=[],fo(e,(e=>e()))),fo(l.current,((e,t)=>{null==i||i.add(e),v&&e.start({default:m});const n=u[t];n&&(ls(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ja((()=>()=>{fo(s.ctrls,(e=>e.stop(!0)))}));const b=g.map((e=>Za({},e)));return i?[b,i]:b}let cl;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(cl||(cl={}));class ul extends Bs{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Yo(...t);const n=this._get(),r=Va(n);Pa(this,r.create(n))}advance(e){const t=this._get();po(t,this.get())||(Ia(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&hl(this._active)&&pl(this)}_get(){const e=ho.arr(this.source)?this.source.map(ra):mo(ra(this.source));return this.calc(...e)}_start(){this.idle&&!hl(this._active)&&(this.idle=!1,fo(za(this),(e=>{e.done=!1})),Co.skipAnimation?(Qi.batchedUpdates((()=>this.advance())),pl(this)):Bo.start(this))}_attach(){let e=1;fo(mo(this.source),(t=>{na(t)&&la(t,this),js(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){fo(mo(this.source),(e=>{na(e)&&ca(e,this)})),this._active.clear(),pl(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=mo(this.source).reduce(((e,t)=>Math.max(e,(js(t)?t.priority:0)+1)),0))}}function dl(e){return!1!==e.idle}function hl(e){return!e.size||Array.from(e).every(dl)}function pl(e){e.idle||(e.idle=!0,fo(za(e),(e=>{e.done=!0})),oa(e,{type:"idle",parent:e}))}function fl(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}Co.assign({createStringInterpolator:wa,to:(e,t)=>new ul(e,t)});const gl=["style","children","scrollTop","scrollLeft"],ml=/^--/;function yl(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||ml.test(e)||bl.hasOwnProperty(e)&&bl[e]?(""+t).trim():t+"px"}const vl={};let bl={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};const wl=["Webkit","Ms","Moz","O"];bl=Object.keys(bl).reduce(((e,t)=>(wl.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),bl);const _l=["x","y","z"],Sl=/^(matrix|translate|scale|rotate|skew)/,xl=/^(translate)/,$l=/^(rotate|skew)/,Cl=(e,t)=>ho.num(e)&&0!==e?e+t:e,kl=(e,t)=>ho.arr(e)?e.every((e=>kl(e,t))):ho.num(e)?e===t:parseFloat(e)===t;class Fl extends Na{constructor(e){let{x:t,y:n,z:r}=e,i=fl(e,_l);const o=[],a=[];(t||n||r)&&(o.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>Cl(e,"px"))).join(",")})`,kl(e,0)]))),go(i,((e,t)=>{if("transform"===t)o.push([e||""]),a.push((e=>[e,""===e]));else if(Sl.test(t)){if(delete i[t],ho.und(e))return;const n=xl.test(t)?"px":$l.test(t)?"deg":"";o.push(mo(e)),a.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Cl(i,n)})`,kl(i,0)]:e=>[`${t}(${e.map((e=>Cl(e,n))).join(",")})`,kl(e,t.startsWith("scale")?1:0)])}})),o.length&&(i.transform=new jl(o,a)),super(i)}}class jl extends aa{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return fo(this.inputs,((n,r)=>{const i=ra(n[0]),[o,a]=this.transforms[r](ho.arr(i)?i:n.map(ra));e+=" "+o,t=t&&a})),t?"none":e}observerAdded(e){1==e&&fo(this.inputs,(e=>fo(e,(e=>na(e)&&la(e,this)))))}observerRemoved(e){0==e&&fo(this.inputs,(e=>fo(e,(e=>na(e)&&ca(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),oa(this,e)}}const Ol=["scrollTop","scrollLeft"];Co.assign({batchedUpdates:f,createStringInterpolator:wa,colors:{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}});const Bl=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Na(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{const t=Qa(e)||"Anonymous";return(e=ho.str(e)?o[e]||(o[e]=Wa(e,i)):e[Ua]||(e[Ua]=Wa(e,i))).displayName=`Animated(${t})`,e};return go(e,((t,n)=>{ho.arr(e)&&(n=Qa(t)),o[n]=o(t)})),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,{style:i,children:o,scrollTop:a,scrollLeft:s}=r,l=fl(r,gl),c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:vl[t]||(vl[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){const n=yl(t,i[t]);ml.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Fl(e),getComponentProps:e=>fl(e,Ol)}),Al=Bl.animated,Il=(e,t,n)=>t?ri(n,t)||ri(e,t):n||e,Pl=(e,t)=>{const n=t||e.defaultValue;return ri(e.collections,n)};var zl;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme"}(zl||(zl={}));const El={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}}},defaultValue:"base"},Dl=e=>t=>{const n=t.theme,r=Pl(El,n[zl.colorScheme]);return n.options&&n.options.color?Il(r,e,n.options.color):Il(r,e)},Hl={Brand:{1:Dl("Brand.1"),2:Dl("Brand.2"),3:Dl("Brand.3"),4:Dl("Brand.4"),5:Dl("Brand.5"),6:Dl("Brand.6")},Primary:Dl("Primary"),PrimaryDark:Dl("PrimaryDark"),Secondary:Dl("Secondary"),Accent:{Light:{1:Dl("Accent.Light.1"),2:Dl("Accent.Light.2"),3:Dl("Accent.Light.3"),4:Dl("Accent.Light.4"),5:Dl("Accent.Light.5"),6:Dl("Accent.Light.6")},Dark:{1:Dl("Accent.Dark.1"),2:Dl("Accent.Dark.2"),3:Dl("Accent.Dark.3")}},Neutral:{1:Dl("Neutral.1"),2:Dl("Neutral.2"),3:Dl("Neutral.3"),4:Dl("Neutral.4"),5:Dl("Neutral.5"),6:Dl("Neutral.6"),7:Dl("Neutral.7"),8:Dl("Neutral.8")},Validation:{Green:{Text:Dl("Validation.Green.Text"),Icon:Dl("Validation.Green.Icon"),Border:Dl("Validation.Green.Border"),Background:Dl("Validation.Green.Background")},Orange:{Text:Dl("Validation.Orange.Text"),Icon:Dl("Validation.Orange.Icon"),Border:Dl("Validation.Orange.Border"),Background:Dl("Validation.Orange.Background"),Badge:Dl("Validation.Orange.Badge")},Red:{Text:Dl("Validation.Red.Text"),Icon:Dl("Validation.Red.Icon"),Border:Dl("Validation.Red.Border"),Background:Dl("Validation.Red.Background")}},Shadow:{Accent:Dl("Shadow.Accent"),Red:Dl("Shadow.Red"),Elevation:Dl("Shadow.Elevation")}},Ml={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},Nl=e=>Object.keys(Ml).reduce(((t,n)=>{const r=Ml[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),Tl=Nl("max-width"),Ll=(Nl("min-width"),g.div`
2
2
  display: inline-block;
3
3
  position: relative;
4
4
  width: ${e=>e.$size}px;
@@ -412,7 +412,7 @@ import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i f
412
412
  display: flex;
413
413
  justify-content: flex-end;
414
414
  padding: 1rem 0 0.5rem 0;
415
- `,Dc=g.button`
415
+ `,Ec=g.button`
416
416
  ${ec("Body","semibold")}
417
417
  background-color: transparent;
418
418
  background-repeat: no-repeat;
@@ -421,7 +421,7 @@ import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i f
421
421
  overflow: hidden;
422
422
  outline: none;
423
423
  ${e=>`\n\t\t\tcolor: ${Hl.Primary(e)};\n\t\t`}
424
- `,Ec=g.div`
424
+ `,Dc=g.div`
425
425
  width: 100%;
426
426
  display: flex;
427
427
  padding: 1rem 0.5rem;
@@ -490,11 +490,13 @@ import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i f
490
490
  height: 1.375rem;
491
491
  width: 1.375rem;
492
492
  color: ${Hl.Neutral[3]};
493
- `,eu=u(((e,r)=>{const{onClear:i,...o}=e;return t(Gc,{children:[n(Kc,{}),n(Xc,{ref:r,...o}),o.value&&n(Yc,{"aria-label":"Clear search",focusOutline:"browser",onClick:i,children:n(Jc,{})})]},"search")})),tu=({listItems:e,listExtractor:i,valueExtractor:o,onSelectItem:s,listStyleWidth:u,visible:d,enableSearch:h,searchPlaceholder:p="Search",onSearch:f,searchFunction:g,onDismiss:m,multiSelect:y,selectedItems:v,onSelectAll:b,onRetry:w,itemsLoadState:_="success",itemTruncationType:S="end",renderListItem:x,onBlur:$,...C})=>{const[k,F]=l(0),[j,O]=l(""),[B,A]=l(e),[I,P]=l(0),z=function(e,t){const n=ho.fun(e),[[r],i]=ll(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}({height:I}),D=c(),E=c(),H=c([]),M=c(),N=c(k),T=c(B),L=e=>{N.current=e,F(e)},V=e=>{T.current=e,A(e)};a((()=>(document.addEventListener("keydown",Z),()=>{document.removeEventListener("keydown",Z)})),[]),a((()=>{U(j)}),[j]),a((()=>{O(""),d?(P(Q()),M&&M.current?(M.current.focus(),L(-1)):H.current[k]&&H.current[k].focus()):P(0)}),[d]),a((()=>{if(d){const e=Q();P(e)}}),[B]),a((()=>{V(e),O(""),L(0)}),[e]);const R=e=>i?i(e):e.toString(),W=e=>{const t=i?i(e):e.toString();let n=0;return E&&E.current&&(n=E.current.getBoundingClientRect().width-100),hc.shouldTruncateToTwoLines("string"==typeof t?t:t.title,n)},q=e=>qi(v,e)>-1,U=t=>{if(""===t)V(e);else if(g){const e=g(t);V(e)}else{const n=e.filter((e=>{const n=R(e),r="object"==typeof n?n.title.toLowerCase():n.toLowerCase();return"object"==typeof n&&n.secondaryLabel?r.includes(t.trim().toLowerCase())||n.secondaryLabel.includes(t.trim().toLowerCase()):r.includes(t.trim().toLowerCase())}));V(n)}},Q=()=>E&&E.current?E.current.getBoundingClientRect().height:0,Z=e=>{if(D&&D.current.contains(e.target))switch(e.code){case"ArrowDown":if(N.current<T.current.length-1){const e=N.current+1;H.current[e].focus(),L(e)}break;case"ArrowUp":if(N.current>0){const e=N.current-1;H.current[e].focus(),L(N.current-1)}break;case"Escape":m&&m()}},G=(e,t)=>{e.preventDefault(),s&&s(t,(e=>o?o(e):e)(t))},X=e=>{const t=e.target.value;O(t),f&&f()},K=()=>{O(""),f&&f()},Y=()=>{w&&w()},J=()=>{$&&$()},ee=e=>{const r=R(e),i="string"==typeof r?r:r.title;return t(Bc,{"data-testid":"truncate-middle-container",children:[n(Ac,{children:i}),t(Ic,{children:[" ",i]})]})},te=e=>{const i=R(e);return"string"==typeof i?n(r,{children:i}):t(r,{children:[i.title,i.secondaryLabel&&n(Oc,{children:i.secondaryLabel})]})},ne=()=>{if(!w||w&&"success"===_)return B.map(((e,r)=>n(kc,{checked:q(e)&&!y,children:t(Fc,{onClick:t=>{G(t,e)},ref:e=>H.current[r]=e,"data-testid":"list-item",type:"button",tabIndex:d?0:-1,multiSelect:y,onBlur:J,children:[y&&n(Pc,{checked:q(e),displaySize:"small"}),x?x(e,{selected:q(e)}):n(jc,{truncateType:S,children:"middle"===S&&W(e)?ee(e):te(e)})]})},((e,t)=>`item_${t}__${o?o(e):e}`)(e,r))))},re=()=>{if(y&&B.length>0&&!j&&"success"===_)return n(zc,{children:n(Dc,{onClick:b,children:0===v.length?"Select all":"Unselect all"})},"selectAll")},ie=()=>{if(j&&0===B.length)return t(Ec,{"data-testid":"list-no-results",children:[n(Mc,{"data-testid":"no-result-icon"}),n(Hc,{children:"No results found."})]},"noResults")},oe=()=>{if(w&&"loading"===_)return t(Ec,{"data-testid":"list-loading",children:[n(dc,{$buttonStyle:"secondary",size:24}),n(Hc,{children:"Loading..."})]},"loading")},ae=()=>{if(w&&"fail"===_)return t(Ec,{"data-testid":"list-fail",children:[n(Mc,{"data-testid":"load-error-icon"}),n(Hc,{children:"Failed to load."}),n(Dc,{onClick:Y,children:"Try again."})]},"noResults")};return n($c,{style:z,"data-testid":d?"dropdown-container":"dropdown-container-hidden",ref:D,children:(()=>{if(d)return t(Cc,{ref:E,"data-testid":"dropdown-list",width:u,role:"list",...C,children:[(h||g)&&"success"===_?n(eu,{ref:M,onChange:X,value:j,placeholder:p,"data-testid":"search-input","aria-label":"search-input",tabIndex:d?0:-1,onClear:K}):null,re(),ie(),oe(),ae(),ne()]})})()})};var nu,ru={};Object.defineProperty(ru,"__esModule",{value:!0});var iu=e;const ou=e=>iu.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:iu.jsx("path",{d:"M2.62611 5.81312C2.84811 5.59112 3.10478 5.48012 3.39611 5.48012C3.68811 5.48012 3.94511 5.59112 4.16711 5.81312L10.1881 11.8341L16.2301 5.79212C16.4381 5.58412 16.6881 5.48012 16.9801 5.48012C17.2714 5.48012 17.5281 5.59112 17.7501 5.81312C17.9588 6.02179 18.0631 6.27545 18.0631 6.57412C18.0631 6.87279 17.9588 7.12612 17.7501 7.33412L10.8131 14.2721C10.7158 14.3688 10.6151 14.4381 10.5111 14.4801C10.4071 14.5215 10.2994 14.5421 10.1881 14.5421C10.0768 14.5421 9.96911 14.5215 9.86511 14.4801C9.76111 14.4381 9.66044 14.3688 9.56311 14.2721L2.60511 7.31312C2.38244 7.09112 2.27811 6.83779 2.29211 6.55312C2.30611 6.26845 2.41744 6.02179 2.62611 5.81312Z",fill:"currentColor"})});ou.displayName="ChevronDownIcon",nu=ru.ChevronDownIcon=ou;const au={collections:{base:{InputBoxShadow:y`
493
+ `,eu=u(((e,r)=>{const{onClear:i,...o}=e;return t(Gc,{children:[n(Kc,{}),n(Xc,{ref:r,...o}),o.value&&n(Yc,{"aria-label":"Clear search",focusOutline:"browser",onClick:i,children:n(Jc,{})})]},"search")})),tu=({listItems:e,listExtractor:i,valueExtractor:o,onSelectItem:s,listStyleWidth:u,visible:d,enableSearch:h,searchPlaceholder:p="Search",onSearch:f,searchFunction:g,onDismiss:m,multiSelect:y,selectedItems:v,onSelectAll:b,onRetry:w,itemsLoadState:_="success",itemTruncationType:S="end",renderListItem:x,onBlur:$,...C})=>{const[k,F]=l(0),[j,O]=l(""),[B,A]=l(e),[I,P]=l(0),z=function(e,t){const n=ho.fun(e),[[r],i]=ll(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}({height:I}),E=c(),D=c(),H=c([]),M=c(),N=c(k),T=c(B),L=e=>{N.current=e,F(e)},V=e=>{T.current=e,A(e)};a((()=>(document.addEventListener("keydown",Z),()=>{document.removeEventListener("keydown",Z)})),[]),a((()=>{U(j)}),[j]),a((()=>{O(""),d?(P(Q()),M&&M.current?(M.current.focus(),L(-1)):H.current[k]&&H.current[k].focus()):P(0)}),[d]),a((()=>{if(d){const e=Q();P(e)}}),[B]),a((()=>{V(e),O(""),L(0)}),[e]);const R=e=>i?i(e):e.toString(),W=e=>{const t=i?i(e):e.toString();let n=0;return D&&D.current&&(n=D.current.getBoundingClientRect().width-100),hc.shouldTruncateToTwoLines("string"==typeof t?t:t.title,n)},q=e=>qi(v,e)>-1,U=t=>{if(""===t)V(e);else if(g){const e=g(t);V(e)}else{const n=e.filter((e=>{const n=R(e),r="object"==typeof n?n.title.toLowerCase():n.toLowerCase();return"object"==typeof n&&n.secondaryLabel?r.includes(t.trim().toLowerCase())||n.secondaryLabel.includes(t.trim().toLowerCase()):r.includes(t.trim().toLowerCase())}));V(n)}},Q=()=>D&&D.current?D.current.getBoundingClientRect().height:0,Z=e=>{if(E&&E.current.contains(e.target))switch(e.code){case"ArrowDown":if(N.current<T.current.length-1){const e=N.current+1;H.current[e].focus(),L(e)}break;case"ArrowUp":if(N.current>0){const e=N.current-1;H.current[e].focus(),L(N.current-1)}break;case"Escape":m&&m()}},G=(e,t)=>{e.preventDefault(),s&&s(t,(e=>o?o(e):e)(t))},X=e=>{const t=e.target.value;O(t),f&&f()},K=()=>{O(""),f&&f()},Y=()=>{w&&w()},J=()=>{$&&$()},ee=e=>{const r=R(e),i="string"==typeof r?r:r.title;return t(Bc,{"data-testid":"truncate-middle-container",children:[n(Ac,{children:i}),t(Ic,{children:[" ",i]})]})},te=e=>{const i=R(e);return"string"==typeof i?n(r,{children:i}):t(r,{children:[i.title,i.secondaryLabel&&n(Oc,{children:i.secondaryLabel})]})},ne=()=>{if(!w||w&&"success"===_)return B.map(((e,r)=>n(kc,{checked:q(e)&&!y,children:t(Fc,{onClick:t=>{G(t,e)},ref:e=>H.current[r]=e,"data-testid":"list-item",type:"button",tabIndex:d?0:-1,multiSelect:y,onBlur:J,children:[y&&n(Pc,{checked:q(e),displaySize:"small"}),x?x(e,{selected:q(e)}):n(jc,{truncateType:S,children:"middle"===S&&W(e)?ee(e):te(e)})]})},((e,t)=>`item_${t}__${o?o(e):e}`)(e,r))))},re=()=>{if(y&&B.length>0&&!j&&"success"===_)return n(zc,{children:n(Ec,{onClick:b,children:0===v.length?"Select all":"Unselect all"})},"selectAll")},ie=()=>{if(j&&0===B.length)return t(Dc,{"data-testid":"list-no-results",children:[n(Mc,{"data-testid":"no-result-icon"}),n(Hc,{children:"No results found."})]},"noResults")},oe=()=>{if(w&&"loading"===_)return t(Dc,{"data-testid":"list-loading",children:[n(dc,{$buttonStyle:"secondary",size:24}),n(Hc,{children:"Loading..."})]},"loading")},ae=()=>{if(w&&"fail"===_)return t(Dc,{"data-testid":"list-fail",children:[n(Mc,{"data-testid":"load-error-icon"}),n(Hc,{children:"Failed to load."}),n(Ec,{onClick:Y,children:"Try again."})]},"noResults")};return n($c,{style:z,"data-testid":d?"dropdown-container":"dropdown-container-hidden",ref:E,children:(()=>{if(d)return t(Cc,{ref:D,"data-testid":"dropdown-list",width:u,role:"list",...C,children:[(h||g)&&"success"===_?n(eu,{ref:M,onChange:X,value:j,placeholder:p,"data-testid":"search-input","aria-label":"search-input",tabIndex:d?0:-1,onClear:K}):null,re(),ie(),oe(),ae(),ne()]})})()})};var nu,ru={};Object.defineProperty(ru,"__esModule",{value:!0});var iu=e;const ou=e=>iu.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:iu.jsx("path",{d:"M2.62611 5.81312C2.84811 5.59112 3.10478 5.48012 3.39611 5.48012C3.68811 5.48012 3.94511 5.59112 4.16711 5.81312L10.1881 11.8341L16.2301 5.79212C16.4381 5.58412 16.6881 5.48012 16.9801 5.48012C17.2714 5.48012 17.5281 5.59112 17.7501 5.81312C17.9588 6.02179 18.0631 6.27545 18.0631 6.57412C18.0631 6.87279 17.9588 7.12612 17.7501 7.33412L10.8131 14.2721C10.7158 14.3688 10.6151 14.4381 10.5111 14.4801C10.4071 14.5215 10.2994 14.5421 10.1881 14.5421C10.0768 14.5421 9.96911 14.5215 9.86511 14.4801C9.76111 14.4381 9.66044 14.3688 9.56311 14.2721L2.60511 7.31312C2.38244 7.09112 2.27811 6.83779 2.29211 6.55312C2.30611 6.26845 2.41744 6.02179 2.62611 5.81312Z",fill:"currentColor"})});ou.displayName="ChevronDownIcon",nu=ru.ChevronDownIcon=ou;const au={collections:{base:{InputBoxShadow:y`
494
494
  inset 0 0 6px 1px ${Hl.Shadow.Accent}
495
495
  `,InputErrorBoxShadow:y`
496
496
  inset 0 0 6px 1px ${Hl.Shadow.Red}
497
- `}},defaultValue:"base"},su=e=>t=>{const n=t.theme,r=Pl(au,n[zl.designTokenScheme]);return n.options?.designToken?Il(r,e,n.options.designToken):Il(r,e)},lu=su("InputBoxShadow"),cu=su("InputErrorBoxShadow"),uu="all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)",du=g.div`
497
+ `,ElevationBoxShadow:y`
498
+ 0px 2px 8px ${Hl.Shadow.Elevation}
499
+ `}},defaultValue:"base"},su=e=>t=>{const n=t.theme,r=Pl(au,n[zl.designTokenScheme]);return n.options?.designToken?Il(r,e,n.options.designToken):Il(r,e)},lu=su("InputBoxShadow"),cu=su("InputErrorBoxShadow"),uu=(su("ElevationBoxShadow"),"all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)"),du=g.div`
498
500
  position: relative;
499
501
  min-height: 3rem;
500
502
  height: 3rem; // Need this to persist the height when expanding or collapsing list
@@ -615,5 +617,5 @@ import e,{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import*as i f
615
617
  overflow: hidden;
616
618
  `,wu=g(bu)`
617
619
  color: ${Hl.Neutral[3]};
618
- `,_u=({children:e,show:t,error:r,disabled:i,testId:o,onBlur:s,readOnly:l})=>{const u=c(),d=c(t);a((()=>(document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)})),[]),a((()=>{d.current=t}),[t]);const h=e=>{if(!i){if(u&&u.current.contains(e.target))return;d.current&&s()}};return n(du,{children:n(fu,{ref:u,error:r&&!t,disabled:i,$readOnly:l,expanded:t,"data-testid":o,children:e})})},Su=({selectedOption:e,placeholder:i="Select",options:o,disabled:s,error:u,"data-testid":d,id:h,enableSearch:p=!1,searchFunction:f,searchPlaceholder:g,valueExtractor:m,valueToStringFunction:y,listExtractor:v,displayValueExtractor:b,onSelectOption:w,listStyleWidth:_,onShowOptions:S,onHideOptions:x,onRetry:$,optionsLoadState:C="success",optionTruncationType:k="end",renderCustomSelectedOption:F,renderListItem:j,...O})=>{const[B,A]=l(e),[I,P]=l(!1),z=c(),D=c();a((()=>{A(e)}),[e]);const E=(e,t)=>{A(e),P(!1),N(!1),z&&z.current.focus(),w&&w(e,t)},H=()=>{I&&(P(!1),N(!1)),z&&z.current.focus()},M=e=>{if("middle"===k){let t=0;return D&&D.current&&(t=D.current.getBoundingClientRect().width),hc.truncateOneLine((e=>"string"==typeof e?e:y(e)||e.toString())(e),t,120,8)}return e},N=e=>{!e&&x&&x(),e&&S&&S()};return t(_u,{show:I,error:u&&!I,disabled:s,readOnly:O.readOnly,testId:d,onBlur:()=>{P(!1),N(!1)},children:[n(hu,{ref:z,type:"button","data-testid":h||"selector",disabled:s,onClick:e=>{e.preventDefault(),s||O.readOnly||(P(!I),N(!I))},...O,children:t(r,{children:[n(vu,{ref:D,children:B?F?F(B):n(bu,{truncateType:k,children:M(b?b(B):m?m(B):B.toString())}):n(wu,{truncateType:k,children:i})}),!O.readOnly&&n(gu,{expanded:I,children:n(mu,{})})]})}),I&&n(yu,{}),o&&o.length>0?n(tu,{listItems:o,onSelectItem:E,onDismiss:H,valueExtractor:m,listExtractor:v,listStyleWidth:_,visible:I,enableSearch:p,searchPlaceholder:g,searchFunction:f,"data-testid":"dropdown-list",selectedItems:B?[B]:[],onRetry:$,itemsLoadState:C,itemTruncationType:k,renderListItem:j}):null]})},xu=({selectedOptions:e,placeholder:i="Select",options:o,disabled:s,error:u,"data-testid":d,enableSearch:h=!1,searchFunction:p,searchPlaceholder:f,valueExtractor:g,listExtractor:m,onSelectOptions:y,listStyleWidth:v,onShowOptions:b,onHideOptions:w,onRetry:_,optionsLoadState:S="success",optionTruncationType:x="end",...$})=>{const[C,k]=l(e||[]),[F,j]=l(!1),O=c();a((()=>{k(e||[])}),[e]);const B=(e,t)=>{const n=[...C],r=qi(C,(e=>(g?g(e):e)===t));r>-1?n.splice(r,1):n.push(e),k(n),P(!1),O&&O.current.focus(),y&&y(n)},A=()=>{F&&(j(!1),P(!1)),O&&O.current.focus()},I=()=>{C&&C.length>0?(k([]),y([])):(k(o),y(o))},P=e=>{!e&&w&&w(),e&&b&&b()};return t(_u,{show:F,error:u&&!F,disabled:s,testId:d,onBlur:()=>{j(!1),P(!1)},children:[n(hu,{ref:O,type:"button","data-testid":"selector",onClick:e=>{e.preventDefault(),s||(j(!F),P(!F))},...$,children:t(r,{children:[n(vu,{children:C&&0!==C.length?n(bu,{children:C&&0!=C.length?`${C.length} selected`:i}):n(wu,{truncateType:x,children:i})}),n(gu,{expanded:F,children:n(mu,{})})]})}),F&&n(yu,{}),o&&o.length>0||_?n(tu,{listItems:o,onSelectItem:B,onDismiss:A,valueExtractor:g,listExtractor:m,listStyleWidth:v,visible:F,enableSearch:h,searchFunction:p,searchPlaceholder:f,"data-testid":"dropdown-list",multiSelect:!0,selectedItems:C,onSelectAll:I,onRetry:_,itemsLoadState:S,itemTruncationType:x}):null]})};export{xu as InputMultiSelect,Su as InputSelect};
620
+ `,_u=({children:e,show:t,error:r,disabled:i,testId:o,onBlur:s,readOnly:l})=>{const u=c(),d=c(t);a((()=>(document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)})),[]),a((()=>{d.current=t}),[t]);const h=e=>{if(!i){if(u&&u.current.contains(e.target))return;d.current&&s()}};return n(du,{children:n(fu,{ref:u,error:r&&!t,disabled:i,$readOnly:l,expanded:t,"data-testid":o,children:e})})},Su=({selectedOption:e,placeholder:i="Select",options:o,disabled:s,error:u,"data-testid":d,id:h,enableSearch:p=!1,searchFunction:f,searchPlaceholder:g,valueExtractor:m,valueToStringFunction:y,listExtractor:v,displayValueExtractor:b,onSelectOption:w,listStyleWidth:_,onShowOptions:S,onHideOptions:x,onRetry:$,optionsLoadState:C="success",optionTruncationType:k="end",renderCustomSelectedOption:F,renderListItem:j,...O})=>{const[B,A]=l(e),[I,P]=l(!1),z=c(),E=c();a((()=>{A(e)}),[e]);const D=(e,t)=>{A(e),P(!1),N(!1),z&&z.current.focus(),w&&w(e,t)},H=()=>{I&&(P(!1),N(!1)),z&&z.current.focus()},M=e=>{if("middle"===k){let t=0;return E&&E.current&&(t=E.current.getBoundingClientRect().width),hc.truncateOneLine((e=>"string"==typeof e?e:y(e)||e.toString())(e),t,120,8)}return e},N=e=>{!e&&x&&x(),e&&S&&S()};return t(_u,{show:I,error:u&&!I,disabled:s,readOnly:O.readOnly,testId:d,onBlur:()=>{P(!1),N(!1)},children:[n(hu,{ref:z,type:"button","data-testid":h||"selector",disabled:s,onClick:e=>{e.preventDefault(),s||O.readOnly||(P(!I),N(!I))},...O,children:t(r,{children:[n(vu,{ref:E,children:B?F?F(B):n(bu,{truncateType:k,children:M(b?b(B):m?m(B):B.toString())}):n(wu,{truncateType:k,children:i})}),!O.readOnly&&n(gu,{expanded:I,children:n(mu,{})})]})}),I&&n(yu,{}),o&&o.length>0?n(tu,{listItems:o,onSelectItem:D,onDismiss:H,valueExtractor:m,listExtractor:v,listStyleWidth:_,visible:I,enableSearch:p,searchPlaceholder:g,searchFunction:f,"data-testid":"dropdown-list",selectedItems:B?[B]:[],onRetry:$,itemsLoadState:C,itemTruncationType:k,renderListItem:j}):null]})},xu=({selectedOptions:e,placeholder:i="Select",options:o,disabled:s,error:u,"data-testid":d,enableSearch:h=!1,searchFunction:p,searchPlaceholder:f,valueExtractor:g,listExtractor:m,onSelectOptions:y,listStyleWidth:v,onShowOptions:b,onHideOptions:w,onRetry:_,optionsLoadState:S="success",optionTruncationType:x="end",...$})=>{const[C,k]=l(e||[]),[F,j]=l(!1),O=c();a((()=>{k(e||[])}),[e]);const B=(e,t)=>{const n=[...C],r=qi(C,(e=>(g?g(e):e)===t));r>-1?n.splice(r,1):n.push(e),k(n),P(!1),O&&O.current.focus(),y&&y(n)},A=()=>{F&&(j(!1),P(!1)),O&&O.current.focus()},I=()=>{C&&C.length>0?(k([]),y([])):(k(o),y(o))},P=e=>{!e&&w&&w(),e&&b&&b()};return t(_u,{show:F,error:u&&!F,disabled:s,testId:d,onBlur:()=>{j(!1),P(!1)},children:[n(hu,{ref:O,type:"button","data-testid":"selector",onClick:e=>{e.preventDefault(),s||(j(!F),P(!F))},...$,children:t(r,{children:[n(vu,{children:C&&0!==C.length?n(bu,{children:C&&0!=C.length?`${C.length} selected`:i}):n(wu,{truncateType:x,children:i})}),n(gu,{expanded:F,children:n(mu,{})})]})}),F&&n(yu,{}),o&&o.length>0||_?n(tu,{listItems:o,onSelectItem:B,onDismiss:A,valueExtractor:g,listExtractor:m,listStyleWidth:v,visible:F,enableSearch:h,searchFunction:p,searchPlaceholder:f,"data-testid":"dropdown-list",multiSelect:!0,selectedItems:C,onSelectAll:I,onRetry:_,itemsLoadState:S,itemTruncationType:x}):null]})};export{xu as InputMultiSelect,Su as InputSelect};
619
621
  //# sourceMappingURL=index.js.map