芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/ycreate.jp/wp-content/plugins/snow-monkey-blocks/dist/js/editor.js
(()=>{"use strict";const e=window.React,t=window.wp.blocks,l=window.wp.compose,s=window.wp.hooks,n=window.wp.blockEditor,r=window.wp.components,o=window.wp.i18n;function i({attributes:e={},setAttributes:t}){delete e?.smb?.flexGrow;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function a(t){const{attributes:{smb:l},setAttributes:s}=t;return(0,e.createElement)(r.ToggleControl,{label:(0,o.__)("Fill"),help:(0,o.__)("Allows for stretching from the basic size.","snow-monkey-blocks"),checked:!!l?.flexGrow,onChange:e=>{const t={...l,flexGrow:e||void 0};null==t.flexGrow&&delete t.flexGrow,s({smb:Object.keys(t).length?t:void 0})}})}function u({attributes:e={},setAttributes:t}){delete e?.smb?.flexShrink;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function c(t){const{attributes:{smb:l},setAttributes:s}=t;return(0,e.createElement)(r.ToggleControl,{label:(0,o.__)("Fit"),help:(0,o.__)("Allow shrinkage from the basic size.","snow-monkey-blocks"),checked:null==l?.flexShrink,onChange:e=>{const t={...l,flexShrink:e?void 0:0};null==t.flexShrink&&delete t.flexShrink,s({smb:Object.keys(t).length?t:void 0})}})}function b({attributes:e={},setAttributes:t}){delete e?.smb?.flexBasis;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function m(t){const{attributes:{smb:l},setAttributes:s}=t;return(0,e.createElement)(r.__experimentalUnitControl,{label:(0,o.__)("Basic size","snow-monkey-blocks"),help:(0,o.__)("Basic size of the flex item.","snow-monkey-blocks"),value:l?.flexBasis||"",onChange:e=>{const t={...l,flexBasis:e||void 0};null==t.flexBasis&&delete t.flexBasis,s({smb:Object.keys(t).length?t:void 0})}})}const d=window.wp.primitives,p=(0,e.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(d.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),f=(0,e.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(d.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),g=(0,e.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(d.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),h=(0,e.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(d.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));function w({attributes:e={},setAttributes:t}){delete e?.smb?.justifySelf;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function S(t){const{attributes:{smb:l},setAttributes:s}=t,n=[{value:"start",icon:p,label:(0,o.__)("Justify items left")},{value:"center",icon:f,label:(0,o.__)("Justify items center")},{value:"end",icon:g,label:(0,o.__)("Justify items right")},{value:"stretch",icon:h,label:(0,o.__)("Stretch items")}];return(0,e.createElement)(r.__experimentalToggleGroupControl,{label:"justify-self",value:l?.justifySelf||"stretch",onChange:e=>{const t={...l,justifySelf:e||void 0};null==t.justifySelf&&delete t.justifySelf,s({smb:Object.keys(t).length?t:void 0})},className:"block-editor-hooks__flex-layout-justification-controls"},n.map((({value:t,icon:l,label:s})=>(0,e.createElement)(r.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:l,label:s}))))}const _=(0,e.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(r.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),v=(0,e.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(r.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),k=(0,e.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(r.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),x=(0,e.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(r.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"}));function y({attributes:e={},setAttributes:t}){delete e?.smb?.alignSelf;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function B(t){const{attributes:{smb:l},setAttributes:s}=t,n=[{value:"start",icon:k,label:(0,o.__)("Align items top")},{value:"center",icon:v,label:(0,o.__)("Align items center")},{value:"end",icon:_,label:(0,o.__)("Align items bottom")},{value:"stretch",icon:x,label:(0,o.__)("Stretch items")}];return(0,e.createElement)(r.__experimentalToggleGroupControl,{label:"align-self",value:l?.alignSelf||"stretch",onChange:e=>{const t={...l,alignSelf:e||void 0};null==t.alignSelf&&delete t.alignSelf,s({smb:Object.keys(t).length?t:void 0})},className:"block-editor-hooks__flex-layout-justification-controls"},n.map((({value:t,icon:l,label:s})=>(0,e.createElement)(r.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:l,label:s}))))}function E({attributes:e={},setAttributes:t}){delete e?.smb?.gridColumn;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function j(t){const{attributes:{smb:l},setAttributes:s}=t;return(0,e.createElement)(r.TextControl,{label:"grid-column",value:l?.gridColumn||"",onChange:e=>{const t={...l,gridColumn:e||void 0};null==t.gridColumn&&delete t.gridColumn,s({smb:Object.keys(t).length?t:void 0})}})}function V({attributes:e={},setAttributes:t}){delete e?.smb?.gridRow;const l={...e?.smb};t({smb:Object.keys(l).length?l:void 0})}function C(t){const{attributes:{smb:l},setAttributes:s}=t;return(0,e.createElement)(r.TextControl,{label:"grid-row",value:l?.gridRow||"",onChange:e=>{const t={...l,gridRow:e||void 0};null==t.gridRow&&delete t.gridRow,s({smb:Object.keys(t).length?t:void 0})}})}function M(l){const s=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.flexGrow")&&!l?.flexGrow}(l),d=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.flexShrink")&&!l?.flexShrink}(l),p=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.flexBasis")&&!l?.flexBasis}(l),f=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.justifySelf")&&!l?.justifySelf}(l),g=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.alignSelf")&&!l?.alignSelf}(l),h=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.gridColumn")&&!l?.gridColumn}(l),_=function({name:e,attributes:{__unstableSMBSupports:l}}={}){return!(0,t.hasBlockSupport)(e,"smb.gridRow")&&!l?.gridRow}(l);return s&&d&&p&&f&&g&&h&&_?null:(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.InspectorControls,{group:"dimensions"},!s&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.flexGrow}(l),label:(0,o.__)("Fill"),onDeselect:()=>i(l),resetAllFilter:()=>i(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(a,{...l})),!d&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.flexShrink}(l),label:(0,o.__)("Fit"),onDeselect:()=>u(l),resetAllFilter:()=>u(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(c,{...l})),!p&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.flexBasis}(l),label:(0,o.__)("Basic size","snow-monkey-blocks"),onDeselect:()=>b(l),resetAllFilter:()=>b(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(m,{...l})),!f&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.justifySelf}(l),label:"justify-self",onDeselect:()=>w(l),resetAllFilter:()=>w(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(S,{...l})),!g&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.alignSelf}(l),label:"align-self",onDeselect:()=>y(l),resetAllFilter:()=>y(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(B,{...l})),!h&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.gridColumn}(l),label:"grid-column",onDeselect:()=>E(l),resetAllFilter:()=>E(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(j,{...l})),!_&&(0,e.createElement)(r.__experimentalToolsPanelItem,{hasValue:()=>function(e){return void 0!==e.attributes?.smb?.gridRow}(l),label:"grid-row",onDeselect:()=>V(l),resetAllFilter:()=>V(l),isShownByDefault:!0,panelId:l.clientId},(0,e.createElement)(C,{...l}))))}(0,s.addFilter)("blocks.registerBlockType","smb/editor/addEditProps",(function(e){return function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.gridRow")||s?.__unstableSMBSupports?.gridRow?(void 0===s?.smb?.gridRow||(e.style={...e.style,"--smb--grid-row":s?.smb?.gridRow}),e):(delete s?.smb?.gridRow,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.gridColumn")||s?.__unstableSMBSupports?.gridColumn?(void 0===s?.smb?.gridColumn||(e.style={...e.style,"--smb--grid-column":s?.smb?.gridColumn}),e):(delete s?.smb?.gridColumn,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.alignSelf")||s?.__unstableSMBSupports?.alignSelf?(void 0===s?.smb?.alignSelf||(e.style={...e.style,"--smb--align-self":s?.smb?.alignSelf}),e):(delete s?.smb?.alignSelf,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.justifySelf")||s?.__unstableSMBSupports?.justifySelf?(void 0===s?.smb?.justifySelf||(e.style={...e.style,"--smb--justify-self":s?.smb?.justifySelf}),e):(delete s?.smb?.justifySelf,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.flexBasis")||s?.__unstableSMBSupports?.flexBasis?(void 0===s?.smb?.flexBasis||(e.style={...e.style,"--smb--flex-basis":s?.smb?.flexBasis}),e):(delete s?.smb?.flexBasis,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.flexShrink")||s?.__unstableSMBSupports?.flexShrink?(void 0===s?.smb?.flexShrink||(e.style={...e.style,"--smb--flex-shrink":s?.smb?.flexShrink?void 0:0}),e):(delete s?.smb?.flexShrink,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e=function(e){const l=e.getEditWrapperProps;return e.getEditWrapperProps=s=>{let n={};return l&&(n=l(s)),function(e,l,s){return(0,t.hasBlockSupport)(l,"smb.flexGrow")||s?.__unstableSMBSupports?.flexGrow?(void 0===s?.smb?.flexGrow||(e.style={...e.style,"--smb--flex-grow":s?.smb?.flexGrow?1:void 0}),e):(delete s?.smb?.flexGrow,s?.smb&&!Object.keys(s?.smb).length&&delete s?.smb,e)}(n,e,s)},e}(e)))))))})),(0,s.addFilter)("blocks.registerBlockType","smb/editor/addAttribute",(e=>(Object.assign(e.attributes,{smb:{type:"object"}}),e)));const P=(0,l.createHigherOrderComponent)((l=>s=>(0,t.hasBlockSupport)(s.name,"smb")||s.attributes?.__unstableSMBSupports?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,{...s}),((0,t.hasBlockSupport)(s.name,"smb")||!!s.attributes?.__unstableSMBSupports)&&(0,e.createElement)(M,{...s})):(0,e.createElement)(l,{...s})),"withInspectorControl");(0,s.addFilter)("editor.BlockEdit","smb/editor/with-inspector-controls",P)})();