diff --git a/.gitignore b/.gitignore index 0621cd6a1..191b54b01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ composer.lock vendor node_modules npm-debug.log -build ## IDE .idea diff --git a/build/pluginSidebar.js b/build/pluginSidebar.js new file mode 100644 index 000000000..ab2e9d891 --- /dev/null +++ b/build/pluginSidebar.js @@ -0,0 +1,2 @@ +!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}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=4)}([function(e,t,n){e.exports=n(2)()},function(e,t,n){e.exports=function(){"use strict";var e=Object.freeze||function(e){return e},t=e(["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","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","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"]),n=e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","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","video","view","vkern"]),r=e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o=e(["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"]),i=e(["#text"]),a=Object.freeze||function(e){return e},l=a(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","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","type","usemap","valign","value","width","xmlns"]),c=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","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","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","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","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"]),s=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","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"]),u=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),p=Object.hasOwnProperty,f=Object.setPrototypeOf,d=("undefined"!=typeof Reflect&&Reflect).apply;function m(e,t){f&&f(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=r.toLowerCase();o!==r&&(Object.isFrozen(t)||(t[n]=o),r=o)}e[r]=!0}return e}function h(e){var t={},n=void 0;for(n in e)d(p,e,[n])&&(t[n]=e[n]);return t}d||(d=function(e,t,n){return e.apply(t,n)});var y=Object.seal||function(e){return e},v=y(/\{\{[\s\S]*|[\s\S]*\}\}/gm),b=y(/<%[\s\S]*|[\s\S]*%>/gm),g=y(/^data-[\-\w.\u00B7-\uFFFF]/),w=y(/^aria-[\-\w]+$/),_=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S=y(/^(?:\w+script|data):/i),E=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),R="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 O(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:k(),p=function(t){return e(t)};if(p.version="1.0.10",p.removed=[],!a||!a.document||9!==a.document.nodeType)return p.isSupported=!1,p;var f=a.document,d=!1,y=!1,x=a.document,N=a.DocumentFragment,M=a.HTMLTemplateElement,L=a.Node,j=a.NodeFilter,D=a.NamedNodeMap,H=void 0===D?a.NamedNodeMap||a.MozNamedAttrMap:D,I=a.Text,q=a.Comment,F=a.DOMParser,U=a.TrustedTypes;if("function"==typeof M){var z=x.createElement("template");z.content&&z.content.ownerDocument&&(x=z.content.ownerDocument)}var B=C(U,f),W=B?B.createHTML(""):"",G=x,J=G.implementation,K=G.createNodeIterator,V=G.getElementsByTagName,Y=G.createDocumentFragment,Q=f.importNode,X={};p.isSupported=J&&void 0!==J.createHTMLDocument&&9!==x.documentMode;var $=v,Z=b,ee=g,te=w,ne=S,re=E,oe=_,ie=null,ae=m({},[].concat(O(t),O(n),O(r),O(o),O(i))),le=null,ce=m({},[].concat(O(l),O(c),O(s),O(u))),se=null,ue=null,pe=!0,fe=!0,de=!1,me=!1,he=!1,ye=!1,ve=!1,be=!1,ge=!1,we=!1,_e=!1,Se=!0,Ee=!0,Re=!1,Oe={},Pe=m({},["audio","head","math","script","style","template","svg","video"]),Te=m({},["audio","video","img","source","image"]),Ae=m({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ke=null,Ce=x.createElement("form"),xe=function(e){ke&&ke===e||(e&&"object"===(void 0===e?"undefined":R(e))||(e={}),ie="ALLOWED_TAGS"in e?m({},e.ALLOWED_TAGS):ae,le="ALLOWED_ATTR"in e?m({},e.ALLOWED_ATTR):ce,se="FORBID_TAGS"in e?m({},e.FORBID_TAGS):{},ue="FORBID_ATTR"in e?m({},e.FORBID_ATTR):{},Oe="USE_PROFILES"in e&&e.USE_PROFILES,pe=!1!==e.ALLOW_ARIA_ATTR,fe=!1!==e.ALLOW_DATA_ATTR,de=e.ALLOW_UNKNOWN_PROTOCOLS||!1,me=e.SAFE_FOR_JQUERY||!1,he=e.SAFE_FOR_TEMPLATES||!1,ye=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,we=e.RETURN_DOM_FRAGMENT||!1,_e=e.RETURN_DOM_IMPORT||!1,be=e.FORCE_BODY||!1,Se=!1!==e.SANITIZE_DOM,Ee=!1!==e.KEEP_CONTENT,Re=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||oe,he&&(fe=!1),we&&(ge=!0),Oe&&(ie=m({},[].concat(O(i))),le=[],!0===Oe.html&&(m(ie,t),m(le,l)),!0===Oe.svg&&(m(ie,n),m(le,c),m(le,u)),!0===Oe.svgFilters&&(m(ie,r),m(le,c),m(le,u)),!0===Oe.mathMl&&(m(ie,o),m(le,s),m(le,u))),e.ADD_TAGS&&(ie===ae&&(ie=h(ie)),m(ie,e.ADD_TAGS)),e.ADD_ATTR&&(le===ce&&(le=h(le)),m(le,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&m(Ae,e.ADD_URI_SAFE_ATTR),Ee&&(ie["#text"]=!0),ye&&m(ie,["html","head","body"]),ie.table&&m(ie,["tbody"]),A&&A(e),ke=e)},Ne=function(e){p.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=W}},Me=function(e,t){try{p.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){p.removed.push({attribute:null,from:t})}t.removeAttribute(e)},Le=function(e){var t=void 0,n=void 0;if(be)e=""+e;else{var r=e.match(/^[\s]+/);(n=r&&r[0])&&(e=e.slice(n.length))}if(d)try{t=(new F).parseFromString(e,"text/html")}catch(e){}if(y&&m(se,["title"]),!t||!t.documentElement){var o=t=J.createHTMLDocument(""),i=o.body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=B?B.createHTML(e):e}return n&&t.body.insertBefore(x.createTextNode(n),t.body.childNodes[0]||null),V.call(t,ye?"html":"body")[0]};p.isSupported&&(function(){try{var e=Le('

');e.querySelector("svg img")&&(d=!0)}catch(e){}}(),function(){try{var e=Le("</title><img>");e.querySelector("title").innerHTML.match(/<\/title/)&&(y=!0)}catch(e){}}());var je=function(e){return K.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT,function(){return j.FILTER_ACCEPT},!1)},De=function(e){return"object"===(void 0===L?"undefined":R(L))?e instanceof L:e&&"object"===(void 0===e?"undefined":R(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},He=function(e,t,n){X[e]&&X[e].forEach(function(e){e.call(p,t,n,ke)})},Ie=function(e){var t,n=void 0;if(He("beforeSanitizeElements",e,null),!((t=e)instanceof I||t instanceof q||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof H&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return Ne(e),!0;var r=e.nodeName.toLowerCase();if(He("uponSanitizeElement",e,{tagName:r,allowedTags:ie}),!ie[r]||se[r]){if(Ee&&!Pe[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",B?B.createHTML(o):o)}catch(e){}return Ne(e),!0}return"noscript"===r&&e.innerHTML.match(/<\/noscript/i)?(Ne(e),!0):"noembed"===r&&e.innerHTML.match(/<\/noembed/i)?(Ne(e),!0):(!me||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(p.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),he&&3===e.nodeType&&(n=(n=(n=e.textContent).replace($," ")).replace(Z," "),e.textContent!==n&&(p.removed.push({element:e.cloneNode()}),e.textContent=n)),He("afterSanitizeElements",e,null),!1)},qe=function(e,t,n){if(Se&&("id"===t||"name"===t)&&(n in x||n in Ce))return!1;if(fe&&ee.test(t));else if(pe&&te.test(t));else{if(!le[t]||ue[t])return!1;if(Ae[t]);else if(oe.test(n.replace(re,"")));else if("src"!==t&&"xlink:href"!==t||"script"===e||0!==n.indexOf("data:")||!Te[e])if(de&&!ne.test(n.replace(re,"")));else if(n)return!1}return!0},Fe=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;He("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le};for(i=a.length;i--;){var c=t=a[i],s=c.name,u=c.namespaceURI;if(n=t.value.trim(),r=s.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,He("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)o=a.id,a=P(T,a,[]),Me("id",e),Me(s,e),a.indexOf(o)>i&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(le[r]||!ue[r]))continue;"id"===s&&e.setAttribute(s,""),Me(s,e)}if(l.keepAttr){he&&(n=(n=n.replace($," ")).replace(Z," "));var f=e.nodeName.toLowerCase();if(qe(f,r,n))try{u?e.setAttributeNS(u,s,n):e.setAttribute(s,n),p.removed.pop()}catch(e){}}}He("afterSanitizeAttributes",e,null)}},Ue=function e(t){var n=void 0,r=je(t);for(He("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)He("uponSanitizeShadowNode",n,null),Ie(n)||(n.content instanceof N&&e(n.content),Fe(n));He("afterSanitizeShadowDOM",t,null)};return p.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,l=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!De(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!p.isSupported){if("object"===R(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof e)return a.toStaticHTML(e);if(De(e))return a.toStaticHTML(e.outerHTML)}return e}if(ve||xe(t),p.removed=[],Re);else if(e instanceof L)n=Le("\x3c!--\x3e"),1===(r=n.ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:n.appendChild(r);else{if(!ge&&!he&&!ye&&-1===e.indexOf("<"))return B?B.createHTML(e):e;if(!(n=Le(e)))return ge?null:W}n&&be&&Ne(n.firstChild);for(var c=je(Re?e:n);o=c.nextNode();)3===o.nodeType&&o===i||Ie(o)||(o.content instanceof N&&Ue(o.content),Fe(o),i=o);if(i=null,Re)return e;if(ge){if(we)for(l=Y.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return _e&&(l=Q.call(f,l,!0)),l}var s=ye?n.outerHTML:n.innerHTML;return he&&(s=(s=s.replace($," ")).replace(Z," ")),B?B.createHTML(s):s},p.setConfig=function(e){xe(e),ve=!0},p.clearConfig=function(){ke=null,ve=!1},p.isValidAttribute=function(e,t,n){ke||xe({});var r=e.toLowerCase(),o=t.toLowerCase();return qe(r,o,n)},p.addHook=function(e,t){"function"==typeof t&&(X[e]=X[e]||[],X[e].push(t))},p.removeHook=function(e){X[e]&&X[e].pop()},p.removeHooks=function(e){X[e]&&(X[e]=[])},p.removeAllHooks=function(){X={}},p}()}()},function(e,t,n){"use strict";var r=n(3);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return(r="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})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,a(t).apply(this,arguments))}var n,r,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,React.PureComponent),n=t,(r=[{key:"render",value:function(){return React.createElement("svg",{enableBackground:"new 0 0 26.77438 26.77438",height:"26.77438px",version:"1.1",viewBox:"0 0 26.77438 26.77438",width:"26.77438px",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},React.createElement("g",null,React.createElement("g",null,React.createElement("g",null,React.createElement("path",{d:"M4.71813,13.5345v4.77055l0.00002,0.65257 c0,0.0568-0.00002,0.11365,0.00035,0.17044c0.00025,0.04783,0.00081,0.0957,0.00209,0.14355 c0.00283,0.10423,0.00899,0.20939,0.02751,0.31251c0.01879,0.10458,0.04945,0.20193,0.0978,0.29693 c0.04756,0.0934,0.10962,0.17891,0.1837,0.253c0.07406,0.07407,0.15948,0.13619,0.25284,0.18372 c0.09503,0.0484,0.19239,0.07911,0.29701,0.09791c0.10299,0.01855,0.20809,0.02465,0.31225,0.02748 c0.04783,0.0013,0.09566,0.00183,0.14351,0.00215c0.05676,0.00033,0.11354,0.00031,0.17035,0.00031l0.65231,0.00002h4.77141 c0.13713,0,0.1819-0.18436,0.05989-0.24694c-2.91487-1.49526-5.22884-3.80922-6.72409-6.72407 c-0.02514-0.04903-0.06995-0.07114-0.11456-0.07114C4.78411,13.40348,4.71813,13.45246,4.71813,13.5345 M6.20869,4.71816 c-0.05692,0-0.11382,0.00002-0.17074,0.00035C5.99004,4.71878,5.9421,4.71937,5.89418,4.72066 C5.78975,4.72349,5.68438,4.72962,5.58112,4.74818C5.47637,4.76705,5.37885,4.79772,5.28367,4.84613 C5.1901,4.89378,5.10448,4.95595,5.03024,5.03016C4.95604,5.10438,4.8938,5.18993,4.84622,5.28341 c-0.0485,0.09524-0.07925,0.19277-0.09809,0.29751C4.72958,5.68414,4.72344,5.78941,4.72059,5.89376 C4.71932,5.94165,4.71875,5.98955,4.7185,6.03746c-0.00035,0.048-0.00037,0.09602-0.00037,0.14401v0.02665v1.96427 c0,0.40087,0.07796,0.6084,0.37512,0.90561l10.99255,10.9925c0.30093,0.30094,0.50562,0.37513,0.90561,0.37513h1.96366 c0.05688,0,0.11384,0,0.17074-0.00036c0.04794-0.00028,0.09584-0.00084,0.14378-0.00216 c0.10446-0.00281,0.20978-0.00894,0.31304-0.02751c0.10479-0.01884,0.20229-0.04954,0.29747-0.09796 c0.09358-0.04766,0.17919-0.10981,0.25338-0.18402c0.07428-0.07423,0.13647-0.15976,0.18408-0.25323 c0.04852-0.09524,0.07924-0.19277,0.09809-0.29752c0.01855-0.10318,0.0247-0.20845,0.0275-0.31283 c0.0013-0.04788,0.00187-0.09577,0.00214-0.14376c0.00031-0.04819,0.00034-0.09648,0.00034-0.14476v-1.99007 c0-0.40094-0.07794-0.60844-0.37513-0.90564L9.07799,5.09329C8.77706,4.79237,8.57234,4.71818,8.17237,4.71816H6.20869 M13.53452,4.71816c-0.13717,0-0.18194,0.18436-0.05994,0.24694c2.9149,1.49524,5.22883,3.8092,6.72409,6.72407 c0.06261,0.12206,0.24697,0.07725,0.24697-0.05992V6.85873l-0.00005-0.65257c0-0.05679,0.00005-0.11363-0.00028-0.17043 c-0.00027-0.04786-0.00084-0.0957-0.00216-0.14353c-0.0028-0.10428-0.00891-0.20943-0.02746-0.31252 c-0.0188-0.1046-0.04947-0.20194-0.09784-0.29695c-0.0475-0.09343-0.10962-0.17888-0.18367-0.25297 c-0.0741-0.0741-0.15947-0.1362-0.25285-0.18375c-0.09504-0.04841-0.19239-0.0791-0.297-0.09789 c-0.10299-0.01854-0.2081-0.02468-0.31226-0.02751c-0.04781-0.00125-0.09565-0.00183-0.14348-0.00211 c-0.0568-0.00035-0.1136-0.00032-0.17037-0.00032l-0.65233-0.00002H13.53452"})))))}}])&&o(n.prototype,r),c&&o(n,c),t}(),s=n(0),u=n.n(s);function p(e){try{return JSON.parse(e)}catch(e){return null}}function f(e){var t=p(e);return Array.isArray(t)?t:[]}function d(e){return(d="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})(e)}function m(e){var t=p(e);return null===t||"object"!==d(t)||Array.isArray(t)||0!==JSON.stringify(t).indexOf("{")?{}:t}function h(e){var t=e.media_details,n=(t=void 0===t?{}:t).sizes,r=(n=void 0===n?{}:n)["post-thumbnail"],o=(r=void 0===r?{}:r).source_url,i=void 0===o?"":o,a=e.source_url;return i||(void 0===a?"":a)}function y(e){return(y="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})(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=wp,S=_.components.Button,E=_.data.withSelect,R=_.editor.MediaPlaceholder,O=_.i18n.__,P=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,g(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,React.PureComponent),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.media,n=e.metaKey,r=e.onUpdate;return e.value&&t&&t.id?React.createElement("div",null,React.createElement("p",null,React.createElement("img",{alt:"",src:h(t)})),React.createElement("p",null,React.createElement(S,{isPrimary:!0,onClick:function(){r(n,0)}},O("Remove image","kauffman")))):React.createElement(R,{accept:"image/*",allowedTypes:["image"],icon:"format-image",labels:{title:O("Select Image","kauffman")},onSelect:function(e){var t=e.id;r(n,t)}})}}])&&v(n.prototype,r),o&&v(n,o),t}();P.propTypes={media:u.a.shape({}).isRequired,metaKey:u.a.string.isRequired,onUpdate:u.a.func.isRequired,value:u.a.number.isRequired};var T=E(function(e,t){var n=t.value,r=e("core").getMedia;return{media:n&&r(n)||{}}})(P),A=n(1),k=n.n(A);function C(e){return(C="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})(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var j=wp,D=j.components.Notice,H=j.element.Fragment,I=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),N(this,M(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&L(e,t)}(t,React.PureComponent),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.dismissNotification,n=e.notifications.filter(function(e){return!0!==e.dismissed});return React.createElement(H,null,n.map(function(e){return React.createElement(D,{isDismissible:!0===e.dismissible,key:e.message,onRemove:function(){return t(e)},status:e.type},React.createElement("p",{dangerouslySetInnerHTML:{__html:k.a.sanitize(e.message)}}))}))}}])&&x(n.prototype,r),o&&x(n,o),t}();function q(e){return(q="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})(e)}function F(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){z(e,t,n[t])})}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}I.propTypes={dismissNotification:u.a.func.isRequired,notifications:u.a.arrayOf(u.a.shape({dismissed:u.a.bool,dismissible:u.a.bool,message:u.a.string,type:u.a.string})).isRequired};var K=wp,V=K.apiFetch,Y=K.compose,Q=(Y=void 0===Y?{}:Y).compose,X=K.components,$=(X=void 0===X?{}:X).Button,Z=X.CheckboxControl,ee=X.PanelBody,te=X.SelectControl,ne=X.Spinner,re=X.TextareaControl,oe=K.data,ie=(oe=void 0===oe?{}:oe).select,ae=oe.subscribe,le=oe.withDispatch,ce=oe.withSelect,se=K.editPost,ue=(se=void 0===se?{}:se).PluginSidebar,pe=se.PluginSidebarMoreMenuItem,fe=K.element,de=(fe=void 0===fe?{}:fe).Fragment,me=K.i18n,he=(me=void 0===me?{}:me).__,ye=function(e){function t(e){var n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,(n=!(o=W(t).call(this,e))||"object"!==q(o)&&"function"!=typeof o?G(r):o).state={autoAssignCategories:!1,loading:!1,modified:0,notifications:[],publishState:"",sections:[],selectedSectionsPrev:null,settings:{},unsubscribe:void 0,userCanPublish:!1},n.deletePost=n.deletePost.bind(G(n)),n.publishPost=n.publishPost.bind(G(n)),n.updatePost=n.updatePost.bind(G(n)),n.updateSelectedSections=n.updateSelectedSections.bind(G(n)),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(t,React.PureComponent),n=t,(r=[{key:"componentDidMount",value:function(){this.subscribeToChanges(),this.fetchNotifications(),this.fetchPublishState(),this.fetchSections(),this.fetchSettings(),this.fetchUserCanPublish()}},{key:"componentWillUnmount",value:function(){var e=this.state.unsubscribe;e&&e()}},{key:"clearNotifications",value:function(){var e=this.state.notifications;if(Array.isArray(e)){var t=e.filter(function(e){return!0!==e.dismissible});0!==t.length&&V({data:{toClear:t},method:"POST",path:"/apple-news/v1/clear-notifications"}).catch(function(e){return console.error(e)})}}},{key:"deletePost",value:function(){var e=this.props.post,t=(e=void 0===e?{}:e).id,n=void 0===t?0:t;this.modifyPost(n,"delete")}},{key:"dismissNotification",value:function(e){var t=this,n=this.state.notifications;V({data:{toClear:[e]},method:"POST",path:"/apple-news/v1/clear-notifications"}).then(function(){var r=n.map(function(t){return JSON.stringify(t)!==JSON.stringify(e)?t:U({},t,{dismissed:!0})});t.setState({notifications:r})}).catch(function(e){return console.error(e)})}},{key:"fetchNotifications",value:function(){var e=this;V({path:"/apple-news/v1/get-notifications"}).then(function(t){Array.isArray(t)&&(0<t.length?e.setState({notifications:t},e.clearNotifications):e.setState({notifications:t}))}).catch(function(e){return console.error(e)})}},{key:"fetchPublishState",value:function(){var e=this,t=this.props.post,n="/apple-news/v1/get-published-state/".concat(t.id);V({path:n}).then(function(t){var n=t.publishState;return e.setState({publishState:n})}).catch(function(e){return console.error(e)})}},{key:"fetchSections",value:function(){var e=this;V({path:"/apple-news/v1/sections"}).then(function(t){return e.setState({sections:t})}).catch(function(e){return console.error(e)})}},{key:"fetchSettings",value:function(){var e=this,t=this.props.meta,n=(t=void 0===t?{}:t).selectedSections;V({path:"/apple-news/v1/get-settings"}).then(function(t){return e.setState({autoAssignCategories:"null"===n&&!0===t.automaticAssignment,settings:t})}).catch(function(e){return console.error(e)})}},{key:"fetchUserCanPublish",value:function(){var e=this,t=this.props.post,n="/apple-news/v1/user-can-publish/".concat(t.id);V({path:n}).then(function(t){var n=t.userCanPublish;return e.setState({userCanPublish:n})}).catch(function(e){return console.error(e)})}},{key:"modifyPost",value:function(e,t){var n=this,r=this.props.refreshPost,o="/apple-news/v1/".concat(t);this.setState({loading:!0}),V({data:{id:e},method:"POST",path:o}).then(function(e){var t=e.publishState,o=void 0===t?"":t;r(),n.fetchNotifications(),n.setState({loading:!1,publishState:o})}).catch(function(){r(),n.fetchNotifications(),n.setState({loading:!1})})}},{key:"publishPost",value:function(){var e=this.props.post,t=(e=void 0===e?{}:e).id,n=void 0===t?0:t;this.modifyPost(n,"publish")}},{key:"subscribeToChanges",value:function(){var e=this,t=ae(function(){var t=e.state.modified,n=ie("core/editor").getEditedPostAttribute("modified");t!==n&&e.setState({modified:n},e.fetchNotifications)});this.setState({modified:ie("core/editor").getEditedPostAttribute("modified"),unsubscribe:t})}},{key:"updatePost",value:function(){var e=this.props.post,t=(e=void 0===e?{}:e).id,n=void 0===t?0:t;this.modifyPost(n,"update")}},{key:"updateSelectCoverArtImage",value:function(e,t){var n=this.props,r=n.onUpdate,o=n.meta,i=m((o=void 0===o?{}:o).coverArt);t?i=U(z({},e,t),i):delete i[e],r("apple_news_coverart",JSON.stringify(i))}},{key:"updateSelectedSections",value:function(e,t){var n=this.props,r=n.onUpdate,o=n.meta,i=f((o=void 0===o?{}:o).selectedSections),a=Array.isArray(i)?JSON.stringify([].concat(F(i),[t])):null,l=i.filter(function(e){return e!==t}),c=0<l.length?JSON.stringify(l):null;r("apple_news_sections",e?a:c)}},{key:"render",value:function(){var e=this,t="publish-to-apple-news",n=he("Apple News Options","apple-news"),r=this.props,o=r.onUpdate,i=r.meta,a=(i=void 0===i?{}:i).isPaid,l=void 0!==a&&a,c=i.isPreview,s=void 0!==c&&c,u=i.isHidden,p=void 0!==u&&u,d=i.isSponsored,h=void 0!==d&&d,y=i.maturityRating,v=void 0===y?"":y,b=i.pullquoteText,g=void 0===b?"":b,w=i.pullquotePosition,_=void 0===w?"":w,S=i.selectedSections,E=void 0===S?"":S,R=i.coverArt,O=void 0===R?"":R,P=i.apiId,A=void 0===P?"":P,k=i.dateCreated,C=void 0===k?"":k,x=i.dateModified,N=void 0===x?"":x,M=i.shareUrl,L=void 0===M?"":M,j=i.revision,D=void 0===j?"":j,H=r.post,q=(H=void 0===H?{}:H).status,F=void 0===q?"":q,B=this.state,W=B.autoAssignCategories,G=B.loading,J=B.notifications,K=B.publishState,V=B.sections,Y=B.settings,Q=(Y=void 0===Y?{}:Y).adminUrl,X=Y.apiAutosync,oe=Y.apiAutosyncDelete,ie=Y.apiAutosyncUpdate,ae=Y.automaticAssignment,le=Y.enableCoverArt,ce=B.selectedSectionsPrev,se=B.userCanPublish,fe=f(E),me=m(O),ye=me.orientation||"landscape",ve=[{title:he("iPad Pro (12.9 in): 1832 x 1374 px","apple-news"),key:"apple_news_ca_".concat(ye,"_12_9")},{title:he("iPad (7.9/9.7 in): 1376 x 1032 px","apple-news"),key:"apple_news_ca_".concat(ye,"_9_7")},{title:he("iPhone (5.5 in): 1044 x 783 px","apple-news"),key:"apple_news_ca_".concat(ye,"_5_5")},{title:he("iPhone (4.7 in): 632 x 474 px","apple-news"),key:"apple_news_ca_".concat(ye,"_4_7")},{title:he("iPhone (4 in): 536 x 402 px","apple-news"),key:"apple_news_ca_".concat(ye,"_4_0")}];return React.createElement(de,null,React.createElement(pe,{target:t},n),React.createElement(ue,{name:t,title:he("Publish to Apple News Options","apple-news")},React.createElement("div",{className:"components-panel__body is-opened",id:"apple-news-publish"},React.createElement(I,{dismissNotification:this.dismissNotification,notifications:J}),React.createElement("h3",null,"Sections"),ae&&[React.createElement(Z,{label:he("Assign sections by category","apple-news"),checked:W,onChange:function(t){e.setState({autoAssignCategories:t}),t?(e.setState({selectedSectionsPrev:E||null}),o("apple_news_sections",null)):(o("apple_news_sections",ce),e.setState({selectedSectionsPrev:null}))}}),React.createElement("hr",null)],(!W||!ae)&&[React.createElement("h4",null,"Manual Section Selection"),Array.isArray(V)&&React.createElement("ul",{className:"apple-news-sections"},V.map(function(t){var n=t.id,r=t.name;return React.createElement("li",{key:n},React.createElement(Z,{label:r,checked:-1!==fe.indexOf(n),onChange:function(t){return e.updateSelectedSections(t,n)}}))}))],React.createElement("p",null,React.createElement("em",null,he("Select the sections in which to publish this article. If none are selected, it will be published to the default section.","apple-news"))),React.createElement("h3",null,he("Paid Article","apple-news")),React.createElement(Z,{label:he("Check this to indicate that viewing the article requires a paid subscription.","apple-news"),onChange:function(e){return o("apple_news_is_paid",e)},checked:l}),React.createElement("h3",null,he("Preview Article","apple-news")),React.createElement(Z,{label:he("Check this to publish the article as a draft.","apple-news"),onChange:function(e){return o("apple_news_is_preview",e)},checked:s}),React.createElement("h3",null,"Hidden Article"),React.createElement(Z,{label:he("Hidden articles are visible to users who have a link to the article, but do not appear in feeds.","apple-news"),onChange:function(e){return o("apple_news_is_hidden",e)},checked:p}),React.createElement("h3",null,"Sponsored Article"),React.createElement(Z,{label:he("Check this to indicate this article is sponsored content.","apple-news"),onChange:function(e){return o("apple_news_is_sponsored",e)},checked:h})),React.createElement(ee,{initialOpen:!1,title:he("Maturity Rating","apple-news")},React.createElement(te,{label:he("Select Maturity Rating","apple-news"),value:v,options:[{label:"",value:""},{label:he("Kids","apple-news"),value:"KIDS"},{label:he("Mature","apple-news"),value:"MATURE"},{label:he("General","apple-news"),value:"GENERAL"}],onChange:function(e){return o("apple_news_maturity_rating",e)}}),React.createElement("p",null,React.createElement("em",null,"Select the optional maturity rating for this post."))),React.createElement(ee,{initialOpen:!1,title:he("Pull Quote","apple_news")},React.createElement(re,{label:he("Description","apple_news"),value:g,onChange:function(e){return o("apple_news_pullquote",e)},placeholder:"A pull quote is a key phrase, quotation, or excerpt that has been pulled from an article and used as a graphic element, serving to entice readers into the article or to highlight a key topic."}),React.createElement("p",null,React.createElement("em",null,"This is optional and can be left blank.")),React.createElement(te,{label:he("Pull Quote Position","apple-news"),value:_||"middle",options:[{label:he("top","apple-news"),value:"top"},{label:he("middle","apple-news"),value:"middle"},{label:he("bottom","apple-news"),value:"bottom"}],onChange:function(e){return o("apple_news_pullquote_position",e)}}),React.createElement("p",null,React.createElement("em",null,he("The position in the article where the pull quote will appear.","apple-news")))),React.createElement(ee,{initialOpen:!1,title:he("Cover Art","apple-news")},le?React.createElement("div",null,React.createElement("p",null,React.createElement("em",null,React.createElement("a",{href:"https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/CoverArt.html"},he("Cover Art","apple-news")),he(" will represent your article if editorially chosen for Featured Stories. Cover Art must include your channel logo with text at 24 pt minimum that is related to the headline. The image provided must match the dimensions listed. Limit submissions to 1-3 articles per day.","apple-news"))),React.createElement(te,{label:he("Orientation","apple-news"),value:ye,options:[{label:he("Landscape (4:3)","apple-news"),value:"landscape"},{label:he("Portrait (3:4)","apple-news"),value:"portrait"},{label:he("Square (1:1)","apple-news"),value:"square"}],onChange:function(e){var t=Object.keys(me).filter(function(e){return"orientation"!==e}),n={orientation:e},r=t.reduce(function(t,n){return U(z({},n.replace(ye,e),me[n]),t)},n);o("apple_news_coverart",JSON.stringify(r))}}),React.createElement("p",null,React.createElement("em",null,he("Note: You must provide the largest size (iPad Pro 12.9 in) in order for your submission to be considered.","apple-news"))),React.createElement("div",null,ve.map(function(t){return React.createElement("div",null,React.createElement("h4",null,t.title),React.createElement(T,{metaKey:t.key,onUpdate:function(t,n){return e.updateSelectCoverArtImage(t,n)},value:me[t.key]}))}))):React.createElement("p",null,React.createElement("em",null,he("Cover Art must be enabled on the ","apple-news"),React.createElement("a",{href:Q},he("settings page","apple-news"))))),React.createElement(ee,{initialOpen:!1,title:he("Apple News Publish Information","apple-news")},""!==K&&"N/A"!==K&&React.createElement(de,null,React.createElement("h4",null,he("API Id","apple-news")),React.createElement("p",null,A),React.createElement("h4",null,he("Created On","apple-news")),React.createElement("p",null,C),React.createElement("h4",null,he("Last Updated On","apple-news")),React.createElement("p",null,N),React.createElement("h4",null,he("Share URL","apple-news")),React.createElement("p",null,L),React.createElement("h4",null,he("Revision","apple-news")),React.createElement("p",null,D),React.createElement("h4",null,he("Publish State","apple-news")),React.createElement("p",null,K))),"publish"===F&&se&&React.createElement(de,null,G?React.createElement(ne,null):React.createElement(de,null,""!==K&&"N/A"!==K?React.createElement(de,null,!ie&&React.createElement($,{isPrimary:!0,onClick:this.updatePost,style:{margin:"1em"}},he("Update","apple-news")),!oe&&React.createElement($,{isDefault:!0,onClick:this.deletePost,style:{margin:"1em"}},he("Delete","apple-news"))):React.createElement(de,null,!X&&React.createElement($,{isPrimary:!0,onClick:this.publishPost,style:{margin:"1em"}},he("Publish","apple-news")))))))}}])&&B(n.prototype,r),o&&B(n,o),t}();ye.propTypes={meta:u.a.shape({isPaid:u.a.bool,isPreview:u.a.bool,isHidden:u.a.bool,isSponsored:u.a.bool,maturityRating:u.a.string,pullquoteText:u.a.string,pullquotePosition:u.a.string,selectedSections:u.a.string,coverArt:u.a.shape({orientation:u.a.string}),apiId:u.a.string,dateCreated:u.a.string,dateModified:u.a.string,shareUrl:u.a.string,revision:u.a.string}).isRequired,onUpdate:u.a.func.isRequired,post:u.a.shape({}).isRequired,refreshPost:u.a.func.isRequired};var ve=Q([ce(function(e){var t=e("core/editor"),n=t&&t.getEditedPostAttribute&&t.getEditedPostAttribute("meta")||{},r=n.apple_news_is_paid,o=void 0!==r&&r,i=n.apple_news_is_preview,a=void 0!==i&&i,l=n.apple_news_is_hidden,c=void 0!==l&&l,s=n.apple_news_is_sponsored,u=void 0!==s&&s,p=n.apple_news_maturity_rating,f=void 0===p?"":p,d=n.apple_news_pullquote,m=void 0===d?"":d,h=n.apple_news_pullquote_position,y=void 0===h?"":h,v=n.apple_news_sections,b=void 0===v?"":v,g=n.apple_news_coverart,w=void 0===g?{}:g,_=n.apple_news_api_id,S=void 0===_?"":_,E=n.apple_news_api_created_at,R=void 0===E?"":E,O=n.apple_news_api_modified_at,P=void 0===O?"":O,T=n.apple_news_api_share_url,A=void 0===T?"":T,k=n.apple_news_api_revision;return{meta:{isPaid:o,isPreview:a,isHidden:c,isSponsored:u,maturityRating:f,pullquoteText:m,pullquotePosition:y,selectedSections:b,coverArt:w,apiId:S,dateCreated:R,dateModified:P,shareUrl:A,revision:void 0===k?"":k,postId:t&&t.getCurrentPostId?t.getCurrentPostId():0},post:t&&t.getCurrentPost?t.getCurrentPost():{}}}),le(function(e){return{onUpdate:function(t,n){e("core/editor").editPost({meta:z({},t,n)})},refreshPost:function(){e("core/editor").refreshPost()}}})])(ye);if("undefined"!=typeof wp){var be=wp.plugins,ge=(be=void 0===be?{}:be).registerPlugin,we=void 0===ge?null:ge;"function"==typeof we&&we("publish-to-apple-news",{icon:React.createElement(c,null),render:ve})}}]); +//# sourceMappingURL=pluginSidebar.js.map \ No newline at end of file diff --git a/build/pluginSidebar.js.map b/build/pluginSidebar.js.map new file mode 100644 index 000000000..041162948 --- /dev/null +++ b/build/pluginSidebar.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/dompurify/dist/purify.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./assets/js/pluginsidebar/components/icon/index.js","webpack:///./assets/js/util/safeJsonParse.js","webpack:///./assets/js/util/safeJsonParseArray.js","webpack:///./assets/js/util/safeJsonParseObject.js","webpack:///./assets/js/pluginsidebar/services/media/getImageThumbnail.js","webpack:///./assets/js/pluginsidebar/components/imagePicker/index.js","webpack:///./assets/js/pluginsidebar/components/notifications/index.js","webpack:///./assets/js/pluginsidebar/components/sidebar/index.js","webpack:///./assets/js/pluginsidebar/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","freeze$1","freeze","x","html","svg","svgFilters","mathMl","text","freeze$2","html$1","svg$1","mathMl$1","xml","setPrototypeOf","apply$1","Reflect","apply","addToSet","set","array","length","element","lcElement","toLowerCase","isFrozen","clone","newObject","fun","thisValue","args","seal","MUSTACHE_EXPR","ERB_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","_typeof","iterator","obj","constructor","_toConsumableArray","arr","Array","isArray","arr2","from","arraySlice","slice","getGlobal","window","_createTrustedTypesPolicy","trustedTypes","document","createPolicy","suffix","currentScript","hasAttribute","getAttribute","policyName","createHTML","html$$1","error","console","warn","createDOMPurify","arguments","undefined","DOMPurify","root","version","removed","nodeType","isSupported","originalDocument","useDOMParser","removeTitle","DocumentFragment","HTMLTemplateElement","Node","NodeFilter","_window$NamedNodeMap","NamedNodeMap","MozNamedAttrMap","Text","Comment","DOMParser","TrustedTypes","template","createElement","content","ownerDocument","trustedTypesPolicy","emptyHTML","_document","implementation","createNodeIterator","getElementsByTagName","createDocumentFragment","importNode","hooks","createHTMLDocument","documentMode","MUSTACHE_EXPR$$1","ERB_EXPR$$1","DATA_ATTR$$1","ARIA_ATTR$$1","IS_SCRIPT_OR_DATA$$1","ATTR_WHITESPACE$$1","IS_ALLOWED_URI$$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","concat","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_JQUERY","SAFE_FOR_TEMPLATES","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","SANITIZE_DOM","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","CONFIG","formElement","_parseConfig","cfg","ALLOWED_URI_REGEXP","ADD_TAGS","ADD_ATTR","ADD_URI_SAFE_ATTR","table","_forceRemove","node","push","parentNode","removeChild","outerHTML","_removeAttribute","attribute","getAttributeNode","removeAttribute","_initDocument","dirty","doc","leadingWhitespace","matches","match","parseFromString","documentElement","_doc","body","firstElementChild","insertBefore","createTextNode","childNodes","querySelector","innerHTML","_createIterator","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","FILTER_ACCEPT","_isNode","nodeName","_executeHook","entryPoint","currentNode","data","forEach","hook","_sanitizeElements","elm","textContent","attributes","setAttribute","tagName","allowedTags","insertAdjacentHTML","htmlToInsert","test","cloneNode","replace","_isValidAttribute","lcTag","lcName","indexOf","_sanitizeAttributes","attr","idAttr","hookEvent","attrName","attrValue","keepAttr","allowedAttributes","_attr","namespaceURI","trim","id","setAttributeNS","pop","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","nextNode","sanitize","importedNode","oldNode","returnNode","toString","TypeError","toStaticHTML","appendChild","firstChild","nodeIterator","serializedHTML","setConfig","clearConfig","isValidAttribute","tag","addHook","hookFunction","removeHook","removeHooks","removeAllHooks","factory","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","bool","func","number","string","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","Icon","React","PureComponent","enableBackground","height","viewBox","width","xmlns","y","safeJsonParse","JSON","parse","e","safeJsonParseArray","parsedValue","safeJsonParseObject","safeJsonParseObject_typeof","stringify","getImageThumbnail","media","_media$media_details","media_details","_media$media_details$","sizes","_media$media_details$2","_media$media_details$3","source_url","thumbnailUrl","_media$source_url","wp","Button","components","withSelect","MediaPlaceholder","editor","__","i18n","ImagePicker","_this$props","this","metaKey","onUpdate","alt","src","isPrimary","onClick","accept","allowedTypes","icon","labels","title","onSelect","_ref","propTypes","select","ownProps","getMedia","Notice","Fragment","Notifications","dismissNotification","visibleNotifications","notifications","filter","notification","dismissed","map","isDismissible","dismissible","message","onRemove","status","type","dangerouslySetInnerHTML","__html","dompurify","apiFetch","compose","CheckboxControl","PanelBody","SelectControl","Spinner","TextareaControl","subscribe","withDispatch","editPost","PluginSidebar","PluginSidebarMoreMenuItem","Sidebar","_this","sidebar_classCallCheck","sidebar_getPrototypeOf","state","autoAssignCategories","loading","modified","publishState","sections","selectedSectionsPrev","settings","unsubscribe","userCanPublish","deletePost","sidebar_assertThisInitialized","publishPost","updatePost","updateSelectedSections","subscribeToChanges","fetchNotifications","fetchPublishState","fetchSections","fetchSettings","fetchUserCanPublish","toClear","method","path","catch","_this$props$post","post","_this$props$post$id","modifyPost","_this2","then","updatedNotifications","compare","_objectSpread","setState","_this3","clearNotifications","_this4","_this5","_this6","_this$props$meta","meta","selectedSections","automaticAssignment","_this7","_ref2","operation","_this8","refreshPost","_data$publishState","_this$props$post2","_this$props$post2$id","_this9","newModified","getEditedPostAttribute","_this$props$post3","_this$props$post3$id","_this$props$meta2","parsedCoverArt","coverArt","_defineProperty","checked","_this$props2","_this$props2$meta","selectedSectionsArray","selectedArrayDefault","arrayFilter","section","selectedArrayFilter","_this10","target","label","_this$props3","_this$props3$meta","_this$props3$meta$isP","isPaid","_this$props3$meta$isP2","isPreview","_this$props3$meta$isH","isHidden","_this$props3$meta$isS","isSponsored","_this$props3$meta$mat","maturityRating","_this$props3$meta$pul","pullquoteText","_this$props3$meta$pul2","pullquotePosition","_this$props3$meta$sel","_this$props3$meta$cov","_this$props3$meta$api","apiId","_this$props3$meta$dat","dateCreated","_this$props3$meta$dat2","dateModified","_this$props3$meta$sha","shareUrl","_this$props3$meta$rev","revision","_this$props3$post","_this$props3$post$sta","_this$state","_this$state$settings","adminUrl","apiAutosync","apiAutosyncDelete","apiAutosyncUpdate","enableCoverArt","coverArtOrientation","orientation","coverArtSizes","sidebar_Fragment","className","notifications_Notifications","onChange","_ref3","initialOpen","options","placeholder","href","mediaKeys","keys","updatedOrientation","updatedCoverArt","reduce","acc","curr","item","imagePicker","updateSelectCoverArtImage","sidebar_Button","style","margin","isDefault","selector","_meta$apple_news_is_p","apple_news_is_paid","_meta$apple_news_is_p2","apple_news_is_preview","_meta$apple_news_is_h","apple_news_is_hidden","_meta$apple_news_is_s","apple_news_is_sponsored","_meta$apple_news_matu","apple_news_maturity_rating","_meta$apple_news_pull","apple_news_pullquote","_meta$apple_news_pull2","apple_news_pullquote_position","_meta$apple_news_sect","apple_news_sections","_meta$apple_news_cove","apple_news_coverart","_meta$apple_news_api_","apple_news_api_id","_meta$apple_news_api_2","apple_news_api_created_at","_meta$apple_news_api_3","apple_news_api_modified_at","_meta$apple_news_api_4","apple_news_api_share_url","_meta$apple_news_api_5","apple_news_api_revision","postId","getCurrentPostId","getCurrentPost","dispatch","metaValue","_wp$plugins","plugins","_wp$plugins$registerP","registerPlugin","render"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,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// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.DOMPurify = factory());\n}(this, (function () { 'use strict';\n\nvar freeze$1 = Object.freeze || function (x) {\n return x;\n};\n\nvar html = freeze$1(['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', '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', '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']);\n\n// SVG\nvar svg = freeze$1(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', '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', 'video', 'view', 'vkern']);\n\nvar svgFilters = freeze$1(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\nvar mathMl = freeze$1(['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']);\n\nvar text = freeze$1(['#text']);\n\nvar freeze$2 = Object.freeze || function (x) {\n return x;\n};\n\nvar html$1 = freeze$2(['accept', 'action', 'align', 'alt', 'autocomplete', 'background', 'bgcolor', 'border', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'coords', 'crossorigin', 'datetime', 'default', 'dir', 'disabled', 'download', 'enctype', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'integrity', 'ismap', 'label', 'lang', 'list', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'multiple', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', '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', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns']);\n\nvar svg$1 = freeze$2(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', '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', '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', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', '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']);\n\nvar mathMl$1 = freeze$2(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', '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']);\n\nvar xml = freeze$2(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nvar hasOwnProperty = Object.hasOwnProperty;\nvar setPrototypeOf = Object.setPrototypeOf;\n\nvar _ref$1 = typeof Reflect !== 'undefined' && Reflect;\nvar apply$1 = _ref$1.apply;\n\nif (!apply$1) {\n apply$1 = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\n/* Add properties to a lookup table */\nfunction addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = element.toLowerCase();\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!Object.isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/* Shallow clone an object */\nfunction clone(object) {\n var newObject = {};\n\n var property = void 0;\n for (property in object) {\n if (apply$1(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n}\n\nvar seal = Object.seal || function (x) {\n return x;\n};\n\nvar MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nvar ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\nvar DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nvar ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nvar IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nvar IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nvar ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g // eslint-disable-line no-control-regex\n);\n\nvar _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; };\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar _ref = typeof Reflect !== 'undefined' && Reflect;\nvar apply = _ref.apply;\n\nvar arraySlice = Array.prototype.slice;\nvar freeze = Object.freeze;\n\nvar getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\nvar _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (error) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\n\nfunction createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '1.0.10';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var useDOMParser = false;\n var removeTitle = false;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n TrustedTypes = window.TrustedTypes;\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(TrustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n getElementsByTagName = _document.getElementsByTagName,\n createDocumentFragment = _document.createDocumentFragment;\n var importNode = originalDocument.importNode;\n\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = implementation && typeof implementation.createHTMLDocument !== 'undefined' && document.documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(svgFilters), _toConsumableArray(mathMl), _toConsumableArray(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(mathMl$1), _toConsumableArray(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for jQuery's $() factory? */\n var SAFE_FOR_JQUERY = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with <html>... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify. */\n var RETURN_DOM_IMPORT = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = addToSet({}, ['audio', 'head', 'math', 'script', 'style', 'template', 'svg', 'video']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_JQUERY = cfg.SAFE_FOR_JQUERY || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n DOMPurify.removed.push({ element: node });\n try {\n node.parentNode.removeChild(node);\n } catch (error) {\n node.outerHTML = emptyHTML;\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n DOMPurify.removed.push({\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (error) {\n DOMPurify.removed.push({\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name);\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc = void 0;\n var leadingWhitespace = void 0;\n\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = dirty.match(/^[\\s]+/);\n leadingWhitespace = matches && matches[0];\n if (leadingWhitespace) {\n dirty = dirty.slice(leadingWhitespace.length);\n }\n }\n\n /* Use DOMParser to workaround Firefox bug (see comment below) */\n if (useDOMParser) {\n try {\n doc = new DOMParser().parseFromString(dirty, 'text/html');\n } catch (error) {}\n }\n\n /* Remove title to fix a mXSS bug in older MS Edge */\n if (removeTitle) {\n addToSet(FORBID_TAGS, ['title']);\n }\n\n /* Otherwise use createHTMLDocument, because DOMParser is unsafe in\n Safari (see comment below) */\n if (!doc || !doc.documentElement) {\n doc = implementation.createHTMLDocument('');\n var _doc = doc,\n body = _doc.body;\n\n body.parentNode.removeChild(body.parentNode.firstElementChild);\n body.outerHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n if (leadingWhitespace) {\n doc.body.insertBefore(document.createTextNode(leadingWhitespace), doc.body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n };\n\n // Firefox uses a different parser for innerHTML rather than\n // DOMParser (see https://bugzilla.mozilla.org/show_bug.cgi?id=1205631)\n // which means that you *must* use DOMParser, otherwise the output may\n // not be safe if used in a document.write context later.\n //\n // So we feature detect the Firefox bug and use the DOMParser if necessary.\n //\n // MS Edge, in older versions, is affected by an mXSS behavior. The second\n // check tests for the behavior and fixes it if necessary.\n if (DOMPurify.isSupported) {\n (function () {\n try {\n var doc = _initDocument('<svg><p><style><img src=\"</style><img src=x onerror=1//\">');\n if (doc.querySelector('svg img')) {\n useDOMParser = true;\n }\n } catch (error) {}\n })();\n\n (function () {\n try {\n var doc = _initDocument('<x/><title></title><img>');\n if (doc.querySelector('title').innerHTML.match(/<\\/title/)) {\n removeTitle = true;\n }\n } catch (error) {}\n })();\n }\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, function () {\n return NodeFilter.FILTER_ACCEPT;\n }, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n var _isClobbered = function _isClobbered(elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n\n 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') {\n return true;\n }\n\n return false;\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n var _isNode = function _isNode(obj) {\n return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? obj instanceof Node : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n hooks[entryPoint].forEach(function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n // eslint-disable-next-line complexity\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content = void 0;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = currentNode.nodeName.toLowerCase();\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for black-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && typeof currentNode.insertAdjacentHTML === 'function') {\n try {\n var htmlToInsert = currentNode.innerHTML;\n currentNode.insertAdjacentHTML('AfterEnd', trustedTypesPolicy ? trustedTypesPolicy.createHTML(htmlToInsert) : htmlToInsert);\n } catch (error) {}\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove in case a noscript/noembed XSS is suspected */\n if (tagName === 'noscript' && currentNode.innerHTML.match(/<\\/noscript/i)) {\n _forceRemove(currentNode);\n return true;\n }\n\n if (tagName === 'noembed' && currentNode.innerHTML.match(/<\\/noembed/i)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Convert markup to cover jQuery behavior */\n if (SAFE_FOR_JQUERY && !currentNode.firstElementChild && (!currentNode.content || !currentNode.content.firstElementChild) && /</g.test(currentNode.textContent)) {\n DOMPurify.removed.push({ element: currentNode.cloneNode() });\n if (currentNode.innerHTML) {\n currentNode.innerHTML = currentNode.innerHTML.replace(/</g, '<');\n } else {\n currentNode.innerHTML = currentNode.textContent.replace(/</g, '<');\n }\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = content.replace(MUSTACHE_EXPR$$1, ' ');\n content = content.replace(ERB_EXPR$$1, ' ');\n if (currentNode.textContent !== content) {\n DOMPurify.removed.push({ element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && DATA_ATTR$$1.test(lcName)) {\n // This attribute is safe\n } else if (ALLOW_ARIA_ATTR && ARIA_ATTR$$1.test(lcName)) {\n // This attribute is safe\n /* Otherwise, check the name is permitted */\n } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n return false;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n // This attribute is safe\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n } else if (IS_ALLOWED_URI$$1.test(value.replace(ATTR_WHITESPACE$$1, ''))) {\n // This attribute is safe\n /* Keep image data URIs alive if src/xlink:href is allowed */\n /* Further prevent gadget XSS for dynamically built script tags */\n } else if ((lcName === 'src' || lcName === 'xlink:href') && lcTag !== 'script' && value.indexOf('data:') === 0 && DATA_URI_TAGS[lcTag]) {\n // This attribute is safe\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n } else if (ALLOW_UNKNOWN_PROTOCOLS && !IS_SCRIPT_OR_DATA$$1.test(value.replace(ATTR_WHITESPACE$$1, ''))) {\n // This attribute is safe\n /* Check for binary attributes */\n // eslint-disable-next-line no-negated-condition\n } else if (!value) {\n // Binary attributes are safe at this point\n /* Anything else, presume unsafe, do not add it back */\n } else {\n return false;\n }\n\n return true;\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr = void 0;\n var value = void 0;\n var lcName = void 0;\n var idAttr = void 0;\n var l = void 0;\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n\n value = attr.value.trim();\n lcName = name.toLowerCase();\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n\n /* Remove attribute */\n // Safari (iOS + Mac), last tested v8.0.5, crashes if you try to\n // remove a \"name\" attribute from an <img> tag that has an \"id\"\n // attribute at the time.\n if (lcName === 'name' && currentNode.nodeName === 'IMG' && attributes.id) {\n idAttr = attributes.id;\n attributes = apply(arraySlice, attributes, []);\n _removeAttribute('id', currentNode);\n _removeAttribute(name, currentNode);\n if (attributes.indexOf(idAttr) > l) {\n currentNode.setAttribute('id', idAttr.value);\n }\n } else if (\n // This works around a bug in Safari, where input[type=file]\n // cannot be dynamically set after type has been removed\n currentNode.nodeName === 'INPUT' && lcName === 'type' && value === 'file' && (ALLOWED_ATTR[lcName] || !FORBID_ATTR[lcName])) {\n continue;\n } else {\n // This avoids a crash in Safari v9.0 with double-ids.\n // The trick is to first set the id to be empty and then to\n // remove the attribute\n if (name === 'id') {\n currentNode.setAttribute(name, '');\n }\n\n _removeAttribute(name, currentNode);\n }\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = value.replace(MUSTACHE_EXPR$$1, ' ');\n value = value.replace(ERB_EXPR$$1, ' ');\n }\n\n /* Is `value` valid for this attribute? */\n var lcTag = currentNode.nodeName.toLowerCase();\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n DOMPurify.removed.pop();\n } catch (error) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode = void 0;\n var shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg) {\n var body = void 0;\n var importedNode = void 0;\n var currentNode = void 0;\n var oldNode = void 0;\n var returnNode = void 0;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n if (!dirty) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw new TypeError('toString is not a function');\n } else {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw new TypeError('dirty is not a string, aborting');\n }\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n if (IN_PLACE) {\n /* No special handling necessary for in-place sanitization */\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!-->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf('<') === -1) {\n return trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : emptyHTML;\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /* AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs. */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = serializedHTML.replace(MUSTACHE_EXPR$$1, ' ');\n serializedHTML = serializedHTML.replace(ERB_EXPR$$1, ' ');\n }\n\n return trustedTypesPolicy ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = tag.toLowerCase();\n var lcName = attr.toLowerCase();\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n hooks[entryPoint].push(hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint].pop();\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n}\n\nvar purify = createDOMPurify();\n\nreturn purify;\n\n})));\n//# sourceMappingURL=purify.js.map\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/* global React */\n\n/* eslint-disable max-len */\n\n/**\n * A React component representing the Apple News icon.\n */\nexport default class Icon extends React.PureComponent {\n /**\n * Renders this component.\n * @returns {object} - JSX for this component.\n */\n render() {\n return (\n <svg\n enableBackground=\"new 0 0 26.77438 26.77438\"\n height=\"26.77438px\"\n version=\"1.1\"\n viewBox=\"0 0 26.77438 26.77438\"\n width=\"26.77438px\"\n x=\"0px\"\n xmlns=\"http://www.w3.org/2000/svg\"\n y=\"0px\"\n >\n <g>\n <g>\n <g>\n <path\n d=\"M4.71813,13.5345v4.77055l0.00002,0.65257\n c0,0.0568-0.00002,0.11365,0.00035,0.17044c0.00025,0.04783,0.00081,0.0957,0.00209,0.14355\n c0.00283,0.10423,0.00899,0.20939,0.02751,0.31251c0.01879,0.10458,0.04945,0.20193,0.0978,0.29693\n c0.04756,0.0934,0.10962,0.17891,0.1837,0.253c0.07406,0.07407,0.15948,0.13619,0.25284,0.18372\n c0.09503,0.0484,0.19239,0.07911,0.29701,0.09791c0.10299,0.01855,0.20809,0.02465,0.31225,0.02748\n c0.04783,0.0013,0.09566,0.00183,0.14351,0.00215c0.05676,0.00033,0.11354,0.00031,0.17035,0.00031l0.65231,0.00002h4.77141\n c0.13713,0,0.1819-0.18436,0.05989-0.24694c-2.91487-1.49526-5.22884-3.80922-6.72409-6.72407\n c-0.02514-0.04903-0.06995-0.07114-0.11456-0.07114C4.78411,13.40348,4.71813,13.45246,4.71813,13.5345 M6.20869,4.71816\n c-0.05692,0-0.11382,0.00002-0.17074,0.00035C5.99004,4.71878,5.9421,4.71937,5.89418,4.72066\n C5.78975,4.72349,5.68438,4.72962,5.58112,4.74818C5.47637,4.76705,5.37885,4.79772,5.28367,4.84613\n C5.1901,4.89378,5.10448,4.95595,5.03024,5.03016C4.95604,5.10438,4.8938,5.18993,4.84622,5.28341\n c-0.0485,0.09524-0.07925,0.19277-0.09809,0.29751C4.72958,5.68414,4.72344,5.78941,4.72059,5.89376\n C4.71932,5.94165,4.71875,5.98955,4.7185,6.03746c-0.00035,0.048-0.00037,0.09602-0.00037,0.14401v0.02665v1.96427\n c0,0.40087,0.07796,0.6084,0.37512,0.90561l10.99255,10.9925c0.30093,0.30094,0.50562,0.37513,0.90561,0.37513h1.96366\n c0.05688,0,0.11384,0,0.17074-0.00036c0.04794-0.00028,0.09584-0.00084,0.14378-0.00216\n c0.10446-0.00281,0.20978-0.00894,0.31304-0.02751c0.10479-0.01884,0.20229-0.04954,0.29747-0.09796\n c0.09358-0.04766,0.17919-0.10981,0.25338-0.18402c0.07428-0.07423,0.13647-0.15976,0.18408-0.25323\n c0.04852-0.09524,0.07924-0.19277,0.09809-0.29752c0.01855-0.10318,0.0247-0.20845,0.0275-0.31283\n c0.0013-0.04788,0.00187-0.09577,0.00214-0.14376c0.00031-0.04819,0.00034-0.09648,0.00034-0.14476v-1.99007\n c0-0.40094-0.07794-0.60844-0.37513-0.90564L9.07799,5.09329C8.77706,4.79237,8.57234,4.71818,8.17237,4.71816H6.20869\n M13.53452,4.71816c-0.13717,0-0.18194,0.18436-0.05994,0.24694c2.9149,1.49524,5.22883,3.8092,6.72409,6.72407\n c0.06261,0.12206,0.24697,0.07725,0.24697-0.05992V6.85873l-0.00005-0.65257c0-0.05679,0.00005-0.11363-0.00028-0.17043\n c-0.00027-0.04786-0.00084-0.0957-0.00216-0.14353c-0.0028-0.10428-0.00891-0.20943-0.02746-0.31252\n c-0.0188-0.1046-0.04947-0.20194-0.09784-0.29695c-0.0475-0.09343-0.10962-0.17888-0.18367-0.25297\n c-0.0741-0.0741-0.15947-0.1362-0.25285-0.18375c-0.09504-0.04841-0.19239-0.0791-0.297-0.09789\n c-0.10299-0.01854-0.2081-0.02468-0.31226-0.02751c-0.04781-0.00125-0.09565-0.00183-0.14348-0.00211\n c-0.0568-0.00035-0.1136-0.00032-0.17037-0.00032l-0.65233-0.00002H13.53452\"\n />\n </g>\n </g>\n </g>\n </svg>\n );\n }\n}\n\n/* eslint-enable max-len */\n","/**\n * Given a value, run JSON.parse on it, but if parsing fails, return null\n * instead of throwing a SyntaxError.\n * @param {*} value - The value to attempt to parse.\n * @returns {*} - The parsed value, or null on failure.\n */\nexport default function safeJsonParse(value) {\n try {\n return JSON.parse(value);\n } catch (e) {\n return null;\n }\n}\n","import safeJsonParse from './safeJsonParse';\n\n/**\n * Given a value, run JSON.parse on it, but if parsing fails, or if\n * what results from the parse is not an array, return an empty\n * array rather than a syntax error or a value of another type.\n * @param {*} value - The value to attempt to parse.\n * @returns {array} - The parsed value, or an empty array on failure.\n */\nexport default function safeJsonParseArray(value) {\n const parsedValue = safeJsonParse(value);\n\n // Make absolutely sure that the parsed value is an array.\n if (! Array.isArray(parsedValue)) {\n return [];\n }\n\n return parsedValue;\n}\n","import safeJsonParse from './safeJsonParse';\n\n/**\n * Given a value, run JSON.parse on it, but if parsing fails, or if\n * what results from the parse is not a standard object, return an empty\n * object rather than a syntax error or a value of another type.\n * @param {*} value - The value to attempt to parse.\n * @returns {object} - The parsed value, or an empty object on failure.\n */\nexport default function safeJsonParseObject(value) {\n const parsedValue = safeJsonParse(value);\n\n // Make absolutely sure that the object is a standard object.\n if (null === parsedValue\n || 'object' !== typeof parsedValue\n || Array.isArray(parsedValue)\n || 0 !== JSON.stringify(parsedValue).indexOf('{')\n ) {\n return {};\n }\n\n return parsedValue;\n}\n","/**\n * Given a media object returned from the WordPress REST API, extracts the\n * thumbnail image for the media item if it exists, or the full size image\n * if it does not. Returns an empty string if unable to find either.\n * @param {object} media - A media object returned by the WordPress API.\n * @returns {string} - The URL to the image, or an empty string on failure.\n */\nexport default function getImageThumbnail(media) {\n const {\n media_details: {\n sizes: {\n 'post-thumbnail': {\n source_url: thumbnailUrl = '',\n } = {},\n } = {},\n } = {},\n source_url: fullsizeUrl = '',\n } = media;\n\n return thumbnailUrl || fullsizeUrl;\n}\n","/* global React, wp */\n\nimport PropTypes from 'prop-types';\n\nimport getImageThumbnail from '../../services/media/getImageThumbnail';\n\nconst {\n components: {\n Button,\n },\n data: {\n withSelect,\n },\n editor: {\n MediaPlaceholder,\n },\n i18n: {\n __,\n },\n} = wp;\n\n/**\n * A component representing the Image Picker sidebar control.\n */\nclass ImagePicker extends React.PureComponent {\n // Define PropTypes for this component.\n static propTypes = {\n media: PropTypes.shape({}).isRequired,\n metaKey: PropTypes.string.isRequired,\n onUpdate: PropTypes.func.isRequired,\n value: PropTypes.number.isRequired,\n };\n\n /**\n * Renders the image picker.\n * @returns {object} JSX component markup.\n */\n render() {\n const {\n media,\n metaKey,\n onUpdate,\n value,\n } = this.props;\n\n // If we found media, show it and give the user an option to remove it.\n if (value && media && media.id) {\n return (\n <div>\n <p>\n <img\n alt=\"\"\n src={getImageThumbnail(media)}\n />\n </p>\n <p>\n <Button\n isPrimary\n onClick={() => {\n onUpdate(metaKey, 0);\n }}\n >\n {__('Remove image', 'kauffman')}\n </Button>\n </p>\n </div>\n );\n }\n\n // Show the image picker and give the user an option to add it.\n return (\n <MediaPlaceholder\n accept=\"image/*\"\n allowedTypes={['image']}\n icon=\"format-image\"\n labels={{\n title: __('Select Image', 'kauffman'),\n }}\n onSelect={({ id }) => {\n onUpdate(metaKey, id);\n }}\n />\n );\n }\n}\n\nexport default withSelect((select, ownProps) => {\n const {\n value,\n } = ownProps;\n const {\n getMedia,\n } = select('core');\n\n return {\n media: value ? getMedia(value) || {} : {},\n };\n})(ImagePicker);\n","/* global React, wp */\n\nimport dompurify from 'dompurify';\nimport PropTypes from 'prop-types';\n\nconst {\n components: {\n Notice,\n },\n element: {\n Fragment,\n },\n} = wp;\n\n/**\n * A component to render Apple News notifications.\n */\nexport default class Notifications extends React.PureComponent {\n // Define PropTypes for this component.\n static propTypes = {\n dismissNotification: PropTypes.func.isRequired,\n notifications: PropTypes.arrayOf(PropTypes.shape({\n dismissed: PropTypes.bool,\n dismissible: PropTypes.bool,\n message: PropTypes.string,\n type: PropTypes.string,\n })).isRequired,\n };\n\n /**\n * Renders this component.\n *\n * @returns object JSX for this component.\n */\n render() {\n const {\n dismissNotification,\n notifications,\n } = this.props;\n\n const visibleNotifications = notifications\n .filter((notification) => true !== notification.dismissed);\n\n return (\n <Fragment>\n {visibleNotifications.map((notification) => (\n <Notice\n isDismissible={true === notification.dismissible}\n key={notification.message}\n onRemove={() => dismissNotification(notification)}\n status={notification.type}\n >\n <p\n // phpcs:ignore WordPressVIPMinimum.JS.DangerouslySetInnerHTML.Found\n dangerouslySetInnerHTML={{ // eslint-disable-line react/no-danger\n __html: dompurify.sanitize(notification.message),\n }}\n />\n </Notice>\n ))}\n </Fragment>\n );\n }\n}\n","/* global React, wp */\n\nimport PropTypes from 'prop-types';\nimport safeJsonParseArray from 'util/safeJsonParseArray';\nimport safeJsonParseObject from 'util/safeJsonParseObject';\nimport ImagePicker from '../imagePicker';\nimport Notifications from '../notifications';\n\nconst {\n apiFetch,\n compose: {\n compose,\n } = {},\n components: {\n Button,\n CheckboxControl,\n PanelBody,\n SelectControl,\n Spinner,\n TextareaControl,\n } = {},\n data: {\n select,\n subscribe,\n withDispatch,\n withSelect,\n } = {},\n editPost: {\n PluginSidebar,\n PluginSidebarMoreMenuItem,\n } = {},\n element: {\n Fragment,\n } = {},\n i18n: {\n __,\n } = {},\n} = wp;\n\n/**\n * A component to render a PluginSidebar for the WP Starter Plugin site.\n */\nclass Sidebar extends React.PureComponent {\n // Define PropTypes for this component.\n static propTypes = {\n meta: PropTypes.shape({\n isPaid: PropTypes.bool,\n isPreview: PropTypes.bool,\n isHidden: PropTypes.bool,\n isSponsored: PropTypes.bool,\n maturityRating: PropTypes.string,\n pullquoteText: PropTypes.string,\n pullquotePosition: PropTypes.string,\n selectedSections: PropTypes.string,\n coverArt: PropTypes.shape({\n orientation: PropTypes.string,\n // Other keys are determined in part by orientation\n // see `coverArtSizes` variable below\n }),\n apiId: PropTypes.string,\n dateCreated: PropTypes.string,\n dateModified: PropTypes.string,\n shareUrl: PropTypes.string,\n revision: PropTypes.string,\n }).isRequired,\n onUpdate: PropTypes.func.isRequired,\n post: PropTypes.shape({}).isRequired,\n refreshPost: PropTypes.func.isRequired,\n };\n\n /**\n * Set initial state.\n * @type {object}\n */\n state = {\n autoAssignCategories: false,\n loading: false,\n modified: 0,\n notifications: [],\n publishState: '',\n sections: [],\n selectedSectionsPrev: null,\n settings: {},\n unsubscribe: undefined,\n userCanPublish: false,\n };\n\n constructor(props) {\n super(props);\n\n this.deletePost = this.deletePost.bind(this);\n this.publishPost = this.publishPost.bind(this);\n this.updatePost = this.updatePost.bind(this);\n this.updateSelectedSections = this.updateSelectedSections.bind(this);\n }\n\n /**\n * Actions to be taken after the component has mounted.\n */\n componentDidMount() {\n this.subscribeToChanges();\n this.fetchNotifications();\n this.fetchPublishState();\n this.fetchSections();\n this.fetchSettings();\n this.fetchUserCanPublish();\n }\n\n /**\n * De-initializes functionality before the component is destroyed.\n */\n componentWillUnmount() {\n const {\n unsubscribe,\n } = this.state;\n\n if (unsubscribe) {\n unsubscribe();\n }\n }\n\n /**\n * Clears notifications that should be displayed once and automatically removed.\n */\n clearNotifications() {\n const {\n notifications,\n } = this.state;\n\n // Ensure we have an array to loop over.\n if (! Array.isArray(notifications)) {\n return;\n }\n\n // Loop over the array of notifications and determine which ones we need to clear.\n const toClear = notifications\n .filter((notification) => true !== notification.dismissible);\n\n // Ensure there are items to be cleared.\n if (0 === toClear.length) {\n return;\n }\n\n // Send the request to the API to clear the notifications.\n apiFetch({\n data: {\n toClear,\n },\n method: 'POST',\n path: '/apple-news/v1/clear-notifications',\n })\n .catch((error) => console.error(error)); // eslint-disable-line no-console\n }\n\n /**\n * Sends a request to the REST API to delete the post.\n */\n deletePost() {\n const {\n post: {\n id = 0,\n } = {},\n } = this.props;\n\n this.modifyPost(id, 'delete');\n }\n\n /**\n * A callback for a dismiss action on a notification.\n * @param {object} notification - The notification to mark as dismissed.\n */\n dismissNotification(notification) {\n const {\n notifications,\n } = this.state;\n\n // Send the request to the API to clear the notification.\n apiFetch({\n data: {\n toClear: [notification],\n },\n method: 'POST',\n path: '/apple-news/v1/clear-notifications',\n })\n .then(() => {\n // Set the notification to dismissed and update state.\n const updatedNotifications = notifications.map((compare) => {\n // If the notification doesn't match, return as-is.\n if (JSON.stringify(compare) !== JSON.stringify(notification)) {\n return compare;\n }\n\n return {\n ...compare,\n dismissed: true,\n };\n });\n this.setState({\n notifications: updatedNotifications,\n });\n })\n .catch((error) => console.error(error)); // eslint-disable-line no-console\n }\n\n /**\n * Fetches notifications for the current user via the REST API.\n */\n fetchNotifications() {\n const path = '/apple-news/v1/get-notifications';\n\n apiFetch({ path })\n .then((notifications) => {\n if (Array.isArray(notifications)) {\n if (0 < notifications.length) {\n this.setState(\n {\n notifications,\n },\n this.clearNotifications\n );\n } else {\n this.setState({\n notifications,\n });\n }\n }\n })\n .catch((error) => console.error(error)); // eslint-disable-line no-console\n }\n\n /**\n * Fetch published state.\n */\n fetchPublishState() {\n const {\n post,\n } = this.props;\n const path = `/apple-news/v1/get-published-state/${post.id}`;\n\n apiFetch({ path })\n .then(({ publishState }) => (this.setState({ publishState })))\n .catch((error) => console.error(error)); /* eslint-disable-line no-console */\n }\n\n /**\n * Fetch Apple News Sections\n */\n fetchSections() {\n const path = '/apple-news/v1/sections';\n\n apiFetch({ path })\n .then((sections) => (this.setState({ sections })))\n .catch((error) => console.error(error)); /* eslint-disable-line no-console */\n }\n\n /**\n * Fetch Apple News Settings\n */\n fetchSettings() {\n const path = '/apple-news/v1/get-settings';\n\n const {\n meta: {\n selectedSections,\n } = {},\n } = this.props;\n\n apiFetch({ path })\n .then((settings) => this.setState({\n autoAssignCategories: 'null' === selectedSections\n && true === settings.automaticAssignment,\n settings,\n }))\n .catch((error) => console.error(error)); /* eslint-disable-line no-console */\n }\n\n /**\n * Fetch whether the current user can publish to Apple News.\n */\n fetchUserCanPublish() {\n const {\n post,\n } = this.props;\n const path = `/apple-news/v1/user-can-publish/${post.id}`;\n\n apiFetch({ path })\n .then(({ userCanPublish }) => (this.setState({ userCanPublish })))\n .catch((error) => console.error(error)); /* eslint-disable-line no-console */\n }\n\n /**\n * Sends a request to the REST API to modify the post.\n */\n modifyPost(id, operation) {\n const {\n refreshPost,\n } = this.props;\n\n const path = `/apple-news/v1/${operation}`;\n\n this.setState({\n loading: true,\n });\n\n apiFetch({\n data: {\n id,\n },\n method: 'POST',\n path,\n })\n .then((data) => {\n const {\n publishState = '',\n } = data;\n\n refreshPost();\n\n this.fetchNotifications();\n\n this.setState({\n loading: false,\n publishState,\n });\n })\n .catch(() => {\n refreshPost();\n\n this.fetchNotifications();\n\n this.setState({\n loading: false,\n });\n });\n }\n\n /**\n * Sends a request to the REST API to publish the post.\n */\n publishPost() {\n const {\n post: {\n id = 0,\n } = {},\n } = this.props;\n\n this.modifyPost(id, 'publish');\n }\n\n /**\n * Subscribes to changes in the post to take actions when something changes.\n */\n subscribeToChanges() {\n // When the post is published or updated, we refresh notifications.\n const unsubscribe = subscribe(() => {\n const {\n modified,\n } = this.state;\n\n // If the modified date has not changed, bail out.\n const newModified = select('core/editor')\n .getEditedPostAttribute('modified');\n if (modified === newModified) {\n return;\n }\n\n // Update the modified date in state and fetch notifications.\n this.setState(\n {\n modified: newModified,\n },\n this.fetchNotifications\n );\n });\n\n // Add the last modified date and unsubscribe to state.\n this.setState({\n modified: select('core/editor').getEditedPostAttribute('modified'),\n unsubscribe,\n });\n }\n\n /**\n * Sends a request to the REST API to update the post.\n */\n updatePost() {\n const {\n post: {\n id = 0,\n } = {},\n } = this.props;\n\n this.modifyPost(id, 'update');\n }\n\n /**\n * Select Cover Art Image\n *\n * @param {string} metaKey metakey name\n * @param {string} value meta key value\n */\n updateSelectCoverArtImage(metaKey, value) {\n const {\n onUpdate,\n meta: {\n coverArt,\n } = {},\n } = this.props;\n\n let parsedCoverArt = safeJsonParseObject(coverArt);\n\n if (! value) {\n delete parsedCoverArt[metaKey];\n } else {\n parsedCoverArt = {\n [metaKey]: value,\n ...parsedCoverArt,\n };\n }\n\n onUpdate(\n 'apple_news_coverart',\n JSON.stringify(parsedCoverArt)\n );\n }\n\n /**\n * Update which sections are selected.\n *\n * @param {boolean} checked is selected\n * @param {string} name name of item selected\n *\n * @return void.\n */\n updateSelectedSections(checked, name) {\n const {\n onUpdate,\n meta: {\n selectedSections,\n } = {},\n } = this.props;\n // Need to default to [], else JSON parse fails\n const selectedSectionsArray = safeJsonParseArray(selectedSections);\n\n const selectedArrayDefault = Array.isArray(selectedSectionsArray)\n ? JSON.stringify([...selectedSectionsArray, name]) : null;\n\n const arrayFilter = selectedSectionsArray.filter(\n (section) => section !== name\n );\n\n const selectedArrayFilter = 0 < arrayFilter.length\n ? JSON.stringify(arrayFilter) : null;\n\n onUpdate(\n 'apple_news_sections',\n checked\n ? selectedArrayDefault\n : selectedArrayFilter\n );\n }\n\n /**\n * Renders the PluginSidebar.\n * @returns {object} JSX component markup.\n */\n render() {\n const target = 'publish-to-apple-news';\n const label = __('Apple News Options', 'apple-news');\n\n const {\n onUpdate,\n meta: {\n isPaid = false,\n isPreview = false,\n isHidden = false,\n isSponsored = false,\n maturityRating = '',\n pullquoteText = '',\n pullquotePosition = '',\n selectedSections = '',\n coverArt = '',\n apiId = '',\n dateCreated = '',\n dateModified = '',\n shareUrl = '',\n revision = '',\n } = {},\n post: {\n status = '',\n } = {},\n } = this.props;\n\n const {\n autoAssignCategories,\n loading,\n notifications,\n publishState,\n sections,\n settings: {\n adminUrl,\n apiAutosync,\n apiAutosyncDelete,\n apiAutosyncUpdate,\n automaticAssignment,\n enableCoverArt,\n } = {},\n selectedSectionsPrev,\n userCanPublish,\n } = this.state;\n\n const selectedSectionsArray = safeJsonParseArray(selectedSections);\n const parsedCoverArt = safeJsonParseObject(coverArt);\n\n const coverArtOrientation = parsedCoverArt.orientation || 'landscape';\n\n const coverArtSizes = [\n {\n title: __('iPad Pro (12.9 in): 1832 x 1374 px', 'apple-news'),\n key: `apple_news_ca_${coverArtOrientation}_12_9`,\n },\n {\n title: __('iPad (7.9/9.7 in): 1376 x 1032 px', 'apple-news'),\n key: `apple_news_ca_${coverArtOrientation}_9_7`,\n },\n {\n title: __('iPhone (5.5 in): 1044 x 783 px', 'apple-news'),\n key: `apple_news_ca_${coverArtOrientation}_5_5`,\n },\n {\n title: __('iPhone (4.7 in): 632 x 474 px', 'apple-news'),\n key: `apple_news_ca_${coverArtOrientation}_4_7`,\n },\n {\n title: __('iPhone (4 in): 536 x 402 px', 'apple-news'),\n key: `apple_news_ca_${coverArtOrientation}_4_0`,\n },\n ];\n\n return (\n <Fragment>\n <PluginSidebarMoreMenuItem target={target}>\n {label}\n </PluginSidebarMoreMenuItem>\n <PluginSidebar\n name={target}\n title={__('Publish to Apple News Options', 'apple-news')}\n >\n <div\n className=\"components-panel__body is-opened\"\n id=\"apple-news-publish\"\n >\n <Notifications\n dismissNotification={this.dismissNotification}\n notifications={notifications}\n />\n <h3>Sections</h3>\n {automaticAssignment && [\n <CheckboxControl\n label={__('Assign sections by category', 'apple-news')}\n checked={autoAssignCategories}\n onChange={\n (checked) => {\n this.setState({\n autoAssignCategories: checked,\n });\n if (checked) {\n this.setState({\n selectedSectionsPrev: selectedSections || null,\n });\n onUpdate(\n 'apple_news_sections',\n null\n );\n } else {\n onUpdate(\n 'apple_news_sections',\n selectedSectionsPrev\n );\n this.setState({\n selectedSectionsPrev: null,\n });\n }\n }\n }\n />,\n <hr />,\n ]}\n {(! autoAssignCategories || ! automaticAssignment) && [\n <h4>Manual Section Selection</h4>,\n Array.isArray(sections) && (\n <ul className=\"apple-news-sections\">\n {sections.map(({ id, name }) => (\n <li key={id}>\n <CheckboxControl\n label={name}\n checked={- 1 !== selectedSectionsArray.indexOf(id)}\n onChange={\n (checked) => this.updateSelectedSections(checked, id)\n }\n />\n </li>\n ))}\n </ul>\n ),\n ]}\n <p>\n <em>\n {\n // eslint-disable-next-line max-len\n __('Select the sections in which to publish this article. If none are selected, it will be published to the default section.', 'apple-news')\n }\n </em>\n </p>\n <h3>{__('Paid Article', 'apple-news')}</h3>\n <CheckboxControl\n // eslint-disable-next-line max-len\n label={__('Check this to indicate that viewing the article requires a paid subscription.', 'apple-news')}\n onChange={(value) => onUpdate(\n 'apple_news_is_paid',\n value\n )}\n checked={isPaid}\n />\n <h3>{__('Preview Article', 'apple-news')}</h3>\n <CheckboxControl\n // eslint-disable-next-line max-len\n label={__('Check this to publish the article as a draft.', 'apple-news')}\n onChange={(value) => onUpdate(\n 'apple_news_is_preview',\n value\n )}\n checked={isPreview}\n />\n <h3>Hidden Article</h3>\n <CheckboxControl\n // eslint-disable-next-line max-len\n label={__('Hidden articles are visible to users who have a link to the article, but do not appear in feeds.', 'apple-news')}\n onChange={(value) => onUpdate(\n 'apple_news_is_hidden',\n value\n )}\n checked={isHidden}\n />\n <h3>Sponsored Article</h3>\n <CheckboxControl\n // eslint-disable-next-line max-len\n label={__('Check this to indicate this article is sponsored content.', 'apple-news')}\n onChange={(value) => onUpdate(\n 'apple_news_is_sponsored',\n value\n )}\n checked={isSponsored}\n />\n </div>\n <PanelBody\n initialOpen={false}\n title={__('Maturity Rating', 'apple-news')}\n >\n <SelectControl\n label={__('Select Maturity Rating', 'apple-news')}\n value={maturityRating}\n options={[\n { label: '', value: '' },\n { label: __('Kids', 'apple-news'), value: 'KIDS' },\n { label: __('Mature', 'apple-news'), value: 'MATURE' },\n { label: __('General', 'apple-news'), value: 'GENERAL' },\n ]}\n onChange={(value) => onUpdate(\n 'apple_news_maturity_rating',\n value\n )}\n />\n <p>\n <em>\n Select the optional maturity rating for this post.\n </em>\n </p>\n </PanelBody>\n <PanelBody\n initialOpen={false}\n title={__('Pull Quote', 'apple_news')}\n >\n <TextareaControl\n label={__('Description', 'apple_news')}\n value={pullquoteText}\n onChange={(value) => onUpdate(\n 'apple_news_pullquote',\n value\n )}\n // eslint-disable-next-line max-len\n placeholder=\"A pull quote is a key phrase, quotation, or excerpt that has been pulled from an article and used as a graphic element, serving to entice readers into the article or to highlight a key topic.\"\n />\n <p>\n <em>\n This is optional and can be left blank.\n </em>\n </p>\n <SelectControl\n label={__('Pull Quote Position', 'apple-news')}\n value={pullquotePosition || 'middle'}\n options={[\n { label: __('top', 'apple-news'), value: 'top' },\n { label: __('middle', 'apple-news'), value: 'middle' },\n { label: __('bottom', 'apple-news'), value: 'bottom' },\n ]}\n onChange={(value) => onUpdate(\n 'apple_news_pullquote_position',\n value\n )}\n />\n <p>\n <em>\n {\n // eslint-disable-next-line max-len\n __('The position in the article where the pull quote will appear.', 'apple-news')\n }\n </em>\n </p>\n </PanelBody>\n <PanelBody\n initialOpen={false}\n title={__('Cover Art', 'apple-news')}\n >\n {\n enableCoverArt ? (\n <div>\n <p>\n <em>\n <a href=\"https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/CoverArt.html\">\n {__('Cover Art', 'apple-news')}\n </a>\n {\n // eslint-disable-next-line max-len\n __(' will represent your article if editorially chosen for Featured Stories. Cover Art must include your channel logo with text at 24 pt minimum that is related to the headline. The image provided must match the dimensions listed. Limit submissions to 1-3 articles per day.', 'apple-news')\n }\n </em>\n </p>\n <SelectControl\n label={__('Orientation', 'apple-news')}\n value={coverArtOrientation}\n options={[\n /* eslint-disable max-len */\n { label: __('Landscape (4:3)', 'apple-news'), value: 'landscape' },\n { label: __('Portrait (3:4)', 'apple-news'), value: 'portrait' },\n { label: __('Square (1:1)', 'apple-news'), value: 'square' },\n /* eslint-enable */\n ]}\n onChange={(value) => {\n const mediaKeys = Object\n .keys(parsedCoverArt)\n .filter((key) => 'orientation' !== key);\n const updatedOrientation = {\n orientation: value,\n };\n\n const updatedCoverArt = mediaKeys.reduce((acc, curr) => {\n const newKey = curr.replace(coverArtOrientation, value);\n return {\n [newKey]: parsedCoverArt[curr],\n ...acc,\n };\n }, updatedOrientation);\n\n onUpdate(\n 'apple_news_coverart',\n JSON.stringify(updatedCoverArt)\n );\n }}\n />\n <p>\n <em>\n {\n // eslint-disable-next-line max-len\n __('Note: You must provide the largest size (iPad Pro 12.9 in) in order for your submission to be considered.', 'apple-news')\n }\n </em>\n\n </p>\n <div>\n {\n coverArtSizes.map((item) => (\n <div>\n <h4>{item.title}</h4>\n <ImagePicker\n metaKey={item.key}\n onUpdate={(metaKey, value) => this\n .updateSelectCoverArtImage(\n metaKey,\n value\n )\n }\n value={parsedCoverArt[item.key]}\n />\n </div>\n ))\n }\n </div>\n </div>\n ) : (\n <p>\n <em>\n {__('Cover Art must be enabled on the ', 'apple-news')}\n <a href={adminUrl}>\n {__('settings page', 'apple-news')}\n </a>\n </em>\n </p>\n )\n }\n </PanelBody>\n <PanelBody\n initialOpen={false}\n title={__('Apple News Publish Information', 'apple-news')}\n >\n {'' !== publishState && 'N/A' !== publishState && (\n <Fragment>\n <h4>{__('API Id', 'apple-news')}</h4>\n <p>{apiId}</p>\n <h4>{__('Created On', 'apple-news')}</h4>\n <p>{dateCreated}</p>\n <h4>{__('Last Updated On', 'apple-news')}</h4>\n <p>{dateModified}</p>\n <h4>{__('Share URL', 'apple-news')}</h4>\n <p>{shareUrl}</p>\n <h4>{__('Revision', 'apple-news')}</h4>\n <p>{revision}</p>\n <h4>{__('Publish State', 'apple-news')}</h4>\n <p>{publishState}</p>\n </Fragment>\n )}\n </PanelBody>\n {'publish' === status && userCanPublish && (\n <Fragment>\n {loading ? (\n <Spinner />\n ) : (\n <Fragment>\n {'' !== publishState && 'N/A' !== publishState ? (\n <Fragment>\n {! apiAutosyncUpdate && (\n <Button\n isPrimary\n onClick={this.updatePost}\n style={{ margin: '1em' }}\n >\n {__('Update', 'apple-news')}\n </Button>\n )}\n {! apiAutosyncDelete && (\n <Button\n isDefault\n onClick={this.deletePost}\n style={{ margin: '1em' }}\n >\n {__('Delete', 'apple-news')}\n </Button>\n )}\n </Fragment>\n ) : (\n <Fragment>\n {! apiAutosync && (\n <Button\n isPrimary\n onClick={this.publishPost}\n style={{ margin: '1em' }}\n >\n {__('Publish', 'apple-news')}\n </Button>\n )}\n </Fragment>\n )}\n </Fragment>\n )}\n </Fragment>\n )}\n </PluginSidebar>\n </Fragment>\n );\n }\n}\n\nexport default compose([\n withSelect((selector) => {\n const editor = selector('core/editor');\n const meta = editor && editor.getEditedPostAttribute\n ? editor.getEditedPostAttribute('meta') || {}\n : {};\n const {\n apple_news_is_paid: isPaid = false,\n apple_news_is_preview: isPreview = false,\n apple_news_is_hidden: isHidden = false,\n apple_news_is_sponsored: isSponsored = false,\n apple_news_maturity_rating: maturityRating = '',\n apple_news_pullquote: pullquoteText = '',\n apple_news_pullquote_position: pullquotePosition = '',\n apple_news_sections: selectedSections = '',\n apple_news_coverart: coverArt = {},\n apple_news_api_id: apiId = '',\n apple_news_api_created_at: dateCreated = '',\n apple_news_api_modified_at: dateModified = '',\n apple_news_api_share_url: shareUrl = '',\n apple_news_api_revision: revision = '',\n } = meta;\n\n const postId = editor && editor.getCurrentPostId\n ? editor.getCurrentPostId()\n : 0;\n\n return {\n meta: {\n isPaid,\n isPreview,\n isHidden,\n isSponsored,\n maturityRating,\n pullquoteText,\n pullquotePosition,\n selectedSections,\n coverArt,\n apiId,\n dateCreated,\n dateModified,\n shareUrl,\n revision,\n postId,\n },\n post: editor && editor.getCurrentPost ? editor.getCurrentPost() : {},\n };\n }),\n withDispatch((dispatch) => ({\n onUpdate: (metaKey, metaValue) => {\n dispatch('core/editor').editPost({\n meta: {\n [metaKey]: metaValue,\n },\n });\n },\n refreshPost: () => {\n dispatch('core/editor').refreshPost();\n },\n })),\n])(Sidebar);\n","/* global React, wp */\n\nimport Icon from './components/icon';\nimport Sidebar from './components/sidebar';\n\nif ('undefined' !== typeof wp) {\n const {\n plugins: {\n registerPlugin = null,\n } = {},\n } = wp;\n\n if ('function' === typeof registerPlugin) {\n registerPlugin('publish-to-apple-news', {\n icon: <Icon />,\n render: Sidebar,\n });\n }\n}\n"],"sourceRoot":""} \ No newline at end of file