4 lines
22 KiB
JavaScript
4 lines
22 KiB
JavaScript
|
/*! @license DOMPurify 2.5.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.4/LICENSE */function x(r){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},x(r)}function Pe(r,n){return Pe=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},Pe(r,n)}function Wt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ue(r,n,o){return Wt()?ue=Reflect.construct:ue=function(c,S,g){var D=[null];D.push.apply(D,S);var k=Function.bind.apply(c,D),X=new k;return g&&Pe(X,g.prototype),X},ue.apply(null,arguments)}function N(r){return Bt(r)||$t(r)||jt(r)||Xt()}function Bt(r){if(Array.isArray(r))return Fe(r)}function $t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function jt(r,n){if(!!r){if(typeof r=="string")return Fe(r,n);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Fe(r,n)}}function Fe(r,n){(n==null||n>r.length)&&(n=r.length);for(var o=0,u=new Array(n);o<n;o++)u[o]=r[o];return u}function Xt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yt=Object.hasOwnProperty,ft=Object.setPrototypeOf,Vt=Object.isFrozen,qt=Object.getPrototypeOf,Kt=Object.getOwnPropertyDescriptor,h=Object.freeze,O=Object.seal,Zt=Object.create,ht=typeof Reflect<"u"&&Reflect,ce=ht.apply,Ue=ht.construct;ce||(ce=function(n,o,u){return n.apply(o,u)});h||(h=function(n){return n});O||(O=function(n){return n});Ue||(Ue=function(n,o){return ue(n,N(o))});var Jt=R(Array.prototype.forEach),ct=R(Array.prototype.pop),Z=R(Array.prototype.push),fe=R(String.prototype.toLowerCase),De=R(String.prototype.toString),pt=R(String.prototype.match),M=R(String.prototype.replace),Qt=R(String.prototype.indexOf),er=R(String.prototype.trim),T=R(RegExp.prototype.test),Ce=tr(TypeError);function mt(r){return typeof r=="number"&&isNaN(r)}function R(r){return function(n){for(var o=arguments.length,u=new Array(o>1?o-1:0),c=1;c<o;c++)u[c-1]=arguments[c];return ce(r,n,u)}}function tr(r){return function(){for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return Ue(r,o)}}function s(r,n,o){var u;o=(u=o)!==null&&u!==void 0?u:fe,ft&&ft(r,null);for(var c=n.length;c--;){var S=n[c];if(typeof S=="string"){var g=o(S);g!==S&&(Vt(n)||(n[c]=g),S=g)}r[S]=!0}return r}function H(r){var n=Zt(null),o;for(o in r)ce(Yt,r,[o])===!0&&(n[o]=r[o]);return n}function le(r,n){for(;r!==null;){var o=Kt(r,n);if(o){if(o.get)return R(o.get);if(typeof o.value=="function")return R(o.value)}r=qt(r)}function u(c){return console.warn("fallback value for",c),null}return u}var _t=h(["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"]),we=h(["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=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rr=h(["animate","color-profile","cursor","discard","fedropshadow","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"]),xe=h(["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"]),ar=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=h(["#text"]),Tt=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","ce
|
||
|
`+y),z&&(y=M(y,de," "),y=M(y,Te," "),y=M(y,ve," ")),L&&re?L.createHTML(y):y},n.setConfig=function(i){Me(i),ge=!0},n.clearConfig=function(){j=null,ge=!1},n.isValidAttribute=function(i,e,t){j||Me({});var a=_(i),l=_(e);return ot(a,l,t)},n.addHook=function(i,e){typeof e=="function"&&(C[i]=C[i]||[],Z(C[i],e))},n.removeHook=function(i){if(C[i])return ct(C[i])},n.removeHooks=function(i){C[i]&&(C[i]=[])},n.removeAllHooks=function(){C={}},n}var vr=Et();export{vr as default};
|