芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/fluentform/assets/js/fluent_gutenblock.js
/*! For license information please see fluent_gutenblock.js.LICENSE.txt */ (()=>{"use strict";var t={75251:(t,e,r)=>{var n=r(67294),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(t,e,r){var n,i={},s=null,l=null;for(n in void 0!==r&&(s=""+r),void 0!==e.key&&(s=""+e.key),void 0!==e.ref&&(l=e.ref),e)u.call(e,n)&&!c.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:s,ref:l,props:i,_owner:a.current}}e.jsx=s,e.jsxs=s},72408:(t,e)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,d={};function m(t,e,r){this.props=t,this.context=e,this.refs=d,this.updater=r||y}function b(){}function w(t,e,r){this.props=t,this.context=e,this.refs=d,this.updater=r||y}m.prototype.isReactComponent={},m.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},m.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=m.prototype;var g=w.prototype=new b;g.constructor=w,v(g,m.prototype),g.isPureReactComponent=!0;var _=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function j(t,e,n){var o,i={},u=null,a=null;if(null!=e)for(o in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(u=""+e.key),e)S.call(e,o)&&!E.hasOwnProperty(o)&&(i[o]=e[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1
{t.exports=r(72408)},48521:(t,e,r)=>{t.exports=r(75251)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(()=>{var t=r(48521);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e){for(var r=0;r
=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),s=o.call(u,"finallyLoc");if(c&&s){if(this.prev
=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev
=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}function p(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){p(i,n,o,u,a,"next",t)}function a(t){p(i,n,o,u,a,"throw",t)}u(void 0)}))}}var y=wp.i18n.__,v=wp.blocks.registerBlockType,d=wp.blockEditor.InspectorControls,m=wp.serverSideRender,b=void 0===m?wp.components.ServerSideRender:m,w=window.wp.apiFetch,g=wp.components,_=g.SelectControl,S=g.PanelBody,x=window.wp.element.Component,E=function(){var t=h(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(window.fluentform_block_vars.rest.namespace,"/").concat(window.fluentform_block_vars.rest.version,"/settings/").concat(e,"?meta_key=").concat(r),t.next=5,w({path:n});case 5:return o=t.sent,t.abrupt("return",o.length&&o[0].value||!1);case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),j=wp.element.createElement("svg",{width:20,height:20},wp.element.createElement("path",{d:"M15.57,0H4.43A4.43,4.43,0,0,0,0,4.43V15.57A4.43,4.43,0,0,0,4.43,20H15.57A4.43,4.43,0,0,0,20,15.57V4.43A4.43,4.43,0,0,0,15.57,0ZM12.82,14a2.36,2.36,0,0,1-1.66.68H6.5A2.31,2.31,0,0,1,7.18,13a2.36,2.36,0,0,1,1.66-.68l4.66,0A2.34,2.34,0,0,1,12.82,14Zm3.3-3.46a2.36,2.36,0,0,1-1.66.68H3.21a2.25,2.25,0,0,1,.68-1.64,2.36,2.36,0,0,1,1.66-.68H16.79A2.25,2.25,0,0,1,16.12,10.53Zm0-3.73a2.36,2.36,0,0,1-1.66.68H3.21a2.25,2.25,0,0,1,.68-1.64,2.36,2.36,0,0,1,1.66-.68H16.79A2.25,2.25,0,0,1,16.12,6.81Z"})),k=function(e){function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),s(a(t=o(this,r,arguments)),"checkIfConversationalForm",function(){var e=h(f().mark((function e(r){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,E(r,"is_conversion_form");case 4:n=e.sent,t.props.setAttributes({isConversationalForm:"yes"===n});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),s(a(t),"handleFormChange",(function(e){t.props.setAttributes({formId:e}),e?t.checkIfConversationalForm(e):t.props.setAttributes({themeStyle:"",isThemeChange:!1,isConversationalForm:!1})})),t}var i,u,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(r,e),i=r,(u=[{key:"componentDidMount",value:function(){!this.props.attributes.themeStyle&&window.fluentform_block_vars.theme_style&&this.props.setAttributes({themeStyle:window.fluentform_block_vars.theme_style})}},{key:"render",value:function(){var e,r=this.props,n=r.attributes,o=r.setAttributes,i=window.fluentform_block_vars,u=i.style_presets,a=(0,t.jsxs)("div",{className:"flueform-guten-wrapper",children:[(0,t.jsx)("div",{className:"fluentform-logo",children:(0,t.jsx)("img",{src:i.logo,alt:"Fluent Forms Logo"})}),e]},"ff-form-sub-wrapper");return e=[(0,t.jsx)(d,{children:(0,t.jsxs)(S,{title:"Select your Fluent Forms",children:[(0,t.jsx)(_,{label:y("Select a Form"),value:n.formId,options:i.forms.map((function(t){return{value:t.id,label:t.title}})),onChange:this.handleFormChange},"sub_select_form"),n.formId&&n.hasOwnProperty("isConversationalForm")&&1!=n.isConversationalForm&&(0,t.jsx)(_,{label:y("Select a Theme Style"),value:n.themeStyle,options:u,onChange:function(t){o({themeStyle:t,isThemeChange:!0})}},"ff-sub_select_theme")]})},"ff-select-form")],n.formId?1==n.isConversationalForm?e.push((0,t.jsxs)("div",{className:"conv-demo",children:[(0,t.jsx)("img",{src:i.conversational_demo_img,alt:"Fluent Forms Conversational Form"}),(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:y("This is a demo! The actual Conversational Form may look different in live pages.")})})]},"ff-conv-sub-wrapper")):e.push((0,t.jsx)(b,{block:"fluentfom/guten-block",attributes:n},"ff-preview")):(e.push(a),e.push((0,t.jsx)(_,{label:y("Select a Form"),value:"",options:i.forms.map((function(t){return{value:t.id,label:t.title}})),onChange:this.handleFormChange},"ff-main-select-form"))),(0,t.jsx)("div",{className:"flueform-guten-wrapper",children:e})}}])&&n(i.prototype,u),l&&n(i,l),Object.defineProperty(i,"prototype",{writable:!1}),r}(x);v("fluentfom/guten-block",{title:y("Fluent Forms"),icon:j,category:"formatting",keywords:[y("Contact Form"),y("Fluent Forms"),y("Forms"),y("Advanced Forms"),y("fluentforms-gutenberg-block")],edit:k})})()})();