403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.3/wp-content/plugins/better-block-editor/dist/blocks/svg-inline/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.3/wp-content/plugins/better-block-editor/dist/blocks/svg-inline/index.js
(()=>{"use strict";var e,t={564:()=>{const e=window.wp.i18n,t=window.wp.element,n=window.wp.blockEditor,r=window.wp.components,o=window.ReactJSXRuntime;function i(e){const t=(0,n.__experimentalUseMultipleOriginColorsAndGradients)(),{colors:i,disableCustomColors:a,gradients:s,disableCustomGradients:l,settings:c,panelId:d,label:u,enableAlpha:h,__experimentalIsRenderedInSidebar:p}={...t,...e};return i&&0!==i.length||s&&0!==s.length||!a||!l||!c?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,o.jsxs)("div",{className:"tool-panel-colors-list__inner-wrapper",children:[u&&(0,o.jsx)(r.BaseControl.VisualLabel,{as:"legend",children:u}),(0,o.jsx)(n.__experimentalColorGradientSettingsDropdown,{settings:c,panelId:d,__experimentalIsRenderedInSidebar:p,colors:i,disableCustomColors:a,gradients:s,disableCustomGradients:l,enableAlpha:h})]}):null}const a=window.wp.data,s=window.wp.coreData;function l(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=l(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const c=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=l(e))&&(r&&(r+=" "),r+=t);return r};function d(){const e=(0,n.__experimentalUseMultipleOriginColorsAndGradients)(),r=(0,t.useMemo)((()=>{var t;const n=[];return(null!==(t=e.colors)&&void 0!==t?t:[]).forEach((e=>{var t;(null!==(t=e.colors)&&void 0!==t?t:[]).forEach((e=>n.push(e)))})),n}),[e.colors]);return{inputToAttribute:(0,t.useCallback)((e=>{const t=r.find((t=>t.color===e));return t?t.slug:e}),[r]),attributeToInput:(0,t.useCallback)((e=>{const t=r.find((t=>t.slug===e));return t?t.color:e}),[r]),attributeToCss:(0,t.useCallback)((e=>{const t=r.find((t=>t.slug===e));return t?`var(--wp--preset--color--${t.slug})`:e}),[r])}}function u({defaultSize:n,size:i,onChange:a}){var s;const[l,c]=(0,t.useState)(null!==(s=null!=i?i:n)&&void 0!==s?s:"");(0,t.useEffect)((()=>{void 0===i&&void 0!==n&&c(n)}),[i,n]),(0,t.useEffect)((()=>{void 0!==i&&i!==l&&c(i)}),[i,l]);const d={labelPosition:"top",size:"__unstable-large",__nextHasNoMarginBottom:!0,units:(0,r.__experimentalUseCustomUnits)({availableUnits:["px"]}),placeholder:(0,e.__)("Auto","better-block-editor"),min:1};return(0,o.jsx)("div",{className:"block-editor-image-size-control",children:(0,o.jsx)(r.__experimentalUnitControl,{label:(0,e.__)("Icon Size","better-block-editor"),value:l,onChange:e=>((e,t)=>{if(!/^([\d.]+)([a-z%]*)$/.test(t)&&""!==t)return;const n=""===t?void 0:t;c(n),a(n)})(0,e),...d})})}const h=window.React;var p=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],g={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function f(e,t,n){const r=[...e].map(((e,r)=>b(e,{...n,index:r,level:t+1}))).filter(Boolean);return r.length?r:null}function m(e,t={}){return"string"==typeof e?function(e,t={}){if(!e||"string"!=typeof e)return null;const{includeAllNodes:n=!1,nodeOnly:r=!1,selector:o="body > *",type:i="text/html"}=t;try{const a=(new DOMParser).parseFromString(e,i);if(n){const{childNodes:e}=a.body;return r?e:[...e].map((e=>b(e,t)))}const s=a.querySelector(o)||a.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return r?s:b(s,t)}catch(e){}return null}(e,t):e instanceof Node?b(e,t):null}function b(e,t={}){if(!(e&&e instanceof Node))return null;const{actions:n=[],index:r=0,level:o=0,randomKey:i}=t;let a=e,s=`${o}-${r}`;const l=[];return i&&0===o&&(s=`${function(e=6){let t="";for(let n=e;n>0;--n)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.round(61*Math.random())];return t}()}-${s}`),Array.isArray(n)&&n.forEach((t=>{t.condition(a,s,o)&&("function"==typeof t.pre&&(a=t.pre(a,s,o),a instanceof Node||(a=e)),"function"==typeof t.post&&l.push(t.post(a,s,o)))})),l.length?l:function(e,t){const{key:n,level:r,...o}=t;switch(e.nodeType){case 1:return h.createElement((i=e.nodeName,/[a-z]+[A-Z]+[a-z]+/.test(i)?i:i.toLowerCase()),function(e,t){const n={key:t};if(e instanceof Element){const t=e.getAttribute("class");t&&(n.className=t),[...e.attributes].forEach((e=>{switch(e.name){case"class":break;case"style":n[e.name]="string"!=typeof(t=e.value)?{}:t.split(/ ?; ?/).reduce(((e,t)=>{const[n,r]=t.split(/ ?: ?/).map(((e,t)=>0===t?e.replace(/\s+/g,""):e.trim()));if(n&&r){const t=n.replace(/(\w)-(\w)/g,((e,t,n)=>`${t}${n.toUpperCase()}`));let o=r.trim();Number.isNaN(Number(r))||(o=Number(r)),e[n.startsWith("-")?n:t]=o}return e}),{});break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":n[g[e.name]||e.name]=!0;break;default:n[g[e.name]||e.name]=e.value}var t}))}return n}(e,n),f(e.childNodes,r,o));case 3:{const t=e.nodeValue?.toString()??"";if(!o.allowWhiteSpaces&&/^\s+$/.test(t)&&!/[\u00A0\u202F]/.test(t))return null;if(!e.parentNode)return t;const n=e.parentNode.nodeName.toLowerCase();return p.includes(n)?(/\S/.test(t)&&console.warn(`A textNode is not allowed inside '${n}'. Your text "${t}" will be ignored`),null):t}case 8:default:return null;case 11:return f(e.childNodes,r,t)}var i}(a,{key:s,level:o,...t})}var v=Object.defineProperty,y=(e,t,n)=>((e,t,n)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),k="react-inlinesvg",w={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function x(){return!("undefined"==typeof window||!window.document?.createElement)}async function C(e,t){const n=await fetch(e,t),r=n.headers.get("content-type"),[o]=(r??"").split(/ ?; ?/);if(n.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some((e=>o.includes(e))))throw new Error(`Content type isn't valid: ${o}`);return n.text()}function S(e=1){return new Promise((t=>{setTimeout(t,1e3*e)}))}var A,E=class{constructor(){y(this,"cacheApi"),y(this,"cacheStore"),y(this,"subscribers",[]),y(this,"isReady",!1),this.cacheStore=new Map;let e=k,t=!1;x()&&(e=window.REACT_INLINESVG_CACHE_NAME??k,t=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),t?caches.open(e).then((e=>{this.cacheApi=e})).catch((e=>{console.error(`Failed to open cache: ${e.message}`),this.cacheApi=void 0})).finally((()=>{this.isReady=!0;const e=[...this.subscribers];this.subscribers.length=0,e.forEach((e=>{try{e()}catch(e){console.error(`Error in CacheStore subscriber callback: ${e.message}`)}}))})):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,t){return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,t):this.fetchAndAddToInternalCache(e,t)),this.cacheStore.get(e)?.content??""}set(e,t){this.cacheStore.set(e,t)}isCached(e){return this.cacheStore.get(e)?.status===w.LOADED}async fetchAndAddToInternalCache(e,t){const n=this.cacheStore.get(e);if(n?.status!==w.LOADING){if(!n?.content){this.cacheStore.set(e,{content:"",status:w.LOADING});try{const n=await C(e,t);this.cacheStore.set(e,{content:n,status:w.LOADED})}catch(t){throw this.cacheStore.set(e,{content:"",status:w.FAILED}),t}}}else await this.handleLoading(e,(async()=>{this.cacheStore.set(e,{content:"",status:w.IDLE}),await this.fetchAndAddToInternalCache(e,t)}))}async fetchAndAddToPersistentCache(e,t){const n=this.cacheStore.get(e);if(n?.status===w.LOADED)return;if(n?.status===w.LOADING)return void await this.handleLoading(e,(async()=>{this.cacheStore.set(e,{content:"",status:w.IDLE}),await this.fetchAndAddToPersistentCache(e,t)}));this.cacheStore.set(e,{content:"",status:w.LOADING});const r=await(this.cacheApi?.match(e));if(r){const t=await r.text();this.cacheStore.set(e,{content:t,status:w.LOADED})}else try{await(this.cacheApi?.add(new Request(e,t)));const n=await(this.cacheApi?.match(e)),r=await(n?.text())??"";this.cacheStore.set(e,{content:r,status:w.LOADED})}catch(t){throw this.cacheStore.set(e,{content:"",status:w.FAILED}),t}}async handleLoading(e,t){for(let t=0;t<10;t++){if(this.cacheStore.get(e)?.status!==w.LOADING)return;await S(.1)}await t()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map((([e,t])=>({[e]:t})))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){const e=await this.cacheApi.keys();await Promise.allSettled(e.map((e=>this.cacheApi.delete(e))))}this.cacheStore.clear()}};function _(e){const t=(0,h.useRef)(void 0);return(0,h.useEffect)((()=>{t.current=e})),t.current}function D(e){const{baseURL:t,content:n,description:r,handleError:o,hash:i,preProcessor:a,title:s,uniquifyIDs:l=!1}=e;try{const e=function(e,t){return t?t(e):e}(n,a),o=m(e,{nodeOnly:!0});if(!(o&&o instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const c=I(o,{baseURL:t,hash:i,uniquifyIDs:l});if(r){const e=c.querySelector("desc");e?.parentNode&&e.parentNode.removeChild(e);const t=document.createElementNS("http://www.w3.org/2000/svg","desc");t.innerHTML=r,c.prepend(t)}if(void 0!==s){const e=c.querySelector("title");if(e?.parentNode&&e.parentNode.removeChild(e),s){const e=document.createElementNS("http://www.w3.org/2000/svg","title");e.innerHTML=s,c.prepend(e)}}return c}catch(e){return o(e)}}function I(e,t){const{baseURL:n="",hash:r,uniquifyIDs:o}=t,i=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"];return o?([...e.children].forEach((e=>{if(e.attributes?.length){const t=Object.values(e.attributes).map((e=>{const t=e,o=/url\((.*?)\)/.exec(e.value);return o?.[1]&&(t.value=e.value.replace(o[0],`url(${n}${o[1]}__${r})`)),t}));i.forEach((e=>{const n=t.find((t=>t.name===e));var o,i;n&&(o=e,i=n.value,!a.includes(o)||!i||i.includes("#"))&&(n.value=`${n.value}__${r}`)}))}return e.children.length?I(e,t):e})),e):e}function L(e){const{cacheRequests:t=!0,children:n=null,description:r,fetchOptions:o,innerRef:i,loader:a=null,onError:s,onLoad:l,src:c,title:d,uniqueHash:u}=e,[p,g]=(0,h.useReducer)(((e,t)=>({...e,...t})),{content:"",element:null,isCached:t&&A.isCached(e.src),status:w.IDLE}),{content:f,element:b,isCached:v,status:y}=p,k=_(e),S=_(p),E=(0,h.useRef)(u??function(){const e="abcdefghijklmnopqrstuvwxyz",t=`${e}${e.toUpperCase()}1234567890`;let n="";for(let e=0;e<8;e++)n+=(r=t)[Math.floor(Math.random()*r.length)];var r;return n}()),I=(0,h.useRef)(!1),L=(0,h.useRef)(!1),R=(0,h.useCallback)((e=>{I.current&&(g({status:"Browser does not support SVG"===e.message?w.UNSUPPORTED:w.FAILED}),s?.(e))}),[s]),O=(0,h.useCallback)(((e,t=!1)=>{I.current&&g({content:e,isCached:t,status:w.LOADED})}),[]),N=(0,h.useCallback)((async()=>{const e=await C(c,o);O(e)}),[o,O,c]),T=(0,h.useCallback)((()=>{try{const t=m(D({...e,handleError:R,hash:E.current,content:f}));if(!t||!(0,h.isValidElement)(t))throw new Error("Could not convert the src to a React element");g({element:t,status:w.READY})}catch(e){R(e)}}),[f,R,e]),M=(0,h.useCallback)((async()=>{const e=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(c);let n;if(e?n=e[1]?window.atob(e[2]):decodeURIComponent(e[2]):c.includes("<svg")&&(n=c),n)O(n);else try{if(t){const e=await A.get(c,o);O(e,!0)}else await N()}catch(e){R(e)}}),[t,N,o,R,O,c]),j=(0,h.useCallback)((async()=>{I.current&&g({content:"",element:null,isCached:!1,status:w.LOADING})}),[]);(0,h.useEffect)((()=>{if(I.current=!0,x()&&!L.current){try{if(y===w.IDLE){if(!function(){if(!document)return!1;const e=document.createElement("div");e.innerHTML="<svg />";const t=e.firstChild;return!!t&&"http://www.w3.org/2000/svg"===t.namespaceURI}()||"undefined"==typeof window||null===window)throw new Error("Browser does not support SVG");if(!c)throw new Error("Missing src");j()}}catch(e){R(e)}return L.current=!0,()=>{I.current=!1}}}),[]),(0,h.useEffect)((()=>{if(x()&&k&&k.src!==c){if(!c)return void R(new Error("Missing src"));j()}}),[R,j,k,c]),(0,h.useEffect)((()=>{y===w.LOADED&&T()}),[y,T]),(0,h.useEffect)((()=>{x()&&k&&k.src===c&&(k.title===d&&k.description===r||T())}),[r,T,k,c,d]),(0,h.useEffect)((()=>{if(S)switch(y){case w.LOADING:S.status!==w.LOADING&&M();break;case w.LOADED:S.status!==w.LOADED&&T();break;case w.READY:S.status!==w.READY&&l?.(c,v)}}),[M,T,v,l,S,c,y]);const P=function(e,...t){const n={};for(const r in e)({}).hasOwnProperty.call(e,r)&&(t.includes(r)||(n[r]=e[r]));return n}(e,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return x()?b?(0,h.cloneElement)(b,{ref:i,...P}):[w.UNSUPPORTED,w.FAILED].includes(y)?n:a:a}function R(e){A||(A=new E);const{loader:t}=e,[n,r]=(0,h.useState)(A.isReady);return(0,h.useEffect)((()=>{n||A.onReady((()=>{r(!0)}))}),[n]),n?h.createElement(L,{...e}):t}const O=({href:e,children:t,className:n,style:r})=>e?(0,o.jsx)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{cursor:"default",...r},className:n,children:t}):(0,o.jsx)("div",{className:n,style:r,children:t}),N=({imageURL:e,fallbackContent:t,style:n,href:r,containerProps:i={}})=>e&&!t?(0,o.jsx)("div",{...i,children:(0,o.jsx)(O,{style:n,className:"svg-wrapper",href:r,children:(0,o.jsx)(R,{src:e})})}):t?(0,o.jsx)("div",{...i,children:(0,o.jsx)(O,{style:n,className:"svg-wrapper",href:r,children:t})}):null,T={color:{css:"color",type:"color"},fillColor:{css:"fill-color",type:"color"},backgroundColor:{css:"background-color",type:"color"},hoverColor:{css:"hover-color",type:"color"},hoverFillColor:{css:"hover-fill-color",type:"color"},hoverBackgroundColor:{css:"hover-background-color",type:"color"},hoverBorderColor:{css:"hover-border-color",type:"color"},imageWidth:{css:"width",type:"raw"}},M=(0,t.forwardRef)((({attributes:t,setAttributes:l,clientId:h,customClasses:p="",fallbackContent:g=null,disableSettings:f=!1,useMultimediaSelect:m=!0,useMultimediaReplace:b=!0,useUrl:v=!0,children:y,additionalSettings:k={}},w)=>{const{imageURL:x,imageID:C,alignment:S,color:A,fillColor:E,backgroundColor:_,hoverColor:D,hoverFillColor:I,hoverBackgroundColor:L,hoverBorderColor:R,imageWidth:O,href:M,linkDestination:j,linkTarget:P,linkClass:U,rel:z}=t,V=["image/svg+xml"],B={...T,...k},{attributeToCss:F}=d(),G={},H={};for(const e in B){const{css:n,type:r}=B[e],o=t[e];if(void 0!==o){const i=`--svg-${n}`;switch(r){case"color":G[i]=F(o),H[`has-svg-${n}`]=!0;break;case"raw":G[i]=`${t[e]}`;break;default:G[i]=String(o)}}}const q=(0,n.useBlockProps)({className:c(`wpbbe-${h}`,"wpbbe-svg-icon",H,p),ref:w}),{style:$={},...W}=q,X={},Y={};Object.entries($).forEach((([e,t])=>{e.toLowerCase().startsWith("margin")?X[e]=t:Y[e]=t})),W.style={justifyContent:S,...G,...X};const{attributeToInput:Z,inputToAttribute:K}=d(),J=(e,t)=>{l({[e]:K(t)})},{media:Q}=(0,a.useSelect)((e=>({media:C?e(s.store).getMedia(C):void 0})),[C]),ee=e=>{var t,n;const r=function(e){var t;if(!e)return null;const n=null!==(t=e.media_details?.sizes)&&void 0!==t?t:e.sizes;return n?.full?n.full:null}(e);if(!r)return;const{url:o,source_url:i}=r,a=null!==(t=null!==(n=e.url)&&void 0!==n?n:o)&&void 0!==t?t:i;l({imageURL:a,imageID:e.id})},te="svg-inline-styling-"+h;return(0,o.jsxs)(o.Fragment,{children:[(x||g)&&(0,o.jsxs)(o.Fragment,{children:[!f&&(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(r.PanelBody,{title:(0,e.__)("SVG Settings","better-block-editor"),children:(0,o.jsx)(u,{size:O,onChange:e=>{l({imageWidth:e})}})})}),(0,o.jsx)(n.InspectorControls,{group:"color",children:(0,o.jsxs)(r.__experimentalVStack,{spacing:0,className:"tool-panel-colors-list__inner-wrapper wpbbe-block-vstack",children:[(0,o.jsx)(r.__experimentalToolsPanel,{panelId:te,className:"wpbbe-block-support-panel svg-icon-color-panel",label:(0,e.__)("Color","better-block-editor"),__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,o.jsx)(i,{__experimentalIsRenderedInSidebar:!0,panelId:te,settings:[{enableAlpha:!0,clearable:!0,colorValue:Z(A),onColorChange:e=>J("color",e),label:(0,e.__)("Stroke","better-block-editor")},{enableAlpha:!0,clearable:!0,colorValue:Z(E),onColorChange:e=>J("fillColor",e),label:(0,e.__)("Fill","better-block-editor")},{enableAlpha:!0,clearable:!0,colorValue:Z(_),onColorChange:e=>J("backgroundColor",e),label:(0,e.__)("Background","better-block-editor")}]})}),(0,o.jsx)(r.__experimentalToolsPanel,{panelId:te,className:"svg-icon-color-hover-panel",label:(0,e.__)("Hover Color","better-block-editor"),__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,o.jsx)(i,{__experimentalIsRenderedInSidebar:!0,panelId:te,className:"svg-icon-hover-color-panel",settings:[{enableAlpha:!0,clearable:!0,colorValue:Z(D),onColorChange:e=>J("hoverColor",e),label:(0,e.__)("Stroke","better-block-editor")},{enableAlpha:!0,clearable:!0,colorValue:Z(I),onColorChange:e=>J("hoverFillColor",e),label:(0,e.__)("Fill","better-block-editor")},{enableAlpha:!0,clearable:!0,colorValue:Z(L),onColorChange:e=>J("hoverBackgroundColor",e),label:(0,e.__)("Background","better-block-editor")},{enableAlpha:!0,clearable:!0,colorValue:Z(R),onColorChange:e=>J("hoverBorderColor",e),label:(0,e.__)("Border","better-block-editor")}]})})]})}),(0,o.jsxs)(n.BlockControls,{children:[(0,o.jsx)(n.JustifyToolbar,{allowedControls:["left","center","right"],value:S,onChange:e=>l({alignment:e})}),v&&(0,o.jsx)(n.__experimentalImageURLInputUI,{url:M||"",onChangeUrl:function(e){l(e)},linkDestination:j,mediaUrl:x,mediaLink:Q&&Q.link,linkTarget:P,linkClass:U,rel:z,showLightboxSetting:!1,lightboxEnabled:!1}),b&&(0,o.jsx)(n.MediaReplaceFlow,{mediaId:C,mediaURL:x,allowedTypes:V,accept:V,onSelect:ee,onError:e=>{console.warn(`SVG replace Error. ${e}`)},onReset:()=>l({imageURL:"",imageID:0})})]})]}),!x&&m&&(0,o.jsx)(n.MediaPlaceholder,{allowedTypes:V,accept:V,onSelect:ee,value:C,labels:{title:(0,e.__)("Inline SVG","better-block-editor"),instructions:(0,e.__)("Upload an SVG or pick one from your media library.","better-block-editor")}}),(0,o.jsx)(N,{imageURL:x,fallbackContent:g,style:Y,href:M,containerProps:W}),y]})})),j=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"wpbbe/svg-inline","title":"SVG Icon","description":"Display the SVG icon","category":"design","textdomain":"better-block-editor","supports":{"html":false,"shadow":true,"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalGlobalStyles":true},"attributes":{"color":{"type":"string"},"fillColor":{"type":"string"},"backgroundColor":{"type":"string"},"hoverColor":{"type":"string"},"hoverFillColor":{"type":"string"},"hoverBackgroundColor":{"type":"string"},"hoverBorderColor":{"type":"string"},"imageID":{"type":"number","default":0},"imageURL":{"type":"string","default":""},"alignment":{"type":"string"},"imageWidth":{"type":"string"},"href":{"type":"string"},"rel":{"type":"string"},"linkClass":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string"}},"selectors":{"border":".wp-block-wpbbe-svg-inline > .svg-wrapper","spacing":{"margin":".wp-block-wpbbe-svg-inline > .svg-wrapper","padding":".wp-block-wpbbe-svg-inline > .svg-wrapper"}},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),P=window.wp.blocks,U=(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800",viewBox:"0 0 512 512",children:(0,o.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"})});!function(e){if(!e)return;const{metadata:t,settings:n,name:r}=e;(0,P.registerBlockType)({name:r,...t},n)}({name:j.name,metadata:j,settings:{icon:U,edit:function(e){return(0,o.jsx)(M,{...e})}}})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,o,i]=e[d],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,o,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={877:0,265:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(l)var d=l(r)}for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(d)},n=globalThis.webpackChunkbetter_block_editor=globalThis.webpackChunkbetter_block_editor||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[265],(()=>r(564)));o=r.O(o)})();

Youez - 2016 - github.com/yon3zu
LinuXploit