WordPress/wp-includes/js/dist/element.min.js

9 lines
12 KiB
JavaScript

/*! This file is auto-generated */
(()=>{"use strict";var e={4140:(e,t,n)=>{var r=n(5795);t.H=r.createRoot,t.c=r.hydrateRoot},5795:e=>{e.exports=window.ReactDOM}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{Children:()=>o.Children,Component:()=>o.Component,Fragment:()=>o.Fragment,Platform:()=>w,PureComponent:()=>o.PureComponent,RawHTML:()=>I,StrictMode:()=>o.StrictMode,Suspense:()=>o.Suspense,cloneElement:()=>o.cloneElement,concatChildren:()=>g,createContext:()=>o.createContext,createElement:()=>o.createElement,createInterpolateElement:()=>m,createPortal:()=>v.createPortal,createRef:()=>o.createRef,createRoot:()=>b.H,findDOMNode:()=>v.findDOMNode,flushSync:()=>v.flushSync,forwardRef:()=>o.forwardRef,hydrate:()=>v.hydrate,hydrateRoot:()=>b.c,isEmptyElement:()=>k,isValidElement:()=>o.isValidElement,lazy:()=>o.lazy,memo:()=>o.memo,render:()=>v.render,renderToString:()=>K,startTransition:()=>o.startTransition,switchChildrenNodeName:()=>y,unmountComponentAtNode:()=>v.unmountComponentAtNode,useCallback:()=>o.useCallback,useContext:()=>o.useContext,useDebugValue:()=>o.useDebugValue,useDeferredValue:()=>o.useDeferredValue,useEffect:()=>o.useEffect,useId:()=>o.useId,useImperativeHandle:()=>o.useImperativeHandle,useInsertionEffect:()=>o.useInsertionEffect,useLayoutEffect:()=>o.useLayoutEffect,useMemo:()=>o.useMemo,useReducer:()=>o.useReducer,useRef:()=>o.useRef,useState:()=>o.useState,useSyncExternalStore:()=>o.useSyncExternalStore,useTransition:()=>o.useTransition});const o=window.React;let i,a,s,l;const c=/<(\/)?(\w+)\s*(\/)?>/g;function u(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}const d=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,o.isValidElement)(e)))};function p(e){const t=function(){const e=c.exec(i);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,a]=e,s=n.length;if(a)return["self-closed",o,t,s];if(r)return["closer",o,t,s];return["opener",o,t,s]}(),[n,r,d,p]=t,m=l.length,g=d>a?a:null;if(!e[r])return f(),!1;switch(n){case"no-more-tokens":if(0!==m){const{leadingTextStart:e,tokenStart:t}=l.pop();s.push(i.substr(e,t))}return f(),!1;case"self-closed":return 0===m?(null!==g&&s.push(i.substr(g,d-g)),s.push(e[r]),a=d+p,!0):(h(u(e[r],d,p)),a=d+p,!0);case"opener":return l.push(u(e[r],d,p,d+p,g)),a=d+p,!0;case"closer":if(1===m)return function(e){const{element:t,leadingTextStart:n,prevOffset:r,tokenStart:a,children:c}=l.pop(),u=e?i.substr(r,e-r):i.substr(r);u&&c.push(u);null!==n&&s.push(i.substr(n,a-n));s.push((0,o.cloneElement)(t,null,...c))}(d),a=d+p,!0;const t=l.pop(),n=i.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+p;const c=u(t.element,t.tokenStart,t.tokenLength,d+p);return c.children=t.children,h(c),a=d+p,!0;default:return f(),!1}}function f(){const e=i.length-a;0!==e&&s.push(i.substr(a,e))}function h(e){const{element:t,tokenStart:n,tokenLength:r,prevOffset:a,children:s}=e,c=l[l.length-1],u=i.substr(c.prevOffset,n-c.prevOffset);u&&c.children.push(u),c.children.push((0,o.cloneElement)(t,null,...s)),c.prevOffset=a||n+r}const m=(e,t)=>{if(i=e,a=0,s=[],l=[],c.lastIndex=0,!d(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(p(t));return(0,o.createElement)(o.Fragment,null,...s)};function g(...e){return e.reduce(((e,t,n)=>(o.Children.forEach(t,((t,r)=>{t&&"string"!=typeof t&&(t=(0,o.cloneElement)(t,{key:[n,r].join()})),e.push(t)})),e)),[])}function y(e,t){return e&&o.Children.map(e,((e,n)=>{if("string"==typeof e?.valueOf())return(0,o.createElement)(t,{key:n},e);const{children:r,...i}=e.props;return(0,o.createElement)(t,{key:n,...i},r)}))}var v=n(5795),b=n(4140);const k=e=>"number"!=typeof e&&("string"==typeof e?.valueOf()||Array.isArray(e)?!e.length:!e),w={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function S(e){return"[object Object]"===Object.prototype.toString.call(e)}var x=function(){return x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function O(e){return e.toLowerCase()}var C=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],E=/[^A-Z0-9]+/gi;function R(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function T(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?C:n,o=t.stripRegexp,i=void 0===o?E:o,a=t.transform,s=void 0===a?O:a,l=t.delimiter,c=void 0===l?" ":l,u=R(R(e,r,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}(e,x({delimiter:"."},t))}function A(e,t){return void 0===t&&(t={}),T(e,x({delimiter:"-"},t))}const M=window.wp.escapeHtml;function I({children:e,...t}){let n="";return o.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,o.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:L,Consumer:P}=(0,o.createContext)(void 0),j=(0,o.forwardRef)((()=>null)),H=new Set(["string","boolean","number"]),z=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),D=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),V=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),W=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function _(e,t){return t.some((t=>0===e.indexOf(t)))}function F(e){return"key"===e||"children"===e}function N(e,t){return"style"===e?function(e){if(t=e,!1===S(t)||void 0!==(n=t.constructor)&&(!1===S(r=n.prototype)||!1===r.hasOwnProperty("isPrototypeOf")))return e;var t,n,r;let o;for(const t in e){const n=e[t];if(null==n)continue;o?o+=";":o="";o+=B(t)+":"+Y(t,n)}return o}(t):t}const U=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),$=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),q=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function X(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return $[t]?$[t]:U[t]?A(U[t]):q[t]?q[t]:t}function B(e){return e.startsWith("--")?e:_(e,["ms","O","Moz","Webkit"])?"-"+A(e):A(e)}function Y(e,t){return"number"!=typeof t||0===t||W.has(e)?t:t+"px"}function Z(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return J(e,t,n);switch(typeof e){case"string":return(0,M.escapeHTML)(e);case"number":return e.toString()}const{type:r,props:i}=e;switch(r){case o.StrictMode:case o.Fragment:return J(i.children,t,n);case I:const{children:e,...r}=i;return G(Object.keys(r).length?"div":null,{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return G(r,i,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?function(e,t,n,r={}){const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());const i=Z(o.render(),n,r);return i}(r,i,t,n):Z(r(i,n),t,n)}switch(r&&r.$$typeof){case L.$$typeof:return J(i.children,i.value,n);case P.$$typeof:return Z(i.children(t||r._currentValue),t,n);case j.$$typeof:return Z(r.render(i),t,n)}return""}function G(e,t,n,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")){o=J(t.value,n,r);const{value:e,...i}=t;t=i}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=J(t.children,n,r));if(!e)return o;const i=function(e){let t="";for(const n in e){const r=X(n);if(!(0,M.isValidAttributeName)(r))continue;let o=N(n,e[n]);if(!H.has(typeof o))continue;if(F(n))continue;const i=D.has(r);if(i&&!1===o)continue;const a=i||_(n,["data-","aria-"])||V.has(r);("boolean"!=typeof o||a)&&(t+=" "+r,i||("string"==typeof o&&(o=(0,M.escapeAttribute)(o)),t+='="'+o+'"'))}return t}(t);return z.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function J(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++){r+=Z(e[o],t,n)}return r}const K=Z;(window.wp=window.wp||{}).element=r})();