streamlit-nightly 1.41.2.dev20250119__py2.py3-none-any.whl → 1.41.2.dev20250122__py2.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.
- streamlit/config.py +14 -0
- streamlit/elements/vega_charts.py +19 -5
- streamlit/runtime/runtime.py +8 -3
- streamlit/static/index.html +2 -2
- streamlit/static/static/js/{FileDownload.esm.BUw5ikQY.js → FileDownload.esm.B5oak9Ia.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.Bvmaiutv.js → FormClearHelper.DPFVZXH5.js} +1 -1
- streamlit/static/static/js/{Hooks.DcERo8tB.js → Hooks.FlVdDTii.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BupGmSrJ.js → InputInstructions.BdYrHlrF.js} +1 -1
- streamlit/static/static/js/ProgressBar.DGXb6QOO.js +2 -0
- streamlit/static/static/js/{RenderInPortalIfExists.BhbPC-G8.js → RenderInPortalIfExists.DON4V-QO.js} +1 -1
- streamlit/static/static/js/Toolbar.CLiZhV_n.js +1 -0
- streamlit/static/static/js/{base-input.BBtHVXa2.js → base-input.DXAKraS2.js} +1 -1
- streamlit/static/static/js/{createSuper.BBR-BbJr.js → createSuper.D3jRSoi-.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DuZabixr.js → data-grid-overlay-editor.XiPt9jLK.js} +1 -1
- streamlit/static/static/js/{downloader.4xvEoIbd.js → downloader.CGTT4RY7.js} +1 -1
- streamlit/static/static/js/{es6.DmlLpYMO.js → es6.CDFMHaCm.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.M3x98UQ7.js → getPrototypeOf.IRomgPPd.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.CgYHddZ1.js → iframeResizer.contentWindow.CX6Wwtuu.js} +1 -1
- streamlit/static/static/js/{index.rOJcC1R3.js → index.B0Ui6vRC.js} +2 -2
- streamlit/static/static/js/{index.DcY4XgAF.js → index.B9-Y-BaD.js} +1 -1
- streamlit/static/static/js/{index.CkCtIbw0.js → index.B9_xTTEV.js} +1 -1
- streamlit/static/static/js/index.BBP4aKVi.js +1 -0
- streamlit/static/static/js/{index.CrcobIb0.js → index.BER0Q_9x.js} +56 -56
- streamlit/static/static/js/{index.CAZxiea2.js → index.BHgKtzWr.js} +2 -2
- streamlit/static/static/js/index.BIUi0PJE.js +3 -0
- streamlit/static/static/js/{index.DZdyNQo1.js → index.BMvd0REJ.js} +1 -1
- streamlit/static/static/js/index.BPivlwOm.js +1 -0
- streamlit/static/static/js/index.B_Ox2Ter.js +2 -0
- streamlit/static/static/js/{index.BaskQ92_.js → index.Ba40Nozz.js} +1 -1
- streamlit/static/static/js/{index.DysCLUsb.js → index.BasbevcS.js} +1 -1
- streamlit/static/static/js/{index.BYyuymTq.js → index.BeOUz4rC.js} +1 -1
- streamlit/static/static/js/{index.STXqYP7Q.js → index.BxUEHjBi.js} +1 -1
- streamlit/static/static/js/index.C42wlzzb.js +1 -0
- streamlit/static/static/js/index.C5QDcDeL.js +1 -0
- streamlit/static/static/js/index.C8iea7ju.js +1 -0
- streamlit/static/static/js/{index.DH9CvsgQ.js → index.C8wS6l2r.js} +1 -1
- streamlit/static/static/js/{index.C4Hwzvpq.js → index.CBc6ijSu.js} +1 -1
- streamlit/static/static/js/index.CHOk0J7Q.js +1 -0
- streamlit/static/static/js/{index.CC_t9mT8.js → index.CI0zYnTG.js} +1 -1
- streamlit/static/static/js/index.CUZhGVfE.js +197 -0
- streamlit/static/static/js/index.C_4dOSWN.js +1 -0
- streamlit/static/static/js/{index.CsdGlifB.js → index.ChXuNNZF.js} +13 -13
- streamlit/static/static/js/index.CyDO0RFh.js +1 -0
- streamlit/static/static/js/{index.DKi-ElEv.js → index.CzxmEs9w.js} +1 -1
- streamlit/static/static/js/{index.CjxOLcYo.js → index.DDM9v87n.js} +1 -1
- streamlit/static/static/js/{index.Bu8uxdTh.js → index.Dn7UmyWt.js} +2 -2
- streamlit/static/static/js/{index.C8nPrwl-.js → index.Dvhers7X.js} +1 -1
- streamlit/static/static/js/{index.CeKudMLQ.js → index.EtvrDk73.js} +1 -1
- streamlit/static/static/js/index.Ld6ZhSbF.js +1 -0
- streamlit/static/static/js/{index.61noqmIB.js → index.V-8vv3GC.js} +1 -1
- streamlit/static/static/js/index.WLh-TFDC.js +1 -0
- streamlit/static/static/js/{index.Bq6R9vFh.js → index.eDkLcswt.js} +1 -1
- streamlit/static/static/js/{index.DeeIZCGU.js → index.iX8U-Vgv.js} +3 -3
- streamlit/static/static/js/{index.g24MGpB6.js → index.lKc9LHL6.js} +2 -2
- streamlit/static/static/js/index.rmAI4WPp.js +1 -0
- streamlit/static/static/js/{input.BIth4Mda.js → input.l_XjOrMQ.js} +1 -1
- streamlit/static/static/js/{memory.C0ticMnk.js → memory.Ctihf9kR.js} +1 -1
- streamlit/static/static/js/{mergeWith.CnJI40Ol.js → mergeWith.C1vYu6FF.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.B4oKK-_Y.js → number-overlay-editor.B6AKIEFz.js} +1 -1
- streamlit/static/static/js/{sandbox.D1ghBIHY.js → sandbox.DhpripZd.js} +1 -1
- streamlit/static/static/js/{slicedToArray.C1s2cVDA.js → slicedToArray.C54-k4r_.js} +1 -1
- streamlit/static/static/js/{textarea.C1RJDJe0.js → textarea.C2VzK-E-.js} +1 -1
- streamlit/static/static/js/{timepicker.CmttWl-Y.js → timepicker.C6vlo4mG.js} +1 -1
- streamlit/static/static/js/{uniqueId.BT1SAZF-.js → uniqueId.C5O-wLYh.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BB9oQkjJ.js → useBasicWidgetState.nirky3Hn.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DldtvoCQ.js → useOnInputChange.DawRSruf.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.DMpPC-b8.js +1 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250122.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250122.dist-info}/RECORD +76 -76
- streamlit/static/static/js/ProgressBar.CTBNJVpb.js +0 -2
- streamlit/static/static/js/Toolbar.Dw79Vekz.js +0 -1
- streamlit/static/static/js/index.27TXU2hu.js +0 -1
- streamlit/static/static/js/index.AoUAN-9W.js +0 -1
- streamlit/static/static/js/index.B1KjaM9R.js +0 -1
- streamlit/static/static/js/index.BXejhz8S.js +0 -197
- streamlit/static/static/js/index.BtxHQDnZ.js +0 -1
- streamlit/static/static/js/index.C-0rgxAG.js +0 -1
- streamlit/static/static/js/index.C21AcM0r.js +0 -1
- streamlit/static/static/js/index.CuzQoPgT.js +0 -1
- streamlit/static/static/js/index.DqjAk5qg.js +0 -3
- streamlit/static/static/js/index.Dva5NuFG.js +0 -1
- streamlit/static/static/js/index.DvfPGXer.js +0 -1
- streamlit/static/static/js/index.PWzpo-hC.js +0 -2
- streamlit/static/static/js/index.WSrEkxsE.js +0 -1
- streamlit/static/static/js/index.tjVAqGRi.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.CWPfcXAP.js +0 -1
- /streamlit/static/static/css/{index.B26BQfSF.css → index.Bmkmz40k.css} +0 -0
- /streamlit/static/static/css/{index.BWGEWL3m.css → index.DBTu7gXp.css} +0 -0
- /streamlit/static/static/css/{index.CG16XVnL.css → index.DzuxGC_t.css} +0 -0
- {streamlit_nightly-1.41.2.dev20250119.data → streamlit_nightly-1.41.2.dev20250122.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250122.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250122.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250122.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{n as t,
|
1
|
+
import{n as t,M as d,j as c,b2 as l,b3 as g,J as e}from"./index.BER0Q_9x.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as o,E as K,_ as X,n as x,aO as lt,co as ut,M as J,cz as I,J as f,z,j as u,bq as ct,bD as dt,br as pt,ba as ft,bs as bt,bn as M}from"./index.BER0Q_9x.js";import{s as mt}from"./sprintf.C-r3gIuM.js";import{u as gt}from"./uniqueId.C5O-wLYh.js";import{u as yt}from"./FormClearHelper.DPFVZXH5.js";import{I as It}from"./InputInstructions.BdYrHlrF.js";import{I as ht}from"./input.l_XjOrMQ.js";import"./base-input.DXAKraS2.js";var Q=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(K,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(K,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const wt=x("div",{target:"eiawb8t0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Ct=x("div",{target:"eiawb8t1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),q=x("button",{target:"eiawb8t2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Tt=x("div",{target:"eiawb8t3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`}));function St(t){return f(t)||t===""?void 0:t}const Vt=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,G=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),W=({value:t,format:e,step:r,dataType:h})=>{if(f(t))return null;let a=St(e);if(f(a)&&J(r)){const c=r.toString();h===I.DataType.FLOAT&&r!==0&&c.includes(".")&&(a=`%0.${c.split(".")[1].length}f`)}if(f(a))return t.toString();try{return mt.sprintf(a,t)}catch{return String(t)}},vt=(t,e,r)=>f(t)?!1:t-e>=r,kt=(t,e,r)=>f(t)?!1:t+e<=r,xt=({disabled:t,element:e,widgetMgr:r,width:h,theme:a,fragmentId:c})=>{var j;const{dataType:T,id:D,formId:p,default:B,format:U}=e,b=e.hasMin?e.min:-1/0,m=e.hasMax?e.max:1/0,[i,Z]=o.useState(G(e)),A=Vt({element:e,widgetMgr:r}),[g,w]=o.useState(!1),[s,C]=o.useState(A),[H,S]=o.useState(W({value:A,...e,step:i})),[P,O]=o.useState(!1),R=o.useRef(null),L=o.useRef(gt("number_input_")),V=vt(s,i,b),v=kt(s,i,m),_=ut({formId:p}),tt=_?r.allowFormEnterToSubmit(p):g,et=P&&h>a.breakpoints.hideWidgetDetails;o.useEffect(()=>{Z(G({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const l=o.useCallback(({value:n,source:d})=>{var y;if(J(n)&&(b>n||n>m))(y=R.current)==null||y.reportValidity();else{const k=n??B??null;switch(T){case I.DataType.INT:r.setIntValue({id:D,formId:p},k,d,c);break;case I.DataType.FLOAT:r.setDoubleValue({id:D,formId:p},k,d,c);break;default:throw new Error("Invalid data type")}w(!1),C(k),S(W({value:k,dataType:T,format:U,step:i}))}},[b,m,R,r,c,i,T,D,p,B,U]),ot=o.useCallback(()=>{g&&l({value:s,source:{fromUi:!0}}),O(!1)},[g,s,l]),rt=o.useCallback(()=>{O(!0)},[]),$=o.useCallback(()=>{const{value:n}=e;e.setValue=!1,C(n??null),S(W({value:n??null,...e,step:i})),l({value:n??null,source:{fromUi:!1}})},[e,i,l]);o.useEffect(()=>{e.setValue?$():l({value:s,source:{fromUi:!1}})},[]),e.setValue&&$();const N=f(e.default)&&!t,nt=o.useCallback(()=>{const n=e.default??null;C(n),l({value:n,source:{fromUi:!0}})},[e]);yt({element:e,widgetMgr:r,onFormCleared:nt});const at=n=>{const{value:d}=n.target;if(d==="")w(!0),C(null),S(null);else{let y;e.dataType===I.DataType.INT?y=parseInt(d,10):y=parseFloat(d),w(!0),C(y),S(d)}},F=o.useCallback(()=>{v&&(w(!0),l({value:(s??b)+i,source:{fromUi:!0}}))},[s,b,i,v]),E=o.useCallback(()=>{V&&(w(!0),l({value:(s??m)-i,source:{fromUi:!0}}))},[s,m,i,V]),it=o.useCallback(n=>{const{key:d}=n;switch(d){case"ArrowUp":n.preventDefault(),F();break;case"ArrowDown":n.preventDefault(),E();break}},[F,E]),st=o.useCallback(n=>{n.key==="Enter"&&(g&&l({value:s,source:{fromUi:!0}}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,c))},[g,s,l,r,p,c]);return z("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:h},children:[u(bt,{label:e.label,disabled:t,labelVisibility:ct((j=e.labelVisibility)==null?void 0:j.value),htmlFor:L.current,children:e.help&&u(dt,{children:u(pt,{content:e.help,placement:ft.TOP_RIGHT})})}),z(wt,{className:P?"focused":"","data-testid":"stNumberInputContainer",children:[u(ht,{type:"number",inputRef:R,value:H??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:st,onKeyDown:it,clearable:N,clearOnEscape:N,disabled:t,"aria-label":e.label,id:L.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,padding:a.spacing.threeXS,height:a.sizes.clearIconSize,width:a.sizes.clearIconSize,":hover":{fill:a.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:i,min:b,max:m,type:"number",inputMode:""},style:{lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),h>a.breakpoints.hideNumberInputControls&&z(Ct,{children:[u(q,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!V||t,tabIndex:-1,children:u(M,{content:Q,size:"xs",color:V?"inherit":"disabled"})}),u(q,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!v||t,tabIndex:-1,children:u(M,{content:Y,size:"xs",color:v?"inherit":"disabled"})})]})]}),et&&u(Tt,{clearable:N,children:u(It,{dirty:g,value:H??"",inForm:_,allowEnterToSubmit:tt})})]})},Bt=lt(xt);export{Bt as default};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{d as U,r as w,bu as ee,bT as pt,bE as vt,bv as Q,bU as mt,bV as bt,n as be,au as yt,y as Tt,aK as kt,z as Ue,j as ae,R as He,cf as Ot,bq as wt,bD as Rt,br as St,ba as Mt,bs as _t,N as $t,cg as Ee}from"./index.BER0Q_9x.js";import{s as We}from"./sprintf.C-r3gIuM.js";import{a as Et}from"./useBasicWidgetState.nirky3Hn.js";import"./FormClearHelper.DPFVZXH5.js";var Ce={},De={},xe={},ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.Direction=void 0;var Ke;(function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"})(Ke||(ce.Direction=Ke={}));(function(t){var r=U&&U.__spreadArray||function(o,u,l){if(l||arguments.length===2)for(var p=0,b=u.length,g;p<b;p++)(g||!(p in u))&&(g||(g=Array.prototype.slice.call(u,0,p)),g[p]=u[p]);return o.concat(g||Array.prototype.slice.call(u))};Object.defineProperty(t,"__esModule",{value:!0}),t.isIOS=t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var n=w,e=ce,a=function(o){var u=o.toString().split(".")[1];return u?u.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,u,l){var p=(u-o)/l,b=8,g=Number(p.toFixed(b));return parseInt(g.toString(),10)===g}t.isStepDivisible=s;function c(o,u,l,p,b,g,T){var k=1e11;if(o=Math.round(o*k)/k,!g){var D=T[u-1],_=T[u+1];if(D&&D>o)return D;if(_&&_<o)return _}if(o>p)return p;if(o<l)return l;var N=Math.floor(o*k-l*k)%Math.floor(b*k),j=Math.floor(o*k-Math.abs(N)),W=N===0?o:j/k,E=Math.abs(N/k)<b/2?W:W+b,I=(0,t.getStepDecimals)(b);return parseFloat(E.toFixed(I))}t.normalizeValue=c;function f(o,u,l){return(o-u)/(l-u)}t.relativeValue=f;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function d(o,u,l){if(u>=l)throw new RangeError("min (".concat(u,") is equal/bigger than max (").concat(l,")"));if(o<u)throw new RangeError("value (".concat(o,") is smaller than min (").concat(u,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=d;function h(o,u,l){return o<u?u:o>l?l:o}t.checkValuesAgainstBoundaries=h;function v(o){if(!(o.length<2)&&!o.slice(1).every(function(u,l){return o[l]<=u}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=v;function R(o){var u=window.getComputedStyle(o);return{top:parseInt(u["margin-top"],10),bottom:parseInt(u["margin-bottom"],10),left:parseInt(u["margin-left"],10),right:parseInt(u["margin-right"],10)}}t.getMargin=R;function m(o){var u=window.getComputedStyle(o);return{top:parseInt(u["padding-top"],10)+parseInt(u["border-top-width"],10),bottom:parseInt(u["padding-bottom"],10)+parseInt(u["border-bottom-width"],10),left:parseInt(u["padding-left"],10)+parseInt(u["border-left-width"],10),right:parseInt(u["padding-right"],10)+parseInt(u["border-right-width"],10)}}t.getPaddingAndBorder=m;function S(o,u,l){var p=l?-1:1;o.forEach(function(b,g){return L(b,p*u[g].x,u[g].y)})}t.translateThumbs=S;function B(o,u,l,p){for(var b=0,g=F(o[0],u,l,p),T=1;T<o.length;T++){var k=F(o[T],u,l,p);k<g&&(g=k,b=T)}return b}t.getClosestThumbIndex=B;function L(o,u,l){o.style.transform="translate(".concat(u,"px, ").concat(l,"px)")}t.translate=L;var x=function(o){var u=[],l=null,p=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];u=b,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,u)}))};return p};t.schd=x;function M(o,u,l){var p=o.slice(0);return p[u]=l,p}t.replaceAt=M;function $(o){var u=o.values,l=o.colors,p=o.min,b=o.max,g=o.direction,T=g===void 0?e.Direction.Right:g,k=o.rtl,D=k===void 0?!1:k;D&&T===e.Direction.Right?T=e.Direction.Left:D&&e.Direction.Left&&(T=e.Direction.Right);var _=u.slice(0).sort(function(j,W){return j-W}).map(function(j){return(j-p)/(b-p)*100}),N=_.reduce(function(j,W,E){return"".concat(j,", ").concat(l[E]," ").concat(W,"%, ").concat(l[E+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(N,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=$;function H(){}t.voidFn=H;function A(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=A;var C=function(o,u,l,p,b){b===void 0&&(b=function(T){return T});var g=Math.ceil(r([o],Array.from(o.children),!0).reduce(function(T,k){var D=Math.ceil(k.getBoundingClientRect().width);if(k.innerText&&k.innerText.includes(l)&&k.childElementCount===0){var _=k.cloneNode(!0);_.innerHTML=b(u.toFixed(p)),_.style.visibility="hidden",document.body.appendChild(_),D=Math.ceil(_.getBoundingClientRect().width),document.body.removeChild(_)}return D>T?D:T},o.getBoundingClientRect().width));return g},X=function(o,u,l,p,b,g,T){T===void 0&&(T=function(_){return _});var k=[],D=function(_){var N=C(l[_],p[_],b,g,T),j=u[_].x;u.forEach(function(W,E){var I=W.x,J=C(l[E],p[E],b,g,T);_!==E&&(j>=I&&j<=I+J||j+N>=I&&j+N<=I+J)&&(k.includes(E)||(k.push(_),k.push(E),k=r(r([],k,!0),[_,E],!1),D(E)))})};return D(o),Array.from(new Set(k.sort()))},Z=function(o,u,l,p,b,g){p===void 0&&(p=.1),b===void 0&&(b=" - "),g===void 0&&(g=function(E){return E});var T=(0,t.getStepDecimals)(p),k=(0,n.useState)({}),D=k[0],_=k[1],N=(0,n.useState)(g(u[l].toFixed(T))),j=N[0],W=N[1];return(0,n.useEffect)(function(){if(o){var E=o.getThumbs();if(E.length<1)return;var I={},J=o.getOffsets(),ie=X(l,J,E,u,b,T,g),le=g(u[l].toFixed(T));if(ie.length){var te=ie.reduce(function(re,ue,ge,pe){return re.length?r(r([],re,!0),[J[pe[ge]].x],!1):[J[pe[ge]].x]},[]);if(Math.min.apply(Math,te)===J[l].x){var de=[];ie.forEach(function(re){de.push(u[re].toFixed(T))}),le=Array.from(new Set(de.sort(function(re,ue){return parseFloat(re)-parseFloat(ue)}))).map(g).join(b);var fe=Math.min.apply(Math,te),he=Math.max.apply(Math,te),$e=E[ie[te.indexOf(he)]].getBoundingClientRect().width;I.left="".concat(Math.abs(fe-(he+$e))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}W(le),_(I)}},[o,u]),[j,D]};t.useThumbOverlap=Z;function F(o,u,l,p){var b=o.getBoundingClientRect(),g=b.left,T=b.top,k=b.width,D=b.height;return y(p)?Math.abs(l-(T+D/2)):Math.abs(u-(g+k/2))}var z=function(){var o,u=((o=navigator.userAgentData)===null||o===void 0?void 0:o.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(u)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};t.isIOS=z})(xe);var It=U&&U.__extends||function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}(),Ct=U&&U.__createBinding||(Object.create?function(t,r,n,e){e===void 0&&(e=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(t,e,a)}:function(t,r,n,e){e===void 0&&(e=n),t[e]=r[n]}),Dt=U&&U.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),xt=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Ct(r,t,n);return Dt(r,t),r},qe=U&&U.__spreadArray||function(t,r,n){if(n||arguments.length===2)for(var e=0,a=r.length,i;e<a;e++)(i||!(e in r))&&(i||(i=Array.prototype.slice.call(r,0,e)),i[e]=r[e]);return t.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(De,"__esModule",{value:!0});var ve=xt(w),O=xe,P=ce,Pt=["ArrowRight","ArrowUp","k","PageUp"],Bt=["ArrowLeft","ArrowDown","j","PageDown"],At=function(t){It(r,t);function r(n){var e=t.call(this,n)||this;if(e.trackRef=ve.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,c=a.min,f=a.max,y=e.trackRef.current;if(!y)return console.warn("No track element found."),[];var d=y.getBoundingClientRect(),h=(0,O.getPaddingAndBorder)(y);return e.getThumbs().map(function(v,R){var m={x:0,y:0},S=v.getBoundingClientRect(),B=(0,O.getMargin)(v);switch(i){case P.Direction.Right:return m.x=(B.left+h.left)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Left:return m.x=(B.right+h.right)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width-d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Up:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height-d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;case P.Direction.Down:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;default:return(0,O.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.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?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(!(a.button!==0||(0,O.isIOS)()))if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,O.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,O.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(c,f){return f===s?Math.max.apply(Math,e.state.thumbZIndexes):c<=e.state.thumbZIndexes[s]?c:c-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,c=i.onChange,f=i.step,y=i.rtl,d=i.direction,h=e.state.isChanged,v=e.getTargetIndex(a.nativeEvent),R=y||d===P.Direction.Left||d===P.Direction.Down?-1:1;v!==-1&&(Pt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]+R*(a.key==="PageUp"?f*10:f),v)))):Bt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]-R*(a.key==="PageDown"?f*10:f),v)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,c=s.draggedThumbIndex,f=s.draggedTrackPos,y=e.props,d=y.direction,h=y.min,v=y.max,R=y.onChange,m=y.values,S=y.step,B=y.rtl;if(c===-1&&f[0]===-1&&f[1]===-1)return null;var L=e.trackRef.current;if(!L)return null;var x=L.getBoundingClientRect(),M=(0,O.isVertical)(d)?x.height:x.width;if(f[0]!==-1&&f[1]!==-1){var $=a-f[0],H=i-f[1],A=0;switch(d){case P.Direction.Right:case P.Direction.Left:A=$/M*(v-h);break;case P.Direction.Down:case P.Direction.Up:A=H/M*(v-h);break;default:(0,O.assertUnreachable)(d)}if(B&&(A*=-1),Math.abs(A)>=S/2){for(var C=0;C<e.thumbRefs.length;C++){if(m[C]===v&&Math.sign(A)===1||m[C]===h&&Math.sign(A)===-1)return;var X=m[C]+A;X>v?A=v-m[C]:X<h&&(A=h-m[C])}for(var Z=m.slice(0),C=0;C<e.thumbRefs.length;C++)Z=(0,O.replaceAt)(Z,C,e.normalizeValue(m[C]+A,C));e.setState({draggedTrackPos:[a,i]}),R(Z)}}else{var F=0;switch(d){case P.Direction.Right:F=(a-x.left)/M*(v-h)+h;break;case P.Direction.Left:F=(M-(a-x.left))/M*(v-h)+h;break;case P.Direction.Down:F=(i-x.top)/M*(v-h)+h;break;case P.Direction.Up:F=(M-(i-x.top))/M*(v-h)+h;break;default:(0,O.assertUnreachable)(d)}B&&(F=v+h-F),Math.abs(m[c]-F)>=S/2&&R((0,O.replaceAt)(m,c,e.normalizeValue(F,c)))}},e.normalizeValue=function(a,i){var s=e.props,c=s.min,f=s.max,y=s.step,d=s.allowOverlap,h=s.values;return(0,O.normalizeValue)(a,i,c,f,y,d,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=ve.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),c=parseInt(a.paddingLeft,10),f=parseInt(a.paddingTop,10),y=[],d=0;d<e.numOfMarks+1;d++){var h=9999,v=9999;if(e.markRefs[d].current){var R=e.markRefs[d].current.getBoundingClientRect();h=R.height,v=R.width}e.props.direction===P.Direction.Left||e.props.direction===P.Direction.Right?y.push([Math.round(i/e.numOfMarks*d+c-v/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*d+f-h/2),-Math.round((v-i)/2)])}e.setState({markOffsets:y})}},n.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,O.schd)(e.onMouseMove),e.schdOnTouchMove=(0,O.schd)(e.onTouchMove),e.schdOnEnd=(0,O.schd)(e.onEnd),e.thumbRefs=n.values.map(function(){return ve.createRef()}),e.updateMarkRefs(n),e}return r.prototype.componentDidMount=function(){var n=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",n.onResize)},unobserve:function(){return window.removeEventListener("resize",n.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,O.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(c){return(0,O.checkBoundaries)(c,n.props.min,n.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(c){(0,O.isStepDivisible)(i,c,s)||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.")})},r.prototype.componentDidUpdate=function(n,e){var a=this.props,i=a.max,s=a.min,c=a.step,f=a.values,y=a.rtl;(n.max!==i||n.min!==s||n.step!==c)&&this.updateMarkRefs(this.props),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(n.max!==i||n.min!==s||n.step!==c||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),f.forEach(function(d){(0,O.isStepDivisible)(s,d,c)||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.")}))},r.prototype.componentWillUnmount=function(){var n={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,n),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)},r.prototype.render=function(){var n=this,e=this.props,a=e.label,i=e.labelledBy,s=e.renderTrack,c=e.renderThumb,f=e.renderMark,y=f===void 0?function(){return null}:f,d=e.values,h=e.min,v=e.max,R=e.allowOverlap,m=e.disabled,S=this.state,B=S.draggedThumbIndex,L=S.thumbZIndexes,x=S.markOffsets;return s({props:{style:{transform:"scale(1)",cursor:B>-1?"grabbing":this.props.draggableTrack?(0,O.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!m?"pointer":"inherit"},onMouseDown:m?O.voidFn:this.onMouseDownTrack,onTouchStart:m?O.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:m,children:qe(qe([],x.map(function(M,$,H){return y({props:{style:n.props.direction===P.Direction.Left||n.props.direction===P.Direction.Right?{position:"absolute",left:"".concat(M[0],"px"),marginTop:"".concat(M[1],"px")}:{position:"absolute",top:"".concat(M[0],"px"),marginLeft:"".concat(M[1],"px")},key:"mark".concat($),ref:n.markRefs[$]},index:$})}),!0),d.map(function(M,$){var H=n.state.draggedThumbIndex===$;return c({index:$,value:M,isDragged:H,props:{style:{position:"absolute",zIndex:L[$],cursor:m?"inherit":H?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:m?void 0:0,"aria-valuemax":R?v:d[$+1]||v,"aria-valuemin":R?h:d[$-1]||h,"aria-valuenow":M,draggable:!1,ref:n.thumbRefs[$],"aria-label":a,"aria-labelledby":i,role:"slider",onKeyDown:m?O.voidFn:n.onKeyDown,onKeyUp:m?O.voidFn:n.onKeyUp}})}),!0)})},r.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:P.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},r}(ve.Component);De.default=At;(function(t){var r=U&&U.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var n=r(De);t.Range=n.default;var e=xe;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=ce;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})})(Ce);function Ye(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function me(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var ye=ee("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$disabled,i=t.$isDragged,s=r.sizing,c="inherit";return a?c="not-allowed":i?c="grabbing":e.length===1&&(c="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:c,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var ke=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$min,i=t.$max,s=t.$disabled,c=r.colors,f=r.borders,y=r.direction,d=r.borders.useRoundedCorners?f.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:Ce.getTrackBackground({values:e,colors:e.length===1?[s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque]:[s?c.backgroundSecondary:c.borderOpaque,s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});ke.displayName="InnerTrack";ke.displayName="InnerTrack";ke.displayName="StyledInnerTrack";var Oe=ee("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});Oe.displayName="Mark";Oe.displayName="Mark";Oe.displayName="StyledMark";var we=ee("div",function(t){return me(me({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick";we.displayName="Tick";we.displayName="StyledTick";var Re=ee("div",function(t){var r=t.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Re.displayName="TickBar";Re.displayName="TickBar";Re.displayName="StyledTickBar";var Se=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,c=e.length===2&&a===1;return r.direction==="rtl"&&(c||s)&&(s=!s,c=!c),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});Se.displayName="Thumb";Se.displayName="Thumb";Se.displayName="StyledThumb";var Me=ee("div",function(t){var r=t.$disabled,n=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Me.displayName="InnerThumb";Me.displayName="InnerThumb";Me.displayName="StyledInnerThumb";var _e=ee("div",function(t){var r=t.$disabled,n=t.$theme;return me(me({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 Ge(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function Lt(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ge(Object(n),!0).forEach(function(e){jt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},Y.apply(this,arguments)}function q(t,r){return Ut(t)||Nt(t,r)||zt(t,r)||Vt()}function Vt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zt(t,r){if(t){if(typeof t=="string")return Xe(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(t,r)}}function Xe(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function Nt(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],a=!0,i=!1,s,c;try{for(n=n.call(t);!(a=(s=n.next()).done)&&(e.push(s.value),!(r&&e.length===r));a=!0);}catch(f){i=!0,c=f}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw c}}return e}}function Ut(t){if(Array.isArray(t))return t}var Ht=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 Wt(t){var r=t.overrides,n=r===void 0?{}:r,e=t.disabled,a=e===void 0?!1:e,i=t.marks,s=i===void 0?!1:i,c=t.onChange,f=c===void 0?function(){}:c,y=t.onFinalChange,d=y===void 0?function(){}:y,h=t.min,v=h===void 0?0:h,R=t.max,m=R===void 0?100:R,S=t.step,B=S===void 0?1:S,L=t.persistentThumb,x=L===void 0?!1:L,M=t.valueToLabel,$=M===void 0?function(G){return G}:M,H=t.value,A=w.useContext(pt),C=w.useState(!1),X=q(C,2),Z=X[0],F=X[1],z=w.useState(!1),o=q(z,2),u=o[0],l=o[1],p=w.useState(!1),b=q(p,2),g=b[0],T=b[1],k=w.useState(-1),D=q(k,2),_=D[0],N=D[1],j=w.useCallback(function(G){vt(G)&&T(!0);var V=G.target.parentNode.firstChild===G.target?0:1;N(V)},[]),W=w.useCallback(function(G){g!==!1&&T(!1),N(-1)},[]),E=Ht(H),I={$disabled:a,$step:B,$min:v,$max:m,$marks:s,$value:E,$isFocusVisible:g},J=Q(n.Root,ye),ie=q(J,2),le=ie[0],te=ie[1],de=Q(n.Track,Te),fe=q(de,2),he=fe[0],$e=fe[1],re=Q(n.InnerTrack,ke),ue=q(re,2),ge=ue[0],pe=ue[1],Je=Q(n.Thumb,Se),Pe=q(Je,2),Qe=Pe[0],et=Pe[1],tt=Q(n.InnerThumb,Me),Be=q(tt,2),rt=Be[0],nt=Be[1],at=Q(n.ThumbValue,_e),Ae=q(at,2),it=Ae[0],ot=Ae[1],st=Q(n.Tick,we),Fe=q(st,2),Le=Fe[0],je=Fe[1],ct=Q(n.TickBar,Re),Ve=q(ct,2),ut=Ve[0],lt=Ve[1],dt=Q(n.Mark,Oe),ze=q(dt,2),ft=ze[0],ht=ze[1];return w.createElement(le,Y({"data-baseweb":"slider"},I,te,{onFocus:mt(te,j),onBlur:bt(te,W)}),w.createElement(Ce.Range,Y({step:B,min:v,max:m,values:E,disabled:a,onChange:function(V){return f({value:V})},onFinalChange:function(V){return d({value:V})},rtl:A.direction==="rtl",renderTrack:function(V){var ne=V.props,K=V.children,oe=V.isDragged;return w.createElement(he,Y({onMouseDown:ne.onMouseDown,onTouchStart:ne.onTouchStart,$isDragged:oe},I,$e),w.createElement(ge,Y({$isDragged:oe,ref:ne.ref},I,pe),K))},renderThumb:function(V){var ne=V.props,K=V.index,oe=V.isDragged,Ne=x||(!!K&&u||!K&&Z||oe)&&!a;return w.createElement(Qe,Y({},ne,{onMouseEnter:function(){K===0?F(!0):l(!0)},onMouseLeave:function(){K===0?F(!1):l(!1)},$thumbIndex:K,$isDragged:oe,style:Lt({},ne.style)},I,et,{$isFocusVisible:g&&_===K}),Ne&&w.createElement(it,Y({$thumbIndex:K,$isDragged:oe},I,ot),$(E[K])),Ne&&w.createElement(rt,Y({$thumbIndex:K,$isDragged:oe},I,nt)))}},s?{renderMark:function(V){var ne=V.props,K=V.index;return w.createElement(ft,Y({$markIndex:K},ne,I,ht))}}:{})),w.createElement(ut,Y({},I,lt),w.createElement(Le,Y({},I,je),$(v)),w.createElement(Le,Y({},I,je),$(m))))}const Kt=be("div",{target:"e8lt0n70"})(({disabled:t,theme:r})=>({alignItems:"center",backgroundColor:t?r.colors.gray:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${yt(r.colors.primary,.5)}`}})),qt=be("div",{target:"e8lt0n71"})(({disabled:t,theme:r})=>({fontFamily:r.genericFonts.codeFont,fontSize:r.fontSizes.sm,color:t?r.colors.gray:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Yt=be("div",{target:"e8lt0n72"})(({theme:t})=>({fontSize:t.fontSizes.sm,paddingBottom:t.spacing.none,paddingLeft:t.spacing.none,paddingRight:t.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"})),Ze=be("div",{target:"e8lt0n73"})(({disabled:t,theme:r})=>({lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,fontFamily:r.genericFonts.codeFont,color:t?r.colors.fadedText40:"inherit"})),Gt=200;function Xt({disabled:t,element:r,widgetMgr:n,width:e,fragmentId:a}){var F;const[i,s]=Et({getStateFromWidgetMgr:Zt,getDefaultStateFromProto:Jt,getCurrStateFromProto:Qt,updateWidgetMgrState:er,element:r,widgetMgr:n,fragmentId:a}),[c,f]=w.useState(i),y=w.useRef(null),[d]=w.useState([]),[h]=w.useState([]),{colors:v,fonts:R,fontSizes:m,spacing:S}=Tt(),B={width:e},L=c.map(z=>Ie(z,r)),x=Ie(r.min,r),M=Ie(r.max,r),$=r.label;w.useEffect(()=>{f(i)},[i]);const H=w.useCallback(kt(Gt,z=>{s({value:z,fromUi:!0})}),[]),A=w.useCallback(({value:z})=>{f(z),H(z)},[H]),C=w.useCallback(()=>Ue(Yt,{"data-testid":"stSliderTickBar",children:[ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMin",children:x}),ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMax",children:M})]}),[x,M,t]),X=w.useCallback(He.forwardRef(function(o,u){const{$thumbIndex:l}=o,p=l||0;d[p]=u,h[p]||(h[p]=He.createRef());const b=Ot(o,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),g=L[p];return ae(Kt,{...b,disabled:o.$disabled===!0,ref:d[p],"aria-valuetext":g,"aria-label":$,children:ae(qt,{"data-testid":"stSliderThumbValue",disabled:o.$disabled===!0,ref:h[p],children:g})})}),[]);w.useEffect(()=>{var b,g;h.map((T,k)=>{T.current&&(T.current.innerText=L[k])}),d.map((T,k)=>{T.current&&T.current.setAttribute("aria-valuetext",L[k])});const z=y.current??null,o=d[0].current,u=(b=d[1])==null?void 0:b.current,l=h[0].current,p=(g=h[1])==null?void 0:g.current;nr(z,o,u,l,p)});const Z=w.useCallback(({$disabled:z})=>({height:S.twoXS,...z?{background:v.darkenedBgMix25}:{}}),[v,S]);return Ue("div",{ref:y,className:"stSlider","data-testid":"stSlider",style:B,children:[ae(_t,{label:r.label,disabled:t,labelVisibility:wt((F=r.labelVisibility)==null?void 0:F.value),children:r.help&&ae(Rt,{children:ae(St,{content:r.help,placement:Mt.TOP_RIGHT})})}),ae(Wt,{min:r.min,max:r.max,step:r.step,value:rr(c,r),onChange:A,disabled:t,overrides:{Thumb:X,Tick:{style:{fontFamily:R.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:S.none,paddingLeft:S.none,paddingRight:S.none,paddingTop:`calc(${m.sm} * 1.35)`}},InnerTrack:{style:Z},TickBar:C}})]})}function Zt(t,r){return t.getDoubleArrayValue(r)}function Jt(t){return t.default}function Qt(t){return t.value}function er(t,r,n,e){r.setDoubleArrayValue(t,n.value,{fromUi:n.fromUi},e)}function tr(t){const{dataType:r}=t;return r===Ee.DataType.DATETIME||r===Ee.DataType.DATE||r===Ee.DataType.TIME}function Ie(t,r){const{format:n,options:e}=r;return tr(r)?$t.utc(t/1e3).format(n):e.length>0?We.sprintf(n,e[t]):We.sprintf(n,t)}function rr(t,r){const{min:n,max:e}=r;let a=t[0],i=t.length>1?t[1]:t[0];return a>i&&(a=i),a<n&&(a=n),a>e&&(a=e),i<n&&(i=n),i>e&&(i=e),t.length>1?[a,i]:[a]}function nr(t,r,n,e,a){!t||!r||!e||(se(t,r,e),n&&a&&(se(t,n,a),ar(t,r,n,e,a)))}function se(t,r,n){const e=t.getBoundingClientRect(),a=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=a.left+a.width/2,c=s-i.width/2<e.left,f=s+i.width/2>e.right;n.style.left=c?"0":"",n.style.right=f?"0":""}function ar(t,r,n,e,a){const s=t.getBoundingClientRect(),c=r.getBoundingClientRect(),f=n.getBoundingClientRect(),y=e.getBoundingClientRect(),d=a.getBoundingClientRect(),h=s.left+s.width/2,v=c.left+c.width/2,R=f.left+f.width/2,m=v-y.width/2>=s.left,S=R+d.width/2<=s.right,B=c.left-y.width>=s.left,L=f.right+d.width<=s.right,x=m?y.width/2:y.width,M=S?d.width/2:d.width,$=v+x;if(R-M-$>24){se(t,r,e),se(t,n,a);return}if(B&&L){e.style.left="",e.style.right=`${Math.round(c.width)}px`,a.style.left=`${Math.round(f.width)}px`,a.style.right="";return}v<h?(se(t,r,e),a.style.left=`${Math.round(v+x+24-R)}px`,a.style.right=""):(se(t,n,a),e.style.left="",e.style.right=`${-Math.round(R-M-24-v)}px`)}const ur=w.memo(Xt);export{ur as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{b6 as a,j as e,b7 as c,bo as B,b5 as f,b8 as h}from"./index.
|
1
|
+
import{b6 as a,j as e,b7 as c,bo as B,b5 as f,b8 as h}from"./index.BER0Q_9x.js";function p(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let i=a.SECONDARY;t.type==="primary"?i=a.PRIMARY:t.type==="tertiary"&&(i=a.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:i,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{p as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as t,b4 as v,
|
1
|
+
import{n as t,b4 as v,au as y,b5 as l,b6 as c,j as s,b7 as C,b8 as S}from"./index.BER0Q_9x.js";function k(o,i){switch(o){case l.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case l.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case l.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const g=t("a",{target:"eceuep10"})(({fluidWidth:o,size:i,theme:r})=>{const a=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?a:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(i,r)}}),B=t(g,{target:"eceuep11"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=t(g,{target:"eceuep12"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=t(g,{target:"eceuep13"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:i,disabled:r,fluidWidth:a,children:d,autoFocus:n,href:e,rel:u,target:b,onClick:f}){let p=B;return o===c.SECONDARY?p=x:o===c.TERTIARY&&(p=$),s(p,{kind:o,size:i||l.MEDIUM,fluidWidth:a||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:b,rel:u,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:i,element:r,width:a}=o,d={width:a};let n=c.SECONDARY;r.type==="primary"?n=c.PRIMARY:r.type==="tertiary"&&(n=c.TERTIARY);const e=r.help?a:!0,u=b=>{o.disabled&&b.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:i,onClick:u,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as c,E as ie,_ as oe,ch as Tt,ci as T,cj as R,ck as Rt,R as st,cl as f,n as m,
|
1
|
+
import{r as c,E as ie,_ as oe,ch as Tt,ci as T,cj as R,ck as Rt,R as st,cl as f,n as m,z as S,j as p,bn as M,bo as Z,b6 as Q,b5 as Lt,cm as Bt,cn as Vt,aY as Ht,F as Nt,az as Wt,bi as $t,aV as Xe,J as _,bk as Kt,bj as Xt,bq as Yt,bD as Gt,br as qt,ba as Jt,bs as Zt}from"./index.BER0Q_9x.js";import{F as Qt}from"./FormClearHelper.DPFVZXH5.js";import{S as er,P as tr}from"./ProgressBar.DGXb6QOO.js";import{u as rr}from"./Hooks.FlVdDTii.js";import{U as q}from"./UploadFileInfo.C-jY39rj.js";var ct=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.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"}))});ct.displayName="Clear";var ut=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.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"}))});ut.displayName="CloudUpload";var pt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.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"}))});pt.displayName="Error";var dt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))});dt.displayName="InsertDriveFile";var P;(function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"})(P||(P={}));const Se=Tt()?1024:1e3,ee=["gb","mb","kb","b"],ae=(e,r,t=1)=>{if(r||(r="b"),t<0&&(t=0),e<0)throw new Error("Size must be greater than or equal to 0");const n=ee.indexOf(r),i=e/Se;return n&&e>Se/2?ae(i,ee[n-1],t):`${e.toFixed(t)}${r.toUpperCase()}`},nr=(e,r,t)=>{if(e<0)throw Error("Size must be 0 or greater");const n=ee.findIndex(s=>s===r),i=ee.findIndex(s=>s===t);if(n===-1||i===-1)throw Error("Unexpected byte unit provided");if(n===i)return e;const o=Math.abs(n-i),l=Se**o;return n>i?e/l:e*l};var ir=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function V(e,r){var t=or(e);if(typeof t.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof r=="string"?r:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function or(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=ir.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var ar=[".DS_Store","Thumbs.db"];function lr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return te(e)&&sr(e)?[2,dr(e.dataTransfer,e.type)]:cr(e)?[2,ur(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,pr(e)]:[2,[]]})})}function sr(e){return te(e.dataTransfer)}function cr(e){return te(e)&&te(e.target)}function te(e){return typeof e=="object"&&e!==null}function ur(e){return Ee(e.target.files).map(function(r){return V(r)})}function pr(e){return T(this,void 0,void 0,function(){var r;return R(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return r=t.sent(),[2,r.map(function(n){return V(n)})]}})})}function dr(e,r){return T(this,void 0,void 0,function(){var t,n;return R(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(t=Ee(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(fr))]):[3,2];case 1:return n=i.sent(),[2,Ye(ft(n))];case 2:return[2,Ye(Ee(e.files).map(function(o){return V(o)}))]}})})}function Ye(e){return e.filter(function(r){return ar.indexOf(r.name)===-1})}function Ee(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function fr(e){if(typeof e.webkitGetAsEntry!="function")return Ge(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?gt(r):Ge(e)}function ft(e){return e.reduce(function(r,t){return Rt(r,Array.isArray(t)?ft(t):[t])},[])}function Ge(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=V(r);return Promise.resolve(t)}function gr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,e.isDirectory?gt(e):mr(e)]})})}function gt(e){var r=e.createReader();return new Promise(function(t,n){var i=[];function o(){var l=this;r.readEntries(function(s){return T(l,void 0,void 0,function(){var d,w,v;return R(this,function(y){switch(y.label){case 0:if(s.length)return[3,5];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return d=y.sent(),t(d),[3,4];case 3:return w=y.sent(),n(w),[3,4];case 4:return[3,6];case 5:v=Promise.all(s.map(gr)),i.push(v),o(),y.label=6;case 6:return[2]}})})},function(s){n(s)})}o()})}function mr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,new Promise(function(t,n){e.file(function(i){var o=V(i,e.fullPath);t(o)},function(i){n(i)})})]})})}var hr=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(l){var s=l.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Je(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){mt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ze(e,r){return Fr(e)||br(e,r)||yr(e,r)||vr()}function vr(){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 yr(e,r){if(e){if(typeof e=="string")return Qe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Qe(e,r)}}function Qe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function br(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(d){o=!0,s=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return n}}function Fr(e){if(Array.isArray(e))return e}var wr="file-invalid-type",Dr="file-too-large",xr="file-too-small",Sr="too-many-files",Er=function(r){r=Array.isArray(r)&&r.length===1?r[0]:r;var t=Array.isArray(r)?"one of ".concat(r.join(", ")):r;return{code:wr,message:"File type must be ".concat(t)}},et=function(r){return{code:Dr,message:"File is larger than ".concat(r," ").concat(r===1?"byte":"bytes")}},tt=function(r){return{code:xr,message:"File is smaller than ".concat(r," ").concat(r===1?"byte":"bytes")}},Ar={code:Sr,message:"Too many files"};function ht(e,r){var t=e.type==="application/x-moz-file"||hr(e,r);return[t,t?null:Er(r)]}function vt(e,r,t){if(B(e.size))if(B(r)&&B(t)){if(e.size>t)return[!1,et(t)];if(e.size<r)return[!1,tt(r)]}else{if(B(r)&&e.size<r)return[!1,tt(r)];if(B(t)&&e.size>t)return[!1,et(t)]}return[!0,null]}function B(e){return e!=null}function Or(e){var r=e.files,t=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,l=e.maxFiles;return!o&&r.length>1||o&&l>=1&&r.length>l?!1:r.every(function(s){var d=ht(s,t),w=Ze(d,1),v=w[0],y=vt(s,n,i),O=Ze(y,1),I=O[0];return v&&I})}function re(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function J(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(r){return r==="Files"||r==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rt(e){e.preventDefault()}function Ir(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cr(e){return e.indexOf("Edge/")!==-1}function Pr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ir(e)||Cr(e)}function A(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return r.some(function(s){return!re(n)&&s&&s.apply(void 0,[n].concat(o)),re(n)})}}function zr(){return"showOpenFilePicker"in window}function kr(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(r){return r==="audio/*"||r==="video/*"||r==="image/*"||r==="text/*"||/\w+\/[-+.\w]+/g.test(r)}).reduce(function(r,t){return Je(Je({},r),{},mt({},t,[]))},{}):{}}]}function Ur(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jr(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}var _r=["children"],Mr=["open"],Tr=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Rr=["refKey","onChange","onClick"];function Lr(e){return Hr(e)||Vr(e)||yt(e)||Br()}function Br(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hr(e){if(Array.isArray(e))return Ae(e)}function xe(e,r){return $r(e)||Wr(e,r)||yt(e,r)||Nr()}function Nr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(e,r){if(e){if(typeof e=="string")return Ae(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ae(e,r)}}function Ae(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Wr(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(d){o=!0,s=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return n}}function $r(e){if(Array.isArray(e))return e}function nt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?nt(Object(t),!0).forEach(function(n){Oe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Oe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ne(e,r){if(e==null)return{};var t=Kr(e,r),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function Kr(e,r){if(e==null)return{};var t={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(r.indexOf(i)>=0)&&(t[i]=e[i]);return t}var le=c.forwardRef(function(e,r){var t=e.children,n=ne(e,_r),i=Xr(n),o=i.open,l=ne(i,Mr);return c.useImperativeHandle(r,function(){return{open:o}},[o]),st.createElement(c.Fragment,null,t(g(g({},l),{},{open:o})))});le.displayName="Dropzone";var bt={disabled:!1,getFilesFromEvent:lr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};le.defaultProps=bt;le.propTypes={children:f.func,accept:f.oneOfType([f.string,f.arrayOf(f.string)]),multiple:f.bool,preventDropOnDocument:f.bool,noClick:f.bool,noKeyboard:f.bool,noDrag:f.bool,noDragEventsBubbling:f.bool,minSize:f.number,maxSize:f.number,maxFiles:f.number,disabled:f.bool,getFilesFromEvent:f.func,onFileDialogCancel:f.func,onFileDialogOpen:f.func,useFsAccessApi:f.bool,onDragEnter:f.func,onDragLeave:f.func,onDragOver:f.func,onDrop:f.func,onDropAccepted:f.func,onDropRejected:f.func,validator:f.func};var Ie={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Xr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=g(g({},bt),e),t=r.accept,n=r.disabled,i=r.getFilesFromEvent,o=r.maxSize,l=r.minSize,s=r.multiple,d=r.maxFiles,w=r.onDragEnter,v=r.onDragLeave,y=r.onDragOver,O=r.onDrop,I=r.onDropAccepted,se=r.onDropRejected,ce=r.onFileDialogCancel,ue=r.onFileDialogOpen,Pe=r.useFsAccessApi,pe=r.preventDropOnDocument,ze=r.noClick,de=r.noKeyboard,ke=r.noDrag,C=r.noDragEventsBubbling,fe=r.validator,ge=c.useMemo(function(){return typeof ue=="function"?ue:it},[ue]),H=c.useMemo(function(){return typeof ce=="function"?ce:it},[ce]),D=c.useRef(null),x=c.useRef(null),Pt=c.useReducer(Yr,Ie),Ue=xe(Pt,2),N=Ue[0],F=Ue[1],zt=N.isFocused,je=N.isFileDialogActive,_e=N.draggedFiles,W=c.useRef(typeof window<"u"&&window.isSecureContext&&Pe&&zr()),Me=function(){!W.current&&je&&setTimeout(function(){if(x.current){var u=x.current.files;u.length||(F({type:"closeDialog"}),H())}},300)};c.useEffect(function(){return window.addEventListener("focus",Me,!1),function(){window.removeEventListener("focus",Me,!1)}},[x,je,H,W]);var z=c.useRef([]),Te=function(u){D.current&&D.current.contains(u.target)||(u.preventDefault(),z.current=[])};c.useEffect(function(){return pe&&(document.addEventListener("dragover",rt,!1),document.addEventListener("drop",Te,!1)),function(){pe&&(document.removeEventListener("dragover",rt),document.removeEventListener("drop",Te))}},[D,pe]);var Re=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[].concat(Lr(z.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||(F({draggedFiles:u,isDragActive:!0,type:"setDraggedFiles"}),w&&w(a))})},[i,w,C]),Le=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=J(a);if(u&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return u&&y&&y(a),!1},[y,C]),Be=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=z.current.filter(function(b){return D.current&&D.current.contains(b)}),h=u.indexOf(a.target);h!==-1&&u.splice(h,1),z.current=u,!(u.length>0)&&(F({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),J(a)&&v&&v(a))},[D,v,C]),$=c.useCallback(function(a,u){var h=[],b=[];a.forEach(function(E){var L=ht(E,t),j=xe(L,2),he=j[0],ve=j[1],ye=vt(E,l,o),G=xe(ye,2),be=G[0],Fe=G[1],we=fe?fe(E):null;if(he&&be&&!we)h.push(E);else{var De=[ve,Fe];we&&(De=De.concat(we)),b.push({file:E,errors:De.filter(function(Mt){return Mt})})}}),(!s&&h.length>1||s&&d>=1&&h.length>d)&&(h.forEach(function(E){b.push({file:E,errors:[Ar]})}),h.splice(0)),F({acceptedFiles:h,fileRejections:b,type:"setFiles"}),O&&O(h,b,u),b.length>0&&se&&se(b,u),h.length>0&&I&&I(h,u)},[F,s,t,l,o,d,O,I,se,fe]),K=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[],J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||$(u,a)}),F({type:"reset"})},[i,$,C]),k=c.useCallback(function(){if(W.current){F({type:"openDialog"}),ge();var a={multiple:s,types:kr(t)};window.showOpenFilePicker(a).then(function(u){return i(u)}).then(function(u){$(u,null),F({type:"closeDialog"})}).catch(function(u){Ur(u)?(H(u),F({type:"closeDialog"})):jr(u)&&(W.current=!1,x.current&&(x.current.value=null,x.current.click()))});return}x.current&&(F({type:"openDialog"}),ge(),x.current.value=null,x.current.click())},[F,ge,H,Pe,$,t,s]),Ve=c.useCallback(function(a){!D.current||!D.current.isEqualNode(a.target)||(a.key===" "||a.key==="Enter"||a.keyCode===32||a.keyCode===13)&&(a.preventDefault(),k())},[D,k]),He=c.useCallback(function(){F({type:"focus"})},[]),Ne=c.useCallback(function(){F({type:"blur"})},[]),We=c.useCallback(function(){ze||(Pr()?setTimeout(k,0):k())},[ze,k]),U=function(u){return n?null:u},me=function(u){return de?null:U(u)},X=function(u){return ke?null:U(u)},Y=function(u){C&&u.stopPropagation()},kt=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.role,E=a.onKeyDown,L=a.onFocus,j=a.onBlur,he=a.onClick,ve=a.onDragEnter,ye=a.onDragOver,G=a.onDragLeave,be=a.onDrop,Fe=ne(a,Tr);return g(g(Oe({onKeyDown:me(A(E,Ve)),onFocus:me(A(L,He)),onBlur:me(A(j,Ne)),onClick:U(A(he,We)),onDragEnter:X(A(ve,Re)),onDragOver:X(A(ye,Le)),onDragLeave:X(A(G,Be)),onDrop:X(A(be,K)),role:typeof b=="string"&&b!==""?b:"button"},h,D),!n&&!de?{tabIndex:0}:{}),Fe)}},[D,Ve,He,Ne,We,Re,Le,Be,K,de,ke,n]),Ut=c.useCallback(function(a){a.stopPropagation()},[]),jt=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.onChange,E=a.onClick,L=ne(a,Rr),j=Oe({accept:t,multiple:s,type:"file",style:{display:"none"},onChange:U(A(b,K)),onClick:U(A(E,Ut)),tabIndex:-1},h,x);return g(g({},j),L)}},[x,t,s,K,n]),$e=_e.length,Ke=$e>0&&Or({files:_e,accept:t,minSize:l,maxSize:o,multiple:s,maxFiles:d}),_t=$e>0&&!Ke;return g(g({},N),{},{isDragAccept:Ke,isDragReject:_t,isFocused:zt&&!n,getRootProps:kt,getInputProps:jt,rootRef:D,inputRef:x,open:U(k)})}function Yr(e,r){switch(r.type){case"focus":return g(g({},e),{},{isFocused:!0});case"blur":return g(g({},e),{},{isFocused:!1});case"openDialog":return g(g({},Ie),{},{isFileDialogActive:!0});case"closeDialog":return g(g({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=r.isDragActive,n=r.draggedFiles;return g(g({},e),{},{draggedFiles:n,isDragActive:t});case"setFiles":return g(g({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return g({},Ie);default:return e}}function it(){}const Ft=m("section",{target:"e1orukol0"})(({isDisabled:e,theme:r})=>({display:"flex",alignItems:"center",padding:r.spacing.lg,backgroundColor:r.colors.secondaryBg,borderRadius:r.radii.default,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${r.colors.primary}`},color:e?r.colors.gray:r.colors.bodyText})),wt=m("div",{target:"e1orukol1"})({marginRight:"auto",alignItems:"center",display:"flex"}),Dt=m("span",{target:"e1orukol2"})(({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),Gr=m("span",{target:"e1orukol3"})(({theme:e})=>({marginBottom:e.spacing.twoXS})),qr=m("div",{target:"e1orukol4"})({display:"flex",flexDirection:"column"}),xt=m("div",{target:"e1orukol5"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),Jr=m("ul",{target:"e1orukol6"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),St=m("li",{target:"e1orukol7"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),Et=m("div",{target:"e1orukol8"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),At=m("div",{target:"e1orukol9"})(({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Ot=m("div",{target:"e1orukol10"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Zr=m("span",{target:"e1orukol11"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qr=m("div",{target:"e1orukol12"})(({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),It=m("small",{target:"e1orukol13"})(({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),Ct=m("span",{target:"e1orukol14"})({}),ot=e=>({[Ft]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[wt]:{marginBottom:e.spacing.lg},[Dt]:{display:"none"},[xt]:{paddingRight:e.spacing.lg},[Ot]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[At]:{width:e.sizes.full},[Et]:{flexDirection:"column"},[It]:{height:"auto",whiteSpace:"initial"},[Ct]:{display:"none"},[St]:{margin:e.spacing.none,padding:e.spacing.none}}),en=m("div",{target:"e1orukol15"})(({theme:e})=>e.inSidebar?ot(e):{[`@media (max-width: ${e.breakpoints.sm})`]:ot(e)});var at;(function(e){e.DANGER="danger"})(at||(at={}));const Ce=m("small",{target:"ejh2rmr0"})(({kind:e,theme:r})=>{const{danger:t,fadedText60:n}=r.colors;return{color:e==="danger"?t:n,fontSize:r.fontSizes.sm,lineHeight:r.lineHeights.tight}}),tn=({multiple:e,acceptedExtensions:r,maxSizeBytes:t})=>S(wt,{"data-testid":"stFileUploaderDropzoneInstructions",children:[p(Dt,{children:p(M,{content:ut,size:"threeXL"})}),S(qr,{children:[S(Gr,{children:["Drag and drop file",e?"s":""," here"]}),S(Ce,{children:[`Limit ${ae(t,P.Byte,0)} per file`,r.length?` • ${r.map(n=>n.replace(/^\./,"").toUpperCase()).join(", ")}`:null]})]})]}),rn=({onDrop:e,multiple:r,acceptedExtensions:t,maxSizeBytes:n,disabled:i,label:o})=>p(le,{onDrop:e,multiple:r,accept:t.length?t:void 0,maxSize:n,disabled:i,useFsAccessApi:!1,children:({getRootProps:l,getInputProps:s})=>S(Ft,{...l(),"data-testid":"stFileUploaderDropzone",isDisabled:i,"aria-label":o,children:[p("input",{"data-testid":"stFileUploaderDropzoneInput",...s()}),p(tn,{multiple:r,acceptedExtensions:t,maxSizeBytes:n}),p(Z,{kind:Q.SECONDARY,disabled:i,size:Lt.SMALL,children:"Browse files"})]})}),nn=m("div",{target:"egc9vxm0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),on=m("div",{target:"egc9vxm1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),an=({currentPage:e,totalPages:r,onNext:t,onPrevious:n})=>S(nn,{"data-testid":"stFileUploaderPagination",children:[p(Ce,{children:`Showing page ${e} of ${r}`}),S(on,{children:[p(Z,{onClick:n,kind:Q.MINIMAL,children:p(M,{content:Bt,size:"xl"})}),p(Z,{onClick:t,kind:Q.MINIMAL,children:p(M,{content:Vt,size:"xl"})})]})]}),lt=(e,r)=>Math.ceil(e.length/r),ln=e=>Ht(({pageSize:t,items:n,resetOnAdd:i,...o})=>{const[l,s]=c.useState(0),[d,w]=c.useState(lt(n,t)),v=rr(n);c.useEffect(()=>{v&&v.length!==n.length&&w(lt(n,t)),v&&v.length<n.length?i&&s(0):l+1>=d&&s(d-1)},[n,l,t,v,i,d]);const y=()=>{s(Math.min(l+1,d-1))},O=()=>{s(Math.max(0,l-1))},I=n.slice(l*t,l*t+t);return S(Nt,{children:[p(e,{items:I,...o}),n.length>t?p(an,{pageSize:t,totalPages:d,currentPage:l+1,onNext:y,onPrevious:O}):null]})},e),sn=({fileInfo:e})=>e.status.type==="uploading"?p(tr,{value:e.status.progress,size:er.SMALL}):e.status.type==="error"?S(It,{children:[p(Zr,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),p(Ct,{children:p(M,{content:pt,size:"lg"})})]}):e.status.type==="uploaded"?p(Ce,{children:ae(e.size,P.Byte)}):null,cn=({fileInfo:e,onDelete:r})=>S(Ot,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[p(Qr,{children:p(M,{content:dt,size:"twoXL"})}),S(Et,{className:"stFileUploaderFileData",children:[p(At,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,children:e.name}),p(sn,{fileInfo:e})]}),p("div",{"data-testid":"stFileUploaderDeleteBtn",children:p(Z,{onClick:()=>r(e.id),kind:Q.MINIMAL,children:p(M,{content:ct,size:"lg"})})})]}),un=({items:e,onDelete:r})=>p(Jr,{children:e.map(t=>p(St,{children:p(cn,{fileInfo:t,onDelete:r})},t.id))}),pn=ln(un),dn=e=>p(xt,{children:p(pn,{...e})});class yn extends st.PureComponent{constructor(r){super(r),this.formClearHelper=new Qt,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:n,widgetMgr:i,fragmentId:o}=this.props,l=i.getFileUploaderStateValue(n);Wt(t,l)||i.setFileUploaderStateValue(n,t,{fromUi:!0},o)},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(t,n)=>{const{element:i}=this.props,{multipleFiles:o}=i;if(!o&&t.length===0&&n.length>1){const l=n.findIndex(s=>s.errors.length===1&&s.errors[0].code==="too-many-files");l>=0&&(t.push(n[l].file),n.splice(l,1))}if(this.props.uploadClient.fetchFileURLs(t).then(l=>{if(!o&&t.length>0){const s=this.state.files.find(d=>d.status.type!=="error");s&&(this.forceUpdatingStatus=!0,this.deleteFile(s.id),this.forceUpdatingStatus=!1)}$t(l,t).forEach(([s,d])=>{this.uploadFile(s,d)})}).catch(l=>{this.addFiles(t.map(s=>new q(s.name,s.size,this.nextLocalFileId(),{type:"error",errorMessage:l})))}),n.length>0){const l=n.map(s=>{const{file:d}=s;return new q(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(s.errors[0].code,s.file)})});this.addFiles(l)}},this.uploadFile=(t,n)=>{const i=Xe.CancelToken.source(),o=new q(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:i,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,n,l=>this.onUploadProgress(l,o.id),i.token).then(()=>this.onUploadComplete(o.id,t)).catch(l=>{Xe.isCancel(l)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:l?l.toString():"Unknown error"}))})},this.onUploadComplete=(t,n)=>{const i=this.getFile(t);_(i)||i.status.type!=="uploading"||this.updateFile(i.id,i.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.getErrorMessage=(t,n)=>{switch(t){case"file-too-large":return`File must be ${ae(this.maxUploadSizeInBytes,P.Byte)} or smaller.`;case"file-invalid-type":return`${n.type} files are not allowed.`;case"file-too-small":return"File size is too small.";case"too-many-files":return"Only one file is allowed.";default:return"Unexpected error. Please try again."}},this.deleteFile=t=>{const n=this.getFile(t);_(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(n=>({files:[...n.files,t]}))},this.addFiles=t=>{this.setState(n=>({files:[...n.files,...t]}))},this.removeFile=t=>{this.setState(n=>({files:n.files.filter(i=>i.id!==t)}))},this.getFile=t=>this.state.files.find(n=>n.id===t),this.updateFile=(t,n)=>{this.setState(i=>({files:i.files.map(o=>o.id===t?n:o)}))},this.onUploadProgress=(t,n)=>{const i=this.getFile(n);if(_(i)||i.status.type!=="uploading")return;const o=Math.round(t.loaded*100/t.total);i.status.progress!==o&&this.updateFile(n,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:o}))},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(_(t))return;const{widgetMgr:n,element:i,fragmentId:o}=this.props;n.setFileUploaderStateValue(i,t,{fromUi:!0},o)})},this.state=this.initialValue}get initialValue(){const r={files:[],newestServerFileId:0},{widgetMgr:t,element:n}=this.props,i=t.getFileUploaderStateValue(n);if(_(i))return r;const{uploadedFileInfo:o}=i;return _(o)||o.length===0?r:{files:o.map(l=>{const s=l.name,d=l.size,w=l.fileId,v=l.fileUrls;return new q(s,d,this.nextLocalFileId(),{type:"uploaded",fileId:w,fileUrls:v})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const r=this.props.element.maxUploadSizeMb;return nr(r,P.Megabyte,P.Byte)}get status(){const r=t=>t.status.type==="uploading";return this.state.files.some(r)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const r=this.createWidgetValue(),{element:t,widgetMgr:n,fragmentId:i}=this.props;n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,r,{fromUi:!1},i)}createWidgetValue(){const r=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:n,size:i,status:o}=t,{fileId:l,fileUrls:s}=o;return new Kt({fileId:l,fileUrls:s,name:n,size:i})});return new Xt({uploadedFileInfo:r})}render(){var s;const{files:r}=this.state,{element:t,disabled:n,widgetMgr:i}=this.props,o=t.type;this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared);const l=r.slice().reverse();return S(en,{className:"stFileUploader","data-testid":"stFileUploader",children:[p(Zt,{label:t.label,disabled:n,labelVisibility:Yt((s=t.labelVisibility)==null?void 0:s.value),children:t.help&&p(Gt,{children:p(qt,{content:t.help,placement:Jt.TOP_RIGHT})})}),p(rn,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:o,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:n}),l.length>0&&p(dn,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}export{yn as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{R as m,
|
1
|
+
import{R as m,aC as B,b6 as i,j as e,b7 as h,bo as p,b5 as w,b8 as D}from"./index.BER0Q_9x.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function C(n,o,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(o),filename:""})}function y(n){const{disabled:o,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let a=i.SECONDARY;t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),C(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:a,size:w.SMALL,disabled:o,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as s,y as U,co as T,z as k,j as l,bq as A,bD as D,br as L,ba as P,bs as B}from"./index.BER0Q_9x.js";import{u as j}from"./uniqueId.C5O-wLYh.js";import{u as _,a as q,b as K}from"./useOnInputChange.DawRSruf.js";import{I as O}from"./InputInstructions.BdYrHlrF.js";import{a as $}from"./useBasicWidgetState.nirky3Hn.js";import{T as G}from"./textarea.C2VzK-E-.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.DPFVZXH5.js";import"./base-input.DXAKraS2.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=q({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),z={width:h},{height:f,placeholder:E,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:z,children:[l(B,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(D,{children:l(L,{content:t.help,placement:P.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bn as K}from"./index.BER0Q_9x.js";import{I as N}from"./InputInstructions.BdYrHlrF.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.C2VzK-E-.js";import"./base-input.DXAKraS2.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"ewv11c90"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"ewv11c91"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"ewv11c92"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"ewv11c93"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"ewv11c94"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,I]=i.useState(0),a=i.useRef(null),y=i.useRef({minHeight:0,maxHeight:0}),w=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},C=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),I(0))},E=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),C())},B=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),I(w()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;y.current.minHeight=e,y.current.maxHeight=e*O}},[a]);const{disabled:x,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:v}=y.current,S=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:B,onKeyDown:E,"aria-label":m,disabled:x,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:S?`${b+R}px`:"auto",maxHeight:v?`${v}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:C,disabled:!g||x,extended:S,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{n as t,bb as e,z as o,j as a,aB as i}from"./index.BER0Q_9x.js";import{P as l}from"./ProgressBar.DGXb6QOO.js";const d=t("div",{target:"e1eqiuxd0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal",color:e(s)}));function c({element:s,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[a(d,{children:a(i,{source:s.text,allowHTML:!1,isLabel:!0})}),a(l,{value:s.value,width:r})]})}export{c as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ai as Wt,p as $e,d as VM,aS as yu,_ as jM,an as TL,j as ms,aB as Ll,aT as Gy,F as aE,aU as Wy,aV as EL,aW as lE,aX as SL,aA as CL,aY as PL,aZ as IL,n as HM,ay as GM,a_ as T1,a$ as cE,at as ML,ae as RL,b0 as uE}from"./index.CrcobIb0.js";import{_ as Gn,C as BL}from"./slicedToArray.C1s2cVDA.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./getPrototypeOf.M3x98UQ7.js";import{a as OL,T as DL}from"./Toolbar.Dw79Vekz.js";import{u as WM,E as qM,w as FL}from"./withFullScreenWrapper.CWPfcXAP.js";import{u as LL}from"./useBasicWidgetState.BB9oQkjJ.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.Bvmaiutv.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function XM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||XM()}function VL(t){return ku()?XM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const XL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+XL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function qf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const Xf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Xf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,Xf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,Xf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xf.debug||Xf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=qf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=qf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?qL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class qy{terminate(){}}const Xy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=Xy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),Xy.set(t.url,e)),t.source&&(e=eR(t.source),Xy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
|
1
|
+
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aS as yu,_ as jM,at as TL,j as ms,z as Ll,aT as Gy,F as aE,aU as Wy,aV as EL,aW as lE,aX as SL,aC as CL,aY as PL,aZ as IL,n as HM,C as GM,a_ as T1,a$ as cE,az as ML,y as RL,b0 as uE}from"./index.BER0Q_9x.js";import{_ as Gn,C as BL}from"./slicedToArray.C54-k4r_.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./getPrototypeOf.IRomgPPd.js";import{a as OL,T as DL}from"./Toolbar.CLiZhV_n.js";import{u as WM,E as qM,w as FL}from"./withFullScreenWrapper.DMpPC-b8.js";import{u as LL}from"./useBasicWidgetState.nirky3Hn.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.DPFVZXH5.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function XM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||XM()}function VL(t){return ku()?XM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const XL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+XL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function qf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const Xf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Xf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,Xf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,Xf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xf.debug||Xf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=qf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=qf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?qL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class qy{terminate(){}}const Xy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=Xy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),Xy.set(t.url,e)),t.source&&(e=eR(t.source),Xy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
|
2
2
|
importScripts('${t}');
|
3
3
|
} catch (error) {
|
4
4
|
console.error(error);
|
@@ -1 +1 @@
|
|
1
|
-
import{n as s,k as r,r as i,j as n}from"./index.
|
1
|
+
import{n as s,k as r,r as i,j as n}from"./index.BER0Q_9x.js";import{P as m,R as c}from"./RenderInPortalIfExists.DON4V-QO.js";const p=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,f=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,d=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,B=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,L=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,h=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,a=121,e=20,g=80,u=1e3,x=r("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),_=s("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-a/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-e)+e}vw`,animationDelay:`${Math.random()*u}ms`,height:`${t}px`,width:`${a}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,l=[p,f,d,B,L,h],A=l.length,I=({particleType:o})=>n(_,{src:l[o]}),M=({scriptRunId:o})=>n(c,{children:n(m,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=i.memo(M);export{w as NUM_BALLOONS,S as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{n as z,r as a,y as R,co as I,z as U,j as u,bq as k,bD as D,br as H,ba as L,bs as B,cq as j}from"./index.BER0Q_9x.js";import{u as q}from"./uniqueId.C5O-wLYh.js";import{u as O,a as _,b as K}from"./useOnInputChange.DawRSruf.js";import{a as A}from"./useBasicWidgetState.nirky3Hn.js";import{I as G}from"./InputInstructions.BdYrHlrF.js";import{I as N}from"./input.l_XjOrMQ.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.DPFVZXH5.js";import"./base-input.DXAKraS2.js";const $=z("div",{target:"e1sommdr0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:s,width:n,fragmentId:m}){var g;const[r,l]=a.useState(S(s,t)??null),[i,d]=a.useState(!1),W=a.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=A({getStateFromWidgetMgr:S,getDefaultStateFromProto:w,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:s,fragmentId:m,onFormCleared:W});O(y,r,l,i);const[T,h]=a.useState(!1),o=R(),[b]=a.useState(()=>q("text_input_")),{placeholder:x,formId:f}=t,c=a.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:f})?s.allowFormEnterToSubmit(f):i,V=T&&n>o.breakpoints.hideWidgetDetails,F=a.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=a.useCallback(()=>{h(!0)},[]),E=_({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=K(t.formId,c,i,s,m);return U($,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(B,{label:t.label,disabled:e,labelVisibility:k((g=t.labelVisibility)==null?void 0:g.value),htmlFor:b,children:t.help&&u(D,{children:u(H,{content:t.help,placement:L.TOP_RIGHT})})}),u(N,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:b,type:X(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth}}}}),V&&u(G,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function w(e){return e.default??null}function J(e){return e.value??null}function Q(e,t,s,n){t.setStringValue(e,s.value,{fromUi:s.fromUi},n)}function X(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};
|