@stlite/desktop 0.90.13 → 0.90.14

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 (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/assets/{ErrorOutline.esm-CJGMKtXr.js → ErrorOutline.esm-BnBxotPi.js} +1 -1
  3. package/build/assets/{FileDownload.esm-DVbGfwz7.js → FileDownload.esm-RGPPDhk8.js} +1 -1
  4. package/build/assets/{FileHelper-BAjDG49X.js → FileHelper-tNTMbDMm.js} +1 -1
  5. package/build/assets/{FormClearHelper-CaLJK07N.js → FormClearHelper-DGQP9oxJ.js} +1 -1
  6. package/build/assets/{Hooks-D54IehuR.js → Hooks-Bo61ucn1.js} +1 -1
  7. package/build/assets/{InputInstructions-BLplNLW9.js → InputInstructions-Ck_istEY.js} +1 -1
  8. package/build/assets/{Particles-VYhfVp_p.js → Particles-BlxXqWnI.js} +1 -1
  9. package/build/assets/{ProgressBar-DX8k7XSZ.js → ProgressBar-C-iICo4w.js} +1 -1
  10. package/build/assets/{Toolbar-BbbydoLD.js → Toolbar-ByIPpsVy.js} +1 -1
  11. package/build/assets/{base-input-d4WKPeU6.js → base-input-DRJDHdAL.js} +1 -1
  12. package/build/assets/{checkbox-DUA9ewQT.js → checkbox-2-JpNSRW.js} +1 -1
  13. package/build/assets/{createSuper-CoIMxZYP.js → createSuper-vJD5mbw5.js} +1 -1
  14. package/build/assets/{data-grid-overlay-editor-cvHWuOOd.js → data-grid-overlay-editor-BIgAXG8E.js} +1 -1
  15. package/build/assets/{downloader-CR6bzPv-.js → downloader-JpXWtQ-P.js} +1 -1
  16. package/build/assets/{es6-BCBcAdQS.js → es6-Lsq1Gov6.js} +2 -2
  17. package/build/assets/{iframeResizer.contentWindow-CEqjsNrn.js → iframeResizer.contentWindow-Guiwg0xE.js} +1 -1
  18. package/build/assets/{index-CJWk1YT9.js → index-0HifpjrJ.js} +1 -1
  19. package/build/assets/{index-gb2ePejP.js → index-B-7gUeK8.js} +1 -1
  20. package/build/assets/{index-D9P3ZYiC.js → index-B5XMuJqP.js} +1 -1
  21. package/build/assets/{index-BRiK5gVx.js → index-B7T6_RXn.js} +1 -1
  22. package/build/assets/{index-VVwti7cA.js → index-B9RImrnB.js} +1 -1
  23. package/build/assets/{index-NigQ67t-.js → index-BYmSaStp.js} +1 -1
  24. package/build/assets/{index-BMSSeqlt.js → index-BZmLxv-D.js} +1 -1
  25. package/build/assets/{index-BD2ZweM9.js → index-Bb6UZSFO.js} +1 -1
  26. package/build/assets/{index-B3GOsGpL.js → index-BhFJX5Vn.js} +1 -1
  27. package/build/assets/{index-CHBxMYoz.js → index-BhoSXjxz.js} +1 -1
  28. package/build/assets/{index-wnKDraWU.js → index-BwsrXI9O.js} +87 -87
  29. package/build/assets/{index-BGUuVZft.js → index-C0jxm_PH.js} +1 -1
  30. package/build/assets/{index-BJK2Ym_S.js → index-C636A-W7.js} +1 -1
  31. package/build/assets/{index-CD0SY35r.js → index-C9n8vq5U.js} +1 -1
  32. package/build/assets/{index-PHqcnj3c.js → index-CE3r0KWL.js} +1 -1
  33. package/build/assets/{index-j6pFDYKO.js → index-CFCb7WWw.js} +1 -1
  34. package/build/assets/{index-CdAXvPf5.js → index-CO2Aw19y.js} +1 -1
  35. package/build/assets/{index-CIRTE79j.js → index-CRhYEwNP.js} +1 -1
  36. package/build/assets/{index-Dynm-1sH.js → index-CRiFLKI5.js} +1 -1
  37. package/build/assets/{index-B7yzG-4X.js → index-CRtbPdb-.js} +5 -5
  38. package/build/assets/{index-C91sP-jG.js → index-CoAdDGfF.js} +1 -1
  39. package/build/assets/{index-wUVGuFfU.js → index-D4BdQDBD.js} +1 -1
  40. package/build/assets/{index-DOiS7VE9.js → index-D94FJ5GB.js} +1 -1
  41. package/build/assets/{index-B58bWjQH.js → index-DIjJwKUC.js} +1 -1
  42. package/build/assets/{index-DoQHaClc.js → index-DImx2D5B.js} +1 -1
  43. package/build/assets/{index-CTZrIDfL.js → index-DV5icRRG.js} +1 -1
  44. package/build/assets/{index-CwPp5UqK.js → index-DgEYnWf9.js} +1 -1
  45. package/build/assets/{index-mHvUvPYI.js → index-DkqUDAbB.js} +1 -1
  46. package/build/assets/{index-Bhgfj5y5.js → index-DqH3HG1G.js} +1 -1
  47. package/build/assets/{index-vLb3c1eZ.js → index-Dtvm0G3c.js} +1 -1
  48. package/build/assets/{index-Bwfh73dd.js → index-Q623jih7.js} +1 -1
  49. package/build/assets/{index-DCv3Ovf7.js → index-Zd5xxmFR.js} +1 -1
  50. package/build/assets/{index-CeNNLDtJ.js → index-a4tM28AE.js} +1 -1
  51. package/build/assets/{index-HqlJZ3Ag.js → index-lw_DueTS.js} +1 -1
  52. package/build/assets/{index-BdVfRySM.js → index-m7vCKamN.js} +1 -1
  53. package/build/assets/{index-D_4iXBI5.js → index-mytcrsu7.js} +1 -1
  54. package/build/assets/{index-XsxWL5x-.js → index-pOokbnGQ.js} +1 -1
  55. package/build/assets/{inherits-xHSaJdUZ.js → inherits-DgEBZpYa.js} +1 -1
  56. package/build/assets/{input-PliHooUw.js → input-BRw1nRj1.js} +1 -1
  57. package/build/assets/{memory-BJMhKXeY.js → memory-Do9YV2fF.js} +1 -1
  58. package/build/assets/{number-overlay-editor-DRf5xgI3.js → number-overlay-editor-CBg6iMqb.js} +1 -1
  59. package/build/assets/{sandbox-DBdCCxaG.js → sandbox-DO_nuL9g.js} +1 -1
  60. package/build/assets/{slicedToArray-Cuk3tbTR.js → slicedToArray-CCKNURYu.js} +1 -1
  61. package/build/assets/{timepicker-DjzHzJAt.js → timepicker-CBaJIVEG.js} +1 -1
  62. package/build/assets/{uniqueId-ikSpJ9AP.js → uniqueId-7HN9pV-Z.js} +1 -1
  63. package/build/assets/{useBasicWidgetState-raTjAqZP.js → useBasicWidgetState-CQoPeUHV.js} +1 -1
  64. package/build/assets/{useTextInputAutoExpand-Uac3U0I_.js → useTextInputAutoExpand-CJ0SgjFi.js} +1 -1
  65. package/build/assets/{useUpdateUiValue-BbEmiOZQ.js → useUpdateUiValue-CakBWvqR.js} +1 -1
  66. package/build/assets/{withFullScreenWrapper-C7u7nPsK.js → withFullScreenWrapper-6omMDHWT.js} +1 -1
  67. package/build/assets/{worker-CiNU4sgs.js → worker-CO569BKa.js} +4 -4
  68. package/build/electron/worker.js +5 -5
  69. package/build/index.html +1 -1
  70. package/package.json +4 -4
  71. package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{s as L,r as i,v as N,I as U,w as O,V as R,j as p,x as w}from"./index-wnKDraWU.js";const x=L("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),A=w.getLogger("Video"),j={width:"100%"};function P({element:r,endpoints:o,elementMgr:f}){const n=i.useRef(null),{type:v,url:g,startTime:a,subtitles:y,endTime:s,loop:d,autoplay:m,muted:E}=r,c=N(g),l=U(y);let V=O(c);const b=i.useMemo(()=>{if(!r.id)return!0;const e=f.getElementState(r.id,"preventAutoplay");return e||f.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,f]),S=i.useMemo(()=>JSON.stringify(l?l.map(e=>o.buildMediaURL(`${e.url}`)):[]),[l,o]);i.useEffect(()=>{const e=JSON.parse(S);e.length!==0&&e.forEach(t=>{o.checkSourceUrlResponse(t,"Video Subtitle")})},[S,o]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{s>0&&e.currentTime>=s&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",u),()=>{e&&s>0&&e.removeEventListener("timeupdate",u)}},[s,d,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const h=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),s&&!isNaN(s)&&t.searchParams.append("end",s.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(v===R.Type.YOUTUBE_IFRAME)return p.jsx(x,{className:"stVideo","data-testid":"stVideo",title:c,src:h(c),allow:"autoplay; encrypted-media",allowFullScreen:!0});const T=e=>{const t=e.currentTarget.src;A.error(`Client Error: Video source error - ${t}`),o.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!b,src:o.buildMediaURL(c),style:j,crossOrigin:V,onError:T,children:l?.map((e,t)=>p.jsx("track",{kind:"captions",src:o.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const I=i.memo(P);export{I as default};
1
+ import{s as L,r as i,v as N,I as U,w as O,V as R,j as p,x as w}from"./index-BwsrXI9O.js";const x=L("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),A=w.getLogger("Video"),j={width:"100%"};function P({element:r,endpoints:o,elementMgr:f}){const n=i.useRef(null),{type:v,url:g,startTime:a,subtitles:y,endTime:s,loop:d,autoplay:m,muted:E}=r,c=N(g),l=U(y);let V=O(c);const b=i.useMemo(()=>{if(!r.id)return!0;const e=f.getElementState(r.id,"preventAutoplay");return e||f.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,f]),S=i.useMemo(()=>JSON.stringify(l?l.map(e=>o.buildMediaURL(`${e.url}`)):[]),[l,o]);i.useEffect(()=>{const e=JSON.parse(S);e.length!==0&&e.forEach(t=>{o.checkSourceUrlResponse(t,"Video Subtitle")})},[S,o]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{s>0&&e.currentTime>=s&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",u),()=>{e&&s>0&&e.removeEventListener("timeupdate",u)}},[s,d,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const h=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),s&&!isNaN(s)&&t.searchParams.append("end",s.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(v===R.Type.YOUTUBE_IFRAME)return p.jsx(x,{className:"stVideo","data-testid":"stVideo",title:c,src:h(c),allow:"autoplay; encrypted-media",allowFullScreen:!0});const T=e=>{const t=e.currentTarget.src;A.error(`Client Error: Video source error - ${t}`),o.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!b,src:o.buildMediaURL(c),style:j,crossOrigin:V,onError:T,children:l?.map((e,t)=>p.jsx("track",{kind:"captions",src:o.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const I=i.memo(P);export{I as default};
@@ -1 +1 @@
1
- import{s as l,r as d,L as p,u,j as a,b as x,P as f,y as k,f as b}from"./index-wnKDraWU.js";const L=l("div",{target:"e11k5jya2"})({name:"b6wrti",styles:"display:flex;flex-direction:column;width:100%"}),C=l("a",{target:"e11k5jya1"})(({disabled:n,isCurrentPage:e,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:e?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...n?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}}),""),v=l("span",{target:"e11k5jya0"})(({disabled:n,theme:e})=>({color:e.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...n?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function y(n){const{onPageChange:e,currentPageScriptHash:o}=d.useContext(p),{colors:s}=u(),{disabled:t,element:r}=n,i=o===r.pageScriptHash,g=c=>{r.external?t&&c.preventDefault():(c.preventDefault(),t||e(r.pageScriptHash))};return a.jsx("div",{className:"stPageLink","data-testid":"stPageLink",children:a.jsx(x,{help:r.help,placement:f.TOP_RIGHT,containerWidth:!0,children:a.jsx(L,{children:a.jsxs(C,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:i,href:r.page,target:r.external?"_blank":"",rel:"noreferrer",onClick:g,children:[r.icon&&a.jsx(k,{size:"lg",color:t?s.fadedText40:s.bodyText,iconValue:r.icon}),a.jsx(v,{disabled:t,children:a.jsx(b,{source:r.label,allowHTML:!1,isLabel:!0,boldLabel:i,largerLabel:!0,disableLinks:!0})})]})})})})}const T=d.memo(y);export{T as default};
1
+ import{s as l,r as d,L as p,u,j as a,b as x,P as f,y as k,f as b}from"./index-BwsrXI9O.js";const L=l("div",{target:"e11k5jya2"})({name:"b6wrti",styles:"display:flex;flex-direction:column;width:100%"}),C=l("a",{target:"e11k5jya1"})(({disabled:n,isCurrentPage:e,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:e?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...n?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}}),""),v=l("span",{target:"e11k5jya0"})(({disabled:n,theme:e})=>({color:e.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...n?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function y(n){const{onPageChange:e,currentPageScriptHash:o}=d.useContext(p),{colors:s}=u(),{disabled:t,element:r}=n,i=o===r.pageScriptHash,g=c=>{r.external?t&&c.preventDefault():(c.preventDefault(),t||e(r.pageScriptHash))};return a.jsx("div",{className:"stPageLink","data-testid":"stPageLink",children:a.jsx(x,{help:r.help,placement:f.TOP_RIGHT,containerWidth:!0,children:a.jsx(L,{children:a.jsxs(C,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:i,href:r.page,target:r.external?"_blank":"",rel:"noreferrer",onClick:g,children:[r.icon&&a.jsx(k,{size:"lg",color:t?s.fadedText40:s.bodyText,iconValue:r.icon}),a.jsx(v,{disabled:t,children:a.jsx(b,{source:r.label,allowHTML:!1,isLabel:!0,boldLabel:i,largerLabel:!0,disableLinks:!0})})]})})})})}const T=d.memo(y);export{T as default};
@@ -1,4 +1,4 @@
1
- import{s as r,$ as c,r as m,j as n,aq as p}from"./index-wnKDraWU.js";import{R as g,P as x}from"./Particles-VYhfVp_p.js";const B="/assets/balloon-0.Czj7AKwE.png",d="/assets/balloon-1.CNvFFrND.png",f="/assets/balloon-2.DTvC6B1t.png",_="/assets/balloon-3.CgSk4tbL.png",A="/assets/balloon-4.mbtFrzxf.png",E="/assets/balloon-5.CSwkUfRA.png",t=300,a=121,l=20,I=80,M=1e3,b=c`
1
+ import{s as r,$ as c,r as m,j as n,aq as p}from"./index-BwsrXI9O.js";import{R as g,P as x}from"./Particles-BlxXqWnI.js";const B="/assets/balloon-0.Czj7AKwE.png",d="/assets/balloon-1.CNvFFrND.png",f="/assets/balloon-2.DTvC6B1t.png",_="/assets/balloon-3.CgSk4tbL.png",A="/assets/balloon-4.mbtFrzxf.png",E="/assets/balloon-5.CSwkUfRA.png",t=300,a=121,l=20,I=80,M=1e3,b=c`
2
2
  from {
3
3
  transform: translateY(calc(100vh + ${t}px));
4
4
  }
@@ -1 +1 @@
1
- import{r as c,E as y,_ as S,s as p,aE as $,j as o,an as f,c as x,d as X,B as w,at as O,bi as _,aV as q,bq as G,k as h,a8 as m,bj as K,bk as Q,W as Y,l as J,Q as Z,T as ee,P as te}from"./index-wnKDraWU.js";import{F as se}from"./FormClearHelper-CaLJK07N.js";import{g as v,F,D as ie,b as le,I as oe,C as ne,a as ae,s as re}from"./FileHelper-BAjDG49X.js";import{P as de,S as ce}from"./ProgressBar-DX8k7XSZ.js";import{u as pe}from"./Hooks-D54IehuR.js";import{U}from"./UploadFileInfo-C-jY39rj.js";var z=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});z.displayName="ChevronLeft";var I=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});I.displayName="ChevronRight";var C=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});C.displayName="CloudUpload";var j=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});j.displayName="Error";const M=p("section",{target:"e1b2p2ww17"})(({isDisabled:e,theme:i})=>({display:"flex",gap:i.spacing.lg,alignItems:"center",padding:i.spacing.lg,backgroundColor:i.colors.secondaryBg,borderRadius:i.radii.default,border:i.colors.widgetBorderColor?`${i.sizes.borderWidth} solid ${i.colors.widgetBorderColor}`:void 0,height:i.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${i.colors.primary}`},cursor:e?"not-allowed":"pointer"}),""),ge=p("div",{target:"e1b2p2ww16"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"}),""),B=p("span",{target:"e1b2p2ww15"})(({theme:e})=>({color:e.colors.darkenedBgMix100}),""),V=p("span",{target:"e1b2p2ww14"})(({theme:e,disabled:i})=>({color:i?e.colors.fadedText40:e.colors.bodyText}),""),ue=p("span",{target:"e1b2p2ww13"})(({theme:e,disabled:i})=>({fontSize:e.fontSizes.sm,color:i?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"}),""),he=p("div",{target:"e1b2p2ww12"})({name:"1s8jot1",styles:"display:flex;flex-direction:column;min-width:0;max-width:100%"}),fe=p("span",{target:"e1b2p2ww11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),D=p("div",{target:"e1b2p2ww10"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg}),""),me=p("ul",{target:"e1b2p2ww9"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none}),""),E=p("li",{target:"e1b2p2ww8"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none}),""),L=p("div",{target:"e1b2p2ww7"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"}),""),P=p("div",{target:"e1b2p2ww6"})(({theme:e,disabled:i})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?e.colors.fadedText40:e.colors.bodyText}),""),T=p("div",{target:"e1b2p2ww5"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS}),""),xe=p("span",{target:"e1b2p2ww4"})(({theme:e})=>({marginRight:e.spacing.twoXS}),""),we=p("div",{target:"e1b2p2ww3"})(({theme:e,disabled:i})=>({display:"flex",padding:e.spacing.twoXS,color:i?e.colors.fadedText40:e.colors.darkenedBgMix100}),""),A=p("small",{target:"e1b2p2ww2"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"}),""),W=p("span",{target:"e1b2p2ww1"})({name:"0",styles:""}),Fe=e=>({[M]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[B]:{display:"none"},[V]:{marginBottom:e.spacing.twoXS},[D]:{paddingRight:e.spacing.lg},[T]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[P]:{width:e.sizes.full},[L]:{flexDirection:"column"},[A]:{height:"auto",whiteSpace:"initial"},[W]:{display:"none"},[E]:{margin:e.spacing.none,padding:e.spacing.none}}),ye=p("div",{target:"e1b2p2ww0"})(({theme:e,width:i})=>{if(i<$("23rem"))return Fe(e)},""),Se=({multiple:e,acceptedExtensions:i,maxSizeBytes:t,acceptDirectory:s=!1,disabled:l})=>{const n=()=>s?"directories":e?"files":"file",a=()=>i.length?` • ${i.map(d=>d.replace(/^\./,"").toUpperCase()).join(", ")}`:null,r=()=>`Limit ${v(t,F.Byte,0)} per file`;return o.jsxs(ge,{"data-testid":"stFileUploaderDropzoneInstructions",children:[o.jsx(B,{children:o.jsx(f,{content:C,size:"threeXL"})}),o.jsxs(he,{children:[o.jsxs(V,{disabled:l,children:["Drag and drop ",n()," here"]}),o.jsxs(ue,{disabled:l,children:[r(),a()]})]})]})},Ue=c.memo(Se),be=({onDrop:e,multiple:i,acceptedExtensions:t,maxSizeBytes:s,disabled:l,label:n,acceptDirectory:a=!1})=>o.jsx(ie,{onDrop:e,multiple:i,accept:le(t),maxSize:s,disabled:l,useFsAccessApi:!1,children:({getRootProps:r,getInputProps:d})=>{const g=d({multiple:i||!!a});return o.jsxs(M,{...r(),"data-testid":"stFileUploaderDropzone",isDisabled:l,"aria-label":n,"aria-disabled":l,children:[o.jsx("input",{"data-testid":"stFileUploaderDropzoneInput",...g,...a&&{webkitdirectory:""}}),o.jsx(Ue,{multiple:i,acceptedExtensions:t,maxSizeBytes:s,acceptDirectory:a,disabled:l}),o.jsx(fe,{children:o.jsx(x,{kind:w.SECONDARY,disabled:l,size:X.SMALL,children:a?"Browse directories":"Browse files"})})]})}}),ve=c.memo(be),N=p("small",{target:"e1bju1570"})(({kind:e,disabled:i,theme:t})=>{const{redTextColor:s,fadedText60:l,fadedText40:n}=t.colors;let a=l;return i&&(a=n),e==="danger"&&(a=s),{color:a,fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.tight}},""),ze=({fileInfo:e,disabled:i})=>e.status.type==="uploading"?o.jsx(de,{value:e.status.progress,size:ce.SMALL}):e.status.type==="error"?o.jsxs(A,{children:[o.jsx(xe,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),o.jsx(W,{children:o.jsx(f,{content:j,size:"lg"})})]}):e.status.type==="uploaded"?o.jsx(N,{disabled:i,children:v(e.size,F.Byte)}):null,Ie=({fileInfo:e,onDelete:i,disabled:t})=>o.jsxs(T,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[o.jsx(we,{disabled:t,children:o.jsx(f,{content:oe,size:"twoXL"})}),o.jsxs(L,{className:"stFileUploaderFileData",children:[o.jsx(P,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:t,children:e.name}),o.jsx(ze,{fileInfo:e,disabled:t})]}),o.jsx("div",{"data-testid":"stFileUploaderDeleteBtn",children:o.jsx(x,{onClick:()=>i(e.id),kind:w.MINIMAL,disabled:t,"aria-label":`Remove ${e.name}`,children:o.jsx(f,{content:ne,size:"lg"})})})]}),Ce=c.memo(Ie),je=p("div",{target:"e1nlpozb1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS}),""),Me=p("div",{target:"e1nlpozb0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40}),""),Be=({currentPage:e,totalPages:i,onNext:t,onPrevious:s})=>o.jsxs(je,{"data-testid":"stFileUploaderPagination",children:[o.jsx(N,{children:`Showing page ${e} of ${i}`}),o.jsxs(Me,{children:[o.jsx(x,{onClick:s,kind:w.MINIMAL,children:o.jsx(f,{content:z,size:"xl"})}),o.jsx(x,{onClick:t,kind:w.MINIMAL,children:o.jsx(f,{content:I,size:"xl"})})]})]}),Ve=c.memo(Be),b=(e,i)=>Math.ceil(e.length/i),De=e=>O(({pageSize:t,items:s,resetOnAdd:l,...n})=>{const[a,r]=c.useState(0),[d,g]=c.useState(()=>b(s,t)),u=pe(s);c.useEffect(()=>{u&&u.length!==s.length&&g(b(s,t)),u&&u.length<s.length?l&&r(0):a+1>=d&&r(d-1)},[s,a,t,u,l,d]);const R=()=>{r(Math.min(a+1,d-1))},H=()=>{r(Math.max(0,a-1))},k=s.slice(a*t,a*t+t);return o.jsxs(o.Fragment,{children:[o.jsx(e,{items:k,...n}),s.length>t?o.jsx(Ve,{pageSize:t,totalPages:d,currentPage:a+1,onNext:R,onPrevious:H}):null]})},e),Ee=({items:e,onDelete:i,disabled:t})=>o.jsx(me,{children:e.map(s=>o.jsx(E,{children:o.jsx(Ce,{fileInfo:s,onDelete:i,disabled:t})},s.id))}),Le=De(Ee),Pe=e=>o.jsx(D,{children:o.jsx(Le,{...e})}),Te=c.memo(Pe);class Ae extends c.PureComponent{constructor(i){super(i),this.formClearHelper=new se,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:l,fragmentId:n}=this.props,a=l.getFileUploaderStateValue(s);q(t,a)||l.setFileUploaderStateValue(s,t,{fromUi:!0},n)},this.isFileTypeAllowed=t=>{const{element:s}=this.props,{type:l}=s;if(!l||l.length===0)return!0;const n=t.name.toLowerCase();return l.some(a=>n.endsWith(a.toLowerCase()))},this.filterDirectoryFiles=t=>{const s=[],l=[];return t.forEach(n=>{this.isFileTypeAllowed(n)?s.push(n):l.push({file:n,errors:[{code:"file-invalid-type",message:`${n.type} files are not allowed.`}]})}),{accepted:s,rejected:l}},this.dropHandler=(t,s)=>{const{element:l}=this.props,{multipleFiles:n}=l;if(!!l.acceptDirectory&&t.length>0){const{accepted:r,rejected:d}=this.filterDirectoryFiles(t);t=r,s=[...s,...d]}if(!n&&t.length===0&&s.length>1){const r=s.findIndex(d=>d.errors.length===1&&d.errors[0].code==="too-many-files");r>=0&&(t.push(s[r].file),s.splice(r,1))}if(this.props.uploadClient.fetchFileURLs(t).then(r=>{if(!n&&t.length>0){const d=this.state.files.find(g=>g.status.type!=="error");d&&(this.forceUpdatingStatus=!0,this.deleteFile(d.id),this.forceUpdatingStatus=!1)}G(r,t).forEach(([d,g])=>{this.uploadFile(d,g)})}).catch(r=>{this.addFiles(t.map(d=>new U(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:r})))}),s.length>0){const r=s.map(d=>ae(d,this.nextLocalFileId(),this.maxUploadSizeInBytes));this.addFiles(r)}},this.uploadFile=(t,s)=>{const l=new AbortController,n=s.webkitRelativePath||s.name,a=new U(n,s.size,this.nextLocalFileId(),{type:"uploading",abortController:l,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,r=>this.onUploadProgress(r,a.id),l.signal).then(()=>this.onUploadComplete(a.id,t)).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:r?r.toString():"Unknown error"}))})},this.onUploadComplete=(t,s)=>{const l=this.getFile(t);h(l)||l.status.type!=="uploading"||this.updateFile(l.id,l.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.deleteFile=t=>{if(this.props.disabled)return;const s=this.getFile(t);h(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,t]}))})},this.addFiles=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,...t]}))})},this.removeFile=t=>{m.flushSync(()=>{this.setState(s=>({files:s.files.filter(l=>l.id!==t)}))})},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{m.flushSync(()=>{this.setState(l=>({files:l.files.map(n=>n.id===t?s:n)}))})},this.onUploadProgress=(t,s)=>{const l=this.getFile(s);if(h(l)||l.status.type!=="uploading")return;const n=Math.round(t.loaded*100/t.total);l.status.progress!==n&&this.updateFile(s,l.setStatus({type:"uploading",abortController:l.status.abortController,progress:n}))},this.onFormCleared=()=>{m.flushSync(()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(h(t))return;const{widgetMgr:s,element:l,fragmentId:n}=this.props;s.setFileUploaderStateValue(l,t,{fromUi:!0},n)})})},this.state=this.initialValue}get initialValue(){const i={files:[]},{widgetMgr:t,element:s}=this.props,l=t.getFileUploaderStateValue(s);if(h(l))return i;const{uploadedFileInfo:n}=l;return h(n)||n.length===0?i:{files:n.map(a=>{const r=a.name,d=a.size,g=a.fileId,u=a.fileUrls;return new U(r,d,this.nextLocalFileId(),{type:"uploaded",fileId:g,fileUrls:u})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const i=this.props.element.maxUploadSizeMb;return re(i,F.Megabyte,F.Byte)}get status(){const i=t=>t.status.type==="uploading";return this.state.files.some(i)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const i=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:l}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,i,{fromUi:!1},l)}createWidgetValue(){const i=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:l,status:n}=t,{fileId:a,fileUrls:r}=n;return new K({fileId:a,fileUrls:r,name:s,size:l})});return new Q({uploadedFileInfo:i})}render(){const{files:i}=this.state,{element:t,disabled:s,widgetMgr:l,width:n}=this.props,a=t.type;this.formClearHelper.manageFormClearListener(l,t.formId,this.onFormCleared);const r=i.slice().reverse();return o.jsxs(ye,{className:"stFileUploader","data-testid":"stFileUploader",width:n,children:[o.jsx(Y,{label:t.label,disabled:s,labelVisibility:J(t.labelVisibility?.value),children:t.help&&o.jsx(Z,{children:o.jsx(ee,{content:t.help,placement:te.TOP_RIGHT})})}),o.jsx(ve,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:a,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:s,acceptDirectory:!!t.acceptDirectory}),r.length>0&&o.jsx(Te,{items:r,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0,disabled:s})]})}nextLocalFileId(){return this.localFileIdCounter++}}const Xe=_(c.memo(Ae));export{Xe as default};
1
+ import{r as c,E as y,_ as S,s as p,aE as $,j as o,an as f,c as x,d as X,B as w,at as O,bi as _,aV as q,bq as G,k as h,a8 as m,bj as K,bk as Q,W as Y,l as J,Q as Z,T as ee,P as te}from"./index-BwsrXI9O.js";import{F as se}from"./FormClearHelper-DGQP9oxJ.js";import{g as v,F,D as ie,b as le,I as oe,C as ne,a as ae,s as re}from"./FileHelper-tNTMbDMm.js";import{P as de,S as ce}from"./ProgressBar-C-iICo4w.js";import{u as pe}from"./Hooks-Bo61ucn1.js";import{U}from"./UploadFileInfo-C-jY39rj.js";var z=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});z.displayName="ChevronLeft";var I=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});I.displayName="ChevronRight";var C=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});C.displayName="CloudUpload";var j=c.forwardRef(function(e,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(y,S({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:i}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});j.displayName="Error";const M=p("section",{target:"e1b2p2ww17"})(({isDisabled:e,theme:i})=>({display:"flex",gap:i.spacing.lg,alignItems:"center",padding:i.spacing.lg,backgroundColor:i.colors.secondaryBg,borderRadius:i.radii.default,border:i.colors.widgetBorderColor?`${i.sizes.borderWidth} solid ${i.colors.widgetBorderColor}`:void 0,height:i.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${i.colors.primary}`},cursor:e?"not-allowed":"pointer"}),""),ge=p("div",{target:"e1b2p2ww16"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"}),""),B=p("span",{target:"e1b2p2ww15"})(({theme:e})=>({color:e.colors.darkenedBgMix100}),""),V=p("span",{target:"e1b2p2ww14"})(({theme:e,disabled:i})=>({color:i?e.colors.fadedText40:e.colors.bodyText}),""),ue=p("span",{target:"e1b2p2ww13"})(({theme:e,disabled:i})=>({fontSize:e.fontSizes.sm,color:i?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"}),""),he=p("div",{target:"e1b2p2ww12"})({name:"1s8jot1",styles:"display:flex;flex-direction:column;min-width:0;max-width:100%"}),fe=p("span",{target:"e1b2p2ww11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),D=p("div",{target:"e1b2p2ww10"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg}),""),me=p("ul",{target:"e1b2p2ww9"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none}),""),E=p("li",{target:"e1b2p2ww8"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none}),""),L=p("div",{target:"e1b2p2ww7"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"}),""),P=p("div",{target:"e1b2p2ww6"})(({theme:e,disabled:i})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?e.colors.fadedText40:e.colors.bodyText}),""),T=p("div",{target:"e1b2p2ww5"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS}),""),xe=p("span",{target:"e1b2p2ww4"})(({theme:e})=>({marginRight:e.spacing.twoXS}),""),we=p("div",{target:"e1b2p2ww3"})(({theme:e,disabled:i})=>({display:"flex",padding:e.spacing.twoXS,color:i?e.colors.fadedText40:e.colors.darkenedBgMix100}),""),A=p("small",{target:"e1b2p2ww2"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"}),""),W=p("span",{target:"e1b2p2ww1"})({name:"0",styles:""}),Fe=e=>({[M]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[B]:{display:"none"},[V]:{marginBottom:e.spacing.twoXS},[D]:{paddingRight:e.spacing.lg},[T]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[P]:{width:e.sizes.full},[L]:{flexDirection:"column"},[A]:{height:"auto",whiteSpace:"initial"},[W]:{display:"none"},[E]:{margin:e.spacing.none,padding:e.spacing.none}}),ye=p("div",{target:"e1b2p2ww0"})(({theme:e,width:i})=>{if(i<$("23rem"))return Fe(e)},""),Se=({multiple:e,acceptedExtensions:i,maxSizeBytes:t,acceptDirectory:s=!1,disabled:l})=>{const n=()=>s?"directories":e?"files":"file",a=()=>i.length?` • ${i.map(d=>d.replace(/^\./,"").toUpperCase()).join(", ")}`:null,r=()=>`Limit ${v(t,F.Byte,0)} per file`;return o.jsxs(ge,{"data-testid":"stFileUploaderDropzoneInstructions",children:[o.jsx(B,{children:o.jsx(f,{content:C,size:"threeXL"})}),o.jsxs(he,{children:[o.jsxs(V,{disabled:l,children:["Drag and drop ",n()," here"]}),o.jsxs(ue,{disabled:l,children:[r(),a()]})]})]})},Ue=c.memo(Se),be=({onDrop:e,multiple:i,acceptedExtensions:t,maxSizeBytes:s,disabled:l,label:n,acceptDirectory:a=!1})=>o.jsx(ie,{onDrop:e,multiple:i,accept:le(t),maxSize:s,disabled:l,useFsAccessApi:!1,children:({getRootProps:r,getInputProps:d})=>{const g=d({multiple:i||!!a});return o.jsxs(M,{...r(),"data-testid":"stFileUploaderDropzone",isDisabled:l,"aria-label":n,"aria-disabled":l,children:[o.jsx("input",{"data-testid":"stFileUploaderDropzoneInput",...g,...a&&{webkitdirectory:""}}),o.jsx(Ue,{multiple:i,acceptedExtensions:t,maxSizeBytes:s,acceptDirectory:a,disabled:l}),o.jsx(fe,{children:o.jsx(x,{kind:w.SECONDARY,disabled:l,size:X.SMALL,children:a?"Browse directories":"Browse files"})})]})}}),ve=c.memo(be),N=p("small",{target:"e1bju1570"})(({kind:e,disabled:i,theme:t})=>{const{redTextColor:s,fadedText60:l,fadedText40:n}=t.colors;let a=l;return i&&(a=n),e==="danger"&&(a=s),{color:a,fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.tight}},""),ze=({fileInfo:e,disabled:i})=>e.status.type==="uploading"?o.jsx(de,{value:e.status.progress,size:ce.SMALL}):e.status.type==="error"?o.jsxs(A,{children:[o.jsx(xe,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),o.jsx(W,{children:o.jsx(f,{content:j,size:"lg"})})]}):e.status.type==="uploaded"?o.jsx(N,{disabled:i,children:v(e.size,F.Byte)}):null,Ie=({fileInfo:e,onDelete:i,disabled:t})=>o.jsxs(T,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[o.jsx(we,{disabled:t,children:o.jsx(f,{content:oe,size:"twoXL"})}),o.jsxs(L,{className:"stFileUploaderFileData",children:[o.jsx(P,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:t,children:e.name}),o.jsx(ze,{fileInfo:e,disabled:t})]}),o.jsx("div",{"data-testid":"stFileUploaderDeleteBtn",children:o.jsx(x,{onClick:()=>i(e.id),kind:w.MINIMAL,disabled:t,"aria-label":`Remove ${e.name}`,children:o.jsx(f,{content:ne,size:"lg"})})})]}),Ce=c.memo(Ie),je=p("div",{target:"e1nlpozb1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS}),""),Me=p("div",{target:"e1nlpozb0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40}),""),Be=({currentPage:e,totalPages:i,onNext:t,onPrevious:s})=>o.jsxs(je,{"data-testid":"stFileUploaderPagination",children:[o.jsx(N,{children:`Showing page ${e} of ${i}`}),o.jsxs(Me,{children:[o.jsx(x,{onClick:s,kind:w.MINIMAL,children:o.jsx(f,{content:z,size:"xl"})}),o.jsx(x,{onClick:t,kind:w.MINIMAL,children:o.jsx(f,{content:I,size:"xl"})})]})]}),Ve=c.memo(Be),b=(e,i)=>Math.ceil(e.length/i),De=e=>O(({pageSize:t,items:s,resetOnAdd:l,...n})=>{const[a,r]=c.useState(0),[d,g]=c.useState(()=>b(s,t)),u=pe(s);c.useEffect(()=>{u&&u.length!==s.length&&g(b(s,t)),u&&u.length<s.length?l&&r(0):a+1>=d&&r(d-1)},[s,a,t,u,l,d]);const R=()=>{r(Math.min(a+1,d-1))},H=()=>{r(Math.max(0,a-1))},k=s.slice(a*t,a*t+t);return o.jsxs(o.Fragment,{children:[o.jsx(e,{items:k,...n}),s.length>t?o.jsx(Ve,{pageSize:t,totalPages:d,currentPage:a+1,onNext:R,onPrevious:H}):null]})},e),Ee=({items:e,onDelete:i,disabled:t})=>o.jsx(me,{children:e.map(s=>o.jsx(E,{children:o.jsx(Ce,{fileInfo:s,onDelete:i,disabled:t})},s.id))}),Le=De(Ee),Pe=e=>o.jsx(D,{children:o.jsx(Le,{...e})}),Te=c.memo(Pe);class Ae extends c.PureComponent{constructor(i){super(i),this.formClearHelper=new se,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:l,fragmentId:n}=this.props,a=l.getFileUploaderStateValue(s);q(t,a)||l.setFileUploaderStateValue(s,t,{fromUi:!0},n)},this.isFileTypeAllowed=t=>{const{element:s}=this.props,{type:l}=s;if(!l||l.length===0)return!0;const n=t.name.toLowerCase();return l.some(a=>n.endsWith(a.toLowerCase()))},this.filterDirectoryFiles=t=>{const s=[],l=[];return t.forEach(n=>{this.isFileTypeAllowed(n)?s.push(n):l.push({file:n,errors:[{code:"file-invalid-type",message:`${n.type} files are not allowed.`}]})}),{accepted:s,rejected:l}},this.dropHandler=(t,s)=>{const{element:l}=this.props,{multipleFiles:n}=l;if(!!l.acceptDirectory&&t.length>0){const{accepted:r,rejected:d}=this.filterDirectoryFiles(t);t=r,s=[...s,...d]}if(!n&&t.length===0&&s.length>1){const r=s.findIndex(d=>d.errors.length===1&&d.errors[0].code==="too-many-files");r>=0&&(t.push(s[r].file),s.splice(r,1))}if(this.props.uploadClient.fetchFileURLs(t).then(r=>{if(!n&&t.length>0){const d=this.state.files.find(g=>g.status.type!=="error");d&&(this.forceUpdatingStatus=!0,this.deleteFile(d.id),this.forceUpdatingStatus=!1)}G(r,t).forEach(([d,g])=>{this.uploadFile(d,g)})}).catch(r=>{this.addFiles(t.map(d=>new U(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:r})))}),s.length>0){const r=s.map(d=>ae(d,this.nextLocalFileId(),this.maxUploadSizeInBytes));this.addFiles(r)}},this.uploadFile=(t,s)=>{const l=new AbortController,n=s.webkitRelativePath||s.name,a=new U(n,s.size,this.nextLocalFileId(),{type:"uploading",abortController:l,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,r=>this.onUploadProgress(r,a.id),l.signal).then(()=>this.onUploadComplete(a.id,t)).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:r?r.toString():"Unknown error"}))})},this.onUploadComplete=(t,s)=>{const l=this.getFile(t);h(l)||l.status.type!=="uploading"||this.updateFile(l.id,l.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.deleteFile=t=>{if(this.props.disabled)return;const s=this.getFile(t);h(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,t]}))})},this.addFiles=t=>{m.flushSync(()=>{this.setState(s=>({files:[...s.files,...t]}))})},this.removeFile=t=>{m.flushSync(()=>{this.setState(s=>({files:s.files.filter(l=>l.id!==t)}))})},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{m.flushSync(()=>{this.setState(l=>({files:l.files.map(n=>n.id===t?s:n)}))})},this.onUploadProgress=(t,s)=>{const l=this.getFile(s);if(h(l)||l.status.type!=="uploading")return;const n=Math.round(t.loaded*100/t.total);l.status.progress!==n&&this.updateFile(s,l.setStatus({type:"uploading",abortController:l.status.abortController,progress:n}))},this.onFormCleared=()=>{m.flushSync(()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(h(t))return;const{widgetMgr:s,element:l,fragmentId:n}=this.props;s.setFileUploaderStateValue(l,t,{fromUi:!0},n)})})},this.state=this.initialValue}get initialValue(){const i={files:[]},{widgetMgr:t,element:s}=this.props,l=t.getFileUploaderStateValue(s);if(h(l))return i;const{uploadedFileInfo:n}=l;return h(n)||n.length===0?i:{files:n.map(a=>{const r=a.name,d=a.size,g=a.fileId,u=a.fileUrls;return new U(r,d,this.nextLocalFileId(),{type:"uploaded",fileId:g,fileUrls:u})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const i=this.props.element.maxUploadSizeMb;return re(i,F.Megabyte,F.Byte)}get status(){const i=t=>t.status.type==="uploading";return this.state.files.some(i)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const i=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:l}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,i,{fromUi:!1},l)}createWidgetValue(){const i=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:l,status:n}=t,{fileId:a,fileUrls:r}=n;return new K({fileId:a,fileUrls:r,name:s,size:l})});return new Q({uploadedFileInfo:i})}render(){const{files:i}=this.state,{element:t,disabled:s,widgetMgr:l,width:n}=this.props,a=t.type;this.formClearHelper.manageFormClearListener(l,t.formId,this.onFormCleared);const r=i.slice().reverse();return o.jsxs(ye,{className:"stFileUploader","data-testid":"stFileUploader",width:n,children:[o.jsx(Y,{label:t.label,disabled:s,labelVisibility:J(t.labelVisibility?.value),children:t.help&&o.jsx(Z,{children:o.jsx(ee,{content:t.help,placement:te.TOP_RIGHT})})}),o.jsx(ve,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:a,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:s,acceptDirectory:!!t.acceptDirectory}),r.length>0&&o.jsx(Te,{items:r,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0,disabled:s})]})}nextLocalFileId(){return this.localFileIdCounter++}}const Xe=_(c.memo(Ae));export{Xe as default};
@@ -1 +1 @@
1
- import{s as p,r as i,v as y,w as T,j as f,x}from"./index-wnKDraWU.js";const h=p("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=p("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),S=x.getLogger("Audio");function j({element:r,endpoints:a,elementMgr:d}){const o=i.useRef(null),{startTime:n,endTime:s,loop:u,autoplay:E}=r,m=i.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);i.useEffect(()=>{o.current&&(o.current.currentTime=n)},[n]),i.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const l=()=>{s>0&&e.currentTime>=s&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",l),()=>{e&&s>0&&e.removeEventListener("timeupdate",l)}},[s,u,n]),i.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const c=y(r.url),A=T(c),v=a.buildMediaURL(c),g=e=>{const t=e.currentTarget.src;S.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return f.jsx(h,{children:f.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:E&&!m,src:v,onError:g,crossOrigin:A})})}const C=i.memo(j);export{C as default};
1
+ import{s as p,r as i,v as y,w as T,j as f,x}from"./index-BwsrXI9O.js";const h=p("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=p("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),S=x.getLogger("Audio");function j({element:r,endpoints:a,elementMgr:d}){const o=i.useRef(null),{startTime:n,endTime:s,loop:u,autoplay:E}=r,m=i.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);i.useEffect(()=>{o.current&&(o.current.currentTime=n)},[n]),i.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const l=()=>{s>0&&e.currentTime>=s&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",l),()=>{e&&s>0&&e.removeEventListener("timeupdate",l)}},[s,u,n]),i.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const c=y(r.url),A=T(c),v=a.buildMediaURL(c),g=e=>{const t=e.currentTarget.src;S.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return f.jsx(h,{children:f.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:E&&!m,src:v,onError:g,crossOrigin:A})})}const C=i.memo(j);export{C as default};
@@ -1,3 +1,3 @@
1
- import{bs as ce,by as pe,bz as fe,bA as ge,bB as ye,bC as me,ao as ve,ac as be,aG as he,bD as Se,ap as Oe,bE as Ce,b1 as K,bF as Ie,s as ae,bG as Pe,bH as $e,r as V,M as _e,k as J,u as Te,j,W as Ee,l as Re,Q as we,T as De,P as xe,Y as Ae}from"./index-wnKDraWU.js";import{u as We}from"./useBasicWidgetState-raTjAqZP.js";import{T as Be}from"./timepicker-DjzHzJAt.js";import"./FormClearHelper-CaLJK07N.js";import"./inherits-xHSaJdUZ.js";import"./createSuper-CoIMxZYP.js";var Me=ce.Consumer;const Ne=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Me,ThemeProvider:pe,createThemedStyled:fe,createThemedUseStyletron:ge,createThemedWithStyle:ye,expandBorderStyles:me,hexToRgb:ve,styled:be,useStyletron:he,withStyle:Se,withWrapper:Oe},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Ce(Ne);var w={},Q;function Le(){if(Q)return w;Q=1,Object.defineProperty(w,"__esModule",{value:!0}),w.STATE_CHANGE_TYPE=w.SIZE=w.ENHANCER_POSITION=w.CUSTOM_INPUT_TYPE=w.ADJOINED=void 0;var f={change:"change"};w.STATE_CHANGE_TYPE=f;var c={textarea:"textarea"};w.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};w.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};w.SIZE=m;var b={start:"start",end:"end"};return w.ENHANCER_POSITION=b,w}var Z={},A={},k={},X;function Fe(){if(X)return k;X=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=c;function f(m){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},f(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var g in v)f(v[g])!==void 0&&(y=v[g],h(y)?m[g]=c(m[g]||Array.isArray(y)&&[]||{},y):m[g]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return k}var ee;function le(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=E,A.getOverrideProps=_,A.getOverrides=L,A.mergeConfigurationOverrides=N,A.mergeOverride=x,A.mergeOverrides=M,A.toObjectOverride=D,A.useOverrides=F;var f=v(K()),c=Ie(),h=m(Fe());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function g(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){$(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function $(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(i)}function E(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function _(i){return i&&P(i)==="object"?P(i.props)==="object"?g(g({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function D(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=E(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=f.forwardRef(function(a,l){var n=i.props(a),e=_(g(g({},i),{},{props:n}));return f.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=_(i);return[u,r]}function M(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(D(i[a]),D(t[a])),r},{})}function x(i,t){var u=g(g({},i),t);return i.props&&t.props&&(u.props=N(i.props,t.props)),i.style&&t.style&&(u.style=N(i.style,t.style)),u}function N(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return f.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var q={},z={},te;function je(){if(te)return z;te=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Svg=void 0,z.getSvgStyles=c;var f=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var g="currentColor";return y&&(b.colors[y]?g=b.colors[y]:g=y),{display:"inline-block",fill:g,color:g,height:S,width:S}}var h=(0,f.styled)("svg",c);return z.Svg=h,h.displayName="Svg",h.displayName="Svg",z}var H={},re;function ze(){if(re)return H;re=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=f;function f(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return H}var ne;function Ze(){if(ne)return q;ne=1;function f(r){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f(r)}Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var c=g(K()),h=le(),m=je(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function g(r,a){if(r&&r.__esModule)return r;if(r===null||f(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function $(){return $=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},$.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function E(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){_(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function _(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function D(r,a){return F(r)||N(r,a)||M(r,a)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bs as ce,by as pe,bz as fe,bA as ge,bB as ye,bC as me,ao as ve,ac as be,aG as he,bD as Se,ap as Oe,bE as Ce,b1 as K,bF as Ie,s as ae,bG as Pe,bH as $e,r as V,M as _e,k as J,u as Te,j,W as Ee,l as Re,Q as we,T as De,P as xe,Y as Ae}from"./index-BwsrXI9O.js";import{u as We}from"./useBasicWidgetState-CQoPeUHV.js";import{T as Be}from"./timepicker-CBaJIVEG.js";import"./FormClearHelper-DGQP9oxJ.js";import"./inherits-DgEBZpYa.js";import"./createSuper-vJD5mbw5.js";var Me=ce.Consumer;const Ne=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Me,ThemeProvider:pe,createThemedStyled:fe,createThemedUseStyletron:ge,createThemedWithStyle:ye,expandBorderStyles:me,hexToRgb:ve,styled:be,useStyletron:he,withStyle:Se,withWrapper:Oe},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Ce(Ne);var w={},Q;function Le(){if(Q)return w;Q=1,Object.defineProperty(w,"__esModule",{value:!0}),w.STATE_CHANGE_TYPE=w.SIZE=w.ENHANCER_POSITION=w.CUSTOM_INPUT_TYPE=w.ADJOINED=void 0;var f={change:"change"};w.STATE_CHANGE_TYPE=f;var c={textarea:"textarea"};w.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};w.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};w.SIZE=m;var b={start:"start",end:"end"};return w.ENHANCER_POSITION=b,w}var Z={},A={},k={},X;function Fe(){if(X)return k;X=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=c;function f(m){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},f(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var g in v)f(v[g])!==void 0&&(y=v[g],h(y)?m[g]=c(m[g]||Array.isArray(y)&&[]||{},y):m[g]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return k}var ee;function le(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=E,A.getOverrideProps=_,A.getOverrides=L,A.mergeConfigurationOverrides=N,A.mergeOverride=x,A.mergeOverrides=M,A.toObjectOverride=D,A.useOverrides=F;var f=v(K()),c=Ie(),h=m(Fe());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function g(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){$(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function $(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(i)}function E(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function _(i){return i&&P(i)==="object"?P(i.props)==="object"?g(g({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function D(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=E(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=f.forwardRef(function(a,l){var n=i.props(a),e=_(g(g({},i),{},{props:n}));return f.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=_(i);return[u,r]}function M(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(D(i[a]),D(t[a])),r},{})}function x(i,t){var u=g(g({},i),t);return i.props&&t.props&&(u.props=N(i.props,t.props)),i.style&&t.style&&(u.style=N(i.style,t.style)),u}function N(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return f.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var q={},z={},te;function je(){if(te)return z;te=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Svg=void 0,z.getSvgStyles=c;var f=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var g="currentColor";return y&&(b.colors[y]?g=b.colors[y]:g=y),{display:"inline-block",fill:g,color:g,height:S,width:S}}var h=(0,f.styled)("svg",c);return z.Svg=h,h.displayName="Svg",h.displayName="Svg",z}var H={},re;function ze(){if(re)return H;re=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=f;function f(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return H}var ne;function Ze(){if(ne)return q;ne=1;function f(r){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f(r)}Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var c=g(K()),h=le(),m=je(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function g(r,a){if(r&&r.__esModule)return r;if(r===null||f(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function $(){return $=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},$.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function E(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){_(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function _(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function D(r,a){return F(r)||N(r,a)||M(r,a)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(r,a){if(r){if(typeof r=="string")return x(r,a);var l=Object.prototype.toString.call(r).slice(8,-1);if(l==="Object"&&r.constructor&&(l=r.constructor.name),l==="Map"||l==="Set")return Array.from(r);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return x(r,a)}}function x(r,a){(a==null||a>r.length)&&(a=r.length);for(var l=0,n=new Array(a);l<a;l++)n[l]=r[l];return n}function N(r,a){var l=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(l!=null){var n=[],e=!0,o=!1,p,d;try{for(l=l.call(r);!(e=(p=l.next()).done)&&(n.push(p.value),!(a&&n.length===a));e=!0);}catch(O){o=!0,d=O}finally{try{!e&&l.return!=null&&l.return()}finally{if(o)throw d}}return n}}function F(r){if(Array.isArray(r))return r}function i(r,a){if(r==null)return{};var l=t(r,a),n,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(e=0;e<o.length;e++)n=o[e],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(l[n]=r[n])}return l}function t(r,a){if(r==null)return{};var l={},n=Object.keys(r),e,o;for(o=0;o<n.length;o++)e=n[o],!(a.indexOf(e)>=0)&&(l[e]=r[e]);return l}var u=function(a,l){var n=a.children,e=a.title,o=a.size,p=a.color,d=a.overrides,O=d===void 0?{}:d,I=i(a,v),R=(0,h.getOverrides)(O.Svg,m.Svg),W=D(R,2),T=W[0],B=W[1],U=T.__STYLETRON__?E(E({title:e,$color:p,$size:o},I),B):E(E({title:e,color:p,size:o},(0,b.default)(I)),(0,b.default)(B));return c.createElement(T,$({"data-baseweb":"icon",ref:l},U),e?c.createElement("title",null,e):null,n)},s=c.forwardRef(u);return q.default=s,q}var oe;function qe(){if(oe)return Z;oe=1;function f(t){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},f(t)}Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=void 0;var c=g(K()),h=Y,m=le(),b=y(Ze()),v=["title","size","color","overrides"];function y(t){return t&&t.__esModule?t:{default:t}}function S(t){if(typeof WeakMap!="function")return null;var u=new WeakMap,s=new WeakMap;return(S=function(a){return a?s:u})(t)}function g(t,u){if(t&&t.__esModule)return t;if(t===null||f(t)!=="object"&&typeof t!="function")return{default:t};var s=S(u);if(s&&s.has(t))return s.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(l!=="default"&&Object.prototype.hasOwnProperty.call(t,l)){var n=a?Object.getOwnPropertyDescriptor(t,l):null;n&&(n.get||n.set)?Object.defineProperty(r,l,n):r[l]=t[l]}return r.default=t,s&&s.set(t,r),r}function $(){return $=Object.assign?Object.assign.bind():function(t){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},$.apply(this,arguments)}function P(t,u){if(t==null)return{};var s=E(t,u),r,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)r=l[a],!(u.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function E(t,u){if(t==null)return{};var s={},r=Object.keys(t),a,l;for(l=0;l<r.length;l++)a=r[l],!(u.indexOf(a)>=0)&&(s[a]=t[a]);return s}function _(t,u){return N(t)||x(t,u)||L(t,u)||D()}function D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(t,u){if(t){if(typeof t=="string")return M(t,u);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return M(t,u)}}function M(t,u){(u==null||u>t.length)&&(u=t.length);for(var s=0,r=new Array(u);s<u;s++)r[s]=t[s];return r}function x(t,u){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var r=[],a=!0,l=!1,n,e;try{for(s=s.call(t);!(a=(n=s.next()).done)&&(r.push(n.value),!(u&&r.length===u));a=!0);}catch(o){l=!0,e=o}finally{try{!a&&s.return!=null&&s.return()}finally{if(l)throw e}}return r}}function N(t){if(Array.isArray(t))return t}function F(t,u){var s=(0,h.useStyletron)(),r=_(s,2),a=r[1],l=t.title,n=l===void 0?"Delete Alt":l,e=t.size,o=t.color,p=t.overrides,d=p===void 0?{}:p,O=P(t,v),I=(0,m.mergeOverride)({component:a.icons&&a.icons.DeleteAlt?a.icons.DeleteAlt:null},d&&d.Svg?(0,m.toObjectOverride)(d.Svg):{});return c.createElement(b.default,$({viewBox:"0 0 24 24",ref:u,title:n,size:e,color:o,overrides:{Svg:I}},O),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var i=c.forwardRef(F);return Z.default=i,Z}var ie;function ke(){if(ie)return C;ie=1,Object.defineProperty(C,"__esModule",{value:!0}),C.getRootStyles=C.getInputStyles=C.getInputContainerStyles=C.StyledMaskToggleButton=C.StyledClearIconContainer=C.StyledClearIcon=C.Root=C.InputEnhancer=C.InputContainer=C.Input=void 0;var f=Y,c=Le(),h=m(qe());function m(n){return n&&n.__esModule?n:{default:n}}function b(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);e&&(p=p.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,p)}return o}function v(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?b(Object(o),!0).forEach(function(p){y(n,p,o[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach(function(p){Object.defineProperty(n,p,Object.getOwnPropertyDescriptor(o,p))})}return n}function y(n,e,o){return e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}var S=(0,f.styled)("button",function(n){var e,o=n.$theme,p=n.$size,d=n.$isFocusVisible,O=(e={},y(e,c.SIZE.mini,o.sizing.scale400),y(e,c.SIZE.compact,o.sizing.scale400),y(e,c.SIZE.default,o.sizing.scale300),y(e,c.SIZE.large,o.sizing.scale200),e)[p];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:O,paddingRight:O,outline:d?"solid 3px ".concat(o.colors.accent):"none",color:o.colors.contentPrimary}});C.StyledMaskToggleButton=S,S.displayName="StyledMaskToggleButton",S.displayName="StyledMaskToggleButton";var g=(0,f.styled)("div",function(n){var e,o=n.$alignTop,p=o===void 0?!1:o,d=n.$size,O=n.$theme,I=(e={},y(e,c.SIZE.mini,O.sizing.scale200),y(e,c.SIZE.compact,O.sizing.scale200),y(e,c.SIZE.default,O.sizing.scale100),y(e,c.SIZE.large,O.sizing.scale0),e)[d];return{display:"flex",alignItems:p?"flex-start":"center",paddingLeft:I,paddingRight:I,paddingTop:p?O.sizing.scale500:"0px",color:O.colors.contentPrimary}});C.StyledClearIconContainer=g,g.displayName="StyledClearIconContainer",g.displayName="StyledClearIconContainer";var $=(0,f.styled)(h.default,function(n){var e=n.$theme,o=n.$isFocusVisible;return{cursor:"pointer",outline:o?"solid 3px ".concat(e.colors.accent):"none"}});C.StyledClearIcon=$,$.displayName="StyledClearIcon",$.displayName="StyledClearIcon";function P(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingTop:e.scale100,paddingBottom:e.scale100,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.compact,{paddingTop:e.scale200,paddingBottom:e.scale200,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.default,{paddingTop:e.scale400,paddingBottom:e.scale400,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.large,{paddingTop:e.scale550,paddingBottom:e.scale550,paddingLeft:e.scale550,paddingRight:e.scale550}),o)[n]}function E(n,e,o,p,d){var O=n===c.ADJOINED.both||n===c.ADJOINED.left&&p!=="rtl"||n===c.ADJOINED.right&&p==="rtl"||d&&p==="rtl",I=n===c.ADJOINED.both||n===c.ADJOINED.right&&p!=="rtl"||n===c.ADJOINED.left&&p==="rtl"||d&&p!=="rtl";return{paddingLeft:O?o.scale550:"0px",paddingRight:I?o.scale550:"0px"}}function _(n,e){var o;return(o={},y(o,c.SIZE.mini,e.font100),y(o,c.SIZE.compact,e.font200),y(o,c.SIZE.default,e.font300),y(o,c.SIZE.large,e.font400),o)[n]}function D(n,e,o){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4?arguments[4]:void 0;return n?{borderLeftColor:d.inputFillDisabled,borderRightColor:d.inputFillDisabled,borderTopColor:d.inputFillDisabled,borderBottomColor:d.inputFillDisabled,backgroundColor:d.inputFillDisabled}:e?{borderLeftColor:d.borderSelected,borderRightColor:d.borderSelected,borderTopColor:d.borderSelected,borderBottomColor:d.borderSelected,backgroundColor:d.inputFillActive}:o?{borderLeftColor:d.inputBorderError,borderRightColor:d.inputBorderError,borderTopColor:d.inputBorderError,borderBottomColor:d.inputBorderError,backgroundColor:d.inputFillError}:p?{borderLeftColor:d.inputBorderPositive,borderRightColor:d.inputBorderPositive,borderTopColor:d.inputBorderPositive,borderBottomColor:d.inputBorderPositive,backgroundColor:d.inputFillPositive}:{borderLeftColor:d.inputBorder,borderRightColor:d.inputBorder,borderTopColor:d.inputBorder,borderBottomColor:d.inputBorder,backgroundColor:d.inputFill}}function L(n,e){var o=e.inputBorderRadius;return n===c.SIZE.mini&&(o=e.inputBorderRadiusMini),{borderTopLeftRadius:o,borderBottomLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o}}var M=function(e){var o=e.$isFocused,p=e.$adjoined,d=e.$error,O=e.$disabled,I=e.$positive,R=e.$size,W=e.$theme,T=e.$theme,B=T.borders,U=T.colors,ue=T.sizing,se=T.typography,G=T.animation,de=e.$hasIconTrailing;return v(v(v(v({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:G.timing200,transitionTimingFunction:G.easeOutCurve},L(R,B)),_(R,se)),D(O,o,d,I,U)),E(p,R,ue,W.direction,de))};C.getRootStyles=M;var x=(0,f.styled)("div",M);C.Root=x,x.displayName="Root",x.displayName="Root";function N(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.compact,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.default,{paddingRight:e.scale300,paddingLeft:e.scale300}),y(o,c.SIZE.large,{paddingRight:e.scale200,paddingLeft:e.scale200}),o)[n]}function F(n,e,o,p,d){return n?{color:d.inputEnhancerTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var i=(0,f.styled)("div",function(n){var e=n.$size,o=n.$disabled,p=n.$isFocused,d=n.$error,O=n.$positive,I=n.$theme,R=I.colors,W=I.sizing,T=I.typography,B=I.animation;return v(v(v({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:B.timing200,transitionTimingFunction:B.easeOutCurve},_(e,T)),N(e,W)),F(o,p,d,O,R))});C.InputEnhancer=i,i.displayName="InputEnhancer",i.displayName="InputEnhancer";function t(n,e,o,p,d){return n?{color:d.inputTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var u=function(e){var o=e.$isFocused,p=e.$error,d=e.$disabled,O=e.$positive,I=e.$size,R=e.$theme,W=R.colors,T=R.typography,B=R.animation;return v(v({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:B.timing200,transitionTimingFunction:B.easeOutCurve},_(I,T)),t(d,o,p,O,W))};C.getInputContainerStyles=u;var s=(0,f.styled)("div",u);C.InputContainer=s,s.displayName="InputContainer",s.displayName="InputContainer";function r(n,e,o,p){return n?{color:p.inputTextDisabled,"-webkit-text-fill-color":p.inputTextDisabled,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholderDisabled}}:{color:p.contentPrimary,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholder}}}var a=function(e){var o=e.$disabled,p=e.$isFocused,d=e.$error,O=e.$size,I=e.$theme,R=I.colors,W=I.sizing,T=I.typography;return v(v(v({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:o?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},_(O,T)),P(O,W)),r(o,p,d,R))};C.getInputStyles=a;var l=(0,f.styled)("input",a);return C.Input=l,l.displayName="Input",l.displayName="Input",C}var He=ke();const Ve=ae("div",{target:"e1ipygm11"})({name:"1ucqwki",styles:"position:absolute;top:50%;right:2.05em"}),Ue=ae($e,{shouldForwardProp:Pe,target:"e1ipygm10"})(({theme:f,$isHighlighted:c})=>({paddingRight:f.spacing.lg,paddingLeft:f.spacing.lg,paddingTop:f.spacing.sm,paddingBottom:f.spacing.sm,background:c?f.colors.darkenedBgMix15:void 0,"&:hover, &:active, &:focus-visible":{background:f.colors.darkenedBgMix15}}),"");function Je({disabled:f,element:c,widgetMgr:h,fragmentId:m}){const[b,v]=We({getStateFromWidgetMgr:Ke,getDefaultStateFromProto:Ye,getCurrStateFromProto:Ge,updateWidgetMgrState:Qe,element:c,widgetMgr:h,fragmentId:m}),y=V.useContext(_e),S=J(c.default)&&!f,g=Te(),$={Select:{props:{disabled:f,overrides:{ControlContainer:{style:{height:g.sizes.minElementHeight,borderLeftWidth:g.sizes.borderWidth,borderRightWidth:g.sizes.borderWidth,borderTopWidth:g.sizes.borderWidth,borderBottomWidth:g.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:g.spacing.sm})},ValueContainer:{style:()=>({lineHeight:g.lineHeights.inputWidget,paddingRight:g.spacing.sm,paddingLeft:g.spacing.md,paddingBottom:g.spacing.sm,paddingTop:g.spacing.sm})},SingleValue:{style:{fontWeight:g.fontWeights.normal},props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:g.spacing.none,paddingBottom:g.spacing.none,boxShadow:"none",maxHeight:g.sizes.maxDropdownHeight})},DropdownListItem:{component:Ue},Popover:{props:{ignoreBoundary:y,overrides:{Body:{style:()=>({marginTop:g.spacing.px})}}}},Placeholder:{style:()=>({color:g.colors.fadedText60})},SelectArrow:{component:Ae,props:{overrides:{Svg:{style:()=>({width:g.iconSizes.xl,height:g.iconSizes.xl})}}}}}}}},P=V.useCallback(_=>{const D=_===null?null:Xe(_);v({value:D,fromUi:!0})},[v]),E=V.useCallback(()=>{P(null)},[P]);return j.jsxs("div",{className:"stTimeInput","data-testid":"stTimeInput",children:[j.jsx(Ee,{label:c.label,disabled:f,labelVisibility:Re(c.labelVisibility?.value),children:c.help&&j.jsx(we,{children:j.jsx(De,{content:c.help,placement:xe.TOP_RIGHT})})}),j.jsx(Be,{format:"24",step:c.step?Number(c.step):900,value:J(b)?void 0:et(b),onChange:P,overrides:$,nullable:S,creatable:!0,"aria-label":c.label}),S&&!J(b)&&j.jsx(Ve,{onClick:E,"data-testid":"stTimeInputClearButton",children:j.jsx(He.StyledClearIcon,{overrides:{Svg:{style:{color:g.colors.grayTextColor,padding:g.spacing.threeXS,height:g.sizes.clearIconSize,width:g.sizes.clearIconSize,":hover":{fill:g.colors.bodyText}}}},$isFocusVisible:!1})})]})}function Ke(f,c){return f.getStringValue(c)??null}function Ye(f){return f.default??null}function Ge(f){return f.value??null}function Qe(f,c,h,m){c.setStringValue(f,h.value,{fromUi:h.fromUi},m)}function Xe(f){const c=f.getHours().toString().padStart(2,"0"),h=f.getMinutes().toString().padStart(2,"0");return`${c}:${h}`}function et(f){if(f===null)return null;const[c,h]=f.split(":").map(Number),m=new Date;return m.setHours(c),m.setMinutes(h),m}const lt=V.memo(Je);export{lt as default};
@@ -1,2 +1,2 @@
1
- import{s as $t,r as ht,j as Ne}from"./index-wnKDraWU.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=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","search","section","select","shadow","slot","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"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=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"]),an=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"]),xe=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"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=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","mask-type","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"]),_t=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"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(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}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["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 Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(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),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=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")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&&lt(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(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,e))||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(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{s as $t,r as ht,j as Ne}from"./index-BwsrXI9O.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=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","search","section","select","shadow","slot","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"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=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"]),an=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"]),xe=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"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=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","mask-type","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"]),_t=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"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(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}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["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 Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(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),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=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")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&&lt(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(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,e))||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(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+O),v&&ce([de,Te,Ee],M=>{O=K(O,M," ")}),g&&ie?g.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),Ae=!0},n.clearConfig=function(){G=null,Ae=!1},n.isValidAttribute=function(i,e,t){G||Le({});const o=d(i),f=d(e);return st(o,f,t)},n.addHook=function(i,e){typeof e=="function"&&q(A[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Jt(A[i],e);return t===-1?void 0:Qt(A[i],t,1)[0]}return pt(A[i])},n.removeHooks=function(i){A[i]=[]},n.removeAllHooks=function(){A=At()},n}var He=Ot();const _n=$t("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Fe="data-temp-href-target";He.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(Fe,"_blank")});He.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(Fe)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(Fe))});const gn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return He.sanitize(a,n)};function An({element:a}){const{body:n}=a,s=ht.useMemo(()=>gn(n),[n]);return Ne.jsx(Ne.Fragment,{children:s&&Ne.jsx(_n,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:s}})})}const Sn=ht.memo(An);export{Sn as default};
@@ -1 +1 @@
1
- import{az as i,aA as f,aB as s,aC as u}from"./index-wnKDraWU.js";function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function l(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if(e&&(f(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}function b(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}export{a as _,y as a,b,p as c,l as d};
1
+ import{az as i,aA as f,aB as s,aC as u}from"./index-BwsrXI9O.js";function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function l(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if(e&&(f(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}function b(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}export{a as _,y as a,b,p as c,l as d};
@@ -1,2 +1,2 @@
1
- import{o as v,r as l,p as k,q as S,A as p}from"./index-wnKDraWU.js";import{R as C,I as w,g as J,B as M}from"./base-input-d4WKPeU6.js";function _(e){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{o as v,r as l,p as k,q as S,A as p}from"./index-BwsrXI9O.js";import{R as C,I as w,g as J,B as M}from"./base-input-DRJDHdAL.js";function _(e){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=(function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,B=u.EndEnhancer,F=I(u,U),T=I(o,Z),x=v(b,C),g=O(x,2),$=g[0],N=g[1],D=v(A,w),E=O(D,2),W=E[0],q=E[1],z=v(B,w),P=O(z,2),H=P[0],L=P[1],c=J(this.props,this.state);return l.createElement($,f({"data-baseweb":"input"},c,N,{$adjoined:R(a,i),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),s(a)&&l.createElement(W,f({},c,q,{$position:S.start}),typeof a=="function"?a(c):a),l.createElement(M,f({},T,{overrides:F,adjoined:R(a,i),onFocus:this.onFocus,onBlur:this.onBlur})),s(i)&&l.createElement(H,f({},c,L,{$position:S.end}),typeof i=="function"?i(c):i))}}]),r})(l.Component);d(ie,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:k.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function R(e,t){return s(e)&&s(t)?p.both:s(e)?p.left:s(t)?p.right:p.none}function s(e){return!!(e||e===0)}export{ie as I};
@@ -1 +1 @@
1
- import{c as p,e as c}from"./es6-BCBcAdQS.js";import"./index-wnKDraWU.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
1
+ import{c as p,e as c}from"./es6-Lsq1Gov6.js";import"./index-BwsrXI9O.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
@@ -1,4 +1,4 @@
1
- import{al as X,r as T}from"./index-wnKDraWU.js";import{s as Te}from"./index-B7yzG-4X.js";import"./withFullScreenWrapper-C7u7nPsK.js";import"./Toolbar-BbbydoLD.js";import"./FormClearHelper-CaLJK07N.js";import"./sprintf-DpPCfzXw.js";import"./checkbox-DUA9ewQT.js";import"./createDownloadLinkElement-ZaXNnPK4.js";import"./slicedToArray-Cuk3tbTR.js";import"./inherits-xHSaJdUZ.js";import"./createSuper-CoIMxZYP.js";import"./FileDownload.esm-DVbGfwz7.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,m=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=m?a=a+de("0",l-m):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,m=a.hasNegation,S=parseFloat("0."+(l||"0")),p=l.length<=t?"0."+l:S.toFixed(t),h=p.split("."),c=i;i&&Number(h[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var x=ye(h[1]||"",t,r),y=m?"-":"",s=n?".":"";return""+y+c+s+x}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var m=a.findIndex(function(k){return k}),S=e.slice(0,m);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var p=r.length,h=e.length,c={},x=new Array(p),y=0;y<p;y++){x[y]=-1;for(var s=0,I=h;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){x[y]=s,c[s]=!0;break}}}for(var g=n;g<p&&(x[g]===-1||!i(r[g]));)g++;var B=g===p||x[g]===-1?h:x[g];for(g=n-1;g>0&&x[g]===-1;)g--;var F=g===-1||x[g]===-1?0:x[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),m=T.useState(function(){return l(Y(e)?t:e,r)}),S=m[0],p=m[1],h=function(s,I){s.formattedValue!==S.formattedValue&&p({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,x=r;Y(e)&&(c=S.numAsString,x=!0);var y=l(c,x);return T.useMemo(function(){p(y)},[y.formattedValue]),[S,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var m=e.removeFormatting;m===void 0&&(m=qe);var S=e.defaultValue,p=e.valueIsNumericString,h=e.onValueChange,c=e.isAllowed,x=e.onChange;x===void 0&&(x=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,S,!!p,l,m,h),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=m(o,D),K=R(b);if(b=m(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&x(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,m=t.thousandsGroupStyle;if(m===void 0&&(m="thousand"),e===""||e==="-")return e;var S=ie(t),p=S.thousandSeparator,h=S.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,x=se(e,l),y=x.beforeDecimal,s=x.afterDecimal,I=x.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),p&&(y=Le(y,p,m)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&h||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var m=r.decimalScale,S=t.from,p=t.to,h=p.start,c=p.end,x=ie(r),y=x.allowedDecimalSeparators,s=x.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-h===1&&y.indexOf(e[h])!==-1){var C=m===0?"":s;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,h,c),F=B.hasNegation;n=B,e=n.value,h=n.start,c=n.end;var k=g(t.lastValue,S.start,S.end),j=k.start,z=k.end,P=k.value,V=e.substring(h,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:h<i.length&&(L=h),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return p.end-p.start<S.end-S.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
1
+ import{al as X,r as T}from"./index-BwsrXI9O.js";import{s as Te}from"./index-CRtbPdb-.js";import"./withFullScreenWrapper-6omMDHWT.js";import"./Toolbar-ByIPpsVy.js";import"./FormClearHelper-DGQP9oxJ.js";import"./sprintf-DpPCfzXw.js";import"./checkbox-2-JpNSRW.js";import"./createDownloadLinkElement-ZaXNnPK4.js";import"./slicedToArray-CCKNURYu.js";import"./inherits-DgEBZpYa.js";import"./createSuper-vJD5mbw5.js";import"./FileDownload.esm-RGPPDhk8.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,m=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=m?a=a+de("0",l-m):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,m=a.hasNegation,S=parseFloat("0."+(l||"0")),p=l.length<=t?"0."+l:S.toFixed(t),h=p.split("."),c=i;i&&Number(h[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var x=ye(h[1]||"",t,r),y=m?"-":"",s=n?".":"";return""+y+c+s+x}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var m=a.findIndex(function(k){return k}),S=e.slice(0,m);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var p=r.length,h=e.length,c={},x=new Array(p),y=0;y<p;y++){x[y]=-1;for(var s=0,I=h;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){x[y]=s,c[s]=!0;break}}}for(var g=n;g<p&&(x[g]===-1||!i(r[g]));)g++;var B=g===p||x[g]===-1?h:x[g];for(g=n-1;g>0&&x[g]===-1;)g--;var F=g===-1||x[g]===-1?0:x[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),m=T.useState(function(){return l(Y(e)?t:e,r)}),S=m[0],p=m[1],h=function(s,I){s.formattedValue!==S.formattedValue&&p({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,x=r;Y(e)&&(c=S.numAsString,x=!0);var y=l(c,x);return T.useMemo(function(){p(y)},[y.formattedValue]),[S,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var m=e.removeFormatting;m===void 0&&(m=qe);var S=e.defaultValue,p=e.valueIsNumericString,h=e.onValueChange,c=e.isAllowed,x=e.onChange;x===void 0&&(x=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,S,!!p,l,m,h),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=m(o,D),K=R(b);if(b=m(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&x(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,m=t.thousandsGroupStyle;if(m===void 0&&(m="thousand"),e===""||e==="-")return e;var S=ie(t),p=S.thousandSeparator,h=S.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,x=se(e,l),y=x.beforeDecimal,s=x.afterDecimal,I=x.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),p&&(y=Le(y,p,m)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&h||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var m=r.decimalScale,S=t.from,p=t.to,h=p.start,c=p.end,x=ie(r),y=x.allowedDecimalSeparators,s=x.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-h===1&&y.indexOf(e[h])!==-1){var C=m===0?"":s;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,h,c),F=B.hasNegation;n=B,e=n.value,h=n.start,c=n.end;var k=g(t.lastValue,S.start,S.end),j=k.start,z=k.end,P=k.value,V=e.substring(h,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:h<i.length&&(L=h),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return p.end-p.start<S.end-S.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
4
  decimalSeparator: `+n+` (default value for decimalSeparator is .)
@@ -1 +1 @@
1
- import{e as l}from"./es6-BCBcAdQS.js";import"./index-wnKDraWU.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
1
+ import{e as l}from"./es6-Lsq1Gov6.js";import"./index-BwsrXI9O.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
@@ -1,2 +1,2 @@
1
- import{r as a,E as y,_ as d,ar as m}from"./index-wnKDraWU.js";var p=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});p.displayName="Close";function b(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,u,o,l=[],n=!0,c=!1;try{if(u=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=u.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){c=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return l}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,E as y,_ as d,ar as m}from"./index-BwsrXI9O.js";var p=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});p.displayName="Close";function b(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,u,o,l=[],n=!0,c=!1;try{if(u=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=u.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){c=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return l}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(e,t){return b(e)||h(e,t)||m(e,t)||v()}export{p as C,_};