streamlit-nightly 1.44.2.dev20250404__py3-none-any.whl → 1.44.2.dev20250407__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. streamlit/elements/lib/built_in_chart_utils.py +47 -36
  2. streamlit/elements/lib/event_utils.py +7 -5
  3. streamlit/elements/markdown.py +1 -1
  4. streamlit/elements/write.py +3 -1
  5. streamlit/static/index.html +1 -1
  6. streamlit/static/static/js/{FileDownload.esm.BcMiTwVB.js → FileDownload.esm.76_siAan.js} +1 -1
  7. streamlit/static/static/js/{FileHelper.DihUx7xB.js → FileHelper.C-t60d9I.js} +1 -1
  8. streamlit/static/static/js/{FormClearHelper.BCWMbvg-.js → FormClearHelper.BxIPIP5L.js} +1 -1
  9. streamlit/static/static/js/{Hooks.DxswZylT.js → Hooks.CsneG6D-.js} +1 -1
  10. streamlit/static/static/js/{InputInstructions.C3IYQW66.js → InputInstructions.CzJqQPUo.js} +1 -1
  11. streamlit/static/static/js/{ProgressBar.DsZ44eAG.js → ProgressBar.rnqmSFc7.js} +1 -1
  12. streamlit/static/static/js/{RenderInPortalIfExists.CJo1XNP4.js → RenderInPortalIfExists.BT1iglcq.js} +1 -1
  13. streamlit/static/static/js/{Toolbar.zC9RMqvO.js → Toolbar.C-G8EZDL.js} +1 -1
  14. streamlit/static/static/js/{base-input.BYAE3JfB.js → base-input.BE23gnVe.js} +1 -1
  15. streamlit/static/static/js/{checkbox.B4yv-nA3.js → checkbox.5KG91rAf.js} +1 -1
  16. streamlit/static/static/js/{createSuper.BYXiuZs5.js → createSuper.Djpx0JHn.js} +1 -1
  17. streamlit/static/static/js/{data-grid-overlay-editor.BRSP4Q5h.js → data-grid-overlay-editor.D5ZEJ6-g.js} +1 -1
  18. streamlit/static/static/js/{downloader.GnadH9DP.js → downloader.2PLh9ewR.js} +1 -1
  19. streamlit/static/static/js/{es6.D8RYB6b-.js → es6.Co_R4Vrv.js} +2 -2
  20. streamlit/static/static/js/{iframeResizer.contentWindow.CjNDfwt8.js → iframeResizer.contentWindow.xC-s1Xv_.js} +1 -1
  21. streamlit/static/static/js/{index.W1F0OM9G.js → index.3lMrZLLw.js} +1 -1
  22. streamlit/static/static/js/{index.Kzz4gUPJ.js → index.5KFYXBbC.js} +4 -4
  23. streamlit/static/static/js/{index.CPBJk1lp.js → index.7G_phRf1.js} +1 -1
  24. streamlit/static/static/js/{index.CdPagNhq.js → index.7c-G8UGV.js} +1 -1
  25. streamlit/static/static/js/{index.BRhhwv-C.js → index.BDCmLPQN.js} +1 -1
  26. streamlit/static/static/js/{index.CDSPljq3.js → index.BDb06VAk.js} +1 -1
  27. streamlit/static/static/js/{index.BPtOLSNm.js → index.BLuvs8YB.js} +1 -1
  28. streamlit/static/static/js/{index.C_2tXwz4.js → index.BhQfRF6s.js} +1 -1
  29. streamlit/static/static/js/{index.PKWaMjh6.js → index.BhwLaup4.js} +1 -1
  30. streamlit/static/static/js/{index.DuHTqH_9.js → index.C4Lfn2XI.js} +1 -1
  31. streamlit/static/static/js/{index.Cxfze3Mk.js → index.CD3nk9Fu.js} +1 -1
  32. streamlit/static/static/js/index.CHq7UPqh.js +1 -0
  33. streamlit/static/static/js/{index.Dgn3lt9J.js → index.CL9k-WRa.js} +1 -1
  34. streamlit/static/static/js/{index.CbT7y4TK.js → index.CLlijDQ8.js} +1 -1
  35. streamlit/static/static/js/{index.B7qpqtD6.js → index.CMDu4q8N.js} +1 -1
  36. streamlit/static/static/js/{index.CzrE9emY.js → index.CNErThK-.js} +1 -1
  37. streamlit/static/static/js/{index.BbAJYVXj.js → index.CVpc4758.js} +1 -1
  38. streamlit/static/static/js/{index.DOpTXgh3.js → index.CbEMdCQd.js} +1 -1
  39. streamlit/static/static/js/{index.CBxn7sji.js → index.CbPbNHEK.js} +1 -1
  40. streamlit/static/static/js/{index.DKCBo3om.js → index.CdIt7R38.js} +1 -1
  41. streamlit/static/static/js/{index.CRMmBBDq.js → index.Cm77Rq1x.js} +1 -1
  42. streamlit/static/static/js/{index.B3WIarqf.js → index.CwBkmOEf.js} +1 -1
  43. streamlit/static/static/js/{index.BC5wAIFM.js → index.D8OA-3wz.js} +1 -1
  44. streamlit/static/static/js/{index.UKdSrnn_.js → index.DEqbXo0i.js} +1 -1
  45. streamlit/static/static/js/{index.CkZkpK4-.js → index.DIQp9MZY.js} +1 -1
  46. streamlit/static/static/js/{index.DuV4oQbx.js → index.DNsBOU6p.js} +5 -5
  47. streamlit/static/static/js/{index.NmHUotTf.js → index.DSs7V2Hz.js} +1 -1
  48. streamlit/static/static/js/{index.nEP2fCOO.js → index.DUB8mvGX.js} +1 -1
  49. streamlit/static/static/js/{index.BDlCQX5I.js → index.DZ1bfx6i.js} +1 -1
  50. streamlit/static/static/js/{index.CrEVoSTM.js → index.DhlyA8r5.js} +1 -1
  51. streamlit/static/static/js/{index.Dcg-1sHd.js → index.DpkiOR-s.js} +1 -1
  52. streamlit/static/static/js/{index.BqkJyhUo.js → index.DyhGBqck.js} +1 -1
  53. streamlit/static/static/js/{index.DRrj4vJq.js → index.G5BB57Lk.js} +1 -1
  54. streamlit/static/static/js/{index.CzUmKu1R.js → index.KrzfTD2f.js} +1 -1
  55. streamlit/static/static/js/{index.Bxba7-Vj.js → index.LEPdg6O5.js} +1 -1
  56. streamlit/static/static/js/{index.Dv3BUspB.js → index.fNuc0k1L.js} +1 -1
  57. streamlit/static/static/js/{index.Dg7ksnn2.js → index.uyVXCnCm.js} +1 -1
  58. streamlit/static/static/js/{input.B970MGo0.js → input.Dj1y6w2g.js} +1 -1
  59. streamlit/static/static/js/{memory.Bds5EpZ8.js → memory.ClgbFfRV.js} +1 -1
  60. streamlit/static/static/js/{mergeWith.zOP131Mw.js → mergeWith.p3MKF-Jv.js} +1 -1
  61. streamlit/static/static/js/{number-overlay-editor.BxGwsHaY.js → number-overlay-editor.DSy8B0d4.js} +1 -1
  62. streamlit/static/static/js/{possibleConstructorReturn.CngyaSWa.js → possibleConstructorReturn.PqdlS9VN.js} +1 -1
  63. streamlit/static/static/js/{sandbox.COLAm094.js → sandbox.JYNAoHIv.js} +1 -1
  64. streamlit/static/static/js/{textarea.DrttbSkr.js → textarea.BRz2PqBl.js} +1 -1
  65. streamlit/static/static/js/{timepicker.D02-j0jX.js → timepicker.CLWT7Rjp.js} +1 -1
  66. streamlit/static/static/js/{toConsumableArray.EMFv73a7.js → toConsumableArray.BesBwzeG.js} +1 -1
  67. streamlit/static/static/js/{uniqueId.CdAsXj9D.js → uniqueId.HRwxnbrd.js} +1 -1
  68. streamlit/static/static/js/{useBasicWidgetState.BDsVFj3k.js → useBasicWidgetState.QU3v4y2-.js} +1 -1
  69. streamlit/static/static/js/{useOnInputChange.C8C1na1y.js → useOnInputChange.BbhxtdXj.js} +1 -1
  70. streamlit/static/static/js/{withFullScreenWrapper.BBFCh9IR.js → withFullScreenWrapper.BhOSdZrO.js} +1 -1
  71. streamlit/type_util.py +1 -1
  72. {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/METADATA +1 -1
  73. {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/RECORD +77 -77
  74. streamlit/static/static/js/index.BD4E56NB.js +0 -1
  75. {streamlit_nightly-1.44.2.dev20250404.data → streamlit_nightly-1.44.2.dev20250407.data}/scripts/streamlit.cmd +0 -0
  76. {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/WHEEL +0 -0
  77. {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/entry_points.txt +0 -0
  78. {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as i,j as c,br as g,bP as b}from"./index.Kzz4gUPJ.js";import{a as m}from"./useBasicWidgetState.BDsVFj3k.js";import"./FormClearHelper.BCWMbvg-.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},P=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:r,fragmentId:o}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(P);export{k as default};
1
+ import{r as i,j as c,br as g,bP as b}from"./index.5KFYXBbC.js";import{a as m}from"./useBasicWidgetState.QU3v4y2-.js";import"./FormClearHelper.BxIPIP5L.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},P=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:r,fragmentId:o}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(P);export{k as default};
@@ -1 +1 @@
1
- import{n as U,r as a,bi as R,j as m,l as w}from"./index.Kzz4gUPJ.js";const A=U("iframe",{target:"eymnmwl0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),O=w.getLogger("Video"),P={width:"100%"};function $({element:r,endpoints:i,elementMgr:p}){const s=a.useRef(null),{type:v,url:f,startTime:n,subtitles:u,endTime:c,loop:l,autoplay:S,muted:g}=r,T=a.useMemo(()=>{if(!r.id)return!0;const e=p.getElementState(r.id,"preventAutoplay");return e||p.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,p]),E=a.useMemo(()=>JSON.stringify(u?u.map(e=>i.buildMediaURL(`${e.url}`)):[]),[u,i]);a.useEffect(()=>{const e=JSON.parse(E);e.length!==0&&e.forEach(t=>{i.checkSourceUrlResponse(t,"Video Subtitle")})},[E,i]),a.useEffect(()=>{s.current&&(s.current.currentTime=n)},[n]),a.useEffect(()=>{const e=s.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),a.useEffect(()=>{const e=s.current;if(!e)return;let t=!1;const d=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",d),()=>{e&&c>0&&e.removeEventListener("timeupdate",d)}},[c,l,n]),a.useEffect(()=>{const e=s.current;if(!e)return;const t=()=>{l&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[l,n]);const V=e=>{const{startTime:t,endTime:d,loop:b,autoplay:L,muted:N}=r,o=new URL(e);if(t&&!isNaN(t)&&o.searchParams.append("start",t.toString()),d&&!isNaN(d)&&o.searchParams.append("end",d.toString()),b){o.searchParams.append("loop","1");const y=o.pathname.split("/").pop();y&&o.searchParams.append("playlist",y)}return L&&o.searchParams.append("autoplay","1"),N&&o.searchParams.append("mute","1"),o.toString()};if(v===R.Type.YOUTUBE_IFRAME)return m(A,{className:"stVideo","data-testid":"stVideo",title:f,src:V(f),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;O.error(`Client Error: Video source error - ${t}`),i.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return m("video",{className:"stVideo","data-testid":"stVideo",ref:s,controls:!0,muted:g,autoPlay:S&&!T,src:i.buildMediaURL(f),style:P,crossOrigin:void 0,onError:h,children:u&&u.map((e,t)=>m("track",{kind:"captions",src:i.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const M=a.memo($);export{M as default};
1
+ import{n as U,r as a,bi as R,j as m,l as w}from"./index.5KFYXBbC.js";const A=U("iframe",{target:"eymnmwl0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),O=w.getLogger("Video"),P={width:"100%"};function $({element:r,endpoints:i,elementMgr:p}){const s=a.useRef(null),{type:v,url:f,startTime:n,subtitles:u,endTime:c,loop:l,autoplay:S,muted:g}=r,T=a.useMemo(()=>{if(!r.id)return!0;const e=p.getElementState(r.id,"preventAutoplay");return e||p.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,p]),E=a.useMemo(()=>JSON.stringify(u?u.map(e=>i.buildMediaURL(`${e.url}`)):[]),[u,i]);a.useEffect(()=>{const e=JSON.parse(E);e.length!==0&&e.forEach(t=>{i.checkSourceUrlResponse(t,"Video Subtitle")})},[E,i]),a.useEffect(()=>{s.current&&(s.current.currentTime=n)},[n]),a.useEffect(()=>{const e=s.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),a.useEffect(()=>{const e=s.current;if(!e)return;let t=!1;const d=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",d),()=>{e&&c>0&&e.removeEventListener("timeupdate",d)}},[c,l,n]),a.useEffect(()=>{const e=s.current;if(!e)return;const t=()=>{l&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[l,n]);const V=e=>{const{startTime:t,endTime:d,loop:b,autoplay:L,muted:N}=r,o=new URL(e);if(t&&!isNaN(t)&&o.searchParams.append("start",t.toString()),d&&!isNaN(d)&&o.searchParams.append("end",d.toString()),b){o.searchParams.append("loop","1");const y=o.pathname.split("/").pop();y&&o.searchParams.append("playlist",y)}return L&&o.searchParams.append("autoplay","1"),N&&o.searchParams.append("mute","1"),o.toString()};if(v===R.Type.YOUTUBE_IFRAME)return m(A,{className:"stVideo","data-testid":"stVideo",title:f,src:V(f),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;O.error(`Client Error: Video source error - ${t}`),i.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return m("video",{className:"stVideo","data-testid":"stVideo",ref:s,controls:!0,muted:g,autoPlay:S&&!T,src:i.buildMediaURL(f),style:P,crossOrigin:void 0,onError:h,children:u&&u.map((e,t)=>m("track",{kind:"captions",src:i.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const M=a.memo($);export{M as default};
@@ -1,2 +1,2 @@
1
- import{n as jt,r as Ce,bh as Vt,j as lt,F as $t}from"./index.Kzz4gUPJ.js";/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:gt,setPrototypeOf:ct,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ht}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});we||(we=function(n,l,r){return n.apply(l,r)});xe||(xe=function(n,l){return new n(...l)});const se=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),V=R(Array.prototype.push),Qt=R(Array.prototype.splice),ce=R(String.prototype.toLowerCase),be=R(String.prototype.toString),ut=R(String.prototype.match),$=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),A=R(RegExp.prototype.test),q=nn(TypeError);function R(a){return function(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),u=1;u<l;u++)r[u-1]=arguments[u];return we(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return xe(a,l)}}function s(a,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const y=l(u);y!==u&&(qt(n)||(n[r]=y),u=y)}a[u]=!0}return a}function on(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[l,r]of gt(a))b(a,l)&&(Array.isArray(r)?n[l]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[l]=x(r):n[l]=r);return n}function K(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function l(){return null}return l}const mt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ne=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),De=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ie=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pt=S(["#text"]),dt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Me=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),At=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var Et=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:St,ERB_EXPR:ln,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,l){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";l&&l.hasAttribute(u)&&(r=l.getAttribute(u));const y="dompurify"+(r?"#"+r:"");try{return n.createPolicy(y,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+y+" could not be created."),null}},_t=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Rt(i);if(n.version="3.2.4",n.removed=[],!a||!a.document||a.document.nodeType!==Z.document||!a.Element)return n.isSupported=!1,n;let{document:l}=a;const r=l,u=r.currentScript,{DocumentFragment:y,HTMLTemplateElement:I,Node:fe,Element:ve,NodeFilter:z,NamedNodeMap:Ot=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Lt,trustedTypes:J}=a,G=ve.prototype,bt=K(G,"cloneNode"),Nt=K(G,"remove"),Dt=K(G,"nextSibling"),It=K(G,"childNodes"),Q=K(G,"parentNode");if(typeof I=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let _,W="";const{implementation:ue,createNodeIterator:Mt,createDocumentFragment:Ct,getElementsByTagName:wt}=l,{importNode:xt}=r;let g=_t();n.isSupported=typeof gt=="function"&&typeof Q=="function"&&ue&&ue.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:Ue,CUSTOM_ELEMENT:Ut}=Et;let{IS_ALLOWED_URI:Fe}=Et,m=null;const He=s({},[...mt,...Ne,...De,...Ie,...pt]);let d=null;const ze=s({},[...dt,...Me,...Tt,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Te=null,Ge=!0,Ee=!0,We=!1,Be=!0,P=!1,_e=!0,w=!1,ge=!1,he=!1,k=!1,ee=!1,te=!1,Ye=!0,Xe=!1;const Ft="user-content-";let Ae=!0,Y=!1,v={},U=null;const je=s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=s({},["audio","video","img","source","image","track"]);let Se=null;const qe=s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let F=M,Re=!1,Oe=null;const Ht=s({},[ne,oe,M],be);let ie=s({},["mi","mo","mn","ms","mtext"]),ae=s({},["annotation-xml"]);const zt=s({},["title","style","font","a","script"]);let X=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,H=null;const Bt=l.createElement("form"),Ke=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),X=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?be:ce,m=b(e,"ALLOWED_TAGS")?s({},e.ALLOWED_TAGS,p):He,d=b(e,"ALLOWED_ATTR")?s({},e.ALLOWED_ATTR,p):ze,Oe=b(e,"ALLOWED_NAMESPACES")?s({},e.ALLOWED_NAMESPACES,be):Ht,Se=b(e,"ADD_URI_SAFE_ATTR")?s(x(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=b(e,"ADD_DATA_URI_TAGS")?s(x($e),e.ADD_DATA_URI_TAGS,p):$e,U=b(e,"FORBID_CONTENTS")?s({},e.FORBID_CONTENTS,p):je,B=b(e,"FORBID_TAGS")?s({},e.FORBID_TAGS,p):{},Te=b(e,"FORBID_ATTR")?s({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,We=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,_e=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,ee=e.RETURN_DOM_FRAGMENT||!1,te=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,Ye=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ae=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||At,F=e.NAMESPACE||M,ie=e.MATHML_TEXT_INTEGRATION_POINTS||ie,ae=e.HTML_INTEGRATION_POINTS||ae,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ee&&(k=!0),v&&(m=s({},pt),d=[],v.html===!0&&(s(m,mt),s(d,dt)),v.svg===!0&&(s(m,Ne),s(d,Me),s(d,le)),v.svgFilters===!0&&(s(m,De),s(d,Me),s(d,le)),v.mathMl===!0&&(s(m,Ie),s(d,Tt),s(d,le))),e.ADD_TAGS&&(m===He&&(m=x(m)),s(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=x(d)),s(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&s(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=x(U)),s(U,e.FORBID_CONTENTS,p)),Ae&&(m["#text"]=!0),w&&s(m,["html","head","body"]),m.table&&(s(m,["tbody"]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,W=_.createHTML("")}else _===void 0&&(_=En(J,u)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Ze=s({},[...Ne,...De,...an]),Je=s({},[...Ie,...rn]),Yt=function(e){let t=Q(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===oe?t.namespaceURI===M?o==="svg":t.namespaceURI===ne?o==="svg"&&(c==="annotation-xml"||ie[c]):!!Ze[o]:e.namespaceURI===ne?t.namespaceURI===M?o==="math":t.namespaceURI===oe?o==="math"&&ae[c]:!!Je[o]:e.namespaceURI===M?t.namespaceURI===oe&&!ae[c]||t.namespaceURI===ne&&!ie[c]?!1:!Je[o]&&(zt[o]||!Ze[o]):!!(X==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},N=function(e){V(n.removed,{element:e});try{Q(e).removeChild(e)}catch{Nt(e)}},re=function(e,t){try{V(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{V(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||ee)try{N(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const T=ut(e,/^[\r\n\t ]+/);o=T&&T[0]}X==="application/xhtml+xml"&&F===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===M)try{t=new Lt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=ue.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(l.createTextNode(o),E.childNodes[0]||null),F===M?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Mt.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Ot)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},tt=function(e){return typeof fe=="function"&&e instanceof fe};function C(i,e,t){se(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(C(g.beforeSanitizeElements,e,null),Le(e))return N(e),!0;const o=p(e.nodeName);if(C(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!tt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||_e&&e.nodeType===Z.comment&&A(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(Ae&&!U[o]){const c=Q(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let O=T-1;O>=0;--O){const D=bt(E[O],!0);D.__removalCount=(e.__removalCount||0)+1,c.insertBefore(D,Dt(e))}}}return N(e),!0}return e instanceof ve&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&A(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,se([me,pe,de],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),C(g.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in l||o in Bt))return!1;if(!(Ee&&!Te[t]&&A(Pt,t))){if(!(Ge&&A(kt,t))){if(!d[t]||Te[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&A(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Se[t]){if(!A(Fe,$(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ve[e])){if(!(We&&!A(vt,$(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ut)},at=function(e){C(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:O,value:D}=E,j=p(T);let h=T==="value"?D:tn(D);if(o.attrName=j,o.attrValue=h,o.keepAttr=!0,o.forceKeepAttr=void 0,C(g.uponSanitizeAttribute,e,o),h=o.attrValue,Xe&&(j==="id"||j==="name")&&(re(T,e),h=Ft+h),_e&&A(/((--!?|])>)|<\/(style|title)/i,h)){re(T,e);continue}if(o.forceKeepAttr||(re(T,e),!o.keepAttr))continue;if(!Be&&A(/\/>/i,h)){re(T,e);continue}P&&se([me,pe,de],st=>{h=$(h,st," ")});const rt=p(e.nodeName);if(ot(rt,j,h)){if(_&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!O)switch(J.getAttributeType(rt,j)){case"TrustedHTML":{h=_.createHTML(h);break}case"TrustedScriptURL":{h=_.createScriptURL(h);break}}try{O?e.setAttributeNS(O,T,h):e.setAttribute(T,h),Le(e)?N(e):ft(n.removed)}catch{}}}C(g.afterSanitizeAttributes,e,null)},Xt=function i(e){let t=null;const o=et(e);for(C(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)C(g.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof y&&i(t.content);C(g.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!tt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!n.isSupported)return i;if(ge||ye(e),n.removed=[],typeof i=="string"&&(Y=!1),Y){if(i.nodeName){const D=p(i.nodeName);if(!m[D]||B[D])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof fe)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Z.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return _&&te?_.createHTML(i):i;if(t=Qe(i),!t)return k?null:te?W:""}t&&he&&N(t.firstChild);const T=et(Y?i:t);for(;c=T.nextNode();)nt(c),at(c),c.content instanceof y&&Xt(c.content);if(Y)return i;if(k){if(ee)for(E=Ct.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(d.shadowroot||d.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&A(St,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{n as jt,r as Ce,bh as Vt,j as lt,F as $t}from"./index.5KFYXBbC.js";/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:gt,setPrototypeOf:ct,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ht}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});we||(we=function(n,l,r){return n.apply(l,r)});xe||(xe=function(n,l){return new n(...l)});const se=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),V=R(Array.prototype.push),Qt=R(Array.prototype.splice),ce=R(String.prototype.toLowerCase),be=R(String.prototype.toString),ut=R(String.prototype.match),$=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),A=R(RegExp.prototype.test),q=nn(TypeError);function R(a){return function(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),u=1;u<l;u++)r[u-1]=arguments[u];return we(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return xe(a,l)}}function s(a,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const y=l(u);y!==u&&(qt(n)||(n[r]=y),u=y)}a[u]=!0}return a}function on(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[l,r]of gt(a))b(a,l)&&(Array.isArray(r)?n[l]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[l]=x(r):n[l]=r);return n}function K(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function l(){return null}return l}const mt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ne=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),De=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ie=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pt=S(["#text"]),dt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Me=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),At=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var Et=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:St,ERB_EXPR:ln,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,l){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";l&&l.hasAttribute(u)&&(r=l.getAttribute(u));const y="dompurify"+(r?"#"+r:"");try{return n.createPolicy(y,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+y+" could not be created."),null}},_t=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Rt(i);if(n.version="3.2.4",n.removed=[],!a||!a.document||a.document.nodeType!==Z.document||!a.Element)return n.isSupported=!1,n;let{document:l}=a;const r=l,u=r.currentScript,{DocumentFragment:y,HTMLTemplateElement:I,Node:fe,Element:ve,NodeFilter:z,NamedNodeMap:Ot=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Lt,trustedTypes:J}=a,G=ve.prototype,bt=K(G,"cloneNode"),Nt=K(G,"remove"),Dt=K(G,"nextSibling"),It=K(G,"childNodes"),Q=K(G,"parentNode");if(typeof I=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let _,W="";const{implementation:ue,createNodeIterator:Mt,createDocumentFragment:Ct,getElementsByTagName:wt}=l,{importNode:xt}=r;let g=_t();n.isSupported=typeof gt=="function"&&typeof Q=="function"&&ue&&ue.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:Ue,CUSTOM_ELEMENT:Ut}=Et;let{IS_ALLOWED_URI:Fe}=Et,m=null;const He=s({},[...mt,...Ne,...De,...Ie,...pt]);let d=null;const ze=s({},[...dt,...Me,...Tt,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Te=null,Ge=!0,Ee=!0,We=!1,Be=!0,P=!1,_e=!0,w=!1,ge=!1,he=!1,k=!1,ee=!1,te=!1,Ye=!0,Xe=!1;const Ft="user-content-";let Ae=!0,Y=!1,v={},U=null;const je=s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=s({},["audio","video","img","source","image","track"]);let Se=null;const qe=s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let F=M,Re=!1,Oe=null;const Ht=s({},[ne,oe,M],be);let ie=s({},["mi","mo","mn","ms","mtext"]),ae=s({},["annotation-xml"]);const zt=s({},["title","style","font","a","script"]);let X=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,H=null;const Bt=l.createElement("form"),Ke=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),X=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?be:ce,m=b(e,"ALLOWED_TAGS")?s({},e.ALLOWED_TAGS,p):He,d=b(e,"ALLOWED_ATTR")?s({},e.ALLOWED_ATTR,p):ze,Oe=b(e,"ALLOWED_NAMESPACES")?s({},e.ALLOWED_NAMESPACES,be):Ht,Se=b(e,"ADD_URI_SAFE_ATTR")?s(x(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=b(e,"ADD_DATA_URI_TAGS")?s(x($e),e.ADD_DATA_URI_TAGS,p):$e,U=b(e,"FORBID_CONTENTS")?s({},e.FORBID_CONTENTS,p):je,B=b(e,"FORBID_TAGS")?s({},e.FORBID_TAGS,p):{},Te=b(e,"FORBID_ATTR")?s({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,We=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,_e=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,ee=e.RETURN_DOM_FRAGMENT||!1,te=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,Ye=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ae=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||At,F=e.NAMESPACE||M,ie=e.MATHML_TEXT_INTEGRATION_POINTS||ie,ae=e.HTML_INTEGRATION_POINTS||ae,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ee&&(k=!0),v&&(m=s({},pt),d=[],v.html===!0&&(s(m,mt),s(d,dt)),v.svg===!0&&(s(m,Ne),s(d,Me),s(d,le)),v.svgFilters===!0&&(s(m,De),s(d,Me),s(d,le)),v.mathMl===!0&&(s(m,Ie),s(d,Tt),s(d,le))),e.ADD_TAGS&&(m===He&&(m=x(m)),s(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=x(d)),s(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&s(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=x(U)),s(U,e.FORBID_CONTENTS,p)),Ae&&(m["#text"]=!0),w&&s(m,["html","head","body"]),m.table&&(s(m,["tbody"]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,W=_.createHTML("")}else _===void 0&&(_=En(J,u)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Ze=s({},[...Ne,...De,...an]),Je=s({},[...Ie,...rn]),Yt=function(e){let t=Q(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===oe?t.namespaceURI===M?o==="svg":t.namespaceURI===ne?o==="svg"&&(c==="annotation-xml"||ie[c]):!!Ze[o]:e.namespaceURI===ne?t.namespaceURI===M?o==="math":t.namespaceURI===oe?o==="math"&&ae[c]:!!Je[o]:e.namespaceURI===M?t.namespaceURI===oe&&!ae[c]||t.namespaceURI===ne&&!ie[c]?!1:!Je[o]&&(zt[o]||!Ze[o]):!!(X==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},N=function(e){V(n.removed,{element:e});try{Q(e).removeChild(e)}catch{Nt(e)}},re=function(e,t){try{V(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{V(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||ee)try{N(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const T=ut(e,/^[\r\n\t ]+/);o=T&&T[0]}X==="application/xhtml+xml"&&F===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===M)try{t=new Lt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=ue.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(l.createTextNode(o),E.childNodes[0]||null),F===M?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Mt.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Ot)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},tt=function(e){return typeof fe=="function"&&e instanceof fe};function C(i,e,t){se(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(C(g.beforeSanitizeElements,e,null),Le(e))return N(e),!0;const o=p(e.nodeName);if(C(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!tt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||_e&&e.nodeType===Z.comment&&A(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(Ae&&!U[o]){const c=Q(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let O=T-1;O>=0;--O){const D=bt(E[O],!0);D.__removalCount=(e.__removalCount||0)+1,c.insertBefore(D,Dt(e))}}}return N(e),!0}return e instanceof ve&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&A(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,se([me,pe,de],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),C(g.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in l||o in Bt))return!1;if(!(Ee&&!Te[t]&&A(Pt,t))){if(!(Ge&&A(kt,t))){if(!d[t]||Te[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&A(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Se[t]){if(!A(Fe,$(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ve[e])){if(!(We&&!A(vt,$(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ut)},at=function(e){C(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:O,value:D}=E,j=p(T);let h=T==="value"?D:tn(D);if(o.attrName=j,o.attrValue=h,o.keepAttr=!0,o.forceKeepAttr=void 0,C(g.uponSanitizeAttribute,e,o),h=o.attrValue,Xe&&(j==="id"||j==="name")&&(re(T,e),h=Ft+h),_e&&A(/((--!?|])>)|<\/(style|title)/i,h)){re(T,e);continue}if(o.forceKeepAttr||(re(T,e),!o.keepAttr))continue;if(!Be&&A(/\/>/i,h)){re(T,e);continue}P&&se([me,pe,de],st=>{h=$(h,st," ")});const rt=p(e.nodeName);if(ot(rt,j,h)){if(_&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!O)switch(J.getAttributeType(rt,j)){case"TrustedHTML":{h=_.createHTML(h);break}case"TrustedScriptURL":{h=_.createScriptURL(h);break}}try{O?e.setAttributeNS(O,T,h):e.setAttribute(T,h),Le(e)?N(e):ft(n.removed)}catch{}}}C(g.afterSanitizeAttributes,e,null)},Xt=function i(e){let t=null;const o=et(e);for(C(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)C(g.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof y&&i(t.content);C(g.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!tt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!n.isSupported)return i;if(ge||ye(e),n.removed=[],typeof i=="string"&&(Y=!1),Y){if(i.nodeName){const D=p(i.nodeName);if(!m[D]||B[D])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof fe)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Z.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return _&&te?_.createHTML(i):i;if(t=Qe(i),!t)return k?null:te?W:""}t&&he&&N(t.firstChild);const T=et(Y?i:t);for(;c=T.nextNode();)nt(c),at(c),c.content instanceof y&&Xt(c.content);if(Y)return i;if(k){if(ee)for(E=Ct.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(d.shadowroot||d.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&A(St,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+O),P&&se([me,pe,de],D=>{O=$(O,D," ")}),_&&te?_.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),ge=!0},n.clearConfig=function(){H=null,ge=!1},n.isValidAttribute=function(i,e,t){H||ye({});const o=p(i),c=p(e);return ot(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&V(g[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Jt(g[i],e);return t===-1?void 0:Qt(g[i],t,1)[0]}return ft(g[i])},n.removeHooks=function(i){g[i]=[]},n.removeAllHooks=function(){g=_t()},n}var ke=Rt();const _n=jt("div",{target:"ez8s6cm0"})({width:"100%"}),Pe="data-temp-href-target";ke.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(Pe,"_blank")});ke.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(Pe)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(Pe))});const gn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return ke.sanitize(a,n)};function hn({element:a}){const{body:n}=a,[l,r]=Vt(),u=Ce.useMemo(()=>gn(n),[n]);return Ce.useEffect(()=>{var y,I;((y=r.current)==null?void 0:y.clientHeight)===0&&l>=0&&((I=r.current.parentElement)==null?void 0:I.childElementCount)===1&&r.current.parentElement.classList.add("stHtml-empty")}),lt($t,{children:u&&lt(_n,{className:"stHtml","data-testid":"stHtml",ref:r,dangerouslySetInnerHTML:{__html:u}})})}const Sn=Ce.memo(hn);export{Sn as default};
@@ -1 +1 @@
1
- import{r as y,E as T,_ as O,n as I,J as K,C as P,j as f,bu as Y,ba as A,bp as Z,b5 as ee,bo as j,bB as z,d as te,g as re,aL as ie,z as ae,bC as ne,bD as oe,bE as se,R as le,l as de,aA as ce,M as x,bl as ue,bk as pe,br as he,bF as fe,bs as ge,bt as me,F as ve}from"./index.Kzz4gUPJ.js";import{a as V}from"./index.t--hEgTQ.js";import{F as Se}from"./FormClearHelper.BCWMbvg-.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.DsZ44eAG.js";var N=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{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"}))});N.displayName="Video";var D=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{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 H=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{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"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function Re({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n?f(Fe,{children:f(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const q=y.memo(Re);var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const xe=({switchFacingMode:t})=>f(Ee,{"data-testid":"stCameraInputSwitchButton",children:f(Y,{content:"Switch camera",placement:A.TOP_RIGHT,children:f(Z,{kind:ee.MINIMAL,onClick:t,children:f(j,{content:H,size:"twoXL",color:z.white})})})}),_e=y.memo(xe);var _={exports:{}},Te=_.exports,B;function Oe(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(Te,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),M=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||M||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var M=this.getCanvas(e);return M&&M.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var M=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=M/S;M=c.minScreenshotWidth||this.video.clientWidth,S=M/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,M=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||M,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,b=w.ctx,h=w.canvas;return b&&h&&(h.width=(e==null?void 0:e.width)||h.width,h.height=(e==null?void 0:e.height)||h.height,c.mirrored&&(b.translate(h.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||h.width,(e==null?void 0:e.height)||h.height),c.mirrored&&(b.scale(-1,1),b.translate(-h.width,0))),h},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(h){e.unmounted||b!==e.requestUserMediaId?u.stopMediaStream(h):e.handleUserMedia(null,h)}).catch(function(h){e.handleUserMedia(h)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},M=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var b=M(i.audioConstraints);b&&(v=b);var h=M(i.videoConstraints);h&&(w=h),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,M=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,b=w===void 0?{}:w,h=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,J={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!M,playsInline:!0,ref:function(Q){e.video=Q},style:X},R)),h&&h(J))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var je=Oe();const We=re(je);var $;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})($||($={}));const Ve=({width:t})=>P(W,{width:t,children:[f(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",f(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Le=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=y.useState(p||"pending"),C=y.useRef(null),[E,m]=y.useState(l),u=y.useCallback(ie(1e3,m),[]);y.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?f(Ve,{width:E}):ne.isMobile&&f(_e,{switchFacingMode:s}),f(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&f(We,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),f(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},ke=y.memo(Le),Be=150,$e=de.getLogger("CameraInput");class Ae extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return ze(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Be)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{$e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[f(me,{label:l.label,disabled:n,labelVisibility:he((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&f(fe,{children:f(ge,{content:l.help,placement:A.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[f(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&f(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),f(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[f(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):f(ke,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function ze(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const Xe=se(Ae);export{Xe as default};
1
+ import{r as y,E as T,_ as O,n as I,J as K,C as P,j as f,bu as Y,ba as A,bp as Z,b5 as ee,bo as j,bB as z,d as te,g as re,aL as ie,z as ae,bC as ne,bD as oe,bE as se,R as le,l as de,aA as ce,M as x,bl as ue,bk as pe,br as he,bF as fe,bs as ge,bt as me,F as ve}from"./index.5KFYXBbC.js";import{a as V}from"./index.t--hEgTQ.js";import{F as Se}from"./FormClearHelper.BxIPIP5L.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.rnqmSFc7.js";var N=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{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"}))});N.displayName="Video";var D=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{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 H=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{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"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function Re({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n?f(Fe,{children:f(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const q=y.memo(Re);var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const xe=({switchFacingMode:t})=>f(Ee,{"data-testid":"stCameraInputSwitchButton",children:f(Y,{content:"Switch camera",placement:A.TOP_RIGHT,children:f(Z,{kind:ee.MINIMAL,onClick:t,children:f(j,{content:H,size:"twoXL",color:z.white})})})}),_e=y.memo(xe);var _={exports:{}},Te=_.exports,B;function Oe(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(Te,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),M=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||M||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var M=this.getCanvas(e);return M&&M.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var M=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=M/S;M=c.minScreenshotWidth||this.video.clientWidth,S=M/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,M=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||M,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,b=w.ctx,h=w.canvas;return b&&h&&(h.width=(e==null?void 0:e.width)||h.width,h.height=(e==null?void 0:e.height)||h.height,c.mirrored&&(b.translate(h.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||h.width,(e==null?void 0:e.height)||h.height),c.mirrored&&(b.scale(-1,1),b.translate(-h.width,0))),h},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(h){e.unmounted||b!==e.requestUserMediaId?u.stopMediaStream(h):e.handleUserMedia(null,h)}).catch(function(h){e.handleUserMedia(h)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},M=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var b=M(i.audioConstraints);b&&(v=b);var h=M(i.videoConstraints);h&&(w=h),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,M=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,b=w===void 0?{}:w,h=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,J={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!M,playsInline:!0,ref:function(Q){e.video=Q},style:X},R)),h&&h(J))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var je=Oe();const We=re(je);var $;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})($||($={}));const Ve=({width:t})=>P(W,{width:t,children:[f(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",f(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Le=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=y.useState(p||"pending"),C=y.useRef(null),[E,m]=y.useState(l),u=y.useCallback(ie(1e3,m),[]);y.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?f(Ve,{width:E}):ne.isMobile&&f(_e,{switchFacingMode:s}),f(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&f(We,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),f(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},ke=y.memo(Le),Be=150,$e=de.getLogger("CameraInput");class Ae extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return ze(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Be)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{$e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[f(me,{label:l.label,disabled:n,labelVisibility:he((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&f(fe,{children:f(ge,{content:l.help,placement:A.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[f(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&f(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),f(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[f(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):f(ke,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function ze(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const Xe=se(Ae);export{Xe as default};
@@ -1,2 +1,2 @@
1
- import{bw as v,r as l,ci as q,cn as w,ck as p}from"./index.Kzz4gUPJ.js";import{R as C,c as S,d as J,B as M}from"./base-input.BYAE3JfB.js";function _(e){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bw as v,r as l,ci as q,cn as w,ck as p}from"./index.5KFYXBbC.js";import{R as C,c as S,d as J,B as M}from"./base-input.BE23gnVe.js";function _(e){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,B=u.EndEnhancer,F=I(u,U),T=I(o,Z),x=v(b,C),g=O(x,2),$=g[0],N=g[1],D=v(A,S),E=O(D,2),W=E[0],k=E[1],z=v(B,S),P=O(z,2),H=P[0],L=P[1],s=J(this.props,this.state);return l.createElement($,f({"data-baseweb":"input"},s,N,{$adjoined:R(a,i),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),c(a)&&l.createElement(W,f({},s,k,{$position:w.start}),typeof a=="function"?a(s):a),l.createElement(M,f({},T,{overrides:F,adjoined:R(a,i),onFocus:this.onFocus,onBlur:this.onBlur})),c(i)&&l.createElement(H,f({},s,L,{$position:w.end}),typeof i=="function"?i(s):i))}}]),r}(l.Component);d(ie,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:q.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function R(e,t){return c(e)&&c(t)?p.both:c(e)?p.left:c(t)?p.right:p.none}function c(e){return!!(e||e===0)}export{ie as I};
@@ -1 +1 @@
1
- import{c as p,e as c}from"./es6.D8RYB6b-.js";import"./index.Kzz4gUPJ.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
1
+ import{c as p,e as c}from"./es6.Co_R4Vrv.js";import"./index.5KFYXBbC.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
@@ -1 +1 @@
1
- import{aN as u,aO as m,g as h}from"./index.Kzz4gUPJ.js";var e,r;function W(){if(r)return e;r=1;var t=u(),a=m(),i=a(function(s,g,n,o){t(s,g,n,o)});return e=i,e}var c=W();const v=h(c);export{v as m};
1
+ import{aN as u,aO as m,g as h}from"./index.5KFYXBbC.js";var e,r;function W(){if(r)return e;r=1;var t=u(),a=m(),i=a(function(s,g,n,o){t(s,g,n,o)});return e=i,e}var c=W();const v=h(c);export{v as m};
@@ -1,4 +1,4 @@
1
- import{R as X,r as T}from"./index.Kzz4gUPJ.js";import{s as Te}from"./index.DuV4oQbx.js";import"./FormClearHelper.BCWMbvg-.js";import"./withFullScreenWrapper.BBFCh9IR.js";import"./Toolbar.zC9RMqvO.js";import"./checkbox.B4yv-nA3.js";import"./mergeWith.zOP131Mw.js";import"./sprintf.D7DtBTRn.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.EMFv73a7.js";import"./possibleConstructorReturn.CngyaSWa.js";import"./createSuper.BYXiuZs5.js";import"./FileDownload.esm.BcMiTwVB.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
1
+ import{R as X,r as T}from"./index.5KFYXBbC.js";import{s as Te}from"./index.DNsBOU6p.js";import"./FormClearHelper.BxIPIP5L.js";import"./withFullScreenWrapper.BhOSdZrO.js";import"./Toolbar.C-G8EZDL.js";import"./checkbox.5KG91rAf.js";import"./mergeWith.p3MKF-Jv.js";import"./sprintf.D7DtBTRn.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.BesBwzeG.js";import"./possibleConstructorReturn.PqdlS9VN.js";import"./createSuper.Djpx0JHn.js";import"./FileDownload.esm.76_siAan.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
4
  decimalSeparator: `+n+` (default value for decimalSeparator is .)
@@ -1 +1 @@
1
- import{c9 as u,ca as c,aw as s,aT as f}from"./index.Kzz4gUPJ.js";function n(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o}function p(t,e){if(t){if(typeof t=="string")return n(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,u(o.key),o)}}function b(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(t)}function d(t,e){if(e&&(s(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}export{_,b as a,y as b,i as c,d,p as e,n as f};
1
+ import{c9 as u,ca as c,aw as s,aT as f}from"./index.5KFYXBbC.js";function n(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o}function p(t,e){if(t){if(typeof t=="string")return n(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,u(o.key),o)}}function b(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(t)}function d(t,e){if(e&&(s(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}export{_,b as a,y as b,i as c,d,p as e,n as f};
@@ -1 +1 @@
1
- import{e as l}from"./es6.D8RYB6b-.js";import"./index.Kzz4gUPJ.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
1
+ import{e as l}from"./es6.Co_R4Vrv.js";import"./index.5KFYXBbC.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
@@ -1,2 +1,2 @@
1
- import{bv as h,bw as T,bX as j,r as d,ci as x,cj as R}from"./index.Kzz4gUPJ.js";import{g as $,a as I,b as A,B as F}from"./base-input.BYAE3JfB.js";function _(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 s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=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},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bv as h,bw as T,bX as j,r as d,ci as x,cj as R}from"./index.5KFYXBbC.js";import{g as $,a as I,b as A,B as F}from"./base-input.BE23gnVe.js";function _(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 s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=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},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){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 N(e,t){if(e){if(typeof e=="string")return w(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 w(e,t)}}function w(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 C(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(y){i=!0,u=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function D(e){if(Array.isArray(e))return e}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(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 q(e,t,r){return t&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(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&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},v(e,t)}function H(e){var t=W();return function(){var n=p(e),o;if(t){var i=p(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return L(this,o)}}function L(e,t){if(t&&(b(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 f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(){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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var X=function(e){M(r,e);var t=H(r);function r(){var n;K(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),c(f(n),"state",{isFocused:n.props.autoFocus||!1}),c(f(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),c(f(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return q(r,[{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,a=T(i.Root,O),u=B(a,2),y=u[0],P=u[1],S=j({Input:{component:g},InputContainer:{component:m}},i);return d.createElement(y,l({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},P),d.createElement(F,l({},this.props,{type:R.textarea,overrides:S,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);c(X,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:x.default});export{X as T};