@stlite/desktop 0.79.6 → 0.80.1

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/build/assets/{FileDownload.esm-DJAez7Gm.js → FileDownload.esm-CGGZqf24.js} +1 -1
  2. package/build/assets/{FormClearHelper-BtlF8Otx.js → FormClearHelper-CgY1PHFo.js} +1 -1
  3. package/build/assets/{Hooks-DirHIiAM.js → Hooks-DSz3TreG.js} +1 -1
  4. package/build/assets/{InputInstructions-DJSzEvIq.js → InputInstructions-Da_XbwOd.js} +1 -1
  5. package/build/assets/{ProgressBar-BnrWSmyb.js → ProgressBar-Dtx4om_-.js} +1 -1
  6. package/build/assets/{RenderInPortalIfExists-Ca4-_0pe.js → RenderInPortalIfExists-CGcG4XZP.js} +1 -1
  7. package/build/assets/{Toolbar-BsqjDjhG.js → Toolbar-FcJw8P3i.js} +1 -1
  8. package/build/assets/{base-input-CgYn_7GU.js → base-input-CmONXDO4.js} +1 -1
  9. package/build/assets/{createSuper-0pNNY1_M.js → createSuper-DFd_7HWg.js} +1 -1
  10. package/build/assets/{data-grid-overlay-editor-CNFkKj8T.js → data-grid-overlay-editor-QBvhT7Gv.js} +1 -1
  11. package/build/assets/{downloader-DGmYJOpb.js → downloader-CMM-05VD.js} +1 -1
  12. package/build/assets/{es6-irkMYhr9.js → es6-DhhL9D4J.js} +2 -2
  13. package/build/assets/{getPrototypeOf-D0_3wfU4.js → getPrototypeOf-BuqC2LfE.js} +1 -1
  14. package/build/assets/{iframeResizer.contentWindow-D4yL-VeT.js → iframeResizer.contentWindow-YHmj42JB.js} +1 -1
  15. package/build/assets/{index-I5lK7nyO.js → index-8APIqgoz.js} +1 -1
  16. package/build/assets/{index-Dx6YQ-Hb.js → index-B-eWDw1Y.js} +1 -1
  17. package/build/assets/{index-DrFZgW3n.js → index-B234xKIE.js} +1 -1
  18. package/build/assets/{index-D2eWP7lT.js → index-B4n5HlkF.js} +1 -1
  19. package/build/assets/{index-DlLUjT1S.js → index-B525bGzJ.js} +1 -1
  20. package/build/assets/{index-ZUNcqgeq.js → index-BVUe3D3r.js} +5 -5
  21. package/build/assets/{index-Hu3FoAZP.js → index-BZSCrRo-.js} +1 -1
  22. package/build/assets/{index-CcWWS1JT.js → index-B_Id9-1s.js} +1 -1
  23. package/build/assets/{index-Pb86pUMm.js → index-Bdf8V5aG.js} +1 -1
  24. package/build/assets/{index-BFCLs_X3.js → index-BjWJFoG-.js} +1 -1
  25. package/build/assets/{index-C1elUt1E.js → index-BwjoUCNo.js} +4 -4
  26. package/build/assets/{index-DEXFHxro.js → index-C2H2QMCy.js} +1 -1
  27. package/build/assets/{index-YUTOpyBs.js → index-C4T9lB1B.js} +1 -1
  28. package/build/assets/{index-DBLWtqmb.js → index-CF-qa2K-.js} +1 -1
  29. package/build/assets/{index-ce2FoF0m.js → index-CU_ErDon.js} +1 -1
  30. package/build/assets/{index-BcpEGcBW.js → index-CVDdljau.js} +1 -1
  31. package/build/assets/{index-ChM6SngL.js → index-CVlJl5rr.js} +1 -1
  32. package/build/assets/{index-BFkh2EDe.js → index-CclTmpN7.js} +1 -1
  33. package/build/assets/{index-gVtKu3MD.js → index-Cx5RDj1j.js} +1 -1
  34. package/build/assets/{index-DE-qBTEd.js → index-D26NtueC.js} +1 -1
  35. package/build/assets/{index-Bo6fA87g.js → index-D4RoBA_O.js} +1 -1
  36. package/build/assets/{index-xxcWnwsb.js → index-DDdbfcty.js} +1 -1
  37. package/build/assets/{index-BQ4RtD02.js → index-DJR_P__y.js} +1 -1
  38. package/build/assets/{index-BByqVhYh.js → index-DVwGEZVS.js} +1 -1
  39. package/build/assets/{index-DVxRcwZL.js → index-DWYLSf3l.js} +1 -1
  40. package/build/assets/{index-DUZJI1KN.js → index-DYYkHfIj.js} +1 -1
  41. package/build/assets/{index-w3QLWMIe.js → index-D_v8mdkx.js} +1 -1
  42. package/build/assets/{index-ItgUgpY7.js → index-DdyJvCFp.js} +1 -1
  43. package/build/assets/{index-DmCANcEY.js → index-Ez6wOCxn.js} +1 -1
  44. package/build/assets/{index-BM4uLW3s.js → index-RsmuLiMj.js} +1 -1
  45. package/build/assets/{index-BXRfu-ak.js → index-Z97zCVlB.js} +1 -1
  46. package/build/assets/{index-CbfNI9jm.js → index-hYugbL4y.js} +1 -1
  47. package/build/assets/{index-zflrmcBt.js → index-owAG4lAc.js} +1 -1
  48. package/build/assets/{index-BKdmDn79.js → index-tPM7YhKy.js} +1 -1
  49. package/build/assets/{index-DWA8E9x2.js → index-vzzDJjGk.js} +1 -1
  50. package/build/assets/{index-m1mIjWp5.js → index-xwpN0M9S.js} +1 -1
  51. package/build/assets/{index-BVyxD_B8.js → index-zxdZLnOx.js} +1 -1
  52. package/build/assets/{input-i4Ci2N7G.js → input-uWrlyNdh.js} +1 -1
  53. package/build/assets/{memory-BfVZ1OlY.js → memory-C3YA36Ob.js} +1 -1
  54. package/build/assets/{number-overlay-editor-DZNxupwD.js → number-overlay-editor-cdMzdt98.js} +1 -1
  55. package/build/assets/{sandbox-C-kTFbag.js → sandbox-nkebs-Xk.js} +1 -1
  56. package/build/assets/{slicedToArray--nOyZAEU.js → slicedToArray-bge8IXL1.js} +1 -1
  57. package/build/assets/{textarea-CpIIPJux.js → textarea-BRC6-IPU.js} +1 -1
  58. package/build/assets/{timepicker-BNPmfeK3.js → timepicker-clKKYW7X.js} +1 -1
  59. package/build/assets/{uniqueId-BfZwKZCM.js → uniqueId-CyfnMhlx.js} +1 -1
  60. package/build/assets/{useBasicWidgetState-D4lxC36U.js → useBasicWidgetState-DYDJWF1h.js} +1 -1
  61. package/build/assets/{useOnInputChange-BtQcqF3z.js → useOnInputChange-Bri4Ggii.js} +1 -1
  62. package/build/assets/{withFullScreenWrapper-Cn2wnMdj.js → withFullScreenWrapper-CkF8UtaI.js} +1 -1
  63. package/build/assets/{worker-CzOlZWlF.js → worker-DYZLk67q.js} +1 -1
  64. package/build/index.html +1 -1
  65. package/build/pyodide/pyodide-lock.json +1 -1
  66. package/build/pyodide/pyodide.asm.js +1 -1
  67. package/build/pyodide/pyodide.asm.wasm +0 -0
  68. package/build/pyodide/pyodide.mjs +2 -2
  69. package/build/pyodide/python_stdlib.zip +0 -0
  70. package/package.json +6 -6
  71. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{r as e,E as n,_ as a}from"./index-C1elUt1E.js";var i=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});i.displayName="Delete";var o=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});o.displayName="FileDownload";export{i as D,o as F};
1
+ import{r as e,E as n,_ as a}from"./index-BwjoUCNo.js";var i=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});i.displayName="Delete";var o=e.forwardRef(function(r,t){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});o.displayName="FileDownload";export{i as D,o as F};
@@ -1 +1 @@
1
- import{F as o,bC as i,r as a}from"./index-C1elUt1E.js";class d{manageFormClearListener(t,e,s){o(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),i(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;(t=this.formClearListener)==null||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function n({element:r,widgetMgr:t,onFormCleared:e}){a.useEffect(()=>{if(!i(r.formId))return;const s=t.addFormClearedListener(r.formId,e);return()=>{s.disconnect()}},[r,t,e])}export{d as F,n as u};
1
+ import{F as o,bC as i,r as a}from"./index-BwjoUCNo.js";class d{manageFormClearListener(t,e,s){o(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),i(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;(t=this.formClearListener)==null||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function n({element:r,widgetMgr:t,onFormCleared:e}){a.useEffect(()=>{if(!i(r.formId))return;const s=t.addFormClearedListener(r.formId,e);return()=>{s.disconnect()}},[r,t,e])}export{d as F,n as u};
@@ -1 +1 @@
1
- import{r as t}from"./index-C1elUt1E.js";const o=e=>{const r=t.useRef();return t.useEffect(()=>{r.current=e},[e]),r.current};export{o as u};
1
+ import{r as t}from"./index-BwjoUCNo.js";const o=e=>{const r=t.useRef();return t.useEffect(()=>{r.current=e},[e]),r.current};export{o as u};
@@ -1,4 +1,4 @@
1
- import{k as g,c as d,j as c,bH as h,bI as p}from"./index-C1elUt1E.js";const b=g`
1
+ import{k as g,c as d,j as c,bH as h,bI as p}from"./index-BwjoUCNo.js";const b=g`
2
2
  50% {
3
3
  color: rgba(0, 0, 0, 0);
4
4
  }
@@ -1,2 +1,2 @@
1
- import{b2 as p,bF as ke,bG as A,R as C,r as d,b3 as P,M as Le,a6 as je,bA as xe,j as Ce,bq as Te}from"./index-C1elUt1E.js";var h={small:"small",medium:"medium",large:"large"},$;function B(){return B=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},B.apply(this,arguments)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){w(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(e){var t;return(t={},w(t,h.small,"2px"),w(t,h.medium,"4px"),w(t,h.large,"8px"),t)[e]}var M=p("div",function(e){return{width:"100%"}});M.displayName="StyledRoot",M.displayName="StyledRoot";var V=p("div",function(e){var t=e.$theme,r=t.sizing;return{display:"flex",marginLeft:r.scale500,marginRight:r.scale500,marginTop:r.scale500,marginBottom:r.scale500}});V.displayName="StyledBarContainer",V.displayName="StyledBarContainer";var _=p("div",function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,a=t.sizing,s=t.borders,i=s.useRoundedCorners?a.scale0:0;return R({borderTopLeftRadius:i,borderTopRightRadius:i,borderBottomRightRadius:i,borderBottomLeftRadius:i,backgroundColor:ke(o.progressbarTrackFill,"0.16"),height:oe(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:"0"}})});_.displayName="StyledBar",_.displayName="StyledBar";var I=p("div",function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,a=e.$index,s=e.$maxValue,i=e.$minValue,u=i===void 0?0:i,l=s||n,O=t.colors,y=t.sizing,k=t.borders,X="".concat(100-(r-u)*100/(l-u),"%"),c={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},b=c.default;if(o>1){var N=(l-u)/o,z=(r-u)/(l-u)*100,L=Math.floor(z/N);a<L?b=c.completed:a===L?b=c.inProgress:b=c.awaits}var g=k.useRoundedCorners?y.scale0:0,E={transform:"translateX(-".concat(X,")")},j=b===c.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:b===c.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return R({borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,backgroundColor:O.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?j:E)});I.displayName="StyledBarProgress",I.displayName="StyledBarProgress";var D=p("div",function(e){var t=e.$theme,r=e.$isLeft,n=r===void 0?!1:r,o=e.$size,a=o===void 0?h.medium:o,s=t.colors,i=t.sizing,u=t.borders,l=u.useRoundedCorners?i.scale0:0,O=oe(a),y={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(s.accent," 25%, ").concat(s.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return R(R({},n?{borderTopLeftRadius:l,borderBottomLeftRadius:l}:{borderTopRightRadius:l,borderBottomRightRadius:l}),{},{height:O},y)});D.displayName="StyledInfiniteBar",D.displayName="StyledInfiniteBar";var H=p("div",function(e){return R(R({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});H.displayName="StyledLabel",H.displayName="StyledLabel";var f=($={},w($,h.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),w($,h.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),w($,h.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),$),ae=p("div",function(e){var t=e.$size,r=e.$inline;return{width:f[t].width+"px",height:f[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});ae.displayName="StyledProgressBarRoundedRoot",ae.displayName="StyledProgressBarRoundedRoot";var F=p("svg",function(e){var t=e.$size;return{width:f[t].width+"px",height:f[t].height+"px",position:"absolute",fill:"none"}});F.displayName="_StyledProgressBarRoundedSvg",F.displayName="_StyledProgressBarRoundedSvg",A(F,function(e){return function(t){return C.createElement(e,B({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var W=p("path",function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:f[r].strokeWidth+"px"}});W.displayName="_StyledProgressBarRoundedTrackBackground",W.displayName="_StyledProgressBarRoundedTrackBackground",A(W,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var G=p("path",function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,a=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:f[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-a)+""}});G.displayName="_StyledProgressBarRoundedTrackForeground",G.displayName="_StyledProgressBarRoundedTrackForeground",A(G,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var ie=p("div",function(e){var t=e.$theme,r=e.$size;return R({color:t.colors.contentPrimary},t.typography[f[r].typography])});ie.displayName="StyledProgressBarRoundedText",ie.displayName="StyledProgressBarRoundedText";function U(e){"@babel/helpers - typeof";return U=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},U(e)}var Xe=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function m(){return m=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},m.apply(this,arguments)}function S(e,t){return Ae(e)||Ee(e,t)||ze(e,t)||Ne()}function Ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b2 as p,bF as ke,bG as A,R as C,r as d,b3 as P,M as Le,a6 as je,bA as xe,j as Ce,bq as Te}from"./index-BwjoUCNo.js";var h={small:"small",medium:"medium",large:"large"},$;function B(){return B=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},B.apply(this,arguments)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){w(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(e){var t;return(t={},w(t,h.small,"2px"),w(t,h.medium,"4px"),w(t,h.large,"8px"),t)[e]}var M=p("div",function(e){return{width:"100%"}});M.displayName="StyledRoot",M.displayName="StyledRoot";var V=p("div",function(e){var t=e.$theme,r=t.sizing;return{display:"flex",marginLeft:r.scale500,marginRight:r.scale500,marginTop:r.scale500,marginBottom:r.scale500}});V.displayName="StyledBarContainer",V.displayName="StyledBarContainer";var _=p("div",function(e){var t=e.$theme,r=e.$size,n=e.$steps,o=t.colors,a=t.sizing,s=t.borders,i=s.useRoundedCorners?a.scale0:0;return R({borderTopLeftRadius:i,borderTopRightRadius:i,borderBottomRightRadius:i,borderBottomLeftRadius:i,backgroundColor:ke(o.progressbarTrackFill,"0.16"),height:oe(r),flex:1,overflow:"hidden"},n<2?{}:{marginLeft:a.scale300,":first-child":{marginLeft:"0"}})});_.displayName="StyledBar",_.displayName="StyledBar";var I=p("div",function(e){var t=e.$theme,r=e.$value,n=e.$successValue,o=e.$steps,a=e.$index,s=e.$maxValue,i=e.$minValue,u=i===void 0?0:i,l=s||n,O=t.colors,y=t.sizing,k=t.borders,X="".concat(100-(r-u)*100/(l-u),"%"),c={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},b=c.default;if(o>1){var N=(l-u)/o,z=(r-u)/(l-u)*100,L=Math.floor(z/N);a<L?b=c.completed:a===L?b=c.inProgress:b=c.awaits}var g=k.useRoundedCorners?y.scale0:0,E={transform:"translateX(-".concat(X,")")},j=b===c.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:b===c.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return R({borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,backgroundColor:O.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},o>1?j:E)});I.displayName="StyledBarProgress",I.displayName="StyledBarProgress";var D=p("div",function(e){var t=e.$theme,r=e.$isLeft,n=r===void 0?!1:r,o=e.$size,a=o===void 0?h.medium:o,s=t.colors,i=t.sizing,u=t.borders,l=u.useRoundedCorners?i.scale0:0,O=oe(a),y={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:t.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:n?"-50%":"150%",backgroundImage:"linear-gradient(".concat(n?"90":"270","deg, transparent 0%, ").concat(s.accent," 25%, ").concat(s.accent," 75%, transparent 100%)"),animationName:n?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return R(R({},n?{borderTopLeftRadius:l,borderBottomLeftRadius:l}:{borderTopRightRadius:l,borderBottomRightRadius:l}),{},{height:O},y)});D.displayName="StyledInfiniteBar",D.displayName="StyledInfiniteBar";var H=p("div",function(e){return R(R({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});H.displayName="StyledLabel",H.displayName="StyledLabel";var f=($={},w($,h.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),w($,h.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),w($,h.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),$),ae=p("div",function(e){var t=e.$size,r=e.$inline;return{width:f[t].width+"px",height:f[t].height+"px",position:"relative",display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});ae.displayName="StyledProgressBarRoundedRoot",ae.displayName="StyledProgressBarRoundedRoot";var F=p("svg",function(e){var t=e.$size;return{width:f[t].width+"px",height:f[t].height+"px",position:"absolute",fill:"none"}});F.displayName="_StyledProgressBarRoundedSvg",F.displayName="_StyledProgressBarRoundedSvg",A(F,function(e){return function(t){return C.createElement(e,B({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var W=p("path",function(e){var t=e.$theme,r=e.$size;return{stroke:t.colors.backgroundTertiary,strokeWidth:f[r].strokeWidth+"px"}});W.displayName="_StyledProgressBarRoundedTrackBackground",W.displayName="_StyledProgressBarRoundedTrackBackground",A(W,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var G=p("path",function(e){var t=e.$theme,r=e.$size,n=e.$visible,o=e.$pathLength,a=e.$pathProgress;return{visibility:n?"visible":"hidden",stroke:t.colors.borderAccent,strokeWidth:f[r].strokeWidth+"px",strokeDasharray:o,strokeDashoffset:o*(1-a)+""}});G.displayName="_StyledProgressBarRoundedTrackForeground",G.displayName="_StyledProgressBarRoundedTrackForeground",A(G,function(e){return function(t){return C.createElement(e,B({d:f[t.$size].d},t))}});var ie=p("div",function(e){var t=e.$theme,r=e.$size;return R({color:t.colors.contentPrimary},t.typography[f[r].typography])});ie.displayName="StyledProgressBarRoundedText",ie.displayName="StyledProgressBarRoundedText";function U(e){"@babel/helpers - typeof";return U=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},U(e)}var Xe=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function m(){return m=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},m.apply(this,arguments)}function S(e,t){return Ae(e)||Ee(e,t)||ze(e,t)||Ne()}function Ne(){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 ze(e,t){if(e){if(typeof e=="string")return se(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 se(e,t)}}function se(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 Ee(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,s,i;try{for(r=r.call(e);!(o=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(u){a=!0,i=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw i}}return n}}function Ae(e){if(Array.isArray(e))return e}function Me(e,t){if(e==null)return{};var r=Ve(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 Ve(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 _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(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 De(e,t,r){return Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function He(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&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},q(e,t)}function Fe(e){var t=Ue();return function(){var r=T(e),n;if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return We(this,n)}}function We(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ge(e)}function Ge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ue(){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 T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(e)}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ue=function(e){He(r,e);var t=Fe(r);function r(){return _e(this,r),t.apply(this,arguments)}return De(r,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var n=this.props,o=n.overrides,a=o===void 0?{}:o,s=n.getProgressLabel,i=n.value,u=n.size,l=n.steps,O=n.successValue,y=n.minValue,k=n.maxValue,X=n.showLabel,c=n.infinite,b=n.errorMessage,N=n.forwardedRef,z=Me(n,Xe),L=this.props["aria-label"]||this.props.ariaLabel,g=k!==100?k:O,E=P(a.Root,M),j=S(E,2),de=j[0],pe=j[1],fe=P(a.BarContainer,V),J=S(fe,2),ge=J[0],me=J[1],ye=P(a.Bar,_),Z=S(ye,2),be=Z[0],he=Z[1],ve=P(a.BarProgress,I),K=S(ve,2),Re=K[0],we=K[1],Pe=P(a.Label,H),Q=S(Pe,2),Se=Q[0],Oe=Q[1],$e=P(a.InfiniteBar,D),Y=S($e,2),ee=Y[0],te=Y[1],v={$infinite:c,$size:u,$steps:l,$successValue:g,$minValue:y,$maxValue:g,$value:i};function Be(){for(var re=[],x=0;x<l;x++)re.push(d.createElement(be,m({key:x},v,he),d.createElement(Re,m({$index:x},v,we))));return re}return d.createElement(de,m({ref:N,"data-baseweb":"progress-bar",role:"progressbar","aria-label":L||s(i,g,y),"aria-valuenow":c?null:i,"aria-valuemin":c?null:y,"aria-valuemax":c?null:g,"aria-invalid":b?!0:null,"aria-errormessage":b},z,v,pe),d.createElement(ge,m({},v,me),c?d.createElement(d.Fragment,null,d.createElement(ee,m({$isLeft:!0,$size:v.$size},te)),d.createElement(ee,m({$size:v.$size},te))):Be()),X&&d.createElement(Se,m({},v,Oe),s(i,g,y)))}}]),r}(d.Component);qe(ue,"defaultProps",{getProgressLabel:function(e,t,r){return"".concat(Math.round((e-r)/(t-r)*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:h.medium,steps:1,successValue:100,minValue:0,maxValue:100,value:0});var le=d.forwardRef(function(e,t){return d.createElement(ue,m({forwardedRef:t},e))});le.displayName="ProgressBar";var ce=(e=>(e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl",e))(ce||{});function Je({value:e,width:t,size:r="sm",overrides:n}){const o=Le(),a={xs:o.spacing.twoXS,sm:o.spacing.sm,md:o.spacing.lg,lg:o.spacing.xl,xl:o.spacing.twoXL},{activeTheme:s}=C.useContext(je),i=!xe(s),u={BarContainer:{style:{marginTop:o.spacing.none,marginBottom:o.spacing.none,marginRight:o.spacing.none,marginLeft:o.spacing.none}},Bar:{style:({$theme:l})=>({width:t?t.toString():void 0,marginTop:o.spacing.none,marginBottom:o.spacing.none,marginRight:o.spacing.none,marginLeft:o.spacing.none,height:a[r],backgroundColor:l.colors.progressbarTrackFill,borderTopLeftRadius:o.spacing.twoXS,borderTopRightRadius:o.spacing.twoXS,borderBottomLeftRadius:o.spacing.twoXS,borderBottomRightRadius:o.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:i?o.colors.primary:o.colors.blue70,borderTopLeftRadius:o.spacing.twoXS,borderTopRightRadius:o.spacing.twoXS,borderBottomLeftRadius:o.spacing.twoXS,borderBottomRightRadius:o.spacing.twoXS})}};return Ce.jsx(le,{value:e,overrides:Te(u,n)})}export{Je as P,ce as S};
@@ -1 +1 @@
1
- import{c as o,r,j as t,a as l,P as d,b as p}from"./index-C1elUt1E.js";const P=o("div",{target:"ecnfqzf0"})({name:"my9yfq",styles:"@media print{display:none;}"}),f=({className:a,scriptRunId:e,numParticles:s,numParticleTypes:n,ParticleComponent:c})=>t.jsx(P,{className:a,"data-testid":a,children:l(s).map(m=>{const i=Math.floor(Math.random()*n);return t.jsx(c,{particleType:i},e+m)})}),u=r.memo(f),x=({children:a})=>{var s;const e=(s=r.useContext(d))==null?void 0:s();return e?p.createPortal(a,e):t.jsx(t.Fragment,{children:a})};export{u as P,x as R};
1
+ import{c as o,r,j as t,a as l,P as d,b as p}from"./index-BwjoUCNo.js";const P=o("div",{target:"ecnfqzf0"})({name:"my9yfq",styles:"@media print{display:none;}"}),f=({className:a,scriptRunId:e,numParticles:s,numParticleTypes:n,ParticleComponent:c})=>t.jsx(P,{className:a,"data-testid":a,children:l(s).map(m=>{const i=Math.floor(Math.random()*n);return t.jsx(c,{particleType:i},e+m)})}),u=r.memo(f),x=({children:a})=>{var s;const e=(s=r.useContext(d))==null?void 0:s();return e?p.createPortal(a,e):t.jsx(t.Fragment,{children:a})};export{u as P,x as R};
@@ -1 +1 @@
1
- import{r as a,E as m,_ as p,c,a5 as f,M as u,j as i,b1 as g,a2 as w,aK as b,aX as z,aG as E,aY as y}from"./index-C1elUt1E.js";var v=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});v.displayName="Fullscreen";var x=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});x.displayName="FullscreenExit";const d="-2.4rem",j=c("div",{target:"e2wxzia2"})(({theme:e,locked:n,target:t})=>({padding:`${e.spacing.sm} 0 ${e.spacing.sm} ${e.spacing.sm}`,position:"absolute",top:n?d:"-1rem",right:e.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d},...t&&{[`${t}:hover &, ${t}:active &, ${t}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d}}}}),""),C=c("div",{target:"e2wxzia1"})(({theme:e})=>({color:f(e)?e.colors.fadedText60:e.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:e.radii.default,backgroundColor:e.colors.lightenedBg05,width:"fit-content",zIndex:e.zIndices.sidebar+1}),""),V=c("div",{target:"e2wxzia0"})(({width:e,height:n,useContainerWidth:t,topCentered:o})=>({position:"relative",height:t&&n?n:"fit-content",width:t?e:"fit-content",maxWidth:"100%",...o?{display:"flex",justifyContent:"center"}:{}}),"");function h({label:e,show_label:n,icon:t,onClick:o}){const r=u(),s=n?e:"";return i.jsx("div",{"data-testid":"stElementToolbarButton",children:i.jsx(g,{content:i.jsx(w,{source:e,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:b.TOP,onMouseEnterDelay:1e3,inline:!0,children:i.jsxs(z,{onClick:l=>{o&&o(),l.stopPropagation()},kind:E.ELEMENT_TOOLBAR,"aria-label":e,children:[t&&i.jsx(y,{content:t,size:"md",testid:"stElementToolbarButtonIcon"}),s&&i.jsx("span",{children:s})]})})})}const T=({onExpand:e,onCollapse:n,isFullScreen:t,locked:o,children:r,target:s,disableFullscreenMode:l})=>i.jsx(j,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||t,target:s,children:i.jsxs(C,{children:[r,e&&!l&&!t&&i.jsx(h,{label:"Fullscreen",icon:v,onClick:()=>e()}),n&&!l&&t&&i.jsx(h,{label:"Close fullscreen",icon:x,onClick:()=>n()})]})});export{V as S,T,h as a};
1
+ import{r as a,E as m,_ as p,c,a5 as f,M as u,j as i,b1 as g,a2 as w,aK as b,aX as z,aG as E,aY as y}from"./index-BwjoUCNo.js";var v=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});v.displayName="Fullscreen";var x=a.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});x.displayName="FullscreenExit";const d="-2.4rem",j=c("div",{target:"e2wxzia2"})(({theme:e,locked:n,target:t})=>({padding:`${e.spacing.sm} 0 ${e.spacing.sm} ${e.spacing.sm}`,position:"absolute",top:n?d:"-1rem",right:e.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d},...t&&{[`${t}:hover &, ${t}:active &, ${t}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:d}}}}),""),C=c("div",{target:"e2wxzia1"})(({theme:e})=>({color:f(e)?e.colors.fadedText60:e.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:e.radii.default,backgroundColor:e.colors.lightenedBg05,width:"fit-content",zIndex:e.zIndices.sidebar+1}),""),V=c("div",{target:"e2wxzia0"})(({width:e,height:n,useContainerWidth:t,topCentered:o})=>({position:"relative",height:t&&n?n:"fit-content",width:t?e:"fit-content",maxWidth:"100%",...o?{display:"flex",justifyContent:"center"}:{}}),"");function h({label:e,show_label:n,icon:t,onClick:o}){const r=u(),s=n?e:"";return i.jsx("div",{"data-testid":"stElementToolbarButton",children:i.jsx(g,{content:i.jsx(w,{source:e,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:b.TOP,onMouseEnterDelay:1e3,inline:!0,children:i.jsxs(z,{onClick:l=>{o&&o(),l.stopPropagation()},kind:E.ELEMENT_TOOLBAR,"aria-label":e,children:[t&&i.jsx(y,{content:t,size:"md",testid:"stElementToolbarButtonIcon"}),s&&i.jsx("span",{children:s})]})})})}const T=({onExpand:e,onCollapse:n,isFullScreen:t,locked:o,children:r,target:s,disableFullscreenMode:l})=>i.jsx(j,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||t,target:s,children:i.jsxs(C,{children:[r,e&&!l&&!t&&i.jsx(h,{label:"Fullscreen",icon:v,onClick:()=>e()}),n&&!l&&t&&i.jsx(h,{label:"Close fullscreen",icon:x,onClick:()=>n()})]})});export{V as S,T,h as a};
@@ -1,4 +1,4 @@
1
- import{r as b,bk as Q,bl as X,bm as Y,bn as Z,b2 as P,bJ as u,bL as be,bM as T,bd as ee,bK as D,b3 as w,bt as re,bu as te}from"./index-C1elUt1E.js";var ye=["title","size","color","overrides"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},A.apply(this,arguments)}function ge(e,r){if(e==null)return{};var t=he(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function he(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function me(e,r){return we(e)||Oe(e,r)||Ce(e,r)||ve()}function ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as b,bk as Q,bl as X,bm as Y,bn as Z,b2 as P,bJ as u,bL as be,bM as T,bd as ee,bK as D,b3 as w,bt as re,bu as te}from"./index-BwjoUCNo.js";var ye=["title","size","color","overrides"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},A.apply(this,arguments)}function ge(e,r){if(e==null)return{};var t=he(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function he(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function me(e,r){return we(e)||Oe(e,r)||Ce(e,r)||ve()}function ve(){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 Ce(e,r){if(e){if(typeof e=="string")return oe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oe(e,r)}}function oe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function Oe(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function we(e){if(Array.isArray(e))return e}function Fe(e,r){var t=Q(),o=me(t,2),n=o[1],i=e.title,a=i===void 0?"Hide":i,l=e.size,s=e.color,c=e.overrides,p=c===void 0?{}:c,y=ge(e,ye),h=X({component:n.icons&&n.icons.Hide?n.icons.Hide:null},p&&p.Svg?Y(p.Svg):{});return b.createElement(Z,A({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:s,overrides:{Svg:h}},y),b.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const Se=b.forwardRef(Fe);var ke=["title","size","color","overrides"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},V.apply(this,arguments)}function xe(e,r){if(e==null)return{};var t=Pe(e,r),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function Pe(e,r){if(e==null)return{};var t={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function Te(e,r){return Be(e)||$e(e,r)||Re(e,r)||je()}function je(){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 Re(e,r){if(e){if(typeof e=="string")return ne(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ne(e,r)}}function ne(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function $e(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function Be(e){if(Array.isArray(e))return e}function Ee(e,r){var t=Q(),o=Te(t,2),n=o[1],i=e.title,a=i===void 0?"Show":i,l=e.size,s=e.color,c=e.overrides,p=c===void 0?{}:c,y=xe(e,ke),h=X({component:n.icons&&n.icons.Show?n.icons.Show:null},p&&p.Svg?Y(p.Svg):{});return b.createElement(Z,V({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:s,overrides:{Svg:h}},y),b.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Ie=b.forwardRef(Ee);function K(e,r){var t=e.disabled,o=e.error,n=e.positive,i=e.adjoined,a=e.size,l=e.required,s=e.resize,c=e.readOnly,p=r.isFocused;return{$isFocused:p,$disabled:t,$error:o,$positive:n,$adjoined:i,$size:a,$required:l,$resize:s,$isReadOnly:c}}function ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ie(Object(t),!0).forEach(function(o){d(e,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))})}return e}function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var N=P("button",function(e){var r,t=e.$theme,o=e.$size,n=e.$isFocusVisible,i=(r={},d(r,u.mini,t.sizing.scale400),d(r,u.compact,t.sizing.scale400),d(r,u.default,t.sizing.scale300),d(r,u.large,t.sizing.scale200),r)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:n?"solid 3px ".concat(t.colors.accent):"none",color:t.colors.contentPrimary}});N.displayName="StyledMaskToggleButton",N.displayName="StyledMaskToggleButton";var W=P("div",function(e){var r,t=e.$alignTop,o=t===void 0?!1:t,n=e.$size,i=e.$theme,a=(r={},d(r,u.mini,i.sizing.scale200),d(r,u.compact,i.sizing.scale200),d(r,u.default,i.sizing.scale100),d(r,u.large,i.sizing.scale0),r)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});W.displayName="StyledClearIconContainer",W.displayName="StyledClearIconContainer";var _=P(be,function(e){var r=e.$theme,t=e.$isFocusVisible;return{cursor:"pointer",outline:t?"solid 3px ".concat(r.colors.accent):"none"}});_.displayName="StyledClearIcon",_.displayName="StyledClearIcon";function ze(e,r){var t;return(t={},d(t,u.mini,{paddingTop:r.scale100,paddingBottom:r.scale100,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.compact,{paddingTop:r.scale200,paddingBottom:r.scale200,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.default,{paddingTop:r.scale400,paddingBottom:r.scale400,paddingLeft:r.scale550,paddingRight:r.scale550}),d(t,u.large,{paddingTop:r.scale550,paddingBottom:r.scale550,paddingLeft:r.scale550,paddingRight:r.scale550}),t)[e]}function Me(e,r,t,o,n){var i=e===T.both||e===T.left&&o!=="rtl"||e===T.right&&o==="rtl"||n&&o==="rtl",a=e===T.both||e===T.right&&o!=="rtl"||e===T.left&&o==="rtl"||n&&o!=="rtl";return{paddingLeft:i?t.scale550:"0px",paddingRight:a?t.scale550:"0px"}}function I(e,r){var t;return(t={},d(t,u.mini,r.font100),d(t,u.compact,r.font200),d(t,u.default,r.font300),d(t,u.large,r.font400),t)[e]}function Le(e,r,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:r?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:t?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}function De(e,r){var t=r.inputBorderRadius;return e===u.mini&&(t=r.inputBorderRadiusMini),{borderTopLeftRadius:t,borderBottomLeftRadius:t,borderTopRightRadius:t,borderBottomRightRadius:t}}var ae=function(e){var r=e.$isFocused,t=e.$adjoined,o=e.$error,n=e.$disabled,i=e.$positive,a=e.$size,l=e.$theme,s=e.$theme,c=s.borders,p=s.colors,y=s.sizing,h=s.typography,C=s.animation,S=e.$hasIconTrailing;return g(g(g(g({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:C.timing200,transitionTimingFunction:C.easeOutCurve},De(a,c)),I(a,h)),Le(n,r,o,i,p)),Me(t,a,y,l.direction,S))},q=P("div",ae);q.displayName="Root",q.displayName="Root";function Ae(e,r){var t;return(t={},d(t,u.mini,{paddingRight:r.scale400,paddingLeft:r.scale400}),d(t,u.compact,{paddingRight:r.scale400,paddingLeft:r.scale400}),d(t,u.default,{paddingRight:r.scale300,paddingLeft:r.scale300}),d(t,u.large,{paddingRight:r.scale200,paddingLeft:r.scale200}),t)[e]}function Ve(e,r,t,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}var H=P("div",function(e){var r=e.$size,t=e.$disabled,o=e.$isFocused,n=e.$error,i=e.$positive,a=e.$theme,l=a.colors,s=a.sizing,c=a.typography,p=a.animation;return g(g(g({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:p.timing200,transitionTimingFunction:p.easeOutCurve},I(r,c)),Ae(r,s)),Ve(t,o,n,i,l))});H.displayName="InputEnhancer",H.displayName="InputEnhancer";function Ke(e,r,t,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}var le=function(e){var r=e.$isFocused,t=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,a=e.$theme,l=a.colors,s=a.typography,c=a.animation;return g(g({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:c.timing200,transitionTimingFunction:c.easeOutCurve},I(i,s)),Ke(o,r,t,n,l))},U=P("div",le);U.displayName="InputContainer",U.displayName="InputContainer";function Ne(e,r,t,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}var se=function(e){var r=e.$disabled,t=e.$isFocused,o=e.$error,n=e.$size,i=e.$theme,a=i.colors,l=i.sizing,s=i.typography;return g(g(g({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:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},I(n,s)),ze(n,l)),Ne(r,t,o,a))},z=P("input",se);z.displayName="Input",z.displayName="Input";function We(e){var r;return typeof window.Event=="function"?r=new window.Event(e,{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent(e,!0,!0)),r}function J(e){"@babel/helpers - typeof";return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},J(e)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},m.apply(this,arguments)}function F(e,r){return Ue(e)||He(e,r)||qe(e,r)||_e()}function _e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qe(e,r){if(e){if(typeof e=="string")return ue(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ue(e,r)}}function ue(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function He(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var o=[],n=!0,i=!1,a,l;try{for(t=t.call(e);!(n=(a=t.next()).done)&&(o.push(a.value),!(r&&o.length===r));n=!0);}catch(s){i=!0,l=s}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw l}}return o}}function Ue(e){if(Array.isArray(e))return e}function Je(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ge(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Qe(e,r,t){return Ge(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&G(e,r)}function G(e,r){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},G(e,r)}function Ye(e){var r=er();return function(){var t=M(e),o;if(r){var n=M(this).constructor;o=Reflect.construct(t,arguments,n)}else o=t.apply(this,arguments);return Ze(this,o)}}function Ze(e,r){if(r&&(J(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(){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 M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},M(e)}function f(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ce=function(){return null},pe=function(e){Xe(t,e);var r=Ye(t);function t(){var o;Je(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return o=r.call.apply(r,[this].concat(i)),f(v(o),"inputRef",o.props.inputRef||b.createRef()),f(v(o),"state",{isFocused:o.props.autoFocus||!1,isMasked:o.props.type==="password",initialType:o.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),f(v(o),"onInputKeyDown",function(l){o.props.clearOnEscape&&l.key==="Escape"&&o.inputRef.current&&!o.props.readOnly&&(o.clearValue(),l.stopPropagation())}),f(v(o),"onClearIconClick",function(){o.inputRef.current&&o.clearValue(),o.inputRef.current&&o.inputRef.current.focus()}),f(v(o),"onFocus",function(l){o.setState({isFocused:!0}),o.props.onFocus(l)}),f(v(o),"onBlur",function(l){o.setState({isFocused:!1}),o.props.onBlur(l)}),f(v(o),"handleFocusForMaskToggle",function(l){ee(l)&&o.setState({isFocusVisibleForMaskToggle:!0})}),f(v(o),"handleBlurForMaskToggle",function(l){o.state.isFocusVisibleForMaskToggle!==!1&&o.setState({isFocusVisibleForMaskToggle:!1})}),f(v(o),"handleFocusForClear",function(l){ee(l)&&o.setState({isFocusVisibleForClear:!0})}),f(v(o),"handleBlurForClear",function(l){o.state.isFocusVisibleForClear!==!1&&o.setState({isFocusVisibleForClear:!1})}),o}return Qe(t,[{key:"componentDidMount",value:function(){var o=this.props,n=o.autoFocus,i=o.clearable;this.inputRef.current&&(n&&this.inputRef.current.focus(),i&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){var o=this.props.clearable;o&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var o=this.inputRef.current;if(o){var n=Object.getOwnPropertyDescriptor(this.props.type===D.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(n){var i=n.set;if(i){i.call(o,"");var a=We("input");o.dispatchEvent(a)}}}}},{key:"getInputType",value:function(){return this.props.type==="password"?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var o,n=this;if(this.props.type!=="password")return null;var i=w(this.props.overrides.MaskToggleButton,N),a=F(i,2),l=a[0],s=a[1],c=w(this.props.overrides.MaskToggleShowIcon,Ie),p=F(c,2),y=p[0],h=p[1],C=w(this.props.overrides.MaskToggleHideIcon,Se),S=F(C,2),j=S[0],$=S[1],O=this.state.isMasked?"Show password text":"Hide password text",R=(o={},f(o,u.mini,"12px"),f(o,u.compact,"16px"),f(o,u.default,"20px"),f(o,u.large,"24px"),o)[this.props.size];return b.createElement(l,m({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":O,onClick:function(){return n.setState(function(k){return{isMasked:!k.isMasked}})},title:O,type:"button"},s,{onFocus:re(s,this.handleFocusForMaskToggle),onBlur:te(s,this.handleBlurForMaskToggle)}),this.state.isMasked?b.createElement(y,m({size:R,title:O},h)):b.createElement(j,m({size:R,title:O},$)))}},{key:"renderClear",value:function(){var o,n=this,i=this.props,a=i.clearable,l=i.value,s=i.disabled,c=i.readOnly,p=i.overrides,y=p===void 0?{}:p;if(s||c||!a||l==null||typeof l=="string"&&l.length===0)return null;var h=w(y.ClearIconContainer,W),C=F(h,2),S=C[0],j=C[1],$=w(y.ClearIcon,_),O=F($,2),R=O[0],k=O[1],B="Clear value",E=K(this.props,this.state),L=(o={},f(o,u.mini,"14px"),f(o,u.compact,"14px"),f(o,u.default,"16px"),f(o,u.large,"22px"),o)[this.props.size];return b.createElement(S,m({$alignTop:this.props.type===D.textarea},E,j),b.createElement(R,m({size:L,tabIndex:0,title:B,"aria-label":B,onClick:this.onClearIconClick,onKeyDown:function(x){x.key&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),n.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},E,k,{onFocus:re(k,this.handleFocusForClear),onBlur:te(k,this.handleBlurForClear)})))}},{key:"render",value:function(){var o=this.props.overrides,n=o.InputContainer,i=o.Input,a=o.Before,l=o.After,s=this.state.initialType==="password"&&this.props.autoComplete===t.defaultProps.autoComplete?"new-password":this.props.autoComplete,c=K(this.props,this.state),p=w(n,U),y=F(p,2),h=y[0],C=y[1],S=w(i,z),j=F(S,2),$=j[0],O=j[1],R=w(a,ce),k=F(R,2),B=k[0],E=k[1],L=w(l,ce),x=F(L,2),de=x[0],fe=x[1];return b.createElement(h,m({"data-baseweb":this.props["data-baseweb"]||"base-input"},c,C),b.createElement(B,m({},c,E)),b.createElement($,m({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:s,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===D.textarea?this.props.rows:null},c,O)),this.renderClear(),this.renderMaskToggle(),b.createElement(de,m({},c,fe)))}}]),t}(b.Component);f(pe,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:T.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:u.default,type:"text",readOnly:!1});export{pe as B,z as I,q as R,le as a,se as b,H as c,K as d,ae as g};
@@ -1 +1 @@
1
- import{c as e,d as u}from"./getPrototypeOf-D0_3wfU4.js";function f(){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 s(n){var c=f();return function(){var r=e(n),t;if(c){var o=e(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)}}export{s as _};
1
+ import{c as e,d as u}from"./getPrototypeOf-BuqC2LfE.js";function f(){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 s(n){var c=f();return function(){var r=e(n),t;if(c){var o=e(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)}}export{s as _};
@@ -1 +1 @@
1
- import{r,b as z}from"./index-C1elUt1E.js";import{s as J,i as P,a as Q,b as U,T as Z,C as _,m as ee}from"./index-ZUNcqgeq.js";import"./FormClearHelper-BtlF8Otx.js";import"./withFullScreenWrapper-Cn2wnMdj.js";import"./Toolbar-BsqjDjhG.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray--nOyZAEU.js";import"./getPrototypeOf-D0_3wfU4.js";import"./createSuper-0pNNY1_M.js";import"./FileDownload.esm-DJAez7Gm.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),se=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,n]=r.useState();return[t??void 0,n]}function le(){const[t,n]=de(),[a,f]=r.useState(0),[v,C]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(s=>{s.length!==0&&C(s[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o;const s=()=>{const{right:w}=t.getBoundingClientRect();f(p=>Math.min(p+window.innerWidth-w-10,0)),o=requestAnimationFrame(s)};return o=requestAnimationFrame(s),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]);const k=r.useMemo(()=>({transform:`translateX(${a}px)`}),[a]);return{ref:n,style:k}}const ce=t=>{const{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:C,imageEditorOverride:k,markdownDivCreateNode:o,highlight:s,className:w,theme:p,id:W,cell:x,bloom:u,validateCell:d,getCellRenderer:M,provideEditor:h,isOutsideClick:X}=t,[l,Y]=r.useState(v?a:void 0),O=r.useRef(l??a);O.current=l??a;const[y,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(x,a,O.current))===!1)),m=r.useCallback((e,i)=>{f(y?e:void 0,i)},[y,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){const i=d(x,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[x,d]),b=r.useRef(!1),g=r.useRef(void 0),B=r.useCallback(()=>{m(l,[0,0]),b.current=!0},[l,m]),G=r.useCallback((e,i)=>{m(e,i??g.current??[0,0]),b.current=!0},[m]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!b.current&&g.current!==void 0&&(m(i?l:void 0,g.current),b.current=!0)},0)},[m,l]),D=l??a,[c,I]=r.useMemo(()=>{var i,V;if(Q(a))return[];const e=h==null?void 0:h(a);return e!==void 0?[e,!1]:[(V=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:V.call(i,a),!1]},[a,M,h]),{ref:L,style:$}=le();let R=!0,A,H=!0,E;if(c!==void 0){R=c.disablePadding!==!0,H=c.disableStyling!==!0;const e=U(c);e&&(E=c.styleOverride);const i=e?c.editor:c;A=r.createElement(i,{isHighlighted:s,onChange:q,value:D,initialValue:C,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:k,markdownDivCreateNode:o,isValid:y,theme:p})}E={...E,...$};const F=document.getElementById("portal");if(F===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=H?"gdg-style":"gdg-unstyle";y||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");const K=(u==null?void 0:u[0])??1,T=(u==null?void 0:u[1])??1;return z.createPortal(r.createElement(Z.Provider,{value:p},r.createElement(_,{style:ee(p),className:w,onClickOutside:B,isOutsideClick:X},r.createElement(se,{ref:L,id:W,className:S,style:E,as:I===!0?"label":void 0,targetX:n.x-K,targetY:n.y-T,targetWidth:n.width+K*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},A)))),F)};export{ce as default};
1
+ import{r,b as z}from"./index-BwjoUCNo.js";import{s as J,i as P,a as Q,b as U,T as Z,C as _,m as ee}from"./index-BVUe3D3r.js";import"./FormClearHelper-CgY1PHFo.js";import"./withFullScreenWrapper-CkF8UtaI.js";import"./Toolbar-FcJw8P3i.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-bge8IXL1.js";import"./getPrototypeOf-BuqC2LfE.js";import"./createSuper-DFd_7HWg.js";import"./FileDownload.esm-CGGZqf24.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),se=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,n]=r.useState();return[t??void 0,n]}function le(){const[t,n]=de(),[a,f]=r.useState(0),[v,C]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(s=>{s.length!==0&&C(s[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o;const s=()=>{const{right:w}=t.getBoundingClientRect();f(p=>Math.min(p+window.innerWidth-w-10,0)),o=requestAnimationFrame(s)};return o=requestAnimationFrame(s),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]);const k=r.useMemo(()=>({transform:`translateX(${a}px)`}),[a]);return{ref:n,style:k}}const ce=t=>{const{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:C,imageEditorOverride:k,markdownDivCreateNode:o,highlight:s,className:w,theme:p,id:W,cell:x,bloom:u,validateCell:d,getCellRenderer:M,provideEditor:h,isOutsideClick:X}=t,[l,Y]=r.useState(v?a:void 0),O=r.useRef(l??a);O.current=l??a;const[y,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(x,a,O.current))===!1)),m=r.useCallback((e,i)=>{f(y?e:void 0,i)},[y,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){const i=d(x,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[x,d]),b=r.useRef(!1),g=r.useRef(void 0),B=r.useCallback(()=>{m(l,[0,0]),b.current=!0},[l,m]),G=r.useCallback((e,i)=>{m(e,i??g.current??[0,0]),b.current=!0},[m]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),g.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),g.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),g.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!b.current&&g.current!==void 0&&(m(i?l:void 0,g.current),b.current=!0)},0)},[m,l]),D=l??a,[c,I]=r.useMemo(()=>{var i,V;if(Q(a))return[];const e=h==null?void 0:h(a);return e!==void 0?[e,!1]:[(V=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:V.call(i,a),!1]},[a,M,h]),{ref:L,style:$}=le();let R=!0,A,H=!0,E;if(c!==void 0){R=c.disablePadding!==!0,H=c.disableStyling!==!0;const e=U(c);e&&(E=c.styleOverride);const i=e?c.editor:c;A=r.createElement(i,{isHighlighted:s,onChange:q,value:D,initialValue:C,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:k,markdownDivCreateNode:o,isValid:y,theme:p})}E={...E,...$};const F=document.getElementById("portal");if(F===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=H?"gdg-style":"gdg-unstyle";y||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");const K=(u==null?void 0:u[0])??1,T=(u==null?void 0:u[1])??1;return z.createPortal(r.createElement(Z.Provider,{value:p},r.createElement(_,{style:ee(p),className:w,onClickOutside:B,isOutsideClick:X},r.createElement(se,{ref:L,id:W,className:S,style:E,as:I===!0?"label":void 0,targetX:n.x-K,targetY:n.y-T,targetWidth:n.width+K*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},A)))),F)};export{ce as default};
@@ -1 +1 @@
1
- import{c as f,e as P}from"./es6-irkMYhr9.js";import"./index-C1elUt1E.js";const{WritableStream:_,TransformStream:m,DOMException:v,Blob:u}=f,{GONE:M}=P,E=/constructor/i.test(window.HTMLElement);class T{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...M)}async isSameEntry(e){return this===e}async createWritable(e={}){var l;const t=await((l=navigator.serviceWorker)==null?void 0:l.getRegistration()),a=document.createElement("a"),o=new m,g=o.writable;if(a.download=this.name,E||!t){let s=[];o.readable.pipeTo(new _({write(r){s.push(new u([r]))},close(){const r=new u(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new S(_),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),w={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},R=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new m({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const b=new Response(c).body.getReader(),p=W=>b.read().then(y=>y.done?0:p(d.enqueue(y.value)));return p()}})).pipeTo(s).finally(()=>{clearInterval(R)}),t.active.postMessage({url:t.scope+n,headers:w,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return g.getWriter()}}const U=0,j=0,k=1,L=1,O=2;class C{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:U,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:O}),this._port.close()}abort(e){this._port.postMessage({type:L,reason:e}),this._port.close()}_onMessage(e){e.type===j&&this._resolveReady(),e.type===k&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new C(t.port2))}}export{T as FileHandle};
1
+ import{c as f,e as P}from"./es6-DhhL9D4J.js";import"./index-BwjoUCNo.js";const{WritableStream:_,TransformStream:m,DOMException:v,Blob:u}=f,{GONE:M}=P,E=/constructor/i.test(window.HTMLElement);class T{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...M)}async isSameEntry(e){return this===e}async createWritable(e={}){var l;const t=await((l=navigator.serviceWorker)==null?void 0:l.getRegistration()),a=document.createElement("a"),o=new m,g=o.writable;if(a.download=this.name,E||!t){let s=[];o.readable.pipeTo(new _({write(r){s.push(new u([r]))},close(){const r=new u(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new S(_),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),w={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},R=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new m({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const b=new Response(c).body.getReader(),p=W=>b.read().then(y=>y.done?0:p(d.enqueue(y.value)));return p()}})).pipeTo(s).finally(()=>{clearInterval(R)}),t.active.postMessage({url:t.scope+n,headers:w,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return g.getWriter()}}const U=0,j=0,k=1,L=1,O=2;class C{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:U,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:O}),this._port.close()}abort(e){this._port.postMessage({type:L,reason:e}),this._port.close()}_onMessage(e){e.type===j&&this._resolveReady(),e.type===k&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new C(t.port2))}}export{T as FileHandle};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-DGmYJOpb.js","assets/index-C1elUt1E.js","assets/index.O26j_t8G.css","assets/sandbox-C-kTFbag.js","assets/memory-BfVZ1OlY.js"])))=>i.map(i=>d[i]);
2
- var le=Object.defineProperty;var $=c=>{throw TypeError(c)};var ce=(c,y,p)=>y in c?le(c,y,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[y]=p;var S=(c,y,p)=>ce(c,typeof y!="symbol"?y+"":y,p),ye=(c,y,p)=>y.has(c)||$("Cannot "+p);var Y=(c,y,p)=>y.has(c)?$("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(c):y.set(c,p),X=(c,y,p,E)=>(ye(c,y,"write to private field"),E?E.call(c,p):y.set(c,p),p);import{x as d,__tla as de}from"./index-C1elUt1E.js";let Q,j,v,me=Promise.all([(()=>{try{return de}catch{}})()]).then(async()=>{var A,z,U,B,C,G;const c=globalThis.showDirectoryPicker;async function y(r={}){if(c&&!r._preferPolyfill)return c(r);const a=document.createElement("input");a.type="file",a.webkitdirectory=!0,a.multiple=!0,a.style.position="fixed",a.style.top="-100000px",a.style.left="-100000px",document.body.appendChild(a);const e=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(t=>{a.addEventListener("change",t),a.click()}),e.then(t=>t.getDirHandlesFromInput(a))}const p={accepts:[]},E=globalThis.showOpenFilePicker;async function J(r={}){const a={...p,...r};if(E&&!r._preferPolyfill)return E(a);const e=document.createElement("input");e.type="file",e.multiple=a.multiple,e.accept=(a.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),t.then(n=>n.getFileHandlesFromInput(e))}const N=globalThis.showSaveFilePicker;async function K(r={}){if(N&&!r._preferPolyfill)return N(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0),{FileHandle:e}=await d(async()=>{const{FileHandle:t}=await import("./downloader-DGmYJOpb.js");return{FileHandle:t}},__vite__mapDeps([0,1,2]));return new a(new e(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:a,FolderHandle:e},{FileSystemDirectoryHandle:t},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox-C-kTFbag.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0),d(()=>Promise.resolve().then(()=>b),void 0)]);return r.isFile?new n(new a(r,!1)):new t(new e(r,!1))});async function Z(r,a={}){var s,o;if(!r)return((o=(s=globalThis.navigator)==null?void 0:s.storage)==null?void 0:o.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),t=await r,n=await(t.default?t.default(a):t(a));return new e(n)}let V;j={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:V}=j;const R=class R extends V{constructor(e){super(e);Y(this,A);X(this,A,e),Object.setPrototypeOf(this,R.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};A=new WeakMap;let w=R;Object.defineProperty(w.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(w.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=w);const h=Symbol("adapter");z=h;class O{constructor(a){S(this,z);S(this,"name");S(this,"kind");this.kind=a.kind,this.name=a.name,this[h]=a}async queryPermission(a={}){const{mode:e="read"}=a,t=this[h];if(t.queryPermission)return t.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:a="read"}={}){const e=this[h];if(e.requestPermission)return e.requestPermission({mode:a});if(a==="read")return"granted";if(a==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${a} must be 'read' or 'readwrite'`)}async remove(a={}){await this[h].remove(a)}async isSameEntry(a){return this===a?!0:!a||typeof a!="object"||this.kind!==a.kind||!a[h]?!1:this[h].isSameEntry(a[h])}}Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&((U=globalThis.FileSystemHandle.prototype).queryPermission??(U.queryPermission=function(r){return"granted"}));let W;v={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},W={writable:globalThis.WritableStream};async function ee(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[a,e,t]=await Promise.all([d(()=>import("./memory-BfVZ1OlY.js"),__vite__mapDeps([4,1,2])),d(()=>import("./sandbox-C-kTFbag.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0)]),n=new a.FolderHandle("",!1);return n._entries=r.map(s=>s.isFile?new e.FileHandle(s,!1):new e.FolderHandle(s,!1)),new t.FileSystemDirectoryHandle(n)}async function te(r){const{FolderHandle:a,FileHandle:e}=await d(async()=>{const{FolderHandle:m,FileHandle:l}=await import("./memory-BfVZ1OlY.js");return{FolderHandle:m,FileHandle:l}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),n=Array.from(r.files),s=n[0].webkitRelativePath.split("/",1)[0],o=new a(s,!1);return n.forEach(m=>{const l=m.webkitRelativePath.split("/");l.shift();const u=l.pop(),g=l.reduce((_,F)=>(_._entries[F]||(_._entries[F]=new a(F,!1)),_._entries[F]),o);g._entries[u]=new e(m.name,m,!1)}),new t(o)}async function ae(r){const{FileHandle:a}=await d(async()=>{const{FileHandle:t}=await import("./memory-BfVZ1OlY.js");return{FileHandle:t}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);return Array.from(r.files).map(t=>new e(new a(t.name,t,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:W,errors:v,fromDataTransfer:ee,getDirHandlesFromInput:te,getFileHandlesFromInput:ae},Symbol.toStringTag,{value:"Module"})),{GONE:ie,MOD_ERR:ne}=v,f=Symbol("adapter");let H=class L extends O{constructor(e){super(e);S(this,B);this[f]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[f].getDirectoryHandle(e,t);return new L(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[f].entries())yield[n.name,n.kind==="file"?new e(n):new L(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[f].entries())yield t.kind==="file"?new e(t):new L(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:o}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:o}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[f].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[f].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const o of n.values()){if(await o.isSameEntry(e))return[...s,o.name];o.kind==="directory"&&t.push({handle:o,path:[...s,o.name]})}}return null}async*keys(){for await(const[e]of this[f].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(B=f,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(H.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:o,path:m}=s.pop();for await(const l of o.values()){if(await l.isSameEntry(n))return[...m,l.name];l.kind==="directory"&&s.push({handle:l,path:[...m,l.name]})}}return null};async function a(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...ie)}const e=r.entries;r.entries=async function*(){await a(this),yield*e.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const t=r.removeEntry;r.removeEntry=async function(n,s={}){return t.call(this,n,s).catch(async o=>{throw o instanceof DOMException&&o.name==="UnknownError"&&!s.recursive&&!(await e.call(this).next()).done?new DOMException(...ne):o})}}const I=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,default:H},Symbol.toStringTag,{value:"Module"})),{INVALID:re,SYNTAX:x,GONE:se}=v,k=Symbol("adapter");class T extends(G=O,C=k,G){constructor(e){super(e);S(this,C);this[k]=e}async createWritable(e={}){return new w(await this[k].createWritable(e))}async getFile(){return this[k].getFile()}}if(Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(T.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let a;const e=()=>{let n,s;onmessage=async o=>{const m=o.ports[0],l=o.data;switch(l.type){case"open":const u=l.name;let g=await navigator.storage.getDirectory();for(const _ of l.path)g=await g.getDirectoryHandle(_);n=await g.getFileHandle(u),s=await n.createSyncAccessHandle();break;case"write":s.write(l.data,{at:l.position}),s.flush();break;case"truncate":s.truncate(l.size);break;case"abort":case"close":s.close();break}m.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!a){const i=`(${e.toString()})()`,D=new Blob([i],{type:"text/javascript"});a=URL.createObjectURL(D)}const s=new Worker(a,{type:"module"});let o=0;const m=new TextEncoder;let l=await this.getFile().then(i=>i.size);const u=i=>new Promise((D,oe)=>{const P=new MessageChannel;P.port1.onmessage=M=>{M.data instanceof Error?oe(M.data):D(M.data),P.port1.close(),P.port2.close(),P.port1.onmessage=null},s.postMessage(i,[P.port2])}),g=await navigator.storage.getDirectory(),_=await r.get(this),F=await g.resolve(_);if(F===null)throw new DOMException(...se);return await u({type:"open",path:F,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await u({type:"truncate",size:0}),l=0),new w({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:o},i.type==="write"){if(!("data"in i))throw await u({type:"close"}),new DOMException(...x("write requires a data argument"));if(i.position??(i.position=o),typeof i.data=="string")i.data=m.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const D=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(D)}Number.isInteger(i.position)&&i.position>=0&&(o=i.position),o+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...re);console.log("seeking",i),o=i.position;return}else throw await u({type:"close"}),new DOMException(...x("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,o>l&&(o=l);else throw await u({type:"close"}),new DOMException(...x("truncate requires a size argument"));await u(i)},async close(){await u({type:"close"}),s.terminate()},async abort(i){await u({type:"abort",reason:i}),s.terminate()}})};const t=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await t.call(this,...n);return r.set(s,this),s}}let b;b=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:T,default:T},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,FileSystemFileHandle:T,FileSystemHandle:O,FileSystemWritableFileStream:w,getOriginPrivateDirectory:Z,showDirectoryPicker:y,showOpenFilePicker:J,showSaveFilePicker:K},Symbol.toStringTag,{value:"Module"}))});export{me as __tla,Q as a,j as c,v as e};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-CMM-05VD.js","assets/index-BwjoUCNo.js","assets/index.O26j_t8G.css","assets/sandbox-nkebs-Xk.js","assets/memory-C3YA36Ob.js"])))=>i.map(i=>d[i]);
2
+ var le=Object.defineProperty;var $=c=>{throw TypeError(c)};var ce=(c,y,p)=>y in c?le(c,y,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[y]=p;var S=(c,y,p)=>ce(c,typeof y!="symbol"?y+"":y,p),ye=(c,y,p)=>y.has(c)||$("Cannot "+p);var Y=(c,y,p)=>y.has(c)?$("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(c):y.set(c,p),X=(c,y,p,E)=>(ye(c,y,"write to private field"),E?E.call(c,p):y.set(c,p),p);import{x as d,__tla as de}from"./index-BwjoUCNo.js";let Q,j,v,me=Promise.all([(()=>{try{return de}catch{}})()]).then(async()=>{var A,z,U,B,C,G;const c=globalThis.showDirectoryPicker;async function y(r={}){if(c&&!r._preferPolyfill)return c(r);const a=document.createElement("input");a.type="file",a.webkitdirectory=!0,a.multiple=!0,a.style.position="fixed",a.style.top="-100000px",a.style.left="-100000px",document.body.appendChild(a);const e=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(t=>{a.addEventListener("change",t),a.click()}),e.then(t=>t.getDirHandlesFromInput(a))}const p={accepts:[]},E=globalThis.showOpenFilePicker;async function J(r={}){const a={...p,...r};if(E&&!r._preferPolyfill)return E(a);const e=document.createElement("input");e.type="file",e.multiple=a.multiple,e.accept=(a.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),t.then(n=>n.getFileHandlesFromInput(e))}const N=globalThis.showSaveFilePicker;async function K(r={}){if(N&&!r._preferPolyfill)return N(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0),{FileHandle:e}=await d(async()=>{const{FileHandle:t}=await import("./downloader-CMM-05VD.js");return{FileHandle:t}},__vite__mapDeps([0,1,2]));return new a(new e(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:a,FolderHandle:e},{FileSystemDirectoryHandle:t},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox-nkebs-Xk.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0),d(()=>Promise.resolve().then(()=>b),void 0)]);return r.isFile?new n(new a(r,!1)):new t(new e(r,!1))});async function Z(r,a={}){var s,o;if(!r)return((o=(s=globalThis.navigator)==null?void 0:s.storage)==null?void 0:o.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),t=await r,n=await(t.default?t.default(a):t(a));return new e(n)}let V;j={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:V}=j;const R=class R extends V{constructor(e){super(e);Y(this,A);X(this,A,e),Object.setPrototypeOf(this,R.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};A=new WeakMap;let w=R;Object.defineProperty(w.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(w.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=w);const h=Symbol("adapter");z=h;class O{constructor(a){S(this,z);S(this,"name");S(this,"kind");this.kind=a.kind,this.name=a.name,this[h]=a}async queryPermission(a={}){const{mode:e="read"}=a,t=this[h];if(t.queryPermission)return t.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:a="read"}={}){const e=this[h];if(e.requestPermission)return e.requestPermission({mode:a});if(a==="read")return"granted";if(a==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${a} must be 'read' or 'readwrite'`)}async remove(a={}){await this[h].remove(a)}async isSameEntry(a){return this===a?!0:!a||typeof a!="object"||this.kind!==a.kind||!a[h]?!1:this[h].isSameEntry(a[h])}}Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&((U=globalThis.FileSystemHandle.prototype).queryPermission??(U.queryPermission=function(r){return"granted"}));let W;v={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},W={writable:globalThis.WritableStream};async function ee(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[a,e,t]=await Promise.all([d(()=>import("./memory-C3YA36Ob.js"),__vite__mapDeps([4,1,2])),d(()=>import("./sandbox-nkebs-Xk.js"),__vite__mapDeps([3,1,2])),d(()=>Promise.resolve().then(()=>I),void 0)]),n=new a.FolderHandle("",!1);return n._entries=r.map(s=>s.isFile?new e.FileHandle(s,!1):new e.FolderHandle(s,!1)),new t.FileSystemDirectoryHandle(n)}async function te(r){const{FolderHandle:a,FileHandle:e}=await d(async()=>{const{FolderHandle:m,FileHandle:l}=await import("./memory-C3YA36Ob.js");return{FolderHandle:m,FileHandle:l}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:m}=await Promise.resolve().then(()=>I);return{FileSystemDirectoryHandle:m}},void 0),n=Array.from(r.files),s=n[0].webkitRelativePath.split("/",1)[0],o=new a(s,!1);return n.forEach(m=>{const l=m.webkitRelativePath.split("/");l.shift();const u=l.pop(),g=l.reduce((_,F)=>(_._entries[F]||(_._entries[F]=new a(F,!1)),_._entries[F]),o);g._entries[u]=new e(m.name,m,!1)}),new t(o)}async function ae(r){const{FileHandle:a}=await d(async()=>{const{FileHandle:t}=await import("./memory-C3YA36Ob.js");return{FileHandle:t}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);return Array.from(r.files).map(t=>new e(new a(t.name,t,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:W,errors:v,fromDataTransfer:ee,getDirHandlesFromInput:te,getFileHandlesFromInput:ae},Symbol.toStringTag,{value:"Module"})),{GONE:ie,MOD_ERR:ne}=v,f=Symbol("adapter");let H=class L extends O{constructor(e){super(e);S(this,B);this[f]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[f].getDirectoryHandle(e,t);return new L(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[f].entries())yield[n.name,n.kind==="file"?new e(n):new L(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[f].entries())yield t.kind==="file"?new e(t):new L(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:o}=await Promise.resolve().then(()=>b);return{FileSystemFileHandle:o}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[f].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[f].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const o of n.values()){if(await o.isSameEntry(e))return[...s,o.name];o.kind==="directory"&&t.push({handle:o,path:[...s,o.name]})}}return null}async*keys(){for await(const[e]of this[f].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(B=f,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(H.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:o,path:m}=s.pop();for await(const l of o.values()){if(await l.isSameEntry(n))return[...m,l.name];l.kind==="directory"&&s.push({handle:l,path:[...m,l.name]})}}return null};async function a(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...ie)}const e=r.entries;r.entries=async function*(){await a(this),yield*e.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const t=r.removeEntry;r.removeEntry=async function(n,s={}){return t.call(this,n,s).catch(async o=>{throw o instanceof DOMException&&o.name==="UnknownError"&&!s.recursive&&!(await e.call(this).next()).done?new DOMException(...ne):o})}}const I=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,default:H},Symbol.toStringTag,{value:"Module"})),{INVALID:re,SYNTAX:x,GONE:se}=v,k=Symbol("adapter");class T extends(G=O,C=k,G){constructor(e){super(e);S(this,C);this[k]=e}async createWritable(e={}){return new w(await this[k].createWritable(e))}async getFile(){return this[k].getFile()}}if(Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(T.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let a;const e=()=>{let n,s;onmessage=async o=>{const m=o.ports[0],l=o.data;switch(l.type){case"open":const u=l.name;let g=await navigator.storage.getDirectory();for(const _ of l.path)g=await g.getDirectoryHandle(_);n=await g.getFileHandle(u),s=await n.createSyncAccessHandle();break;case"write":s.write(l.data,{at:l.position}),s.flush();break;case"truncate":s.truncate(l.size);break;case"abort":case"close":s.close();break}m.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!a){const i=`(${e.toString()})()`,D=new Blob([i],{type:"text/javascript"});a=URL.createObjectURL(D)}const s=new Worker(a,{type:"module"});let o=0;const m=new TextEncoder;let l=await this.getFile().then(i=>i.size);const u=i=>new Promise((D,oe)=>{const P=new MessageChannel;P.port1.onmessage=M=>{M.data instanceof Error?oe(M.data):D(M.data),P.port1.close(),P.port2.close(),P.port1.onmessage=null},s.postMessage(i,[P.port2])}),g=await navigator.storage.getDirectory(),_=await r.get(this),F=await g.resolve(_);if(F===null)throw new DOMException(...se);return await u({type:"open",path:F,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await u({type:"truncate",size:0}),l=0),new w({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:o},i.type==="write"){if(!("data"in i))throw await u({type:"close"}),new DOMException(...x("write requires a data argument"));if(i.position??(i.position=o),typeof i.data=="string")i.data=m.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const D=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(D)}Number.isInteger(i.position)&&i.position>=0&&(o=i.position),o+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...re);console.log("seeking",i),o=i.position;return}else throw await u({type:"close"}),new DOMException(...x("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,o>l&&(o=l);else throw await u({type:"close"}),new DOMException(...x("truncate requires a size argument"));await u(i)},async close(){await u({type:"close"}),s.terminate()},async abort(i){await u({type:"abort",reason:i}),s.terminate()}})};const t=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await t.call(this,...n);return r.set(s,this),s}}let b;b=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:T,default:T},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:H,FileSystemFileHandle:T,FileSystemHandle:O,FileSystemWritableFileStream:w,getOriginPrivateDirectory:Z,showDirectoryPicker:y,showOpenFilePicker:J,showSaveFilePicker:K},Symbol.toStringTag,{value:"Module"}))});export{me as __tla,Q as a,j as c,v as e};
@@ -1 +1 @@
1
- import{bD as a,bE as c,W as u,ap as f}from"./index-C1elUt1E.js";function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function b(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(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&&c(e,t)}function y(e,t){if(t&&(u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}export{l as _,p as a,b,n as c,y as d};
1
+ import{bD as a,bE as c,W as u,ap as f}from"./index-BwjoUCNo.js";function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function b(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(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&&c(e,t)}function y(e,t){if(t&&(u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}export{l as _,p as a,b,n as c,y as d};
@@ -1 +1 @@
1
- import{g as ot}from"./index-C1elUt1E.js";function it(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}};(function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,D="",J=null,ie="",j=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,Fe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function je(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function qe(){He(),i("Initialising iFrame ("+window.location.href+")"),Be(),Ue(),te("background",O),te("padding",ie),Ye(),Te(),Ee(),_e(),Ge(),Qe(),Oe(),k=Ke(),A("init","Init message from host page"),G()}function He(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),j=u===t[2]?j:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function We(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Be(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(We,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Je(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=M+"px"),te("margin",Je("margin",D))}function _e(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),$e()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Xe(){we("remove"),Ve(),clearInterval(ue)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){i("Enable public methods"),Fe.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function et(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),et(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var nt=Math.abs(b-C)<=K;return!nt}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||j&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||j&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var tt=je(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Pe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):tt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,qe(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e,sameDomian:!0})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()})(ke);var Le=ke.exports;const rt=ot(Le),at=it({__proto__:null,default:rt},[Le]);export{at as i};
1
+ import{g as ot}from"./index-BwjoUCNo.js";function it(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}};(function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,D="",J=null,ie="",j=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,Fe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function je(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function qe(){He(),i("Initialising iFrame ("+window.location.href+")"),Be(),Ue(),te("background",O),te("padding",ie),Ye(),Te(),Ee(),_e(),Ge(),Qe(),Oe(),k=Ke(),A("init","Init message from host page"),G()}function He(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),j=u===t[2]?j:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function We(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Be(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(We,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Je(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=M+"px"),te("margin",Je("margin",D))}function _e(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),$e()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Xe(){we("remove"),Ve(),clearInterval(ue)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){i("Enable public methods"),Fe.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function et(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),et(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var nt=Math.abs(b-C)<=K;return!nt}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||j&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||j&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var tt=je(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Pe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):tt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,qe(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e,sameDomian:!0})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()})(ke);var Le=ke.exports;const rt=ot(Le),at=it({__proto__:null,default:rt},[Le]);export{at as i};
@@ -1 +1 @@
1
- import{r as y,E,_ as R,c as C,Q as G,j as u,b1 as X,aK as k,aX as q,aG as Q,aY as O,b9 as z,e as J,g as K,a7 as Y,M as Z,ba as ee,bb as te,R as re,O as ie,$ as se,B as P,as as _,aU as ne,aT as ae,a_ as oe,a$ as le,bc as de,b0 as ce}from"./index-C1elUt1E.js";import{F as he}from"./FormClearHelper-BtlF8Otx.js";import{U as V}from"./UploadFileInfo-C-jY39rj.js";import{P as ue,S as pe}from"./ProgressBar-BnrWSmyb.js";var L=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});L.displayName="Video";var D=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var $=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ge(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const W=C("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=C("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),fe=C("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),me=C("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),ve=C("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),Se=C("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),ye=C("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),we=C("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),be=C("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${G(i.colors.primary,.5)}`},...ge("medium",i)}),"");function H({disabled:i,onClick:l,children:t,progress:s}){return u.jsxs(be,{disabled:i||!1,onClick:l||(()=>{}),progress:s||null,"data-testid":"stCameraInputButton",children:[t,s&&u.jsx(we,{children:u.jsx(ue,{value:s,size:pe.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Me=({switchFacingMode:i})=>u.jsx(ye,{"data-testid":"stCameraInputSwitchButton",children:u.jsx(X,{content:"Switch camera",placement:k.TOP_RIGHT,children:u.jsx(q,{kind:Q.MINIMAL,onClick:i,children:u.jsx(O,{content:$,size:"twoXL",color:z.white})})})});var A={exports:{}};(function(i,l){(function(t,s){i.exports=s(y)})(J,function(t){return function(s){var n={};function a(o){if(n[o])return n[o].exports;var p=n[o]={i:o,l:!1,exports:{}};return s[o].call(p.exports,p,p.exports,a),p.l=!0,p.exports}return a.m=s,a.c=n,a.d=function(o,p,S){a.o(o,p)||Object.defineProperty(o,p,{enumerable:!0,get:S})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,p){if(p&1&&(o=a(o)),p&8||p&4&&typeof o=="object"&&o&&o.__esModule)return o;var S=Object.create(null);if(a.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:o}),p&2&&typeof o!="string")for(var x in o)a.d(S,x,(function(U){return o[U]}).bind(null,x));return S},a.n=function(o){var p=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(p,"a",p),p},a.o=function(o,p){return Object.prototype.hasOwnProperty.call(o,p)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(s,n,a){a.r(n);var o=a("react"),p=function(){var g=function(h,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,d){r.__proto__=d}||function(r,d){for(var c in d)d.hasOwnProperty(c)&&(r[c]=d[c])},g(h,e)};return function(h,e){g(h,e);function r(){this.constructor=h}h.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),S=function(){return S=Object.assign||function(g){for(var h,e=1,r=arguments.length;e<r;e++){h=arguments[e];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(g[d]=h[d])}return g},S.apply(this,arguments)},x=function(g,h){var e={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&h.indexOf(r)<0&&(e[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(g);d<r.length;d++)h.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(g,r[d])&&(e[r[d]]=g[r[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return h?new Promise(function(e,r){h.call(navigator,g,e,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var j=function(g){p(h,g);function h(e){var r=g.call(this,e)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return h.prototype.componentDidMount=function(){var e=this,r=e.state,d=e.props;if(this.unmounted=!1,!U()){d.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},h.prototype.componentDidUpdate=function(e){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(r.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(r.videoConstraints),w=e.minScreenshotWidth!==r.minScreenshotWidth,v=e.minScreenshotHeight!==r.minScreenshotHeight;(c||w||v)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},h.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},h.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(r){e.removeTrack(r),r.stop()}),e.getAudioTracks().map(function(r){e.removeTrack(r),r.stop()})):e.stop())},h.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(h.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},h.prototype.getScreenshot=function(e){var r=this,d=r.state,c=r.props;if(!d.hasUserMedia)return null;var w=this.getCanvas(e);return w&&w.toDataURL(c.screenshotFormat,c.screenshotQuality)},h.prototype.getCanvas=function(e){var r=this,d=r.state,c=r.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var f=w/v;w=c.minScreenshotWidth||this.video.clientWidth,v=w/f,c.minScreenshotHeight&&v<c.minScreenshotHeight&&(v=c.minScreenshotHeight,w=v*f)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||w,this.canvas.height=(e==null?void 0:e.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,m=M.canvas;return b&&m&&(m.width=(e==null?void 0:e.width)||m.width,m.height=(e==null?void 0:e.height)||m.height,c.mirrored&&(b.translate(m.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||m.width,(e==null?void 0:e.height)||m.height),c.mirrored&&(b.scale(-1,1),b.translate(-m.width,0))),m},h.prototype.requestUserMedia=function(){var e=this,r=this.props,d=function(v,f){var M={video:typeof f<"u"?f:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(m){e.unmounted||b!==e.requestUserMediaId?h.stopMediaStream(m):e.handleUserMedia(null,m)}).catch(function(m){e.handleUserMedia(m)})};if("mediaDevices"in navigator)d(r.audioConstraints,r.videoConstraints);else{var c=function(v){return{optional:[{sourceId:v}]}},w=function(v){var f=v.deviceId;return typeof f=="string"?f:Array.isArray(f)&&f.length>0?f[0]:typeof f=="object"&&f.ideal?f.ideal:null};MediaStreamTrack.getSources(function(v){var f=null,M=null;v.forEach(function(I){I.kind==="audio"?f=I.id:I.kind==="video"&&(M=I.id)});var b=w(r.audioConstraints);b&&(f=b);var m=w(r.videoConstraints);m&&(M=m),d(c(f),c(M))})}},h.prototype.handleUserMedia=function(e,r){var d=this.props;if(e||!r){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}d.onUserMedia(r)},h.prototype.render=function(){var e=this,r=this,d=r.state,c=r.props,w=c.audio;c.forceScreenshotSourceSize,c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,f=c.style,M=f===void 0?{}:f,b=c.children,m=x(c,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),I=v?S(S({},M),{transform:(M.transform||"")+" scaleX(-1)"}):M,N={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",S({autoPlay:!0,src:d.src,muted:!w,playsInline:!0,ref:function(B){e.video=B},style:I},m)),b&&b(N))},h.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},h}(o.Component);n.default=j},react:function(s,n){s.exports=t}}).default})})(A);var Ue=A.exports;const xe=K(Ue),Ce=({width:i})=>u.jsxs(T,{width:i,children:[u.jsx(O,{size:"threeXL",color:z.gray60,content:L}),u.jsxs(fe,{children:["This app would like to use your camera.",u.jsx(ve,{href:te,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),je=({handleCapture:i,width:l,disabled:t,clearPhotoInProgress:s,setClearPhotoInProgress:n,facingMode:a,setFacingMode:o,testOverride:p})=>{const[S,x]=y.useState(p||"pending"),U=y.useRef(null),[j,g]=y.useState(l),h=y.useCallback(Y(1e3,g),[]);y.useEffect(()=>{h(l)},[l,h]);function e(){if(U.current!==null){const d=U.current.getScreenshot();i(d)}}const r=Z();return u.jsxs(W,{"data-testid":"stCameraInputWebcamComponent",children:[S!=="success"&&!t&&!s?u.jsx(Ce,{width:j}):ee&&u.jsx(Me,{switchFacingMode:o}),u.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:S!=="success"&&!t&&!s,width:j,children:!t&&u.jsx(xe,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:j,height:j*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{x("error")},onUserMedia:()=>{x("success"),n(!1)},videoConstraints:{width:{ideal:j},facingMode:a}})}),u.jsx(H,{onClick:e,disabled:S!=="success"||t||s,children:"Take Photo"})]})},Ie=150;class Pe extends re.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new he,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=t=>{this.setState({clearPhotoInProgress:t})},this.setFacingMode=()=>{this.setState(t=>({facingMode:t.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=t=>{if(t===null)return Promise.resolve();this.setState({imgSrc:t,shutter:!0,minShutterEffectPassed:!1});const s=n=>new Promise(a=>setTimeout(a,n));return Fe(t,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(n=>this.props.uploadClient.fetchFileURLs([n]).then(a=>({file:n,fileUrls:a[0]}))).then(({file:n,fileUrls:a})=>this.uploadFile(a,n)).then(()=>s(Ie)).then(()=>{this.setState((n,a)=>({imgSrc:t,shutter:n.shutter,minShutterEffectPassed:!0}))}).catch(n=>{ie(n)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(t=>this.deleteFile(t.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:n,fragmentId:a}=this.props,o=n.getFileUploaderStateValue(s);se(t,o)||n.setFileUploaderStateValue(s,t,{fromUi:!0},a)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(P(t))return;this.setState({imgSrc:null});const{widgetMgr:s,element:n,fragmentId:a}=this.props;s.setFileUploaderStateValue(n,t,{fromUi:!0},a)})},this.deleteFile=t=>{const s=this.getFile(t);P(s)||(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(s=>({files:[...s.files,t]}))},this.removeFile=t=>{this.setState(s=>({files:s.files.filter(n=>n.id!==t)}))},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{this.setState(n=>({files:n.files.map(a=>a.id===t?s:a)}))},this.onUploadComplete=(t,s)=>{this.setState(()=>({shutter:!1}));const n=this.getFile(t);P(n)||n.status.type!=="uploading"||this.updateFile(n.id,n.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.onUploadProgress=(t,s)=>{const n=this.getFile(s);if(P(n)||n.status.type!=="uploading")return;const a=Math.round(t.loaded*100/t.total);n.status.progress!==a&&this.updateFile(s,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:a}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(t,s)=>{const n=_.CancelToken.source(),a=new V(s.name,s.size,this.nextLocalFileId(),{type:"uploading",cancelToken:n,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,o=>this.onUploadProgress(o,a.id),n.token).then(()=>this.onUploadComplete(a.id,t)).catch(o=>{_.isCancel(o)||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:o?o.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:t,element:s}=this.props,n=t.getFileUploaderStateValue(s);if(P(n))return l;const{uploadedFileInfo:a}=n;return P(a)||a.length===0?l:{files:a.map(o=>{const p=o.name,S=o.size,x=o.fileId,U=o.fileUrls;return new V(p,S,this.nextLocalFileId(),{type:"uploaded",fileId:x,fileUrls:U})}),imgSrc:a.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=t=>t.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:n}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,l,{fromUi:!1},n)}createWidgetValue(){const l=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:n,status:a}=t;return new ne({fileId:a.fileId,fileUrls:a.fileUrls,name:s,size:n})});return new ae({uploadedFileInfo:l})}render(){var a;const{element:l,widgetMgr:t,disabled:s,width:n}=this.props;return this.formClearHelper.manageFormClearListener(t,l.formId,this.onFormCleared),u.jsxs(W,{className:"stCameraInput","data-testid":"stCameraInput",children:[u.jsx(oe,{label:l.label,disabled:s,labelVisibility:le((a=l.labelVisibility)==null?void 0:a.value),children:l.help&&u.jsx(de,{children:u.jsx(ce,{content:l.help,placement:k.TOP_RIGHT})})}),this.state.imgSrc?u.jsxs(u.Fragment,{children:[u.jsx(T,{width:n,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&u.jsx(me,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:n,height:n*9/16})}),u.jsx(H,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||s,children:this.getProgress()?"Uploading...":u.jsxs(Se,{children:[u.jsx(O,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):u.jsx(je,{handleCapture:this.handleCapture,width:n,disabled:s,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Fe(i,l){return fetch(i).then(t=>t.arrayBuffer()).then(t=>new File([t],l,{type:"image/jpeg"}))}export{Pe as default};
1
+ import{r as y,E,_ as R,c as C,Q as G,j as u,b1 as X,aK as k,aX as q,aG as Q,aY as O,b9 as z,e as J,g as K,a7 as Y,M as Z,ba as ee,bb as te,R as re,O as ie,$ as se,B as P,as as _,aU as ne,aT as ae,a_ as oe,a$ as le,bc as de,b0 as ce}from"./index-BwjoUCNo.js";import{F as he}from"./FormClearHelper-CgY1PHFo.js";import{U as V}from"./UploadFileInfo-C-jY39rj.js";import{P as ue,S as pe}from"./ProgressBar-Dtx4om_-.js";var L=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});L.displayName="Video";var D=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var $=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ge(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const W=C("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=C("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),fe=C("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),me=C("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),ve=C("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),Se=C("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),ye=C("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),we=C("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),be=C("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${G(i.colors.primary,.5)}`},...ge("medium",i)}),"");function H({disabled:i,onClick:l,children:t,progress:s}){return u.jsxs(be,{disabled:i||!1,onClick:l||(()=>{}),progress:s||null,"data-testid":"stCameraInputButton",children:[t,s&&u.jsx(we,{children:u.jsx(ue,{value:s,size:pe.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Me=({switchFacingMode:i})=>u.jsx(ye,{"data-testid":"stCameraInputSwitchButton",children:u.jsx(X,{content:"Switch camera",placement:k.TOP_RIGHT,children:u.jsx(q,{kind:Q.MINIMAL,onClick:i,children:u.jsx(O,{content:$,size:"twoXL",color:z.white})})})});var A={exports:{}};(function(i,l){(function(t,s){i.exports=s(y)})(J,function(t){return function(s){var n={};function a(o){if(n[o])return n[o].exports;var p=n[o]={i:o,l:!1,exports:{}};return s[o].call(p.exports,p,p.exports,a),p.l=!0,p.exports}return a.m=s,a.c=n,a.d=function(o,p,S){a.o(o,p)||Object.defineProperty(o,p,{enumerable:!0,get:S})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,p){if(p&1&&(o=a(o)),p&8||p&4&&typeof o=="object"&&o&&o.__esModule)return o;var S=Object.create(null);if(a.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:o}),p&2&&typeof o!="string")for(var x in o)a.d(S,x,(function(U){return o[U]}).bind(null,x));return S},a.n=function(o){var p=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(p,"a",p),p},a.o=function(o,p){return Object.prototype.hasOwnProperty.call(o,p)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(s,n,a){a.r(n);var o=a("react"),p=function(){var g=function(h,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,d){r.__proto__=d}||function(r,d){for(var c in d)d.hasOwnProperty(c)&&(r[c]=d[c])},g(h,e)};return function(h,e){g(h,e);function r(){this.constructor=h}h.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),S=function(){return S=Object.assign||function(g){for(var h,e=1,r=arguments.length;e<r;e++){h=arguments[e];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(g[d]=h[d])}return g},S.apply(this,arguments)},x=function(g,h){var e={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&h.indexOf(r)<0&&(e[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(g);d<r.length;d++)h.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(g,r[d])&&(e[r[d]]=g[r[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return h?new Promise(function(e,r){h.call(navigator,g,e,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var j=function(g){p(h,g);function h(e){var r=g.call(this,e)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return h.prototype.componentDidMount=function(){var e=this,r=e.state,d=e.props;if(this.unmounted=!1,!U()){d.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},h.prototype.componentDidUpdate=function(e){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(r.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(r.videoConstraints),w=e.minScreenshotWidth!==r.minScreenshotWidth,v=e.minScreenshotHeight!==r.minScreenshotHeight;(c||w||v)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},h.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},h.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(r){e.removeTrack(r),r.stop()}),e.getAudioTracks().map(function(r){e.removeTrack(r),r.stop()})):e.stop())},h.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(h.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},h.prototype.getScreenshot=function(e){var r=this,d=r.state,c=r.props;if(!d.hasUserMedia)return null;var w=this.getCanvas(e);return w&&w.toDataURL(c.screenshotFormat,c.screenshotQuality)},h.prototype.getCanvas=function(e){var r=this,d=r.state,c=r.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var f=w/v;w=c.minScreenshotWidth||this.video.clientWidth,v=w/f,c.minScreenshotHeight&&v<c.minScreenshotHeight&&(v=c.minScreenshotHeight,w=v*f)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||w,this.canvas.height=(e==null?void 0:e.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,m=M.canvas;return b&&m&&(m.width=(e==null?void 0:e.width)||m.width,m.height=(e==null?void 0:e.height)||m.height,c.mirrored&&(b.translate(m.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||m.width,(e==null?void 0:e.height)||m.height),c.mirrored&&(b.scale(-1,1),b.translate(-m.width,0))),m},h.prototype.requestUserMedia=function(){var e=this,r=this.props,d=function(v,f){var M={video:typeof f<"u"?f:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(m){e.unmounted||b!==e.requestUserMediaId?h.stopMediaStream(m):e.handleUserMedia(null,m)}).catch(function(m){e.handleUserMedia(m)})};if("mediaDevices"in navigator)d(r.audioConstraints,r.videoConstraints);else{var c=function(v){return{optional:[{sourceId:v}]}},w=function(v){var f=v.deviceId;return typeof f=="string"?f:Array.isArray(f)&&f.length>0?f[0]:typeof f=="object"&&f.ideal?f.ideal:null};MediaStreamTrack.getSources(function(v){var f=null,M=null;v.forEach(function(I){I.kind==="audio"?f=I.id:I.kind==="video"&&(M=I.id)});var b=w(r.audioConstraints);b&&(f=b);var m=w(r.videoConstraints);m&&(M=m),d(c(f),c(M))})}},h.prototype.handleUserMedia=function(e,r){var d=this.props;if(e||!r){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}d.onUserMedia(r)},h.prototype.render=function(){var e=this,r=this,d=r.state,c=r.props,w=c.audio;c.forceScreenshotSourceSize,c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,f=c.style,M=f===void 0?{}:f,b=c.children,m=x(c,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),I=v?S(S({},M),{transform:(M.transform||"")+" scaleX(-1)"}):M,N={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",S({autoPlay:!0,src:d.src,muted:!w,playsInline:!0,ref:function(B){e.video=B},style:I},m)),b&&b(N))},h.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},h}(o.Component);n.default=j},react:function(s,n){s.exports=t}}).default})})(A);var Ue=A.exports;const xe=K(Ue),Ce=({width:i})=>u.jsxs(T,{width:i,children:[u.jsx(O,{size:"threeXL",color:z.gray60,content:L}),u.jsxs(fe,{children:["This app would like to use your camera.",u.jsx(ve,{href:te,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),je=({handleCapture:i,width:l,disabled:t,clearPhotoInProgress:s,setClearPhotoInProgress:n,facingMode:a,setFacingMode:o,testOverride:p})=>{const[S,x]=y.useState(p||"pending"),U=y.useRef(null),[j,g]=y.useState(l),h=y.useCallback(Y(1e3,g),[]);y.useEffect(()=>{h(l)},[l,h]);function e(){if(U.current!==null){const d=U.current.getScreenshot();i(d)}}const r=Z();return u.jsxs(W,{"data-testid":"stCameraInputWebcamComponent",children:[S!=="success"&&!t&&!s?u.jsx(Ce,{width:j}):ee&&u.jsx(Me,{switchFacingMode:o}),u.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:S!=="success"&&!t&&!s,width:j,children:!t&&u.jsx(xe,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:j,height:j*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{x("error")},onUserMedia:()=>{x("success"),n(!1)},videoConstraints:{width:{ideal:j},facingMode:a}})}),u.jsx(H,{onClick:e,disabled:S!=="success"||t||s,children:"Take Photo"})]})},Ie=150;class Pe extends re.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new he,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=t=>{this.setState({clearPhotoInProgress:t})},this.setFacingMode=()=>{this.setState(t=>({facingMode:t.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=t=>{if(t===null)return Promise.resolve();this.setState({imgSrc:t,shutter:!0,minShutterEffectPassed:!1});const s=n=>new Promise(a=>setTimeout(a,n));return Fe(t,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(n=>this.props.uploadClient.fetchFileURLs([n]).then(a=>({file:n,fileUrls:a[0]}))).then(({file:n,fileUrls:a})=>this.uploadFile(a,n)).then(()=>s(Ie)).then(()=>{this.setState((n,a)=>({imgSrc:t,shutter:n.shutter,minShutterEffectPassed:!0}))}).catch(n=>{ie(n)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(t=>this.deleteFile(t.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:n,fragmentId:a}=this.props,o=n.getFileUploaderStateValue(s);se(t,o)||n.setFileUploaderStateValue(s,t,{fromUi:!0},a)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(P(t))return;this.setState({imgSrc:null});const{widgetMgr:s,element:n,fragmentId:a}=this.props;s.setFileUploaderStateValue(n,t,{fromUi:!0},a)})},this.deleteFile=t=>{const s=this.getFile(t);P(s)||(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(s=>({files:[...s.files,t]}))},this.removeFile=t=>{this.setState(s=>({files:s.files.filter(n=>n.id!==t)}))},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{this.setState(n=>({files:n.files.map(a=>a.id===t?s:a)}))},this.onUploadComplete=(t,s)=>{this.setState(()=>({shutter:!1}));const n=this.getFile(t);P(n)||n.status.type!=="uploading"||this.updateFile(n.id,n.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.onUploadProgress=(t,s)=>{const n=this.getFile(s);if(P(n)||n.status.type!=="uploading")return;const a=Math.round(t.loaded*100/t.total);n.status.progress!==a&&this.updateFile(s,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:a}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(t,s)=>{const n=_.CancelToken.source(),a=new V(s.name,s.size,this.nextLocalFileId(),{type:"uploading",cancelToken:n,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,o=>this.onUploadProgress(o,a.id),n.token).then(()=>this.onUploadComplete(a.id,t)).catch(o=>{_.isCancel(o)||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:o?o.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:t,element:s}=this.props,n=t.getFileUploaderStateValue(s);if(P(n))return l;const{uploadedFileInfo:a}=n;return P(a)||a.length===0?l:{files:a.map(o=>{const p=o.name,S=o.size,x=o.fileId,U=o.fileUrls;return new V(p,S,this.nextLocalFileId(),{type:"uploaded",fileId:x,fileUrls:U})}),imgSrc:a.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=t=>t.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:n}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,l,{fromUi:!1},n)}createWidgetValue(){const l=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:n,status:a}=t;return new ne({fileId:a.fileId,fileUrls:a.fileUrls,name:s,size:n})});return new ae({uploadedFileInfo:l})}render(){var a;const{element:l,widgetMgr:t,disabled:s,width:n}=this.props;return this.formClearHelper.manageFormClearListener(t,l.formId,this.onFormCleared),u.jsxs(W,{className:"stCameraInput","data-testid":"stCameraInput",children:[u.jsx(oe,{label:l.label,disabled:s,labelVisibility:le((a=l.labelVisibility)==null?void 0:a.value),children:l.help&&u.jsx(de,{children:u.jsx(ce,{content:l.help,placement:k.TOP_RIGHT})})}),this.state.imgSrc?u.jsxs(u.Fragment,{children:[u.jsx(T,{width:n,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&u.jsx(me,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:n,height:n*9/16})}),u.jsx(H,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||s,children:this.getProgress()?"Uploading...":u.jsxs(Se,{children:[u.jsx(O,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):u.jsx(je,{handleCapture:this.handleCapture,width:n,disabled:s,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Fe(i,l){return fetch(i).then(t=>t.arrayBuffer()).then(t=>new File([t],l,{type:"image/jpeg"}))}export{Pe as default};
@@ -1 +1 @@
1
- import{r as o,B as h,j as v,bP as c,a$ as I}from"./index-C1elUt1E.js";import{a as S}from"./useBasicWidgetState-D4lxC36U.js";import"./FormClearHelper-BtlF8Otx.js";const V=(e,t)=>e.getIntValue(t),w=e=>e.default??null,M=e=>e.value??null,P=(e,t,l,a)=>{t.setIntValue(e,l.value,{fromUi:l.fromUi},a)},U=({disabled:e,element:t,widgetMgr:l,width:a,fragmentId:d})=>{const{options:m,help:u,label:s,labelVisibility:r,placeholder:g}=t,[n,i]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:w,getCurrStateFromProto:M,updateWidgetMgrState:P,element:t,widgetMgr:l,fragmentId:d}),b=o.useCallback(p=>{i({value:p,fromUi:!0})},[i]),f=h(t.default)&&!e;return v.jsx(c,{label:s,labelVisibility:I(r==null?void 0:r.value),options:m,disabled:e,width:a,onChange:b,value:n,help:u,placeholder:g,clearable:f})},j=o.memo(U);export{j as default};
1
+ import{r as o,B as h,j as v,bP as c,a$ as I}from"./index-BwjoUCNo.js";import{a as S}from"./useBasicWidgetState-DYDJWF1h.js";import"./FormClearHelper-CgY1PHFo.js";const V=(e,t)=>e.getIntValue(t),w=e=>e.default??null,M=e=>e.value??null,P=(e,t,l,a)=>{t.setIntValue(e,l.value,{fromUi:l.fromUi},a)},U=({disabled:e,element:t,widgetMgr:l,width:a,fragmentId:d})=>{const{options:m,help:u,label:s,labelVisibility:r,placeholder:g}=t,[n,i]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:w,getCurrStateFromProto:M,updateWidgetMgrState:P,element:t,widgetMgr:l,fragmentId:d}),b=o.useCallback(p=>{i({value:p,fromUi:!0})},[i]),f=h(t.default)&&!e;return v.jsx(c,{label:s,labelVisibility:I(r==null?void 0:r.value),options:m,disabled:e,width:a,onChange:b,value:n,help:u,placeholder:g,clearable:f})},j=o.memo(U);export{j as default};