streamlit-nightly 1.53.1.dev20260116__py3-none-any.whl → 1.53.1.dev20260120__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 (103) hide show
  1. streamlit/__init__.py +0 -4
  2. streamlit/dataframe_util.py +4 -2
  3. streamlit/elements/lib/built_in_chart_utils.py +3 -0
  4. streamlit/elements/lib/column_config_utils.py +3 -1
  5. streamlit/elements/widgets/time_widgets.py +58 -7
  6. streamlit/hello/dataframe_demo.py +1 -1
  7. streamlit/static/index.html +1 -1
  8. streamlit/static/manifest.json +300 -300
  9. streamlit/static/static/js/{ErrorOutline.esm.CiSfK8ht.js → ErrorOutline.esm.CqVEQ-uJ.js} +1 -1
  10. streamlit/static/static/js/{FileDownload.esm.ItNjcEfs.js → FileDownload.esm.G-HJG6nt.js} +1 -1
  11. streamlit/static/static/js/{FileHelper.xS7f19FE.js → FileHelper.Bd4bPp0Y.js} +1 -1
  12. streamlit/static/static/js/{FormClearHelper.N8_BCinn.js → FormClearHelper.B74VElyu.js} +1 -1
  13. streamlit/static/static/js/{InputInstructions.CrsdK7CQ.js → InputInstructions.ClBLOwfm.js} +1 -1
  14. streamlit/static/static/js/{Particles.BDlTHC3I.js → Particles.CyYskark.js} +1 -1
  15. streamlit/static/static/js/{ProgressBar.Bk2qeHfS.js → ProgressBar.vWX1Igzt.js} +1 -1
  16. streamlit/static/static/js/{StreamlitSyntaxHighlighter.BcuPrPcw.js → StreamlitSyntaxHighlighter.BNhyeEtl.js} +1 -1
  17. streamlit/static/static/js/{TableChart.esm.CP7XPz8I.js → TableChart.esm.Mk-Hvy1t.js} +1 -1
  18. streamlit/static/static/js/{Toolbar.DCJcLwve.js → Toolbar.NhlhlTzK.js} +1 -1
  19. streamlit/static/static/js/{WidgetLabelHelpIconInline.BPqxu1b-.js → WidgetLabelHelpIconInline.Ch9VDnrM.js} +1 -1
  20. streamlit/static/static/js/{base-input.x4muJJ13.js → base-input.DSh9H2uv.js} +1 -1
  21. streamlit/static/static/js/{checkbox.C5r4AIaH.js → checkbox.DCFAQrRB.js} +1 -1
  22. streamlit/static/static/js/{createDownloadLinkElement.C83kkEeT.js → createDownloadLinkElement.D5zpcd24.js} +1 -1
  23. streamlit/static/static/js/{data-grid-overlay-editor.0sOWm4IB.js → data-grid-overlay-editor.GAqbIurd.js} +1 -1
  24. streamlit/static/static/js/{downloader.C_6FfoEv.js → downloader.C1MBZFo2.js} +1 -1
  25. streamlit/static/static/js/{embed.BnJ6-SK4.js → embed.CZG6oOsc.js} +1 -1
  26. streamlit/static/static/js/{es6.44_BWfFd.js → es6.toHnBzIb.js} +2 -2
  27. streamlit/static/static/js/{formatNumber.DhHZAosz.js → formatNumber.BsU-5o3V.js} +1 -1
  28. streamlit/static/static/js/{iconPosition.shOoQuRR.js → iconPosition.OKOYrH6A.js} +1 -1
  29. streamlit/static/static/js/{iframeResizer.contentWindow.savEE5Vs.js → iframeResizer.contentWindow.D6yxU4DL.js} +1 -1
  30. streamlit/static/static/js/{index.SjKkVSL7.js → index.-pgbbiGJ.js} +1 -1
  31. streamlit/static/static/js/{index.Dblsdn8d.js → index.0iCXW13-.js} +1 -1
  32. streamlit/static/static/js/{index.DfHm3P22.js → index.1sBZt_1I.js} +5 -5
  33. streamlit/static/static/js/{index.BCaCSVj6.js → index.5CwvMIZq.js} +1 -1
  34. streamlit/static/static/js/{index.CySNwKoN.js → index.AkleAg_w.js} +1 -1
  35. streamlit/static/static/js/{index.hX8_3tMP.js → index.B8mzpc1l.js} +1 -1
  36. streamlit/static/static/js/{index.Ch1TdQMG.js → index.BHWCIpbw.js} +1 -1
  37. streamlit/static/static/js/{index.BNzuyXeN.js → index.BU8aUWlo.js} +1 -1
  38. streamlit/static/static/js/{index.C6uOmY9O.js → index.BVbT0yWJ.js} +1 -1
  39. streamlit/static/static/js/{index.CQgiNpC7.js → index.BW0F_Pbs.js} +1 -1
  40. streamlit/static/static/js/{index.BYY3iuVE.js → index.BXqtIpgi.js} +1 -1
  41. streamlit/static/static/js/{index.SVJGpnpy.js → index.Bh0_7PvD.js} +1 -1
  42. streamlit/static/static/js/{index.BHpLZ7X6.js → index.Bhr3IHkD.js} +1 -1
  43. streamlit/static/static/js/{index.B6ewTTej.js → index.BkYhb--A.js} +1 -1
  44. streamlit/static/static/js/{index.DIsNrJpC.js → index.Blo8DAcU.js} +1 -1
  45. streamlit/static/static/js/{index.DcdD0ROn.js → index.Bs4E_0D7.js} +1 -1
  46. streamlit/static/static/js/{index.AdijUi9Z.js → index.C6LOxzFC.js} +1 -1
  47. streamlit/static/static/js/{index.B8Of3XXR.js → index.CGt5hnLi.js} +1 -1
  48. streamlit/static/static/js/{index.jZin0w6_.js → index.CJCEiqv2.js} +1 -1
  49. streamlit/static/static/js/{index.B5HlOnvq.js → index.COcj-WpN.js} +1 -1
  50. streamlit/static/static/js/{index.BNvP8E5Q.js → index.CV4niwLB.js} +1 -1
  51. streamlit/static/static/js/{index.C1coXTgf.js → index.CXLtvxrQ.js} +1 -1
  52. streamlit/static/static/js/{index.pzQTLx9j.js → index.C_w1nWis.js} +1 -1
  53. streamlit/static/static/js/{index.BZXk3Qxq.js → index.Ch4X_YdF.js} +1 -1
  54. streamlit/static/static/js/{index.DBtWixG1.js → index.CqywI2eW.js} +1 -1
  55. streamlit/static/static/js/{index.D_ziFad8.js → index.D0h2EJ_T.js} +1 -1
  56. streamlit/static/static/js/{index.D8BQH06Z.js → index.D7Hgmilz.js} +1 -1
  57. streamlit/static/static/js/{index.HjydQ4bj.js → index.D94k70Hg.js} +1 -1
  58. streamlit/static/static/js/{index.CF88nImM.js → index.DGrQJk9x.js} +1 -1
  59. streamlit/static/static/js/{index.CFlGfFvq.js → index.DJ8OTQbk.js} +1 -1
  60. streamlit/static/static/js/{index.BqtgAGnG.js → index.DR8Ty3j4.js} +1 -1
  61. streamlit/static/static/js/{index.BT7o4A9V.js → index.DRGDE5oo.js} +1 -1
  62. streamlit/static/static/js/{index.BhQvq6YD.js → index.DbCS2N3T.js} +1 -1
  63. streamlit/static/static/js/{index.BZI7jTDf.js → index.DhGqPx_f.js} +1 -1
  64. streamlit/static/static/js/{index.BkIReLGJ.js → index.Dl2MB5Tx.js} +1 -1
  65. streamlit/static/static/js/{index.BwnLQnAk.js → index.Dq0ZbGYZ.js} +1 -1
  66. streamlit/static/static/js/{index.DvZDNiBV.js → index.DwgEkDLk.js} +1 -1
  67. streamlit/static/static/js/{index.CrD2lwZG.js → index.E4x2UBkh.js} +1 -1
  68. streamlit/static/static/js/{index.D3LEkXqN.js → index.EOvPT8N-.js} +1 -1
  69. streamlit/static/static/js/{index.DO3HICut.js → index.MZ7ugsN-.js} +1 -1
  70. streamlit/static/static/js/{index.Bl7SMZUw.js → index.P0_E3iNi.js} +1 -1
  71. streamlit/static/static/js/{index.s44_OVd6.js → index.SBwNLdli.js} +1 -1
  72. streamlit/static/static/js/{index.BE7Rhig1.js → index.XgBfXgN1.js} +1 -1
  73. streamlit/static/static/js/{index.Ck2mQvBi.js → index.YRiVxrFw.js} +1 -1
  74. streamlit/static/static/js/{index.CZJkiRFm.js → index._t3w-7R0.js} +1 -1
  75. streamlit/static/static/js/{index.HsxzYHNf.js → index.dGk9EWLh.js} +1 -1
  76. streamlit/static/static/js/{index.pQvPlPcA.js → index.ia5Ub9p7.js} +1 -1
  77. streamlit/static/static/js/{index.DiwhD0Ic.js → index.qjO5OK90.js} +5 -5
  78. streamlit/static/static/js/{input.jAD-v9D6.js → input.Bavj6HHJ.js} +1 -1
  79. streamlit/static/static/js/{main.Cas0fuOs.js → main.dnUTEH_j.js} +1 -1
  80. streamlit/static/static/js/{memory.ENruL8Qk.js → memory.Czf1Sxzc.js} +1 -1
  81. streamlit/static/static/js/{number-overlay-editor.DAOTdulh.js → number-overlay-editor.CRQIke3a.js} +1 -1
  82. streamlit/static/static/js/{pandasStylerUtils.DChYgcPq.js → pandasStylerUtils.agmr-LQ2.js} +1 -1
  83. streamlit/static/static/js/{sandbox.DWZYRCm0.js → sandbox.BlCiIomw.js} +1 -1
  84. streamlit/static/static/js/{styled-components.3lwVqgRW.js → styled-components.Bz3KSbhj.js} +1 -1
  85. streamlit/static/static/js/{throttle.DfOW1Cns.js → throttle.B1o314FW.js} +1 -1
  86. streamlit/static/static/js/{timepicker.CXHgL5f9.js → timepicker.3x4ndo9E.js} +1 -1
  87. streamlit/static/static/js/{toConsumableArray.DiW0GSDV.js → toConsumableArray.BeHbBK8g.js} +1 -1
  88. streamlit/static/static/js/uniqueId.Zn1vZBLX.js +1 -0
  89. streamlit/static/static/js/{useBasicWidgetState.DnPEt_f3.js → useBasicWidgetState.CFP4_PTk.js} +1 -1
  90. streamlit/static/static/js/{useIntlLocale.BZEGSOVD.js → useIntlLocale.BJubkaPQ.js} +1 -1
  91. streamlit/static/static/js/{useTextInputAutoExpand.MGVZMqyt.js → useTextInputAutoExpand.DBGwhM4R.js} +1 -1
  92. streamlit/static/static/js/{useUpdateUiValue.CPl6CEx3.js → useUpdateUiValue.CyufNQfR.js} +1 -1
  93. streamlit/static/static/js/{useWaveformController.DOpzDyZu.js → useWaveformController.Dj5h0D8Y.js} +1 -1
  94. streamlit/static/static/js/{withCalculatedWidth.DgKFTeif.js → withCalculatedWidth.D0IRb-7w.js} +1 -1
  95. streamlit/static/static/js/{withFullScreenWrapper.K1jkwhPu.js → withFullScreenWrapper.CHBnw0Co.js} +1 -1
  96. streamlit/user_info.py +0 -39
  97. {streamlit_nightly-1.53.1.dev20260116.dist-info → streamlit_nightly-1.53.1.dev20260120.dist-info}/METADATA +1 -1
  98. {streamlit_nightly-1.53.1.dev20260116.dist-info → streamlit_nightly-1.53.1.dev20260120.dist-info}/RECORD +102 -102
  99. streamlit/static/static/js/uniqueId.Dfi3SGKZ.js +0 -1
  100. {streamlit_nightly-1.53.1.dev20260116.data → streamlit_nightly-1.53.1.dev20260120.data}/scripts/streamlit.cmd +0 -0
  101. {streamlit_nightly-1.53.1.dev20260116.dist-info → streamlit_nightly-1.53.1.dev20260120.dist-info}/WHEEL +0 -0
  102. {streamlit_nightly-1.53.1.dev20260116.dist-info → streamlit_nightly-1.53.1.dev20260120.dist-info}/entry_points.txt +0 -0
  103. {streamlit_nightly-1.53.1.dev20260116.dist-info → streamlit_nightly-1.53.1.dev20260120.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- import{al as Ye,am as Q,r as _,bR as pt,an as vt,w as J,bo as mt,bp as bt,z as oe,l as yt,bS as Tt,j as Z,q as Ie,o as De,p as kt,ab as Ot,ac as wt,bT as de}from"./index.DiwhD0Ic.js";import{h as Rt}from"./moment.C7qA8nIE.js";import{w as St}from"./withCalculatedWidth.DgKFTeif.js";import{u as Mt}from"./useBasicWidgetState.DnPEt_f3.js";import{f as $t}from"./formatMoment.C6Hwn6X5.js";import{f as _t}from"./formatNumber.DhHZAosz.js";import"./FormClearHelper.N8_BCinn.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var ue={},H={},ce={},le={},Ne;function xe(){if(Ne)return le;Ne=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 Ue;function Ze(){return Ue||(Ue=1,(function(e){var r=ce&&ce.__spreadArray||function(i,o,u){if(u||arguments.length===2)for(var g=0,m=o.length,p;g<m;g++)(p||!(g in o))&&(p||(p=Array.prototype.slice.call(o,0,g)),p[g]=o[g]);return i.concat(p||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=Ye(),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 g=(o-i)/u,m=8,p=Number(g.toFixed(m));return parseInt(p.toString(),10)===p}e.isStepDivisible=l;function h(i,o,u,g,m,p,b){var $=1e11;if(i=Math.round(i*$)/$,!p){var x=b[o-1],E=b[o+1];if(x&&x>i)return x;if(E&&E<i)return E}if(i>g)return g;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/$,L=Math.abs(U/$)<m/2?W:W+m,A=(0,e.getStepDecimals)(m);return parseFloat(L.toFixed(A))}e.normalizeValue=h;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 I(i,o,u){return i<o?o:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(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=T;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 g=u?-1:1;i.forEach(function(m,p){return f(m,g*o[p].x,o[p].y)})}e.translateThumbs=a;function c(i,o,u,g){for(var m=0,p=B(i[0],o,u,g),b=1;b<i.length;b++){var $=B(i[b],o,u,g);$<p&&(p=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,o,u){i.style.transform="translate(".concat(o,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var o=[],u=null,g=function(){for(var m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];o=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,o)}))};return g};e.schd=y;function k(i,o,u){var g=i.slice(0);return g[o]=u,g}e.replaceAt=k;function D(i){var o=i.values,u=i.colors,g=i.min,m=i.max,p=i.direction,b=p===void 0?s.Direction.Right:p,$=i.rtl,x=$===void 0?!1:$;x&&b===s.Direction.Right?b=s.Direction.Left:x&&s.Direction.Left&&(b=s.Direction.Right);var E=o.slice(0).sort(function(V,W){return V-W}).map(function(V){return(V-g)/(m-g)*100}),U=E.reduce(function(V,W,L){return"".concat(V,", ").concat(u[L]," ").concat(W,"%, ").concat(u[L+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;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,g,m){m===void 0&&(m=function(b){return b});var p=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var x=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(o.toFixed(g)),E.style.visibility="hidden",document.body.appendChild(E),x=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return x>b?x:b},i.getBoundingClientRect().width));return p},P=function(i,o,u,g,m,p,b){b===void 0&&(b=function(E){return E});var $=[],x=function(E){var U=M(u[E],g[E],m,p,b),V=o[E].x;o.forEach(function(W,L){var A=W.x,G=M(u[L],g[L],m,p,b);E!==L&&(V>=A&&V<=A+G||V+U>=A&&V+U<=A+G)&&($.includes(L)||($.push(E),$.push(L),$=r(r([],$,!0),[E,L],!1),x(L)))})};return x(i),Array.from(new Set($.sort()))},R=function(i,o,u,g,m,p){g===void 0&&(g=.1),m===void 0&&(m=" - "),p===void 0&&(p=function(L){return L});var b=(0,e.getStepDecimals)(g),$=(0,n.useState)({}),x=$[0],E=$[1],U=(0,n.useState)(p(o[u].toFixed(b))),V=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var L=i.getThumbs();if(L.length<1)return;var A={},G=i.getOffsets(),ne=P(u,G,L,o,m,b,p),he=p(o[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,se,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(o[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,se){return parseFloat(te)-parseFloat(se)}))).map(p).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ee=L[ne[ee.indexOf(ve)]].getBoundingClientRect().width;A.left="".concat(Math.abs(pe-(ve+Ee))/2,"px"),A.transform="translate(-50%, 0)"}else A.visibility="hidden"}W(he),E(A)}},[i,o]),[V,x]};e.useThumbOverlap=R;function B(i,o,u,g){var m=i.getBoundingClientRect(),p=m.left,b=m.top,$=m.width,x=m.height;return j(g)?Math.abs(u-(b+x/2)):Math.abs(o-(p+$/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 He;function Et(){if(He)return H;He=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=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])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),s=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},v=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var S=s(Ye()),l=Ze(),h=xe(),F=["ArrowRight","ArrowUp","k","PageUp"],j=["ArrowLeft","ArrowDown","j","PageDown"],z=(function(I){e(T,I);function T(d){var t=I.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,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var O=D.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var R={x:0,y:0},B=M.getBoundingClientRect(),C=(0,l.getMargin)(M);switch(c){case h.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],y,k)-B.width/2,R;case h.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],y,k)-B.width/2,R;case h.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],y,k)-B.height/2,R;case h.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],y,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(y){var k;return(k=y.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(y){return y.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(y){var k;return(k=y.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(y){return y.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(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-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,y=c.onChange,k=c.step,D=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||O===h.Direction.Left||O===h.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((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}),y((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,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,O=D.direction,w=D.min,M=D.max,P=D.onChange,R=D.values,B=D.step,C=D.rtl;if(y===-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 g=a-k[0],m=c-k[1],p=0;switch(O){case h.Direction.Right:case h.Direction.Left:p=g/u*(M-w);break;case h.Direction.Down:case h.Direction.Up:p=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(C&&(p*=-1),Math.abs(p)>=B/2){for(var b=0;b<t.thumbRefs.length;b++){if(R[b]===M&&Math.sign(p)===1||R[b]===w&&Math.sign(p)===-1)return;var $=R[b]+p;$>M?p=M-R[b]:$<w&&(p=w-R[b])}for(var x=R.slice(0),b=0;b<t.thumbRefs.length;b++)x=(0,l.replaceAt)(x,b,t.normalizeValue(R[b]+p,b));t.setState({draggedTrackPos:[a,c]}),P(x)}}else{var E=0;switch(O){case h.Direction.Right:E=(a-o.left)/u*(M-w)+w;break;case h.Direction.Left:E=(u-(a-o.left))/u*(M-w)+w;break;case h.Direction.Down:E=(c-o.top)/u*(M-w)+w;break;case h.Direction.Up:E=(u-(c-o.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}C&&(E=M+w-E),Math.abs(R[y]-E)>=B/2&&P((0,l.replaceAt)(R,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,y,k,D,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),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],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===h.Direction.Left||t.props.direction===h.Direction.Right?D.push([Math.round(c/t.numOfMarks*O+y-M/2),-Math.round((w-f)/2)]):D.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},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 T.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(y){return(0,l.checkBoundaries)(y,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(y){(0,l.isStepDivisible)(c,y,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.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,y)||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.")}))},T.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)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=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,g,m){return D({props:{style:d.props.direction===h.Direction.Left||d.props.direction===h.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(g),ref:d.markRefs[g]},index:g})}),!0),O.map(function(u,g){var m=d.state.draggedThumbIndex===g;return y({index:g,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[g],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:g,tabIndex:R?void 0:0,"aria-valuemax":P?M:O[g+1]||M,"aria-valuemin":P?w:O[g-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[g],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:h.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(S.Component);return H.default=z,H}var We;function It(){return We||(We=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(Et());e.Range=n.default;var s=Ze();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 Ge=It();function qe(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 Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(s){Dt(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Dt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=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,h="inherit";return v?h="not-allowed":S?h="grabbing":s.length===1&&(h="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:h,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=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,h=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:Ge.getTrackBackground({values:s,colors:s.length===1?[l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque]:[l?h.backgroundSecondary:h.borderOpaque,l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque],min:v||0,max:S||0,rtl:j==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=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}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=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,h=s.length===2&&v===1;return r.direction==="rtl"&&(h||l)&&(l=!l,h=!h),{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"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=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}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({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"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";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 xt(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}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 At(e)||Lt(e,r)||Bt(e,r)||Pt()}function Pt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{al as Ye,am as Q,r as _,bR as pt,an as vt,w as J,bo as mt,bp as bt,z as oe,l as yt,bS as Tt,j as Z,q as Ie,o as De,p as kt,ab as Ot,ac as wt,bT as de}from"./index.qjO5OK90.js";import{h as Rt}from"./moment.C7qA8nIE.js";import{w as St}from"./withCalculatedWidth.D0IRb-7w.js";import{u as Mt}from"./useBasicWidgetState.CFP4_PTk.js";import{f as $t}from"./formatMoment.C6Hwn6X5.js";import{f as _t}from"./formatNumber.BsU-5o3V.js";import"./FormClearHelper.B74VElyu.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var ue={},H={},ce={},le={},Ne;function xe(){if(Ne)return le;Ne=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 Ue;function Ze(){return Ue||(Ue=1,(function(e){var r=ce&&ce.__spreadArray||function(i,o,u){if(u||arguments.length===2)for(var g=0,m=o.length,p;g<m;g++)(p||!(g in o))&&(p||(p=Array.prototype.slice.call(o,0,g)),p[g]=o[g]);return i.concat(p||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=Ye(),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 g=(o-i)/u,m=8,p=Number(g.toFixed(m));return parseInt(p.toString(),10)===p}e.isStepDivisible=l;function h(i,o,u,g,m,p,b){var $=1e11;if(i=Math.round(i*$)/$,!p){var x=b[o-1],E=b[o+1];if(x&&x>i)return x;if(E&&E<i)return E}if(i>g)return g;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/$,L=Math.abs(U/$)<m/2?W:W+m,A=(0,e.getStepDecimals)(m);return parseFloat(L.toFixed(A))}e.normalizeValue=h;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 I(i,o,u){return i<o?o:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(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=T;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 g=u?-1:1;i.forEach(function(m,p){return f(m,g*o[p].x,o[p].y)})}e.translateThumbs=a;function c(i,o,u,g){for(var m=0,p=B(i[0],o,u,g),b=1;b<i.length;b++){var $=B(i[b],o,u,g);$<p&&(p=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,o,u){i.style.transform="translate(".concat(o,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var o=[],u=null,g=function(){for(var m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];o=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,o)}))};return g};e.schd=y;function k(i,o,u){var g=i.slice(0);return g[o]=u,g}e.replaceAt=k;function D(i){var o=i.values,u=i.colors,g=i.min,m=i.max,p=i.direction,b=p===void 0?s.Direction.Right:p,$=i.rtl,x=$===void 0?!1:$;x&&b===s.Direction.Right?b=s.Direction.Left:x&&s.Direction.Left&&(b=s.Direction.Right);var E=o.slice(0).sort(function(V,W){return V-W}).map(function(V){return(V-g)/(m-g)*100}),U=E.reduce(function(V,W,L){return"".concat(V,", ").concat(u[L]," ").concat(W,"%, ").concat(u[L+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;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,g,m){m===void 0&&(m=function(b){return b});var p=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var x=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(o.toFixed(g)),E.style.visibility="hidden",document.body.appendChild(E),x=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return x>b?x:b},i.getBoundingClientRect().width));return p},P=function(i,o,u,g,m,p,b){b===void 0&&(b=function(E){return E});var $=[],x=function(E){var U=M(u[E],g[E],m,p,b),V=o[E].x;o.forEach(function(W,L){var A=W.x,G=M(u[L],g[L],m,p,b);E!==L&&(V>=A&&V<=A+G||V+U>=A&&V+U<=A+G)&&($.includes(L)||($.push(E),$.push(L),$=r(r([],$,!0),[E,L],!1),x(L)))})};return x(i),Array.from(new Set($.sort()))},R=function(i,o,u,g,m,p){g===void 0&&(g=.1),m===void 0&&(m=" - "),p===void 0&&(p=function(L){return L});var b=(0,e.getStepDecimals)(g),$=(0,n.useState)({}),x=$[0],E=$[1],U=(0,n.useState)(p(o[u].toFixed(b))),V=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var L=i.getThumbs();if(L.length<1)return;var A={},G=i.getOffsets(),ne=P(u,G,L,o,m,b,p),he=p(o[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,se,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(o[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,se){return parseFloat(te)-parseFloat(se)}))).map(p).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ee=L[ne[ee.indexOf(ve)]].getBoundingClientRect().width;A.left="".concat(Math.abs(pe-(ve+Ee))/2,"px"),A.transform="translate(-50%, 0)"}else A.visibility="hidden"}W(he),E(A)}},[i,o]),[V,x]};e.useThumbOverlap=R;function B(i,o,u,g){var m=i.getBoundingClientRect(),p=m.left,b=m.top,$=m.width,x=m.height;return j(g)?Math.abs(u-(b+x/2)):Math.abs(o-(p+$/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 He;function Et(){if(He)return H;He=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=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])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),s=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},v=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var S=s(Ye()),l=Ze(),h=xe(),F=["ArrowRight","ArrowUp","k","PageUp"],j=["ArrowLeft","ArrowDown","j","PageDown"],z=(function(I){e(T,I);function T(d){var t=I.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,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var O=D.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var R={x:0,y:0},B=M.getBoundingClientRect(),C=(0,l.getMargin)(M);switch(c){case h.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],y,k)-B.width/2,R;case h.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],y,k)-B.width/2,R;case h.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],y,k)-B.height/2,R;case h.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],y,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(y){var k;return(k=y.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(y){return y.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(y){var k;return(k=y.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(y){return y.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(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-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,y=c.onChange,k=c.step,D=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||O===h.Direction.Left||O===h.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((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}),y((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,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,O=D.direction,w=D.min,M=D.max,P=D.onChange,R=D.values,B=D.step,C=D.rtl;if(y===-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 g=a-k[0],m=c-k[1],p=0;switch(O){case h.Direction.Right:case h.Direction.Left:p=g/u*(M-w);break;case h.Direction.Down:case h.Direction.Up:p=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(C&&(p*=-1),Math.abs(p)>=B/2){for(var b=0;b<t.thumbRefs.length;b++){if(R[b]===M&&Math.sign(p)===1||R[b]===w&&Math.sign(p)===-1)return;var $=R[b]+p;$>M?p=M-R[b]:$<w&&(p=w-R[b])}for(var x=R.slice(0),b=0;b<t.thumbRefs.length;b++)x=(0,l.replaceAt)(x,b,t.normalizeValue(R[b]+p,b));t.setState({draggedTrackPos:[a,c]}),P(x)}}else{var E=0;switch(O){case h.Direction.Right:E=(a-o.left)/u*(M-w)+w;break;case h.Direction.Left:E=(u-(a-o.left))/u*(M-w)+w;break;case h.Direction.Down:E=(c-o.top)/u*(M-w)+w;break;case h.Direction.Up:E=(u-(c-o.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}C&&(E=M+w-E),Math.abs(R[y]-E)>=B/2&&P((0,l.replaceAt)(R,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,y,k,D,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),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],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===h.Direction.Left||t.props.direction===h.Direction.Right?D.push([Math.round(c/t.numOfMarks*O+y-M/2),-Math.round((w-f)/2)]):D.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},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 T.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(y){return(0,l.checkBoundaries)(y,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(y){(0,l.isStepDivisible)(c,y,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.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,y)||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.")}))},T.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)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=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,g,m){return D({props:{style:d.props.direction===h.Direction.Left||d.props.direction===h.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(g),ref:d.markRefs[g]},index:g})}),!0),O.map(function(u,g){var m=d.state.draggedThumbIndex===g;return y({index:g,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[g],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:g,tabIndex:R?void 0:0,"aria-valuemax":P?M:O[g+1]||M,"aria-valuemin":P?w:O[g-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[g],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:h.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(S.Component);return H.default=z,H}var We;function It(){return We||(We=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(Et());e.Range=n.default;var s=Ze();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 Ge=It();function qe(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 Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(s){Dt(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Dt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=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,h="inherit";return v?h="not-allowed":S?h="grabbing":s.length===1&&(h="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:h,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=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,h=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:Ge.getTrackBackground({values:s,colors:s.length===1?[l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque]:[l?h.backgroundSecondary:h.borderOpaque,l?h.borderOpaque:h.primary,l?h.backgroundSecondary:h.borderOpaque],min:v||0,max:S||0,rtl:j==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=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}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=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,h=s.length===2&&v===1;return r.direction==="rtl"&&(h||l)&&(l=!l,h=!h),{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"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=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}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({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"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";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 xt(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}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 At(e)||Lt(e,r)||Bt(e,r)||Pt()}function Pt(){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 Bt(e,r){if(e){if(typeof e=="string")return Xe(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 Xe(e,r)}}function Xe(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,h;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,h=F}finally{try{!v&&n.return!=null&&n.return()}finally{if(S)throw h}}return s}}function At(e){if(Array.isArray(e))return e}var Ft=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 jt(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,h=e.onChange,F=h===void 0?function(){}:h,j=e.onFinalChange,z=j===void 0?function(){}:j,I=e.min,T=I===void 0?0:I,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,y=f===void 0?!1:f,k=e.valueToLabel,D=k===void 0?function(Y){return Y}:k,O=e.value,w=_.useContext(pt),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],g=_.useState(!1),m=K(g,2),p=m[0],b=m[1],$=_.useState(-1),x=K($,2),E=x[0],U=x[1],V=_.useCallback(function(Y){vt(Y)&&b(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=_.useCallback(function(Y){p!==!1&&b(!1),U(-1)},[]),L=Ft(O),A={$disabled:v,$step:c,$min:T,$max:t,$marks:l,$value:L,$isFocusVisible:p},G=J(n.Root,ke),ne=K(G,2),he=ne[0],ee=ne[1],ge=J(n.Track,Oe),pe=K(ge,2),ve=pe[0],Ee=pe[1],te=J(n.InnerTrack,fe),se=K(te,2),me=se[0],be=se[1],Je=J(n.Thumb,Me),Ce=K(Je,2),Qe=Ce[0],et=Ce[1],tt=J(n.InnerThumb,$e),Pe=K(tt,2),rt=Pe[0],nt=Pe[1],at=J(n.ThumbValue,_e),Be=K(at,2),it=Be[0],ot=Be[1],st=J(n.Tick,Re),Le=K(st,2),Ae=Le[0],Fe=Le[1],ut=J(n.TickBar,Se),je=K(ut,2),ct=je[0],lt=je[1],dt=J(n.Mark,we),ze=K(dt,2),ft=ze[0],ht=ze[1];return _.createElement(he,X({"data-baseweb":"slider"},A,ee,{onFocus:bt(ee,V),onBlur:mt(ee,W)}),_.createElement(Ge.Range,X({step:c,min:T,max:t,values:L,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(ve,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},A,Ee),_.createElement(me,X({$isDragged:ae,ref:re.ref},A,be),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,Ve=y||(!!q&&o||!q&&R||ae)&&!v;return _.createElement(Qe,X({},re,{onMouseEnter:function(){q===0?B(!0):u(!0)},onMouseLeave:function(){q===0?B(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:xt({},re.style)},A,et,{$isFocusVisible:p&&E===q}),Ve&&_.createElement(it,X({$thumbIndex:q,$isDragged:ae},A,ot),D(L[q])),Ve&&_.createElement(rt,X({$thumbIndex:q,$isDragged:ae},A,nt)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return _.createElement(ft,X({$markIndex:q},re,A,ht))}}:{})),_.createElement(ct,X({},A,lt),_.createElement(Ae,X({},A,Fe),D(T)),_.createElement(Ae,X({},A,Fe),D(t))))}const zt=oe("div",{target:"e16ozfla0"})({position:"relative",":focus-within:has(:focus-visible)":{"--slider-focused":1}}),Vt=oe("div",{target:"e16ozfla1"})(({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?r.shadows.focusRing:r.shadows.none,":focus":{outline:"none"},":focus-visible":{boxShadow:r.shadows.focusRing}})),Nt=oe("div",{target:"e16ozfla2"})(({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"})),Ut=oe("div",{target:"e16ozfla3"})({flex:1}),Ht=oe("div",{target:"e16ozfla4"})(({theme:e})=>({position:"absolute",height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`})),Wt=oe("div",{target:"e16ozfla5"})(({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 qt({minLabel:e,maxLabel:r,isHovered:n,isDisabled:s}){return De(Wt,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:s,children:[Z(Ie,{source:e,allowHTML:!1,inheritFont:!0,isLabel:!0}),Z(Ie,{source:r,allowHTML:!1,inheritFont:!0,isLabel:!0})]})}function Kt({disabled:e,element:r,widgetMgr:n,fragmentId:s}){const[v,S]=Mt({getStateFromWidgetMgr:Xt,getDefaultStateFromProto:Yt,getCurrStateFromProto:Zt,updateWidgetMgrState:Gt,element:r,widgetMgr:n,fragmentId:s}),[l,h]=_.useState(v),[F,j]=_.useState(!1),[z,I]=_.useState(!1),T=_.useCallback(()=>j(!0),[]),d=_.useCallback(()=>j(!1),[]),t=_.useRef(null),[a]=_.useState([]),[c]=_.useState([]),f=yt(),y=_.useRef(r);y.current=r;const k=l.map(C=>ye(C,r)),D=ye(r.min,r),O=ye(r.max,r);_.useEffect(()=>{h(v)},[v]);const w=_.useCallback(({value:C})=>{S({value:C,fromUi:!0}),I(!1)},[S]),M=_.useCallback(({value:C})=>{h(C),I(!0)},[]),P=_.useCallback(_.forwardRef(function(i,o){const{$thumbIndex:u,$value:g}=i,m=u||0;a[m]=o,c[m]||=_.createRef();const p=Tt(i,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),b=y.current,x=(g??[b.min])[m]??b.min,E=ye(x,b);return Z(Vt,{...p,disabled:i.$disabled===!0,isDragged:i.$isDragged===!0,ref:a[m],"aria-valuetext":E,"aria-label":b.label,children:Z(Nt,{"data-testid":"stSliderThumbValue",disabled:i.$disabled===!0,ref:c[m],children:Z(Ie,{source:E,allowHTML:!1,inheritFont:!0,isLabel:!0})})})}),[]);_.useLayoutEffect(()=>{a.forEach((m,p)=>{m.current&&m.current.setAttribute("aria-valuetext",k[p])});const C=t.current??null,i=a[0].current,o=a[1]?.current,u=c[0].current,g=c[1]?.current;tr(C,i,o,u,g)});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,...g}=i;return De(Ut,{children:[Z(Ht,{ref:o,children:u}),Z(fe,{...g,style:R({$disabled:i.$disabled})})]})}),[]);return De(zt,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:T,onMouseLeave:d,children:[Z(wt,{label:r.label,disabled:e,labelVisibility:kt(r.labelVisibility?.value),children:r.help&&Z(Ot,{content:r.help,label:r.label})}),Z(jt,{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:qt,props:{minLabel:D,maxLabel:O,isHovered:F||z,isDisabled:e}}}})]})}function Xt(e,r){return e.getDoubleArrayValue(r)}function Yt(e){return e.default}function Zt(e){return e.value}function Gt(e,r,n,s){r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},s)}function Jt(e){const{dataType:r}=e;return r===de.DataType.DATETIME||r===de.DataType.DATE||r===de.DataType.TIME}function Qt(e){const{dataType:r}=e;return r===de.DataType.DATE?"date":r===de.DataType.TIME?"time":"datetime"}function ye(e,r){const{format:n,options:s}=r;if(s.length>0)return s[e]??"";if(Jt(r)){const v=Rt.utc(e/1e3);return $t(v,n,Qt(r))}return _t(e,n)}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,h=l-S.width/2<s.left,F=l+S.width/2>s.right;n.style.left=h?"0":"",n.style.right=F?"0":""}function rr(e,r,n,s,v){const l=e.getBoundingClientRect(),h=r.getBoundingClientRect(),F=n.getBoundingClientRect(),j=s.getBoundingClientRect(),z=v.getBoundingClientRect(),I=l.left+l.width/2,T=h.left+h.width/2,d=F.left+F.width/2,t=T-j.width/2>=l.left,a=d+z.width/2<=l.right,c=h.left-j.width>=l.left,f=F.right+z.width<=l.right,y=t?j.width/2:j.width,k=a?z.width/2:z.width,D=T+y;if(d-k-D>24){ie(e,r,s),ie(e,n,v);return}if(c&&f){s.style.left="",s.style.right=`${Math.round(h.width)}px`,v.style.left=`${Math.round(F.width)}px`,v.style.right="";return}T<I?(ie(e,r,s),v.style.left=`${Math.round(T+y+24-d)}px`,v.style.right=""):(ie(e,n,v),s.style.left="",s.style.right=`${-Math.round(d-k-24-T)}px`)}const fr=St(_.memo(Kt));export{fr as default};
@@ -1 +1 @@
1
- import{r as o,E as L,_ as k,z as p,aa as Se,o as x,j as a,ax as I,b as V,c as Ue,B as M,h as ve,$ as be,k as Ce,aj as ee,bh as Ie,e as D,bU as Ee,p as Be,ab as De,ac as Le,bP as ke,bQ as Ve}from"./index.DiwhD0Ic.js";import{u as Me}from"./FormClearHelper.N8_BCinn.js";import{g as oe,F as R,a as Re,D as Pe,I as Ae,s as Ne,b as Te}from"./FileHelper.xS7f19FE.js";import{S as We,P as He}from"./ProgressBar.Bk2qeHfS.js";import{U as j}from"./UploadFileInfo.Dr-zDST7.js";const $e=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});le.displayName="ChevronRight";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});se.displayName="Clear";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ae.displayName="CloudUpload";var ie=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});ie.displayName="Error";const re=p("section",{target:"ewslnz90"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:t.shadows.focusRingOutline},cursor:e?"not-allowed":"pointer"})),je=p("div",{target:"ewslnz91"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"ewslnz92"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"ewslnz93"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),Xe=p("span",{target:"ewslnz94"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Oe=p("div",{target:"ewslnz95"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),qe=p("span",{target:"ewslnz96"})({whiteSpace:"nowrap"}),pe=p("div",{target:"ewslnz97"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),_e=p("ul",{target:"ewslnz98"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"ewslnz99"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"ewslnz910"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"ewslnz911"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"ewslnz912"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Ke=p("span",{target:"ewslnz913"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qe=p("div",{target:"ewslnz914"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"ewslnz915"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"ewslnz916"})({}),Ye=e=>({[re]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Ge=p("div",{target:"ewslnz917"})(({theme:e,width:t})=>{if(t<Se("23rem"))return Ye(e)}),Je=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:i=!1,disabled:d})=>{const y=()=>i?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(w=>w.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,R.Byte,0)} per file`;return x(je,{"data-testid":"stFileUploaderDropzoneInstructions",children:[a(ce,{children:a(I,{content:ae,size:"threeXL"})}),x(Oe,{children:[x(de,{disabled:d,children:["Drag and drop ",y()," here"]}),x(Xe,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Je),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:i,disabled:d,label:y,acceptDirectory:c=!1})=>a(Pe,{onDrop:e,multiple:t,accept:Re(n),maxSize:i,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:w})=>{const U=w({multiple:t||!!c});return x(re,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":y,"aria-disabled":d,children:[a("input",{"data-testid":"stFileUploaderDropzoneInput",...U,...c&&{webkitdirectory:""}}),a(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:i,acceptDirectory:c,disabled:d}),a(qe,{children:a(V,{kind:M.SECONDARY,disabled:d,size:Ue.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),we=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:i,fadedText60:d,fadedText40:y}=n.colors;let c=d;return t&&(c=y),e==="danger"&&(c=i),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?a(He,{value:e.status.progress,size:We.SMALL}):e.status.type==="error"?x(Fe,{children:[a(Ke,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),a(me,{children:a(I,{content:ie,size:"lg"})})]}):e.status.type==="uploaded"?a(we,{disabled:t,children:oe(e.size,R.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>x(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[a(Qe,{disabled:n,children:a(I,{content:Ae,size:"twoXL"})}),x(ge,{className:"stFileUploaderFileData",children:[a(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),a(ot,{fileInfo:e,disabled:n})]}),a("div",{"data-testid":"stFileUploaderDeleteBtn",children:a(V,{onClick:()=>t(e.id),kind:M.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:a(I,{content:se,size:"lg"})})})]}),lt=o.memo(nt),st=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),at=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),it=({currentPage:e,totalPages:t,onNext:n,onPrevious:i})=>x(st,{"data-testid":"stFileUploaderPagination",children:[a(we,{children:`Showing page ${e} of ${t}`}),x(at,{children:[a(V,{onClick:i,kind:M.MINIMAL,children:a(I,{content:ne,size:"xl"})}),a(V,{onClick:n,kind:M.MINIMAL,children:a(I,{content:le,size:"xl"})})]})]}),rt=o.memo(it),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ve(({pageSize:n,items:i,resetOnAdd:d,...y})=>{const[c,F]=o.useState(0),[w,U]=o.useState(()=>te(i,n)),u=$e(i);o.useEffect(()=>{u&&u.length!==i.length&&U(te(i,n)),u&&u.length<i.length?d&&F(0):c+1>=w&&F(w-1)},[i,c,n,u,d,w]);const E=()=>{F(Math.min(c+1,w-1))},v=()=>{F(Math.max(0,c-1))},P=i.slice(c*n,c*n+n);return x(be,{children:[a(e,{items:P,...y}),i.length>n?a(rt,{pageSize:n,totalPages:w,currentPage:c+1,onNext:E,onPrevious:v}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>a(_e,{children:e.map(i=>a(ue,{children:a(lt,{fileInfo:i,onDelete:t,disabled:n})},i.id))}),pt=ct(dt),ut=e=>a(pe,{children:a(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:i}=n;if(D(i)||i.length===0)return{files:[],nextLocalId:1};let d=1;return{files:i.map(c=>{const F=c.name,w=c.size,U=c.fileId,u=c.fileUrls,E=new j(F,w,d,{type:"uploaded",fileId:U,fileUrls:u});return d+=1,E}),nextLocalId:d}},$=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:d,status:y}=n,{fileId:c,fileUrls:F}=y;return new ke({fileId:c,fileUrls:F,name:i,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:i,fragmentId:d})=>{const{width:y,elementRef:c}=Ce(),{files:F,nextLocalId:w}=o.useMemo(()=>ft(t,n),[t,n]),U=o.useRef(w),[u,E]=o.useState(()=>F),v=o.useRef(u);o.useEffect(()=>{v.current=u},[u]);const[P,X]=o.useState(!1),B=o.useCallback(()=>{const l=U.current;return U.current+=1,l},[]),A=o.useMemo(()=>{const l=t.maxUploadSizeMb;return Ne(l,R.Megabyte,R.Byte)},[t.maxUploadSizeMb]),S=o.useCallback(l=>{ee.flushSync(()=>{E(s=>{const r=typeof l=="function"?l(s):l;return v.current=r,r})})},[]),N=o.useCallback(l=>{ee.flushSync(()=>{X(l)})},[X]),O=o.useCallback(l=>{S(s=>[...s,l])},[S]),T=o.useCallback(l=>{l.length!==0&&S(s=>[...s,...l])},[S]),q=o.useCallback(l=>{S(s=>s.filter(r=>r.id!==l))},[S]),b=o.useCallback((l,s)=>{S(r=>r.map(g=>g.id===l?s:g))},[S]),C=o.useCallback(l=>v.current.find(s=>s.id===l),[]),_=u.some(l=>l.status.type==="uploading")||P?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,$(v.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(_!=="ready")return;const l=$(u),s=n.getFileUploaderStateValue(t);Ie(l,s)||n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[_,u,n,t,d]);const ye=o.useCallback(()=>{S(()=>[]);const l=$([]);n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[t,d,S,n]);Me({element:t,widgetMgr:n,onFormCleared:ye});const K=o.useCallback(l=>{const s=t.type;if(!s||s.length===0)return!0;const r=l.name.toLowerCase();return s.some(g=>r.endsWith(g.toLowerCase()))},[t.type]),Q=o.useCallback(l=>{const s=[],r=[];return l.forEach(g=>{K(g)?s.push(g):r.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:s,rejected:r}},[K]),Y=o.useCallback((l,s)=>{const r=C(l);D(r)||r.status.type!=="uploading"||b(r.id,r.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},[C,b]),G=o.useCallback((l,s)=>{const r=C(s);if(D(r)||r.status.type!=="uploading")return;const g=Math.round(l.loaded*100/l.total);r.status.progress!==g&&b(s,r.setStatus({type:"uploading",abortController:r.status.abortController,progress:g}))},[C,b]),J=o.useCallback((l,s)=>{const r=new AbortController,g=s.webkitRelativePath||s.name,f=new j(g,s.size,B(),{type:"uploading",abortController:r,progress:1});O(f),i.uploadFile(t,l.uploadUrl,s,h=>G(h,f.id),r.signal).then(()=>Y(f.id,l)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[O,t,B,Y,G,b,i]),W=o.useCallback(l=>{if(e)return;const s=C(l);D(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&i.deleteFile(s.status.fileUrls.deleteUrl),q(l))},[e,C,q,i]),xe=o.useCallback((l,s)=>{const{multipleFiles:r}=t,g=!!t.acceptDirectory;let f=[...l],h=[...s];if(g&&f.length>0){const{accepted:z,rejected:m}=Q(f);f=z,h=[...h,...m]}if(!r&&f.length===0&&h.length>1){const z=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");z>=0&&(f.push(h[z].file),h.splice(z,1))}if(i.fetchFileURLs(f).then(z=>{if(!r&&f.length>0){const m=v.current.find(H=>H.status.type!=="error");if(m){N(!0);try{W(m.id)}finally{N(!1)}}}Ee(z,f).forEach(([m,H])=>{J(m,H)})}).catch(z=>{T(f.map(m=>new j(m.name,m.size,B(),{type:"error",errorMessage:z})))}),h.length>0){const z=h.map(m=>Te(m,B(),A));T(z)}},[T,W,t,Q,A,B,i,J,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),ze=t.type;return x(Ge,{className:"stFileUploader","data-testid":"stFileUploader",width:y,ref:c,children:[a(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&a(De,{content:t.help,label:t.label})}),a(tt,{onDrop:xe,multiple:t.multipleFiles,acceptedExtensions:ze,maxSizeBytes:A,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&a(gt,{items:Z,pageSize:3,onDelete:W,resetOnAdd:!0,disabled:e})]})},zt=o.memo(ht);export{zt as default};
1
+ import{r as o,E as L,_ as k,z as p,aa as Se,o as x,j as a,ax as I,b as V,c as Ue,B as M,h as ve,$ as be,k as Ce,aj as ee,bh as Ie,e as D,bU as Ee,p as Be,ab as De,ac as Le,bP as ke,bQ as Ve}from"./index.qjO5OK90.js";import{u as Me}from"./FormClearHelper.B74VElyu.js";import{g as oe,F as R,a as Re,D as Pe,I as Ae,s as Ne,b as Te}from"./FileHelper.Bd4bPp0Y.js";import{S as We,P as He}from"./ProgressBar.vWX1Igzt.js";import{U as j}from"./UploadFileInfo.Dr-zDST7.js";const $e=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});le.displayName="ChevronRight";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});se.displayName="Clear";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ae.displayName="CloudUpload";var ie=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});ie.displayName="Error";const re=p("section",{target:"ewslnz90"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:t.shadows.focusRingOutline},cursor:e?"not-allowed":"pointer"})),je=p("div",{target:"ewslnz91"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"ewslnz92"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"ewslnz93"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),Xe=p("span",{target:"ewslnz94"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Oe=p("div",{target:"ewslnz95"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),qe=p("span",{target:"ewslnz96"})({whiteSpace:"nowrap"}),pe=p("div",{target:"ewslnz97"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),_e=p("ul",{target:"ewslnz98"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"ewslnz99"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"ewslnz910"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"ewslnz911"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"ewslnz912"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Ke=p("span",{target:"ewslnz913"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qe=p("div",{target:"ewslnz914"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"ewslnz915"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"ewslnz916"})({}),Ye=e=>({[re]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Ge=p("div",{target:"ewslnz917"})(({theme:e,width:t})=>{if(t<Se("23rem"))return Ye(e)}),Je=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:i=!1,disabled:d})=>{const y=()=>i?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(w=>w.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,R.Byte,0)} per file`;return x(je,{"data-testid":"stFileUploaderDropzoneInstructions",children:[a(ce,{children:a(I,{content:ae,size:"threeXL"})}),x(Oe,{children:[x(de,{disabled:d,children:["Drag and drop ",y()," here"]}),x(Xe,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Je),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:i,disabled:d,label:y,acceptDirectory:c=!1})=>a(Pe,{onDrop:e,multiple:t,accept:Re(n),maxSize:i,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:w})=>{const U=w({multiple:t||!!c});return x(re,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":y,"aria-disabled":d,children:[a("input",{"data-testid":"stFileUploaderDropzoneInput",...U,...c&&{webkitdirectory:""}}),a(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:i,acceptDirectory:c,disabled:d}),a(qe,{children:a(V,{kind:M.SECONDARY,disabled:d,size:Ue.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),we=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:i,fadedText60:d,fadedText40:y}=n.colors;let c=d;return t&&(c=y),e==="danger"&&(c=i),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?a(He,{value:e.status.progress,size:We.SMALL}):e.status.type==="error"?x(Fe,{children:[a(Ke,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),a(me,{children:a(I,{content:ie,size:"lg"})})]}):e.status.type==="uploaded"?a(we,{disabled:t,children:oe(e.size,R.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>x(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[a(Qe,{disabled:n,children:a(I,{content:Ae,size:"twoXL"})}),x(ge,{className:"stFileUploaderFileData",children:[a(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),a(ot,{fileInfo:e,disabled:n})]}),a("div",{"data-testid":"stFileUploaderDeleteBtn",children:a(V,{onClick:()=>t(e.id),kind:M.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:a(I,{content:se,size:"lg"})})})]}),lt=o.memo(nt),st=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),at=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),it=({currentPage:e,totalPages:t,onNext:n,onPrevious:i})=>x(st,{"data-testid":"stFileUploaderPagination",children:[a(we,{children:`Showing page ${e} of ${t}`}),x(at,{children:[a(V,{onClick:i,kind:M.MINIMAL,children:a(I,{content:ne,size:"xl"})}),a(V,{onClick:n,kind:M.MINIMAL,children:a(I,{content:le,size:"xl"})})]})]}),rt=o.memo(it),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ve(({pageSize:n,items:i,resetOnAdd:d,...y})=>{const[c,F]=o.useState(0),[w,U]=o.useState(()=>te(i,n)),u=$e(i);o.useEffect(()=>{u&&u.length!==i.length&&U(te(i,n)),u&&u.length<i.length?d&&F(0):c+1>=w&&F(w-1)},[i,c,n,u,d,w]);const E=()=>{F(Math.min(c+1,w-1))},v=()=>{F(Math.max(0,c-1))},P=i.slice(c*n,c*n+n);return x(be,{children:[a(e,{items:P,...y}),i.length>n?a(rt,{pageSize:n,totalPages:w,currentPage:c+1,onNext:E,onPrevious:v}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>a(_e,{children:e.map(i=>a(ue,{children:a(lt,{fileInfo:i,onDelete:t,disabled:n})},i.id))}),pt=ct(dt),ut=e=>a(pe,{children:a(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:i}=n;if(D(i)||i.length===0)return{files:[],nextLocalId:1};let d=1;return{files:i.map(c=>{const F=c.name,w=c.size,U=c.fileId,u=c.fileUrls,E=new j(F,w,d,{type:"uploaded",fileId:U,fileUrls:u});return d+=1,E}),nextLocalId:d}},$=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:d,status:y}=n,{fileId:c,fileUrls:F}=y;return new ke({fileId:c,fileUrls:F,name:i,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:i,fragmentId:d})=>{const{width:y,elementRef:c}=Ce(),{files:F,nextLocalId:w}=o.useMemo(()=>ft(t,n),[t,n]),U=o.useRef(w),[u,E]=o.useState(()=>F),v=o.useRef(u);o.useEffect(()=>{v.current=u},[u]);const[P,X]=o.useState(!1),B=o.useCallback(()=>{const l=U.current;return U.current+=1,l},[]),A=o.useMemo(()=>{const l=t.maxUploadSizeMb;return Ne(l,R.Megabyte,R.Byte)},[t.maxUploadSizeMb]),S=o.useCallback(l=>{ee.flushSync(()=>{E(s=>{const r=typeof l=="function"?l(s):l;return v.current=r,r})})},[]),N=o.useCallback(l=>{ee.flushSync(()=>{X(l)})},[X]),O=o.useCallback(l=>{S(s=>[...s,l])},[S]),T=o.useCallback(l=>{l.length!==0&&S(s=>[...s,...l])},[S]),q=o.useCallback(l=>{S(s=>s.filter(r=>r.id!==l))},[S]),b=o.useCallback((l,s)=>{S(r=>r.map(g=>g.id===l?s:g))},[S]),C=o.useCallback(l=>v.current.find(s=>s.id===l),[]),_=u.some(l=>l.status.type==="uploading")||P?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,$(v.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(_!=="ready")return;const l=$(u),s=n.getFileUploaderStateValue(t);Ie(l,s)||n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[_,u,n,t,d]);const ye=o.useCallback(()=>{S(()=>[]);const l=$([]);n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[t,d,S,n]);Me({element:t,widgetMgr:n,onFormCleared:ye});const K=o.useCallback(l=>{const s=t.type;if(!s||s.length===0)return!0;const r=l.name.toLowerCase();return s.some(g=>r.endsWith(g.toLowerCase()))},[t.type]),Q=o.useCallback(l=>{const s=[],r=[];return l.forEach(g=>{K(g)?s.push(g):r.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:s,rejected:r}},[K]),Y=o.useCallback((l,s)=>{const r=C(l);D(r)||r.status.type!=="uploading"||b(r.id,r.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},[C,b]),G=o.useCallback((l,s)=>{const r=C(s);if(D(r)||r.status.type!=="uploading")return;const g=Math.round(l.loaded*100/l.total);r.status.progress!==g&&b(s,r.setStatus({type:"uploading",abortController:r.status.abortController,progress:g}))},[C,b]),J=o.useCallback((l,s)=>{const r=new AbortController,g=s.webkitRelativePath||s.name,f=new j(g,s.size,B(),{type:"uploading",abortController:r,progress:1});O(f),i.uploadFile(t,l.uploadUrl,s,h=>G(h,f.id),r.signal).then(()=>Y(f.id,l)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[O,t,B,Y,G,b,i]),W=o.useCallback(l=>{if(e)return;const s=C(l);D(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&i.deleteFile(s.status.fileUrls.deleteUrl),q(l))},[e,C,q,i]),xe=o.useCallback((l,s)=>{const{multipleFiles:r}=t,g=!!t.acceptDirectory;let f=[...l],h=[...s];if(g&&f.length>0){const{accepted:z,rejected:m}=Q(f);f=z,h=[...h,...m]}if(!r&&f.length===0&&h.length>1){const z=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");z>=0&&(f.push(h[z].file),h.splice(z,1))}if(i.fetchFileURLs(f).then(z=>{if(!r&&f.length>0){const m=v.current.find(H=>H.status.type!=="error");if(m){N(!0);try{W(m.id)}finally{N(!1)}}}Ee(z,f).forEach(([m,H])=>{J(m,H)})}).catch(z=>{T(f.map(m=>new j(m.name,m.size,B(),{type:"error",errorMessage:z})))}),h.length>0){const z=h.map(m=>Te(m,B(),A));T(z)}},[T,W,t,Q,A,B,i,J,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),ze=t.type;return x(Ge,{className:"stFileUploader","data-testid":"stFileUploader",width:y,ref:c,children:[a(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&a(De,{content:t.help,label:t.label})}),a(tt,{onDrop:xe,multiple:t.multipleFiles,acceptedExtensions:ze,maxSizeBytes:A,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&a(gt,{items:Z,pageSize:3,onDelete:W,resetOnAdd:!0,disabled:e})]})},zt=o.memo(ht);export{zt as default};
@@ -1,4 +1,4 @@
1
- import{w as Ye}from"./index.bsVAaBS1.js";import{s as Ca,h as qa}from"./index.D8BQH06Z.js";import{br as Ea,bs as Ia,bt as Ra}from"./index.DiwhD0Ic.js";class o0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new o0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class m0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new m0(t,o0.range(this,e))}}class z{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var m=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15<h.length?g=h.slice(s,s+15)+"…":g=h.slice(s),a+=p+m+g}var b=new Error(a);return b.name="ParseError",b.__proto__=z.prototype,b.position=n,n!=null&&s!=null&&(b.length=s-n),b.rawMessage=e,b}}z.prototype.__proto__=Error.prototype;var Oa=function(e,t){return e===void 0?t:e},Fa=/([A-Z])/g,La=function(e){return e.replace(Fa,"-$1").toLowerCase()},Ha={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pa=/[&><"']/g;function Va(r){return String(r).replace(Pa,e=>Ha[e])}var Tr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Ga=function(e){var t=Tr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ua=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ya=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},V={deflt:Oa,escape:Va,hyphenate:La,getBaseElem:Tr,isCharacterBox:Ga,protocolFromUrl:Ya},Ae={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function $a(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class vt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Ae)if(Ae.hasOwnProperty(t)){var a=Ae[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:$a(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Xa[this.id]]}sub(){return y0[Wa[this.id]]}fracNum(){return y0[ja[this.id]]}fracDen(){return y0[Za[this.id]]}cramp(){return y0[Ka[this.id]]}text(){return y0[Ja[this.id]]}isTight(){return this.size>=2}}var gt=0,Be=1,te=2,B0=3,oe=4,f0=5,re=6,n0=7,y0=[new F0(gt,0,!1),new F0(Be,0,!0),new F0(te,1,!1),new F0(B0,1,!0),new F0(oe,2,!1),new F0(f0,2,!0),new F0(re,3,!1),new F0(n0,3,!0)],Xa=[oe,f0,oe,f0,re,n0,re,n0],Wa=[f0,f0,f0,f0,n0,n0,n0,n0],ja=[te,B0,oe,f0,re,n0,re,n0],Za=[B0,B0,f0,f0,n0,n0,n0,n0],Ka=[Be,Be,B0,B0,f0,f0,n0,n0],Ja=[gt,Be,te,B0,te,B0,te,B0],E={DISPLAY:y0[gt],TEXT:y0[te],SCRIPT:y0[oe],SCRIPTSCRIPT:y0[re]},st=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Qa(r){for(var e=0;e<st.length;e++)for(var t=st[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Te=[];st.forEach(r=>r.blocks.forEach(e=>Te.push(...e)));function Br(r){for(var e=0;e<Te.length;e+=2)if(r>=Te[e]&&r<=Te[e+1])return!0;return!1}var ee=80,_a=function(e,t){return"M95,"+(622+e+t)+`
1
+ import{w as Ye}from"./index.bsVAaBS1.js";import{s as Ca,h as qa}from"./index.D7Hgmilz.js";import{br as Ea,bs as Ia,bt as Ra}from"./index.qjO5OK90.js";class o0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new o0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class m0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new m0(t,o0.range(this,e))}}class z{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var m=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15<h.length?g=h.slice(s,s+15)+"…":g=h.slice(s),a+=p+m+g}var b=new Error(a);return b.name="ParseError",b.__proto__=z.prototype,b.position=n,n!=null&&s!=null&&(b.length=s-n),b.rawMessage=e,b}}z.prototype.__proto__=Error.prototype;var Oa=function(e,t){return e===void 0?t:e},Fa=/([A-Z])/g,La=function(e){return e.replace(Fa,"-$1").toLowerCase()},Ha={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pa=/[&><"']/g;function Va(r){return String(r).replace(Pa,e=>Ha[e])}var Tr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Ga=function(e){var t=Tr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ua=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ya=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},V={deflt:Oa,escape:Va,hyphenate:La,getBaseElem:Tr,isCharacterBox:Ga,protocolFromUrl:Ya},Ae={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function $a(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class vt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Ae)if(Ae.hasOwnProperty(t)){var a=Ae[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:$a(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Xa[this.id]]}sub(){return y0[Wa[this.id]]}fracNum(){return y0[ja[this.id]]}fracDen(){return y0[Za[this.id]]}cramp(){return y0[Ka[this.id]]}text(){return y0[Ja[this.id]]}isTight(){return this.size>=2}}var gt=0,Be=1,te=2,B0=3,oe=4,f0=5,re=6,n0=7,y0=[new F0(gt,0,!1),new F0(Be,0,!0),new F0(te,1,!1),new F0(B0,1,!0),new F0(oe,2,!1),new F0(f0,2,!0),new F0(re,3,!1),new F0(n0,3,!0)],Xa=[oe,f0,oe,f0,re,n0,re,n0],Wa=[f0,f0,f0,f0,n0,n0,n0,n0],ja=[te,B0,oe,f0,re,n0,re,n0],Za=[B0,B0,f0,f0,n0,n0,n0,n0],Ka=[Be,Be,B0,B0,f0,f0,n0,n0],Ja=[gt,Be,te,B0,te,B0,te,B0],E={DISPLAY:y0[gt],TEXT:y0[te],SCRIPT:y0[oe],SCRIPTSCRIPT:y0[re]},st=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Qa(r){for(var e=0;e<st.length;e++)for(var t=st[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Te=[];st.forEach(r=>r.blocks.forEach(e=>Te.push(...e)));function Br(r){for(var e=0;e<Te.length;e+=2)if(r>=Te[e]&&r<=Te[e+1])return!0;return!1}var ee=80,_a=function(e,t){return"M95,"+(622+e+t)+`
2
2
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3
3
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4
4
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -1 +1 @@
1
- import{z as u,r as L,W as C,o as x,j as i,R as E,q as b,V as v}from"./index.DiwhD0Ic.js";import{w as y,E as W}from"./withFullScreenWrapper.K1jkwhPu.js";import{S as p,T}from"./Toolbar.DCJcLwve.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),R=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),j=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),H=v.getLogger("ImageList");function M(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(R,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(j,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=M(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;H.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};
1
+ import{z as u,r as L,W as C,o as x,j as i,R as E,q as b,V as v}from"./index.qjO5OK90.js";import{w as y,E as W}from"./withFullScreenWrapper.CHBnw0Co.js";import{S as p,T}from"./Toolbar.NhlhlTzK.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),R=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),j=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),H=v.getLogger("ImageList");function M(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(R,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(j,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=M(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;H.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};