[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> element.min.js (source)

   1  /*! This file is auto-generated */
   2  this.wp=this.wp||{},this.wp.element=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="o/Ny")}({Vx3V:function(e,t){e.exports=window.wp.escapeHtml},YLtl:function(e,t){e.exports=window.lodash},cDcd:function(e,t){e.exports=window.React},faye:function(e,t){e.exports=window.ReactDOM},"o/Ny":function(e,t,n){"use strict";n.r(t),n.d(t,"createInterpolateElement",(function(){return m})),n.d(t,"Children",(function(){return r.Children})),n.d(t,"cloneElement",(function(){return r.cloneElement})),n.d(t,"Component",(function(){return r.Component})),n.d(t,"createContext",(function(){return r.createContext})),n.d(t,"createElement",(function(){return r.createElement})),n.d(t,"createRef",(function(){return r.createRef})),n.d(t,"forwardRef",(function(){return r.forwardRef})),n.d(t,"Fragment",(function(){return r.Fragment})),n.d(t,"isValidElement",(function(){return r.isValidElement})),n.d(t,"memo",(function(){return r.memo})),n.d(t,"StrictMode",(function(){return r.StrictMode})),n.d(t,"useCallback",(function(){return r.useCallback})),n.d(t,"useContext",(function(){return r.useContext})),n.d(t,"useDebugValue",(function(){return r.useDebugValue})),n.d(t,"useEffect",(function(){return r.useEffect})),n.d(t,"useImperativeHandle",(function(){return r.useImperativeHandle})),n.d(t,"useLayoutEffect",(function(){return r.useLayoutEffect})),n.d(t,"useMemo",(function(){return r.useMemo})),n.d(t,"useReducer",(function(){return r.useReducer})),n.d(t,"useRef",(function(){return r.useRef})),n.d(t,"useState",(function(){return r.useState})),n.d(t,"lazy",(function(){return r.lazy})),n.d(t,"Suspense",(function(){return r.Suspense})),n.d(t,"concatChildren",(function(){return b})),n.d(t,"switchChildrenNodeName",(function(){return y})),n.d(t,"createPortal",(function(){return g.createPortal})),n.d(t,"findDOMNode",(function(){return g.findDOMNode})),n.d(t,"render",(function(){return g.render})),n.d(t,"unmountComponentAtNode",(function(){return g.unmountComponentAtNode})),n.d(t,"isEmptyElement",(function(){return O})),n.d(t,"Platform",(function(){return w})),n.d(t,"renderToString",(function(){return $})),n.d(t,"RawHTML",(function(){return S}));var r=n("cDcd");let o,u,c,i;const s=/<(\/)?(\w+)\s*(\/)?>/g;function a(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}const l=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every(e=>Object(r.isValidElement)(e))};function f(e){const t=function(){const e=s.exec(o);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,u,c]=e,i=n.length;if(c)return["self-closed",u,t,i];if(r)return["closer",u,t,i];return["opener",u,t,i]}(),[n,l,f,m]=t,h=i.length,b=f>u?u:null;if(!e[l])return d(),!1;switch(n){case"no-more-tokens":if(0!==h){const{leadingTextStart:e,tokenStart:t}=i.pop();c.push(o.substr(e,t))}return d(),!1;case"self-closed":return 0===h?(null!==b&&c.push(o.substr(b,f-b)),c.push(e[l]),u=f+m,!0):(p(a(e[l],f,m)),u=f+m,!0);case"opener":return i.push(a(e[l],f,m,f+m,b)),u=f+m,!0;case"closer":if(1===h)return function(e){const{element:t,leadingTextStart:n,prevOffset:u,tokenStart:s,children:a}=i.pop(),l=e?o.substr(u,e-u):o.substr(u);l&&a.push(l);null!==n&&c.push(o.substr(n,s-n));c.push(Object(r.cloneElement)(t,null,...a))}(f),u=f+m,!0;const t=i.pop(),n=o.substr(t.prevOffset,f-t.prevOffset);t.children.push(n),t.prevOffset=f+m;const s=a(t.element,t.tokenStart,t.tokenLength,f+m);return s.children=t.children,p(s),u=f+m,!0;default:return d(),!1}}function d(){const e=o.length-u;0!==e&&c.push(o.substr(u,e))}function p(e){const{element:t,tokenStart:n,tokenLength:u,prevOffset:c,children:s}=e,a=i[i.length-1],l=o.substr(a.prevOffset,n-a.prevOffset);l&&a.children.push(l),a.children.push(Object(r.cloneElement)(t,null,...s)),a.prevOffset=c||n+u}var m=(e,t)=>{if(o=e,u=0,c=[],i=[],s.lastIndex=0,!l(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(f(t));return Object(r.createElement)(r.Fragment,null,...c)},h=n("YLtl");function b(...e){return e.reduce((e,t,n)=>(r.Children.forEach(t,(t,o)=>{t&&"string"!=typeof t&&(t=Object(r.cloneElement)(t,{key:[n,o].join()})),e.push(t)}),e),[])}function y(e,t){return e&&r.Children.map(e,(e,n)=>{if(Object(h.isString)(e))return Object(r.createElement)(t,{key:n},e);const{children:o,...u}=e.props;return Object(r.createElement)(t,{key:n,...u},o)})}var g=n("faye");const O=e=>!Object(h.isNumber)(e)&&(Object(h.isString)(e)||Object(h.isArray)(e)?!e.length:!e);var w={OS:"web",select:e=>"web"in e?e.web:e.default},v=n("Vx3V");function S({children:e,...t}){return Object(r.createElement)("div",{dangerouslySetInnerHTML:{__html:e},...t})}const{Provider:j,Consumer:x}=Object(r.createContext)(void 0),k=Object(r.forwardRef)(()=>null),C=new Set(["string","boolean","number"]),E=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),M=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"]),I=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"]),T=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 L(e,t){return t.some(t=>0===e.indexOf(t))}function _(e){return"key"===e||"children"===e}function R(e,t){switch(e){case"style":return function(e){if(!Object(h.isPlainObject)(e))return e;let t;for(const n in e){const r=e[n];if(null==r)continue;t?t+=";":t="";const o=H(n),u=N(n,r);t+=o+":"+u}return t}(t)}return t}function P(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function H(e){return Object(h.startsWith)(e,"--")?e:L(e,["ms","O","Moz","Webkit"])?"-"+Object(h.kebabCase)(e):Object(h.kebabCase)(e)}function N(e,t){return"number"!=typeof t||0===t||T.has(e)?t:t+"px"}function V(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return A(e,t,n);switch(typeof e){case"string":return Object(v.escapeHTML)(e);case"number":return e.toString()}const{type:o,props:u}=e;switch(o){case r.StrictMode:case r.Fragment:return A(u.children,t,n);case S:const{children:e,...o}=u;return D(Object(h.isEmpty)(o)?null:"div",{...o,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof o){case"string":return D(o,u,t,n);case"function":return o.prototype&&"function"==typeof o.prototype.render?function(e,t,n,r={}){const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());return V(o.render(),n,r)}(o,u,t,n):V(o(u,n),t,n)}switch(o&&o.$$typeof){case j.$$typeof:return A(u.children,u.value,n);case x.$$typeof:return V(u.children(t||o._currentValue),t,n);case k.$$typeof:return V(o.render(u),t,n)}return""}function D(e,t,n,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=A(t.value,n,r),t=Object(h.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=A(t.children,n,r)),!e)return o;const u=function(e){let t="";for(const n in e){const r=P(n);if(!Object(v.isValidAttributeName)(r))continue;let o=R(n,e[n]);if(!C.has(typeof o))continue;if(_(n))continue;const u=M.has(r);if(u&&!1===o)continue;const c=u||L(n,["data-","aria-"])||I.has(r);("boolean"!=typeof o||c)&&(t+=" "+r,u||("string"==typeof o&&(o=Object(v.escapeAttribute)(o)),t+='="'+o+'"'))}return t}(t);return E.has(e)?"<"+e+u+"/>":"<"+e+u+">"+o+"</"+e+">"}function A(e,t,n={}){let r="";e=Object(h.castArray)(e);for(let o=0;o<e.length;o++){r+=V(e[o],t,n)}return r}var $=V}});


Generated: Sat Jun 12 01:00:05 2021 Cross-referenced by PHPXref 0.7.1