streamlit-nightly 1.43.3.dev20250311__py3-none-any.whl → 1.43.3.dev20250313__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/__init__.py +1 -0
- streamlit/auth_util.py +2 -1
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/logo.py +3 -3
- streamlit/components/v1/__init__.py +1 -3
- streamlit/config.py +3 -2
- streamlit/config_option.py +1 -3
- streamlit/connections/snowflake_connection.py +0 -1
- streamlit/connections/sql_connection.py +0 -1
- streamlit/dataframe_util.py +7 -6
- streamlit/delta_generator_singletons.py +2 -2
- streamlit/elements/arrow.py +0 -1
- streamlit/elements/exception.py +3 -1
- streamlit/elements/form.py +3 -3
- streamlit/elements/json.py +2 -2
- streamlit/elements/layouts.py +0 -5
- streamlit/elements/lib/built_in_chart_utils.py +1 -2
- streamlit/elements/lib/column_config_utils.py +0 -3
- streamlit/elements/lib/column_types.py +6 -39
- streamlit/elements/lib/image_utils.py +2 -1
- streamlit/elements/lib/options_selector_utils.py +6 -3
- streamlit/elements/lib/subtitle_utils.py +2 -0
- streamlit/elements/lib/utils.py +0 -2
- streamlit/elements/markdown.py +98 -2
- streamlit/elements/media.py +2 -1
- streamlit/elements/metric.py +0 -1
- streamlit/elements/progress.py +1 -1
- streamlit/elements/text.py +2 -2
- streamlit/elements/vega_charts.py +2 -1
- streamlit/elements/widgets/audio_input.py +2 -1
- streamlit/elements/widgets/button.py +0 -1
- streamlit/elements/widgets/button_group.py +2 -3
- streamlit/elements/widgets/data_editor.py +2 -3
- streamlit/elements/widgets/slider.py +1 -1
- streamlit/elements/widgets/text_widgets.py +1 -0
- streamlit/elements/write.py +0 -1
- streamlit/errors.py +11 -2
- streamlit/external/langchain/streamlit_callback_handler.py +1 -2
- streamlit/file_util.py +4 -2
- streamlit/navigation/page.py +0 -1
- streamlit/platform.py +1 -3
- streamlit/runtime/caching/cache_data_api.py +5 -5
- streamlit/runtime/caching/cache_errors.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +4 -4
- streamlit/runtime/caching/cache_utils.py +6 -4
- streamlit/runtime/caching/storage/cache_storage_protocol.py +6 -6
- streamlit/runtime/caching/storage/dummy_cache_storage.py +2 -2
- streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +6 -6
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +6 -6
- streamlit/runtime/connection_factory.py +0 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/credentials.py +1 -1
- streamlit/runtime/forward_msg_cache.py +1 -1
- streamlit/runtime/forward_msg_queue.py +2 -1
- streamlit/runtime/fragment.py +2 -1
- streamlit/runtime/memory_media_file_storage.py +2 -2
- streamlit/runtime/metrics_util.py +2 -2
- streamlit/runtime/runtime_util.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +1 -1
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +1 -0
- streamlit/runtime/secrets.py +28 -31
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/safe_session_state.py +1 -1
- streamlit/runtime/state/session_state.py +4 -3
- streamlit/runtime/stats.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +4 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.B-R2xJ_2.js → FileDownload.esm.imTamlxP.js} +1 -1
- streamlit/static/static/js/{FileHelper.Dpame4Yy.js → FileHelper.BwPSCUvG.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CJtgEcyv.js → FormClearHelper.DB5q2Avl.js} +1 -1
- streamlit/static/static/js/{Hooks.eMU4yP9C.js → Hooks.Cxijo2P7.js} +1 -1
- streamlit/static/static/js/{InputInstructions.Bt5nMAh-.js → InputInstructions.B3OvMrKL.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CRfY498S.js → ProgressBar.DmTol130.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CjsBZs42.js → RenderInPortalIfExists.B8t62565.js} +1 -1
- streamlit/static/static/js/{Toolbar.CBmSHKas.js → Toolbar.CbG49UPG.js} +1 -1
- streamlit/static/static/js/{base-input.pwi2uHY4.js → base-input.D7sJ1S2g.js} +1 -1
- streamlit/static/static/js/{checkbox.BRMCIUrT.js → checkbox.0Qx7AQxA.js} +1 -1
- streamlit/static/static/js/{createSuper.BT2FfU2u.js → createSuper.DYiyAta_.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DR231PaH.js → data-grid-overlay-editor.DH61CZYo.js} +1 -1
- streamlit/static/static/js/{downloader.Cwh9Q8n3.js → downloader.ClUad3SK.js} +1 -1
- streamlit/static/static/js/{es6.DXFo1lzk.js → es6.oePMPTIo.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.BqHH3gN-.js → iframeResizer.contentWindow.DWkIX4K7.js} +1 -1
- streamlit/static/static/js/{index.SGdFItlP.js → index.1VrMb7Gq.js} +1 -1
- streamlit/static/static/js/index.62zz5frt.js +1 -0
- streamlit/static/static/js/index.BJRyQckV.js +1 -0
- streamlit/static/static/js/{index.C8ZQWk_P.js → index.BQVZQA1G.js} +1 -1
- streamlit/static/static/js/{index.-J5N3GRT.js → index.BSZRb65z.js} +1 -1
- streamlit/static/static/js/{index.oH2t20_d.js → index.BUJE3tb_.js} +1 -1
- streamlit/static/static/js/{index.DAIPHdqL.js → index.BWsaTYC-.js} +1 -1
- streamlit/static/static/js/{index.B9ftDzXT.js → index.BccrUqFL.js} +1 -1
- streamlit/static/static/js/index.BhzKPoO6.js +1 -0
- streamlit/static/static/js/{index._HJ2bgYb.js → index.BpNXx3zc.js} +6 -6
- streamlit/static/static/js/{index.DzJ-K9FH.js → index.BzEstIKX.js} +1 -1
- streamlit/static/static/js/{index.Cqy-AKUq.js → index.C-ilKj2l.js} +1 -1
- streamlit/static/static/js/{index.DBAW0l2y.js → index.CCAIkxXD.js} +2367 -1541
- streamlit/static/static/js/{index.DklFRDjI.js → index.CEXlj4h2.js} +1 -1
- streamlit/static/static/js/{index.E4BOW70b.js → index.CEtBn4Yo.js} +1 -1
- streamlit/static/static/js/{index.Y1Qnwm4b.js → index.CM7PC5PD.js} +1 -1
- streamlit/static/static/js/{index.BAQ_1jSz.js → index.CSLXWDcG.js} +1 -1
- streamlit/static/static/js/{index.7mbSZESp.js → index.CqywW5KK.js} +1 -1
- streamlit/static/static/js/{index.DGe1v1i2.js → index.CyRCgpSs.js} +1 -1
- streamlit/static/static/js/{index.BiPCWEUM.js → index.CzFs8nXc.js} +45 -45
- streamlit/static/static/js/{index.DTC2KQEB.js → index.Czxn5B2N.js} +1 -1
- streamlit/static/static/js/{index.BhhnIkTX.js → index.D0OLo5Dp.js} +1 -1
- streamlit/static/static/js/{index.DC7tm9ca.js → index.D2JlVfHE.js} +1 -1
- streamlit/static/static/js/{index.BtuGy7By.js → index.D8rVyQy1.js} +2 -2
- streamlit/static/static/js/{index.BN2fMHzp.js → index.DJRmF7dm.js} +1 -1
- streamlit/static/static/js/{index.eHde7unb.js → index.Dd9D963h.js} +1 -1
- streamlit/static/static/js/{index.CtDd3Kvg.js → index.DhcpqbOJ.js} +1 -1
- streamlit/static/static/js/{index.DJZrR-yh.js → index.DlEF0vUx.js} +1 -1
- streamlit/static/static/js/{index.pfdwKIIK.js → index.DnJimAdR.js} +1 -1
- streamlit/static/static/js/index.DoqMrowT.js +1 -0
- streamlit/static/static/js/{index.B71BDPil.js → index.DqsHy8ck.js} +1 -1
- streamlit/static/static/js/{index.DbtNEUBr.js → index.DtS10fdK.js} +1 -1
- streamlit/static/static/js/{index.BtaSeLy3.js → index.XZw2NTV4.js} +1 -1
- streamlit/static/static/js/index.YB9Oe71d.js +1 -0
- streamlit/static/static/js/{index.Bt4_I4Hr.js → index.axjxDsFs.js} +1 -1
- streamlit/static/static/js/{index.CKLHvpe_.js → index.kB2IGVOe.js} +1 -1
- streamlit/static/static/js/{index.ClCou1d2.js → index.tVO_vJdT.js} +1 -1
- streamlit/static/static/js/{index.DIxz2WrU.js → index.uPQFE7KD.js} +1 -1
- streamlit/static/static/js/{input.Rf6xGN5X.js → input.od7ufwko.js} +1 -1
- streamlit/static/static/js/{memory.D5NLCYdA.js → memory.B4tdC6o-.js} +1 -1
- streamlit/static/static/js/{mergeWith.Bcdwg8Ac.js → mergeWith.BIQlVIWW.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CCjfRIEO.js → number-overlay-editor.yJDCpy9b.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.B8bXiVQj.js → possibleConstructorReturn.CarGSmuW.js} +1 -1
- streamlit/static/static/js/{sandbox.lrrkbqxh.js → sandbox.DMCKOK6i.js} +1 -1
- streamlit/static/static/js/{textarea.DCEYRe9D.js → textarea.CKKbJt6B.js} +1 -1
- streamlit/static/static/js/{timepicker.DpQ3WAC_.js → timepicker.BgsARtBm.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.EduObuzm.js → toConsumableArray.DXHhbr1a.js} +1 -1
- streamlit/static/static/js/{uniqueId.qyd-2U_A.js → uniqueId.Cb5oTCCd.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.B0zc_tpZ.js → useBasicWidgetState.8rZ80dWq.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.tzktvOeD.js → useOnInputChange.Bc5KC47X.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.TezXOJ_z.js → withFullScreenWrapper.CSP3iCNz.js} +1 -1
- streamlit/string_util.py +3 -2
- streamlit/testing/v1/element_tree.py +30 -30
- streamlit/testing/v1/util.py +2 -1
- streamlit/time_util.py +1 -3
- streamlit/type_util.py +2 -1
- streamlit/user_info.py +0 -1
- streamlit/watcher/event_based_path_watcher.py +1 -1
- streamlit/web/bootstrap.py +3 -1
- streamlit/web/cache_storage_manager_config.py +1 -1
- streamlit/web/cli.py +44 -2
- streamlit/web/server/authlib_tornado_integration.py +1 -1
- streamlit/web/server/browser_websocket_handler.py +2 -1
- streamlit/web/server/routes.py +2 -2
- streamlit/web/server/server_util.py +2 -4
- {streamlit_nightly-1.43.3.dev20250311.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.43.3.dev20250311.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/RECORD +154 -154
- streamlit/static/static/js/index.BMcgy3Eb.js +0 -1
- streamlit/static/static/js/index.COJ2HeaK.js +0 -1
- streamlit/static/static/js/index.D6iEZATu.js +0 -1
- streamlit/static/static/js/index.DuXQiNfC.js +0 -1
- streamlit/static/static/js/index.Fi_0UKZA.js +0 -1
- {streamlit_nightly-1.43.3.dev20250311.data → streamlit_nightly-1.43.3.dev20250313.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.43.3.dev20250311.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.43.3.dev20250311.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.43.3.dev20250311.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as ce,j as lt,F as jt}from"./index.BiPCWEUM.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:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:S,seal:y,create:At}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});we||(we=function(n,s,r){return n.apply(s,r)});xe||(xe=function(n,s){return new n(...s)});const se=R(Array.prototype.forEach),Kt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),V=R(Array.prototype.push),Zt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),ut=R(String.prototype.match),$=R(String.prototype.replace),Jt=R(String.prototype.indexOf),Qt=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),q=en(TypeError);function R(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return we(a,n,r)}}function en(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return xe(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ct&&ct(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const L=s(u);L!==u&&(Vt(n)||(n[r]=L),u=L)}a[u]=!0}return a}function tn(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function w(a){const n=At(null);for(const[s,r]of gt(a))b(a,s)&&(Array.isArray(r)?n[s]=tn(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=w(r):n[s]=r);return n}function K(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=$t(a)}function s(){return null}return s}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"]),De=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"]),Ie=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"]),nn=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"]),Me=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"]),on=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"]),Ce=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"]),an=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rn=y(/<%[\w\W]*|[\w\W]*%>/gm),sn=y(/\$\{[\w\W]*/gm),ln=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),cn=y(/^aria-[\-\w]+$/),ht=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fn=y(/^(?:\w+script|data):/i),un=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=y(/^html$/i),mn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var Et=Object.freeze({__proto__:null,ARIA_ATTR:cn,ATTR_WHITESPACE:un,CUSTOM_ELEMENT:mn,DATA_ATTR:ln,DOCTYPE_NAME:St,ERB_EXPR:rn,IS_ALLOWED_URI:ht,IS_SCRIPT_OR_DATA:fn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},pn=function(){return typeof window>"u"?null:window},dn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const L="dompurify"+(r?"#"+r:"");try{return n.createPolicy(L,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+L+" 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]:pn();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:s}=a;const r=s,u=r.currentScript,{DocumentFragment:L,HTMLTemplateElement:x,Node:ue,Element:ve,NodeFilter:z,NamedNodeMap:Ot=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Lt,DOMParser:yt,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 x=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,W="";const{implementation:me,createNodeIterator:Mt,createDocumentFragment:Ct,getElementsByTagName:wt}=s,{importNode:xt}=r;let g=_t();n.isSupported=typeof gt=="function"&&typeof Q=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,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=l({},[...mt,...De,...Ie,...Me,...pt]);let d=null;const ze=l({},[...dt,...Ce,...Tt,...le]);let f=Object.seal(At(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,Ee=null,Ge=!0,_e=!0,We=!1,Be=!0,P=!1,ge=!0,C=!1,Ae=!1,he=!1,k=!1,ee=!1,te=!1,Ye=!0,Xe=!1;const Ft="user-content-";let Se=!0,Y=!1,v={},U=null;const je=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=l({},["audio","video","img","source","image","track"]);let Re=null;const qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",I="http://www.w3.org/1999/xhtml";let F=I,Oe=!1,Le=null;const Ht=l({},[ne,oe,I],Ne);let ie=l({},["mi","mo","mn","ms","mtext"]),ae=l({},["annotation-xml"]);const zt=l({},["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=s.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=w(e),X=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?Ne:fe,m=b(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):He,d=b(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):ze,Le=b(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ne):Ht,Re=b(e,"ADD_URI_SAFE_ATTR")?l(w(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=b(e,"ADD_DATA_URI_TAGS")?l(w($e),e.ADD_DATA_URI_TAGS,p):$e,U=b(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):je,B=b(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):{},Ee=b(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,_e=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,ge=e.SAFE_FOR_XML!==!1,C=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,Se=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||ht,F=e.NAMESPACE||I,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&&(_e=!1),ee&&(k=!0),v&&(m=l({},pt),d=[],v.html===!0&&(l(m,mt),l(d,dt)),v.svg===!0&&(l(m,De),l(d,Ce),l(d,le)),v.svgFilters===!0&&(l(m,Ie),l(d,Ce),l(d,le)),v.mathMl===!0&&(l(m,Me),l(d,Tt),l(d,le))),e.ADD_TAGS&&(m===He&&(m=w(m)),l(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=w(d)),l(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=w(U)),l(U,e.FORBID_CONTENTS,p)),Se&&(m["#text"]=!0),C&&l(m,["html","head","body"]),m.table&&(l(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&&(_=dn(J,u)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Ze=l({},[...De,...Ie,...nn]),Je=l({},[...Me,...on]),Yt=function(e){let t=Q(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Le[e.namespaceURI]?e.namespaceURI===oe?t.namespaceURI===I?o==="svg":t.namespaceURI===ne?o==="svg"&&(c==="annotation-xml"||ie[c]):!!Ze[o]:e.namespaceURI===ne?t.namespaceURI===I?o==="math":t.namespaceURI===oe?o==="math"&&ae[c]:!!Je[o]:e.namespaceURI===I?t.namespaceURI===oe&&!ae[c]||t.namespaceURI===ne&&!ie[c]?!1:!Je[o]&&(zt[o]||!Ze[o]):!!(X==="application/xhtml+xml"&&Le[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===I&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===I)try{t=new yt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Oe?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),F===I?wt.call(t,C?"html":"body")[0]:C?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)},be=function(e){return e instanceof Lt&&(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 ue=="function"&&e instanceof ue};function M(i,e,t){se(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(M(g.beforeSanitizeElements,e,null),be(e))return N(e),!0;const o=p(e.nodeName);if(M(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!tt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ge&&e.nodeType===Z.comment&&h(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(Se&&!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")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,se([pe,de,Te],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),M(g.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in s||o in Bt))return!1;if(!(_e&&!Ee[t]&&h(Pt,t))){if(!(Ge&&h(kt,t))){if(!d[t]||Ee[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(Fe,$(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Jt(o,"data:")===0&&Ve[e])){if(!(We&&!h(vt,$(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ut)},at=function(e){M(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||be(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 A=T==="value"?D:Qt(D);if(o.attrName=j,o.attrValue=A,o.keepAttr=!0,o.forceKeepAttr=void 0,M(g.uponSanitizeAttribute,e,o),A=o.attrValue,Xe&&(j==="id"||j==="name")&&(re(T,e),A=Ft+A),ge&&h(/((--!?|])>)|<\/(style|title)/i,A)){re(T,e);continue}if(o.forceKeepAttr||(re(T,e),!o.keepAttr))continue;if(!Be&&h(/\/>/i,A)){re(T,e);continue}P&&se([pe,de,Te],st=>{A=$(A,st," ")});const rt=p(e.nodeName);if(ot(rt,j,A)){if(_&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!O)switch(J.getAttributeType(rt,j)){case"TrustedHTML":{A=_.createHTML(A);break}case"TrustedScriptURL":{A=_.createScriptURL(A);break}}try{O?e.setAttributeNS(O,T,A):e.setAttribute(T,A),be(e)?N(e):ft(n.removed)}catch{}}}M(g.afterSanitizeAttributes,e,null)},Xt=function i(e){let t=null;const o=et(e);for(M(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)M(g.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof L&&i(t.content);M(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(Oe=!i,Oe&&(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(Ae||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 ue)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&&!C&&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 L&&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=C?t.outerHTML:t.innerHTML;return C&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
1
|
+
import{r as ce,j as lt,F as jt}from"./index.CzFs8nXc.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:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:S,seal:y,create:At}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});we||(we=function(n,s,r){return n.apply(s,r)});xe||(xe=function(n,s){return new n(...s)});const se=R(Array.prototype.forEach),Kt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),V=R(Array.prototype.push),Zt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),ut=R(String.prototype.match),$=R(String.prototype.replace),Jt=R(String.prototype.indexOf),Qt=R(String.prototype.trim),b=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),q=en(TypeError);function R(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return we(a,n,r)}}function en(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return xe(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ct&&ct(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const L=s(u);L!==u&&(Vt(n)||(n[r]=L),u=L)}a[u]=!0}return a}function tn(a){for(let n=0;n<a.length;n++)b(a,n)||(a[n]=null);return a}function w(a){const n=At(null);for(const[s,r]of gt(a))b(a,s)&&(Array.isArray(r)?n[s]=tn(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=w(r):n[s]=r);return n}function K(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=$t(a)}function s(){return null}return s}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"]),De=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"]),Ie=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"]),nn=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"]),Me=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"]),on=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"]),Ce=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"]),an=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rn=y(/<%[\w\W]*|[\w\W]*%>/gm),sn=y(/\$\{[\w\W]*/gm),ln=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),cn=y(/^aria-[\-\w]+$/),ht=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fn=y(/^(?:\w+script|data):/i),un=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=y(/^html$/i),mn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var Et=Object.freeze({__proto__:null,ARIA_ATTR:cn,ATTR_WHITESPACE:un,CUSTOM_ELEMENT:mn,DATA_ATTR:ln,DOCTYPE_NAME:St,ERB_EXPR:rn,IS_ALLOWED_URI:ht,IS_SCRIPT_OR_DATA:fn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},pn=function(){return typeof window>"u"?null:window},dn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const L="dompurify"+(r?"#"+r:"");try{return n.createPolicy(L,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+L+" 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]:pn();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:s}=a;const r=s,u=r.currentScript,{DocumentFragment:L,HTMLTemplateElement:x,Node:ue,Element:ve,NodeFilter:z,NamedNodeMap:Ot=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Lt,DOMParser:yt,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 x=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,W="";const{implementation:me,createNodeIterator:Mt,createDocumentFragment:Ct,getElementsByTagName:wt}=s,{importNode:xt}=r;let g=_t();n.isSupported=typeof gt=="function"&&typeof Q=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,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=l({},[...mt,...De,...Ie,...Me,...pt]);let d=null;const ze=l({},[...dt,...Ce,...Tt,...le]);let f=Object.seal(At(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,Ee=null,Ge=!0,_e=!0,We=!1,Be=!0,P=!1,ge=!0,C=!1,Ae=!1,he=!1,k=!1,ee=!1,te=!1,Ye=!0,Xe=!1;const Ft="user-content-";let Se=!0,Y=!1,v={},U=null;const je=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=l({},["audio","video","img","source","image","track"]);let Re=null;const qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",I="http://www.w3.org/1999/xhtml";let F=I,Oe=!1,Le=null;const Ht=l({},[ne,oe,I],Ne);let ie=l({},["mi","mo","mn","ms","mtext"]),ae=l({},["annotation-xml"]);const zt=l({},["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=s.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=w(e),X=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=X==="application/xhtml+xml"?Ne:fe,m=b(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):He,d=b(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):ze,Le=b(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ne):Ht,Re=b(e,"ADD_URI_SAFE_ATTR")?l(w(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=b(e,"ADD_DATA_URI_TAGS")?l(w($e),e.ADD_DATA_URI_TAGS,p):$e,U=b(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):je,B=b(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):{},Ee=b(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):{},v=b(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,_e=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,ge=e.SAFE_FOR_XML!==!1,C=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,Se=e.KEEP_CONTENT!==!1,Y=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||ht,F=e.NAMESPACE||I,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&&(_e=!1),ee&&(k=!0),v&&(m=l({},pt),d=[],v.html===!0&&(l(m,mt),l(d,dt)),v.svg===!0&&(l(m,De),l(d,Ce),l(d,le)),v.svgFilters===!0&&(l(m,Ie),l(d,Ce),l(d,le)),v.mathMl===!0&&(l(m,Me),l(d,Tt),l(d,le))),e.ADD_TAGS&&(m===He&&(m=w(m)),l(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=w(d)),l(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=w(U)),l(U,e.FORBID_CONTENTS,p)),Se&&(m["#text"]=!0),C&&l(m,["html","head","body"]),m.table&&(l(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&&(_=dn(J,u)),_!==null&&typeof W=="string"&&(W=_.createHTML(""));S&&S(e),H=e}},Ze=l({},[...De,...Ie,...nn]),Je=l({},[...Me,...on]),Yt=function(e){let t=Q(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Le[e.namespaceURI]?e.namespaceURI===oe?t.namespaceURI===I?o==="svg":t.namespaceURI===ne?o==="svg"&&(c==="annotation-xml"||ie[c]):!!Ze[o]:e.namespaceURI===ne?t.namespaceURI===I?o==="math":t.namespaceURI===oe?o==="math"&&ae[c]:!!Je[o]:e.namespaceURI===I?t.namespaceURI===oe&&!ae[c]||t.namespaceURI===ne&&!ie[c]?!1:!Je[o]&&(zt[o]||!Ze[o]):!!(X==="application/xhtml+xml"&&Le[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===I&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(F===I)try{t=new yt().parseFromString(c,X)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Oe?W:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),F===I?wt.call(t,C?"html":"body")[0]:C?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)},be=function(e){return e instanceof Lt&&(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 ue=="function"&&e instanceof ue};function M(i,e,t){se(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(M(g.beforeSanitizeElements,e,null),be(e))return N(e),!0;const o=p(e.nodeName);if(M(g.uponSanitizeElement,e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!tt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ge&&e.nodeType===Z.comment&&h(/<[/\w]/g,e.data))return N(e),!0;if(!m[o]||B[o]){if(!B[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(Se&&!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")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(N(e),!0):(P&&e.nodeType===Z.text&&(t=e.textContent,se([pe,de,Te],c=>{t=$(t,c," ")}),e.textContent!==t&&(V(n.removed,{element:e.cloneNode()}),e.textContent=t)),M(g.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in s||o in Bt))return!1;if(!(_e&&!Ee[t]&&h(Pt,t))){if(!(Ge&&h(kt,t))){if(!d[t]||Ee[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(Fe,$(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Jt(o,"data:")===0&&Ve[e])){if(!(We&&!h(vt,$(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ut)},at=function(e){M(g.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||be(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 A=T==="value"?D:Qt(D);if(o.attrName=j,o.attrValue=A,o.keepAttr=!0,o.forceKeepAttr=void 0,M(g.uponSanitizeAttribute,e,o),A=o.attrValue,Xe&&(j==="id"||j==="name")&&(re(T,e),A=Ft+A),ge&&h(/((--!?|])>)|<\/(style|title)/i,A)){re(T,e);continue}if(o.forceKeepAttr||(re(T,e),!o.keepAttr))continue;if(!Be&&h(/\/>/i,A)){re(T,e);continue}P&&se([pe,de,Te],st=>{A=$(A,st," ")});const rt=p(e.nodeName);if(ot(rt,j,A)){if(_&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!O)switch(J.getAttributeType(rt,j)){case"TrustedHTML":{A=_.createHTML(A);break}case"TrustedScriptURL":{A=_.createScriptURL(A);break}}try{O?e.setAttributeNS(O,T,A):e.setAttribute(T,A),be(e)?N(e):ft(n.removed)}catch{}}}M(g.afterSanitizeAttributes,e,null)},Xt=function i(e){let t=null;const o=et(e);for(M(g.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)M(g.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof L&&i(t.content);M(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(Oe=!i,Oe&&(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(Ae||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 ue)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&&!C&&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 L&&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=C?t.outerHTML:t.innerHTML;return C&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
2
2
|
`+O),P&&se([pe,de,Te],D=>{O=$(O,D," ")}),_&&te?_.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),Ae=!0},n.clearConfig=function(){H=null,Ae=!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=Kt(g[i],e);return t===-1?void 0:Zt(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 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 Tn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return ke.sanitize(a,n)};function En({element:a}){const{body:n}=a,s=ce.useRef(null),r=ce.useMemo(()=>Tn(n),[n]);return ce.useEffect(()=>{var u,L;((u=s.current)==null?void 0:u.clientHeight)===0&&((L=s.current.parentElement)==null?void 0:L.childElementCount)===1&&s.current.parentElement.classList.add("stHtml-empty")}),lt(jt,{children:r&<("div",{className:"stHtml","data-testid":"stHtml",ref:s,dangerouslySetInnerHTML:{__html:r}})})}const gn=ce.memo(En);export{gn as default};
|