streamlit-nightly 1.44.2.dev20250403__py3-none-any.whl → 1.44.2.dev20250406__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.
- streamlit/config.py +38 -17
- streamlit/elements/lib/built_in_chart_utils.py +47 -36
- streamlit/elements/lib/event_utils.py +7 -5
- streamlit/elements/markdown.py +1 -1
- streamlit/elements/write.py +3 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.B3kD8CdX.js → FileDownload.esm.BcMiTwVB.js} +1 -1
- streamlit/static/static/js/{FileHelper.CZMZF2jC.js → FileHelper.DihUx7xB.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BjztopwY.js → FormClearHelper.BCWMbvg-.js} +1 -1
- streamlit/static/static/js/{Hooks.B2w-p718.js → Hooks.DxswZylT.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CuF13wx9.js → InputInstructions.C3IYQW66.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BbIgSlVa.js → ProgressBar.DsZ44eAG.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.yENMDBLa.js → RenderInPortalIfExists.CJo1XNP4.js} +1 -1
- streamlit/static/static/js/{Toolbar.DJ7G2mIO.js → Toolbar.zC9RMqvO.js} +1 -1
- streamlit/static/static/js/{base-input.DIlOlDo4.js → base-input.BYAE3JfB.js} +1 -1
- streamlit/static/static/js/{checkbox.BQjuWiaH.js → checkbox.B4yv-nA3.js} +1 -1
- streamlit/static/static/js/{createSuper.DsCxV-v8.js → createSuper.BYXiuZs5.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.D4K6HcP0.js → data-grid-overlay-editor.BRSP4Q5h.js} +1 -1
- streamlit/static/static/js/{downloader.Lq-fJZlW.js → downloader.GnadH9DP.js} +1 -1
- streamlit/static/static/js/{es6.BE-9QZmp.js → es6.D8RYB6b-.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CVN6zezL.js → iframeResizer.contentWindow.CjNDfwt8.js} +1 -1
- streamlit/static/static/js/{index.B1gZ98Ih.js → index.B3WIarqf.js} +1 -1
- streamlit/static/static/js/{index.BMWHViZF.js → index.B7qpqtD6.js} +1 -1
- streamlit/static/static/js/{index.B7RGQCfs.js → index.BC5wAIFM.js} +1 -1
- streamlit/static/static/js/{index.0HztFnVa.js → index.BD4E56NB.js} +1 -1
- streamlit/static/static/js/{index.B2XNA40L.js → index.BDlCQX5I.js} +1 -1
- streamlit/static/static/js/{index.5819-zgt.js → index.BPtOLSNm.js} +1 -1
- streamlit/static/static/js/{index.Bs_nrSu4.js → index.BRhhwv-C.js} +1 -1
- streamlit/static/static/js/{index.B-KH-iJ1.js → index.BbAJYVXj.js} +1 -1
- streamlit/static/static/js/{index.Dw1CjpSH.js → index.BqkJyhUo.js} +1 -1
- streamlit/static/static/js/{index.CbDE21BB.js → index.Bxba7-Vj.js} +1 -1
- streamlit/static/static/js/{index.BDovkxCx.js → index.CBxn7sji.js} +1 -1
- streamlit/static/static/js/{index.CWOluRqa.js → index.CDSPljq3.js} +1 -1
- streamlit/static/static/js/{index.CzzEyXiC.js → index.CPBJk1lp.js} +1 -1
- streamlit/static/static/js/{index.BysxR7v7.js → index.CRMmBBDq.js} +1 -1
- streamlit/static/static/js/{index.C6uLzsGN.js → index.C_2tXwz4.js} +1 -1
- streamlit/static/static/js/{index.ChX_XN9v.js → index.CbT7y4TK.js} +1 -1
- streamlit/static/static/js/{index.rPwcP7b8.js → index.CdPagNhq.js} +1 -1
- streamlit/static/static/js/{index.IydYP9PK.js → index.CkZkpK4-.js} +1 -1
- streamlit/static/static/js/{index.DSsFpl6V.js → index.CrEVoSTM.js} +1 -1
- streamlit/static/static/js/{index.CQYXOt0H.js → index.Cxfze3Mk.js} +1 -1
- streamlit/static/static/js/{index.u-RVYMyk.js → index.CzUmKu1R.js} +1 -1
- streamlit/static/static/js/{index.CE-qPTwY.js → index.CzrE9emY.js} +1 -1
- streamlit/static/static/js/{index.CU_SzKbN.js → index.DKCBo3om.js} +1 -1
- streamlit/static/static/js/{index.B0f5Sqj9.js → index.DOpTXgh3.js} +1 -1
- streamlit/static/static/js/{index.TnCoD1oP.js → index.DRrj4vJq.js} +1 -1
- streamlit/static/static/js/{index.CFnDv8Ab.js → index.Dcg-1sHd.js} +1 -1
- streamlit/static/static/js/{index.BB3TfMGO.js → index.Dg7ksnn2.js} +1 -1
- streamlit/static/static/js/{index.BM_qS2Z6.js → index.Dgn3lt9J.js} +1 -1
- streamlit/static/static/js/{index.BwOqVS7B.js → index.DuHTqH_9.js} +1 -1
- streamlit/static/static/js/{index.eNGIEtgK.js → index.DuV4oQbx.js} +5 -5
- streamlit/static/static/js/{index.Cn3q8ZVn.js → index.Dv3BUspB.js} +1 -1
- streamlit/static/static/js/{index.DIxzN4oM.js → index.Kzz4gUPJ.js} +4 -4
- streamlit/static/static/js/{index.WW1pXc2g.js → index.NmHUotTf.js} +1 -1
- streamlit/static/static/js/{index.m_aVBz2b.js → index.PKWaMjh6.js} +1 -1
- streamlit/static/static/js/{index.DmZP-_fu.js → index.UKdSrnn_.js} +1 -1
- streamlit/static/static/js/{index.BYWoEwfP.js → index.W1F0OM9G.js} +1 -1
- streamlit/static/static/js/{index.CDspsVkR.js → index.nEP2fCOO.js} +1 -1
- streamlit/static/static/js/{input.CVw5KI0x.js → input.B970MGo0.js} +1 -1
- streamlit/static/static/js/{memory.CnrS2dOM.js → memory.Bds5EpZ8.js} +1 -1
- streamlit/static/static/js/{mergeWith.DUDC520V.js → mergeWith.zOP131Mw.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Ccw3Yu2p.js → number-overlay-editor.BxGwsHaY.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.wVJHSwqv.js → possibleConstructorReturn.CngyaSWa.js} +1 -1
- streamlit/static/static/js/{sandbox.CpAztCDM.js → sandbox.COLAm094.js} +1 -1
- streamlit/static/static/js/{textarea.CFjEVTUg.js → textarea.DrttbSkr.js} +1 -1
- streamlit/static/static/js/{timepicker.DMKQZM-V.js → timepicker.D02-j0jX.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.KVlxKIgo.js → toConsumableArray.EMFv73a7.js} +1 -1
- streamlit/static/static/js/{uniqueId.kOCufBPt.js → uniqueId.CdAsXj9D.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.Bs_D3hOD.js → useBasicWidgetState.BDsVFj3k.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BH-JyYhR.js → useOnInputChange.C8C1na1y.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.vQYihw6n.js → withFullScreenWrapper.BBFCh9IR.js} +1 -1
- streamlit/type_util.py +1 -1
- {streamlit_nightly-1.44.2.dev20250403.dist-info → streamlit_nightly-1.44.2.dev20250406.dist-info}/METADATA +3 -3
- {streamlit_nightly-1.44.2.dev20250403.dist-info → streamlit_nightly-1.44.2.dev20250406.dist-info}/RECORD +78 -78
- {streamlit_nightly-1.44.2.dev20250403.data → streamlit_nightly-1.44.2.dev20250406.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250403.dist-info → streamlit_nightly-1.44.2.dev20250406.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250403.dist-info → streamlit_nightly-1.44.2.dev20250406.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250403.dist-info → streamlit_nightly-1.44.2.dev20250406.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{n as jt,r as Ce,bh as Vt,j as lt,F as $t}from"./index.DIxzN4oM.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.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+`>
|
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&<(_n,{className:"stHtml","data-testid":"stHtml",ref:r,dangerouslySetInnerHTML:{__html:u}})})}const Sn=Ce.memo(hn);export{Sn as default};
|