From ed4c5b11e41fceaaeafe01e4de6787f97b87a2bb Mon Sep 17 00:00:00 2001 From: zealotchen Date: Tue, 16 Apr 2024 11:07:20 +0800 Subject: [PATCH] feat(doc): rename readme for security check --- docs/_coverpage.md | 2 +- docs/_navbar.md | 2 +- docs/assets/js/docsify.js | 8 ++++---- docs/assets/js/docsify.min.js | 4 ++-- docs/assets/js/search.js | 4 ++-- docs/assets/js/search.min.js | 2 +- docs/en-us/_coverpage.md | 2 +- docs/en-us/_navbar.md | 2 +- docs/en-us/assets/js/docsify.js | 8 ++++---- docs/en-us/assets/js/docsify.min.js | 4 ++-- docs/en-us/assets/js/search.js | 4 ++-- docs/en-us/assets/js/search.min.js | 2 +- docs/{README.md => index.md} | 0 13 files changed, 22 insertions(+), 22 deletions(-) rename docs/{README.md => index.md} (100%) diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 71ff384d59f..dcd3f182c86 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -13,6 +13,6 @@ * iOS 增量 1MB,Android 增量最小 2.5MB [GitHub](//github.com/Tencent/Hippy) -[快速开始](/README.md) +[快速开始](/index.md) ![color](#fff) diff --git a/docs/_navbar.md b/docs/_navbar.md index 11f6cc3ee2d..7910b8fa513 100644 --- a/docs/_navbar.md +++ b/docs/_navbar.md @@ -1,5 +1,5 @@ * 起步 - * [Hippy 概述](/README?id=hippy-%e6%a6%82%e8%bf%b0) + * [Hippy 概述](/index?id=hippy-%e6%a6%82%e8%bf%b0) * [开始接入](guide/integration.md) * [架构](structure/introduction.md) * [调试](guide/debug.md) diff --git a/docs/assets/js/docsify.js b/docs/assets/js/docsify.js index c35eb411269..3c0e9345e13 100644 --- a/docs/assets/js/docsify.js +++ b/docs/assets/js/docsify.js @@ -403,7 +403,7 @@ return new RegExp(("\\.(" + (ext.replace(/^\./, '')) + "|html)$"), 'g').test(path) ? path : /\/$/g.test(path) - ? (path + "README" + ext) + ? (path + "index" + ext) : ("" + path + ext); } @@ -425,7 +425,7 @@ path = config.alias ? getAlias(path, config.alias) : path; path = getFileName(path, ext); - path = path === ("/README" + ext) ? config.homepage || path : path; + path = path === ("/index" + ext) ? config.homepage || path : path; path = isAbsolutePath(path) ? path : getPath(base, path); if (isRelative) { @@ -2552,7 +2552,7 @@ subMaxLevel: 0, loadSidebar: null, loadNavbar: null, - homepage: 'README.md', + homepage: 'index.md', coverpage: '', basePath: '', auto2top: false, @@ -7694,7 +7694,7 @@ !config.ignore ) { if (href === compilerClass.config.homepage) { - href = 'README'; + href = 'index'; } href = router.toURL(href, null, router.getCurrentPath()); diff --git a/docs/assets/js/docsify.min.js b/docs/assets/js/docsify.min.js index 0ab16072aed..21e97b931d8 100644 --- a/docs/assets/js/docsify.min.js +++ b/docs/assets/js/docsify.min.js @@ -1,4 +1,4 @@ -(function(){function cached(fn){var cache=Object.create(null);return function(str){var key=isPrimitive(str)?str:JSON.stringify(str);var hit=cache[key];return hit||(cache[key]=fn(str))}}var hyphenate=cached(function(str){return str.replace(/([A-Z])/g,function(m){return'-'+m.toLowerCase()})});var hasOwn=Object.prototype.hasOwnProperty;var merge=Object.assign||function(to){var arguments$1=arguments;for(var i=1;i0&&match[1].toLowerCase()!==location.protocol){return true}if(typeof match[2]==='string'&&match[2].length>0&&match[2].replace(new RegExp(':('+{'http:':80,'https:':443}[location.protocol]+')?$'),'')!==location.host){return true}return false}var inBrowser=!false;var isMobile=document.body.clientWidth<=600;var supportsPushState=(function(){return(window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/))})();var cacheNode={};function getNode(el,noCache){if(noCache===void 0)noCache=false;if(typeof el==='string'){if(typeof window.Vue!=='undefined'){return find(el)}el=noCache?find(el):cacheNode[el]||(cacheNode[el]=find(el))}return el}var $=document;var body=$.body;var head=$.head;function find(el,node){return node?el.querySelector(node):$.querySelector(el)}function findAll(el,node){return[].slice.call(node?el.querySelectorAll(node):$.querySelectorAll(el))}function create(node,tpl){node=$.createElement(node);if(tpl){node.innerHTML=tpl}return node}function appendTo(target,el){return target.appendChild(el)}function before(target,el){return target.insertBefore(el,target.children[0])}function on(el,type,handler){isFn(type)?window.addEventListener(el,type):el.addEventListener(type,handler)}function off(el,type,handler){isFn(type)?window.removeEventListener(el,type):el.removeEventListener(type,handler)}function toggleClass(el,type,val){el&&el.classList[val?type:'toggle'](val||type)}function style(content){appendTo(head,create('style',content))}function documentReady(callback,doc){if(doc===void 0)doc=document;var state=doc.readyState;if(state==='complete'||state==='interactive'){return setTimeout(callback,0)}doc.addEventListener('DOMContentLoaded',callback)}var dom=Object.freeze({__proto__:null,getNode:getNode,$:$,body:body,head:head,find:find,findAll:findAll,create:create,appendTo:appendTo,before:before,on:on,off:off,toggleClass:toggleClass,style:style,documentReady:documentReady});var decode=decodeURIComponent;var encode=encodeURIComponent;function parseQuery(query){var res={};query=query.trim().replace(/^(\?|#|&)/,'');if(!query){return res}query.split('&').forEach(function(param){var parts=param.replace(/\+/g,' ').split('=');res[parts[0]]=parts[1]&&decode(parts[1])});return res}function stringifyQuery(obj,ignores){if(ignores===void 0)ignores=[];var qs=[];for(var key in obj){if(ignores.indexOf(key)>-1){continue}qs.push(obj[key]?((encode(key))+"="+(encode(obj[key]))).toLowerCase():encode(key))}return qs.length?("?"+(qs.join('&'))):''}var isAbsolutePath=cached(function(path){return/(:|(\/{2}))/g.test(path)});var removeParams=cached(function(path){return path.split(/[?#]/)[0]});var getParentPath=cached(function(path){if(/\/$/g.test(path)){return path}var matchingParts=path.match(/(\S*\/)[^/]+$/);return matchingParts?matchingParts[1]:''});var cleanPath=cached(function(path){return path.replace(/^\/+/,'/').replace(/([^:])\/{2,}/g,'$1/')});var resolvePath=cached(function(path){var segments=path.replace(/^\//,'').split('/');var resolved=[];for(var i=0,len=segments.length;i0?currentRoute.substring(0,idIndex):currentRoute)+path}if(this.config.relativePath&&path.indexOf('/')!==0){var currentDir=currentRoute.substring(0,currentRoute.lastIndexOf('/')+1);return cleanPath(resolvePath(currentDir+path))}return cleanPath('/'+path)};function replaceHash(path){var i=location.href.indexOf('#');location.replace(location.href.slice(0,i>=0?i:0)+'#'+path)}var HashHistory=(function(History){function HashHistory(config){History.call(this,config);this.mode='hash'}if(History)HashHistory.__proto__=History;HashHistory.prototype=Object.create(History&&History.prototype);HashHistory.prototype.constructor=HashHistory;HashHistory.prototype.getBasePath=function getBasePath(){var path=window.location.pathname||'';var base=this.config.basePath;var basePath=endsWith(path,'.html')?path+'#/'+base:path+'/'+base;return/^(\/|https?:)/g.test(base)?base:cleanPath(basePath)};HashHistory.prototype.getCurrentPath=function getCurrentPath(){var href=location.href;var index=href.indexOf('#');return index===-1?'':href.slice(index+1)};HashHistory.prototype.onchange=function onchange(cb){if(cb===void 0)cb=noop;var navigating=false;on('click',function(e){var el=e.target.tagName==='A'?e.target:e.target.parentNode;if(el&&el.tagName==='A'&&!/_blank/.test(el.target)){navigating=true}});on('hashchange',function(e){var source=navigating?'navigate':'history';navigating=false;cb({event:e,source:source})})};HashHistory.prototype.normalize=function normalize(){var path=this.getCurrentPath();path=replaceSlug(path);if(path.charAt(0)==='/'){return replaceHash(path)}replaceHash('/'+path)};HashHistory.prototype.parse=function parse(path){if(path===void 0)path=location.href;var query='';var hashIndex=path.indexOf('#');if(hashIndex>=0){path=path.slice(hashIndex+1)}var queryIndex=path.indexOf('?');if(queryIndex>=0){query=path.slice(queryIndex+1);path=path.slice(0,queryIndex)}return{path:path,file:this.getFile(path,true),query:parseQuery(query),}};HashHistory.prototype.toURL=function toURL(path,params,currentRoute){return'#'+History.prototype.toURL.call(this,path,params,currentRoute)};return HashHistory}(History));var HTML5History=(function(History){function HTML5History(config){History.call(this,config);this.mode='history'}if(History)HTML5History.__proto__=History;HTML5History.prototype=Object.create(History&&History.prototype);HTML5History.prototype.constructor=HTML5History;HTML5History.prototype.getCurrentPath=function getCurrentPath(){var base=this.getBasePath();var path=window.location.pathname;if(base&&path.indexOf(base)===0){path=path.slice(base.length)}return(path||'/')+window.location.search+window.location.hash};HTML5History.prototype.onchange=function onchange(cb){var this$1=this;if(cb===void 0)cb=noop;on('click',function(e){var el=e.target.tagName==='A'?e.target:e.target.parentNode;if(el&&el.tagName==='A'&&!/_blank/.test(el.target)){e.preventDefault();var url=el.href;if(this$1.config.crossOriginLinks.indexOf(url)!==-1){window.open(url,'_self')}else{window.history.pushState({key:url},'',url)}cb({event:e,source:'navigate'})}});on('popstate',function(e){cb({event:e,source:'history'})})};HTML5History.prototype.parse=function parse(path){if(path===void 0)path=location.href;var query='';var queryIndex=path.indexOf('?');if(queryIndex>=0){query=path.slice(queryIndex+1);path=path.slice(0,queryIndex)}var base=getPath(location.origin);var baseIndex=path.indexOf(base);if(baseIndex>-1){path=path.slice(baseIndex+base.length)}return{path:path,file:this.getFile(path),query:parseQuery(query),}};return HTML5History}(History));var lastRoute={};function Router(Base){return(function(Base){function Router(){var args=[],len=arguments.length;while(len--)args[len]=arguments[len];Base.apply(this,args);this.route={}}if(Base)Router.__proto__=Base;Router.prototype=Object.create(Base&&Base.prototype);Router.prototype.constructor=Router;Router.prototype.updateRender=function updateRender(){this.router.normalize();this.route=this.router.parse();body.setAttribute('data-page',this.route.file)};Router.prototype.initRouter=function initRouter(){var this$1=this;var config=this.config;var mode=config.routerMode||'hash';var router;if(mode==='history'&&supportsPushState){router=new HTML5History(config)}else{router=new HashHistory(config)}this.router=router;this.updateRender();lastRoute=this.route;router.onchange(function(params){this$1.updateRender();this$1._updateRender();if(lastRoute.path===this$1.route.path){this$1.$resetEvents(params.source);return}this$1.$fetch(noop,this$1.$resetEvents.bind(this$1,params.source));lastRoute=this$1.route})};return Router}(Base))}var RGX=/([^{]*?)\w(?=\})/g;var MAP={YYYY:'getFullYear',YY:'getYear',MM:function(d){return d.getMonth()+1},DD:'getDate',HH:'getHours',mm:'getMinutes',ss:'getSeconds',fff:'getMilliseconds'};function tinydate(str,custom){var parts=[],offset=0;str.replace(RGX,function(key,_,idx){parts.push(str.substring(offset,idx-1));offset=idx+=key.length+1;parts.push(custom&&custom[key]||function(d){return('00'+(typeof MAP[key]==='string'?d[MAP[key]]():MAP[key](d))).slice(-key.length)})});if(offset!==str.length){parts.push(str.substring(offset))}return function(arg){var out='',i=0,d=arg||new Date();for(;i1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments$1[_key]}return apply(func,thisArg,args)}}function unconstruct(func){return function(){var arguments$1=arguments;for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments$1[_key2]}return construct(func,args)}}function addToSet(set,array){if(setPrototypeOf){setPrototypeOf(set,null)}var l=array.length;while(l--){var element=array[l];if(typeof element==='string'){var lcElement=stringToLowerCase(element);if(lcElement!==element){if(!isFrozen(array)){array[l]=lcElement}element=lcElement}}set[element]=true}return set}function clone(object){var newObject=create$1(null);var property=void 0;for(property in object){if(apply(hasOwnProperty,object,[property])){newObject[property]=object[property]}}return newObject}function lookupGetter(object,prop){while(object!==null){var desc=getOwnPropertyDescriptor(object,prop);if(desc){if(desc.get){return unapply(desc.get)}if(typeof desc.value==='function'){return unapply(desc.value)}}object=getPrototypeOf(object)}function fallbackValue(element){console.warn('fallback value for',element);return null}return fallbackValue}var html=freeze(['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']);var svg=freeze(['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']);var svgFilters=freeze(['feBlend','feColorMatrix','feComponentTransfer','feComposite','feConvolveMatrix','feDiffuseLighting','feDisplacementMap','feDistantLight','feFlood','feFuncA','feFuncB','feFuncG','feFuncR','feGaussianBlur','feMerge','feMergeNode','feMorphology','feOffset','fePointLight','feSpecularLighting','feSpotLight','feTile','feTurbulence']);var svgDisallowed=freeze(['animate','color-profile','cursor','discard','fedropshadow','feimage','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']);var mathMl=freeze(['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']);var mathMlDisallowed=freeze(['maction','maligngroup','malignmark','mlongdiv','mscarries','mscarry','msgroup','mstack','msline','msrow','semantics','annotation','annotation-xml','mprescripts','none']);var text=freeze(['#text']);var html$1=freeze(['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','noshade','novalidate','nowrap','open','optimum','pattern','placeholder','playsinline','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','xmlns','slot']);var svg$1=freeze(['accent-height','accumulate','additive','alignment-baseline','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','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','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','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','targetx','targety','transform','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']);var mathMl$1=freeze(['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']);var xml=freeze(['xlink:href','xml:id','xlink:title','xml:space','xmlns:xlink']);var MUSTACHE_EXPR=seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm);var ERB_EXPR=seal(/<%[\s\S]*|[\s\S]*%>/gm);var DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/);var ARIA_ATTR=seal(/^aria-[\-\w]+$/);var IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);var IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i);var ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};function _toConsumableArray$1(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i0&&arguments[0]!==undefined?arguments[0]:getGlobal();var DOMPurify=function DOMPurify(root){return createDOMPurify(root)};DOMPurify.version='2.3.1';DOMPurify.removed=[];if(!window||!window.document||window.document.nodeType!==9){DOMPurify.isSupported=false;return DOMPurify}var originalDocument=window.document;var document=window.document;var DocumentFragment=window.DocumentFragment,HTMLTemplateElement=window.HTMLTemplateElement,Node=window.Node,Element=window.Element,NodeFilter=window.NodeFilter,_window$NamedNodeMap=window.NamedNodeMap,NamedNodeMap=_window$NamedNodeMap===undefined?window.NamedNodeMap||window.MozNamedAttrMap:_window$NamedNodeMap,Text=window.Text,Comment=window.Comment,DOMParser=window.DOMParser,trustedTypes=window.trustedTypes;var ElementPrototype=Element.prototype;var cloneNode=lookupGetter(ElementPrototype,'cloneNode');var getNextSibling=lookupGetter(ElementPrototype,'nextSibling');var getChildNodes=lookupGetter(ElementPrototype,'childNodes');var getParentNode=lookupGetter(ElementPrototype,'parentNode');if(typeof HTMLTemplateElement==='function'){var template=document.createElement('template');if(template.content&&template.content.ownerDocument){document=template.content.ownerDocument}}var trustedTypesPolicy=_createTrustedTypesPolicy(trustedTypes,originalDocument);var emptyHTML=trustedTypesPolicy&&RETURN_TRUSTED_TYPE?trustedTypesPolicy.createHTML(''):'';var _document=document,implementation=_document.implementation,createNodeIterator=_document.createNodeIterator,createDocumentFragment=_document.createDocumentFragment,getElementsByTagName=_document.getElementsByTagName;var importNode=originalDocument.importNode;var documentMode={};try{documentMode=clone(document).documentMode?document.documentMode:{}}catch(_){}var hooks={};DOMPurify.isSupported=typeof getParentNode==='function'&&implementation&&typeof implementation.createHTMLDocument!=='undefined'&&documentMode!==9;var MUSTACHE_EXPR$$1=MUSTACHE_EXPR,ERB_EXPR$$1=ERB_EXPR,DATA_ATTR$$1=DATA_ATTR,ARIA_ATTR$$1=ARIA_ATTR,IS_SCRIPT_OR_DATA$$1=IS_SCRIPT_OR_DATA,ATTR_WHITESPACE$$1=ATTR_WHITESPACE;var IS_ALLOWED_URI$$1=IS_ALLOWED_URI;var ALLOWED_TAGS=null;var DEFAULT_ALLOWED_TAGS=addToSet({},[].concat(_toConsumableArray$1(html),_toConsumableArray$1(svg),_toConsumableArray$1(svgFilters),_toConsumableArray$1(mathMl),_toConsumableArray$1(text)));var ALLOWED_ATTR=null;var DEFAULT_ALLOWED_ATTR=addToSet({},[].concat(_toConsumableArray$1(html$1),_toConsumableArray$1(svg$1),_toConsumableArray$1(mathMl$1),_toConsumableArray$1(xml)));var FORBID_TAGS=null;var FORBID_ATTR=null;var ALLOW_ARIA_ATTR=true;var ALLOW_DATA_ATTR=true;var ALLOW_UNKNOWN_PROTOCOLS=false;var SAFE_FOR_TEMPLATES=false;var WHOLE_DOCUMENT=false;var SET_CONFIG=false;var FORCE_BODY=false;var RETURN_DOM=false;var RETURN_DOM_FRAGMENT=false;var RETURN_DOM_IMPORT=true;var RETURN_TRUSTED_TYPE=false;var SANITIZE_DOM=true;var KEEP_CONTENT=true;var IN_PLACE=false;var USE_PROFILES={};var FORBID_CONTENTS=null;var DEFAULT_FORBID_CONTENTS=addToSet({},['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']);var DATA_URI_TAGS=null;var DEFAULT_DATA_URI_TAGS=addToSet({},['audio','video','img','source','image','track']);var URI_SAFE_ATTRIBUTES=null;var DEFAULT_URI_SAFE_ATTRIBUTES=addToSet({},['alt','class','for','id','label','name','pattern','placeholder','role','summary','title','value','style','xmlns']);var MATHML_NAMESPACE='http://www.w3.org/1998/Math/MathML';var SVG_NAMESPACE='http://www.w3.org/2000/svg';var HTML_NAMESPACE='http://www.w3.org/1999/xhtml';var NAMESPACE=HTML_NAMESPACE;var IS_EMPTY_INPUT=false;var CONFIG=null;var formElement=document.createElement('form');var _parseConfig=function _parseConfig(cfg){if(CONFIG&&CONFIG===cfg){return}if(!cfg||(typeof cfg==='undefined'?'undefined':_typeof(cfg))!=='object'){cfg={}}cfg=clone(cfg);ALLOWED_TAGS='ALLOWED_TAGS'in cfg?addToSet({},cfg.ALLOWED_TAGS):DEFAULT_ALLOWED_TAGS;ALLOWED_ATTR='ALLOWED_ATTR'in cfg?addToSet({},cfg.ALLOWED_ATTR):DEFAULT_ALLOWED_ATTR;URI_SAFE_ATTRIBUTES='ADD_URI_SAFE_ATTR'in cfg?addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),cfg.ADD_URI_SAFE_ATTR):DEFAULT_URI_SAFE_ATTRIBUTES;DATA_URI_TAGS='ADD_DATA_URI_TAGS'in cfg?addToSet(clone(DEFAULT_DATA_URI_TAGS),cfg.ADD_DATA_URI_TAGS):DEFAULT_DATA_URI_TAGS;FORBID_CONTENTS='FORBID_CONTENTS'in cfg?addToSet({},cfg.FORBID_CONTENTS):DEFAULT_FORBID_CONTENTS;FORBID_TAGS='FORBID_TAGS'in cfg?addToSet({},cfg.FORBID_TAGS):{};FORBID_ATTR='FORBID_ATTR'in cfg?addToSet({},cfg.FORBID_ATTR):{};USE_PROFILES='USE_PROFILES'in cfg?cfg.USE_PROFILES:false;ALLOW_ARIA_ATTR=cfg.ALLOW_ARIA_ATTR!==false;ALLOW_DATA_ATTR=cfg.ALLOW_DATA_ATTR!==false;ALLOW_UNKNOWN_PROTOCOLS=cfg.ALLOW_UNKNOWN_PROTOCOLS||false;SAFE_FOR_TEMPLATES=cfg.SAFE_FOR_TEMPLATES||false;WHOLE_DOCUMENT=cfg.WHOLE_DOCUMENT||false;RETURN_DOM=cfg.RETURN_DOM||false;RETURN_DOM_FRAGMENT=cfg.RETURN_DOM_FRAGMENT||false;RETURN_DOM_IMPORT=cfg.RETURN_DOM_IMPORT!==false;RETURN_TRUSTED_TYPE=cfg.RETURN_TRUSTED_TYPE||false;FORCE_BODY=cfg.FORCE_BODY||false;SANITIZE_DOM=cfg.SANITIZE_DOM!==false;KEEP_CONTENT=cfg.KEEP_CONTENT!==false;IN_PLACE=cfg.IN_PLACE||false;IS_ALLOWED_URI$$1=cfg.ALLOWED_URI_REGEXP||IS_ALLOWED_URI$$1;NAMESPACE=cfg.NAMESPACE||HTML_NAMESPACE;if(SAFE_FOR_TEMPLATES){ALLOW_DATA_ATTR=false}if(RETURN_DOM_FRAGMENT){RETURN_DOM=true}if(USE_PROFILES){ALLOWED_TAGS=addToSet({},[].concat(_toConsumableArray$1(text)));ALLOWED_ATTR=[];if(USE_PROFILES.html===true){addToSet(ALLOWED_TAGS,html);addToSet(ALLOWED_ATTR,html$1)}if(USE_PROFILES.svg===true){addToSet(ALLOWED_TAGS,svg);addToSet(ALLOWED_ATTR,svg$1);addToSet(ALLOWED_ATTR,xml)}if(USE_PROFILES.svgFilters===true){addToSet(ALLOWED_TAGS,svgFilters);addToSet(ALLOWED_ATTR,svg$1);addToSet(ALLOWED_ATTR,xml)}if(USE_PROFILES.mathMl===true){addToSet(ALLOWED_TAGS,mathMl);addToSet(ALLOWED_ATTR,mathMl$1);addToSet(ALLOWED_ATTR,xml)}}if(cfg.ADD_TAGS){if(ALLOWED_TAGS===DEFAULT_ALLOWED_TAGS){ALLOWED_TAGS=clone(ALLOWED_TAGS)}addToSet(ALLOWED_TAGS,cfg.ADD_TAGS)}if(cfg.ADD_ATTR){if(ALLOWED_ATTR===DEFAULT_ALLOWED_ATTR){ALLOWED_ATTR=clone(ALLOWED_ATTR)}addToSet(ALLOWED_ATTR,cfg.ADD_ATTR)}if(cfg.ADD_URI_SAFE_ATTR){addToSet(URI_SAFE_ATTRIBUTES,cfg.ADD_URI_SAFE_ATTR)}if(cfg.FORBID_CONTENTS){if(FORBID_CONTENTS===DEFAULT_FORBID_CONTENTS){FORBID_CONTENTS=clone(FORBID_CONTENTS)}addToSet(FORBID_CONTENTS,cfg.FORBID_CONTENTS)}if(KEEP_CONTENT){ALLOWED_TAGS['#text']=true}if(WHOLE_DOCUMENT){addToSet(ALLOWED_TAGS,['html','head','body'])}if(ALLOWED_TAGS.table){addToSet(ALLOWED_TAGS,['tbody']);delete FORBID_TAGS.tbody}if(freeze){freeze(cfg)}CONFIG=cfg};var MATHML_TEXT_INTEGRATION_POINTS=addToSet({},['mi','mo','mn','ms','mtext']);var HTML_INTEGRATION_POINTS=addToSet({},['foreignobject','desc','title','annotation-xml']);var ALL_SVG_TAGS=addToSet({},svg);addToSet(ALL_SVG_TAGS,svgFilters);addToSet(ALL_SVG_TAGS,svgDisallowed);var ALL_MATHML_TAGS=addToSet({},mathMl);addToSet(ALL_MATHML_TAGS,mathMlDisallowed);var _checkValidNamespace=function _checkValidNamespace(element){var parent=getParentNode(element);if(!parent||!parent.tagName){parent={namespaceURI:HTML_NAMESPACE,tagName:'template'}}var tagName=stringToLowerCase(element.tagName);var parentTagName=stringToLowerCase(parent.tagName);if(element.namespaceURI===SVG_NAMESPACE){if(parent.namespaceURI===HTML_NAMESPACE){return tagName==='svg'}if(parent.namespaceURI===MATHML_NAMESPACE){return tagName==='svg'&&(parentTagName==='annotation-xml'||MATHML_TEXT_INTEGRATION_POINTS[parentTagName])}return Boolean(ALL_SVG_TAGS[tagName])}if(element.namespaceURI===MATHML_NAMESPACE){if(parent.namespaceURI===HTML_NAMESPACE){return tagName==='math'}if(parent.namespaceURI===SVG_NAMESPACE){return tagName==='math'&&HTML_INTEGRATION_POINTS[parentTagName]}return Boolean(ALL_MATHML_TAGS[tagName])}if(element.namespaceURI===HTML_NAMESPACE){if(parent.namespaceURI===SVG_NAMESPACE&&!HTML_INTEGRATION_POINTS[parentTagName]){return false}if(parent.namespaceURI===MATHML_NAMESPACE&&!MATHML_TEXT_INTEGRATION_POINTS[parentTagName]){return false}var commonSvgAndHTMLElements=addToSet({},['title','style','font','a','script']);return!ALL_MATHML_TAGS[tagName]&&(commonSvgAndHTMLElements[tagName]||!ALL_SVG_TAGS[tagName])}return false};var _forceRemove=function _forceRemove(node){arrayPush(DOMPurify.removed,{element:node});try{node.parentNode.removeChild(node)}catch(_){try{node.outerHTML=emptyHTML}catch(_){node.remove()}}};var _removeAttribute=function _removeAttribute(name,node){try{arrayPush(DOMPurify.removed,{attribute:node.getAttributeNode(name),from:node})}catch(_){arrayPush(DOMPurify.removed,{attribute:null,from:node})}node.removeAttribute(name);if(name==='is'&&!ALLOWED_ATTR[name]){if(RETURN_DOM||RETURN_DOM_FRAGMENT){try{_forceRemove(node)}catch(_){}}else{try{node.setAttribute(name,'')}catch(_){}}}};var _initDocument=function _initDocument(dirty){var doc=void 0;var leadingWhitespace=void 0;if(FORCE_BODY){dirty=''+dirty}else{var matches=stringMatch(dirty,/^[\r\n\t ]+/);leadingWhitespace=matches&&matches[0]}var dirtyPayload=trustedTypesPolicy?trustedTypesPolicy.createHTML(dirty):dirty;if(NAMESPACE===HTML_NAMESPACE){try{doc=new DOMParser().parseFromString(dirtyPayload,'text/html')}catch(_){}}if(!doc||!doc.documentElement){doc=implementation.createDocument(NAMESPACE,'template',null);try{doc.documentElement.innerHTML=IS_EMPTY_INPUT?'':dirtyPayload}catch(_){}}var body=doc.body||doc.documentElement;if(dirty&&leadingWhitespace){body.insertBefore(document.createTextNode(leadingWhitespace),body.childNodes[0]||null)}if(NAMESPACE===HTML_NAMESPACE){return getElementsByTagName.call(doc,WHOLE_DOCUMENT?'html':'body')[0]}return WHOLE_DOCUMENT?doc.documentElement:body};var _createIterator=function _createIterator(root){return createNodeIterator.call(root.ownerDocument||root,root,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT,null,false)};var _isClobbered=function _isClobbered(elm){if(elm instanceof Text||elm instanceof Comment){return false}if(typeof elm.nodeName!=='string'||typeof elm.textContent!=='string'||typeof elm.removeChild!=='function'||!(elm.attributes instanceof NamedNodeMap)||typeof elm.removeAttribute!=='function'||typeof elm.setAttribute!=='function'||typeof elm.namespaceURI!=='string'||typeof elm.insertBefore!=='function'){return true}return false};var _isNode=function _isNode(object){return(typeof Node==='undefined'?'undefined':_typeof(Node))==='object'?object instanceof Node:object&&(typeof object==='undefined'?'undefined':_typeof(object))==='object'&&typeof object.nodeType==='number'&&typeof object.nodeName==='string'};var _executeHook=function _executeHook(entryPoint,currentNode,data){if(!hooks[entryPoint]){return}arrayForEach(hooks[entryPoint],function(hook){hook.call(DOMPurify,currentNode,data,CONFIG)})};var _sanitizeElements=function _sanitizeElements(currentNode){var content=void 0;_executeHook('beforeSanitizeElements',currentNode,null);if(_isClobbered(currentNode)){_forceRemove(currentNode);return true}if(stringMatch(currentNode.nodeName,/[\u0080-\uFFFF]/)){_forceRemove(currentNode);return true}var tagName=stringToLowerCase(currentNode.nodeName);_executeHook('uponSanitizeElement',currentNode,{tagName:tagName,allowedTags:ALLOWED_TAGS});if(!_isNode(currentNode.firstElementChild)&&(!_isNode(currentNode.content)||!_isNode(currentNode.content.firstElementChild))&®ExpTest(/<[/\w]/g,currentNode.innerHTML)&®ExpTest(/<[/\w]/g,currentNode.textContent)){_forceRemove(currentNode);return true}if(tagName==='select'&®ExpTest(/