@stlite/desktop 0.79.6 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/build/assets/{FileDownload.esm-DJAez7Gm.js → FileDownload.esm-CGGZqf24.js} +1 -1
  2. package/build/assets/{FormClearHelper-BtlF8Otx.js → FormClearHelper-CgY1PHFo.js} +1 -1
  3. package/build/assets/{Hooks-DirHIiAM.js → Hooks-DSz3TreG.js} +1 -1
  4. package/build/assets/{InputInstructions-DJSzEvIq.js → InputInstructions-Da_XbwOd.js} +1 -1
  5. package/build/assets/{ProgressBar-BnrWSmyb.js → ProgressBar-Dtx4om_-.js} +1 -1
  6. package/build/assets/{RenderInPortalIfExists-Ca4-_0pe.js → RenderInPortalIfExists-CGcG4XZP.js} +1 -1
  7. package/build/assets/{Toolbar-BsqjDjhG.js → Toolbar-FcJw8P3i.js} +1 -1
  8. package/build/assets/{base-input-CgYn_7GU.js → base-input-CmONXDO4.js} +1 -1
  9. package/build/assets/{createSuper-0pNNY1_M.js → createSuper-DFd_7HWg.js} +1 -1
  10. package/build/assets/{data-grid-overlay-editor-CNFkKj8T.js → data-grid-overlay-editor-QBvhT7Gv.js} +1 -1
  11. package/build/assets/{downloader-DGmYJOpb.js → downloader-CMM-05VD.js} +1 -1
  12. package/build/assets/{es6-irkMYhr9.js → es6-DhhL9D4J.js} +2 -2
  13. package/build/assets/{getPrototypeOf-D0_3wfU4.js → getPrototypeOf-BuqC2LfE.js} +1 -1
  14. package/build/assets/{iframeResizer.contentWindow-D4yL-VeT.js → iframeResizer.contentWindow-YHmj42JB.js} +1 -1
  15. package/build/assets/{index-I5lK7nyO.js → index-8APIqgoz.js} +1 -1
  16. package/build/assets/{index-Dx6YQ-Hb.js → index-B-eWDw1Y.js} +1 -1
  17. package/build/assets/{index-DrFZgW3n.js → index-B234xKIE.js} +1 -1
  18. package/build/assets/{index-D2eWP7lT.js → index-B4n5HlkF.js} +1 -1
  19. package/build/assets/{index-DlLUjT1S.js → index-B525bGzJ.js} +1 -1
  20. package/build/assets/{index-ZUNcqgeq.js → index-BVUe3D3r.js} +5 -5
  21. package/build/assets/{index-Hu3FoAZP.js → index-BZSCrRo-.js} +1 -1
  22. package/build/assets/{index-CcWWS1JT.js → index-B_Id9-1s.js} +1 -1
  23. package/build/assets/{index-Pb86pUMm.js → index-Bdf8V5aG.js} +1 -1
  24. package/build/assets/{index-BFCLs_X3.js → index-BjWJFoG-.js} +1 -1
  25. package/build/assets/{index-C1elUt1E.js → index-BwjoUCNo.js} +4 -4
  26. package/build/assets/{index-DEXFHxro.js → index-C2H2QMCy.js} +1 -1
  27. package/build/assets/{index-YUTOpyBs.js → index-C4T9lB1B.js} +1 -1
  28. package/build/assets/{index-DBLWtqmb.js → index-CF-qa2K-.js} +1 -1
  29. package/build/assets/{index-ce2FoF0m.js → index-CU_ErDon.js} +1 -1
  30. package/build/assets/{index-BcpEGcBW.js → index-CVDdljau.js} +1 -1
  31. package/build/assets/{index-ChM6SngL.js → index-CVlJl5rr.js} +1 -1
  32. package/build/assets/{index-BFkh2EDe.js → index-CclTmpN7.js} +1 -1
  33. package/build/assets/{index-gVtKu3MD.js → index-Cx5RDj1j.js} +1 -1
  34. package/build/assets/{index-DE-qBTEd.js → index-D26NtueC.js} +1 -1
  35. package/build/assets/{index-Bo6fA87g.js → index-D4RoBA_O.js} +1 -1
  36. package/build/assets/{index-xxcWnwsb.js → index-DDdbfcty.js} +1 -1
  37. package/build/assets/{index-BQ4RtD02.js → index-DJR_P__y.js} +1 -1
  38. package/build/assets/{index-BByqVhYh.js → index-DVwGEZVS.js} +1 -1
  39. package/build/assets/{index-DVxRcwZL.js → index-DWYLSf3l.js} +1 -1
  40. package/build/assets/{index-DUZJI1KN.js → index-DYYkHfIj.js} +1 -1
  41. package/build/assets/{index-w3QLWMIe.js → index-D_v8mdkx.js} +1 -1
  42. package/build/assets/{index-ItgUgpY7.js → index-DdyJvCFp.js} +1 -1
  43. package/build/assets/{index-DmCANcEY.js → index-Ez6wOCxn.js} +1 -1
  44. package/build/assets/{index-BM4uLW3s.js → index-RsmuLiMj.js} +1 -1
  45. package/build/assets/{index-BXRfu-ak.js → index-Z97zCVlB.js} +1 -1
  46. package/build/assets/{index-CbfNI9jm.js → index-hYugbL4y.js} +1 -1
  47. package/build/assets/{index-zflrmcBt.js → index-owAG4lAc.js} +1 -1
  48. package/build/assets/{index-BKdmDn79.js → index-tPM7YhKy.js} +1 -1
  49. package/build/assets/{index-DWA8E9x2.js → index-vzzDJjGk.js} +1 -1
  50. package/build/assets/{index-m1mIjWp5.js → index-xwpN0M9S.js} +1 -1
  51. package/build/assets/{index-BVyxD_B8.js → index-zxdZLnOx.js} +1 -1
  52. package/build/assets/{input-i4Ci2N7G.js → input-uWrlyNdh.js} +1 -1
  53. package/build/assets/{memory-BfVZ1OlY.js → memory-C3YA36Ob.js} +1 -1
  54. package/build/assets/{number-overlay-editor-DZNxupwD.js → number-overlay-editor-cdMzdt98.js} +1 -1
  55. package/build/assets/{sandbox-C-kTFbag.js → sandbox-nkebs-Xk.js} +1 -1
  56. package/build/assets/{slicedToArray--nOyZAEU.js → slicedToArray-bge8IXL1.js} +1 -1
  57. package/build/assets/{textarea-CpIIPJux.js → textarea-BRC6-IPU.js} +1 -1
  58. package/build/assets/{timepicker-BNPmfeK3.js → timepicker-clKKYW7X.js} +1 -1
  59. package/build/assets/{uniqueId-BfZwKZCM.js → uniqueId-CyfnMhlx.js} +1 -1
  60. package/build/assets/{useBasicWidgetState-D4lxC36U.js → useBasicWidgetState-DYDJWF1h.js} +1 -1
  61. package/build/assets/{useOnInputChange-BtQcqF3z.js → useOnInputChange-Bri4Ggii.js} +1 -1
  62. package/build/assets/{withFullScreenWrapper-Cn2wnMdj.js → withFullScreenWrapper-CkF8UtaI.js} +1 -1
  63. package/build/assets/{worker-CzOlZWlF.js → worker-DYZLk67q.js} +1 -1
  64. package/build/index.html +1 -1
  65. package/build/pyodide/pyodide-lock.json +1 -1
  66. package/build/pyodide/pyodide.asm.js +1 -1
  67. package/build/pyodide/pyodide.asm.wasm +0 -0
  68. package/build/pyodide/pyodide.mjs +2 -2
  69. package/build/pyodide/python_stdlib.zip +0 -0
  70. package/package.json +6 -6
  71. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
@@ -1,2 +1,2 @@
1
- import{r as at,j as bt}from"./index-C1elUt1E.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:ie,setPrototypeOf:le,isFrozen:Ge,getPrototypeOf:Ye,getOwnPropertyDescriptor:je}=Object;let{freeze:E,seal:b,create:ce}=Object,{apply:St,construct:Rt}=typeof Reflect<"u"&&Reflect;E||(E=function(r){return r}),b||(b=function(r){return r}),St||(St=function(r,o,l){return r.apply(o,l)}),Rt||(Rt=function(r,o){return new r(...o)});const it=A(Array.prototype.forEach),se=A(Array.prototype.pop),X=A(Array.prototype.push),lt=A(String.prototype.toLowerCase),wt=A(String.prototype.toString),ue=A(String.prototype.match),q=A(String.prototype.replace),Xe=A(String.prototype.indexOf),qe=A(String.prototype.trim),S=A(Object.prototype.hasOwnProperty),_=A(RegExp.prototype.test),$=$e(TypeError);function A(r){return function(o){for(var l=arguments.length,i=new Array(l>1?l-1:0),d=1;d<l;d++)i[d-1]=arguments[d];return St(r,o,i)}}function $e(r){return function(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];return Rt(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;le&&le(r,null);let i=o.length;for(;i--;){let d=o[i];if(typeof d=="string"){const h=l(d);h!==d&&(Ge(o)||(o[i]=h),d=h)}r[d]=!0}return r}function Ke(r){for(let o=0;o<r.length;o++)S(r,o)||(r[o]=null);return r}function x(r){const o=ce(null);for(const[l,i]of ie(r))S(r,l)&&(Array.isArray(i)?o[l]=Ke(i):i&&typeof i=="object"&&i.constructor===Object?o[l]=x(i):o[l]=i);return o}function K(r,o){for(;r!==null;){const i=je(r,o);if(i){if(i.get)return A(i.get);if(typeof i.value=="function")return A(i.value)}r=Ye(r)}function l(){return null}return l}const me=E(["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"]),Lt=E(["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"]),Ct=E(["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"]),Ve=E(["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"]),vt=E(["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"]),Ze=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pe=E(["#text"]),fe=E(["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"]),Dt=E(["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"]),de=E(["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"]),ct=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Je=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qe=b(/<%[\w\W]*|[\w\W]*%>/gm),tn=b(/\${[\w\W]*}/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]/),nn=b(/^aria-[\-\w]+$/),ge=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),on=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),he=b(/^html$/i),an=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var Te=Object.freeze({__proto__:null,MUSTACHE_EXPR:Je,ERB_EXPR:Qe,TMPLIT_EXPR:tn,DATA_ATTR:en,ARIA_ATTR:nn,IS_ALLOWED_URI:ge,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:rn,DOCTYPE_NAME:he,CUSTOM_ELEMENT:an});const V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ln=function(){return typeof window>"u"?null:window},cn=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(l=o.getAttribute(i));const d="dompurify"+(l?"#"+l:"");try{return r.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}};function ye(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ln();const o=t=>ye(t);if(o.version="3.1.7",o.removed=[],!r||!r.document||r.document.nodeType!==V.document)return o.isSupported=!1,o;let{document:l}=r;const i=l,d=i.currentScript,{DocumentFragment:h,HTMLTemplateElement:Z,Node:k,Element:xt,NodeFilter:z,NamedNodeMap:Ee=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:_e,DOMParser:Ae,trustedTypes:J}=r,W=xt.prototype,Ne=K(W,"cloneNode"),be=K(W,"remove"),Se=K(W,"nextSibling"),Re=K(W,"childNodes"),Q=K(W,"parentNode");if(typeof Z=="function"){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let T,B="";const{implementation:st,createNodeIterator:we,createDocumentFragment:Le,getElementsByTagName:Ce}=l,{importNode:ve}=i;let R={};o.isSupported=typeof ie=="function"&&typeof Q=="function"&&st&&st.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ut,ERB_EXPR:mt,TMPLIT_EXPR:pt,DATA_ATTR:De,ARIA_ATTR:Oe,IS_SCRIPT_OR_DATA:xe,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:ke}=Te;let{IS_ALLOWED_URI:It}=Te,m=null;const Mt=a({},[...me,...Lt,...Ct,...vt,...pe]);let p=null;const Ut=a({},[...fe,...Dt,...de,...ct]);let s=Object.seal(ce(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}})),G=null,ft=null,Pt=!0,dt=!0,Ht=!1,Ft=!0,I=!1,gt=!0,D=!1,ht=!1,Tt=!1,M=!1,tt=!1,et=!1,zt=!0,Wt=!1;const Ie="user-content-";let yt=!0,Y=!1,U={},P=null;const Bt=a({},["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 Gt=null;const Yt=a({},["audio","video","img","source","image","track"]);let Et=null;const jt=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",L="http://www.w3.org/1999/xhtml";let H=L,_t=!1,At=null;const Me=a({},[nt,ot,L],wt);let j=null;const Ue=["application/xhtml+xml","text/html"],Pe="text/html";let f=null,F=null;const He=l.createElement("form"),Xt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===t)){if((!t||typeof t!="object")&&(t={}),t=x(t),j=Ue.indexOf(t.PARSER_MEDIA_TYPE)===-1?Pe:t.PARSER_MEDIA_TYPE,f=j==="application/xhtml+xml"?wt:lt,m=S(t,"ALLOWED_TAGS")?a({},t.ALLOWED_TAGS,f):Mt,p=S(t,"ALLOWED_ATTR")?a({},t.ALLOWED_ATTR,f):Ut,At=S(t,"ALLOWED_NAMESPACES")?a({},t.ALLOWED_NAMESPACES,wt):Me,Et=S(t,"ADD_URI_SAFE_ATTR")?a(x(jt),t.ADD_URI_SAFE_ATTR,f):jt,Gt=S(t,"ADD_DATA_URI_TAGS")?a(x(Yt),t.ADD_DATA_URI_TAGS,f):Yt,P=S(t,"FORBID_CONTENTS")?a({},t.FORBID_CONTENTS,f):Bt,G=S(t,"FORBID_TAGS")?a({},t.FORBID_TAGS,f):{},ft=S(t,"FORBID_ATTR")?a({},t.FORBID_ATTR,f):{},U=S(t,"USE_PROFILES")?t.USE_PROFILES:!1,Pt=t.ALLOW_ARIA_ATTR!==!1,dt=t.ALLOW_DATA_ATTR!==!1,Ht=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=t.SAFE_FOR_TEMPLATES||!1,gt=t.SAFE_FOR_XML!==!1,D=t.WHOLE_DOCUMENT||!1,M=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Tt=t.FORCE_BODY||!1,zt=t.SANITIZE_DOM!==!1,Wt=t.SANITIZE_NAMED_PROPS||!1,yt=t.KEEP_CONTENT!==!1,Y=t.IN_PLACE||!1,It=t.ALLOWED_URI_REGEXP||ge,H=t.NAMESPACE||L,s=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(s.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(s.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(s.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(dt=!1),tt&&(M=!0),U&&(m=a({},pe),p=[],U.html===!0&&(a(m,me),a(p,fe)),U.svg===!0&&(a(m,Lt),a(p,Dt),a(p,ct)),U.svgFilters===!0&&(a(m,Ct),a(p,Dt),a(p,ct)),U.mathMl===!0&&(a(m,vt),a(p,de),a(p,ct))),t.ADD_TAGS&&(m===Mt&&(m=x(m)),a(m,t.ADD_TAGS,f)),t.ADD_ATTR&&(p===Ut&&(p=x(p)),a(p,t.ADD_ATTR,f)),t.ADD_URI_SAFE_ATTR&&a(Et,t.ADD_URI_SAFE_ATTR,f),t.FORBID_CONTENTS&&(P===Bt&&(P=x(P)),a(P,t.FORBID_CONTENTS,f)),yt&&(m["#text"]=!0),D&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete G.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=t.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=cn(J,d)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));E&&E(t),F=t}},qt=a({},["mi","mo","mn","ms","mtext"]),$t=a({},["annotation-xml"]),Fe=a({},["title","style","font","a","script"]),Kt=a({},[...Lt,...Ct,...Ve]),Vt=a({},[...vt,...Ze]),ze=function(t){let n=Q(t);(!n||!n.tagName)&&(n={namespaceURI:H,tagName:"template"});const e=lt(t.tagName),c=lt(n.tagName);return At[t.namespaceURI]?t.namespaceURI===ot?n.namespaceURI===L?e==="svg":n.namespaceURI===nt?e==="svg"&&(c==="annotation-xml"||qt[c]):!!Kt[e]:t.namespaceURI===nt?n.namespaceURI===L?e==="math":n.namespaceURI===ot?e==="math"&&$t[c]:!!Vt[e]:t.namespaceURI===L?n.namespaceURI===ot&&!$t[c]||n.namespaceURI===nt&&!qt[c]?!1:!Vt[e]&&(Fe[e]||!Kt[e]):!!(j==="application/xhtml+xml"&&At[t.namespaceURI]):!1},O=function(t){X(o.removed,{element:t});try{Q(t).removeChild(t)}catch{be(t)}},rt=function(t,n){try{X(o.removed,{attribute:n.getAttributeNode(t),from:n})}catch{X(o.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is"&&!p[t])if(M||tt)try{O(n)}catch{}else try{n.setAttribute(t,"")}catch{}},Zt=function(t){let n=null,e=null;if(Tt)t="<remove></remove>"+t;else{const u=ue(t,/^[\r\n\t ]+/);e=u&&u[0]}j==="application/xhtml+xml"&&H===L&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const c=T?T.createHTML(t):t;if(H===L)try{n=new Ae().parseFromString(c,j)}catch{}if(!n||!n.documentElement){n=st.createDocument(H,"template",null);try{n.documentElement.innerHTML=_t?B:c}catch{}}const g=n.body||n.documentElement;return t&&e&&g.insertBefore(l.createTextNode(e),g.childNodes[0]||null),H===L?Ce.call(n,D?"html":"body")[0]:D?n.documentElement:g},Jt=function(t){return we.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Qt=function(t){return t instanceof _e&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof Ee)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},te=function(t){return typeof k=="function"&&t instanceof k},C=function(t,n,e){R[t]&&it(R[t],c=>{c.call(o,n,e,F)})},ee=function(t){let n=null;if(C("beforeSanitizeElements",t,null),Qt(t))return O(t),!0;const e=f(t.nodeName);if(C("uponSanitizeElement",t,{tagName:e,allowedTags:m}),t.hasChildNodes()&&!te(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent)||t.nodeType===V.progressingInstruction||gt&&t.nodeType===V.comment&&_(/<[/\w]/g,t.data))return O(t),!0;if(!m[e]||G[e]){if(!G[e]&&oe(e)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e)))return!1;if(yt&&!P[e]){const c=Q(t)||t.parentNode,g=Re(t)||t.childNodes;if(g&&c){const u=g.length;for(let v=u-1;v>=0;--v){const N=Ne(g[v],!0);N.__removalCount=(t.__removalCount||0)+1,c.insertBefore(N,Se(t))}}}return O(t),!0}return t instanceof xt&&!ze(t)||(e==="noscript"||e==="noembed"||e==="noframes")&&_(/<\/no(script|embed|frames)/i,t.innerHTML)?(O(t),!0):(I&&t.nodeType===V.text&&(n=t.textContent,it([ut,mt,pt],c=>{n=q(n,c," ")}),t.textContent!==n&&(X(o.removed,{element:t.cloneNode()}),t.textContent=n)),C("afterSanitizeElements",t,null),!1)},ne=function(t,n,e){if(zt&&(n==="id"||n==="name")&&(e in l||e in He))return!1;if(!(dt&&!ft[n]&&_(De,n))&&!(Pt&&_(Oe,n))){if(!p[n]||ft[n]){if(!(oe(t)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t))&&(s.attributeNameCheck instanceof RegExp&&_(s.attributeNameCheck,n)||s.attributeNameCheck instanceof Function&&s.attributeNameCheck(n))||n==="is"&&s.allowCustomizedBuiltInElements&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e))))return!1}else if(!Et[n]&&!_(It,q(e,kt,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&Xe(e,"data:")===0&&Gt[t])&&!(Ht&&!_(xe,q(e,kt,"")))&&e)return!1}return!0},oe=function(t){return t!=="annotation-xml"&&ue(t,ke)},re=function(t){C("beforeSanitizeAttributes",t,null);const{attributes:n}=t;if(!n)return;const e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=n.length;for(;c--;){const g=n[c],{name:u,namespaceURI:v,value:N}=g,w=f(u);let y=u==="value"?N:qe(N);if(e.attrName=w,e.attrValue=y,e.keepAttr=!0,e.forceKeepAttr=void 0,C("uponSanitizeAttribute",t,e),y=e.attrValue,e.forceKeepAttr||(rt(u,t),!e.keepAttr))continue;if(!Ft&&_(/\/>/i,y)){rt(u,t);continue}I&&it([ut,mt,pt],Be=>{y=q(y,Be," ")});const ae=f(t.nodeName);if(ne(ae,w,y)){if(Wt&&(w==="id"||w==="name")&&(rt(u,t),y=Ie+y),gt&&_(/((--!?|])>)|<\/(style|title)/i,y)){rt(u,t);continue}if(T&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!v)switch(J.getAttributeType(ae,w)){case"TrustedHTML":{y=T.createHTML(y);break}case"TrustedScriptURL":{y=T.createScriptURL(y);break}}try{v?t.setAttributeNS(v,u,y):t.setAttribute(u,y),Qt(t)?O(t):se(o.removed)}catch{}}}C("afterSanitizeAttributes",t,null)},We=function t(n){let e=null;const c=Jt(n);for(C("beforeSanitizeShadowDOM",n,null);e=c.nextNode();)C("uponSanitizeShadowNode",e,null),!ee(e)&&(e.content instanceof h&&t(e.content),re(e));C("afterSanitizeShadowDOM",n,null)};return o.sanitize=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,c=null,g=null,u=null;if(_t=!t,_t&&(t="<!-->"),typeof t!="string"&&!te(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!o.isSupported)return t;if(ht||Nt(n),o.removed=[],typeof t=="string"&&(Y=!1),Y){if(t.nodeName){const w=f(t.nodeName);if(!m[w]||G[w])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)e=Zt("<!---->"),c=e.ownerDocument.importNode(t,!0),c.nodeType===V.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?e=c:e.appendChild(c);else{if(!M&&!I&&!D&&t.indexOf("<")===-1)return T&&et?T.createHTML(t):t;if(e=Zt(t),!e)return M?null:et?B:""}e&&Tt&&O(e.firstChild);const v=Jt(Y?t:e);for(;g=v.nextNode();)ee(g)||(g.content instanceof h&&We(g.content),re(g));if(Y)return t;if(M){if(tt)for(u=Le.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(p.shadowroot||p.shadowrootmode)&&(u=ve.call(i,u,!0)),u}let N=D?e.outerHTML:e.innerHTML;return D&&m["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&_(he,e.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
1
+ import{r as at,j as bt}from"./index-BwjoUCNo.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:ie,setPrototypeOf:le,isFrozen:Ge,getPrototypeOf:Ye,getOwnPropertyDescriptor:je}=Object;let{freeze:E,seal:b,create:ce}=Object,{apply:St,construct:Rt}=typeof Reflect<"u"&&Reflect;E||(E=function(r){return r}),b||(b=function(r){return r}),St||(St=function(r,o,l){return r.apply(o,l)}),Rt||(Rt=function(r,o){return new r(...o)});const it=A(Array.prototype.forEach),se=A(Array.prototype.pop),X=A(Array.prototype.push),lt=A(String.prototype.toLowerCase),wt=A(String.prototype.toString),ue=A(String.prototype.match),q=A(String.prototype.replace),Xe=A(String.prototype.indexOf),qe=A(String.prototype.trim),S=A(Object.prototype.hasOwnProperty),_=A(RegExp.prototype.test),$=$e(TypeError);function A(r){return function(o){for(var l=arguments.length,i=new Array(l>1?l-1:0),d=1;d<l;d++)i[d-1]=arguments[d];return St(r,o,i)}}function $e(r){return function(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];return Rt(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;le&&le(r,null);let i=o.length;for(;i--;){let d=o[i];if(typeof d=="string"){const h=l(d);h!==d&&(Ge(o)||(o[i]=h),d=h)}r[d]=!0}return r}function Ke(r){for(let o=0;o<r.length;o++)S(r,o)||(r[o]=null);return r}function x(r){const o=ce(null);for(const[l,i]of ie(r))S(r,l)&&(Array.isArray(i)?o[l]=Ke(i):i&&typeof i=="object"&&i.constructor===Object?o[l]=x(i):o[l]=i);return o}function K(r,o){for(;r!==null;){const i=je(r,o);if(i){if(i.get)return A(i.get);if(typeof i.value=="function")return A(i.value)}r=Ye(r)}function l(){return null}return l}const me=E(["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"]),Lt=E(["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"]),Ct=E(["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"]),Ve=E(["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"]),vt=E(["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"]),Ze=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pe=E(["#text"]),fe=E(["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"]),Dt=E(["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"]),de=E(["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"]),ct=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Je=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qe=b(/<%[\w\W]*|[\w\W]*%>/gm),tn=b(/\${[\w\W]*}/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]/),nn=b(/^aria-[\-\w]+$/),ge=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),on=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),he=b(/^html$/i),an=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var Te=Object.freeze({__proto__:null,MUSTACHE_EXPR:Je,ERB_EXPR:Qe,TMPLIT_EXPR:tn,DATA_ATTR:en,ARIA_ATTR:nn,IS_ALLOWED_URI:ge,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:rn,DOCTYPE_NAME:he,CUSTOM_ELEMENT:an});const V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ln=function(){return typeof window>"u"?null:window},cn=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(l=o.getAttribute(i));const d="dompurify"+(l?"#"+l:"");try{return r.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}};function ye(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ln();const o=t=>ye(t);if(o.version="3.1.7",o.removed=[],!r||!r.document||r.document.nodeType!==V.document)return o.isSupported=!1,o;let{document:l}=r;const i=l,d=i.currentScript,{DocumentFragment:h,HTMLTemplateElement:Z,Node:k,Element:xt,NodeFilter:z,NamedNodeMap:Ee=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:_e,DOMParser:Ae,trustedTypes:J}=r,W=xt.prototype,Ne=K(W,"cloneNode"),be=K(W,"remove"),Se=K(W,"nextSibling"),Re=K(W,"childNodes"),Q=K(W,"parentNode");if(typeof Z=="function"){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let T,B="";const{implementation:st,createNodeIterator:we,createDocumentFragment:Le,getElementsByTagName:Ce}=l,{importNode:ve}=i;let R={};o.isSupported=typeof ie=="function"&&typeof Q=="function"&&st&&st.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ut,ERB_EXPR:mt,TMPLIT_EXPR:pt,DATA_ATTR:De,ARIA_ATTR:Oe,IS_SCRIPT_OR_DATA:xe,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:ke}=Te;let{IS_ALLOWED_URI:It}=Te,m=null;const Mt=a({},[...me,...Lt,...Ct,...vt,...pe]);let p=null;const Ut=a({},[...fe,...Dt,...de,...ct]);let s=Object.seal(ce(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}})),G=null,ft=null,Pt=!0,dt=!0,Ht=!1,Ft=!0,I=!1,gt=!0,D=!1,ht=!1,Tt=!1,M=!1,tt=!1,et=!1,zt=!0,Wt=!1;const Ie="user-content-";let yt=!0,Y=!1,U={},P=null;const Bt=a({},["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 Gt=null;const Yt=a({},["audio","video","img","source","image","track"]);let Et=null;const jt=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",L="http://www.w3.org/1999/xhtml";let H=L,_t=!1,At=null;const Me=a({},[nt,ot,L],wt);let j=null;const Ue=["application/xhtml+xml","text/html"],Pe="text/html";let f=null,F=null;const He=l.createElement("form"),Xt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===t)){if((!t||typeof t!="object")&&(t={}),t=x(t),j=Ue.indexOf(t.PARSER_MEDIA_TYPE)===-1?Pe:t.PARSER_MEDIA_TYPE,f=j==="application/xhtml+xml"?wt:lt,m=S(t,"ALLOWED_TAGS")?a({},t.ALLOWED_TAGS,f):Mt,p=S(t,"ALLOWED_ATTR")?a({},t.ALLOWED_ATTR,f):Ut,At=S(t,"ALLOWED_NAMESPACES")?a({},t.ALLOWED_NAMESPACES,wt):Me,Et=S(t,"ADD_URI_SAFE_ATTR")?a(x(jt),t.ADD_URI_SAFE_ATTR,f):jt,Gt=S(t,"ADD_DATA_URI_TAGS")?a(x(Yt),t.ADD_DATA_URI_TAGS,f):Yt,P=S(t,"FORBID_CONTENTS")?a({},t.FORBID_CONTENTS,f):Bt,G=S(t,"FORBID_TAGS")?a({},t.FORBID_TAGS,f):{},ft=S(t,"FORBID_ATTR")?a({},t.FORBID_ATTR,f):{},U=S(t,"USE_PROFILES")?t.USE_PROFILES:!1,Pt=t.ALLOW_ARIA_ATTR!==!1,dt=t.ALLOW_DATA_ATTR!==!1,Ht=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=t.SAFE_FOR_TEMPLATES||!1,gt=t.SAFE_FOR_XML!==!1,D=t.WHOLE_DOCUMENT||!1,M=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Tt=t.FORCE_BODY||!1,zt=t.SANITIZE_DOM!==!1,Wt=t.SANITIZE_NAMED_PROPS||!1,yt=t.KEEP_CONTENT!==!1,Y=t.IN_PLACE||!1,It=t.ALLOWED_URI_REGEXP||ge,H=t.NAMESPACE||L,s=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(s.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(s.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(s.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(dt=!1),tt&&(M=!0),U&&(m=a({},pe),p=[],U.html===!0&&(a(m,me),a(p,fe)),U.svg===!0&&(a(m,Lt),a(p,Dt),a(p,ct)),U.svgFilters===!0&&(a(m,Ct),a(p,Dt),a(p,ct)),U.mathMl===!0&&(a(m,vt),a(p,de),a(p,ct))),t.ADD_TAGS&&(m===Mt&&(m=x(m)),a(m,t.ADD_TAGS,f)),t.ADD_ATTR&&(p===Ut&&(p=x(p)),a(p,t.ADD_ATTR,f)),t.ADD_URI_SAFE_ATTR&&a(Et,t.ADD_URI_SAFE_ATTR,f),t.FORBID_CONTENTS&&(P===Bt&&(P=x(P)),a(P,t.FORBID_CONTENTS,f)),yt&&(m["#text"]=!0),D&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete G.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=t.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=cn(J,d)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));E&&E(t),F=t}},qt=a({},["mi","mo","mn","ms","mtext"]),$t=a({},["annotation-xml"]),Fe=a({},["title","style","font","a","script"]),Kt=a({},[...Lt,...Ct,...Ve]),Vt=a({},[...vt,...Ze]),ze=function(t){let n=Q(t);(!n||!n.tagName)&&(n={namespaceURI:H,tagName:"template"});const e=lt(t.tagName),c=lt(n.tagName);return At[t.namespaceURI]?t.namespaceURI===ot?n.namespaceURI===L?e==="svg":n.namespaceURI===nt?e==="svg"&&(c==="annotation-xml"||qt[c]):!!Kt[e]:t.namespaceURI===nt?n.namespaceURI===L?e==="math":n.namespaceURI===ot?e==="math"&&$t[c]:!!Vt[e]:t.namespaceURI===L?n.namespaceURI===ot&&!$t[c]||n.namespaceURI===nt&&!qt[c]?!1:!Vt[e]&&(Fe[e]||!Kt[e]):!!(j==="application/xhtml+xml"&&At[t.namespaceURI]):!1},O=function(t){X(o.removed,{element:t});try{Q(t).removeChild(t)}catch{be(t)}},rt=function(t,n){try{X(o.removed,{attribute:n.getAttributeNode(t),from:n})}catch{X(o.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is"&&!p[t])if(M||tt)try{O(n)}catch{}else try{n.setAttribute(t,"")}catch{}},Zt=function(t){let n=null,e=null;if(Tt)t="<remove></remove>"+t;else{const u=ue(t,/^[\r\n\t ]+/);e=u&&u[0]}j==="application/xhtml+xml"&&H===L&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const c=T?T.createHTML(t):t;if(H===L)try{n=new Ae().parseFromString(c,j)}catch{}if(!n||!n.documentElement){n=st.createDocument(H,"template",null);try{n.documentElement.innerHTML=_t?B:c}catch{}}const g=n.body||n.documentElement;return t&&e&&g.insertBefore(l.createTextNode(e),g.childNodes[0]||null),H===L?Ce.call(n,D?"html":"body")[0]:D?n.documentElement:g},Jt=function(t){return we.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Qt=function(t){return t instanceof _e&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof Ee)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},te=function(t){return typeof k=="function"&&t instanceof k},C=function(t,n,e){R[t]&&it(R[t],c=>{c.call(o,n,e,F)})},ee=function(t){let n=null;if(C("beforeSanitizeElements",t,null),Qt(t))return O(t),!0;const e=f(t.nodeName);if(C("uponSanitizeElement",t,{tagName:e,allowedTags:m}),t.hasChildNodes()&&!te(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent)||t.nodeType===V.progressingInstruction||gt&&t.nodeType===V.comment&&_(/<[/\w]/g,t.data))return O(t),!0;if(!m[e]||G[e]){if(!G[e]&&oe(e)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e)))return!1;if(yt&&!P[e]){const c=Q(t)||t.parentNode,g=Re(t)||t.childNodes;if(g&&c){const u=g.length;for(let v=u-1;v>=0;--v){const N=Ne(g[v],!0);N.__removalCount=(t.__removalCount||0)+1,c.insertBefore(N,Se(t))}}}return O(t),!0}return t instanceof xt&&!ze(t)||(e==="noscript"||e==="noembed"||e==="noframes")&&_(/<\/no(script|embed|frames)/i,t.innerHTML)?(O(t),!0):(I&&t.nodeType===V.text&&(n=t.textContent,it([ut,mt,pt],c=>{n=q(n,c," ")}),t.textContent!==n&&(X(o.removed,{element:t.cloneNode()}),t.textContent=n)),C("afterSanitizeElements",t,null),!1)},ne=function(t,n,e){if(zt&&(n==="id"||n==="name")&&(e in l||e in He))return!1;if(!(dt&&!ft[n]&&_(De,n))&&!(Pt&&_(Oe,n))){if(!p[n]||ft[n]){if(!(oe(t)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t))&&(s.attributeNameCheck instanceof RegExp&&_(s.attributeNameCheck,n)||s.attributeNameCheck instanceof Function&&s.attributeNameCheck(n))||n==="is"&&s.allowCustomizedBuiltInElements&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e))))return!1}else if(!Et[n]&&!_(It,q(e,kt,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&Xe(e,"data:")===0&&Gt[t])&&!(Ht&&!_(xe,q(e,kt,"")))&&e)return!1}return!0},oe=function(t){return t!=="annotation-xml"&&ue(t,ke)},re=function(t){C("beforeSanitizeAttributes",t,null);const{attributes:n}=t;if(!n)return;const e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=n.length;for(;c--;){const g=n[c],{name:u,namespaceURI:v,value:N}=g,w=f(u);let y=u==="value"?N:qe(N);if(e.attrName=w,e.attrValue=y,e.keepAttr=!0,e.forceKeepAttr=void 0,C("uponSanitizeAttribute",t,e),y=e.attrValue,e.forceKeepAttr||(rt(u,t),!e.keepAttr))continue;if(!Ft&&_(/\/>/i,y)){rt(u,t);continue}I&&it([ut,mt,pt],Be=>{y=q(y,Be," ")});const ae=f(t.nodeName);if(ne(ae,w,y)){if(Wt&&(w==="id"||w==="name")&&(rt(u,t),y=Ie+y),gt&&_(/((--!?|])>)|<\/(style|title)/i,y)){rt(u,t);continue}if(T&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!v)switch(J.getAttributeType(ae,w)){case"TrustedHTML":{y=T.createHTML(y);break}case"TrustedScriptURL":{y=T.createScriptURL(y);break}}try{v?t.setAttributeNS(v,u,y):t.setAttribute(u,y),Qt(t)?O(t):se(o.removed)}catch{}}}C("afterSanitizeAttributes",t,null)},We=function t(n){let e=null;const c=Jt(n);for(C("beforeSanitizeShadowDOM",n,null);e=c.nextNode();)C("uponSanitizeShadowNode",e,null),!ee(e)&&(e.content instanceof h&&t(e.content),re(e));C("afterSanitizeShadowDOM",n,null)};return o.sanitize=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,c=null,g=null,u=null;if(_t=!t,_t&&(t="<!-->"),typeof t!="string"&&!te(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!o.isSupported)return t;if(ht||Nt(n),o.removed=[],typeof t=="string"&&(Y=!1),Y){if(t.nodeName){const w=f(t.nodeName);if(!m[w]||G[w])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)e=Zt("<!---->"),c=e.ownerDocument.importNode(t,!0),c.nodeType===V.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?e=c:e.appendChild(c);else{if(!M&&!I&&!D&&t.indexOf("<")===-1)return T&&et?T.createHTML(t):t;if(e=Zt(t),!e)return M?null:et?B:""}e&&Tt&&O(e.firstChild);const v=Jt(Y?t:e);for(;g=v.nextNode();)ee(g)||(g.content instanceof h&&We(g.content),re(g));if(Y)return t;if(M){if(tt)for(u=Le.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(p.shadowroot||p.shadowrootmode)&&(u=ve.call(i,u,!0)),u}let N=D?e.outerHTML:e.innerHTML;return D&&m["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&_(he,e.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
2
2
  `+N),I&&it([ut,mt,pt],w=>{N=q(N,w," ")}),T&&et?T.createHTML(N):N},o.setConfig=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(t),ht=!0},o.clearConfig=function(){F=null,ht=!1},o.isValidAttribute=function(t,n,e){F||Nt({});const c=f(t),g=f(n);return ne(c,g,e)},o.addHook=function(t,n){typeof n=="function"&&(R[t]=R[t]||[],X(R[t],n))},o.removeHook=function(t){if(R[t])return se(R[t])},o.removeHooks=function(t){R[t]&&(R[t]=[])},o.removeAllHooks=function(){R={}},o}var sn=ye();const Ot=r=>{const o={USE_PROFILES:{html:!0},FORCE_BODY:!0};return sn.sanitize(r,o)};function un({element:r,width:o}){const{body:l}=r,[i,d]=at.useState(Ot(l)),h=at.useRef(null);return at.useEffect(()=>{Ot(l)!==i&&d(Ot(l))},[l]),at.useEffect(()=>{var Z,k;((Z=h.current)==null?void 0:Z.clientHeight)===0&&((k=h.current.parentElement)==null?void 0:k.childElementCount)===1&&h.current.parentElement.classList.add("stHtml-empty")}),bt.jsx(bt.Fragment,{children:i&&bt.jsx("div",{className:"stHtml","data-testid":"stHtml",ref:h,style:{width:o},dangerouslySetInnerHTML:{__html:i}})})}export{un as default};
@@ -1 +1 @@
1
- import{r as o,j as s,bj as n,a$ as b}from"./index-C1elUt1E.js";import{a as f}from"./useBasicWidgetState-D4lxC36U.js";import"./FormClearHelper-BtlF8Otx.js";const p=(e,t)=>e.getStringValue(t),S=e=>e.default??null,h=e=>e.value??null,v=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},c=({element:e,disabled:t,widgetMgr:a,width:l,fragmentId:g})=>{var i;const[m,r]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:S,getCurrStateFromProto:h,updateWidgetMgrState:v,element:e,widgetMgr:a,fragmentId:g}),u=o.useCallback(d=>{r({value:d,fromUi:!0})},[r]);return s.jsx(n,{label:e.label,labelVisibility:b((i=e.labelVisibility)==null?void 0:i.value),help:e.help,onChange:u,disabled:t,width:l,value:m})},w=o.memo(c);export{w as default};
1
+ import{r as o,j as s,bj as n,a$ as b}from"./index-BwjoUCNo.js";import{a as f}from"./useBasicWidgetState-DYDJWF1h.js";import"./FormClearHelper-CgY1PHFo.js";const p=(e,t)=>e.getStringValue(t),S=e=>e.default??null,h=e=>e.value??null,v=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},c=({element:e,disabled:t,widgetMgr:a,width:l,fragmentId:g})=>{var i;const[m,r]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:S,getCurrStateFromProto:h,updateWidgetMgrState:v,element:e,widgetMgr:a,fragmentId:g}),u=o.useCallback(d=>{r({value:d,fromUi:!0})},[r]);return s.jsx(n,{label:e.label,labelVisibility:b((i=e.labelVisibility)==null?void 0:i.value),help:e.help,onChange:u,disabled:t,width:l,value:m})},w=o.memo(c);export{w as default};
@@ -1 +1 @@
1
- import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-C1elUt1E.js";import{I as K}from"./InputInstructions-DJSzEvIq.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-CpIIPJux.js";import"./base-input-CgYn_7GU.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
1
+ import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-BwjoUCNo.js";import{I as K}from"./InputInstructions-Da_XbwOd.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-BRC6-IPU.js";import"./base-input-CmONXDO4.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};