streamlit-nightly 1.42.3.dev20250301__py2.py3-none-any.whl → 1.42.3.dev20250302__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.
Files changed (72) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.CUiEWbzl.js → FileDownload.esm.MU0nAJxt.js} +1 -1
  3. streamlit/static/static/js/{FileHelper.B6bBsK7b.js → FileHelper.D-6vwsT7.js} +1 -1
  4. streamlit/static/static/js/{FormClearHelper.B_9Ez6vr.js → FormClearHelper.DzssExOY.js} +1 -1
  5. streamlit/static/static/js/{Hooks.VwVTTUgt.js → Hooks.X18-6oCR.js} +1 -1
  6. streamlit/static/static/js/{InputInstructions.vmQUtJfB.js → InputInstructions.DMffPiri.js} +1 -1
  7. streamlit/static/static/js/{ProgressBar.CrEUq34O.js → ProgressBar.REkskfZ6.js} +1 -1
  8. streamlit/static/static/js/{RenderInPortalIfExists.uSIUxO87.js → RenderInPortalIfExists.CaN0JvX5.js} +1 -1
  9. streamlit/static/static/js/{Toolbar.DDSvrD0E.js → Toolbar.BNy6-0V9.js} +1 -1
  10. streamlit/static/static/js/{base-input.JpWAqJ0N.js → base-input.DDph5ZTh.js} +1 -1
  11. streamlit/static/static/js/{checkbox.CWR-VT1j.js → checkbox.YfIvYeNy.js} +1 -1
  12. streamlit/static/static/js/{createSuper.HcF5WnqF.js → createSuper.AWf9GP6U.js} +1 -1
  13. streamlit/static/static/js/{data-grid-overlay-editor.DminHUYw.js → data-grid-overlay-editor.BLYw7T13.js} +1 -1
  14. streamlit/static/static/js/{downloader._SGckIiV.js → downloader.nl_vIzBu.js} +1 -1
  15. streamlit/static/static/js/{es6.b4hv8be8.js → es6.BK9dY4sJ.js} +2 -2
  16. streamlit/static/static/js/{iframeResizer.contentWindow.BqakL47H.js → iframeResizer.contentWindow.DPzfRlbi.js} +1 -1
  17. streamlit/static/static/js/{index.BWfK_Obw.js → index.-uuuxAE7.js} +1 -1
  18. streamlit/static/static/js/{index.Dev73dEg.js → index.3wDnIhs1.js} +1 -1
  19. streamlit/static/static/js/{index.Dl9vrclR.js → index.6viEYUdA.js} +1 -1
  20. streamlit/static/static/js/{index.Cr9buiVv.js → index.7RV95eQw.js} +1 -1
  21. streamlit/static/static/js/{index.BgLbohq1.js → index.B4JhHRj2.js} +1 -1
  22. streamlit/static/static/js/{index.B4fN2DMS.js → index.BN9xLPzN.js} +1 -1
  23. streamlit/static/static/js/{index.C59Ya3CM.js → index.BXoSWEhJ.js} +1 -1
  24. streamlit/static/static/js/{index.D4vb0WQf.js → index.Bc52-u2S.js} +1 -1
  25. streamlit/static/static/js/{index.BLVbwbeW.js → index.BqqfaHV9.js} +1 -1
  26. streamlit/static/static/js/{index.D6kHe3jN.js → index.BrWH5gNy.js} +1 -1
  27. streamlit/static/static/js/{index.SYnyLAtV.js → index.BuZyz96w.js} +1 -1
  28. streamlit/static/static/js/{index.BkDOb1MH.js → index.Bx0Be8iF.js} +1 -1
  29. streamlit/static/static/js/{index.CpN57BL8.js → index.C2ER1qQG.js} +1 -1
  30. streamlit/static/static/js/{index.C-MV6qmR.js → index.C3J9I4Qy.js} +1 -1
  31. streamlit/static/static/js/{index.C7GAgXnu.js → index.CD9aQBDI.js} +1 -1
  32. streamlit/static/static/js/{index.BXSIv1Yj.js → index.CTymsTTB.js} +1 -1
  33. streamlit/static/static/js/{index.C2ti2ux-.js → index.CV1vqu8X.js} +1 -1
  34. streamlit/static/static/js/{index.BVLYWr2w.js → index.Cf6Pj8Jt.js} +1 -1
  35. streamlit/static/static/js/{index.Cb8hCZyO.js → index.CoX57Z0X.js} +1 -1
  36. streamlit/static/static/js/{index.CpyxO9i-.js → index.D5WhGmsx.js} +1 -1
  37. streamlit/static/static/js/{index.3M6TVRo2.js → index.D6Y5ypee.js} +1 -1
  38. streamlit/static/static/js/{index.CqU47T61.js → index.DFLL-J15.js} +87 -86
  39. streamlit/static/static/js/{index.Dph-QYbt.js → index.DIMh2slz.js} +1 -1
  40. streamlit/static/static/js/{index.D4Nzp4K3.js → index.DMsLuMo4.js} +1 -1
  41. streamlit/static/static/js/{index.CAxOUw_O.js → index.DVJzE2M1.js} +1 -1
  42. streamlit/static/static/js/{index.cVjFgmUG.js → index.DYowKMte.js} +1 -1
  43. streamlit/static/static/js/{index.B5U4WHdm.js → index.D_ANlHT-.js} +1 -1
  44. streamlit/static/static/js/{index.BV5mA8ty.js → index.Du8FKb6_.js} +5 -5
  45. streamlit/static/static/js/{index.E5dz2muJ.js → index.DwT5qUSO.js} +1 -1
  46. streamlit/static/static/js/{index._Q_M1OIX.js → index.HMmByEVP.js} +1 -1
  47. streamlit/static/static/js/{index.Cs86Rh1I.js → index.K_eBGdkn.js} +1 -1
  48. streamlit/static/static/js/{index.D7yQTfz7.js → index.QWADtOoc.js} +1 -1
  49. streamlit/static/static/js/{index.BFysNJg1.js → index.R376rgCp.js} +1 -1
  50. streamlit/static/static/js/{index.CA_X6A4G.js → index.T6yaPTmV.js} +1 -1
  51. streamlit/static/static/js/{index.BL2LjKzZ.js → index._yUNqU9v.js} +1 -1
  52. streamlit/static/static/js/{index.J3DKPewF.js → index.ba5plLt2.js} +1 -1
  53. streamlit/static/static/js/{index.BhVVEe37.js → index.kIzrb8qK.js} +1 -1
  54. streamlit/static/static/js/{input.Dfd0mQ2M.js → input.CS80Xua3.js} +1 -1
  55. streamlit/static/static/js/{memory.DFfwDfdX.js → memory.CQi1cX_3.js} +1 -1
  56. streamlit/static/static/js/{mergeWith.B3E2fSKt.js → mergeWith.DJ7CCTEU.js} +1 -1
  57. streamlit/static/static/js/{number-overlay-editor.DG8NE_c_.js → number-overlay-editor.AKoeruM9.js} +1 -1
  58. streamlit/static/static/js/{possibleConstructorReturn.CJ1f9cWL.js → possibleConstructorReturn.Bwr97hsW.js} +1 -1
  59. streamlit/static/static/js/{sandbox.-T0hcQrx.js → sandbox.e5w1ytIc.js} +1 -1
  60. streamlit/static/static/js/{textarea.CCPaMMRd.js → textarea.CzJ9CBYF.js} +1 -1
  61. streamlit/static/static/js/{timepicker.BrQl1vN-.js → timepicker.BfekZ8nu.js} +1 -1
  62. streamlit/static/static/js/{toConsumableArray.UwlRgC7o.js → toConsumableArray.CcdFZhvv.js} +1 -1
  63. streamlit/static/static/js/{uniqueId.C5B1A1oI.js → uniqueId.Cyxi17MX.js} +1 -1
  64. streamlit/static/static/js/{useBasicWidgetState.Czrslgva.js → useBasicWidgetState.D5X8duhc.js} +1 -1
  65. streamlit/static/static/js/{useOnInputChange.Dw8zLgsb.js → useOnInputChange.yxiBziRU.js} +1 -1
  66. streamlit/static/static/js/{withFullScreenWrapper.t6HIFyK0.js → withFullScreenWrapper.Bq7KZt-c.js} +1 -1
  67. {streamlit_nightly-1.42.3.dev20250301.dist-info → streamlit_nightly-1.42.3.dev20250302.dist-info}/METADATA +1 -1
  68. {streamlit_nightly-1.42.3.dev20250301.dist-info → streamlit_nightly-1.42.3.dev20250302.dist-info}/RECORD +72 -72
  69. {streamlit_nightly-1.42.3.dev20250301.data → streamlit_nightly-1.42.3.dev20250302.data}/scripts/streamlit.cmd +0 -0
  70. {streamlit_nightly-1.42.3.dev20250301.dist-info → streamlit_nightly-1.42.3.dev20250302.dist-info}/WHEEL +0 -0
  71. {streamlit_nightly-1.42.3.dev20250301.dist-info → streamlit_nightly-1.42.3.dev20250302.dist-info}/entry_points.txt +0 -0
  72. {streamlit_nightly-1.42.3.dev20250301.dist-info → streamlit_nightly-1.42.3.dev20250302.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as i,j as c,bs as g,bP as b}from"./index.CqU47T61.js";import{a as m}from"./useBasicWidgetState.Czrslgva.js";import"./FormClearHelper.B_9Ez6vr.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},P=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:r,fragmentId:o}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(P);export{k as default};
1
+ import{r as i,j as c,bs as g,bP as b}from"./index.DFLL-J15.js";import{a as m}from"./useBasicWidgetState.D5X8duhc.js";import"./FormClearHelper.DzssExOY.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},P=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:r,fragmentId:o}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(P);export{k as default};
@@ -1 +1 @@
1
- import{n as V,bi as U,r as i,bj as P,j as l}from"./index.CqU47T61.js";const R=V("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),w=528;function A({element:a,width:f,endpoints:m,elementMgr:c}){const n=i.useRef(null),{type:E,url:p,startTime:o,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=i.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);i.useEffect(()=>{n.current&&(n.current.currentTime=o)},[o]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const s=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",s),()=>{e&&d>0&&e.removeEventListener("timeupdate",s)}},[d,u,o]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{u&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,o]);const g=e=>{const{startTime:t,endTime:s,loop:L,autoplay:b,muted:N}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),s&&!isNaN(s)&&r.searchParams.append("end",s.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return b&&r.searchParams.append("autoplay","1"),N&&r.searchParams.append("mute","1"),r.toString()};return E===P.Type.YOUTUBE_IFRAME?l(R,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?w:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}const $=U(i.memo(A));export{$ as default};
1
+ import{n as V,bi as U,r as i,bj as P,j as l}from"./index.DFLL-J15.js";const R=V("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),w=528;function A({element:a,width:f,endpoints:m,elementMgr:c}){const n=i.useRef(null),{type:E,url:p,startTime:o,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=i.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);i.useEffect(()=>{n.current&&(n.current.currentTime=o)},[o]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const s=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",s),()=>{e&&d>0&&e.removeEventListener("timeupdate",s)}},[d,u,o]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{u&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,o]);const g=e=>{const{startTime:t,endTime:s,loop:L,autoplay:b,muted:N}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),s&&!isNaN(s)&&r.searchParams.append("end",s.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return b&&r.searchParams.append("autoplay","1"),N&&r.searchParams.append("mute","1"),r.toString()};return E===P.Type.YOUTUBE_IFRAME?l(R,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?w:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}const $=U(i.memo(A));export{$ as default};
@@ -1 +1 @@
1
- import{r as l,E as $,_ as N,n as u,A as mt,y as A,j as n,ba as Q,bv as vt,B as z,bq as Z,b5 as tt,bp as H,a$ as yt,bG as wt,bk as Ct,bH as I,bt as It,F as et,bh as xt,bI as bt,L as R,bm as St,bl as zt}from"./index.CqU47T61.js";import{g as Ft,F as V,C as Et,I as Ut,E as Ht,a as Tt,s as Bt,u as Dt,b as Rt}from"./FileHelper.B6bBsK7b.js";import{I as Lt}from"./InputInstructions.vmQUtJfB.js";import{i as Mt}from"./inputUtils.CQWz5UKz.js";import{a as J}from"./index.C88pvD_q.js";import{U as ot}from"./UploadFileInfo.C-jY39rj.js";import{T as kt}from"./textarea.CCPaMMRd.js";import"./base-input.JpWAqJ0N.js";var nt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});nt.displayName="AttachFile";var at=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});at.displayName="ErrorOutline";var rt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.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"}))});rt.displayName="Send";const Vt=u("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),$t=u("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Nt=u("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:r})=>{const d=mt(t),[f,c]=d?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:r?"0":t.radii.chatInput,borderTopLeftRadius:r?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:e?f:c,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:d?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,cursor:"not-allowed"}}}),At=u("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Wt=u("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),qt=u("div",{target:"ewqvugz0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),Pt=u("div",{target:"ewqvugz1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Ot=u("div",{target:"ewqvugz2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Kt=u("div",{target:"ewqvugz3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),_t=u("div",{target:"ewqvugz4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Xt=u("div",{target:"ewqvugz5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Gt=u("div",{target:"ewqvugz6"})(({})=>({display:"flex"})),jt=u("div",{target:"ewqvugz7"})(({})=>({flex:"0 0 auto"})),Yt=u("div",{target:"ewqvugz8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Jt=u("div",{target:"ewqvugz9"})(({theme:t})=>({color:t.colors.fadedText60})),Qt=u("div",{target:"ewqvugz10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Zt=u("div",{target:"ewqvugz11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),te=u("small",{target:"ewqvugz12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function ee({children:t,content:e}){const r=A();return n(vt,{content:e,placement:Q.TOP,overrides:{Body:{style:{top:`-${r.sizes.minElementHeight}`}}},children:t})}const oe=({fileInfo:t})=>{const e=A(),{type:r}=t.status;switch(r){case"uploading":return n(wt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(ee,{content:t.status.errorMessage,children:n(H,{color:e.colors.red,content:at,size:"lg"})});case"uploaded":return n(H,{content:Ut,size:"lg"});default:return yt(r),null}},ne=({fileInfo:t,onDelete:e})=>z(Yt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(Jt,{children:n(oe,{fileInfo:t})}),n(Qt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Zt,{children:Ft(t.size,V.Byte)}),n(te,{"data-testid":"stChatInputDeleteBtn",children:n(Z,{onClick:()=>e(t.id),kind:tt.MINIMAL,children:n(H,{content:Et,size:"lg"})})})]}),ae=({items:t,onDelete:e})=>n(Xt,{"data-testid":"stChatUploadedFiles",children:n(Gt,{children:t.map(r=>n(jt,{children:n(ne,{fileInfo:r,onDelete:e})},r.id))})}),re=({getNextLocalFileId:t,addFiles:e,updateFile:r,uploadClient:d,element:f,onUploadProgress:c,onUploadComplete:m})=>(x,h)=>{const v=J.CancelToken.source(),g=new ot(h.name,h.size,t(),{type:"uploading",cancelToken:v,progress:1});e([g]),d.uploadFile({formId:"",...f},x.uploadUrl,h,p=>c(p,g.id),v.token).then(()=>m(g.id,x)).catch(p=>{J.isCancel(p)||r(g.id,g.setStatus({type:"error",errorMessage:p?p.toString():"Unknown error"}))})},ie=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:r,uploadFile:d,addFiles:f,getNextLocalFileId:c,deleteExistingFiles:m,onUploadComplete:x})=>(h,v)=>{if(!t&&h.length===0&&v.length>1){const g=v.findIndex(p=>{var y;return((y=p.errors)==null?void 0:y[0].code)===Ht.TooManyFiles});g>=0&&(h.push(v[g].file),v.splice(g,1))}if(!t&&h.length>0&&m(),r.fetchFileURLs(h).then(g=>{Ct(g,h).forEach(([p,y])=>{d(p,y)})}).catch(g=>{f(h.map(p=>new ot(p.name,p.size,c(),{type:"error",errorMessage:g})))}),v.length>0){const g=v.map(p=>Tt(p,c(),e));f(g)}x()},se=({getRootProps:t,getInputProps:e,acceptFile:r,disabled:d,theme:f})=>z(Ot,{disabled:d,children:[z(Kt,{"data-testid":"stChatInputFileUploadButton",disabled:d,...t(),children:[n("input",{...e()}),n(It,{content:`Upload or drag and drop ${r===I.Multiple?"files":"a file"}`,placement:Q.TOP,onMouseEnterDelay:500,children:n(Z,{kind:tt.MINIMAL,disabled:d,children:n(H,{content:nt,size:"lg",color:d?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(_t,{})]}),le=({getRootProps:t,getInputProps:e,acceptFile:r,inputHeight:d})=>z(et,{children:[n(qt,{height:d,...t(),children:n("input",{...e()})}),n(Pt,{height:d,children:`Drag and drop ${r===I.Multiple?"files":"a file"} here`})]}),de=6.5,L=1,M=(t,e,r)=>r.map(d=>d.id===t?e:d),k=(t,e)=>e.find(r=>r.id===t);function ce({disabled:t,element:e,widgetMgr:r,fragmentId:d,uploadClient:f}){const c=A(),m=l.useRef(null),x=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),{values:[v],elementRef:g}=xt(l.useMemo(()=>["width"],[])),[p,y]=l.useState(!1),[F,B]=l.useState(e.default),[E,W]=l.useState(0),[T,it]=l.useState(!1),[b,S]=l.useState([]),[U,D]=l.useState(!1),C=bt(e.acceptFile),q=Bt(e.maxUploadSizeMb,V.Megabyte,V.Byte),P=l.useCallback(o=>S(a=>[...a,...o]),[]),O=l.useCallback(o=>{S(a=>{const s=k(o,a);return R(s)?a:(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&f.deleteFile(s.status.fileUrls.deleteUrl),a.filter(i=>i.id!==o))})},[f]),st=()=>{const o=b.filter(a=>a.status.type==="uploaded").map(a=>{const{name:s,size:i,status:w}=a,{fileId:ht,fileUrls:ft}=w;return new St({fileId:ht,fileUrls:ft,name:s,size:i})});return new zt({uploadedFileInfo:o})},K=()=>x.current++,lt=ie({acceptMultipleFiles:C===I.Multiple,maxFileSize:q,uploadClient:f,uploadFile:re({getNextLocalFileId:K,addFiles:P,updateFile:(o,a)=>{S(s=>M(o,a,s))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(s=>{const i=k(a,s);if(R(i)||i.status.type!=="uploading")return s;const w=Math.round(o.loaded*100/o.total);return i.status.progress===w?s:M(a,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:w}),s)})},onUploadComplete:(o,a)=>{S(s=>{const i=k(o,s);return R(i)||i.status.type!=="uploading"?s:M(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),s)})}}),addFiles:P,getNextLocalFileId:K,deleteExistingFiles:()=>b.forEach(o=>O(o.id)),onUploadComplete:()=>{m.current&&m.current.focus()}}),{getRootProps:_,getInputProps:X}=Dt({onDrop:lt,multiple:C===I.Multiple,accept:Rt(e.fileType),maxSize:q}),dt=()=>{let o=0;const{current:a}=m;if(a){const s=a.placeholder;a.placeholder="",a.style.height="auto",o=a.scrollHeight,a.placeholder=s,a.style.height=""}return o},G=()=>{if(m.current&&m.current.focus(),!p||t)return;const o={data:F,fileUploaderState:st()};r.setChatInputValue(e,o,{fromUi:!0},d),y(!1),S([]),B(""),W(0)},ct=o=>{const{metaKey:a,ctrlKey:s,shiftKey:i}=o;Mt(o)&&!i&&!s&&!a&&(o.preventDefault(),G())},pt=o=>{const{value:a}=o.target,{maxChars:s}=e;s!==0&&a.length>s||(B(a),W(dt()))};l.useEffect(()=>b.some(o=>o.status.type==="uploading")?y(!1):y(F!==""||b.length>0),[b,F]),l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";B(o)}},[e]),l.useEffect(()=>{if(m.current){const{offsetHeight:o}=m.current;h.current.minHeight=o,h.current.maxHeight=o*de}},[m]),l.useEffect(()=>{const o=i=>{var w;i.preventDefault(),i.stopPropagation(),!U&&((w=i.dataTransfer)!=null&&w.types.includes("Files"))&&D(!0)},a=i=>{i.preventDefault(),i.stopPropagation(),U&&(i.clientX<=0&&i.clientY<=0||i.clientX>=window.innerWidth&&i.clientY>=window.innerHeight)&&D(!1)},s=i=>{i.preventDefault(),i.stopPropagation(),U&&D(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",s),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",s),window.removeEventListener("dragleave",a)}},[U]),l.useEffect(()=>{const{minHeight:o}=h.current;it(E>0&&m.current?Math.abs(E-o)>L:!1)},[E]);const{placeholder:j,maxChars:ut}=e,{maxHeight:Y}=h.current,gt=C!==I.None&&U;return z(et,{children:[C===I.None?null:n(ae,{items:[...b],onDelete:O}),n(Vt,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:gt?n(le,{getRootProps:_,getInputProps:X,acceptFile:C,inputHeight:T?`${E+L}px`:c.sizes.minElementHeight}):z($t,{extended:T,children:[C===I.None?null:n(se,{getRootProps:_,getInputProps:X,acceptFile:C,disabled:t,theme:c}),n(kt,{inputRef:m,value:F,placeholder:j,onChange:pt,onKeyDown:ct,"aria-label":j,disabled:t,rows:1,overrides:{Root:{style:{minHeight:c.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:c.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:T?`${E+L}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:c.spacing.none,paddingBottom:c.spacing.sm,paddingTop:c.spacing.sm,paddingRight:`calc(${c.iconSizes.xl} + 2 * ${c.spacing.sm} + ${c.spacing.sm})`}}}}),v>c.breakpoints.hideWidgetDetails&&n(Wt,{children:n(Lt,{dirty:p,value:F,maxLength:ut,type:"chat",inForm:!1})}),n(At,{children:n(Nt,{onClick:G,disabled:!p||t,extended:T,"data-testid":"stChatInputSubmitButton",children:n(H,{content:rt,size:"xl",color:"inherit"})})})]})})]})}const we=l.memo(ce);export{we as default};
1
+ import{r as l,E as $,_ as N,n as u,A as mt,y as A,j as n,ba as Q,bv as vt,B as z,bq as Z,b5 as tt,bp as H,a$ as yt,bG as wt,bk as Ct,bH as I,bt as It,F as et,bh as xt,bI as bt,L as R,bm as St,bl as zt}from"./index.DFLL-J15.js";import{g as Ft,F as V,C as Et,I as Ut,E as Ht,a as Tt,s as Bt,u as Dt,b as Rt}from"./FileHelper.D-6vwsT7.js";import{I as Lt}from"./InputInstructions.DMffPiri.js";import{i as Mt}from"./inputUtils.CQWz5UKz.js";import{a as J}from"./index.C88pvD_q.js";import{U as ot}from"./UploadFileInfo.C-jY39rj.js";import{T as kt}from"./textarea.CzJ9CBYF.js";import"./base-input.DDph5ZTh.js";var nt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});nt.displayName="AttachFile";var at=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});at.displayName="ErrorOutline";var rt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement($,N({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.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"}))});rt.displayName="Send";const Vt=u("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),$t=u("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Nt=u("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:r})=>{const d=mt(t),[f,c]=d?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:r?"0":t.radii.chatInput,borderTopLeftRadius:r?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:e?f:c,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:d?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,cursor:"not-allowed"}}}),At=u("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Wt=u("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),qt=u("div",{target:"ewqvugz0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),Pt=u("div",{target:"ewqvugz1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Ot=u("div",{target:"ewqvugz2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Kt=u("div",{target:"ewqvugz3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),_t=u("div",{target:"ewqvugz4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Xt=u("div",{target:"ewqvugz5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Gt=u("div",{target:"ewqvugz6"})(({})=>({display:"flex"})),jt=u("div",{target:"ewqvugz7"})(({})=>({flex:"0 0 auto"})),Yt=u("div",{target:"ewqvugz8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Jt=u("div",{target:"ewqvugz9"})(({theme:t})=>({color:t.colors.fadedText60})),Qt=u("div",{target:"ewqvugz10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Zt=u("div",{target:"ewqvugz11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),te=u("small",{target:"ewqvugz12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function ee({children:t,content:e}){const r=A();return n(vt,{content:e,placement:Q.TOP,overrides:{Body:{style:{top:`-${r.sizes.minElementHeight}`}}},children:t})}const oe=({fileInfo:t})=>{const e=A(),{type:r}=t.status;switch(r){case"uploading":return n(wt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(ee,{content:t.status.errorMessage,children:n(H,{color:e.colors.red,content:at,size:"lg"})});case"uploaded":return n(H,{content:Ut,size:"lg"});default:return yt(r),null}},ne=({fileInfo:t,onDelete:e})=>z(Yt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(Jt,{children:n(oe,{fileInfo:t})}),n(Qt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Zt,{children:Ft(t.size,V.Byte)}),n(te,{"data-testid":"stChatInputDeleteBtn",children:n(Z,{onClick:()=>e(t.id),kind:tt.MINIMAL,children:n(H,{content:Et,size:"lg"})})})]}),ae=({items:t,onDelete:e})=>n(Xt,{"data-testid":"stChatUploadedFiles",children:n(Gt,{children:t.map(r=>n(jt,{children:n(ne,{fileInfo:r,onDelete:e})},r.id))})}),re=({getNextLocalFileId:t,addFiles:e,updateFile:r,uploadClient:d,element:f,onUploadProgress:c,onUploadComplete:m})=>(x,h)=>{const v=J.CancelToken.source(),g=new ot(h.name,h.size,t(),{type:"uploading",cancelToken:v,progress:1});e([g]),d.uploadFile({formId:"",...f},x.uploadUrl,h,p=>c(p,g.id),v.token).then(()=>m(g.id,x)).catch(p=>{J.isCancel(p)||r(g.id,g.setStatus({type:"error",errorMessage:p?p.toString():"Unknown error"}))})},ie=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:r,uploadFile:d,addFiles:f,getNextLocalFileId:c,deleteExistingFiles:m,onUploadComplete:x})=>(h,v)=>{if(!t&&h.length===0&&v.length>1){const g=v.findIndex(p=>{var y;return((y=p.errors)==null?void 0:y[0].code)===Ht.TooManyFiles});g>=0&&(h.push(v[g].file),v.splice(g,1))}if(!t&&h.length>0&&m(),r.fetchFileURLs(h).then(g=>{Ct(g,h).forEach(([p,y])=>{d(p,y)})}).catch(g=>{f(h.map(p=>new ot(p.name,p.size,c(),{type:"error",errorMessage:g})))}),v.length>0){const g=v.map(p=>Tt(p,c(),e));f(g)}x()},se=({getRootProps:t,getInputProps:e,acceptFile:r,disabled:d,theme:f})=>z(Ot,{disabled:d,children:[z(Kt,{"data-testid":"stChatInputFileUploadButton",disabled:d,...t(),children:[n("input",{...e()}),n(It,{content:`Upload or drag and drop ${r===I.Multiple?"files":"a file"}`,placement:Q.TOP,onMouseEnterDelay:500,children:n(Z,{kind:tt.MINIMAL,disabled:d,children:n(H,{content:nt,size:"lg",color:d?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(_t,{})]}),le=({getRootProps:t,getInputProps:e,acceptFile:r,inputHeight:d})=>z(et,{children:[n(qt,{height:d,...t(),children:n("input",{...e()})}),n(Pt,{height:d,children:`Drag and drop ${r===I.Multiple?"files":"a file"} here`})]}),de=6.5,L=1,M=(t,e,r)=>r.map(d=>d.id===t?e:d),k=(t,e)=>e.find(r=>r.id===t);function ce({disabled:t,element:e,widgetMgr:r,fragmentId:d,uploadClient:f}){const c=A(),m=l.useRef(null),x=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),{values:[v],elementRef:g}=xt(l.useMemo(()=>["width"],[])),[p,y]=l.useState(!1),[F,B]=l.useState(e.default),[E,W]=l.useState(0),[T,it]=l.useState(!1),[b,S]=l.useState([]),[U,D]=l.useState(!1),C=bt(e.acceptFile),q=Bt(e.maxUploadSizeMb,V.Megabyte,V.Byte),P=l.useCallback(o=>S(a=>[...a,...o]),[]),O=l.useCallback(o=>{S(a=>{const s=k(o,a);return R(s)?a:(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&f.deleteFile(s.status.fileUrls.deleteUrl),a.filter(i=>i.id!==o))})},[f]),st=()=>{const o=b.filter(a=>a.status.type==="uploaded").map(a=>{const{name:s,size:i,status:w}=a,{fileId:ht,fileUrls:ft}=w;return new St({fileId:ht,fileUrls:ft,name:s,size:i})});return new zt({uploadedFileInfo:o})},K=()=>x.current++,lt=ie({acceptMultipleFiles:C===I.Multiple,maxFileSize:q,uploadClient:f,uploadFile:re({getNextLocalFileId:K,addFiles:P,updateFile:(o,a)=>{S(s=>M(o,a,s))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(s=>{const i=k(a,s);if(R(i)||i.status.type!=="uploading")return s;const w=Math.round(o.loaded*100/o.total);return i.status.progress===w?s:M(a,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:w}),s)})},onUploadComplete:(o,a)=>{S(s=>{const i=k(o,s);return R(i)||i.status.type!=="uploading"?s:M(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),s)})}}),addFiles:P,getNextLocalFileId:K,deleteExistingFiles:()=>b.forEach(o=>O(o.id)),onUploadComplete:()=>{m.current&&m.current.focus()}}),{getRootProps:_,getInputProps:X}=Dt({onDrop:lt,multiple:C===I.Multiple,accept:Rt(e.fileType),maxSize:q}),dt=()=>{let o=0;const{current:a}=m;if(a){const s=a.placeholder;a.placeholder="",a.style.height="auto",o=a.scrollHeight,a.placeholder=s,a.style.height=""}return o},G=()=>{if(m.current&&m.current.focus(),!p||t)return;const o={data:F,fileUploaderState:st()};r.setChatInputValue(e,o,{fromUi:!0},d),y(!1),S([]),B(""),W(0)},ct=o=>{const{metaKey:a,ctrlKey:s,shiftKey:i}=o;Mt(o)&&!i&&!s&&!a&&(o.preventDefault(),G())},pt=o=>{const{value:a}=o.target,{maxChars:s}=e;s!==0&&a.length>s||(B(a),W(dt()))};l.useEffect(()=>b.some(o=>o.status.type==="uploading")?y(!1):y(F!==""||b.length>0),[b,F]),l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";B(o)}},[e]),l.useEffect(()=>{if(m.current){const{offsetHeight:o}=m.current;h.current.minHeight=o,h.current.maxHeight=o*de}},[m]),l.useEffect(()=>{const o=i=>{var w;i.preventDefault(),i.stopPropagation(),!U&&((w=i.dataTransfer)!=null&&w.types.includes("Files"))&&D(!0)},a=i=>{i.preventDefault(),i.stopPropagation(),U&&(i.clientX<=0&&i.clientY<=0||i.clientX>=window.innerWidth&&i.clientY>=window.innerHeight)&&D(!1)},s=i=>{i.preventDefault(),i.stopPropagation(),U&&D(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",s),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",s),window.removeEventListener("dragleave",a)}},[U]),l.useEffect(()=>{const{minHeight:o}=h.current;it(E>0&&m.current?Math.abs(E-o)>L:!1)},[E]);const{placeholder:j,maxChars:ut}=e,{maxHeight:Y}=h.current,gt=C!==I.None&&U;return z(et,{children:[C===I.None?null:n(ae,{items:[...b],onDelete:O}),n(Vt,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:gt?n(le,{getRootProps:_,getInputProps:X,acceptFile:C,inputHeight:T?`${E+L}px`:c.sizes.minElementHeight}):z($t,{extended:T,children:[C===I.None?null:n(se,{getRootProps:_,getInputProps:X,acceptFile:C,disabled:t,theme:c}),n(kt,{inputRef:m,value:F,placeholder:j,onChange:pt,onKeyDown:ct,"aria-label":j,disabled:t,rows:1,overrides:{Root:{style:{minHeight:c.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:c.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:T?`${E+L}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:c.spacing.none,paddingBottom:c.spacing.sm,paddingTop:c.spacing.sm,paddingRight:`calc(${c.iconSizes.xl} + 2 * ${c.spacing.sm} + ${c.spacing.sm})`}}}}),v>c.breakpoints.hideWidgetDetails&&n(Wt,{children:n(Lt,{dirty:p,value:F,maxLength:ut,type:"chat",inForm:!1})}),n(At,{children:n(Nt,{onClick:G,disabled:!p||t,extended:T,"data-testid":"stChatInputSubmitButton",children:n(H,{content:rt,size:"xl",color:"inherit"})})})]})})]})}const we=l.memo(ce);export{we as default};
@@ -1 +1 @@
1
- import{r as l,b5 as i,j as e,b6 as u,bq as d,b4 as B,b7 as c,b8 as b}from"./index.CqU47T61.js";function m(n){const{disabled:s,element:t,widgetMgr:o,fragmentId:r}=n;let a=i.SECONDARY;return t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY),e(b,{className:"stButton","data-testid":"stButton",children:e(u,{help:t.help,children:e(d,{kind:a,size:B.SMALL,disabled:s,fluidWidth:t.useContainerWidth||!!t.help,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(c,{icon:t.icon,label:t.label})})})})}const f=l.memo(m);export{f as default};
1
+ import{r as l,b5 as i,j as e,b6 as u,bq as d,b4 as B,b7 as c,b8 as b}from"./index.DFLL-J15.js";function m(n){const{disabled:s,element:t,widgetMgr:o,fragmentId:r}=n;let a=i.SECONDARY;return t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY),e(b,{className:"stButton","data-testid":"stButton",children:e(u,{help:t.help,children:e(d,{kind:a,size:B.SMALL,disabled:s,fluidWidth:t.useContainerWidth||!!t.help,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(c,{icon:t.icon,label:t.label})})})})}const f=l.memo(m);export{f as default};
@@ -1,2 +1,2 @@
1
- import{r as J,j as ct,F as Vt}from"./index.CqU47T61.js";/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:At,setPrototypeOf:ft,isFrozen:$t,getPrototypeOf:qt,getOwnPropertyDescriptor:Kt}=Object;let{freeze:S,seal:y,create:ht}=Object,{apply:xe,construct:Pe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});xe||(xe=function(n,l,r){return n.apply(l,r)});Pe||(Pe=function(n,l){return new n(...l)});const le=R(Array.prototype.forEach),Zt=R(Array.prototype.lastIndexOf),ut=R(Array.prototype.pop),V=R(Array.prototype.push),Jt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),mt=R(String.prototype.match),$=R(String.prototype.replace),Qt=R(String.prototype.indexOf),en=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),q=tn(TypeError);function R(a){return function(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),f=1;f<l;f++)r[f-1]=arguments[f];return xe(a,n,r)}}function tn(a){return function(){for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return Pe(a,l)}}function s(a,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ft&&ft(a,null);let r=n.length;for(;r--;){let f=n[r];if(typeof f=="string"){const L=l(f);L!==f&&($t(n)||(n[r]=L),f=L)}a[f]=!0}return a}function nn(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[l,r]of At(a))b(a,l)&&(Array.isArray(r)?n[l]=nn(r):r&&typeof r=="object"&&r.constructor===Object?n[l]=x(r):n[l]=r);return n}function K(a,n){for(;a!==null;){const r=Kt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=qt(a)}function l(){return null}return l}const pt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),De=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),on=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),an=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=S(["#text"]),Tt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rn=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),sn=y(/<%[\w\W]*|[\w\W]*%>/gm),ln=y(/\$\{[\w\W]*/gm),cn=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),fn=y(/^aria-[\-\w]+$/),St=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),un=y(/^(?:\w+script|data):/i),mn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rt=y(/^html$/i),pn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,ARIA_ATTR:fn,ATTR_WHITESPACE:mn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:Rt,ERB_EXPR:sn,IS_ALLOWED_URI:St,IS_SCRIPT_OR_DATA:un,MUSTACHE_EXPR:rn,TMPLIT_EXPR:ln});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},Tn=function(n,l){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";l&&l.hasAttribute(f)&&(r=l.getAttribute(f));const L="dompurify"+(r?"#"+r:"");try{return n.createPolicy(L,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+L+" could not be created."),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const n=i=>Ot(i);if(n.version="3.2.4",n.removed=[],!a||!a.document||a.document.nodeType!==Z.document||!a.Element)return n.isSupported=!1,n;let{document:l}=a;const r=l,f=r.currentScript,{DocumentFragment:L,HTMLTemplateElement:I,Node:ue,Element:Ue,NodeFilter:z,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:bt,trustedTypes:Q}=a,G=Ue.prototype,Nt=K(G,"cloneNode"),Dt=K(G,"remove"),It=K(G,"nextSibling"),Mt=K(G,"childNodes"),ee=K(G,"parentNode");if(typeof I=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let _,W="";const{implementation:me,createNodeIterator:Ct,createDocumentFragment:wt,getElementsByTagName:xt}=l,{importNode:Pt}=r;let g=gt();n.isSupported=typeof At=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:kt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:Fe,CUSTOM_ELEMENT:Ft}=_t;let{IS_ALLOWED_URI:He}=_t,m=null;const ze=s({},[...pt,...De,...Ie,...Me,...dt]);let d=null;const Ge=s({},[...Tt,...Ce,...Et,...ce]);let u=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Ee=null,We=!0,_e=!0,Be=!1,Ye=!0,P=!1,ge=!0,w=!1,Ae=!1,he=!1,k=!1,te=!1,ne=!1,Xe=!0,je=!1;const Ht="user-content-";let Se=!0,Y=!1,v={},U=null;const Ve=s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const qe=s({},["audio","video","img","source","image","track"]);let Re=null;const Ke=s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let F=M,Oe=!1,Le=null;const zt=s({},[oe,ie,M],Ne);let ae=s({},["mi","mo","mn","ms","mtext"]),re=s({},["annotation-xml"]);const Gt=s({},["title","style","font","a","script"]);let X=null;const Wt=["application/xhtml+xml","text/html"],Bt="text/html";let p=null,H=null;const Yt=l.createElement("form"),Ze=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),X=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Bt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?Ne:fe,m=b(e,"ALLOWED_TAGS")?s({},e.ALLOWED_TAGS,p):ze,d=b(e,"ALLOWED_ATTR")?s({},e.ALLOWED_ATTR,p):Ge,Le=b(e,"ALLOWED_NAMESPACES")?s({},e.ALLOWED_NAMESPACES,Ne):zt,Re=b(e,"ADD_URI_SAFE_ATTR")?s(x(Ke),e.ADD_URI_SAFE_ATTR,p):Ke,$e=b(e,"ADD_DATA_URI_TAGS")?s(x(qe),e.ADD_DATA_URI_TAGS,p):qe,U=b(e,"FORBID_CONTENTS")?s({},e.FORBID_CONTENTS,p):Ve,B=b(e,"FORBID_TAGS")?s({},e.FORBID_TAGS,p):{},Ee=b(e,"FORBID_ATTR")?s({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,We=e.ALLOW_ARIA_ATTR!==!1,_e=e.ALLOW_DATA_ATTR!==!1,Be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,ge=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,Xe=e.SANITIZE_DOM!==!1,je=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,He=e.ALLOWED_URI_REGEXP||St,F=e.NAMESPACE||M,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,re=e.HTML_INTEGRATION_POINTS||re,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(_e=!1),te&&(k=!0),v&&(m=s({},dt),d=[],v.html===!0&&(s(m,pt),s(d,Tt)),v.svg===!0&&(s(m,De),s(d,Ce),s(d,ce)),v.svgFilters===!0&&(s(m,Ie),s(d,Ce),s(d,ce)),v.mathMl===!0&&(s(m,Me),s(d,Et),s(d,ce))),e.ADD_TAGS&&(m===ze&&(m=x(m)),s(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===Ge&&(d=x(d)),s(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&s(Re,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===Ve&&(U=x(U)),s(U,e.FORBID_CONTENTS,p)),Se&&(m["#text"]=!0),w&&s(m,["html","head","body"]),m.table&&(s(m,["tbody"]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,W=_.createHTML("")}else _===void 0&&(_=Tn(Q,f)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Je=s({},[...De,...Ie,...on]),Qe=s({},[...Me,...an]),Xt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Le[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===M?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||ae[c]):!!Je[o]:e.namespaceURI===oe?t.namespaceURI===M?o==="math":t.namespaceURI===ie?o==="math"&&re[c]:!!Qe[o]:e.namespaceURI===M?t.namespaceURI===ie&&!re[c]||t.namespaceURI===oe&&!ae[c]?!1:!Qe[o]&&(Gt[o]||!Je[o]):!!(X==="application/xhtml+xml"&&Le[e.namespaceURI]):!1},N=function(e){V(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},se=function(e,t){try{V(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{V(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||te)try{N(t)}catch{}else try{t.setAttribute(e,"")}catch{}},et=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}X==="application/xhtml+xml"&&F===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===M)try{t=new bt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Oe?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(l.createTextNode(o),E.childNodes[0]||null),F===M?xt.call(t,w?"html":"body")[0]:w?t.documentElement:E},tt=function(e){return Ct.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},be=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof ue=="function"&&e instanceof ue};function C(i,e,t){le(i,o=>{o.call(n,e,t,H)})}const ot=function(e){let t=null;if(C(g.beforeSanitizeElements,e,null),be(e))return N(e),!0;const o=p(e.nodeName);if(C(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ge&&e.nodeType===Z.comment&&h(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&at(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!U[o]){const c=ee(e)||e.parentNode,E=Mt(e)||e.childNodes;if(E&&c){const T=E.length;for(let O=T-1;O>=0;--O){const D=Nt(E[O],!0);D.__removalCount=(e.__removalCount||0)+1,c.insertBefore(D,It(e))}}}return N(e),!0}return e instanceof Ue&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,le([pe,de,Te],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),C(g.afterSanitizeElements,e,null),!1)},it=function(e,t,o){if(Xe&&(t==="id"||t==="name")&&(o in l||o in Yt))return!1;if(!(_e&&!Ee[t]&&h(kt,t))){if(!(We&&h(vt,t))){if(!d[t]||Ee[t]){if(!(at(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(He,$(o,Fe,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Qt(o,"data:")===0&&$e[e])){if(!(Be&&!h(Ut,$(o,Fe,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ft)},rt=function(e){C(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||be(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:O,value:D}=E,j=p(T);let A=T==="value"?D:en(D);if(o.attrName=j,o.attrValue=A,o.keepAttr=!0,o.forceKeepAttr=void 0,C(g.uponSanitizeAttribute,e,o),A=o.attrValue,je&&(j==="id"||j==="name")&&(se(T,e),A=Ht+A),ge&&h(/((--!?|])>)|<\/(style|title)/i,A)){se(T,e);continue}if(o.forceKeepAttr||(se(T,e),!o.keepAttr))continue;if(!Ye&&h(/\/>/i,A)){se(T,e);continue}P&&le([pe,de,Te],lt=>{A=$(A,lt," ")});const st=p(e.nodeName);if(it(st,j,A)){if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(st,j)){case"TrustedHTML":{A=_.createHTML(A);break}case"TrustedScriptURL":{A=_.createScriptURL(A);break}}try{O?e.setAttributeNS(O,T,A):e.setAttribute(T,A),be(e)?N(e):ut(n.removed)}catch{}}}C(g.afterSanitizeAttributes,e,null)},jt=function i(e){let t=null;const o=tt(e);for(C(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)C(g.uponSanitizeShadowNode,t,null),ot(t),rt(t),t.content instanceof L&&i(t.content);C(g.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Oe=!i,Oe&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!n.isSupported)return i;if(Ae||ye(e),n.removed=[],typeof i=="string"&&(Y=!1),Y){if(i.nodeName){const D=p(i.nodeName);if(!m[D]||B[D])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=et("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Z.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=et(i),!t)return k?null:ne?W:""}t&&he&&N(t.firstChild);const T=tt(Y?i:t);for(;c=T.nextNode();)ot(c),rt(c),c.content instanceof L&&jt(c.content);if(Y)return i;if(k){if(te)for(E=wt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(d.shadowroot||d.shadowrootmode)&&(E=Pt.call(r,E,!0)),E}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(Rt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{r as J,j as ct,F as Vt}from"./index.DFLL-J15.js";/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:At,setPrototypeOf:ft,isFrozen:$t,getPrototypeOf:qt,getOwnPropertyDescriptor:Kt}=Object;let{freeze:S,seal:y,create:ht}=Object,{apply:xe,construct:Pe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});xe||(xe=function(n,l,r){return n.apply(l,r)});Pe||(Pe=function(n,l){return new n(...l)});const le=R(Array.prototype.forEach),Zt=R(Array.prototype.lastIndexOf),ut=R(Array.prototype.pop),V=R(Array.prototype.push),Jt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),mt=R(String.prototype.match),$=R(String.prototype.replace),Qt=R(String.prototype.indexOf),en=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),q=tn(TypeError);function R(a){return function(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),f=1;f<l;f++)r[f-1]=arguments[f];return xe(a,n,r)}}function tn(a){return function(){for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return Pe(a,l)}}function s(a,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ft&&ft(a,null);let r=n.length;for(;r--;){let f=n[r];if(typeof f=="string"){const L=l(f);L!==f&&($t(n)||(n[r]=L),f=L)}a[f]=!0}return a}function nn(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[l,r]of At(a))b(a,l)&&(Array.isArray(r)?n[l]=nn(r):r&&typeof r=="object"&&r.constructor===Object?n[l]=x(r):n[l]=r);return n}function K(a,n){for(;a!==null;){const r=Kt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=qt(a)}function l(){return null}return l}const pt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),De=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),on=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),an=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=S(["#text"]),Tt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rn=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),sn=y(/<%[\w\W]*|[\w\W]*%>/gm),ln=y(/\$\{[\w\W]*/gm),cn=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),fn=y(/^aria-[\-\w]+$/),St=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),un=y(/^(?:\w+script|data):/i),mn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rt=y(/^html$/i),pn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,ARIA_ATTR:fn,ATTR_WHITESPACE:mn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:Rt,ERB_EXPR:sn,IS_ALLOWED_URI:St,IS_SCRIPT_OR_DATA:un,MUSTACHE_EXPR:rn,TMPLIT_EXPR:ln});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},Tn=function(n,l){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";l&&l.hasAttribute(f)&&(r=l.getAttribute(f));const L="dompurify"+(r?"#"+r:"");try{return n.createPolicy(L,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+L+" could not be created."),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const n=i=>Ot(i);if(n.version="3.2.4",n.removed=[],!a||!a.document||a.document.nodeType!==Z.document||!a.Element)return n.isSupported=!1,n;let{document:l}=a;const r=l,f=r.currentScript,{DocumentFragment:L,HTMLTemplateElement:I,Node:ue,Element:Ue,NodeFilter:z,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:bt,trustedTypes:Q}=a,G=Ue.prototype,Nt=K(G,"cloneNode"),Dt=K(G,"remove"),It=K(G,"nextSibling"),Mt=K(G,"childNodes"),ee=K(G,"parentNode");if(typeof I=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let _,W="";const{implementation:me,createNodeIterator:Ct,createDocumentFragment:wt,getElementsByTagName:xt}=l,{importNode:Pt}=r;let g=gt();n.isSupported=typeof At=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:kt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:Fe,CUSTOM_ELEMENT:Ft}=_t;let{IS_ALLOWED_URI:He}=_t,m=null;const ze=s({},[...pt,...De,...Ie,...Me,...dt]);let d=null;const Ge=s({},[...Tt,...Ce,...Et,...ce]);let u=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Ee=null,We=!0,_e=!0,Be=!1,Ye=!0,P=!1,ge=!0,w=!1,Ae=!1,he=!1,k=!1,te=!1,ne=!1,Xe=!0,je=!1;const Ht="user-content-";let Se=!0,Y=!1,v={},U=null;const Ve=s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const qe=s({},["audio","video","img","source","image","track"]);let Re=null;const Ke=s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let F=M,Oe=!1,Le=null;const zt=s({},[oe,ie,M],Ne);let ae=s({},["mi","mo","mn","ms","mtext"]),re=s({},["annotation-xml"]);const Gt=s({},["title","style","font","a","script"]);let X=null;const Wt=["application/xhtml+xml","text/html"],Bt="text/html";let p=null,H=null;const Yt=l.createElement("form"),Ze=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),X=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Bt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?Ne:fe,m=b(e,"ALLOWED_TAGS")?s({},e.ALLOWED_TAGS,p):ze,d=b(e,"ALLOWED_ATTR")?s({},e.ALLOWED_ATTR,p):Ge,Le=b(e,"ALLOWED_NAMESPACES")?s({},e.ALLOWED_NAMESPACES,Ne):zt,Re=b(e,"ADD_URI_SAFE_ATTR")?s(x(Ke),e.ADD_URI_SAFE_ATTR,p):Ke,$e=b(e,"ADD_DATA_URI_TAGS")?s(x(qe),e.ADD_DATA_URI_TAGS,p):qe,U=b(e,"FORBID_CONTENTS")?s({},e.FORBID_CONTENTS,p):Ve,B=b(e,"FORBID_TAGS")?s({},e.FORBID_TAGS,p):{},Ee=b(e,"FORBID_ATTR")?s({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,We=e.ALLOW_ARIA_ATTR!==!1,_e=e.ALLOW_DATA_ATTR!==!1,Be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,ge=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,Xe=e.SANITIZE_DOM!==!1,je=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,He=e.ALLOWED_URI_REGEXP||St,F=e.NAMESPACE||M,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,re=e.HTML_INTEGRATION_POINTS||re,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(_e=!1),te&&(k=!0),v&&(m=s({},dt),d=[],v.html===!0&&(s(m,pt),s(d,Tt)),v.svg===!0&&(s(m,De),s(d,Ce),s(d,ce)),v.svgFilters===!0&&(s(m,Ie),s(d,Ce),s(d,ce)),v.mathMl===!0&&(s(m,Me),s(d,Et),s(d,ce))),e.ADD_TAGS&&(m===ze&&(m=x(m)),s(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===Ge&&(d=x(d)),s(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&s(Re,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===Ve&&(U=x(U)),s(U,e.FORBID_CONTENTS,p)),Se&&(m["#text"]=!0),w&&s(m,["html","head","body"]),m.table&&(s(m,["tbody"]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,W=_.createHTML("")}else _===void 0&&(_=Tn(Q,f)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Je=s({},[...De,...Ie,...on]),Qe=s({},[...Me,...an]),Xt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Le[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===M?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||ae[c]):!!Je[o]:e.namespaceURI===oe?t.namespaceURI===M?o==="math":t.namespaceURI===ie?o==="math"&&re[c]:!!Qe[o]:e.namespaceURI===M?t.namespaceURI===ie&&!re[c]||t.namespaceURI===oe&&!ae[c]?!1:!Qe[o]&&(Gt[o]||!Je[o]):!!(X==="application/xhtml+xml"&&Le[e.namespaceURI]):!1},N=function(e){V(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},se=function(e,t){try{V(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{V(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||te)try{N(t)}catch{}else try{t.setAttribute(e,"")}catch{}},et=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}X==="application/xhtml+xml"&&F===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===M)try{t=new bt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Oe?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(l.createTextNode(o),E.childNodes[0]||null),F===M?xt.call(t,w?"html":"body")[0]:w?t.documentElement:E},tt=function(e){return Ct.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},be=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof ue=="function"&&e instanceof ue};function C(i,e,t){le(i,o=>{o.call(n,e,t,H)})}const ot=function(e){let t=null;if(C(g.beforeSanitizeElements,e,null),be(e))return N(e),!0;const o=p(e.nodeName);if(C(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ge&&e.nodeType===Z.comment&&h(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&at(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!U[o]){const c=ee(e)||e.parentNode,E=Mt(e)||e.childNodes;if(E&&c){const T=E.length;for(let O=T-1;O>=0;--O){const D=Nt(E[O],!0);D.__removalCount=(e.__removalCount||0)+1,c.insertBefore(D,It(e))}}}return N(e),!0}return e instanceof Ue&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,le([pe,de,Te],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),C(g.afterSanitizeElements,e,null),!1)},it=function(e,t,o){if(Xe&&(t==="id"||t==="name")&&(o in l||o in Yt))return!1;if(!(_e&&!Ee[t]&&h(kt,t))){if(!(We&&h(vt,t))){if(!d[t]||Ee[t]){if(!(at(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(He,$(o,Fe,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Qt(o,"data:")===0&&$e[e])){if(!(Be&&!h(Ut,$(o,Fe,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ft)},rt=function(e){C(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||be(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:O,value:D}=E,j=p(T);let A=T==="value"?D:en(D);if(o.attrName=j,o.attrValue=A,o.keepAttr=!0,o.forceKeepAttr=void 0,C(g.uponSanitizeAttribute,e,o),A=o.attrValue,je&&(j==="id"||j==="name")&&(se(T,e),A=Ht+A),ge&&h(/((--!?|])>)|<\/(style|title)/i,A)){se(T,e);continue}if(o.forceKeepAttr||(se(T,e),!o.keepAttr))continue;if(!Ye&&h(/\/>/i,A)){se(T,e);continue}P&&le([pe,de,Te],lt=>{A=$(A,lt," ")});const st=p(e.nodeName);if(it(st,j,A)){if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(st,j)){case"TrustedHTML":{A=_.createHTML(A);break}case"TrustedScriptURL":{A=_.createScriptURL(A);break}}try{O?e.setAttributeNS(O,T,A):e.setAttribute(T,A),be(e)?N(e):ut(n.removed)}catch{}}}C(g.afterSanitizeAttributes,e,null)},jt=function i(e){let t=null;const o=tt(e);for(C(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)C(g.uponSanitizeShadowNode,t,null),ot(t),rt(t),t.content instanceof L&&i(t.content);C(g.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Oe=!i,Oe&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!n.isSupported)return i;if(Ae||ye(e),n.removed=[],typeof i=="string"&&(Y=!1),Y){if(i.nodeName){const D=p(i.nodeName);if(!m[D]||B[D])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=et("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Z.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=et(i),!t)return k?null:ne?W:""}t&&he&&N(t.firstChild);const T=tt(Y?i:t);for(;c=T.nextNode();)ot(c),rt(c),c.content instanceof L&&jt(c.content);if(Y)return i;if(k){if(te)for(E=wt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(d.shadowroot||d.shadowrootmode)&&(E=Pt.call(r,E,!0)),E}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(Rt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+O),P&&le([pe,de,Te],D=>{O=$(O,D," ")}),_&&ne?_.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),Ae=!0},n.clearConfig=function(){H=null,Ae=!1},n.isValidAttribute=function(i,e,t){H||ye({});const o=p(i),c=p(e);return it(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&V(g[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Zt(g[i],e);return t===-1?void 0:Jt(g[i],t,1)[0]}return ut(g[i])},n.removeHooks=function(i){g[i]=[]},n.removeAllHooks=function(){g=gt()},n}var ve=Ot();const ke="data-temp-href-target";ve.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(ke,"_blank")});ve.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(ke)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(ke))});const we=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return ve.sanitize(a,n)};function En({element:a}){const{body:n}=a,[l,r]=J.useState(we(n)),f=J.useRef(null);return J.useEffect(()=>{we(n)!==l&&r(we(n))},[n]),J.useEffect(()=>{var L,I;((L=f.current)==null?void 0:L.clientHeight)===0&&((I=f.current.parentElement)==null?void 0:I.childElementCount)===1&&f.current.parentElement.classList.add("stHtml-empty")}),ct(Vt,{children:l&&ct("div",{className:"stHtml","data-testid":"stHtml",ref:f,dangerouslySetInnerHTML:{__html:l}})})}const gn=J.memo(En);export{gn as default};
@@ -1 +1 @@
1
- import{r as M,E as T,_ as O,n as I,I as K,B as P,j as h,bv as Y,ba as $,bq as Z,b5 as ee,bp as j,bC as z,d as te,g as re,aL as ie,y as ae,bD as ne,bE as oe,bi as se,R as le,as as de,aA as ce,L as x,bm as ue,bl as pe,bs as fe,bF as he,bt as ge,bu as me,F as ve}from"./index.CqU47T61.js";import{a as V}from"./index.C88pvD_q.js";import{F as Se}from"./FormClearHelper.B_9Ez6vr.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.CrEUq34O.js";var N=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),M.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});N.displayName="Video";var D=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),M.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var H=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:l}),M.createElement("rect",{width:24,height:24,fill:"none"}),M.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function q({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n&&h(Fe,{children:h(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const Re=({switchFacingMode:t})=>h(Ee,{"data-testid":"stCameraInputSwitchButton",children:h(Y,{content:"Switch camera",placement:$.TOP_RIGHT,children:h(Z,{kind:ee.MINIMAL,onClick:t,children:h(j,{content:H,size:"twoXL",color:z.white})})})});var _={exports:{}},xe=_.exports,B;function _e(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(xe,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),b=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||b||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var b=this.getCanvas(e);return b&&b.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var b=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=b/S;b=c.minScreenshotWidth||this.video.clientWidth,S=b/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,b=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||b,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,y=w.ctx,f=w.canvas;return y&&f&&(f.width=(e==null?void 0:e.width)||f.width,f.height=(e==null?void 0:e.height)||f.height,c.mirrored&&(y.translate(f.width,0),y.scale(-1,1)),y.imageSmoothingEnabled=c.imageSmoothing,y.drawImage(this.video,0,0,(e==null?void 0:e.width)||f.width,(e==null?void 0:e.height)||f.height),c.mirrored&&(y.scale(-1,1),y.translate(-f.width,0))),f},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var y=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(f){e.unmounted||y!==e.requestUserMediaId?u.stopMediaStream(f):e.handleUserMedia(null,f)}).catch(function(f){e.handleUserMedia(f)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},b=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var y=b(i.audioConstraints);y&&(v=y);var f=b(i.videoConstraints);f&&(w=f),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,b=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,y=w===void 0?{}:w,f=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},y),{transform:(y.transform||"")+" scaleX(-1)"}):y,Q={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!b,playsInline:!0,ref:function(J){e.video=J},style:X},R)),f&&f(Q))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var Te=_e();const Oe=re(Te);var A;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})(A||(A={}));const je=({width:t})=>P(W,{width:t,children:[h(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",h(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),We=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=M.useState(p||"pending"),C=M.useRef(null),[E,m]=M.useState(l),u=M.useCallback(ie(1e3,m),[]);M.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?h(je,{width:E}):ne.isMobile&&h(Re,{switchFacingMode:s}),h(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&h(Oe,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),h(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},Ve=150,Le=de.getLogger("CameraInput");class ke extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return Be(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Ve)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{Le.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(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(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[h(me,{label:l.label,disabled:n,labelVisibility:fe((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&h(he,{children:h(ge,{content:l.help,placement:$.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[h(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&h(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),h(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[h(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):h(We,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Be(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const He=se(ke);export{He as default};
1
+ import{r as M,E as T,_ as O,n as I,I as K,B as P,j as h,bv as Y,ba as $,bq as Z,b5 as ee,bp as j,bC as z,d as te,g as re,aL as ie,y as ae,bD as ne,bE as oe,bi as se,R as le,as as de,aA as ce,L as x,bm as ue,bl as pe,bs as fe,bF as he,bt as ge,bu as me,F as ve}from"./index.DFLL-J15.js";import{a as V}from"./index.C88pvD_q.js";import{F as Se}from"./FormClearHelper.DzssExOY.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.REkskfZ6.js";var N=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),M.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});N.displayName="Video";var D=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),M.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var H=M.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return M.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:l}),M.createElement("rect",{width:24,height:24,fill:"none"}),M.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function q({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n&&h(Fe,{children:h(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const Re=({switchFacingMode:t})=>h(Ee,{"data-testid":"stCameraInputSwitchButton",children:h(Y,{content:"Switch camera",placement:$.TOP_RIGHT,children:h(Z,{kind:ee.MINIMAL,onClick:t,children:h(j,{content:H,size:"twoXL",color:z.white})})})});var _={exports:{}},xe=_.exports,B;function _e(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(xe,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),b=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||b||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var b=this.getCanvas(e);return b&&b.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var b=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=b/S;b=c.minScreenshotWidth||this.video.clientWidth,S=b/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,b=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||b,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,y=w.ctx,f=w.canvas;return y&&f&&(f.width=(e==null?void 0:e.width)||f.width,f.height=(e==null?void 0:e.height)||f.height,c.mirrored&&(y.translate(f.width,0),y.scale(-1,1)),y.imageSmoothingEnabled=c.imageSmoothing,y.drawImage(this.video,0,0,(e==null?void 0:e.width)||f.width,(e==null?void 0:e.height)||f.height),c.mirrored&&(y.scale(-1,1),y.translate(-f.width,0))),f},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var y=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(f){e.unmounted||y!==e.requestUserMediaId?u.stopMediaStream(f):e.handleUserMedia(null,f)}).catch(function(f){e.handleUserMedia(f)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},b=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var y=b(i.audioConstraints);y&&(v=y);var f=b(i.videoConstraints);f&&(w=f),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,b=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,y=w===void 0?{}:w,f=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},y),{transform:(y.transform||"")+" scaleX(-1)"}):y,Q={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!b,playsInline:!0,ref:function(J){e.video=J},style:X},R)),f&&f(Q))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var Te=_e();const Oe=re(Te);var A;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})(A||(A={}));const je=({width:t})=>P(W,{width:t,children:[h(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",h(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),We=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=M.useState(p||"pending"),C=M.useRef(null),[E,m]=M.useState(l),u=M.useCallback(ie(1e3,m),[]);M.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?h(je,{width:E}):ne.isMobile&&h(Re,{switchFacingMode:s}),h(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&h(Oe,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),h(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},Ve=150,Le=de.getLogger("CameraInput");class ke extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return Be(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Ve)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{Le.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(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(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[h(me,{label:l.label,disabled:n,labelVisibility:fe((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&h(he,{children:h(ge,{content:l.help,placement:$.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[h(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&h(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),h(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[h(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):h(We,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Be(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const He=se(ke);export{He as default};
@@ -1 +1 @@
1
- import{n as R,r,y as M,c1 as T,c2 as W,B as C,j as l,bs as V,bF as L,bt as O,ba as P,bu as k,c0 as B,c3 as E,bY as N,c4 as $,bD as F}from"./index.CqU47T61.js";import{a as A}from"./useBasicWidgetState.Czrslgva.js";import"./FormClearHelper.B_9Ez6vr.js";const D=R("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),H=(s,t)=>s.getIntArrayValue(t),U=s=>s.default??null,j=s=>s.value??null,G=(s,t,a,u)=>{t.setIntArrayValue(s,a.value,{fromUi:a.fromUi},u)},K=s=>{var S;const{element:t,widgetMgr:a,fragmentId:u}=s,e=M(),[n,g]=A({getStateFromWidgetMgr:H,getDefaultStateFromProto:U,getCurrStateFromProto:j,updateWidgetMgrState:G,element:t,widgetMgr:a,fragmentId:u}),m=t.maxSelections>0&&n.length>=t.maxSelections,y=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(n.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,n.length]),f=r.useMemo(()=>n.map(o=>{const i=t.options[o];return{value:o.toString(),label:i}}),[t.options,n]),h=r.useCallback(o=>{const i=()=>{var d;const p=(d=o.option)==null?void 0:d.value;return parseInt(p,10)};switch(o.type){case"remove":return T(n,i());case"clear":return[];case"select":return n.concat([i()]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[n]),v=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&n.length>=t.maxSelections||g({value:h(o),fromUi:!0})},[t.maxSelections,h,g,n.length]),x=r.useCallback((o,i)=>{if(m)return[];const p=o.filter(d=>!n.includes(Number(d.value)));return W(p,i)},[m,n]),{options:c}=t,b=c.length===0?!0:s.disabled,z=c.length===0?"No options to select.":t.placeholder,w=c.map((o,i)=>({label:o,value:i.toString()})),I=c.length>10;return C("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[l(k,{label:t.label,disabled:b,labelVisibility:V((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(L,{children:l(O,{content:t.help,placement:P.TOP_RIGHT})})}),l(D,{children:l(B,{options:w,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:z,type:$.select,multi:!0,onChange:v,value:f,disabled:b,size:"compact",noResultsMsg:y,filterOptions:x,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:N,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:F.isMobile&&I===!1?"readonly":null}},Dropdown:{component:E}}})})]})},q=r.memo(K);export{q as default};
1
+ import{n as R,r,y as M,c1 as T,c2 as W,B as C,j as l,bs as V,bF as L,bt as O,ba as P,bu as k,c0 as B,c3 as E,bY as N,c4 as $,bD as F}from"./index.DFLL-J15.js";import{a as A}from"./useBasicWidgetState.D5X8duhc.js";import"./FormClearHelper.DzssExOY.js";const D=R("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),H=(s,t)=>s.getIntArrayValue(t),U=s=>s.default??null,j=s=>s.value??null,G=(s,t,a,u)=>{t.setIntArrayValue(s,a.value,{fromUi:a.fromUi},u)},K=s=>{var S;const{element:t,widgetMgr:a,fragmentId:u}=s,e=M(),[n,g]=A({getStateFromWidgetMgr:H,getDefaultStateFromProto:U,getCurrStateFromProto:j,updateWidgetMgrState:G,element:t,widgetMgr:a,fragmentId:u}),m=t.maxSelections>0&&n.length>=t.maxSelections,y=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(n.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,n.length]),f=r.useMemo(()=>n.map(o=>{const i=t.options[o];return{value:o.toString(),label:i}}),[t.options,n]),h=r.useCallback(o=>{const i=()=>{var d;const p=(d=o.option)==null?void 0:d.value;return parseInt(p,10)};switch(o.type){case"remove":return T(n,i());case"clear":return[];case"select":return n.concat([i()]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[n]),v=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&n.length>=t.maxSelections||g({value:h(o),fromUi:!0})},[t.maxSelections,h,g,n.length]),x=r.useCallback((o,i)=>{if(m)return[];const p=o.filter(d=>!n.includes(Number(d.value)));return W(p,i)},[m,n]),{options:c}=t,b=c.length===0?!0:s.disabled,z=c.length===0?"No options to select.":t.placeholder,w=c.map((o,i)=>({label:o,value:i.toString()})),I=c.length>10;return C("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[l(k,{label:t.label,disabled:b,labelVisibility:V((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(L,{children:l(O,{content:t.help,placement:P.TOP_RIGHT})})}),l(D,{children:l(B,{options:w,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:z,type:$.select,multi:!0,onChange:v,value:f,disabled:b,size:"compact",noResultsMsg:y,filterOptions:x,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:N,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:F.isMobile&&I===!1?"readonly":null}},Dropdown:{component:E}}})})]})},q=r.memo(K);export{q as default};