woocommerce/packages/woocommerce-admin/dist/wp-admin-scripts/payment-method-promotions.js
2021-12-10 12:03:04 +00:00

2 lines
21 KiB
JavaScript

/*! For license information please see payment-method-promotions.js.LICENSE.txt */
this.wc=this.wc||{},this.wc.paymentMethodPromotions=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=472)}({0:function(e,t){e.exports=window.wp.element},11:function(e,t){e.exports=window.wc.data},16:function(e,t){e.exports=window.wc.tracks},2:function(e,t){e.exports=window.wp.i18n},21:function(e,t){e.exports=window.wc.components},3:function(e,t){e.exports=window.wp.components},460:function(e,t,n){},472:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(21),i=n(3),a=n(11),l=n(16),c=n(7),s=n(53),u=n(2);n(460);function m(e){return{__html:Object(s.sanitize)(e,{ALLOWED_TAGS:["a","img","br"],ALLOWED_ATTR:["href","src","class","alt","target"]})}}const d=({pluginSlug:e,sortColumnContent:t,descriptionColumnContent:n,title:s,titleLink:d,subTitleContent:p})=>{const[f,g]=Object(r.useState)(!1),{installAndActivatePlugins:y}=Object(c.useDispatch)(a.PLUGINS_STORE_NAME),{createNotice:h}=Object(c.useDispatch)("core/notices"),{gatewayIsActive:v,paymentGateway:b}=Object(c.useSelect)(t=>{const{getPaymentGateway:n}=t(a.PAYMENT_GATEWAYS_STORE_NAME),r=t(a.PLUGINS_STORE_NAME).getActivePlugins(),o=r&&r.includes(e);let i;return o&&(i=n(e.replace(/\-/g,"_"))),{gatewayIsActive:o,paymentGateway:i}});Object(r.useEffect)(()=>{v&&b&&b.settings_url&&(window.location.href=b.settings_url)},[v,b]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("td",{className:"sort ui-sortable-handle",width:"1%",dangerouslySetInnerHTML:{__html:t}}),Object(r.createElement)("td",{className:"name"},Object(r.createElement)("div",{className:"wc-payment-gateway-method_name"},Object(r.createElement)(o.Link,{target:"_blank",type:"external",rel:"noreferrer",href:d},s),p?Object(r.createElement)("div",{className:"pre-install-payment-gateway_subtitle",dangerouslySetInnerHTML:m(p)}):null)),Object(r.createElement)("td",{className:"pre-install-payment-gateway_status"}),Object(r.createElement)("td",{className:"description",dangerouslySetInnerHTML:m(n)}),Object(r.createElement)("td",{className:"action"},Object(r.createElement)(i.Button,{className:"button alignright",onClick:()=>{f||(g(!0),Object(l.recordEvent)("settings_payments_recommendations_setup",{extension_selected:e}),y([e]).catch(e=>{e.message&&h("error",e.message),g(!1)}))},isSecondary:!0,isBusy:f,"aria-disabled":f},Object(u.__)("Install",'woocommerce'))))};[{gatewayId:"pre_install_woocommerce_payments_promotion",pluginSlug:"woocommerce-payments",link:"https://woocommerce.com/payments/?utm_medium=product"}].forEach(e=>{const t=document.querySelector(`[data-gateway_id="${e.gatewayId}"]`);if(t){const n=t.children[0].innerHTML,o=t.children[3].innerHTML,i=t.getElementsByClassName("wc-payment-gateway-method-title"),a=t.getElementsByClassName("gateway-subtitle");Object(r.render)(Object(r.createElement)(d,{pluginSlug:e.pluginSlug,sortColumnContent:n,descriptionColumnContent:o,title:1===i.length?i[0].innerHTML:void 0,titleLink:e.link,subTitleContent:1===a.length?a[0].innerHTML:void 0}),t)}})},53:function(e,t,n){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,u=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var m,d=A(Array.prototype.forEach),p=A(Array.prototype.pop),f=A(Array.prototype.push),g=A(String.prototype.toLowerCase),y=A(String.prototype.match),h=A(String.prototype.replace),v=A(String.prototype.indexOf),b=A(String.prototype.trim),w=A(RegExp.prototype.test),T=(m=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(m,t)});function A(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function _(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"==typeof i){var a=g(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function S(t){var n=l(null),r=void 0;for(r in t)s(e,t,[r])&&(n[r]=t[r]);return n}function x(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var O=i(["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"]),E=i(["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"]),N=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["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"]),L=i(["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"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=i(["#text"]),D=i(["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"]),j=i(["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"]),C=i(["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"]),I=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),H=a(/<%[\s\S]*|[\s\S]*%>/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),P=a(/^aria-[\-\w]+$/),U=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),G=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Y=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!==(void 0===e?"undefined":W(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(),n=function(t){return e(t)};if(n.version="2.2.9",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,s=t.Element,u=t.NodeFilter,m=t.NamedNodeMap,A=void 0===m?t.NamedNodeMap||t.MozNamedAttrMap:m,V=t.Text,$=t.Comment,X=t.DOMParser,Z=t.trustedTypes,J=s.prototype,Q=x(J,"cloneNode"),ee=x(J,"nextSibling"),te=x(J,"childNodes"),ne=x(J,"parentNode");if("function"==typeof l){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=K(Z,r),ie=oe&&Ie?oe.createHTML(""):"",ae=o,le=ae.implementation,ce=ae.createNodeIterator,se=ae.createDocumentFragment,ue=r.importNode,me={};try{me=S(o).documentMode?o.documentMode:{}}catch(e){}var de={};n.isSupported="function"==typeof ne&&le&&void 0!==le.createHTMLDocument&&9!==me;var pe=F,fe=H,ge=z,ye=P,he=B,ve=G,be=U,we=null,Te=_({},[].concat(q(O),q(E),q(N),q(L),q(R))),Ae=null,_e=_({},[].concat(q(D),q(j),q(C),q(I))),Se=null,xe=null,Oe=!0,Ee=!0,Ne=!1,ke=!1,Le=!1,Me=!1,Re=!1,De=!1,je=!1,Ce=!0,Ie=!1,Fe=!0,He=!0,ze=!1,Pe={},Ue=_({},["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"]),Be=null,Ge=_({},["audio","video","img","source","image","track"]),We=null,qe=_({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml",$e=Ve,Xe=!1,Ze=null,Je=o.createElement("form"),Qe=function(e){Ze&&Ze===e||(e&&"object"===(void 0===e?"undefined":W(e))||(e={}),e=S(e),we="ALLOWED_TAGS"in e?_({},e.ALLOWED_TAGS):Te,Ae="ALLOWED_ATTR"in e?_({},e.ALLOWED_ATTR):_e,We="ADD_URI_SAFE_ATTR"in e?_(S(qe),e.ADD_URI_SAFE_ATTR):qe,Be="ADD_DATA_URI_TAGS"in e?_(S(Ge),e.ADD_DATA_URI_TAGS):Ge,Se="FORBID_TAGS"in e?_({},e.FORBID_TAGS):{},xe="FORBID_ATTR"in e?_({},e.FORBID_ATTR):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Ce=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,$e=e.NAMESPACE||Ve,ke&&(Ee=!1),je&&(De=!0),Pe&&(we=_({},[].concat(q(R))),Ae=[],!0===Pe.html&&(_(we,O),_(Ae,D)),!0===Pe.svg&&(_(we,E),_(Ae,j),_(Ae,I)),!0===Pe.svgFilters&&(_(we,N),_(Ae,j),_(Ae,I)),!0===Pe.mathMl&&(_(we,L),_(Ae,C),_(Ae,I))),e.ADD_TAGS&&(we===Te&&(we=S(we)),_(we,e.ADD_TAGS)),e.ADD_ATTR&&(Ae===_e&&(Ae=S(Ae)),_(Ae,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&_(We,e.ADD_URI_SAFE_ATTR),He&&(we["#text"]=!0),Le&&_(we,["html","head","body"]),we.table&&(_(we,["tbody"]),delete Se.tbody),i&&i(e),Ze=e)},et=_({},["mi","mo","mn","ms","mtext"]),tt=_({},["foreignobject","desc","title","annotation-xml"]),nt=_({},E);_(nt,N),_(nt,k);var rt=_({},L);_(rt,M);var ot=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Ke)return t.namespaceURI===Ve?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===r||et[r]):Boolean(nt[n]);if(e.namespaceURI===Ye)return t.namespaceURI===Ve?"math"===n:t.namespaceURI===Ke?"math"===n&&tt[r]:Boolean(rt[n]);if(e.namespaceURI===Ve){if(t.namespaceURI===Ke&&!tt[r])return!1;if(t.namespaceURI===Ye&&!et[r])return!1;var o=_({},["title","style","font","a","script"]);return!rt[n]&&(o[n]||!nt[n])}return!1},it=function(e){f(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},at=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(De||je)try{it(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){var t=void 0,n=void 0;if(Re)e="<remove></remove>"+e;else{var r=y(e,/^[\r\n\t ]+/);n=r&&r[0]}var i=oe?oe.createHTML(e):e;if($e===Ve)try{t=(new X).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){t=le.createDocument($e,"template",null);try{t.documentElement.innerHTML=Xe?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Le?t.documentElement:a},ct=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},st=function(e){return!(e instanceof V||e instanceof $||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof A&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ut=function(e){return"object"===(void 0===c?"undefined":W(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":W(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},mt=function(e,t,r){de[e]&&d(de[e],(function(e){e.call(n,t,r,Ze)}))},dt=function(e){var t=void 0;if(mt("beforeSanitizeElements",e,null),st(e))return it(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=g(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!ut(e.firstElementChild)&&(!ut(e.content)||!ut(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return it(e),!0;if(!we[r]||Se[r]){if(He&&!Ue[r]){var o=ne(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(Q(i[a],!0),ee(e))}return it(e),!0}return e instanceof s&&!ot(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(ke&&3===e.nodeType&&(t=e.textContent,t=h(t,pe," "),t=h(t,fe," "),e.textContent!==t&&(f(n.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(it(e),!0)},pt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in Je))return!1;if(Ee&&w(ge,t));else if(Oe&&w(ye,t));else{if(!Ae[t]||xe[t])return!1;if(We[t]);else if(w(be,h(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!Be[e])if(Ne&&!w(he,h(n,ve,"")));else if(n)return!1}return!0},ft=function(e){var t=void 0,r=void 0,o=void 0,i=void 0;mt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};for(i=a.length;i--;){var c=t=a[i],s=c.name,u=c.namespaceURI;if(r=b(t.value),o=g(s),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(at(s,e),l.keepAttr))if(w(/\/>/i,r))at(s,e);else{ke&&(r=h(r,pe," "),r=h(r,fe," "));var m=e.nodeName.toLowerCase();if(pt(m,o,r))try{u?e.setAttributeNS(u,s,r):e.setAttribute(s,r),p(n.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)}},gt=function e(t){var n=void 0,r=ct(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof a&&e(n.content),ft(n));mt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var i=void 0,l=void 0,s=void 0,u=void 0,m=void 0;if((Xe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ut(e)){if("function"!=typeof e.toString)throw T("toString is not a function");if("string"!=typeof(e=e.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported){if("object"===W(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ut(e))return t.toStaticHTML(e.outerHTML)}return e}if(Me||Qe(o),n.removed=[],"string"==typeof e&&(ze=!1),ze);else if(e instanceof c)1===(l=(i=lt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l);else{if(!De&&!ke&&!Le&&-1===e.indexOf("<"))return oe&&Ie?oe.createHTML(e):e;if(!(i=lt(e)))return De?null:ie}i&&Re&&it(i.firstChild);for(var d=ct(ze?e:i);s=d.nextNode();)3===s.nodeType&&s===u||dt(s)||(s.content instanceof a&&gt(s.content),ft(s),u=s);if(u=null,ze)return e;if(De){if(je)for(m=se.call(i.ownerDocument);i.firstChild;)m.appendChild(i.firstChild);else m=i;return Ce&&(m=ue.call(r,m,!0)),m}var p=Le?i.outerHTML:i.innerHTML;return ke&&(p=h(p,pe," "),p=h(p,fe," ")),oe&&Ie?oe.createHTML(p):p},n.setConfig=function(e){Qe(e),Me=!0},n.clearConfig=function(){Ze=null,Me=!1},n.isValidAttribute=function(e,t,n){Ze||Qe({});var r=g(e),o=g(t);return pt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(de[e]=de[e]||[],f(de[e],t))},n.removeHook=function(e){de[e]&&p(de[e])},n.removeHooks=function(e){de[e]&&(de[e]=[])},n.removeAllHooks=function(){de={}},n}()}()},7:function(e,t){e.exports=window.wp.data}});