streamlit 1.52.1__py3-none-any.whl → 1.52.2__py3-none-any.whl

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 (98) hide show
  1. streamlit/elements/widgets/data_editor.py +7 -1
  2. streamlit/static/index.html +1 -1
  3. streamlit/static/manifest.json +284 -284
  4. streamlit/static/static/js/{ErrorOutline.esm.sMJdFExW.js → ErrorOutline.esm.LtBTGAgi.js} +1 -1
  5. streamlit/static/static/js/{FileDownload.esm.CV-WYqBn.js → FileDownload.esm.DllwCvQc.js} +1 -1
  6. streamlit/static/static/js/{FileHelper.5nCh9KDY.js → FileHelper.DgwA_xYF.js} +1 -1
  7. streamlit/static/static/js/{FormClearHelper.-9RbsnV0.js → FormClearHelper.DyYuMYyM.js} +1 -1
  8. streamlit/static/static/js/{InputInstructions.2R3tBtW9.js → InputInstructions.ikAdmYQR.js} +1 -1
  9. streamlit/static/static/js/{Particles.DDHoXFxh.js → Particles.Cg5ey-rW.js} +1 -1
  10. streamlit/static/static/js/{ProgressBar.BxmfHxKu.js → ProgressBar.D1rDn4Rn.js} +1 -1
  11. streamlit/static/static/js/{StreamlitSyntaxHighlighter.BFWV0oqR.js → StreamlitSyntaxHighlighter.DU42g8NY.js} +1 -1
  12. streamlit/static/static/js/{Toolbar.DMgU0Vgw.js → Toolbar.0YdWjZhn.js} +1 -1
  13. streamlit/static/static/js/{base-input.BXTqYbyG.js → base-input.DYzkAUR7.js} +1 -1
  14. streamlit/static/static/js/{checkbox.5xWaqPqm.js → checkbox.YeQ8t-PZ.js} +1 -1
  15. streamlit/static/static/js/{createSuper.OIgV8wc-.js → createSuper.CXzRWZIx.js} +1 -1
  16. streamlit/static/static/js/{data-grid-overlay-editor.B4RIu9cw.js → data-grid-overlay-editor.vnwILR0p.js} +1 -1
  17. streamlit/static/static/js/{downloader.DwCJck8O.js → downloader.BdNzicWj.js} +1 -1
  18. streamlit/static/static/js/{embed.HKcgTiLB.js → embed.C_8wI7Q8.js} +1 -1
  19. streamlit/static/static/js/{es6.4AP97RGk.js → es6.D6UMoOIM.js} +2 -2
  20. streamlit/static/static/js/{iframeResizer.contentWindow.BZAsvL9q.js → iframeResizer.contentWindow.DM7vAi8H.js} +1 -1
  21. streamlit/static/static/js/{index.CxXo5UKy.js → index.0CGAg_-3.js} +1 -1
  22. streamlit/static/static/js/{index.CbiYVMT1.js → index.19XigCCW.js} +1 -1
  23. streamlit/static/static/js/{index.CqTPbV5Y.js → index.3bHSf9gi.js} +8 -8
  24. streamlit/static/static/js/{index.Da9gznCC.js → index.B1br6-J8.js} +1 -1
  25. streamlit/static/static/js/{index.DN4sfQLP.js → index.BDyX78eQ.js} +1 -1
  26. streamlit/static/static/js/{index.D52dMvK5.js → index.BEiPXRiB.js} +1 -1
  27. streamlit/static/static/js/{index.DfIRibXG.js → index.BGGsxMsK.js} +1 -1
  28. streamlit/static/static/js/{index.VFDFuf_7.js → index.BK8LGuo5.js} +1 -1
  29. streamlit/static/static/js/{index.Di9I2cid.js → index.BNH1O6vW.js} +1 -1
  30. streamlit/static/static/js/{index.CSbah0y4.js → index.BNJ18Gvk.js} +1 -1
  31. streamlit/static/static/js/{index.BKIlG7Ng.js → index.BSC_e7mC.js} +1 -1
  32. streamlit/static/static/js/{index.q4fLUQtC.js → index.BSsyTGMU.js} +1 -1
  33. streamlit/static/static/js/{index.DMU3coc2.js → index.BTeFWqxT.js} +1 -1
  34. streamlit/static/static/js/index.BVQ-x0jB.js +2 -0
  35. streamlit/static/static/js/{index.CbxllBj8.js → index.BtT26h8D.js} +1 -1
  36. streamlit/static/static/js/{index.NaDyAN1s.js → index.BuO127Fv.js} +1 -1
  37. streamlit/static/static/js/{index.CxbL5FgL.js → index.C4SaLgc9.js} +1 -1
  38. streamlit/static/static/js/{index.DY9Ac89e.js → index.C6PG_WI2.js} +1 -1
  39. streamlit/static/static/js/{index.BVuohWM1.js → index.C9ZwaDT3.js} +1 -1
  40. streamlit/static/static/js/{index.DkpEv0uV.js → index.CCH6P_Oz.js} +1 -1
  41. streamlit/static/static/js/{index.B0TPxAZ1.js → index.CJdAAsMS.js} +1 -1
  42. streamlit/static/static/js/{index.-3selq_5.js → index.CLw67zQa.js} +1 -1
  43. streamlit/static/static/js/{index.BHWBaOWH.js → index.COYdue8P.js} +1 -1
  44. streamlit/static/static/js/index.CPVPS6MS.js +1 -0
  45. streamlit/static/static/js/{index.L7erTnMm.js → index.CQRv0Buu.js} +1 -1
  46. streamlit/static/static/js/{index.BjQIH-3U.js → index.CTssS8CY.js} +1 -1
  47. streamlit/static/static/js/{index.BJas6XzW.js → index.CV56Xzvw.js} +1 -1
  48. streamlit/static/static/js/{index.DwJ9Vhsl.js → index.CVgZcb-2.js} +1 -1
  49. streamlit/static/static/js/{index.BrqtKtSu.js → index.CaMDX02c.js} +1 -1
  50. streamlit/static/static/js/{index.DRDE9rnx.js → index.Cc0FyOvj.js} +1 -1
  51. streamlit/static/static/js/{index.CP2YZ73v.js → index.CccNGpyY.js} +1 -1
  52. streamlit/static/static/js/{index.W-bl3NDo.js → index.CinPJsaI.js} +1 -1
  53. streamlit/static/static/js/{index.CIC9pLsG.js → index.Cys-qREe.js} +1 -1
  54. streamlit/static/static/js/{index.Dg5zbEp2.js → index.DATGLwZn.js} +1 -1
  55. streamlit/static/static/js/{index.Buc7XrOl.js → index.DDuPBAVu.js} +5 -5
  56. streamlit/static/static/js/{index.xZBTXGNC.js → index.DN77pJCq.js} +1 -1
  57. streamlit/static/static/js/{index.BNMLO-0p.js → index.DRgFBrOW.js} +1 -1
  58. streamlit/static/static/js/{index.RNTPpVde.js → index.Dc27IuI8.js} +1 -1
  59. streamlit/static/static/js/{index.DYKCsDvl.js → index.DdjNqo0t.js} +1 -1
  60. streamlit/static/static/js/{index.Ckcqwai8.js → index.DmQGepo0.js} +1 -1
  61. streamlit/static/static/js/{index.6UunrySF.js → index.DmaExHyk.js} +1 -1
  62. streamlit/static/static/js/{index.Cd1D2eGF.js → index.Dou8UoAD.js} +1 -1
  63. streamlit/static/static/js/{index.oyLQ4pue.js → index.Dt4MKWrN.js} +1 -1
  64. streamlit/static/static/js/{index.BMU6zZRk.js → index.M-iumICI.js} +1 -1
  65. streamlit/static/static/js/{index.XYozEjwK.js → index.NjN0yaAC.js} +1 -1
  66. streamlit/static/static/js/{index.BPmBNTel.js → index.OW6D7CJ5.js} +1 -1
  67. streamlit/static/static/js/{index.DBUdji-9.js → index.SnIe8o_F.js} +1 -1
  68. streamlit/static/static/js/{index.1ylynMAS.js → index.xg87JKI8.js} +1 -1
  69. streamlit/static/static/js/{input.CcvrgErO.js → input.-I2c-pPm.js} +1 -1
  70. streamlit/static/static/js/{main.eVHOp4Th.js → main.zgyqwsPV.js} +1 -1
  71. streamlit/static/static/js/{memory.Ck_sLv5Y.js → memory.BTaCc67b.js} +1 -1
  72. streamlit/static/static/js/{number-overlay-editor.DgcLMWOy.js → number-overlay-editor.Bp2-OIVN.js} +1 -1
  73. streamlit/static/static/js/{pandasStylerUtils.DqP0h70z.js → pandasStylerUtils.PlmC_Sod.js} +1 -1
  74. streamlit/static/static/js/{possibleConstructorReturn.C_51n46K.js → possibleConstructorReturn.D2vivPxX.js} +1 -1
  75. streamlit/static/static/js/{sandbox.Q-g3QIZJ.js → sandbox.C-NkJg85.js} +1 -1
  76. streamlit/static/static/js/{styled-components.e0V96rJw.js → styled-components.-ywQNIcz.js} +1 -1
  77. streamlit/static/static/js/{throttle.D3b5WILl.js → throttle.SbSFuU2P.js} +1 -1
  78. streamlit/static/static/js/{timepicker.Bpn70xGc.js → timepicker.BRg2LlYz.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.DIN_ys1J.js → toConsumableArray.DmYuqCFN.js} +1 -1
  80. streamlit/static/static/js/uniqueId.DDLECwS_.js +1 -0
  81. streamlit/static/static/js/{useBasicWidgetState.DA3_qaXD.js → useBasicWidgetState.CSKMY_WY.js} +1 -1
  82. streamlit/static/static/js/{useIntlLocale.BSq6SANa.js → useIntlLocale.DrzrdT6m.js} +1 -1
  83. streamlit/static/static/js/{useTextInputAutoExpand.ytEW5QmA.js → useTextInputAutoExpand.BZ_dM91Q.js} +1 -1
  84. streamlit/static/static/js/{useUpdateUiValue.DOxWBNiI.js → useUpdateUiValue.y-s71G-M.js} +1 -1
  85. streamlit/static/static/js/{useWaveformController.BCmk6WLk.js → useWaveformController.Bumwfqnl.js} +1 -1
  86. streamlit/static/static/js/{withCalculatedWidth.ChdrMItN.js → withCalculatedWidth.Dl_TDMaA.js} +1 -1
  87. streamlit/static/static/js/{withFullScreenWrapper.7j_lzlaF.js → withFullScreenWrapper.CWEBbO_P.js} +1 -1
  88. streamlit/web/server/authlib_tornado_integration.py +60 -0
  89. streamlit/web/server/oidc_mixin.py +14 -3
  90. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/METADATA +1 -1
  91. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/RECORD +95 -95
  92. streamlit/static/static/js/index.B_AvdOKC.js +0 -1
  93. streamlit/static/static/js/index.q9puCQgK.js +0 -2
  94. streamlit/static/static/js/uniqueId.B27POWT6.js +0 -1
  95. {streamlit-1.52.1.data → streamlit-1.52.2.data}/scripts/streamlit.cmd +0 -0
  96. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/WHEEL +0 -0
  97. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/entry_points.txt +0 -0
  98. {streamlit-1.52.1.dist-info → streamlit-1.52.2.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- import{al as Ze,am as Q,r as _,bR as vt,an as mt,s as J,bd as bt,be as yt,x as oe,t as Ve,g as Tt,bS as kt,j as Z,l as Ie,m as Ot,ab as wt,T as Rt,P as St,ac as Mt,bT as _e}from"./index.CqTPbV5Y.js";import{h as $t}from"./moment.C3j7ZXd7.js";import{s as Ne}from"./sprintf.D7DtBTRn.js";import{w as _t}from"./withCalculatedWidth.ChdrMItN.js";import{u as Et}from"./useBasicWidgetState.DA3_qaXD.js";import"./FormClearHelper.-9RbsnV0.js";var ue={},H={},ce={},le={},Ue;function xe(){if(Ue)return le;Ue=1,Object.defineProperty(le,"__esModule",{value:!0}),le.Direction=void 0;var e;return function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"}(e||(le.Direction=e={})),le}var He;function Ge(){return He||(He=1,function(e){var r=ce&&ce.__spreadArray||function(i,o,u){if(u||arguments.length===2)for(var h=0,m=o.length,g;h<m;h++)(g||!(h in o))&&(g||(g=Array.prototype.slice.call(o,0,h)),g[h]=o[h]);return i.concat(g||Array.prototype.slice.call(o))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ze(),s=xe(),v=function(i){var o=i.toString().split(".")[1];return o?o.length:0};e.getStepDecimals=v;function S(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=S;function l(i,o,u){var h=(o-i)/u,m=8,g=Number(h.toFixed(m));return parseInt(g.toString(),10)===g}e.isStepDivisible=l;function p(i,o,u,h,m,g,T){var $=1e11;if(i=Math.round(i*$)/$,!g){var D=T[o-1],x=T[o+1];if(D&&D>i)return D;if(x&&x<i)return x}if(i>h)return h;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),V=Math.floor(i*$-Math.abs(U)),W=U===0?i:V/$,A=Math.abs(U/$)<m/2?W:W+m,L=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(L))}e.normalizeValue=p;function F(i,o,u){return(i-o)/(u-o)}e.relativeValue=F;function j(i){return i===s.Direction.Up||i===s.Direction.Down}e.isVertical=j;function z(i,o,u){if(o>=u)throw new RangeError("min (".concat(o,") is equal/bigger than max (").concat(u,")"));if(i<o)throw new RangeError("value (".concat(i,") is smaller than min (").concat(o,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=z;function E(i,o,u){return i<o?o:i>u?u:i}e.checkValuesAgainstBoundaries=E;function y(i){if(!(i.length<2)&&!i.slice(1).every(function(o,u){return i[u]<=o}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=y;function d(i){var o=window.getComputedStyle(i);return{top:parseInt(o["margin-top"],10),bottom:parseInt(o["margin-bottom"],10),left:parseInt(o["margin-left"],10),right:parseInt(o["margin-right"],10)}}e.getMargin=d;function t(i){var o=window.getComputedStyle(i);return{top:parseInt(o["padding-top"],10)+parseInt(o["border-top-width"],10),bottom:parseInt(o["padding-bottom"],10)+parseInt(o["border-bottom-width"],10),left:parseInt(o["padding-left"],10)+parseInt(o["border-left-width"],10),right:parseInt(o["padding-right"],10)+parseInt(o["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,o,u){var h=u?-1:1;i.forEach(function(m,g){return f(m,h*o[g].x,o[g].y)})}e.translateThumbs=a;function c(i,o,u,h){for(var m=0,g=B(i[0],o,u,h),T=1;T<i.length;T++){var $=B(i[T],o,u,h);$<g&&(g=$,m=T)}return m}e.getClosestThumbIndex=c;function f(i,o,u){i.style.transform="translate(".concat(o,"px, ").concat(u,"px)")}e.translate=f;var b=function(i){var o=[],u=null,h=function(){for(var m=[],g=0;g<arguments.length;g++)m[g]=arguments[g];o=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,o)}))};return h};e.schd=b;function k(i,o,u){var h=i.slice(0);return h[o]=u,h}e.replaceAt=k;function I(i){var o=i.values,u=i.colors,h=i.min,m=i.max,g=i.direction,T=g===void 0?s.Direction.Right:g,$=i.rtl,D=$===void 0?!1:$;D&&T===s.Direction.Right?T=s.Direction.Left:D&&s.Direction.Left&&(T=s.Direction.Right);var x=o.slice(0).sort(function(V,W){return V-W}).map(function(V){return(V-h)/(m-h)*100}),U=x.reduce(function(V,W,A){return"".concat(V,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=I;function O(){}e.voidFn=O;function w(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=w;var M=function(i,o,u,h,m){m===void 0&&(m=function(T){return T});var g=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(T,$){var D=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var x=$.cloneNode(!0);x.innerHTML=m(o.toFixed(h)),x.style.visibility="hidden",document.body.appendChild(x),D=Math.ceil(x.getBoundingClientRect().width),document.body.removeChild(x)}return D>T?D:T},i.getBoundingClientRect().width));return g},P=function(i,o,u,h,m,g,T){T===void 0&&(T=function(x){return x});var $=[],D=function(x){var U=M(u[x],h[x],m,g,T),V=o[x].x;o.forEach(function(W,A){var L=W.x,G=M(u[A],h[A],m,g,T);x!==A&&(V>=L&&V<=L+G||V+U>=L&&V+U<=L+G)&&($.includes(A)||($.push(x),$.push(A),$=r(r([],$,!0),[x,A],!1),D(A)))})};return D(i),Array.from(new Set($.sort()))},R=function(i,o,u,h,m,g){h===void 0&&(h=.1),m===void 0&&(m=" - "),g===void 0&&(g=function(A){return A});var T=(0,e.getStepDecimals)(h),$=(0,n.useState)({}),D=$[0],x=$[1],U=(0,n.useState)(g(o[u].toFixed(T))),V=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var L={},G=i.getOffsets(),ne=P(u,G,A,o,m,T,g),fe=g(o[u].toFixed(T));if(ne.length){var ee=ne.reduce(function(te,se,ve,me){return te.length?r(r([],te,!0),[G[me[ve]].x],!1):[G[me[ve]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var he=[];ne.forEach(function(te){he.push(o[te].toFixed(T))}),fe=Array.from(new Set(he.sort(function(te,se){return parseFloat(te)-parseFloat(se)}))).map(g).join(m);var ge=Math.min.apply(Math,ee),pe=Math.max.apply(Math,ee),$e=A[ne[ee.indexOf(pe)]].getBoundingClientRect().width;L.left="".concat(Math.abs(ge-(pe+$e))/2,"px"),L.transform="translate(-50%, 0)"}else L.visibility="hidden"}W(fe),x(L)}},[i,o]),[V,D]};e.useThumbOverlap=R;function B(i,o,u,h){var m=i.getBoundingClientRect(),g=m.left,T=m.top,$=m.width,D=m.height;return j(h)?Math.abs(u-(T+D/2)):Math.abs(o-(g+$/2))}var C=function(){var i,o=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(o)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=C}(ce)),ce}var We;function It(){if(We)return H;We=1;var e=H&&H.__extends||function(){var E=function(y,d){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},E(y,d)};return function(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");E(y,d);function t(){this.constructor=y}y.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}}(),r=H&&H.__createBinding||(Object.create?function(E,y,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(y,d);(!a||("get"in a?!y.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return y[d]}}),Object.defineProperty(E,t,a)}:function(E,y,d,t){t===void 0&&(t=d),E[t]=y[d]}),n=H&&H.__setModuleDefault||(Object.create?function(E,y){Object.defineProperty(E,"default",{enumerable:!0,value:y})}:function(E,y){E.default=y}),s=H&&H.__importStar||function(E){if(E&&E.__esModule)return E;var y={};if(E!=null)for(var d in E)d!=="default"&&Object.prototype.hasOwnProperty.call(E,d)&&r(y,E,d);return n(y,E),y},v=H&&H.__spreadArray||function(E,y,d){if(d||arguments.length===2)for(var t=0,a=y.length,c;t<a;t++)(c||!(t in y))&&(c||(c=Array.prototype.slice.call(y,0,t)),c[t]=y[t]);return E.concat(c||Array.prototype.slice.call(y))};Object.defineProperty(H,"__esModule",{value:!0});var S=s(Ze()),l=Ge(),p=xe(),F=["ArrowRight","ArrowUp","k","PageUp"],j=["ArrowLeft","ArrowDown","j","PageDown"],z=function(E){e(y,E);function y(d){var t=E.call(this,d)||this;if(t.trackRef=S.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,b=a.min,k=a.max,I=t.trackRef.current;if(!I)return console.warn("No track element found."),[];var O=I.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(I);return t.getThumbs().map(function(M,P){var R={x:0,y:0},B=M.getBoundingClientRect(),C=(0,l.getMargin)(M);switch(c){case p.Direction.Right:return R.x=(C.left+w.left)*-1,R.y=((B.height-O.height)/2+w.top)*-1,R.x+=O.width*(0,l.relativeValue)(f[P],b,k)-B.width/2,R;case p.Direction.Left:return R.x=(C.right+w.right)*-1,R.y=((B.height-O.height)/2+w.top)*-1,R.x+=O.width-O.width*(0,l.relativeValue)(f[P],b,k)-B.width/2,R;case p.Direction.Up:return R.x=((B.width-O.width)/2+C.left+w.left)*-1,R.y=-w.left,R.y+=O.height-O.height*(0,l.relativeValue)(f[P],b,k)-B.height/2,R;case p.Direction.Down:return R.x=((B.width-O.width)/2+C.left+w.left)*-1,R.y=-w.left,R.y+=O.height*(0,l.relativeValue)(f[P],b,k)-B.height/2,R;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(b,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):b<=t.state.thumbZIndexes[f]?b:b-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,b=c.onChange,k=c.step,I=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=I||O===p.Direction.Left||O===p.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):j.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){w&&t.fireOnFinalChange()}):w&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,b=f.draggedThumbIndex,k=f.draggedTrackPos,I=t.props,O=I.direction,w=I.min,M=I.max,P=I.onChange,R=I.values,B=I.step,C=I.rtl;if(b===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var o=i.getBoundingClientRect(),u=(0,l.isVertical)(O)?o.height:o.width;if(k[0]!==-1&&k[1]!==-1){var h=a-k[0],m=c-k[1],g=0;switch(O){case p.Direction.Right:case p.Direction.Left:g=h/u*(M-w);break;case p.Direction.Down:case p.Direction.Up:g=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(C&&(g*=-1),Math.abs(g)>=B/2){for(var T=0;T<t.thumbRefs.length;T++){if(R[T]===M&&Math.sign(g)===1||R[T]===w&&Math.sign(g)===-1)return;var $=R[T]+g;$>M?g=M-R[T]:$<w&&(g=w-R[T])}for(var D=R.slice(0),T=0;T<t.thumbRefs.length;T++)D=(0,l.replaceAt)(D,T,t.normalizeValue(R[T]+g,T));t.setState({draggedTrackPos:[a,c]}),P(D)}}else{var x=0;switch(O){case p.Direction.Right:x=(a-o.left)/u*(M-w)+w;break;case p.Direction.Left:x=(u-(a-o.left))/u*(M-w)+w;break;case p.Direction.Down:x=(c-o.top)/u*(M-w)+w;break;case p.Direction.Up:x=(u-(c-o.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}C&&(x=M+w-x),Math.abs(R[b]-x)>=B/2&&P((0,l.replaceAt)(R,b,t.normalizeValue(x,b)))}},t.normalizeValue=function(a,c){var f=t.props,b=f.min,k=f.max,I=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,b,k,I,O,w)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=S.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),b=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),I=[],O=0;O<t.numOfMarks+1;O++){var w=9999,M=9999;if(t.markRefs[O].current){var P=t.markRefs[O].current.getBoundingClientRect();w=P.height,M=P.width}t.props.direction===p.Direction.Left||t.props.direction===p.Direction.Right?I.push([Math.round(c/t.numOfMarks*O+b-M/2),-Math.round((w-f)/2)]):I.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:I})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return S.createRef()}),t.updateMarkRefs(d),t}return y.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(b){return(0,l.checkBoundaries)(b,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(b){(0,l.isStepDivisible)(c,b,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},y.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,b=a.step,k=a.values,I=a.rtl;(d.max!==c||d.min!==f||d.step!==b)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),I),(d.max!==c||d.min!==f||d.step!==b||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,b)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},y.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},y.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,b=t.renderThumb,k=t.renderMark,I=k===void 0?function(){return null}:k,O=t.values,w=t.min,M=t.max,P=t.allowOverlap,R=t.disabled,B=this.state,C=B.draggedThumbIndex,i=B.thumbZIndexes,o=B.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:C>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":O.length===1&&!R?"pointer":"inherit"},onMouseDown:R?l.voidFn:this.onMouseDownTrack,onTouchStart:R?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:R,children:v(v([],o.map(function(u,h,m){return I({props:{style:d.props.direction===p.Direction.Left||d.props.direction===p.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(h),ref:d.markRefs[h]},index:h})}),!0),O.map(function(u,h){var m=d.state.draggedThumbIndex===h;return b({index:h,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[h],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:h,tabIndex:R?void 0:0,"aria-valuemax":P?M:O[h+1]||M,"aria-valuemin":P?w:O[h-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[h],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},y.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:p.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},y}(S.Component);return H.default=z,H}var qe;function xt(){return qe||(qe=1,function(e){var r=ue&&ue.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(It());e.Range=n.default;var s=Ge();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return s.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return s.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return s.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return s.checkValuesAgainstBoundaries}});var v=xe();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return v.Direction}})}(ue)),ue}var Je=xt();function Ke(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function be(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ke(Object(n),!0).forEach(function(s){Ct(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Ct(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ye=Q("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$disabled,S=e.$isDragged,l=r.sizing,p="inherit";return v?p="not-allowed":S?p="grabbing":s.length===1&&(p="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:p,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var de=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$min,S=e.$max,l=e.$disabled,p=r.colors,F=r.borders,j=r.direction,z=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,background:Je.getTrackBackground({values:s,colors:s.length===1?[l?p.borderOpaque:p.primary,l?p.backgroundSecondary:p.borderOpaque]:[l?p.backgroundSecondary:p.borderOpaque,l?p.borderOpaque:p.primary,l?p.backgroundSecondary:p.borderOpaque],min:v||0,max:S||0,rtl:j==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});de.displayName="InnerTrack";de.displayName="InnerTrack";de.displayName="StyledInnerTrack";var ke=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ke.displayName="Mark";ke.displayName="Mark";ke.displayName="StyledMark";var Oe=Q("div",function(e){return be(be({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Oe.displayName="Tick";Oe.displayName="Tick";Oe.displayName="StyledTick";var we=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});we.displayName="TickBar";we.displayName="TickBar";we.displayName="StyledTickBar";var Re=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$thumbIndex,S=e.$disabled,l=s.length===2&&v===0,p=s.length===2&&v===1;return r.direction==="rtl"&&(p||l)&&(l=!l,p=!p),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:S?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:S?"not-allowed":"inherit"}});Re.displayName="Thumb";Re.displayName="Thumb";Re.displayName="StyledThumb";var Se=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Se.displayName="InnerThumb";Se.displayName="InnerThumb";Se.displayName="StyledInnerThumb";var Me=Q("div",function(e){var r=e.$disabled,n=e.$theme;return be(be({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Me.displayName="ThumbValue";Me.displayName="ThumbValue";Me.displayName="StyledThumbValue";function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(s){Pt(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Pt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},X.apply(this,arguments)}function K(e,r){return Ft(e)||Lt(e,r)||At(e,r)||Bt()}function Bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{al as Ze,am as Q,r as _,bR as vt,an as mt,s as J,bd as bt,be as yt,x as oe,t as Ve,g as Tt,bS as kt,j as Z,l as Ie,m as Ot,ab as wt,T as Rt,P as St,ac as Mt,bT as _e}from"./index.3bHSf9gi.js";import{h as $t}from"./moment.C3j7ZXd7.js";import{s as Ne}from"./sprintf.D7DtBTRn.js";import{w as _t}from"./withCalculatedWidth.Dl_TDMaA.js";import{u as Et}from"./useBasicWidgetState.CSKMY_WY.js";import"./FormClearHelper.DyYuMYyM.js";var ue={},H={},ce={},le={},Ue;function xe(){if(Ue)return le;Ue=1,Object.defineProperty(le,"__esModule",{value:!0}),le.Direction=void 0;var e;return function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"}(e||(le.Direction=e={})),le}var He;function Ge(){return He||(He=1,function(e){var r=ce&&ce.__spreadArray||function(i,o,u){if(u||arguments.length===2)for(var h=0,m=o.length,g;h<m;h++)(g||!(h in o))&&(g||(g=Array.prototype.slice.call(o,0,h)),g[h]=o[h]);return i.concat(g||Array.prototype.slice.call(o))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ze(),s=xe(),v=function(i){var o=i.toString().split(".")[1];return o?o.length:0};e.getStepDecimals=v;function S(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=S;function l(i,o,u){var h=(o-i)/u,m=8,g=Number(h.toFixed(m));return parseInt(g.toString(),10)===g}e.isStepDivisible=l;function p(i,o,u,h,m,g,T){var $=1e11;if(i=Math.round(i*$)/$,!g){var D=T[o-1],x=T[o+1];if(D&&D>i)return D;if(x&&x<i)return x}if(i>h)return h;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),V=Math.floor(i*$-Math.abs(U)),W=U===0?i:V/$,A=Math.abs(U/$)<m/2?W:W+m,L=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(L))}e.normalizeValue=p;function F(i,o,u){return(i-o)/(u-o)}e.relativeValue=F;function j(i){return i===s.Direction.Up||i===s.Direction.Down}e.isVertical=j;function z(i,o,u){if(o>=u)throw new RangeError("min (".concat(o,") is equal/bigger than max (").concat(u,")"));if(i<o)throw new RangeError("value (".concat(i,") is smaller than min (").concat(o,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=z;function E(i,o,u){return i<o?o:i>u?u:i}e.checkValuesAgainstBoundaries=E;function y(i){if(!(i.length<2)&&!i.slice(1).every(function(o,u){return i[u]<=o}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=y;function d(i){var o=window.getComputedStyle(i);return{top:parseInt(o["margin-top"],10),bottom:parseInt(o["margin-bottom"],10),left:parseInt(o["margin-left"],10),right:parseInt(o["margin-right"],10)}}e.getMargin=d;function t(i){var o=window.getComputedStyle(i);return{top:parseInt(o["padding-top"],10)+parseInt(o["border-top-width"],10),bottom:parseInt(o["padding-bottom"],10)+parseInt(o["border-bottom-width"],10),left:parseInt(o["padding-left"],10)+parseInt(o["border-left-width"],10),right:parseInt(o["padding-right"],10)+parseInt(o["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,o,u){var h=u?-1:1;i.forEach(function(m,g){return f(m,h*o[g].x,o[g].y)})}e.translateThumbs=a;function c(i,o,u,h){for(var m=0,g=B(i[0],o,u,h),T=1;T<i.length;T++){var $=B(i[T],o,u,h);$<g&&(g=$,m=T)}return m}e.getClosestThumbIndex=c;function f(i,o,u){i.style.transform="translate(".concat(o,"px, ").concat(u,"px)")}e.translate=f;var b=function(i){var o=[],u=null,h=function(){for(var m=[],g=0;g<arguments.length;g++)m[g]=arguments[g];o=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,o)}))};return h};e.schd=b;function k(i,o,u){var h=i.slice(0);return h[o]=u,h}e.replaceAt=k;function I(i){var o=i.values,u=i.colors,h=i.min,m=i.max,g=i.direction,T=g===void 0?s.Direction.Right:g,$=i.rtl,D=$===void 0?!1:$;D&&T===s.Direction.Right?T=s.Direction.Left:D&&s.Direction.Left&&(T=s.Direction.Right);var x=o.slice(0).sort(function(V,W){return V-W}).map(function(V){return(V-h)/(m-h)*100}),U=x.reduce(function(V,W,A){return"".concat(V,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=I;function O(){}e.voidFn=O;function w(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=w;var M=function(i,o,u,h,m){m===void 0&&(m=function(T){return T});var g=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(T,$){var D=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var x=$.cloneNode(!0);x.innerHTML=m(o.toFixed(h)),x.style.visibility="hidden",document.body.appendChild(x),D=Math.ceil(x.getBoundingClientRect().width),document.body.removeChild(x)}return D>T?D:T},i.getBoundingClientRect().width));return g},P=function(i,o,u,h,m,g,T){T===void 0&&(T=function(x){return x});var $=[],D=function(x){var U=M(u[x],h[x],m,g,T),V=o[x].x;o.forEach(function(W,A){var L=W.x,G=M(u[A],h[A],m,g,T);x!==A&&(V>=L&&V<=L+G||V+U>=L&&V+U<=L+G)&&($.includes(A)||($.push(x),$.push(A),$=r(r([],$,!0),[x,A],!1),D(A)))})};return D(i),Array.from(new Set($.sort()))},R=function(i,o,u,h,m,g){h===void 0&&(h=.1),m===void 0&&(m=" - "),g===void 0&&(g=function(A){return A});var T=(0,e.getStepDecimals)(h),$=(0,n.useState)({}),D=$[0],x=$[1],U=(0,n.useState)(g(o[u].toFixed(T))),V=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var L={},G=i.getOffsets(),ne=P(u,G,A,o,m,T,g),fe=g(o[u].toFixed(T));if(ne.length){var ee=ne.reduce(function(te,se,ve,me){return te.length?r(r([],te,!0),[G[me[ve]].x],!1):[G[me[ve]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var he=[];ne.forEach(function(te){he.push(o[te].toFixed(T))}),fe=Array.from(new Set(he.sort(function(te,se){return parseFloat(te)-parseFloat(se)}))).map(g).join(m);var ge=Math.min.apply(Math,ee),pe=Math.max.apply(Math,ee),$e=A[ne[ee.indexOf(pe)]].getBoundingClientRect().width;L.left="".concat(Math.abs(ge-(pe+$e))/2,"px"),L.transform="translate(-50%, 0)"}else L.visibility="hidden"}W(fe),x(L)}},[i,o]),[V,D]};e.useThumbOverlap=R;function B(i,o,u,h){var m=i.getBoundingClientRect(),g=m.left,T=m.top,$=m.width,D=m.height;return j(h)?Math.abs(u-(T+D/2)):Math.abs(o-(g+$/2))}var C=function(){var i,o=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(o)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=C}(ce)),ce}var We;function It(){if(We)return H;We=1;var e=H&&H.__extends||function(){var E=function(y,d){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},E(y,d)};return function(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");E(y,d);function t(){this.constructor=y}y.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}}(),r=H&&H.__createBinding||(Object.create?function(E,y,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(y,d);(!a||("get"in a?!y.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return y[d]}}),Object.defineProperty(E,t,a)}:function(E,y,d,t){t===void 0&&(t=d),E[t]=y[d]}),n=H&&H.__setModuleDefault||(Object.create?function(E,y){Object.defineProperty(E,"default",{enumerable:!0,value:y})}:function(E,y){E.default=y}),s=H&&H.__importStar||function(E){if(E&&E.__esModule)return E;var y={};if(E!=null)for(var d in E)d!=="default"&&Object.prototype.hasOwnProperty.call(E,d)&&r(y,E,d);return n(y,E),y},v=H&&H.__spreadArray||function(E,y,d){if(d||arguments.length===2)for(var t=0,a=y.length,c;t<a;t++)(c||!(t in y))&&(c||(c=Array.prototype.slice.call(y,0,t)),c[t]=y[t]);return E.concat(c||Array.prototype.slice.call(y))};Object.defineProperty(H,"__esModule",{value:!0});var S=s(Ze()),l=Ge(),p=xe(),F=["ArrowRight","ArrowUp","k","PageUp"],j=["ArrowLeft","ArrowDown","j","PageDown"],z=function(E){e(y,E);function y(d){var t=E.call(this,d)||this;if(t.trackRef=S.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,b=a.min,k=a.max,I=t.trackRef.current;if(!I)return console.warn("No track element found."),[];var O=I.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(I);return t.getThumbs().map(function(M,P){var R={x:0,y:0},B=M.getBoundingClientRect(),C=(0,l.getMargin)(M);switch(c){case p.Direction.Right:return R.x=(C.left+w.left)*-1,R.y=((B.height-O.height)/2+w.top)*-1,R.x+=O.width*(0,l.relativeValue)(f[P],b,k)-B.width/2,R;case p.Direction.Left:return R.x=(C.right+w.right)*-1,R.y=((B.height-O.height)/2+w.top)*-1,R.x+=O.width-O.width*(0,l.relativeValue)(f[P],b,k)-B.width/2,R;case p.Direction.Up:return R.x=((B.width-O.width)/2+C.left+w.left)*-1,R.y=-w.left,R.y+=O.height-O.height*(0,l.relativeValue)(f[P],b,k)-B.height/2,R;case p.Direction.Down:return R.x=((B.width-O.width)/2+C.left+w.left)*-1,R.y=-w.left,R.y+=O.height*(0,l.relativeValue)(f[P],b,k)-B.height/2,R;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(b,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):b<=t.state.thumbZIndexes[f]?b:b-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,b=c.onChange,k=c.step,I=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=I||O===p.Direction.Left||O===p.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):j.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){w&&t.fireOnFinalChange()}):w&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,b=f.draggedThumbIndex,k=f.draggedTrackPos,I=t.props,O=I.direction,w=I.min,M=I.max,P=I.onChange,R=I.values,B=I.step,C=I.rtl;if(b===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var o=i.getBoundingClientRect(),u=(0,l.isVertical)(O)?o.height:o.width;if(k[0]!==-1&&k[1]!==-1){var h=a-k[0],m=c-k[1],g=0;switch(O){case p.Direction.Right:case p.Direction.Left:g=h/u*(M-w);break;case p.Direction.Down:case p.Direction.Up:g=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(C&&(g*=-1),Math.abs(g)>=B/2){for(var T=0;T<t.thumbRefs.length;T++){if(R[T]===M&&Math.sign(g)===1||R[T]===w&&Math.sign(g)===-1)return;var $=R[T]+g;$>M?g=M-R[T]:$<w&&(g=w-R[T])}for(var D=R.slice(0),T=0;T<t.thumbRefs.length;T++)D=(0,l.replaceAt)(D,T,t.normalizeValue(R[T]+g,T));t.setState({draggedTrackPos:[a,c]}),P(D)}}else{var x=0;switch(O){case p.Direction.Right:x=(a-o.left)/u*(M-w)+w;break;case p.Direction.Left:x=(u-(a-o.left))/u*(M-w)+w;break;case p.Direction.Down:x=(c-o.top)/u*(M-w)+w;break;case p.Direction.Up:x=(u-(c-o.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}C&&(x=M+w-x),Math.abs(R[b]-x)>=B/2&&P((0,l.replaceAt)(R,b,t.normalizeValue(x,b)))}},t.normalizeValue=function(a,c){var f=t.props,b=f.min,k=f.max,I=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,b,k,I,O,w)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=S.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),b=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),I=[],O=0;O<t.numOfMarks+1;O++){var w=9999,M=9999;if(t.markRefs[O].current){var P=t.markRefs[O].current.getBoundingClientRect();w=P.height,M=P.width}t.props.direction===p.Direction.Left||t.props.direction===p.Direction.Right?I.push([Math.round(c/t.numOfMarks*O+b-M/2),-Math.round((w-f)/2)]):I.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:I})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return S.createRef()}),t.updateMarkRefs(d),t}return y.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(b){return(0,l.checkBoundaries)(b,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(b){(0,l.isStepDivisible)(c,b,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},y.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,b=a.step,k=a.values,I=a.rtl;(d.max!==c||d.min!==f||d.step!==b)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),I),(d.max!==c||d.min!==f||d.step!==b||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,b)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},y.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},y.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,b=t.renderThumb,k=t.renderMark,I=k===void 0?function(){return null}:k,O=t.values,w=t.min,M=t.max,P=t.allowOverlap,R=t.disabled,B=this.state,C=B.draggedThumbIndex,i=B.thumbZIndexes,o=B.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:C>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":O.length===1&&!R?"pointer":"inherit"},onMouseDown:R?l.voidFn:this.onMouseDownTrack,onTouchStart:R?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:R,children:v(v([],o.map(function(u,h,m){return I({props:{style:d.props.direction===p.Direction.Left||d.props.direction===p.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(h),ref:d.markRefs[h]},index:h})}),!0),O.map(function(u,h){var m=d.state.draggedThumbIndex===h;return b({index:h,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[h],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:h,tabIndex:R?void 0:0,"aria-valuemax":P?M:O[h+1]||M,"aria-valuemin":P?w:O[h-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[h],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},y.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:p.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},y}(S.Component);return H.default=z,H}var qe;function xt(){return qe||(qe=1,function(e){var r=ue&&ue.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(It());e.Range=n.default;var s=Ge();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return s.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return s.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return s.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return s.checkValuesAgainstBoundaries}});var v=xe();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return v.Direction}})}(ue)),ue}var Je=xt();function Ke(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function be(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ke(Object(n),!0).forEach(function(s){Ct(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Ct(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ye=Q("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$disabled,S=e.$isDragged,l=r.sizing,p="inherit";return v?p="not-allowed":S?p="grabbing":s.length===1&&(p="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:p,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var de=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$min,S=e.$max,l=e.$disabled,p=r.colors,F=r.borders,j=r.direction,z=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,background:Je.getTrackBackground({values:s,colors:s.length===1?[l?p.borderOpaque:p.primary,l?p.backgroundSecondary:p.borderOpaque]:[l?p.backgroundSecondary:p.borderOpaque,l?p.borderOpaque:p.primary,l?p.backgroundSecondary:p.borderOpaque],min:v||0,max:S||0,rtl:j==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});de.displayName="InnerTrack";de.displayName="InnerTrack";de.displayName="StyledInnerTrack";var ke=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ke.displayName="Mark";ke.displayName="Mark";ke.displayName="StyledMark";var Oe=Q("div",function(e){return be(be({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Oe.displayName="Tick";Oe.displayName="Tick";Oe.displayName="StyledTick";var we=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});we.displayName="TickBar";we.displayName="TickBar";we.displayName="StyledTickBar";var Re=Q("div",function(e){var r=e.$theme,n=e.$value,s=n===void 0?[]:n,v=e.$thumbIndex,S=e.$disabled,l=s.length===2&&v===0,p=s.length===2&&v===1;return r.direction==="rtl"&&(p||l)&&(l=!l,p=!p),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:S?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:S?"not-allowed":"inherit"}});Re.displayName="Thumb";Re.displayName="Thumb";Re.displayName="StyledThumb";var Se=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Se.displayName="InnerThumb";Se.displayName="InnerThumb";Se.displayName="StyledInnerThumb";var Me=Q("div",function(e){var r=e.$disabled,n=e.$theme;return be(be({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Me.displayName="ThumbValue";Me.displayName="ThumbValue";Me.displayName="StyledThumbValue";function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(s){Pt(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Pt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},X.apply(this,arguments)}function K(e,r){return Ft(e)||Lt(e,r)||At(e,r)||Bt()}function Bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(e,r){if(e){if(typeof e=="string")return Ye(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ye(e,r)}}function Ye(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,s=new Array(r);n<r;n++)s[n]=e[n];return s}function Lt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s=[],v=!0,S=!1,l,p;try{for(n=n.call(e);!(v=(l=n.next()).done)&&(s.push(l.value),!(r&&s.length===r));v=!0);}catch(F){S=!0,p=F}finally{try{!v&&n.return!=null&&n.return()}finally{if(S)throw p}}return s}}function Ft(e){if(Array.isArray(e))return e}var jt=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function zt(e){var r=e.overrides,n=r===void 0?{}:r,s=e.disabled,v=s===void 0?!1:s,S=e.marks,l=S===void 0?!1:S,p=e.onChange,F=p===void 0?function(){}:p,j=e.onFinalChange,z=j===void 0?function(){}:j,E=e.min,y=E===void 0?0:E,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,b=f===void 0?!1:f,k=e.valueToLabel,I=k===void 0?function(Y){return Y}:k,O=e.value,w=_.useContext(vt),M=_.useState(!1),P=K(M,2),R=P[0],B=P[1],C=_.useState(!1),i=K(C,2),o=i[0],u=i[1],h=_.useState(!1),m=K(h,2),g=m[0],T=m[1],$=_.useState(-1),D=K($,2),x=D[0],U=D[1],V=_.useCallback(function(Y){mt(Y)&&T(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=_.useCallback(function(Y){g!==!1&&T(!1),U(-1)},[]),A=jt(O),L={$disabled:v,$step:c,$min:y,$max:t,$marks:l,$value:A,$isFocusVisible:g},G=J(n.Root,ye),ne=K(G,2),fe=ne[0],ee=ne[1],he=J(n.Track,Te),ge=K(he,2),pe=ge[0],$e=ge[1],te=J(n.InnerTrack,de),se=K(te,2),ve=se[0],me=se[1],Qe=J(n.Thumb,Re),Ce=K(Qe,2),et=Ce[0],tt=Ce[1],rt=J(n.InnerThumb,Se),De=K(rt,2),nt=De[0],at=De[1],it=J(n.ThumbValue,Me),Pe=K(it,2),ot=Pe[0],st=Pe[1],ut=J(n.Tick,Oe),Be=K(ut,2),Ae=Be[0],Le=Be[1],ct=J(n.TickBar,we),Fe=K(ct,2),lt=Fe[0],dt=Fe[1],ft=J(n.Mark,ke),je=K(ft,2),ht=je[0],gt=je[1];return _.createElement(fe,X({"data-baseweb":"slider"},L,ee,{onFocus:yt(ee,V),onBlur:bt(ee,W)}),_.createElement(Je.Range,X({step:c,min:y,max:t,values:A,disabled:v,onChange:function(N){return F({value:N})},onFinalChange:function(N){return z({value:N})},rtl:w.direction==="rtl",renderTrack:function(N){var re=N.props,q=N.children,ae=N.isDragged;return _.createElement(pe,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},L,$e),_.createElement(ve,X({$isDragged:ae,ref:re.ref},L,me),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,ze=b||(!!q&&o||!q&&R||ae)&&!v;return _.createElement(et,X({},re,{onMouseEnter:function(){q===0?B(!0):u(!0)},onMouseLeave:function(){q===0?B(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:Dt({},re.style)},L,tt,{$isFocusVisible:g&&x===q}),ze&&_.createElement(ot,X({$thumbIndex:q,$isDragged:ae},L,st),I(A[q])),ze&&_.createElement(nt,X({$thumbIndex:q,$isDragged:ae},L,at)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return _.createElement(ht,X({$markIndex:q},re,L,gt))}}:{})),_.createElement(lt,X({},L,dt),_.createElement(Ae,X({},L,Le),I(y)),_.createElement(Ae,X({},L,Le),I(t))))}const Vt=oe("div",{target:"e10fdlpp0"})({position:"relative",":focus-within:has(:focus-visible)":{"--slider-focused":1}}),Nt=oe("div",{target:"e10fdlpp1"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray60:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,boxShadow:n?`0 0 0 0.2rem ${Ve(r.colors.primary,.5)}`:"none",":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${Ve(r.colors.primary,.5)}`}})),Ut=oe("div",{target:"e10fdlpp2"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray60:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Ht=oe("div",{target:"e10fdlpp3"})({flex:1}),Wt=oe("div",{target:"e10fdlpp4"})(({theme:e})=>({position:"absolute",height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`})),qt=oe("div",{target:"e10fdlpp5"})(({theme:e,isHovered:r,isDisabled:n})=>({position:"absolute",left:0,right:0,top:"100%",display:"flex",justifyContent:"space-between",pointerEvents:"none",marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:r?1:"var(--slider-focused, 0)",transition:r?"none":"opacity 300ms 200ms"}));function Kt({minLabel:e,maxLabel:r,isHovered:n,isDisabled:s}){return Ie(qt,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:s,children:[Z("span",{children:e}),Z("span",{children:r})]})}function Xt({disabled:e,element:r,widgetMgr:n,fragmentId:s}){const[v,S]=Et({getStateFromWidgetMgr:Yt,getDefaultStateFromProto:Zt,getCurrStateFromProto:Gt,updateWidgetMgrState:Jt,element:r,widgetMgr:n,fragmentId:s}),[l,p]=_.useState(v),[F,j]=_.useState(!1),[z,E]=_.useState(!1),y=_.useCallback(()=>j(!0),[]),d=_.useCallback(()=>j(!1),[]),t=_.useRef(null),[a]=_.useState([]),[c]=_.useState([]),f=Tt(),b=l.map(C=>Ee(C,r)),k=Ee(r.min,r),I=Ee(r.max,r),O=r.label;_.useEffect(()=>{p(v)},[v]);const w=_.useCallback(({value:C})=>{S({value:C,fromUi:!0}),E(!1)},[S]),M=_.useCallback(({value:C})=>{p(C),E(!0)},[]),P=_.useCallback(_.forwardRef(function(i,o){const{$thumbIndex:u}=i,h=u||0;a[h]=o,c[h]||=_.createRef();const m=kt(i,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),g=b[h];return Z(Nt,{...m,disabled:i.$disabled===!0,isDragged:i.$isDragged===!0,ref:a[h],"aria-valuetext":g,"aria-label":O,children:Z(Ut,{"data-testid":"stSliderThumbValue",disabled:i.$disabled===!0,ref:c[h],children:g})})}),[]);_.useEffect(()=>{c.map((m,g)=>{m.current&&(m.current.innerText=b[g])}),a.map((m,g)=>{m.current&&m.current.setAttribute("aria-valuetext",b[g])});const C=t.current??null,i=a[0].current,o=a[1]?.current,u=c[0].current,h=c[1]?.current;tr(C,i,o,u,h)});const R=_.useCallback(({$disabled:C})=>({height:f.spacing.twoXS,...C?{background:f.colors.darkenedBgMix25}:{}}),[f.colors.darkenedBgMix25,f.spacing.twoXS]),B=_.useCallback(_.forwardRef(function(i,o){const{children:u,...h}=i;return Ie(Ht,{children:[Z(Wt,{ref:o,children:u}),Z(de,{...h,style:R({$disabled:i.$disabled})})]})}),[]);return Ie(Vt,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:y,onMouseLeave:d,children:[Z(Mt,{label:r.label,disabled:e,labelVisibility:Ot(r.labelVisibility?.value),children:r.help&&Z(wt,{children:Z(Rt,{content:r.help,placement:St.TOP_RIGHT})})}),Z(zt,{min:r.min,max:r.max,step:r.step,value:er(l,r),onChange:M,onFinalChange:w,disabled:e,overrides:{Thumb:P,Track:{style:{backgroundColor:"none !important",paddingLeft:f.spacing.none,paddingRight:f.spacing.none,paddingTop:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`,paddingBottom:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`}},InnerTrack:B,TickBar:{component:Kt,props:{minLabel:k,maxLabel:I,isHovered:F||z,isDisabled:e}}}})]})}function Yt(e,r){return e.getDoubleArrayValue(r)}function Zt(e){return e.default}function Gt(e){return e.value}function Jt(e,r,n,s){r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},s)}function Qt(e){const{dataType:r}=e;return r===_e.DataType.DATETIME||r===_e.DataType.DATE||r===_e.DataType.TIME}function Ee(e,r){const{format:n,options:s}=r;return Qt(r)?$t.utc(e/1e3).format(n):s.length>0?Ne.sprintf(n,s[e]):Ne.sprintf(n,e)}function er(e,r){const{min:n,max:s}=r;let v=e[0],S=e.length>1?e[1]:e[0];return v>S&&(v=S),v<n&&(v=n),v>s&&(v=s),S<n&&(S=n),S>s&&(S=s),e.length>1?[v,S]:[v]}function tr(e,r,n,s,v){!e||!r||!s||(ie(e,r,s),n&&v&&(ie(e,n,v),rr(e,r,n,s,v)))}function ie(e,r,n){const s=e.getBoundingClientRect(),v=r.getBoundingClientRect(),S=n.getBoundingClientRect(),l=v.left+v.width/2,p=l-S.width/2<s.left,F=l+S.width/2>s.right;n.style.left=p?"0":"",n.style.right=F?"0":""}function rr(e,r,n,s,v){const l=e.getBoundingClientRect(),p=r.getBoundingClientRect(),F=n.getBoundingClientRect(),j=s.getBoundingClientRect(),z=v.getBoundingClientRect(),E=l.left+l.width/2,y=p.left+p.width/2,d=F.left+F.width/2,t=y-j.width/2>=l.left,a=d+z.width/2<=l.right,c=p.left-j.width>=l.left,f=F.right+z.width<=l.right,b=t?j.width/2:j.width,k=a?z.width/2:z.width,I=y+b;if(d-k-I>24){ie(e,r,s),ie(e,n,v);return}if(c&&f){s.style.left="",s.style.right=`${Math.round(p.width)}px`,v.style.left=`${Math.round(F.width)}px`,v.style.right="";return}y<E?(ie(e,r,s),v.style.left=`${Math.round(y+b+24-d)}px`,v.style.right=""):(ie(e,n,v),s.style.left="",s.style.right=`${-Math.round(d-k-24-y)}px`)}const cr=_t(_.memo(Xt));export{cr as default};