Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ (()=>{var e={2694:(e,t,r)=>{"use strict";var n=r(6925);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint: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:o,resetWarningCache:i};return r.PropTypes=r,r}},5556:(e,t,r)=>{e.exports=r(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t{"use strict";var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}t.q=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var a=t.indexOf(";"),s=-1!==a?t.slice(0,a).trim():t.trim();if(!i.test(s))throw new TypeError("invalid media type");var l=new o(s.toLowerCase());if(-1!==a){var c,u,p;for(r.lastIndex=a;u=r.exec(t);){if(u.index!==a)throw new TypeError("invalid parameter format");a+=u[0].length,c=u[1].toLowerCase(),34===(p=u[2]).charCodeAt(0)&&-1!==(p=p.slice(1,-1)).indexOf("\\")&&(p=p.replace(n,"$1")),l.parameters[c]=p}if(a!==t.length)throw new TypeError("invalid parameter format")}return l}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks;var n=r(5556),i=r.n(n);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&("always"===t||"once"===t&&!y[l])){for(var T=0,W=C.length;T desc");t&&e.removeChild(t);var r=document.createElement("desc");r.innerHTML=o,e.prepend(r)}if(u){var n=e.querySelector(":scope > title");n&&e.removeChild(n);var i=document.createElement("title");i.innerHTML=u,e.prepend(i)}try{f(e)}catch(e){v(e)}},cacheRequests:p,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},i.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},i.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},i.componentDidUpdate=function(e){var t=this;(function(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1})(o({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},i.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},i.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var r=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var n=e.wrapper,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,E),a=n;return x.createElement(a,o({},i,{ref:this.refCallback},"svg"===n?{xmlns:A,xmlnsXlink:j}:{}),this.state.isLoading&&r&&x.createElement(r,null),this.state.hasError&&t&&x.createElement(t,null))},n}(x.Component);_.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},_.propTypes={afterInjection:n.func,beforeInjection:n.func,desc:n.string,evalScripts:n.oneOf(["always","once","never"]),fallback:n.oneOfType([n.func,n.object,n.string]),httpRequestWithCredentials:n.bool,loading:n.oneOfType([n.func,n.object,n.string]),onError:n.func,renumerateIRIElements:n.bool,src:n.string.isRequired,title:n.string,useRequestCache:n.bool,wrapper:n.oneOf(["div","span","svg"])};var R=r(6942),I=r.n(R);const C=window.wp.components,O=window.wp.blockEditor,k=window.ReactJSXRuntime,T=({attributes:t,setAttributes:r})=>{const{contentPostType:n,svgURL:i,type:o,imageID:a,imageSizes:s,alignment:l,imageWidth:c,imageHeight:u,dimensionWidth:p,dimensionHeight:d,textColor:f}=t,h=(0,O.useBlockProps)({className:"wp-block-safe-svg-svg-icon safe-svg-cover",style:{textAlign:l}}),{className:g,style:v,...m}=h;delete v.textAlign,m.style={textAlign:l};const w=g.replace(/has-[\w-]*-color|has-background/g,"").trim();m.className=w,v.width=`${p}px`,v.height=`${d}px`;const y=["image/svg+xml"],b=e=>{var t;if(!e.sizes&&!e.media_details?.sizes)return;e.media_details&&(e.sizes=e.media_details.sizes);const n=null!==(t=e.sizes.full.url)&&void 0!==t?t:e.sizes.full.source_url;r({imageSizes:{full:e.sizes.full,medium:e.sizes.medium,thumbnail:e.sizes.thumbnail},imageWidth:e.sizes.full.width,imageHeight:e.sizes.full.height,dimensionWidth:e.sizes.full.width,dimensionHeight:e.sizes.full.height,imageID:e.id,svgURL:n,type:"full"})},S=[{value:"full",label:(0,e.__)("Full Size","safe-svg")},{value:"medium",label:(0,e.__)("Medium","safe-svg")},{value:"thumbnail",label:(0,e.__)("Thumbnail","safe-svg")}];return(0,k.jsxs)(k.Fragment,{children:[i&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(O.InspectorControls,{children:(0,k.jsx)(C.PanelBody,{title:(0,e.__)("Image settings","safe-svg"),children:(0,k.jsx)(O.__experimentalImageSizeControl,{width:p,height:d,imageWidth:c,imageHeight:u,imageSizeOptions:S,slug:o,onChange:e=>{var t,n;e.width||e.height||(e.width=parseInt(s[o].width),e.height=parseInt(s[o].height)),r({dimensionWidth:null!==(t=e.width)&&void 0!==t?t:p,dimensionHeight:null!==(n=e.height)&&void 0!==n?n:d})},onChangeImage:e=>{var t;const n=null!==(t=s[e].url)&&void 0!==t?t:s[e].source_url;if(!n)return null;let i=parseInt(s[e].width),o=parseInt(s[e].height);"full"!==e&&(s[e].width>=s[e].height?o=s[e].height*s.full.height/s.full.width:i=s[e].width*s.full.width/s.full.height),r({svgURL:n,imageWidth:i,imageHeight:o,dimensionWidth:i,dimensionHeight:o,type:e})}})})}),(0,k.jsx)(O.BlockControls,{children:(0,k.jsx)(O.AlignmentToolbar,{value:l,onChange:e=>r({alignment:e})})}),(0,k.jsx)(O.BlockControls,{children:(0,k.jsx)(O.MediaReplaceFlow,{mediaId:a,mediaURL:i,allowedTypes:y,accept:y,onSelect:b,onError:t=>{console.log((0,e.__)(`Something went wrong, please try again. Message: ${t}`,"safe-svg"))}})})]}),!i&&(0,k.jsx)(O.MediaPlaceholder,{onSelect:b,allowedTypes:y,accept:y,value:a,labels:{title:(0,e.__)("Inline SVG","safe-svg"),instructions:(0,e.__)("Upload an SVG or pick one from your media library.","safe-svg")}}),i&&(0,k.jsx)("div",{...m,children:(0,k.jsx)("div",{style:v,className:I()("safe-svg-inside",(0,O.getColorClassName)("color",f)||""),children:(0,k.jsx)(_,{src:i,beforeInjection:e=>{e.setAttribute("style",`width: ${p}px; height: ${d}px;`)}})})}),n&&(0,k.jsx)(C.Placeholder,{label:(0,e.__)("SafeSvg","safe-svg"),children:(0,k.jsx)("p",{children:(0,e.__)("Please select the SVG icon.","safe-svg")})})]})};T.propTypes={attributes:i().shape({svgURL:i().string,alignment:i().string,imageID:i().number,imageWidth:i().number,imageHeight:i().number,dimensionWidth:i().number,dimensionHeight:i().number,imageSizes:i().object}).isRequired,className:i().string,clientId:i().string,setAttributes:i().func.isRequired};const W=T,q=JSON.parse('{"UU":"safe-svg/svg-icon"}');(0,t.registerBlockType)(q.UU,{title:(0,e.__)("Inline SVG","safe-svg"),description:(0,e.__)("Display an SVG icon","safe-svg"),edit:W,save:()=>null,icon:{src:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800",viewBox:"0 0 512 512",children:(0,k.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M321.838 42.667H87.171v234.666h42.667v-192h174.293l81.707 81.707v110.293h42.667v-128L321.838 42.667ZM85.333 441.734l4.17-24.65c14.68 6.163 27.126 9.244 37.337 9.244 6.645 0 11.54-1.631 14.68-4.894 2.72-2.84 4.079-6.313 4.079-10.422 0-3.685-1.33-6.555-3.988-8.61-2.658-2.053-9.213-5.225-19.665-9.515-7.734-3.202-13.186-5.588-16.358-7.16-3.172-1.57-6.087-3.352-8.745-5.346-7.552-5.619-11.328-13.715-11.328-24.287 0-9.123 2.477-17.129 7.43-24.016 7.613-10.694 20.12-16.04 37.52-16.04 12.566 0 26.22 2.325 40.962 6.977l-5.8 23.563c-8.7-3.202-15.24-5.317-19.62-6.344-4.38-1.027-8.957-1.54-13.73-1.54-5.437 0-9.576 1.208-12.416 3.625-2.96 2.597-4.44 5.89-4.44 9.878 0 3.443 1.253 6.147 3.76 8.11 2.508 1.964 8.535 4.91 18.08 8.837 9.486 3.927 15.77 6.66 18.85 8.201a55.772 55.772 0 0 1 8.7 5.392c7.432 5.68 11.147 14.35 11.147 26.01 0 13.775-4.682 24.197-14.047 31.265-7.975 5.982-19.152 8.972-33.53 8.972-14.984 0-29.333-2.417-43.048-7.25Zm146.722 4.985L183.39 318.303h30.087l21.388 57.637c5.437 14.682 9.515 26.765 12.234 36.25 4.169-13.291 8.126-24.982 11.872-35.071l22.022-58.816h28.637l-48.665 128.416h-28.91ZM429.8 374.853v65.522c-7.37 2.477-12.567 4.108-15.588 4.894-9.364 2.477-19.424 3.715-30.178 3.715-21.146 0-37.247-5.317-48.303-15.95-12.264-11.72-18.397-28.063-18.397-49.028 0-24.106 7.613-42.292 22.838-54.556 11.056-8.942 25.979-13.413 44.769-13.413 16.07 0 31.024 2.93 44.859 8.79l-9.878 22.567c-6.525-3.263-12.235-5.544-17.128-6.843-4.894-1.299-10.271-1.948-16.132-1.948-14.016 0-24.347 4.561-30.993 13.684-5.619 7.734-8.428 17.914-8.428 30.54 0 15.165 4.229 26.584 12.687 34.257 6.767 6.163 15.165 9.244 25.194 9.244 5.86 0 11.419-.997 16.675-2.99v-25.829h-22.113v-22.656H429.8Z"})})}})})()})();