芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/public_html/wp-content/plugins/woocommerce/assets/client/admin/sanitize/index.js
/*! For license information please see index.js.LICENSE.txt */ (()=>{"use strict";var e={53779:e=>{const{entries:t,setPrototypeOf:n,isFrozen:o,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:l,create:c}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),l||(l=function(e){return e}),s||(s=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const m=w(Array.prototype.forEach),p=w(Array.prototype.lastIndexOf),f=w(Array.prototype.pop),d=w(Array.prototype.push),h=w(Array.prototype.splice),T=w(String.prototype.toLowerCase),g=w(String.prototype.toString),E=w(String.prototype.match),_=w(String.prototype.replace),y=w(String.prototype.indexOf),A=w(String.prototype.trim),S=w(Object.prototype.hasOwnProperty),N=w(RegExp.prototype.test),b=(L=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n
1?n-1:0),r=1;r
2&&void 0!==arguments[2]?arguments[2]:T;n&&n(e,null);let i=t.length;for(;i--;){let n=t[i];if("string"==typeof n){const e=r(n);e!==n&&(o(t)||(t[i]=e),n=e)}e[n]=!0}return e}function D(e){for(let t=0;t
/gm),Y=l(/\$\{[\w\W]*/gm),j=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=l(/^aria-[\-\w]+$/),q=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=l(/^(?:\w+script|data):/i),K=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=l(/^html$/i),Z=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:Z,DATA_ATTR:j,DOCTYPE_NAME:V,ERB_EXPR:B,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:G,TMPLIT_EXPR:Y});const Q=function(){return"undefined"==typeof window?null:window};var ee=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const o=t=>e(t);if(o.version="3.2.6",o.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const i=r,l=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:u,Node:L,Element:w,NodeFilter:D,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:Y,trustedTypes:j}=n,X=w.prototype,$=v(X,"cloneNode"),K=v(X,"remove"),Z=v(X,"nextSibling"),ee=v(X,"childNodes"),te=v(X,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:le}=r,{importNode:ce}=i;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof t&&"function"==typeof te&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:Te,CUSTOM_ELEMENT:ge}=J;let{IS_ALLOWED_URI:Ee}=J,_e=null;const ye=R({},[...C,...x,...M,...k,...P]);let Ae=null;const Se=R({},[...z,...F,...H,...W]);let Ne=Object.seal(c(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}})),be=null,Le=null,we=!0,Re=!0,De=!1,Oe=!0,ve=!1,Ce=!0,xe=!1,Me=!1,Ie=!1,ke=!1,Ue=!1,Pe=!1,ze=!0,Fe=!1,He=!0,We=!1,Ge={},Be=null;const Ye=R({},["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 je=null;const Xe=R({},["audio","video","img","source","image","track"]);let qe=null;const $e=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Je=Ze,Qe=!1,et=null;const tt=R({},[Ke,Ve,Ze],g);let nt=R({},["mi","mo","mn","ms","mtext"]),ot=R({},["annotation-xml"]);const rt=R({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const st=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=O(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?g:T,_e=S(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,lt):ye,Ae=S(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,lt):Se,et=S(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):tt,qe=S(e,"ADD_URI_SAFE_ATTR")?R(O($e),e.ADD_URI_SAFE_ATTR,lt):$e,je=S(e,"ADD_DATA_URI_TAGS")?R(O(Xe),e.ADD_DATA_URI_TAGS,lt):Xe,Be=S(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,lt):Ye,be=S(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,lt):O({}),Le=S(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,lt):O({}),Ge=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ve=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,xe=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Ue=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,ze=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,Ee=e.ALLOWED_URI_REGEXP||q,Je=e.NAMESPACE||Ze,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,ot=e.HTML_INTEGRATION_POINTS||ot,Ne=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(Re=!1),Ue&&(ke=!0),Ge&&(_e=R({},P),Ae=[],!0===Ge.html&&(R(_e,C),R(Ae,z)),!0===Ge.svg&&(R(_e,x),R(Ae,F),R(Ae,W)),!0===Ge.svgFilters&&(R(_e,M),R(Ae,F),R(Ae,W)),!0===Ge.mathMl&&(R(_e,k),R(Ae,H),R(Ae,W))),e.ADD_TAGS&&(_e===ye&&(_e=O(_e)),R(_e,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Ae===Se&&(Ae=O(Ae)),R(Ae,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&R(qe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Be===Ye&&(Be=O(Be)),R(Be,e.FORBID_CONTENTS,lt)),He&&(_e["#text"]=!0),xe&&R(_e,["html","head","body"]),_e.table&&(R(_e,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,l)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));a&&a(e),ct=e}},pt=R({},[...x,...M,...I]),ft=R({},[...k,...U]),dt=function(e){d(o.removed,{element:e});try{te(e).removeChild(e)}catch(t){K(e)}},ht=function(e,t){try{d(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ke||Ue)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){let t=null,n=null;if(Ie)e="
"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Je===Ze&&(e=''+e+"");const o=ne?ne.createHTML(e):e;if(Je===Ze)try{t=(new Y).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?oe:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Je===Ze?le.call(t,xe?"html":"body")[0]:xe?t.documentElement:i},gt=function(e){return ie.call(e.ownerDocument||e,e,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT|D.SHOW_PROCESSING_INSTRUCTION|D.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof L&&e instanceof L};function yt(e,t,n){m(e,(e=>{e.call(o,t,n,ct)}))}const At=function(e){let t=null;if(yt(se.beforeSanitizeElements,e,null),Et(e))return dt(e),!0;const n=lt(e.nodeName);if(yt(se.uponSanitizeElement,e,{tagName:n,allowedTags:_e}),Ce&&e.hasChildNodes()&&!_t(e.firstElementChild)&&N(/<[/\w!]/g,e.innerHTML)&&N(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(Ce&&8===e.nodeType&&N(/<[/\w]/g,e.data))return dt(e),!0;if(!_e[n]||be[n]){if(!be[n]&&Nt(n)){if(Ne.tagNameCheck instanceof RegExp&&N(Ne.tagNameCheck,n))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))return!1}if(He&&!Be[n]){const t=te(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,Z(e))}}return dt(e),!0}return e instanceof w&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=T(e.tagName),o=T(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||nt[o]):Boolean(pt[n]):e.namespaceURI===Ke?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Ve?"math"===n&&ot[o]:Boolean(ft[n]):e.namespaceURI===Ze?!(t.namespaceURI===Ve&&!ot[o])&&!(t.namespaceURI===Ke&&!nt[o])&&!ft[n]&&(rt[n]||!pt[n]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!N(/<\/no(script|embed|frames)/i,e.innerHTML)?(ve&&3===e.nodeType&&(t=e.textContent,m([ue,me,pe],(e=>{t=_(t,e," ")})),e.textContent!==t&&(d(o.removed,{element:e.cloneNode()}),e.textContent=t)),yt(se.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(ze&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(Re&&!Le[t]&&N(fe,t));else if(we&&N(de,t));else if(!Ae[t]||Le[t]){if(!(Nt(e)&&(Ne.tagNameCheck instanceof RegExp&&N(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&N(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&N(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(qe[t]);else if(N(Ee,_(n,Te,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!je[e])if(De&&!N(he,_(n,Te,"")));else if(n)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&E(e,ge)},bt=function(e){yt(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Et(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=lt(a),u=c;let p="value"===a?u:A(u);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,yt(se.uponSanitizeAttribute,e,n),p=n.attrValue,!Fe||"id"!==s&&"name"!==s||(ht(a,e),p="user-content-"+p),Ce&&N(/((--!?|])>)|<\/(style|title)/i,p)){ht(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){ht(a,e);continue}if(!Oe&&N(/\/>/i,p)){ht(a,e);continue}ve&&m([ue,me,pe],(e=>{p=_(p,e," ")}));const d=lt(e.nodeName);if(St(d,s,p)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":p=ne.createHTML(p);break;case"TrustedScriptURL":p=ne.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),Et(e)?dt(e):f(o.removed)}catch(t){ht(a,e)}}else ht(a,e)}yt(se.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=gt(t);for(yt(se.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)yt(se.uponSanitizeShadowNode,n,null),At(n),bt(n),n.content instanceof s&&e(n.content);yt(se.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Me||mt(t),o.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=lt(e.nodeName);if(!_e[t]||be[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof L)n=Tt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ke&&!ve&&!xe&&-1===e.indexOf("<"))return ne&&Pe?ne.createHTML(e):e;if(n=Tt(e),!n)return ke?null:Pe?oe:""}n&&Ie&&dt(n.firstChild);const c=gt(We?e:n);for(;a=c.nextNode();)At(a),bt(a),a.content instanceof s&&Lt(a.content);if(We)return e;if(ke){if(Ue)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ae.shadowroot||Ae.shadowrootmode)&&(l=ce.call(i,l,!0)),l}let u=xe?n.outerHTML:n.innerHTML;return xe&&_e["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&N(V,n.ownerDocument.doctype.name)&&(u="\n"+u),ve&&m([ue,me,pe],(e=>{u=_(u,e," ")})),ne&&Pe?ne.createHTML(u):u},o.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},o.clearConfig=function(){ct=null,Me=!1},o.isValidAttribute=function(e,t,n){ct||mt({});const o=lt(e),r=lt(t);return St(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&d(se[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=p(se[e],t);return-1===n?void 0:h(se[e],n,1)[0]}return f(se[e])},o.removeHooks=function(e){se[e]=[]},o.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();e.exports=ee},1327:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TRUSTED_POLICY_NAME=t.DEFAULT_ALLOWED_ATTR=t.DEFAULT_ALLOWED_TAGS=void 0,t.sanitizeHTML=function(e,n){const o=n?.tags||t.DEFAULT_ALLOWED_TAGS,a=n?.attr||t.DEFAULT_ALLOWED_ATTR,l=(0,i.getTrustedTypesPolicy)(),c={ALLOWED_TAGS:[...o],ALLOWED_ATTR:[...a],...l&&{TRUSTED_TYPES_POLICY:l}},s=r.default.sanitize(e,c);return"string"==typeof s?s:String(s)};const r=o(n(53779)),i=n(68431);t.DEFAULT_ALLOWED_TAGS=["a","b","em","i","strong","p","br","abbr"],t.DEFAULT_ALLOWED_ATTR=["target","href","rel","name","download","title"];var a=n(68431);Object.defineProperty(t,"TRUSTED_POLICY_NAME",{enumerable:!0,get:function(){return a.TRUSTED_POLICY_NAME}})},68431:(e,t)=>{let n;Object.defineProperty(t,"__esModule",{value:!0}),t.TRUSTED_POLICY_NAME=void 0,t.getTrustedTypesPolicy=function(){return void 0!==n?n:window&&window.trustedTypes?(n=window.trustedTypes.createPolicy(t.TRUSTED_POLICY_NAME,{createHTML:e=>e,createScriptURL:e=>e}),n):(n=null,null)},t.TRUSTED_POLICY_NAME="woocommerce-sanitize"}},t={},n=function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}(1327);(window.wc=window.wc||{}).sanitize=n})();