From ee66e34615c733e8bcf41f8f6603989255bc149c Mon Sep 17 00:00:00 2001 From: riteelama Date: Fri, 9 Aug 2024 16:52:01 +0545 Subject: [PATCH 01/17] Add - Module into the divi builder --- includes/class-everest-forms.php | 15 +++ includes/divi/class-evf-divi-module.php | 127 ++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 includes/divi/class-evf-divi-module.php diff --git a/includes/class-everest-forms.php b/includes/class-everest-forms.php index 57a146fc9..9a08b0fed 100644 --- a/includes/class-everest-forms.php +++ b/includes/class-everest-forms.php @@ -164,6 +164,8 @@ public function __construct() { $this->init_hooks(); add_action( 'plugins_loaded', array( $this, 'objects' ), 1 ); + add_action( 'et_builder_ready', array( $this, 'everest_form_register_builder_ready' ) ); + do_action( 'everest_forms_loaded' ); } @@ -486,4 +488,17 @@ public function wpdb_table_fix() { public function form_fields() { return EVF_Fields::instance(); } + + /** + * Function to check whether the divi module is loaded or not. + * + * @since xx.xx.xx + */ + public function everest_form_register_builder_ready() { + if ( ! class_exists( 'ET_Builder_Module' ) ) { + return; + } + + include_once EVF_ABSPATH . 'includes/divi/class-evf-divi-module.php'; + } } diff --git a/includes/divi/class-evf-divi-module.php b/includes/divi/class-evf-divi-module.php new file mode 100644 index 000000000..6ee07dabf --- /dev/null +++ b/includes/divi/class-evf-divi-module.php @@ -0,0 +1,127 @@ +name = esc_html__( 'Everest Forms', 'everest-forms' ); + + $this->settings_modal_toggles = array( + 'general' => array( + 'toggles' => array( + 'main_content' => esc_html__( 'Forms', 'everest-forms' ), + ), + ), + ); + } + + /** + * Displays the Module setting fields. + * + * @since xx.xx.xx + * + * @return array $fields Array of settings fields. + */ + public function get_fields() { + + $forms = evf_get_all_forms(); + $fields = array( + 'form_id' => array( + 'label' => esc_html__( 'Form', 'everest-forms' ), + 'type' => 'select', + 'option_category' => 'basic_option', + 'toggle_slug' => 'main_content', + 'options' => $forms, + 'default' => '0', + ), + 'show_title' => array( + 'label' => esc_html__( 'Show Title', 'everest-forms' ), + 'type' => 'yes_no_button', + 'option_category' => 'basic_option', + 'toggle_slug' => 'main_content', + 'options' => array( + 'off' => esc_html__( 'Off', 'everest-forms' ), + 'on' => esc_html__( 'On', 'everest-forms' ), + ), + ), + 'show_desc' => array( + 'label' => esc_html__( 'Show Description', 'everest-forms' ), + 'option_category' => 'basic_option', + 'type' => 'yes_no_button', + 'toggle_slug' => 'main_content', + 'options' => array( + 'off' => esc_html__( 'Off', 'everest-forms' ), + 'on' => esc_html__( 'On', 'everest-forms' ), + ), + ), + ); + return $fields; + } + + /** + * Advanced Fields Settings. + * + * @since xx.xx.xx + */ + public function get_advanced_fields_config() { + $advanced_fields = array( + 'link_options' => false, + 'text' => false, + 'borders' => false, + 'box_shadow' => false, + 'button' => false, + 'filters' => false, + 'fonts' => false, + ); + + return $advanced_fields; + } + + /** + * Render the module on frontend. + * + * @since 0 + * + * @param array $unprocessed_props Array of unprocessed Properties. + * @param string $content Contents being processed from the prop. + * @param string $render_slug The slug of rendering module for rendering output. + */ + public function render( $unprocessed_props, $content, $render_slug ) { + + } +} + + new EVF_Divi_Module(); From fa464288dcf3c82331fdd2e20d33b7462af32fa7 Mon Sep 17 00:00:00 2001 From: riteelama Date: Wed, 14 Aug 2024 12:13:53 +0545 Subject: [PATCH 02/17] Add - Form compatible with divi builder in the frontend section --- dist/divibuilder.min.js.LICENSE.txt | 19 ++++++++ includes/class-everest-forms.php | 6 +-- .../class-evf-divi-builder.php} | 44 +++++++++++++++---- src/divibuilder/App.jsx | 11 +++++ src/divibuilder/DiviBuilder.jsx | 14 ++++++ src/divibuilder/index.jsx | 12 +++++ webpack.config.js | 9 +++- 7 files changed, 103 insertions(+), 12 deletions(-) create mode 100644 dist/divibuilder.min.js.LICENSE.txt rename includes/{divi/class-evf-divi-module.php => divibuilder/class-evf-divi-builder.php} (69%) create mode 100644 src/divibuilder/App.jsx create mode 100644 src/divibuilder/DiviBuilder.jsx create mode 100644 src/divibuilder/index.jsx diff --git a/dist/divibuilder.min.js.LICENSE.txt b/dist/divibuilder.min.js.LICENSE.txt new file mode 100644 index 000000000..122393a3f --- /dev/null +++ b/dist/divibuilder.min.js.LICENSE.txt @@ -0,0 +1,19 @@ +/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/includes/class-everest-forms.php b/includes/class-everest-forms.php index 9a08b0fed..ee7e0db38 100644 --- a/includes/class-everest-forms.php +++ b/includes/class-everest-forms.php @@ -164,7 +164,7 @@ public function __construct() { $this->init_hooks(); add_action( 'plugins_loaded', array( $this, 'objects' ), 1 ); - add_action( 'et_builder_ready', array( $this, 'everest_form_register_builder_ready' ) ); + add_action( 'et_builder_ready', array( $this, 'everest_form_register_divi_builder' ) ); do_action( 'everest_forms_loaded' ); } @@ -494,11 +494,11 @@ public function form_fields() { * * @since xx.xx.xx */ - public function everest_form_register_builder_ready() { + public function everest_form_register_divi_builder() { if ( ! class_exists( 'ET_Builder_Module' ) ) { return; } - include_once EVF_ABSPATH . 'includes/divi/class-evf-divi-module.php'; + include_once EVF_ABSPATH . 'includes/divibuilder/class-evf-divi-builder.php'; } } diff --git a/includes/divi/class-evf-divi-module.php b/includes/divibuilder/class-evf-divi-builder.php similarity index 69% rename from includes/divi/class-evf-divi-module.php rename to includes/divibuilder/class-evf-divi-builder.php index 6ee07dabf..e1bcecb5c 100644 --- a/includes/divi/class-evf-divi-module.php +++ b/includes/divibuilder/class-evf-divi-builder.php @@ -14,14 +14,14 @@ * * @since xx.xx.xx */ -class EVF_Divi_Module extends \ET_Builder_Module { +class EVF_Divi_Builder extends \ET_Builder_Module { /** * Module slug. * * @since xx.xx.xx * @var string */ - public $slug = 'everest_forms_module'; + public $slug = 'everest_forms_divi_builder'; /** * Whether module support visual builder. e.g `on` or `off`. @@ -46,6 +46,8 @@ public function init() { ), ), ); + + add_action( 'wp_enqueue_scripts', array( $this, 'load_divi_builder_scripts' ) ); } /** @@ -57,15 +59,16 @@ public function init() { */ public function get_fields() { - $forms = evf_get_all_forms(); + $forms = evf_get_all_forms(); + $fields = array( 'form_id' => array( - 'label' => esc_html__( 'Form', 'everest-forms' ), + 'label' => esc_html__( 'Select Form', 'everest-forms' ), 'type' => 'select', 'option_category' => 'basic_option', 'toggle_slug' => 'main_content', 'options' => $forms, - 'default' => '0', + 'default' => '5', ), 'show_title' => array( 'label' => esc_html__( 'Show Title', 'everest-forms' ), @@ -113,15 +116,40 @@ public function get_advanced_fields_config() { /** * Render the module on frontend. * - * @since 0 + * @since xx.xx.xx * * @param array $unprocessed_props Array of unprocessed Properties. * @param string $content Contents being processed from the prop. * @param string $render_slug The slug of rendering module for rendering output. + * + * @return string HTMl content for rendering. */ public function render( $unprocessed_props, $content, $render_slug ) { + $form_id = isset( $this->props['form_id'] ) ? $this->props['form_id'] : '5'; + $divi_shortcode = sprintf( "[everest_form id='%s']", $form_id ); + $output = sprintf( "
", 'everest-forms-divi-builder' ); + $output .= do_shortcode( $divi_shortcode ); + $output .= sprintf( '
' ); + + return $output; } -} - new EVF_Divi_Module(); + /** + * Function to enqueue the divi builder JS. + * + * @since xx.xx.xx + */ + public function load_divi_builder_scripts() { + wp_enqueue_script( 'everest-forms-divi-builder' ); + $enqueue_script = array( 'wp-element', 'react', 'react-dom' ); + wp_register_script( + 'everest-forms-divi-builder', + evf()->plugin_url() . '/dist/divibuilder.min.js', + $enqueue_script, + evf()->version, + true + ); + } +} +new EVF_Divi_Builder(); diff --git a/src/divibuilder/App.jsx b/src/divibuilder/App.jsx new file mode 100644 index 000000000..95a970e84 --- /dev/null +++ b/src/divibuilder/App.jsx @@ -0,0 +1,11 @@ +import React from "react"; + +import DiviBuilder from "./DiviBuilder"; + +const App = () => { + return ( + + ); +}; + +export default App; diff --git a/src/divibuilder/DiviBuilder.jsx b/src/divibuilder/DiviBuilder.jsx new file mode 100644 index 000000000..a7876db11 --- /dev/null +++ b/src/divibuilder/DiviBuilder.jsx @@ -0,0 +1,14 @@ +// External Dependencies +import React, { Component} from 'react'; + +class DiviBuilder extends Component { + + static slug = 'everest_forms_divi_builder'; + render() { + return ( +
+ ); + } +} + +export default DiviBuilder; diff --git a/src/divibuilder/index.jsx b/src/divibuilder/index.jsx new file mode 100644 index 000000000..272639504 --- /dev/null +++ b/src/divibuilder/index.jsx @@ -0,0 +1,12 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App"; +(function () { + const container = document.getElementById("everest-forms-divi-builder"); + if (!container) return; + + const root = ReactDOM.createRoot(container); + if (root) { + root.render(); + } +})(); diff --git a/webpack.config.js b/webpack.config.js index 66a168d9a..b57bb6f54 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,6 +17,10 @@ const webpackConfig = { process.cwd(), './src/blocks/index.js', ), + "divibuilder": resolve( + process.cwd(), + './src/divibuilder/index.jsx', + ), }, output: { path: resolve(process.cwd(), 'dist'), @@ -27,7 +31,7 @@ const webpackConfig = { module: { rules: [ { - test: /.js$/, + test: /\.(js|jsx|ts|tsx)$/, loader: "babel-loader", exclude: /node_modules/ }, @@ -65,6 +69,9 @@ const webpackConfig = { "@wordpress/server-side-render": ["wp", "serverSideRender"], react: ["React"], }, + resolve: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, }; if (webpackConfig.mode !== "production") { From d8cbaf06ef0ef8d58ad668412d1cb136434ce467 Mon Sep 17 00:00:00 2001 From: riteelama Date: Thu, 15 Aug 2024 12:30:11 +0545 Subject: [PATCH 03/17] Add - Empty form image if no form selected --- includes/divibuilder/class-evf-divi-builder.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/divibuilder/class-evf-divi-builder.php b/includes/divibuilder/class-evf-divi-builder.php index e1bcecb5c..059f226bd 100644 --- a/includes/divibuilder/class-evf-divi-builder.php +++ b/includes/divibuilder/class-evf-divi-builder.php @@ -59,7 +59,9 @@ public function init() { */ public function get_fields() { - $forms = evf_get_all_forms(); + $forms = evf_get_all_forms(); + $default_form = array( esc_html__( 'Select Form', 'everest-forms' ) ); + $forms = $default_form + $forms; $fields = array( 'form_id' => array( @@ -125,7 +127,14 @@ public function get_advanced_fields_config() { * @return string HTMl content for rendering. */ public function render( $unprocessed_props, $content, $render_slug ) { - $form_id = isset( $this->props['form_id'] ) ? $this->props['form_id'] : '5'; + $form_id = isset( $this->props['form_id'] ) ? $this->props['form_id'] : '0'; + + if ( '0' === $form_id ) { + $empty_output = sprintf( "
" ); + $empty_output .= sprintf( "", plugin_dir_url( EVF_PLUGIN_FILE ) . 'assets/images/icons/Everest-forms-Logo.png' ); + $empty_output .= sprintf( '
' ); + return $empty_output; + } $divi_shortcode = sprintf( "[everest_form id='%s']", $form_id ); $output = sprintf( "
", 'everest-forms-divi-builder' ); From 560e368afed60eab41e17ae355e520daefae7422 Mon Sep 17 00:00:00 2001 From: riteelama Date: Fri, 30 Aug 2024 17:46:50 +0545 Subject: [PATCH 04/17] Update - Hook inside init hook --- includes/class-everest-forms.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-everest-forms.php b/includes/class-everest-forms.php index ee7e0db38..7072043b7 100644 --- a/includes/class-everest-forms.php +++ b/includes/class-everest-forms.php @@ -164,8 +164,6 @@ public function __construct() { $this->init_hooks(); add_action( 'plugins_loaded', array( $this, 'objects' ), 1 ); - add_action( 'et_builder_ready', array( $this, 'everest_form_register_divi_builder' ) ); - do_action( 'everest_forms_loaded' ); } @@ -182,6 +180,7 @@ private function init_hooks() { add_action( 'init', array( $this, 'form_fields' ), 0 ); add_action( 'init', array( 'EVF_Shortcodes', 'init' ), 0 ); add_action( 'switch_blog', array( $this, 'wpdb_table_fix' ), 0 ); + add_action( 'et_builder_ready', array( $this, 'everest_form_register_divi_builder' ) ); } /** From 01b84c48f4e5ec0f1a36220121c15f3f211e797d Mon Sep 17 00:00:00 2001 From: Deependra Chaudhary Date: Mon, 9 Sep 2024 11:58:32 +0545 Subject: [PATCH 05/17] Approached - changed --- dist/blocks.min.js | 8 +- dist/blocks.min.js.map | 1 + dist/dashboard.min.js | 8 +- dist/dashboard.min.js.map | 1 + dist/divibuilder.min.js | 1 + dist/divibuilder.min.js.map | 1 + dist/reactPlayerPreview.min.js | 2 +- dist/reactPlayerPreview.min.js.map | 1 + .../divibuilder/class-evf-divi-builder.php | 92 +- includes/divibuilder/loader.php | 16 + package-lock.json | 1216 +++++++---------- src/divibuilder/index.jsx | 15 +- .../modules/EverestFormsModule.jsx | 22 + webpack.config.js | 2 +- 14 files changed, 597 insertions(+), 789 deletions(-) create mode 100644 dist/blocks.min.js.map create mode 100644 dist/dashboard.min.js.map create mode 100644 dist/divibuilder.min.js create mode 100644 dist/divibuilder.min.js.map create mode 100644 dist/reactPlayerPreview.min.js.map create mode 100644 includes/divibuilder/loader.php create mode 100644 src/divibuilder/modules/EverestFormsModule.jsx diff --git a/dist/blocks.min.js b/dist/blocks.min.js index 63bf022ed..30b26bae3 100644 --- a/dist/blocks.min.js +++ b/dist/blocks.min.js @@ -1,5 +1,5 @@ /*! For license information please see blocks.min.js.LICENSE.txt */ -(()=>{var e={8679:(e,t,r)=>{"use strict";var n=r(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var o=p(r);o&&o!==h&&e(t,o,n)}var a=c(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case m:case l:return e;default:return t}}case o:return t}}}function k(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},1296:(e,t,r)=>{"use strict";e.exports=r(6103)},8554:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object AsyncFunction]",s="[object Function]",l="[object GeneratorFunction]",u="[object Null]",c="[object Object]",d="[object Proxy]",f="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[i]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m[s]=m["[object Map]"]=m["[object Number]"]=m[c]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object WeakMap]"]=!1;var g,v,y,b="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,x="object"==typeof self&&self&&self.Object===Object&&self,w=b||x||Function("return this")(),k=t&&!t.nodeType&&t,S=k&&e&&!e.nodeType&&e,_=S&&S.exports===k,C=_&&b.process,E=function(){try{return S&&S.require&&S.require("util").types||C&&C.binding&&C.binding("util")}catch(e){}}(),P=E&&E.isTypedArray,T=Array.prototype,z=Function.prototype,A=Object.prototype,R=w["__core-js_shared__"],M=z.toString,F=A.hasOwnProperty,j=(g=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",B=A.toString,L=M.call(Object),D=RegExp("^"+M.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=_?w.Buffer:void 0,I=w.Symbol,O=w.Uint8Array,N=($&&$.allocUnsafe,v=Object.getPrototypeOf,y=Object,function(e){return v(y(e))}),V=Object.create,W=A.propertyIsEnumerable,U=T.splice,H=I?I.toStringTag:void 0,q=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=$?$.isBuffer:void 0,X=Math.max,K=Date.now,G=fe(w,"Map"),Q=fe(Object,"create"),Z=function(){function e(){}return function(t){if(!_e(t))return{};if(V)return V(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function J(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},ee.prototype.set=function(e,t){var r=this.__data__,n=ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(G||ee),string:new J}},te.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return de(this,e).get(e)},te.prototype.has=function(e){return de(this,e).has(e)},te.prototype.set=function(e,t){var r=de(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!G||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function se(e){return null==e?void 0===e?f:u:H&&H in Object(e)?function(e){var t=F.call(e,H),r=e[H];try{e[H]=void 0;var n=!0}catch(e){}var o=B.call(e);return n&&(t?e[H]=r:delete e[H]),o}(e):function(e){return B.call(e)}(e)}function le(e){return Ce(e)&&se(e)==i}function ue(e,t,r,n,o){e!==t&&function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}}(t,(function(i,a){if(o||(o=new re),_e(i))!function(e,t,r,n,o,i,a){var s=me(e,r),l=me(t,r),u=a.get(l);if(u)ne(e,r,u);else{var d,f,p,h,m,g=i?i(s,l,r+"",e,t,a):void 0,v=void 0===g;if(v){var y=be(l),b=!y&&we(l),x=!y&&!b&&Ee(l);g=l,y||b||x?be(s)?g=s:Ce(m=s)&&xe(m)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ce);function ve(e,t){return e===t||e!=e&&t!=t}var ye=le(function(){return arguments}())?le:function(e){return Ce(e)&&F.call(e,"callee")&&!W.call(e,"callee")},be=Array.isArray;function xe(e){return null!=e&&Se(e.length)&&!ke(e)}var we=Y||function(){return!1};function ke(e){if(!_e(e))return!1;var t=se(e);return t==s||t==l||t==a||t==d}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function _e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ce(e){return null!=e&&"object"==typeof e}var Ee=P?function(e){return function(t){return e(t)}}(P):function(e){return Ce(e)&&Se(e.length)&&!!m[se(e)]};function Pe(e){return xe(e)?function(e,t){var r=be(e),n=!r&&ye(e),o=!r&&!n&&we(e),i=!r&&!n&&!o&&Ee(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Te.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!_e(r))return!1;var n=typeof t;return!!("number"==n?xe(r)&&pe(t,r.length):"string"==n&&t in r)&&ve(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++r{"use strict";var n=r(1159),o=r(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r