EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor - Version 2.7.2

Version Description

Download this release

Release Info

Developer Asif2BD
Plugin Icon wp plugin EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.7.1 to 2.7.2

Files changed (43) hide show
  1. EmbedPress/CoreLegacy.php +3 -9
  2. EmbedPress/Elementor/Widgets/Embedpress_Elementor.php +89 -13
  3. EmbedPress/Ends/Back/Handler.php +2 -3
  4. EmbedPress/RestAPI.php +5 -15
  5. EmbedPress/Shortcode.php +11 -11
  6. Gutenberg/README.md +0 -25
  7. Gutenberg/dist/blocks.build.js +1 -1
  8. Gutenberg/dist/blocks.editor.build.css +1 -0
  9. Gutenberg/dist/blocks.style.build.css +1 -0
  10. Gutenberg/package.json +0 -14
  11. Gutenberg/src/blocks.js +1 -0
  12. Gutenberg/src/common/Iframe.js +7 -4
  13. Gutenberg/src/common/core-embeds.js +2 -2
  14. Gutenberg/src/common/embed-placeholder.js +1 -1
  15. Gutenberg/src/common/embed-wrap.js +28 -0
  16. Gutenberg/src/common/icons.js +27 -3
  17. Gutenberg/src/document/edit.js +1 -2
  18. Gutenberg/src/embedpress/edit.js +115 -0
  19. Gutenberg/src/embedpress/editor.scss +10 -0
  20. Gutenberg/src/embedpress/index.js +100 -0
  21. Gutenberg/src/embedpress/index.php +21 -0
  22. Gutenberg/src/embedpress/style.scss +9 -0
  23. Gutenberg/src/google-docs/edit.js +2 -3
  24. Gutenberg/src/google-forms/edit.js +1 -2
  25. Gutenberg/src/google-maps/edit.js +1 -4
  26. Gutenberg/src/google-sheets/edit.js +1 -2
  27. Gutenberg/src/google-slides/edit.js +1 -1
  28. Gutenberg/src/init.php +13 -7
  29. Gutenberg/src/wistia/edit.js +1 -2
  30. Gutenberg/src/youtube/edit.js +1 -1
  31. assets/css/embedpress-elementor.css +6 -0
  32. embedpress.php +4 -4
  33. includes.php +2 -2
  34. readme.txt +17 -4
  35. vendor/autoload.php +1 -1
  36. vendor/composer/ClassLoader.php +3 -3
  37. vendor/composer/InstalledVersions.php +0 -218
  38. vendor/composer/autoload_classmap.php +0 -1
  39. vendor/composer/autoload_real.php +5 -7
  40. vendor/composer/autoload_static.php +3 -8
  41. vendor/composer/installed.json +66 -71
  42. vendor/composer/installed.php +0 -33
  43. vendor/composer/platform_check.php +0 -26
EmbedPress/CoreLegacy.php CHANGED
@@ -41,11 +41,9 @@ class CoreLegacy
41
 
42
  /**
43
  * An instance of the plugin loader.
44
- *
45
  * @since 1.0.0
46
  * @access protected
47
- *
48
- * @var \EmbedPress\Loader $pluginVersion The version of the plugin.
49
  */
50
  protected $loaderInstance;
51
 
@@ -105,9 +103,9 @@ class CoreLegacy
105
  *
106
  * @since 1.0.0
107
  *
108
- * @return \EmbedPress\Loader
109
  */
110
- public function getLoader()
111
  {
112
  return $this->loaderInstance;
113
  }
@@ -240,10 +238,6 @@ class CoreLegacy
240
  */
241
  public static function canServiceProviderBeResponsive($serviceProviderAlias)
242
  {
243
- $providers = [
244
-
245
- ];
246
-
247
  return in_array($serviceProviderAlias, [
248
  "dailymotion",
249
  "kickstarter",
41
 
42
  /**
43
  * An instance of the plugin loader.
 
44
  * @since 1.0.0
45
  * @access protected
46
+ * @var Loader $pluginVersion The version of the plugin.
 
47
  */
48
  protected $loaderInstance;
49
 
103
  *
104
  * @since 1.0.0
105
  *
106
+ * @return Loader
107
  */
108
+ public function getLoader()
109
  {
110
  return $this->loaderInstance;
111
  }
238
  */
239
  public static function canServiceProviderBeResponsive($serviceProviderAlias)
240
  {
 
 
 
 
241
  return in_array($serviceProviderAlias, [
242
  "dailymotion",
243
  "kickstarter",
EmbedPress/Elementor/Widgets/Embedpress_Elementor.php CHANGED
@@ -4,6 +4,7 @@ namespace EmbedPress\Elementor\Widgets;
4
 
5
 
6
  use \Elementor\Controls_Manager as Controls_Manager;
 
7
  use \Elementor\Group_Control_Css_Filter;
8
  use \Elementor\Widget_Base as Widget_Base;
9
  use \EmbedPress\Shortcode;
@@ -113,9 +114,11 @@ class Embedpress_Elementor extends Widget_Base {
113
  $this->add_control(
114
  'embedpress_elementor_aspect_ratio',
115
  [
116
- 'label' => __( 'Aspect Ratio', 'elementor' ),
 
117
  'type' => Controls_Manager::SELECT,
118
  'options' => [
 
119
  '169' => '16:9',
120
  '219' => '21:9',
121
  '43' => '4:3',
@@ -123,21 +126,89 @@ class Embedpress_Elementor extends Widget_Base {
123
  '11' => '1:1',
124
  '916' => '9:16',
125
  ],
126
- 'default' => '169',
127
  'prefix_class' => 'embedpress-aspect-ratio-',
128
  'frontend_available' => true,
129
  ]
130
  );
131
 
132
-
133
- $this->add_group_control(
134
- Group_Control_Css_Filter::get_type(),
135
- [
136
- 'name' => 'embedpress_elementor_css_filters',
137
- 'selector' => '{{WRAPPER}} .embedpress-elements-wrapper .embedpress-wrapper',
138
- ]
139
- );
140
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  $this->end_controls_section();
142
 
143
 
@@ -145,12 +216,17 @@ class Embedpress_Elementor extends Widget_Base {
145
 
146
  protected function render() {
147
  $settings = $this->get_settings_for_display();
148
- $embed_content = Shortcode::parseContent( $settings['embedpress_embeded_link'], true );
 
 
 
 
 
149
  $embed = apply_filters( 'embedpress_elementor_embed', $embed_content, $settings );
150
  $content = is_object( $embed ) ? $embed->embed : $embed;
151
 
152
  ?>
153
- <div class="embedpress-elements-wrapper embedpress-fit-aspect-ratio">
154
  <?php echo $content; ?>
155
  </div>
156
  <?php
4
 
5
 
6
  use \Elementor\Controls_Manager as Controls_Manager;
7
+ use Elementor\Group_Control_Background;
8
  use \Elementor\Group_Control_Css_Filter;
9
  use \Elementor\Widget_Base as Widget_Base;
10
  use \EmbedPress\Shortcode;
114
  $this->add_control(
115
  'embedpress_elementor_aspect_ratio',
116
  [
117
+ 'label' => __( 'Aspect Ratio', 'embedpress' ),
118
+ 'description' => __( 'Good for any video. You may turn it off for other embed type.', 'embedpress' ),
119
  'type' => Controls_Manager::SELECT,
120
  'options' => [
121
+ 0 => __('None'),
122
  '169' => '16:9',
123
  '219' => '21:9',
124
  '43' => '4:3',
126
  '11' => '1:1',
127
  '916' => '9:16',
128
  ],
129
+ 'default' => 0,
130
  'prefix_class' => 'embedpress-aspect-ratio-',
131
  'frontend_available' => true,
132
  ]
133
  );
134
 
135
+ $this->add_control(
136
+ 'width',
137
+ [
138
+ 'label' => __( 'Width', 'embedpress' ),
139
+ 'type' => Controls_Manager::SLIDER,
140
+ 'size_units' => [ 'px' ],
141
+ 'range' => [
142
+ 'px' => [
143
+ 'min' => 0,
144
+ 'max' => 1500,
145
+ 'step' => 5,
146
+ ],
147
+ ],
148
+ 'default' => [
149
+ 'unit' => 'px',
150
+ 'size' => 600,
151
+ ]
152
+ ]
153
+ );
154
+ $this->add_control(
155
+ 'height',
156
+ [
157
+ 'label' => __( 'Height', 'embedpress' ),
158
+ 'type' => Controls_Manager::SLIDER,
159
+ 'size_units' => [ 'px' ],
160
+ 'range' => [
161
+ 'px' => [
162
+ 'min' => 0,
163
+ 'max' => 1500,
164
+ 'step' => 5,
165
+ ],
166
+ ],
167
+ 'default' => [
168
+ 'unit' => 'px',
169
+ 'size' => 400,
170
+ ]
171
+ ]
172
+ );
173
+
174
+ $this->add_responsive_control(
175
+ 'margin',
176
+ [
177
+ 'label' => __( 'Margin', 'embedpress' ),
178
+ 'type' => Controls_Manager::DIMENSIONS,
179
+ 'size_units' => [ 'px', '%', 'em' ],
180
+ 'selectors' => [
181
+ '{{WRAPPER}} .embedpress-elements-wrapper .embedpress-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
182
+ ],
183
+ ]
184
+ );
185
+ $this->add_responsive_control(
186
+ 'padding',
187
+ [
188
+ 'label' => __( 'Padding', 'embedpress' ),
189
+ 'type' => Controls_Manager::DIMENSIONS,
190
+ 'size_units' => [ 'px', '%', 'em' ],
191
+ 'selectors' => [
192
+ '{{WRAPPER}} .embedpress-elements-wrapper .embedpress-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
193
+ ],
194
+ ]
195
+ );
196
+ $this->add_group_control(
197
+ Group_Control_Background::get_type(),
198
+ [
199
+ 'name' => 'background',
200
+ 'label' => __( 'Background', 'embedpress' ),
201
+ 'types' => [ 'classic', 'gradient' ],
202
+ 'selector' => '{{WRAPPER}} .embedpress-elements-wrapper .embedpress-wrapper, {{WRAPPER}} .embedpress-fit-aspect-ratio .embedpress-wrapper iframe',
203
+ ]
204
+ );
205
+ $this->add_group_control(
206
+ Group_Control_Css_Filter::get_type(),
207
+ [
208
+ 'name' => 'embedpress_elementor_css_filters',
209
+ 'selector' => '{{WRAPPER}} .embedpress-elements-wrapper .embedpress-wrapper',
210
+ ]
211
+ );
212
  $this->end_controls_section();
213
 
214
 
216
 
217
  protected function render() {
218
  $settings = $this->get_settings_for_display();
219
+ $height = (!empty( $settings['height']) && !empty( $settings['height']['size'] ))
220
+ ? $settings['height']['size'] : null;
221
+ $width = (!empty( $settings['width']) && !empty( $settings['width']['size'] ))
222
+ ? $settings['width']['size'] : null;
223
+
224
+ $embed_content = Shortcode::parseContent( $settings['embedpress_embeded_link'], true, [ 'height'=> $height, 'width'=>$width ] );
225
  $embed = apply_filters( 'embedpress_elementor_embed', $embed_content, $settings );
226
  $content = is_object( $embed ) ? $embed->embed : $embed;
227
 
228
  ?>
229
+ <div class="embedpress-elements-wrapper <?php echo !empty( $settings['embedpress_elementor_aspect_ratio']) ? 'embedpress-fit-aspect-ratio': ''; ?>">
230
  <?php echo $content; ?>
231
  </div>
232
  <?php
EmbedPress/Ends/Back/Handler.php CHANGED
@@ -136,9 +136,8 @@ class Handler extends EndHandlerAbstract {
136
  $embera = new Embera([], Shortcode::get_collection());
137
 
138
  $urlInfo = $embera->getUrlData( $response['url'] );
139
- if ( isset( $urlInfo[$response['url']] ) ) {
140
- $urlInfo = (object)$urlInfo[$response['url']];
141
- $response['canBeResponsive'] = Core::canServiceProviderBeResponsive( $urlInfo->provider_alias );
142
  }
143
  }
144
 
136
  $embera = new Embera([], Shortcode::get_collection());
137
 
138
  $urlInfo = $embera->getUrlData( $response['url'] );
139
+ if ( isset( $urlInfo[$response['url']] ) && $urlInfo[$response['url']]['provider_name'] ) {
140
+ $response['canBeResponsive'] = Core::canServiceProviderBeResponsive( strtolower( $urlInfo[$response['url']]['provider_name']) );
 
141
  }
142
  }
143
 
EmbedPress/RestAPI.php CHANGED
@@ -28,26 +28,16 @@ class RestAPI
28
  public static function oembed($request)
29
  {
30
  $url = esc_url_raw($request->get_param('url'));
 
 
 
 
31
 
32
  if (empty($url)) {
33
  return new WP_ErrorAlias('embedpress_invalid_url', 'Invalid Embed URL', ['status' => 404]);
34
  }
35
 
36
- $config = [];
37
-
38
- $additionalServiceProviders = Core::getAdditionalServiceProviders();
39
- if ( ! empty($additionalServiceProviders)) {
40
- foreach ($additionalServiceProviders as $serviceProviderClassName => $serviceProviderUrls) {
41
- Shortcode::addServiceProvider($serviceProviderClassName, $serviceProviderUrls);
42
- }
43
- }
44
- $embera = new Embera($config, Shortcode::get_collection());
45
- $urlInfo = $embera->getUrlData($url);
46
- if (isset($urlInfo[$url])) {
47
- $urlInfo = (object)$urlInfo[$url];
48
- $response['canBeResponsive'] = Core::canServiceProviderBeResponsive($urlInfo->provider_alias);
49
- }
50
-
51
  if (empty($urlInfo)) {
52
  return new WP_ErrorAlias('embedpress_invalid_url', 'Invalid Embed URL', ['status' => 404]);
53
  }
28
  public static function oembed($request)
29
  {
30
  $url = esc_url_raw($request->get_param('url'));
31
+ $atts = [
32
+ 'width' => intval( $request->get_param('width')),
33
+ 'height' => intval( $request->get_param('height')),
34
+ ];
35
 
36
  if (empty($url)) {
37
  return new WP_ErrorAlias('embedpress_invalid_url', 'Invalid Embed URL', ['status' => 404]);
38
  }
39
 
40
+ $urlInfo = Shortcode::parseContent( $url, true, $atts);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  if (empty($urlInfo)) {
42
  return new WP_ErrorAlias('embedpress_invalid_url', 'Invalid Embed URL', ['status' => 404]);
43
  }
EmbedPress/Shortcode.php CHANGED
@@ -117,7 +117,6 @@ class Shortcode {
117
  self::get_modified_provider( self::get_access_token() ) );
118
  }
119
  $emberaInstanceSettings = [
120
- 'params' => [],
121
  ];
122
 
123
  $content_uid = md5( $content );
@@ -125,12 +124,12 @@ class Shortcode {
125
  $attributes = self::parseContentAttributes( $customAttributes, $content_uid );
126
  if ( isset( $attributes[ 'width' ] ) || isset( $attributes[ 'height' ] ) ) {
127
  if ( isset( $attributes[ 'width' ] ) ) {
128
- $emberaInstanceSettings[ 'params' ][ 'width' ] = $attributes[ 'width' ];
129
  unset( $attributes[ 'width' ] );
130
  }
131
 
132
  if ( isset( $attributes[ 'height' ] ) ) {
133
- $emberaInstanceSettings[ 'params' ][ 'height' ] = $attributes[ 'height' ];
134
  unset( $attributes[ 'height' ] );
135
  }
136
  }
@@ -287,10 +286,10 @@ class Shortcode {
287
  unset( $embedTemplate, $serviceProvider );
288
 
289
  // This assure that the iframe has the same dimensions the user wants to
290
- if ( isset( $emberaInstanceSettings[ 'params' ][ 'width' ] ) || isset( $emberaInstanceSettings[ 'params' ][ 'height' ] ) ) {
291
- if ( isset( $emberaInstanceSettings[ 'params' ][ 'width' ] ) && isset( $emberaInstanceSettings[ 'params' ][ 'height' ] ) ) {
292
- $customWidth = (int)$emberaInstanceSettings[ 'params' ][ 'width' ];
293
- $customHeight = (int)$emberaInstanceSettings[ 'params' ][ 'height' ];
294
  } else {
295
  if ( preg_match( '~width="(\d+)"|width\s+:\s+(\d+)~i', $parsedContent, $matches ) ) {
296
  $iframeWidth = (int)$matches[ 1 ];
@@ -303,11 +302,11 @@ class Shortcode {
303
  if ( isset( $iframeWidth ) && isset( $iframeHeight ) && $iframeWidth > 0 && $iframeHeight > 0 ) {
304
  $iframeRatio = ceil( $iframeWidth / $iframeHeight );
305
 
306
- if ( isset( $emberaInstanceSettings[ 'params' ][ 'width' ] ) ) {
307
- $customWidth = (int)$emberaInstanceSettings[ 'params' ][ 'width' ];
308
  $customHeight = ceil( $customWidth / $iframeRatio );
309
  } else {
310
- $customHeight = (int)$emberaInstanceSettings[ 'params' ][ 'height' ];
311
  $customWidth = $iframeRatio * $customHeight;
312
  }
313
  }
@@ -320,6 +319,8 @@ class Shortcode {
320
  }
321
 
322
  if ( preg_match( '~height="(\d+)"~i', $parsedContent ) ) {
 
 
323
  $parsedContent = preg_replace( '~height="(\d+)"~i', 'height="' . $customHeight . '"',
324
  $parsedContent );
325
  }
@@ -409,7 +410,6 @@ class Shortcode {
409
  }
410
  }
411
  }
412
-
413
  return $customAttributes;
414
  }
415
 
117
  self::get_modified_provider( self::get_access_token() ) );
118
  }
119
  $emberaInstanceSettings = [
 
120
  ];
121
 
122
  $content_uid = md5( $content );
124
  $attributes = self::parseContentAttributes( $customAttributes, $content_uid );
125
  if ( isset( $attributes[ 'width' ] ) || isset( $attributes[ 'height' ] ) ) {
126
  if ( isset( $attributes[ 'width' ] ) ) {
127
+ $emberaInstanceSettings[ 'maxwidth' ] = $attributes[ 'width' ];
128
  unset( $attributes[ 'width' ] );
129
  }
130
 
131
  if ( isset( $attributes[ 'height' ] ) ) {
132
+ $emberaInstanceSettings[ 'maxheight' ] = $attributes[ 'height' ];
133
  unset( $attributes[ 'height' ] );
134
  }
135
  }
286
  unset( $embedTemplate, $serviceProvider );
287
 
288
  // This assure that the iframe has the same dimensions the user wants to
289
+ if ( isset( $emberaInstanceSettings[ 'width' ] ) || isset( $emberaInstanceSettings[ 'height' ] ) ) {
290
+ if ( isset( $emberaInstanceSettings[ 'width' ] ) && isset( $emberaInstanceSettings[ 'height' ] ) ) {
291
+ $customWidth = (int)$emberaInstanceSettings[ 'width' ];
292
+ $customHeight = (int)$emberaInstanceSettings[ 'height' ];
293
  } else {
294
  if ( preg_match( '~width="(\d+)"|width\s+:\s+(\d+)~i', $parsedContent, $matches ) ) {
295
  $iframeWidth = (int)$matches[ 1 ];
302
  if ( isset( $iframeWidth ) && isset( $iframeHeight ) && $iframeWidth > 0 && $iframeHeight > 0 ) {
303
  $iframeRatio = ceil( $iframeWidth / $iframeHeight );
304
 
305
+ if ( isset( $emberaInstanceSettings[ 'width' ] ) ) {
306
+ $customWidth = (int)$emberaInstanceSettings[ 'width' ];
307
  $customHeight = ceil( $customWidth / $iframeRatio );
308
  } else {
309
+ $customHeight = (int)$emberaInstanceSettings[ 'height' ];
310
  $customWidth = $iframeRatio * $customHeight;
311
  }
312
  }
319
  }
320
 
321
  if ( preg_match( '~height="(\d+)"~i', $parsedContent ) ) {
322
+ error_log( 'hit parsed content custom height');
323
+ error_log( print_r( $parsedContent,1));
324
  $parsedContent = preg_replace( '~height="(\d+)"~i', 'height="' . $customHeight . '"',
325
  $parsedContent );
326
  }
410
  }
411
  }
412
  }
 
413
  return $customAttributes;
414
  }
415
 
Gutenberg/README.md DELETED
@@ -1,25 +0,0 @@
1
- This project was bootstrapped with [Create Guten Block](https://github.com/ahmadawais/create-guten-block).
2
-
3
- Below you will find some information on how to run scripts.
4
-
5
- >You can find the most recent version of this guide [here](https://github.com/ahmadawais/create-guten-block).
6
-
7
- ## 👉 `npm start`
8
- - Use to compile and run the block in development mode.
9
- - Watches for any changes and reports back any errors in your code.
10
-
11
- ## 👉 `npm run build`
12
- - Use to build production code for your block inside `dist` folder.
13
- - Runs once and reports back the gzip file sizes of the produced code.
14
-
15
- ## 👉 `npm run eject`
16
- - Use to eject your plugin out of `create-guten-block`.
17
- - Provides all the configurations so you can customize the project as you want.
18
- - It's a one-way street, `eject` and you have to maintain everything yourself.
19
- - You don't normally have to `eject` a project because by ejecting you lose the connection with `create-guten-block` and from there onwards you have to update and maintain all the dependencies on your own.
20
-
21
- ---
22
-
23
- ###### Feel free to tweet and say 👋 at me [@MrAhmadAwais](https://twitter.com/mrahmadawais/)
24
-
25
- [![npm](https://img.shields.io/npm/v/create-guten-block.svg?style=flat-square)](https://www.npmjs.com/package/create-guten-block) [![npm](https://img.shields.io/npm/dt/create-guten-block.svg?style=flat-square&label=downloads)](https://www.npmjs.com/package/create-guten-block) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/ahmadawais/create-guten-block) [![Tweet for help](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social&label=Tweet%20@MrAhmadAwais)](https://twitter.com/mrahmadawais/) [![GitHub stars](https://img.shields.io/github/stars/ahmadawais/create-guten-block.svg?style=social&label=Stars)](https://github.com/ahmadawais/create-guten-block/stargazers) [![GitHub followers](https://img.shields.io/github/followers/ahmadawais.svg?style=social&label=Follow)](https://github.com/ahmadawais?tab=followers)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Gutenberg/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return p}),n.d(t,"e",function(){return m}),n.d(t,"h",function(){return d}),n.d(t,"i",function(){return f}),n.d(t,"j",function(){return h}),n.d(t,"a",function(){return w});var r=wp.components,i=r.G,l=r.Path,o=(r.Polygon,r.SVG),a=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#2196F3"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(l,{style:{fill:"#BBDEFB"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(l,{style:{fill:"#1565C0"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(l,{style:{fill:"#E3F2FD"},d:"M 15 23 L 33 23 L 33 25 L 15 25 Z "}),wp.element.createElement(l,{style:{fill:"#E3F2FD"},d:"M 15 27 L 33 27 L 33 29 L 15 29 Z "}),wp.element.createElement(l,{style:{fill:"#E3F2FD"},d:"M 15 31 L 33 31 L 33 33 L 15 33 Z "}),wp.element.createElement(l,{style:{fill:"#E3F2FD"},d:"M 15 35 L 25 35 L 25 37 L 15 37 Z "}))),s=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink","enable-background":"new 0 0 24 24",id:"Layer_2",version:"1.1",viewBox:"0 0 24 24"},wp.element.createElement(i,null,wp.element.createElement(l,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14c1.1045704,0,2-0.8954296,2-2 V6z",style:{fill:"#FFC720"}}),wp.element.createElement(l,{d:"M17,6c-0.5444336,0-1.0367432-0.2190552-1.3973999-0.5719604L21,10.8254395V6H17z",style:{fill:"url(#SVGID_1_)"}}),wp.element.createElement(l,{d:"M19,23.75H5c-1.1045532,0-2-0.8954468-2-2V22c0,1.1045532,0.8954468,2,2,2h14c1.1045532,0,2-0.8954468,2-2 v-0.25C21,22.8545532,20.1045532,23.75,19,23.75z",style:{opacity:"0.1"}}),wp.element.createElement(l,{d:"M15,0v4c0,1.1045694,0.8954306,2,2,2h4L15,0z",style:{fill:"#FFE083"}}),wp.element.createElement(l,{d:"M17,5.75c-1.1045532,0-2-0.8954468-2-2V4c0,1.1045532,0.8954468,2,2,2h4l-0.25-0.25H17z",style:{opacity:"0.1"}}),wp.element.createElement(l,{d:"M15,0H5C3.8954468,0,3,0.8953857,3,2v0.25c0-1.1046143,0.8954468-2,2-2h10",style:{fill:"#FFFFFF",opacity:"0.2"}}),wp.element.createElement(l,{d:"M15.5,9h-7C7.6728516,9,7,9.6728516,7,10.5v6C7,17.3271484,7.6728516,18,8.5,18h7 c0.8271484,0,1.5-0.6728516,1.5-1.5v-6C17,9.6728516,16.3271484,9,15.5,9z M8,15.5V11h8v4.5H8z",style:{fill:"#FFFFFF"}}),wp.element.createElement(l,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14 c1.1045704,0,2-0.8954296,2-2V6z",style:{fill:"url(#SVGID_2_)"}})),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null),wp.element.createElement(i,null)),c=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#43A047"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(l,{style:{fill:"#C8E6C9"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(l,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 31 23 L 15 23 L 15 37 L 33 37 L 33 23 Z M 17 25 L 21 25 L 21 27 L 17 27 Z M 17 29 L 21 29 L 21 31 L 17 31 Z M 17 33 L 21 33 L 21 35 L 17 35 Z M 31 35 L 23 35 L 23 33 L 31 33 Z M 31 31 L 23 31 L 23 29 L 31 29 Z M 31 27 L 23 27 L 23 25 L 31 25 Z "}))),u=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#7850C1"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(l,{style:{fill:"#C2ABE1"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(l,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 19 23 L 33 23 L 33 25 L 19 25 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 19 28 L 33 28 L 33 30 L 19 30 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 19 33 L 33 33 L 33 35 L 19 35 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 15 23 L 17 23 L 17 25 L 15 25 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 15 28 L 17 28 L 17 30 L 15 30 Z "}),wp.element.createElement(l,{style:{fill:"#E8F5E9"},d:"M 15 33 L 17 33 L 17 35 L 15 35 Z "}))),p=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#DE5245"},d:"M37,45H11c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h19l10,10v29C40,43.7,38.7,45,37,45z"}),wp.element.createElement(l,{style:{fill:"#EEA6A0"},d:"M40,13H30V3L40,13z"}),wp.element.createElement(l,{style:{fill:"#B3433A"},d:"M30,13l10,10V13H30z"}),wp.element.createElement(l,{style:{fill:"#FFFFFF"},d:"M20.5,32c-3,0-5.5-2.5-5.5-5.5c0-3,2.5-5.5,5.5-5.5s5.5,2.5,5.5,5.5C26,29.5,23.5,32,20.5,32z M20.5,23c-1.9,0-3.5,1.6-3.5,3.5s1.6,3.5,3.5,3.5s3.5-1.6,3.5-3.5S22.4,23,20.5,23z"}),wp.element.createElement(l,{style:{fill:"#FFFFFF"},d:"M27.6,29c-0.6,1.8-1.9,3.3-3.6,4.1V38h9v-9H27.6z"}))),m=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#1C9957"},d:"M 42 39 L 42 9 C 42 7.34375 40.65625 6 39 6 L 9 6 C 7.34375 6 6 7.34375 6 9 L 6 39 C 6 40.65625 7.34375 42 9 42 L 39 42 C 40.65625 42 42 40.65625 42 39 Z "}),wp.element.createElement(l,{style:{fill:"#3E7BF1"},d:"M 9 42 L 39 42 C 40.65625 42 24 26 24 26 C 24 26 7.34375 42 9 42 Z "}),wp.element.createElement(l,{style:{fill:"#CBCCC9"},d:"M 42 39 L 42 9 C 42 7.34375 26 24 26 24 C 26 24 42 40.65625 42 39 Z "}),wp.element.createElement(l,{style:{fill:"#EFEFEF"},d:"M 39 42 C 40.65625 42 42 40.65625 42 39 L 42 38.753906 L 26.246094 23 L 23 26.246094 L 38.753906 42 Z "}),wp.element.createElement(l,{style:{fill:"#FFD73D"},d:"M 42 9 C 42 7.34375 40.65625 6 39 6 L 38.753906 6 L 6 38.753906 L 6 39 C 6 40.65625 7.34375 42 9 42 L 9.246094 42 L 42 9.246094 Z "}),wp.element.createElement(l,{style:{fill:"#D73F35"},d:"M 36 2 C 30.476563 2 26 6.476563 26 12 C 26 18.8125 33.664063 21.296875 35.332031 31.851563 C 35.441406 32.53125 35.449219 33 36 33 C 36.550781 33 36.558594 32.53125 36.667969 31.851563 C 38.335938 21.296875 46 18.8125 46 12 C 46 6.476563 41.523438 2 36 2 Z "}),wp.element.createElement(l,{style:{fill:"#752622"},d:"M 39.5 12 C 39.5 13.933594 37.933594 15.5 36 15.5 C 34.066406 15.5 32.5 13.933594 32.5 12 C 32.5 10.066406 34.066406 8.5 36 8.5 C 37.933594 8.5 39.5 10.066406 39.5 12 Z "}),wp.element.createElement(l,{style:{fill:"#FFFFFF"},d:"M 14.492188 12.53125 L 14.492188 14.632813 L 17.488281 14.632813 C 17.09375 15.90625 16.03125 16.816406 14.492188 16.816406 C 12.660156 16.816406 11.175781 15.332031 11.175781 13.5 C 11.175781 11.664063 12.660156 10.179688 14.492188 10.179688 C 15.316406 10.179688 16.070313 10.484375 16.648438 10.980469 L 18.195313 9.433594 C 17.21875 8.542969 15.921875 8 14.492188 8 C 11.453125 8 8.992188 10.464844 8.992188 13.5 C 8.992188 16.535156 11.453125 19 14.492188 19 C 19.304688 19 20.128906 14.683594 19.675781 12.539063 Z "}))),d=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#FFFFFF"},d:"M 12 32 L 12 8 L 39 8 L 39 26 L 33 32 L 24 32 L 18 38 L 18 32 Z "}),wp.element.createElement(l,{style:{fill:"#8E24AA"},d:"M 9 5 L 6 12.121094 L 6 38 L 15 38 L 15 43 L 20 43 L 25 38 L 32 38 L 42 28 L 42 5 Z M 38 26 L 33 31 L 24 31 L 19 36 L 19 31 L 13 31 L 13 9 L 38 9 Z "}),wp.element.createElement(l,{style:{fill:"#8E24AA"},d:"M 32 25 L 27 25 L 27 15 L 32 15 Z "}),wp.element.createElement(l,{style:{fill:"#8E24AA"},d:"M 24 25 L 19 25 L 19 15 L 24 15 Z "}))),f=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 769 598",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(l,{style:{fill:"#148ee0"},d:"M766.89,229.17c0,0 -17.78,35.38 -106.5,91.3c-37.82,23.79 -116.36,49.1 -217.33,58.86c-54.52,5.29 -154.9,0.99 -197.96,0.99c-43.29,0 -63.13,9.12 -101.95,52.84c-143.15,161.36 -143.15,161.36 -143.15,161.36c0,0 49.57,0.24 87.01,0.24c37.43,0 271.55,13.59 375.43,-14.98c337.36,-92.72 304.46,-350.62 304.46,-350.62z"}),wp.element.createElement(l,{style:{fill:"#54bbff"},d:"M757.84,126.66c16.23,-98.97 -39.68,-126.16 -39.68,-126.16c0,0 2.36,80.57 -145.7,97.65c-131.42,15.16 -572.46,3.74 -572.46,3.74c0,0 0,0 141.74,162.54c38.39,44.06 58.76,49.17 101.92,52.22c43.16,2.89 138.42,1.86 202.99,-3.05c70.58,-5.41 171.17,-28.43 239.19,-81.11c34.88,-26.98 65.21,-64.48 72,-105.83z"}))),h=wp.element.createElement(o,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement(l,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})),w=(wp.element.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 23"},wp.element.createElement("g",null,wp.element.createElement("g",null,wp.element.createElement("path",{style:{fill:"#DA2B28"},className:"st0",d:"M55.4,3.7c-0.2-0.9-0.6-1.6-1.3-2.2c-0.7-0.6-1.4-0.9-2.3-1c-2.7-0.3-6.8-0.4-12.3-0.4 c-5.5,0-9.6,0.1-12.3,0.4c-0.9,0.1-1.6,0.5-2.3,1c-0.7,0.6-1.1,1.3-1.3,2.2c-0.4,1.7-0.6,4.3-0.6,7.8c0,3.5,0.2,6.1,0.6,7.8 c0.2,0.9,0.6,1.6,1.3,2.2c0.7,0.6,1.4,0.9,2.3,1c2.7,0.3,6.8,0.5,12.3,0.5c5.5,0,9.6-0.2,12.3-0.5c0.9-0.1,1.6-0.4,2.3-1 c0.7-0.6,1.1-1.3,1.3-2.2c0.4-1.7,0.6-4.3,0.6-7.8C56,8,55.8,5.4,55.4,3.7L55.4,3.7z M32.5,6h-2.4v12.6h-2.2V6h-2.3V3.9h6.9V6z M38.5,18.6h-2v-1.2c-0.8,0.9-1.6,1.4-2.3,1.4c-0.7,0-1.1-0.3-1.3-0.8c-0.1-0.4-0.2-0.9-0.2-1.6V7.6h2v8.1c0,0.5,0,0.7,0,0.8 c0,0.3,0.2,0.5,0.5,0.5c0.4,0,0.8-0.3,1.3-0.9V7.6h2V18.6z M46.1,15.3c0,1.1-0.1,1.8-0.2,2.2c-0.3,0.8-0.8,1.2-1.6,1.2 c-0.7,0-1.4-0.4-2.1-1.2v1.1h-2V3.9h2v4.8c0.6-0.8,1.3-1.2,2.1-1.2c0.8,0,1.3,0.4,1.6,1.2c0.1,0.4,0.2,1.1,0.2,2.2V15.3z M53.5,13.5h-4v1.9c0,1,0.3,1.5,1,1.5c0.5,0,0.8-0.3,0.9-0.8c0-0.1,0-0.6,0-1.4h2v0.3c0,0.7,0,1.2,0,1.3c0,0.4-0.2,0.8-0.5,1.2 c-0.5,0.8-1.3,1.2-2.4,1.2c-1,0-1.8-0.4-2.4-1.1c-0.4-0.5-0.6-1.4-0.6-2.6v-3.8c0-1.2,0.2-2,0.6-2.6c0.6-0.8,1.4-1.1,2.4-1.1 c1,0,1.8,0.4,2.3,1.1c0.4,0.5,0.6,1.4,0.6,2.6V13.5z M53.5,13.5"}),wp.element.createElement("path",{className:"st0",d:"M43.2,9.3c-0.3,0-0.7,0.2-1,0.5v6.7c0.3,0.3,0.7,0.5,1,0.5c0.6,0,0.9-0.5,0.9-1.5v-4.7 C44.1,9.8,43.8,9.3,43.2,9.3L43.2,9.3z M43.2,9.3"}),wp.element.createElement("path",{className:"st0",d:"M50.6,9.3c-0.7,0-1,0.5-1,1.5v1h2v-1C51.6,9.8,51.2,9.3,50.6,9.3L50.6,9.3z M50.6,9.3"})),wp.element.createElement("g",null,wp.element.createElement("path",{d:"M2.8,12.8v6h2.2v-6L7.7,4H5.5L4,9.8L2.4,4H0.1c0.4,1.2,0.9,2.6,1.4,4.1C2.2,10.2,2.6,11.7,2.8,12.8L2.8,12.8z M2.8,12.8"}),wp.element.createElement("path",{d:"M10.7,19c1,0,1.8-0.4,2.3-1.1c0.4-0.5,0.6-1.4,0.6-2.6v-3.9c0-1.2-0.2-2-0.6-2.6c-0.5-0.8-1.3-1.1-2.3-1.1 c-1,0-1.8,0.4-2.3,1.1C8,9.3,7.8,10.2,7.8,11.4v3.9c0,1.2,0.2,2.1,0.6,2.6C8.9,18.6,9.7,19,10.7,19L10.7,19z M9.8,11 c0-1,0.3-1.5,1-1.5c0.6,0,1,0.5,1,1.5v4.7c0,1-0.3,1.6-1,1.6c-0.6,0-1-0.5-1-1.6V11z M9.8,11"}),wp.element.createElement("path",{d:"M16.8,19c0.7,0,1.5-0.5,2.3-1.4v1.2h2V7.8h-2v8.4c-0.4,0.6-0.9,1-1.3,1c-0.3,0-0.4-0.2-0.5-0.5c0,0,0-0.3,0-0.8V7.8h-2 v8.7c0,0.8,0.1,1.3,0.2,1.7C15.7,18.7,16.1,19,16.8,19L16.8,19z M16.8,19"})))),wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 276 340"},wp.element.createElement("path",{d:"M196.7.6H24.3C11.1.6.4 11.3.4 24.6v292.9c0 12.3 10 22.2 22.2 22.2H252c13.3 0 23.9-10.7 23.9-23.9V80.9L196.7.6z",fill:"#e94848"}),wp.element.createElement("path",{d:"M196.7 57c0 13.3 10.7 23.9 23.9 23.9H276L196.7.6V57z",fill:"#f19191"}),wp.element.createElement("linearGradient",{id:"A",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"77.111",x2:"116.568",y2:"77.111"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("path",{d:"M113 84.5H48.3c-1.9 0-3.5-1.6-3.5-3.5v-7.7c0-1.9 1.6-3.5 3.5-3.5H113c1.9 0 3.5 1.6 3.5 3.5V81c.1 1.9-1.5 3.5-3.5 3.5z",fill:"url(#A)"}),wp.element.createElement("linearGradient",{id:"B",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.016",x2:"233.927",y2:"136.016"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("use",{href:"#H",opacity:".8",fill:"url(#B)"}),wp.element.createElement("linearGradient",{id:"C",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.993",x2:"233.927",y2:"135.993"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"33.6",opacity:".7",fill:"url(#C)"}),wp.element.createElement("linearGradient",{id:"D",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.969",x2:"233.927",y2:"135.969"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"67.2",opacity:".6",fill:"url(#D)"}),wp.element.createElement("linearGradient",{id:"E",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.045",x2:"233.927",y2:"136.045"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"100.7",opacity:".4",fill:"url(#E)"}),wp.element.createElement("linearGradient",{id:"F",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"270.322",x2:"174.778",y2:"270.322"},wp.element.createElement("stop",{offset:"0","stop-color":"#fff"}),wp.element.createElement("stop",{offset:"1","stop-color":"#fff0f0"})),wp.element.createElement("path",{d:"M171.9 277.7H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9h124.3c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z",opacity:".3",fill:"url(#F)"}),wp.element.createElement("defs",null,wp.element.createElement("path",{id:"H",d:"M231 143.4H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9H231c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z"}))))},function(e,t,n){"use strict";var r=wp.i18n.__,i=wp.components.Spinner,l=function(){return wp.element.createElement("div",{className:"wp-block-embed is-loading"},wp.element.createElement(i,null),wp.element.createElement("p",null,r("Embedding\u2026")))};t.a=l},function(e,t,n){"use strict";var r=wp.i18n.__,i=wp.element.Fragment,l=wp.components,o=l.IconButton,a=l.Toolbar,s=wp.editor.BlockControls,c=function(e){var t=e.showEditButton,n=e.switchBackToURLInput;return wp.element.createElement(i,null,wp.element.createElement(s,null,wp.element.createElement(a,null,t&&wp.element.createElement(o,{className:"components-toolbar__control",label:r("Edit URL"),icon:"edit",onClick:n}))))};t.a=c},function(e,t,n){"use strict";var r=n(10),i=n.n(r),l=wp.i18n,o=l.__,a=l._x,s=wp.components,c=s.Button,u=s.Placeholder,p=s.ExternalLink,m=wp.blockEditor.BlockIcon,d=function(e){var t=e.icon,n=e.label,r=e.value,l=e.onSubmit,s=e.onChange,d=e.cannotEmbed,f=e.docLink,h=e.DocTitle,w=i()("wp-block-embed",{});return wp.element.createElement("div",null,wp.element.createElement(u,{icon:wp.element.createElement(m,{icon:t,showColors:!0}),label:n,className:w},wp.element.createElement("form",{onSubmit:l},wp.element.createElement("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:o("Enter URL to embed here\u2026"),onChange:s}),wp.element.createElement(c,{isLarge:!0,type:"submit"},a("Embed","button label")),d&&wp.element.createElement("p",{className:"components-placeholder__error"},o("Sorry, we could not embed that content."),wp.element.createElement("br",null))),f&&wp.element.createElement("div",{className:"components-placeholder__learn-more"},wp.element.createElement(p,{href:f},h))))};t.a=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(11),a=n.n(o),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element.Component,p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"componentDidMount",value:function(){a.a.findDOMNode(this.refs.iframe).addEventListener("load",this.props.onLoad)}},{key:"render",value:function(){return wp.element.createElement("iframe",s({ref:"iframe"},this.props))}}]),t}(u);t.a=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(6),n(12),n(16),n(20),n(24),n(28),n(32),n(36),n(40),n(44);!function(){var e=wp.element.createElement("svg",{width:"33",height:"20",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 270 270"},wp.element.createElement("g",null,wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"0,0 0,52 15,52 15,15 52,15 52,0 \t"}),wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"255,218 255,255 218,255 218,270 270,270 270,218 \t"}),wp.element.createElement("path",{fill:"#5B4E96",d:"M260.7,68.1c-10.4-18.6-29.3-31.2-50.6-33.6c-12.4-1.4-25,0.6-36.3,6c-1.3,0.6-2.6,1.3-3.9,2 C154.5,51,143,65.3,138.3,81.7l0,0.1l-36.4,103.8c-3.1,9.4-9.1,17-17.1,21.4c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.5,3.2 c-11.5-1.3-21.6-8.1-27.2-18.1c-4.6-8.3-5.7-18-3.1-27.2c2.6-9.2,8.7-16.9,17.1-21.5c0.7-0.4,1.4-0.8,2.1-1.1 c6.1-2.9,12.7-4,19.6-3.2c0.3,0,0.5,0.1,0.8,0.1L64.9,162c-0.5,1.5,0.3,3.1,1.8,3.6l19.4,6.3c1.5,0.5,3-0.3,3.5-1.7l16.7-47.4 c0.4-1.2,0.3-2.5-0.3-3.6c-0.6-1.1-1.6-2-2.8-2.4l-17.6-5.1c-0.4-0.1-0.8-0.2-1.2-0.3l-1.6-0.5l0,0.1c-2.5-0.6-5-1.1-7.5-1.3 c-12.5-1.4-25.1,0.6-36.4,6c-1.3,0.6-2.6,1.3-3.9,2c-15.6,8.7-27,22.9-31.9,40.1c-4.9,17.1-2.8,35.1,5.8,50.5 c10.4,18.6,29.3,31.2,50.6,33.6c12.4,1.4,25-0.6,36.3-6c1.3-0.6,2.6-1.3,3.9-2c15.3-8.5,26.8-22.8,31.6-39.2l0-0.1L167.8,91 l0.1-0.2l0-0.1c4.1-10.5,9.3-17,17-21.3c0.7-0.4,1.4-0.7,2.1-1.1c6.1-2.9,12.8-4,19.5-3.2c11.5,1.3,21.6,8.1,27.2,18.1 c9.6,17.2,3.3,39.1-14,48.7c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.7,3.2c-2-0.2-4.1-0.6-6.1-1.2l-0.2-0.1l-11.3-3.4 c-1.2-0.4-2.5,0.3-2.9,1.5l-8.8,24.8c-0.5,1.3,0.3,2.7,1.6,3.1l13.9,4c3.4,0.9,6.8,1.6,10.3,2c12.4,1.4,25-0.6,36.3-6l0.1,0 c1.3-0.6,2.6-1.3,3.9-2C266.8,140.8,278.5,100.1,260.7,68.1z"})));wp.blocks.updateCategory("embedpress",{icon:e})}()},function(e,t,n){"use strict";var r=n(7),i=(n.n(r),n(8)),l=(n.n(i),n(9)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-docs-block",{title:a("Google Docs"),icon:o.b,category:"embedpress",keywords:[a("embedpress"),a("google"),a("docs")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("figure",{className:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))},deprecated:[{attributes:{align:{type:"string",enum:["left","center","right","wide","full"]}},save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("div",{className:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element.Component,f=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.updateAlignment=e.updateAlignment.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"updateAlignment",value:function(e){var t=this.props.setAttributes,n=-1!==["wide","full"].indexOf(e)?{width:void 0,height:void 0}:{};t(Object.assign({},n,{align:e}))}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,l=i.exec(r),o=l[1];o&&"document"==o?(r.match(/([?&])embedded=true/i)||(r.indexOf("?")>-1?r+="&embedded=true":r+="?embedded=true"),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Google Docs URL");return!d||r?wp.element.createElement("div",null,wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.b,DocTitle:m("Learn more about Google doc embed"),docLink:"https://embedpress.com/docs/embed-google-docs-wordpress/"})):wp.element.createElement("div",null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:d,onMouseUp:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozAllowFullScreen:"true",webkitAllowFullScreen:"true"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(d);t.a=f},function(e,t,n){var r,i;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var o=n.apply(null,r);o&&e.push(o)}else if("object"===i)for(var a in r)l.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var l={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(i=function(){return n}.apply(t,r))&&(e.exports=i))}()},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";var r=n(13),i=(n.n(r),n(14)),l=(n.n(i),n(15)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-slides-block",{title:a("Google Slides"),icon:o.g,category:"embedpress",keywords:[a("embedpress"),a("google"),a("slides")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-presentation"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element,f=d.Component,h=d.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,l=i.exec(r),o=l[1];o&&"presentation"==o?(r.match(/pub\?/i)&&(r=r.replace("/pub?","/embed?")),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Google Slides URL");return!d||r?wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.g,DocTitle:m("Learn more about Google slides embed"),docLink:"https://embedpress.com/docs/embed-google-slides-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:d,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(17),i=(n.n(r),n(18)),l=(n.n(i),n(19)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-sheets-block",{title:a("Google Sheets"),icon:o.f,category:"embedpress",keywords:[a("embedpress"),a("google"),a("sheets")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))},deprecated:[{attributes:{align:{type:"string",enum:["left","center","right","wide","full"]}},save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("div",{className:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element,f=d.Component,h=d.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,l=i.exec(r),o=l[1];if(o&&"spreadsheets"==o){if(r.indexOf("?")>-1){var a=r.split("?");if(a=a[1],a=a.split("&"),console.log(a),a.length>0){var s=!1,c=!1;a.map(function(e){e.indexOf("widget=")?c=!0:e.indexOf("headers=")&&(s=!0)}),c||(r+="&widget=true"),s||(r+="&headers=false")}}else r+="?widget=true&headers=false";this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Google Sheets URL");return!d||r?wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.f,DocTitle:m("Learn more about Google sheet embed"),docLink:"https://embedpress.com/docs/embed-google-sheets-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:d,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(21),i=(n.n(r),n(22)),l=(n.n(i),n(23)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-forms-block",{title:a("Google Forms"),icon:o.d,category:"embedpress",keywords:[a("embedpress"),a("google"),a("forms")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-forms"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element,f=d.Component,h=d.Fragment,w=(wp.components.Disabled,function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,l=i.exec(r),o=l[1];o&&"forms"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Google Forms URL");return!d||r?wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.d,DocTitle:m("Learn more about Google forms embed"),docLink:"https://embedpress.com/docs/embed-google-forms-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:d,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f));t.a=w},function(e,t,n){"use strict";var r=n(25),i=(n.n(r),n(26)),l=(n.n(i),n(27)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-drawings-block",{title:a("Google Drawings"),icon:o.c,category:"embedpress",keywords:[a("embedpress"),a("google"),a("drawings")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-drawings"},wp.element.createElement("img",{src:t,width:"960",height:"720"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(0),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,d=m.Component,f=m.Fragment,h=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return l(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,l=i.exec(r),o=l[1];o&&"drawings"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Drawings URL (Get your link from File -> Publish to the web -> Link)");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:c.c,DocTitle:p("Learn more about Google drawing embed"),docLink:"https://embedpress.com/docs/embed-google-drawings-wordpress/"}):wp.element.createElement(f,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement("img",{src:u,onLoad:this.onLoad,style:{display:i?"none":""},width:"960",height:"720"}),wp.element.createElement(o.a,{showEditButton:u&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(d);t.a=h},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(29),l=(n.n(i),n(30)),o=(n.n(l),n(31)),a=n(0),s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-maps-block",{title:s("Google Maps"),icon:a.e,category:"embedpress",keywords:[s("embedpress"),s("google"),s("maps")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-maps"},wp.element.createElement("iframe",r({src:t,frameborder:"0",width:"600",height:"450"},"frameborder","0")))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element,f=d.Component,h=d.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/(?:(?:(?:www\.|maps\.)?(?:google\.com?))|(?:goo\.gl))(?:\.[a-z]{2})?\/(?:maps\/)?(?:place\/)?(?:[a-z0-9\/%+\-_]*)?([a-z0-9\/%,+\-_=!:@\.&*\$#?\']*)/i)){var r=this.decodeHTMLEntities(t);if(t.match("~(maps/embed|output=embed)~i"));else{var i=/@(-?[0-9\.]+,-?[0-9\.]+).+,([0-9\.]+[a-z])/i,l=i.exec(r);l&&l.length>1&&l[1]&&l[2]?r="https://maps.google.com/maps?hl=en&ie=UTF8&ll="+l[1]+"&spn="+l[1]+"&t=m&z="+Math.round(parseInt(l[2]))+"&output=embed":this.setState({cannotEmbed:!0,editingURL:!0})}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Google Maps URL");return!d||r?wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.e,DocTitle:m("Learn more about Google map embed"),docLink:"https://embedpress.com/docs/embed-google-maps-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(Disabled,null,wp.element.createElement(c.a,{src:d,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"})),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(33),i=(n.n(r),n(34)),l=(n.n(i),n(35)),o=n(0),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/twitch-block",{title:s("Twitch"),icon:o.h,category:"embedpress",keywords:[s("embedpress"),s("twitch")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""},attrs:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes,n=t.iframeSrc,r=t.attrs,i=n+"&parent="+embedpressObj.twitch_host;return wp.element.createElement("figure",{className:"ose-twitch-presentation"},wp.element.createElement("iframe",a({src:i},r,{frameborder:"0",width:"600",height:"450"})))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=wp.i18n.__,f=wp.element,h=f.Component,w=f.Fragment,b=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),m(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=/http[s]?:\/\/(?:www\.|clips\.)twitch\.tv\/([0-9a-zA-Z\-\_]+)\/?(chat\/?$|[0-9a-z\-\_]*)?/;if(t&&t.match(r)){var i=this.decodeHTMLEntities(t),l=r.exec(i),o=l[1];console.log(o);var a,s="channel";switch(t.indexOf("clips.twitch.tv")>-1?s="clip":t.indexOf("/videos/")>-1?s="video":t.indexOf("#/chat$#")>-1&&(s="chat"),console.log(s),s){case"channel":i="https://player.twitch.tv/?channel="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"clip":i="https://clips.twitch.tv/embed?clip="+o+"&autoplay=false",a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"video":o=l[2],i="https://player.twitch.tv/?video="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"chat":i="http://www.twitch.tv/embed/"+o+"/chat",a={scrolling:"yes",frameborder:"0",allowfullscreen:"true",id:"'"+o+"'"}}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:i,attrs:a})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,m=t.interactive,f=this.props.attributes,h=f.iframeSrc,b=f.attrs,y=d("Twitch URL");if(!h||r)return wp.element.createElement(s.a,{label:y,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.h,DocTitle:d("Learn more about twitch embed"),docLink:"https://embedpress.com/docs/embed-twitch-streams-chat/"});var v=h+"&parent="+embedpressObj.twitch_host;return wp.element.createElement(w,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,p({src:v},b,{onLoad:this.onLoad,style:{display:i?"none":""},onFocus:this.hideOverlay,width:"600",height:"450"})),!m&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:h&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(h);t.a=b},function(e,t,n){"use strict";var r=n(37),i=(n.n(r),n(38)),l=(n.n(i),n(39)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/wistia-block",{title:a("Wistia"),icon:o.i,category:"embedpress",keywords:[a("embedpress"),a("wistia")],supports:{align:["wide","full","right","left"],default:""},edit:l.a,save:function(e){return null},deprecated:[{attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:l.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-wistia"},wp.element.createElement("iframe",{src:t,allowtransparency:"true",frameborder:"0",class:"wistia_embed",name:"wistia_embed",width:"600",height:"330"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,d=wp.element,f=d.Component,h=d.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1,mediaId:null},e.setUrl(),e}return l(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"componentDidMount",value:function(){if(this.props.attributes.url){var e=this.props.attributes.url.match(/medias\/(.*)/),t=e[1];this.setState(Object.assign({},this.state,{mediaId:t}))}}},{key:"onLoad",value:function(){if(this.setState({fetching:!1}),embedpressObj.wisita_options){var e=Object.assign({},this.state);setTimeout(function(){var e=document.createElement("script");e.src="https://fast.wistia.com/assets/external/E-v1.js",e.charset="ISO-8859-1",document.body.appendChild(e)},100),setTimeout(function(){var t=document.createElement("script");t.type="text/javascript",t.innerHTML="window.pp_embed_wistia_labels = "+embedpressObj.wistia_labels,document.body.appendChild(t),t=document.createElement("script"),t.type="text/javascript",t.innerHTML='wistiaEmbed = Wistia.embed( "'+e.mediaId+'", '+embedpressObj.wisita_options+" );",document.body.appendChild(t)},400)}}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&(t.match(/^http[s]?:\/\/(?:www\.)?wistia\.com\/medias/i)||t.match(/^http[s]?:\/\/(?:www\.)?fast\/.wistia\.com\/embed\/medias/i.jsonp))){var r=t.match(/medias\/(.*)/),i=r[1],l="//fast.wistia.net/embed/iframe/"+i;this.setState({editingURL:!1,cannotEmbed:!1,mediaId:i}),n({iframeSrc:l})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,p=t.interactive,d=this.props.attributes.iframeSrc,f=m("Wistia URL");return!d||r?wp.element.createElement(s.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.i,DocTitle:m("Learn more about Wistia embed"),docLink:"https://embedpress.com/docs/embed-wistia-videos-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement("div",{className:"ose-wistia",id:"wistia_"+this.state.mediaId},wp.element.createElement(c.a,{src:d,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"330",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"})),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:d&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(41),i=(n.n(r),n(42)),l=(n.n(i),n(43)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/youtube-block",{title:a("Youtube"),icon:o.j,category:"embedpress",keywords:[a("embedpress"),a("youtube")],supports:{align:["wide","full","right","left"],default:""},edit:l.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(2),a=n(1),s=n(3),c=n(4),u=n(0),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=wp.i18n.__,f=wp.element,h=f.Component,w=f.Fragment,b=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return l(t,e),m(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"componentWillMount",value:function(){this.state.url&&this.setUrl()}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/);if(t&&r){var i=r[1],l="https://www.youtube.com/embed/"+i,o=new URL(l);if("undefined"!==typeof embedpressProObj)for(var a in embedpressProObj.youtubeParams)o.searchParams.set(a,embedpressProObj.youtubeParams[a]);this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:o.href,mediaId:i})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,l=t.cannotEmbed,m=t.interactive,f=this.props.attributes,h=f.iframeSrc,b=f.attrs,y=d("Youtube URL");return!h||r?wp.element.createElement(s.a,{label:y,onSubmit:this.setUrl,value:n,cannotEmbed:l,onChange:function(t){return e.setState({url:t.target.value})},icon:u.j,DocTitle:d("Learn More About Youtube Embed"),docLink:"https://embedpress.com/docs/embed-youtube-wordpress/"}):wp.element.createElement(w,null,i?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,p({src:h},b,{onLoad:this.onLoad,style:{display:i?"none":""},width:"640",onFocus:this.hideOverlay,height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"})),!m&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(o.a,{showEditButton:h&&!l,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(h);t.a=b},function(e,t,n){"use strict";var r=n(45),i=(n.n(r),n(46)),l=(n.n(i),n(47)),o=n(0),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/document",{title:a("Document"),icon:o.a,category:"embedpress",keywords:[a("embedpress"),a("pdf"),a("doc"),a("ppt")],supports:{align:["wide","full","right","left"],default:""},attributes:{id:{type:"string"},href:{type:"string"},powered_by:{type:"boolean",default:!0},width:{type:"number",default:600},height:{type:"number",default:600},fileName:{type:"string"},mime:{type:"string"}},edit:l.a,save:function(e){var t=e.attributes,n=t.href,r=t.mime,i=t.id,l=t.width,o=t.height,a=t.powered_by,s="//view.officeapps.live.com/op/embed.aspx?src="+n;return wp.element.createElement("figure",{className:"embedpress-embed-document"},"application/pdf"===r&&wp.element.createElement("div",{style:{height:o,width:l},className:"embedpress-embed-document-pdf "+i,"data-emid":i,"data-emsrc":n}),"application/pdf"!==r&&wp.element.createElement("iframe",{style:{height:o,width:l},src:s,mozallowfullscreen:"true",webkitallowfullscreen:"true"}),a&&wp.element.createElement("p",{className:"embedpress-el-powered"},"Powered By EmbedPress"))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(4),a=n(1),s=n(0),c=function(){function e(e,t){var n=[],r=!0,i=!1,l=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,l=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.blob,d=m.getBlobByURL,f=m.isBlobURL,h=m.revokeBlobURL,w=wp.editor,b=w.BlockIcon,y=w.MediaPlaceholder,v=w.InspectorControls,g=wp.element,E=g.Component,L=g.Fragment,k=wp.components,_=k.RangeControl,S=k.PanelBody,U=k.ExternalLink,O=k.ToggleControl,R=["application/pdf","application/msword","application/vnd.ms-powerpoint","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation"],M=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onSelectFile=e.onSelectFile.bind(e),e.onUploadError=e.onUploadError.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={hasError:!1,fetching:!1,interactive:!1,loadPdf:!0},e}return l(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,i=t.noticeOperations,l=n.href;if(f(l)){r({filesList:[d(l)],onFileChange:function(t){var n=c(t,1),r=n[0];return e.onSelectFile(r)},onError:function(t){e.setState({hasError:!0}),i.createErrorNotice(t)}}),h(l)}this.props.attributes.href&&"application/pdf"===this.props.attributes.mime&&this.state.loadPdf&&(this.setState({loadPdf:!1}),PDFObject.embed(this.props.attributes.href,"."+this.props.attributes.id))}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:e.title,id:"embedpress-pdf-"+Date.now(),mime:e.mime}),embedpressObj.embedpress_pro&&this.props.setAttributes({powered_by:!1}),"application/pdf"===e.mime&&(this.setState({loadPdf:!1}),PDFObject.embed(e.url,"."+this.props.attributes.id)))}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.noticeUI,r=e.setAttributes,i=t.href,l=t.mime,c=t.id,u=t.width,m=t.height,d=t.powered_by,f=this.state,h=f.hasError,w=f.interactive,g=f.fetching,E=f.loadPdf;if(!i||h)return wp.element.createElement("div",{className:"embedpress-document-editmode"},wp.element.createElement(y,{icon:wp.element.createElement(b,{icon:s.a}),labels:{title:p("Document"),instructions:p("Upload a file or pick one from your media library for embed.")},onSelect:this.onSelectFile,notices:n,allowedTypes:R,onError:this.onUploadError},wp.element.createElement("div",{style:{width:"100%"},className:"components-placeholder__learn-more embedpress-doc-link"},wp.element.createElement(U,{href:"https://embedpress.com/docs/embed-docuemnt/"},"Learn more about Embedded document "))));var k="//view.officeapps.live.com/op/embed.aspx?src="+i;return wp.element.createElement(L,null,g&&"application/pdf"!==l?wp.element.createElement(a.a,null):null,"application/pdf"===l&&wp.element.createElement("div",{style:{height:m,width:u},className:"embedpress-embed-document-pdf "+c,"data-emid":c,"data-emsrc":i}),"application/pdf"!==l&&wp.element.createElement(o.a,{onMouseUponMouseUp:this.hideOverlay,style:{height:m,width:u,display:g||!E?"none":""},onLoad:this.onLoad,src:k,mozallowfullscreen:"true",webkitallowfullscreen:"true"}),!w&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),d&&wp.element.createElement("p",{className:"embedpress-el-powered"},"Powered By EmbedPress"),wp.element.createElement(v,{key:"inspector"},wp.element.createElement(S,{title:p("Embed Size","embedpress")},wp.element.createElement(_,{label:p("Width","embedpress"),value:u,onChange:function(e){return r({width:e})},max:1e3,min:1}),wp.element.createElement(_,{label:p("Height","embedpress"),value:m,onChange:function(e){return r({height:e})},max:1e3,min:1}),wp.element.createElement(O,{label:p("Powered By"),onChange:function(e){return r({powered_by:e})},checked:d}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(E);t.a=M}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";n.d(t,"c",function(){return l}),n.d(t,"h",function(){return c}),n.d(t,"g",function(){return s}),n.d(t,"e",function(){return u}),n.d(t,"d",function(){return p}),n.d(t,"f",function(){return m}),n.d(t,"i",function(){return f}),n.d(t,"j",function(){return d}),n.d(t,"k",function(){return h}),n.d(t,"a",function(){return w}),n.d(t,"b",function(){return b});var r=wp.components,i=r.G,o=r.Path,a=(r.Polygon,r.SVG),l=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#2196F3"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(o,{style:{fill:"#BBDEFB"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(o,{style:{fill:"#1565C0"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(o,{style:{fill:"#E3F2FD"},d:"M 15 23 L 33 23 L 33 25 L 15 25 Z "}),wp.element.createElement(o,{style:{fill:"#E3F2FD"},d:"M 15 27 L 33 27 L 33 29 L 15 29 Z "}),wp.element.createElement(o,{style:{fill:"#E3F2FD"},d:"M 15 31 L 33 31 L 33 33 L 15 33 Z "}),wp.element.createElement(o,{style:{fill:"#E3F2FD"},d:"M 15 35 L 25 35 L 25 37 L 15 37 Z "}))),c=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",enableBackground:"new 0 0 24 24",id:"Layer_2",version:"1.1",viewBox:"0 0 24 24"},wp.element.createElement(i,null,wp.element.createElement(o,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14c1.1045704,0,2-0.8954296,2-2 V6z",style:{fill:"#FFC720"}}),wp.element.createElement(o,{d:"M17,6c-0.5444336,0-1.0367432-0.2190552-1.3973999-0.5719604L21,10.8254395V6H17z",style:{fill:"url(#SVGID_1_)"}}),wp.element.createElement(o,{d:"M19,23.75H5c-1.1045532,0-2-0.8954468-2-2V22c0,1.1045532,0.8954468,2,2,2h14c1.1045532,0,2-0.8954468,2-2 v-0.25C21,22.8545532,20.1045532,23.75,19,23.75z",style:{opacity:"0.1"}}),wp.element.createElement(o,{d:"M15,0v4c0,1.1045694,0.8954306,2,2,2h4L15,0z",style:{fill:"#FFE083"}}),wp.element.createElement(o,{d:"M17,5.75c-1.1045532,0-2-0.8954468-2-2V4c0,1.1045532,0.8954468,2,2,2h4l-0.25-0.25H17z",style:{opacity:"0.1"}}),wp.element.createElement(o,{d:"M15,0H5C3.8954468,0,3,0.8953857,3,2v0.25c0-1.1046143,0.8954468-2,2-2h10",style:{fill:"#FFFFFF",opacity:"0.2"}}),wp.element.createElement(o,{d:"M15.5,9h-7C7.6728516,9,7,9.6728516,7,10.5v6C7,17.3271484,7.6728516,18,8.5,18h7 c0.8271484,0,1.5-0.6728516,1.5-1.5v-6C17,9.6728516,16.3271484,9,15.5,9z M8,15.5V11h8v4.5H8z",style:{fill:"#FFFFFF"}}),wp.element.createElement(o,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14 c1.1045704,0,2-0.8954296,2-2V6z",style:{fill:"url(#SVGID_2_)"}}))),s=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#43A047"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(o,{style:{fill:"#C8E6C9"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(o,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 31 23 L 15 23 L 15 37 L 33 37 L 33 23 Z M 17 25 L 21 25 L 21 27 L 17 27 Z M 17 29 L 21 29 L 21 31 L 17 31 Z M 17 33 L 21 33 L 21 35 L 17 35 Z M 31 35 L 23 35 L 23 33 L 31 33 Z M 31 31 L 23 31 L 23 29 L 31 29 Z M 31 27 L 23 27 L 23 25 L 31 25 Z "}))),u=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#7850C1"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),wp.element.createElement(o,{style:{fill:"#C2ABE1"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(o,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 19 23 L 33 23 L 33 25 L 19 25 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 19 28 L 33 28 L 33 30 L 19 30 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 19 33 L 33 33 L 33 35 L 19 35 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 15 23 L 17 23 L 17 25 L 15 25 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 15 28 L 17 28 L 17 30 L 15 30 Z "}),wp.element.createElement(o,{style:{fill:"#E8F5E9"},d:"M 15 33 L 17 33 L 17 35 L 15 35 Z "}))),p=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#DE5245"},d:"M37,45H11c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h19l10,10v29C40,43.7,38.7,45,37,45z"}),wp.element.createElement(o,{style:{fill:"#EEA6A0"},d:"M40,13H30V3L40,13z"}),wp.element.createElement(o,{style:{fill:"#B3433A"},d:"M30,13l10,10V13H30z"}),wp.element.createElement(o,{style:{fill:"#FFFFFF"},d:"M20.5,32c-3,0-5.5-2.5-5.5-5.5c0-3,2.5-5.5,5.5-5.5s5.5,2.5,5.5,5.5C26,29.5,23.5,32,20.5,32z M20.5,23c-1.9,0-3.5,1.6-3.5,3.5s1.6,3.5,3.5,3.5s3.5-1.6,3.5-3.5S22.4,23,20.5,23z"}),wp.element.createElement(o,{style:{fill:"#FFFFFF"},d:"M27.6,29c-0.6,1.8-1.9,3.3-3.6,4.1V38h9v-9H27.6z"}))),m=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#1C9957"},d:"M 42 39 L 42 9 C 42 7.34375 40.65625 6 39 6 L 9 6 C 7.34375 6 6 7.34375 6 9 L 6 39 C 6 40.65625 7.34375 42 9 42 L 39 42 C 40.65625 42 42 40.65625 42 39 Z "}),wp.element.createElement(o,{style:{fill:"#3E7BF1"},d:"M 9 42 L 39 42 C 40.65625 42 24 26 24 26 C 24 26 7.34375 42 9 42 Z "}),wp.element.createElement(o,{style:{fill:"#CBCCC9"},d:"M 42 39 L 42 9 C 42 7.34375 26 24 26 24 C 26 24 42 40.65625 42 39 Z "}),wp.element.createElement(o,{style:{fill:"#EFEFEF"},d:"M 39 42 C 40.65625 42 42 40.65625 42 39 L 42 38.753906 L 26.246094 23 L 23 26.246094 L 38.753906 42 Z "}),wp.element.createElement(o,{style:{fill:"#FFD73D"},d:"M 42 9 C 42 7.34375 40.65625 6 39 6 L 38.753906 6 L 6 38.753906 L 6 39 C 6 40.65625 7.34375 42 9 42 L 9.246094 42 L 42 9.246094 Z "}),wp.element.createElement(o,{style:{fill:"#D73F35"},d:"M 36 2 C 30.476563 2 26 6.476563 26 12 C 26 18.8125 33.664063 21.296875 35.332031 31.851563 C 35.441406 32.53125 35.449219 33 36 33 C 36.550781 33 36.558594 32.53125 36.667969 31.851563 C 38.335938 21.296875 46 18.8125 46 12 C 46 6.476563 41.523438 2 36 2 Z "}),wp.element.createElement(o,{style:{fill:"#752622"},d:"M 39.5 12 C 39.5 13.933594 37.933594 15.5 36 15.5 C 34.066406 15.5 32.5 13.933594 32.5 12 C 32.5 10.066406 34.066406 8.5 36 8.5 C 37.933594 8.5 39.5 10.066406 39.5 12 Z "}),wp.element.createElement(o,{style:{fill:"#FFFFFF"},d:"M 14.492188 12.53125 L 14.492188 14.632813 L 17.488281 14.632813 C 17.09375 15.90625 16.03125 16.816406 14.492188 16.816406 C 12.660156 16.816406 11.175781 15.332031 11.175781 13.5 C 11.175781 11.664063 12.660156 10.179688 14.492188 10.179688 C 15.316406 10.179688 16.070313 10.484375 16.648438 10.980469 L 18.195313 9.433594 C 17.21875 8.542969 15.921875 8 14.492188 8 C 11.453125 8 8.992188 10.464844 8.992188 13.5 C 8.992188 16.535156 11.453125 19 14.492188 19 C 19.304688 19 20.128906 14.683594 19.675781 12.539063 Z "}))),f=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#FFFFFF"},d:"M 12 32 L 12 8 L 39 8 L 39 26 L 33 32 L 24 32 L 18 38 L 18 32 Z "}),wp.element.createElement(o,{style:{fill:"#8E24AA"},d:"M 9 5 L 6 12.121094 L 6 38 L 15 38 L 15 43 L 20 43 L 25 38 L 32 38 L 42 28 L 42 5 Z M 38 26 L 33 31 L 24 31 L 19 36 L 19 31 L 13 31 L 13 9 L 38 9 Z "}),wp.element.createElement(o,{style:{fill:"#8E24AA"},d:"M 32 25 L 27 25 L 27 15 L 32 15 Z "}),wp.element.createElement(o,{style:{fill:"#8E24AA"},d:"M 24 25 L 19 25 L 19 15 L 24 15 Z "}))),d=wp.element.createElement(a,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 769 598",version:"1.1"},wp.element.createElement(i,null,wp.element.createElement(o,{style:{fill:"#148ee0"},d:"M766.89,229.17c0,0 -17.78,35.38 -106.5,91.3c-37.82,23.79 -116.36,49.1 -217.33,58.86c-54.52,5.29 -154.9,0.99 -197.96,0.99c-43.29,0 -63.13,9.12 -101.95,52.84c-143.15,161.36 -143.15,161.36 -143.15,161.36c0,0 49.57,0.24 87.01,0.24c37.43,0 271.55,13.59 375.43,-14.98c337.36,-92.72 304.46,-350.62 304.46,-350.62z"}),wp.element.createElement(o,{style:{fill:"#54bbff"},d:"M757.84,126.66c16.23,-98.97 -39.68,-126.16 -39.68,-126.16c0,0 2.36,80.57 -145.7,97.65c-131.42,15.16 -572.46,3.74 -572.46,3.74c0,0 0,0 141.74,162.54c38.39,44.06 58.76,49.17 101.92,52.22c43.16,2.89 138.42,1.86 202.99,-3.05c70.58,-5.41 171.17,-28.43 239.19,-81.11c34.88,-26.98 65.21,-64.48 72,-105.83z"}))),h=wp.element.createElement(a,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement(o,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})),w=(wp.element.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 23"},wp.element.createElement("g",null,wp.element.createElement("g",null,wp.element.createElement("path",{style:{fill:"#DA2B28"},className:"st0",d:"M55.4,3.7c-0.2-0.9-0.6-1.6-1.3-2.2c-0.7-0.6-1.4-0.9-2.3-1c-2.7-0.3-6.8-0.4-12.3-0.4 c-5.5,0-9.6,0.1-12.3,0.4c-0.9,0.1-1.6,0.5-2.3,1c-0.7,0.6-1.1,1.3-1.3,2.2c-0.4,1.7-0.6,4.3-0.6,7.8c0,3.5,0.2,6.1,0.6,7.8 c0.2,0.9,0.6,1.6,1.3,2.2c0.7,0.6,1.4,0.9,2.3,1c2.7,0.3,6.8,0.5,12.3,0.5c5.5,0,9.6-0.2,12.3-0.5c0.9-0.1,1.6-0.4,2.3-1 c0.7-0.6,1.1-1.3,1.3-2.2c0.4-1.7,0.6-4.3,0.6-7.8C56,8,55.8,5.4,55.4,3.7L55.4,3.7z M32.5,6h-2.4v12.6h-2.2V6h-2.3V3.9h6.9V6z M38.5,18.6h-2v-1.2c-0.8,0.9-1.6,1.4-2.3,1.4c-0.7,0-1.1-0.3-1.3-0.8c-0.1-0.4-0.2-0.9-0.2-1.6V7.6h2v8.1c0,0.5,0,0.7,0,0.8 c0,0.3,0.2,0.5,0.5,0.5c0.4,0,0.8-0.3,1.3-0.9V7.6h2V18.6z M46.1,15.3c0,1.1-0.1,1.8-0.2,2.2c-0.3,0.8-0.8,1.2-1.6,1.2 c-0.7,0-1.4-0.4-2.1-1.2v1.1h-2V3.9h2v4.8c0.6-0.8,1.3-1.2,2.1-1.2c0.8,0,1.3,0.4,1.6,1.2c0.1,0.4,0.2,1.1,0.2,2.2V15.3z M53.5,13.5h-4v1.9c0,1,0.3,1.5,1,1.5c0.5,0,0.8-0.3,0.9-0.8c0-0.1,0-0.6,0-1.4h2v0.3c0,0.7,0,1.2,0,1.3c0,0.4-0.2,0.8-0.5,1.2 c-0.5,0.8-1.3,1.2-2.4,1.2c-1,0-1.8-0.4-2.4-1.1c-0.4-0.5-0.6-1.4-0.6-2.6v-3.8c0-1.2,0.2-2,0.6-2.6c0.6-0.8,1.4-1.1,2.4-1.1 c1,0,1.8,0.4,2.3,1.1c0.4,0.5,0.6,1.4,0.6,2.6V13.5z M53.5,13.5"}),wp.element.createElement("path",{className:"st0",d:"M43.2,9.3c-0.3,0-0.7,0.2-1,0.5v6.7c0.3,0.3,0.7,0.5,1,0.5c0.6,0,0.9-0.5,0.9-1.5v-4.7 C44.1,9.8,43.8,9.3,43.2,9.3L43.2,9.3z M43.2,9.3"}),wp.element.createElement("path",{className:"st0",d:"M50.6,9.3c-0.7,0-1,0.5-1,1.5v1h2v-1C51.6,9.8,51.2,9.3,50.6,9.3L50.6,9.3z M50.6,9.3"})),wp.element.createElement("g",null,wp.element.createElement("path",{d:"M2.8,12.8v6h2.2v-6L7.7,4H5.5L4,9.8L2.4,4H0.1c0.4,1.2,0.9,2.6,1.4,4.1C2.2,10.2,2.6,11.7,2.8,12.8L2.8,12.8z M2.8,12.8"}),wp.element.createElement("path",{d:"M10.7,19c1,0,1.8-0.4,2.3-1.1c0.4-0.5,0.6-1.4,0.6-2.6v-3.9c0-1.2-0.2-2-0.6-2.6c-0.5-0.8-1.3-1.1-2.3-1.1 c-1,0-1.8,0.4-2.3,1.1C8,9.3,7.8,10.2,7.8,11.4v3.9c0,1.2,0.2,2.1,0.6,2.6C8.9,18.6,9.7,19,10.7,19L10.7,19z M9.8,11 c0-1,0.3-1.5,1-1.5c0.6,0,1,0.5,1,1.5v4.7c0,1-0.3,1.6-1,1.6c-0.6,0-1-0.5-1-1.6V11z M9.8,11"}),wp.element.createElement("path",{d:"M16.8,19c0.7,0,1.5-0.5,2.3-1.4v1.2h2V7.8h-2v8.4c-0.4,0.6-0.9,1-1.3,1c-0.3,0-0.4-0.2-0.5-0.5c0,0,0-0.3,0-0.8V7.8h-2 v8.7c0,0.8,0.1,1.3,0.2,1.7C15.7,18.7,16.1,19,16.8,19L16.8,19z M16.8,19"})))),wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 276 340"},wp.element.createElement("path",{d:"M196.7.6H24.3C11.1.6.4 11.3.4 24.6v292.9c0 12.3 10 22.2 22.2 22.2H252c13.3 0 23.9-10.7 23.9-23.9V80.9L196.7.6z",fill:"#e94848"}),wp.element.createElement("path",{d:"M196.7 57c0 13.3 10.7 23.9 23.9 23.9H276L196.7.6V57z",fill:"#f19191"}),wp.element.createElement("linearGradient",{id:"A",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"77.111",x2:"116.568",y2:"77.111"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("path",{d:"M113 84.5H48.3c-1.9 0-3.5-1.6-3.5-3.5v-7.7c0-1.9 1.6-3.5 3.5-3.5H113c1.9 0 3.5 1.6 3.5 3.5V81c.1 1.9-1.5 3.5-3.5 3.5z",fill:"url(#A)"}),wp.element.createElement("linearGradient",{id:"B",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.016",x2:"233.927",y2:"136.016"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("use",{href:"#H",opacity:".8",fill:"url(#B)"}),wp.element.createElement("linearGradient",{id:"C",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.993",x2:"233.927",y2:"135.993"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"33.6",opacity:".7",fill:"url(#C)"}),wp.element.createElement("linearGradient",{id:"D",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.969",x2:"233.927",y2:"135.969"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"67.2",opacity:".6",fill:"url(#D)"}),wp.element.createElement("linearGradient",{id:"E",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.045",x2:"233.927",y2:"136.045"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("use",{href:"#H",y:"100.7",opacity:".4",fill:"url(#E)"}),wp.element.createElement("linearGradient",{id:"F",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"270.322",x2:"174.778",y2:"270.322"},wp.element.createElement("stop",{offset:"0",stopColor:"#fff"}),wp.element.createElement("stop",{offset:"1",stopColor:"#fff0f0"})),wp.element.createElement("path",{d:"M171.9 277.7H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9h124.3c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z",opacity:".3",fill:"url(#F)"}),wp.element.createElement("defs",null,wp.element.createElement("path",{id:"H",d:"M231 143.4H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9H231c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z"})))),b=wp.element.createElement("svg",{width:"33",height:"20",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 270 270",role:"img",focusable:"false"},wp.element.createElement("g",null,wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"0,0 0,52 15,52 15,15 52,15 52,0 \t"}),wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"255,218 255,255 218,255 218,270 270,270 270,218 \t"}),wp.element.createElement("path",{fill:"#5B4E96",d:"M260.7,68.1c-10.4-18.6-29.3-31.2-50.6-33.6c-12.4-1.4-25,0.6-36.3,6c-1.3,0.6-2.6,1.3-3.9,2 C154.5,51,143,65.3,138.3,81.7l0,0.1l-36.4,103.8c-3.1,9.4-9.1,17-17.1,21.4c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.5,3.2 c-11.5-1.3-21.6-8.1-27.2-18.1c-4.6-8.3-5.7-18-3.1-27.2c2.6-9.2,8.7-16.9,17.1-21.5c0.7-0.4,1.4-0.8,2.1-1.1 c6.1-2.9,12.7-4,19.6-3.2c0.3,0,0.5,0.1,0.8,0.1L64.9,162c-0.5,1.5,0.3,3.1,1.8,3.6l19.4,6.3c1.5,0.5,3-0.3,3.5-1.7l16.7-47.4 c0.4-1.2,0.3-2.5-0.3-3.6c-0.6-1.1-1.6-2-2.8-2.4l-17.6-5.1c-0.4-0.1-0.8-0.2-1.2-0.3l-1.6-0.5l0,0.1c-2.5-0.6-5-1.1-7.5-1.3 c-12.5-1.4-25.1,0.6-36.4,6c-1.3,0.6-2.6,1.3-3.9,2c-15.6,8.7-27,22.9-31.9,40.1c-4.9,17.1-2.8,35.1,5.8,50.5 c10.4,18.6,29.3,31.2,50.6,33.6c12.4,1.4,25-0.6,36.3-6c1.3-0.6,2.6-1.3,3.9-2c15.3-8.5,26.8-22.8,31.6-39.2l0-0.1L167.8,91 l0.1-0.2l0-0.1c4.1-10.5,9.3-17,17-21.3c0.7-0.4,1.4-0.7,2.1-1.1c6.1-2.9,12.8-4,19.5-3.2c11.5,1.3,21.6,8.1,27.2,18.1 c9.6,17.2,3.3,39.1-14,48.7c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.7,3.2c-2-0.2-4.1-0.6-6.1-1.2l-0.2-0.1l-11.3-3.4 c-1.2-0.4-2.5,0.3-2.9,1.5l-8.8,24.8c-0.5,1.3,0.3,2.7,1.6,3.1l13.9,4c3.4,0.9,6.8,1.6,10.3,2c12.4,1.4,25-0.6,36.3-6l0.1,0 c1.3-0.6,2.6-1.3,3.9-2C266.8,140.8,278.5,100.1,260.7,68.1z"})))},function(e,t,n){"use strict";var __=wp.i18n.__,r=wp.components.Spinner,i=function(){return wp.element.createElement("div",{className:"wp-block-embed is-loading"},wp.element.createElement(r,null),wp.element.createElement("p",null,__("Embedding\u2026")))};t.a=i},function(e,t,n){"use strict";var __=wp.i18n.__,r=wp.element.Fragment,i=wp.components,o=i.IconButton,a=i.Toolbar,l=wp.editor.BlockControls,c=function(e){var t=e.showEditButton,n=e.switchBackToURLInput;return wp.element.createElement(r,null,wp.element.createElement(l,null,wp.element.createElement(a,null,t&&wp.element.createElement(o,{className:"components-toolbar__control",label:__("Edit URL"),icon:"edit",onClick:n}))))};t.a=c},function(e,t,n){"use strict";var r=n(11),i=n.n(r),o=wp.i18n,__=o.__,_x=o._x,a=wp.components,l=a.Button,c=a.Placeholder,s=a.ExternalLink,u=wp.blockEditor.BlockIcon,p=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,a=e.onChange,p=e.cannotEmbed,m=e.docLink,f=e.DocTitle,d=i()("wp-block-embed",{});return wp.element.createElement("div",null,wp.element.createElement(c,{icon:wp.element.createElement(u,{icon:t,showColors:!0}),label:n,className:d},wp.element.createElement("form",{onSubmit:o},wp.element.createElement("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:__("Enter URL to embed here\u2026"),onChange:a}),wp.element.createElement(l,{isSmall:!0,type:"submit"},_x("Embed","button label")),p&&wp.element.createElement("p",{className:"components-placeholder__error"},__("Sorry, we could not embed that content."),wp.element.createElement("br",null))),m&&wp.element.createElement("div",{className:"components-placeholder__learn-more"},wp.element.createElement(s,{href:m},f))))};t.a=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(5),l=n.n(a),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element.Component,p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.myRef=React.createRef(),n}return o(t,e),s(t,[{key:"componentDidMount",value:function(){l.a.findDOMNode(this.myRef.current).addEventListener("load",this.props.onLoad)}},{key:"render",value:function(){return wp.element.createElement("iframe",c({ref:this.myRef},this.props))}}]),t}(u);t.a=p},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(7),n(12),n(16),n(20),n(24),n(28),n(32),n(36),n(40),n(44),n(48);!function(){var e=wp.element.createElement("svg",{width:"33",height:"20",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 270 270"},wp.element.createElement("g",null,wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"0,0 0,52 15,52 15,15 52,15 52,0 \t"}),wp.element.createElement("polygon",{className:"st0",fill:"#9595C1",points:"255,218 255,255 218,255 218,270 270,270 270,218 \t"}),wp.element.createElement("path",{fill:"#5B4E96",d:"M260.7,68.1c-10.4-18.6-29.3-31.2-50.6-33.6c-12.4-1.4-25,0.6-36.3,6c-1.3,0.6-2.6,1.3-3.9,2 C154.5,51,143,65.3,138.3,81.7l0,0.1l-36.4,103.8c-3.1,9.4-9.1,17-17.1,21.4c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.5,3.2 c-11.5-1.3-21.6-8.1-27.2-18.1c-4.6-8.3-5.7-18-3.1-27.2c2.6-9.2,8.7-16.9,17.1-21.5c0.7-0.4,1.4-0.8,2.1-1.1 c6.1-2.9,12.7-4,19.6-3.2c0.3,0,0.5,0.1,0.8,0.1L64.9,162c-0.5,1.5,0.3,3.1,1.8,3.6l19.4,6.3c1.5,0.5,3-0.3,3.5-1.7l16.7-47.4 c0.4-1.2,0.3-2.5-0.3-3.6c-0.6-1.1-1.6-2-2.8-2.4l-17.6-5.1c-0.4-0.1-0.8-0.2-1.2-0.3l-1.6-0.5l0,0.1c-2.5-0.6-5-1.1-7.5-1.3 c-12.5-1.4-25.1,0.6-36.4,6c-1.3,0.6-2.6,1.3-3.9,2c-15.6,8.7-27,22.9-31.9,40.1c-4.9,17.1-2.8,35.1,5.8,50.5 c10.4,18.6,29.3,31.2,50.6,33.6c12.4,1.4,25-0.6,36.3-6c1.3-0.6,2.6-1.3,3.9-2c15.3-8.5,26.8-22.8,31.6-39.2l0-0.1L167.8,91 l0.1-0.2l0-0.1c4.1-10.5,9.3-17,17-21.3c0.7-0.4,1.4-0.7,2.1-1.1c6.1-2.9,12.8-4,19.5-3.2c11.5,1.3,21.6,8.1,27.2,18.1 c9.6,17.2,3.3,39.1-14,48.7c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.7,3.2c-2-0.2-4.1-0.6-6.1-1.2l-0.2-0.1l-11.3-3.4 c-1.2-0.4-2.5,0.3-2.9,1.5l-8.8,24.8c-0.5,1.3,0.3,2.7,1.6,3.1l13.9,4c3.4,0.9,6.8,1.6,10.3,2c12.4,1.4,25-0.6,36.3-6l0.1,0 c1.3-0.6,2.6-1.3,3.9-2C266.8,140.8,278.5,100.1,260.7,68.1z"})));wp.blocks.updateCategory("embedpress",{icon:e})}()},function(e,t,n){"use strict";var r=n(8),i=(n.n(r),n(9)),o=(n.n(i),n(10)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-docs-block",{title:__("Google Docs"),icon:a.c,category:"embedpress",keywords:[__("embedpress"),__("google"),__("docs")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("figure",{className:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))},deprecated:[{attributes:{align:{type:"string",enum:["left","center","right","wide","full"]}},save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("div",{className:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element.Component,f=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.updateAlignment=e.updateAlignment.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"updateAlignment",value:function(e){var t=this.props.setAttributes,n=-1!==["wide","full"].indexOf(e)?{width:void 0,height:void 0}:{};t(Object.assign({},n,{align:e}))}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,o=i.exec(r),a=o[1];a&&"document"===a?(r.match(/([?&])embedded=true/i)||(r.indexOf("?")>-1?r+="&embedded=true":r+="?embedded=true"),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Google Docs URL");return!m||r?wp.element.createElement("div",null,wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.c,DocTitle:__("Learn more about Google doc embed"),docLink:"https://embedpress.com/docs/embed-google-docs-wordpress/"})):wp.element.createElement("div",null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,{src:m,onMouseUp:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameBorder:"0",width:"600",height:"450"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(m);t.a=f},function(e,t,n){var r,i;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===i)for(var l in r)o.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(i=function(){return n}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){"use strict";var r=n(13),i=(n.n(r),n(14)),o=(n.n(i),n(15)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-slides-block",{title:__("Google Slides"),icon:a.h,category:"embedpress",keywords:[__("embedpress"),__("google"),__("slides")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-presentation"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,h=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,o=i.exec(r),a=o[1];a&&"presentation"==a?(r.match(/pub\?/i)&&(r=r.replace("/pub?","/embed?")),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Google Slides URL");return!m||r?wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.h,DocTitle:__("Learn more about Google slides embed"),docLink:"https://embedpress.com/docs/embed-google-slides-wordpress/"}):wp.element.createElement(d,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,{src:m,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=h},function(e,t,n){"use strict";var r=n(17),i=(n.n(r),n(18)),o=(n.n(i),n(19)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-sheets-block",{title:__("Google Sheets"),icon:a.g,category:"embedpress",keywords:[__("embedpress"),__("google"),__("sheets")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))},deprecated:[{attributes:{align:{type:"string",enum:["left","center","right","wide","full"]}},save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("div",{className:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameBorder:"0",width:"600",height:"450",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,h=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,o=i.exec(r),a=o[1];if(a&&"spreadsheets"==a){if(r.indexOf("?")>-1){var l=r.split("?");if(l=l[1],l=l.split("&"),console.log(l),l.length>0){var c=!1,s=!1;l.map(function(e){e.indexOf("widget=")?s=!0:e.indexOf("headers=")&&(c=!0)}),s||(r+="&widget=true"),c||(r+="&headers=false")}}else r+="?widget=true&headers=false";this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Google Sheets URL");return!m||r?wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.g,DocTitle:__("Learn more about Google sheet embed"),docLink:"https://embedpress.com/docs/embed-google-sheets-wordpress/"}):wp.element.createElement(d,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,{src:m,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=h},function(e,t,n){"use strict";var r=n(21),i=(n.n(r),n(22)),o=(n.n(i),n(23)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-forms-block",{title:__("Google Forms"),icon:a.e,category:"embedpress",keywords:[__("embedpress"),__("google"),__("forms")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-forms"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,h=(wp.components.Disabled,function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,o=i.exec(r),a=o[1];a&&"forms"==a?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Google Forms URL");return!m||r?wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.e,DocTitle:__("Learn more about Google forms embed"),docLink:"https://embedpress.com/docs/embed-google-forms-wordpress/"}):wp.element.createElement(d,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,{src:m,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f));t.a=h},function(e,t,n){"use strict";var r=n(25),i=(n.n(r),n(26)),o=(n.n(i),n(27)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-drawings-block",{title:__("Google Drawings"),icon:a.d,category:"embedpress",keywords:[__("embedpress"),__("google"),__("drawings")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-docs-drawings"},wp.element.createElement("img",{src:t,width:"960",height:"720"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(0),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,p=wp.element,m=p.Component,f=p.Fragment,d=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return o(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),i=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,o=i.exec(r),a=o[1];a&&"drawings"==a?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,u=this.props.attributes.iframeSrc,p=__("Google Drawings URL (Get your link from File -> Publish to the web -> Link)");return!u||r?wp.element.createElement(c.a,{label:p,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:s.d,DocTitle:__("Learn more about Google drawing embed"),docLink:"https://embedpress.com/docs/embed-google-drawings-wordpress/"}):wp.element.createElement(f,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement("img",{src:u,onLoad:this.onLoad,style:{display:i?"none":""},width:"960",height:"720"}),wp.element.createElement(a.a,{showEditButton:u&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(m);t.a=d},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(29),o=(n.n(i),n(30)),a=(n.n(o),n(31)),l=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-maps-block",{title:__("Google Maps"),icon:l.f,category:"embedpress",keywords:[__("embedpress"),__("google"),__("maps")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:a.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("figure",{className:"ose-google-maps"},wp.element.createElement("iframe",r({src:t,frameborder:"0",width:"600",height:"450"},"frameborder","0")))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,h=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/(?:(?:(?:www\.|maps\.)?(?:google\.com?))|(?:goo\.gl))(?:\.[a-z]{2})?\/(?:maps\/)?(?:place\/)?(?:[a-z0-9\/%+\-_]*)?([a-z0-9\/%,+\-_=!:@\.&*\$#?\']*)/i)){var r=this.decodeHTMLEntities(t);if(t.match("~(maps/embed|output=embed)~i"));else{var i=/@(-?[0-9\.]+,-?[0-9\.]+).+,([0-9\.]+[a-z])/i,o=i.exec(r);o&&o.length>1&&o[1]&&o[2]?r="https://maps.google.com/maps?hl=en&ie=UTF8&ll="+o[1]+"&spn="+o[1]+"&t=m&z="+Math.round(parseInt(o[2]))+"&output=embed":this.setState({cannotEmbed:!0,editingURL:!0})}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Google Maps URL");return!m||r?wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.f,DocTitle:__("Learn more about Google map embed"),docLink:"https://embedpress.com/docs/embed-google-maps-wordpress/"}):wp.element.createElement(d,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,{src:m,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"450"}),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=h},function(e,t,n){"use strict";var r=n(33),i=(n.n(r),n(34)),o=(n.n(i),n(35)),a=n(0),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/twitch-block",{title:__("Twitch"),icon:a.i,category:"embedpress",keywords:[__("embedpress"),__("twitch")],supports:{align:["wide","full","right","left"],default:""},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""},attrs:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes,n=t.iframeSrc,r=t.attrs,i=n+"&parent="+embedpressObj.twitch_host;return wp.element.createElement("figure",{className:"ose-twitch-presentation"},wp.element.createElement("iframe",l({src:i},r,{frameborder:"0",width:"600",height:"450"})))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,f=wp.element,d=f.Component,h=f.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),m(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=/http[s]?:\/\/(?:www\.|clips\.)twitch\.tv\/([0-9a-zA-Z\-\_]+)\/?(chat\/?$|[0-9a-z\-\_]*)?/;if(t&&t.match(r)){var i=this.decodeHTMLEntities(t),o=r.exec(i),a=o[1];console.log(a);var l,c="channel";switch(t.indexOf("clips.twitch.tv")>-1?c="clip":t.indexOf("/videos/")>-1?c="video":t.indexOf("#/chat$#")>-1&&(c="chat"),console.log(c),c){case"channel":i="https://player.twitch.tv/?channel="+a,l={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"clip":i="https://clips.twitch.tv/embed?clip="+a+"&autoplay=false",l={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"video":a=o[2],i="https://player.twitch.tv/?video="+a,l={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"chat":i="http://www.twitch.tv/embed/"+a+"/chat",l={scrolling:"yes",frameborder:"0",allowfullscreen:"true",id:"'"+a+"'"}}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:i,attrs:l})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,m=t.interactive,f=this.props.attributes,d=f.iframeSrc,w=f.attrs,b=__("Twitch URL");if(!d||r)return wp.element.createElement(c.a,{label:b,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.i,DocTitle:__("Learn more about twitch embed"),docLink:"https://embedpress.com/docs/embed-twitch-streams-chat/"});var y=d+"&parent="+embedpressObj.twitch_host;return wp.element.createElement(h,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,p({src:y},w,{onLoad:this.onLoad,style:{display:i?"none":""},onFocus:this.hideOverlay,width:"600",height:"450"})),!m&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:d&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(d);t.a=w},function(e,t,n){"use strict";var r=n(37),i=(n.n(r),n(38)),o=(n.n(i),n(39)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/wistia-block",{title:__("Wistia"),icon:a.j,category:"embedpress",keywords:[__("embedpress"),__("wistia")],supports:{align:["wide","full","right","left"],default:""},edit:o.a,save:function(e){return null},deprecated:[{attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-wistia"},wp.element.createElement("iframe",{src:t,allowtransparency:"true",frameborder:"0",class:"wistia_embed",name:"wistia_embed",width:"600",height:"330"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,h=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1,mediaId:null},e.setUrl(),e}return o(t,e),p(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"componentDidMount",value:function(){if(this.props.attributes.url){var e=this.props.attributes.url.match(/medias\/(.*)/),t=e[1];this.setState(Object.assign({},this.state,{mediaId:t}))}}},{key:"onLoad",value:function(){if(this.setState({fetching:!1}),embedpressObj.wisita_options){var e=Object.assign({},this.state);setTimeout(function(){var e=document.createElement("script");e.src="https://fast.wistia.com/assets/external/E-v1.js",e.charset="ISO-8859-1",document.body.appendChild(e)},100),setTimeout(function(){var t=document.createElement("script");t.type="text/javascript",t.innerHTML="window.pp_embed_wistia_labels = "+embedpressObj.wistia_labels,document.body.appendChild(t),t=document.createElement("script"),t.type="text/javascript",t.innerHTML='wistiaEmbed = Wistia.embed( "'+e.mediaId+'", '+embedpressObj.wisita_options+" );",document.body.appendChild(t)},400)}}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&(t.match(/^http[s]?:\/\/(?:www\.)?wistia\.com\/medias/i)||t.match(/^http[s]?:\/\/(?:www\.)?fast\/.wistia\.com\/embed\/medias/i.jsonp))){var r=t.match(/medias\/(.*)/),i=r[1],o="//fast.wistia.net/embed/iframe/"+i;this.setState({editingURL:!1,cannotEmbed:!1,mediaId:i}),n({iframeSrc:o})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,p=t.interactive,m=this.props.attributes.iframeSrc,f=__("Wistia URL");return!m||r?wp.element.createElement(c.a,{label:f,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.j,DocTitle:__("Learn more about Wistia embed"),docLink:"https://embedpress.com/docs/embed-wistia-videos-wordpress/"}):wp.element.createElement(d,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement("div",{className:"ose-wistia",id:"wistia_"+this.state.mediaId},wp.element.createElement(s.a,{src:m,onFocus:this.hideOverlay,onLoad:this.onLoad,style:{display:i?"none":""},frameborder:"0",width:"600",height:"330"})),!p&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:m&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(f);t.a=h},function(e,t,n){"use strict";var r=n(41),i=(n.n(r),n(42)),o=(n.n(i),n(43)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/youtube-block",{title:__("Youtube"),icon:a.k,category:"embedpress",keywords:[__("embedpress"),__("youtube")],supports:{align:["wide","full","right","left"],default:""},edit:o.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),l=n(1),c=n(3),s=n(4),u=n(0),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,f=wp.element,d=f.Component,h=f.Fragment,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,interactive:!1},e}return o(t,e),m(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"componentWillMount",value:function(){this.state.url&&this.setUrl()}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/);if(t&&r){var i=r[1],o="https://www.youtube.com/embed/"+i,a=new URL(o);if("undefined"!==typeof embedpressProObj)for(var l in embedpressProObj.youtubeParams)a.searchParams.set(l,embedpressProObj.youtubeParams[l]);this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:a.href,mediaId:i})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,i=t.fetching,o=t.cannotEmbed,m=t.interactive,f=this.props.attributes,d=f.iframeSrc,w=f.attrs,b=__("Youtube URL");return!d||r?wp.element.createElement(c.a,{label:b,onSubmit:this.setUrl,value:n,cannotEmbed:o,onChange:function(t){return e.setState({url:t.target.value})},icon:u.k,DocTitle:__("Learn More About Youtube Embed"),docLink:"https://embedpress.com/docs/embed-youtube-wordpress/"}):wp.element.createElement(h,null,i?wp.element.createElement(l.a,null):null,wp.element.createElement(s.a,p({src:d},w,{onLoad:this.onLoad,style:{display:i?"none":""},width:"640",onFocus:this.hideOverlay,height:"450"})),!m&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),wp.element.createElement(a.a,{showEditButton:d&&!o,switchBackToURLInput:this.switchBackToURLInput}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(d);t.a=w},function(e,t,n){"use strict";var r=n(45),i=(n.n(r),n(46)),o=(n.n(i),n(47)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/document",{title:__("Document"),icon:a.a,category:"embedpress",keywords:[__("embedpress"),__("pdf"),__("doc"),__("ppt")],supports:{align:["wide","full","right","left"],default:""},attributes:{id:{type:"string"},href:{type:"string"},powered_by:{type:"boolean",default:!0},width:{type:"number",default:600},height:{type:"number",default:600},fileName:{type:"string"},mime:{type:"string"}},edit:o.a,save:function(e){var t=e.attributes,n=t.href,r=t.mime,i=t.id,o=t.width,a=t.height,l=t.powered_by,c="//view.officeapps.live.com/op/embed.aspx?src="+n;return wp.element.createElement("figure",{className:"embedpress-embed-document"},"application/pdf"===r&&wp.element.createElement("div",{style:{height:a,width:o},className:"embedpress-embed-document-pdf "+i,"data-emid":i,"data-emsrc":n}),"application/pdf"!==r&&wp.element.createElement("iframe",{style:{height:a,width:o},src:c,mozallowfullscreen:"true",webkitallowfullscreen:"true"}),l&&wp.element.createElement("p",{className:"embedpress-el-powered"},"Powered By EmbedPress"))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(4),l=n(1),c=n(0),s=function(){function e(e,t){var n=[],_n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,i=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),__=wp.i18n.__,p=wp.blob,m=p.getBlobByURL,f=p.isBlobURL,d=p.revokeBlobURL,h=wp.editor,w=h.BlockIcon,b=h.MediaPlaceholder,y=h.InspectorControls,v=wp.element,g=v.Component,E=v.Fragment,L=wp.components,k=L.RangeControl,_=L.PanelBody,O=L.ExternalLink,S=L.ToggleControl,U=["application/pdf","application/msword","application/vnd.ms-powerpoint","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation"],R=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onSelectFile=e.onSelectFile.bind(e),e.onUploadError=e.onUploadError.bind(e),e.onLoad=e.onLoad.bind(e),e.hideOverlay=e.hideOverlay.bind(e),e.state={hasError:!1,fetching:!1,interactive:!1,loadPdf:!0},e}return o(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,i=t.noticeOperations,o=n.href;if(f(o)){r({filesList:[m(o)],onFileChange:function(t){var n=s(t,1),r=n[0];return e.onSelectFile(r)},onError:function(t){e.setState({hasError:!0}),i.createErrorNotice(t)}}),d(o)}this.props.attributes.href&&"application/pdf"===this.props.attributes.mime&&this.state.loadPdf&&(this.setState({loadPdf:!1}),PDFObject.embed(this.props.attributes.href,"."+this.props.attributes.id))}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:e.title,id:"embedpress-pdf-"+Date.now(),mime:e.mime}),embedpressObj.embedpress_pro&&this.props.setAttributes({powered_by:!1}),"application/pdf"===e.mime&&(this.setState({loadPdf:!1}),PDFObject.embed(e.url,"."+this.props.attributes.id)))}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.noticeUI,r=e.setAttributes,i=t.href,o=t.mime,s=t.id,u=t.width,p=t.height,m=t.powered_by,f=this.state,d=f.hasError,h=f.interactive,v=f.fetching,g=f.loadPdf;if(!i||d)return wp.element.createElement("div",{className:"embedpress-document-editmode"},wp.element.createElement(b,{icon:wp.element.createElement(w,{icon:c.a}),labels:{title:__("Document"),instructions:__("Upload a file or pick one from your media library for embed.")},onSelect:this.onSelectFile,notices:n,allowedTypes:U,onError:this.onUploadError},wp.element.createElement("div",{style:{width:"100%"},className:"components-placeholder__learn-more embedpress-doc-link"},wp.element.createElement(O,{href:"https://embedpress.com/docs/embed-docuemnt/"},"Learn more about Embedded document "))));var L="//view.officeapps.live.com/op/embed.aspx?src="+i;return wp.element.createElement(E,null,v&&"application/pdf"!==o?wp.element.createElement(l.a,null):null,"application/pdf"===o&&wp.element.createElement("div",{style:{height:p,width:u},className:"embedpress-embed-document-pdf "+s,"data-emid":s,"data-emsrc":i}),"application/pdf"!==o&&wp.element.createElement(a.a,{onMouseUponMouseUp:this.hideOverlay,style:{height:p,width:u,display:v||!g?"none":""},onLoad:this.onLoad,src:L}),!h&&wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),m&&wp.element.createElement("p",{className:"embedpress-el-powered"},"Powered By EmbedPress"),wp.element.createElement(y,{key:"inspector"},wp.element.createElement(_,{title:__("Embed Size","embedpress")},wp.element.createElement(k,{label:__("Width","embedpress"),value:u,onChange:function(e){return r({width:e})},max:1e3,min:1}),wp.element.createElement(k,{label:__("Height","embedpress"),value:p,onChange:function(e){return r({height:e})},max:1e3,min:1}),wp.element.createElement(S,{label:__("Powered By"),onChange:function(e){return r({powered_by:e})},checked:m}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(g);t.a=R},function(e,t,n){"use strict";var r=n(49),i=(n.n(r),n(50)),o=(n.n(i),n(51)),a=n(0),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/embedpress",{title:__("EmbedPress"),icon:a.b,category:"embedpress",keywords:["embedpress","embed","google","youtube","docs"],supports:{align:["wide","full","right","left"],default:"",html:!0},attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""},embedHTML:{type:"string",default:""},height:{type:"string",default:"360"},width:{type:"string",default:"600"},editingURL:{type:"boolean",default:!1},fetching:{type:"boolean",default:!0},cannotEmbed:{type:"boolean",default:!1},interactive:{type:"boolean",default:!1}},edit:o.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(i,o){try{var a=t[i](o),l=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}return r("next")})}}function i(e){function t(){m({editingURL:!0})}function n(e){var t=this;if(e&&e.preventDefault(),b){(function(){var e=r(a.a.mark(function e(n){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m({fetching:!0}),e.next=3,fetch(embedpressObj.site_url+"/wp-json/embedpress/v1/oembed/embedpress?url="+n+"&width="+k+"&height="+L).then(function(e){return e.json()});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,t)}));return function(_x){return e.apply(this,arguments)}})()(b).then(function(e){m({fetching:!1}),m(e.data&&404===e.data.status||!e.embed?{cannotEmbed:!0,editingURL:!0}:{embedHTML:e.embed,cannotEmbed:!1,editingURL:!1})})}else m({cannotEmbed:!0,editingURL:!0})}var i=e.attributes,o=e.className,m=e.setAttributes,b=i.url,y=i.editingURL,v=i.fetching,g=i.cannotEmbed,E=(i.interactive,i.embedHTML),L=i.height,k=i.width;return wp.element.createElement(w,null,wp.element.createElement(h,null,wp.element.createElement(d,{title:__("Customize Embedded Link")},wp.element.createElement(f,{label:__("Width"),value:k,onChange:function(e){return m({width:e})}}),wp.element.createElement(f,{label:__("Height"),value:L,onChange:function(e){return m({height:e})}}))),(!E||y)&&wp.element.createElement(s.a,{label:__("EmbedPress - Embed anything from 100+ sites"),onSubmit:n,value:b,cannotEmbed:g,onChange:function(e){return m({url:e.target.value})},icon:p.b,DocTitle:__("Learn more about EmbedPress"),docLink:"https://embedpress.com/docs/"}),E&&!y&&wp.element.createElement("div",{className:o},v?wp.element.createElement(c.a,null):null,wp.element.createElement(u.a,{style:{display:v?"none":""},dangerouslySetInnerHTML:{__html:E}}),wp.element.createElement("div",{className:"block-library-embed__interactive-overlay",onMouseUp:m({interactive:!0})}),wp.element.createElement(l.a,{showEditButton:E&&!g,switchBackToURLInput:t})))}t.a=i;var o=n(52),a=n.n(o),l=n(2),c=n(1),s=n(3),u=n(55),p=n(0),__=wp.i18n.__,m=wp.components,f=m.TextControl,d=m.PanelBody,h=wp.blockEditor.InspectorControls,w=wp.element.Fragment},function(e,t,n){e.exports=n(53)},function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(54),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),l=new f(r||[]);return a._invoke=s(e,n,l),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,i,o,a){var l=r(e[n],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"===typeof s&&y.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(s).then(function(e){c.value=e,o(c)},a)}a(l.arg)}function n(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return i=i?i.then(r,r):r()}var i;this._invoke=n}function s(e,t,n){var i=O;return function(o,a){if(i===U)throw new Error("Generator is already running");if(i===R){if("throw"===o)throw a;return h()}for(n.method=o,n.arg=a;;){var l=n.delegate;if(l){var c=u(l,n);if(c){if(c===C)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===O)throw i=R,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=U;var s=r(e,t,n);if("normal"===s.type){if(i=n.done?R:S,s.arg===C)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=R,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===w){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=w,u(e,t),"throw"===t.method))return C;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return C}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,C;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=w),t.delegate=null,C):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,C)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[g];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=w,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:w,done:!0}}var w,b=Object.prototype,y=b.hasOwnProperty,v="function"===typeof Symbol?Symbol:{},g=v.iterator||"@@iterator",E=v.asyncIterator||"@@asyncIterator",L=v.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var O="suspendedStart",S="suspendedYield",U="executing",R="completed",C={},x={};x[g]=function(){return this};var M=Object.getPrototypeOf,T=M&&M(M(d([])));T&&T!==b&&y.call(T,g)&&(x=T);var j=a.prototype=i.prototype=Object.create(x);o.prototype=j.constructor=a,a.constructor=o,a[L]=o.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,L in e||(e[L]="GeneratorFunction")),e.prototype=Object.create(j),e},_.awrap=function(e){return{__await:e}},l(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,i){var o=new c(n(e,t,r,i));return _.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},l(j),j[L]="Generator",j[g]=function(){return this},j.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=w,this.done=!1,this.delegate=null,this.method="next",this.arg=w,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=w)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=w),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),l=y.call(i,"finallyLoc");if(a&&l){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,C):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),C},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;m(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=w),C}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(5),l=n.n(a),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element.Component,p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.myRef=React.createRef(),n}return o(t,e),s(t,[{key:"componentDidMount",value:function(){l.a.findDOMNode(this.myRef.current).addEventListener("load",this.props.onLoad)}},{key:"render",value:function(){return wp.element.createElement("div",c({ref:this.myRef},this.props))}}]),t}(u);t.a=p}]);
Gutenberg/dist/blocks.editor.build.css CHANGED
@@ -1 +1,2 @@
1
  .embedpress-document-editmode .components-placeholder__instructions:after{content:"\ASupported File Type: PDF, DOC, PPT, XLS etc ";white-space:pre}
 
1
  .embedpress-document-editmode .components-placeholder__instructions:after{content:"\ASupported File Type: PDF, DOC, PPT, XLS etc ";white-space:pre}
2
+ .wp-block-embedpress-embedpress iframe{width:100%;height:100%}
Gutenberg/dist/blocks.style.build.css CHANGED
@@ -1 +1,2 @@
1
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:0 !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-document-editmode .components-form-file-upload{display:none !important}
 
1
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:0 !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-document-editmode .components-form-file-upload{display:none !important}
2
+ .embedpress-gutenberg-wrapper iframe{width:100%;height:100%}
Gutenberg/package.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "name": "embedpress-blocks-cgb-guten-block",
3
- "version": "1.0.0",
4
- "private": true,
5
- "scripts": {
6
- "start": "cgb-scripts start",
7
- "build": "cgb-scripts build",
8
- "eject": "cgb-scripts eject"
9
- },
10
- "dependencies": {
11
- "cgb-scripts": "1.15.0",
12
- "classnames": "^2.2.5"
13
- }
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Gutenberg/src/blocks.js CHANGED
@@ -19,6 +19,7 @@ import './twitch/index.js';
19
  import './wistia/index.js';
20
  import './youtube/index.js';
21
  import './document/index.js';
 
22
 
23
  ( function() {
24
  let a = <svg width="33" height="20" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
19
  import './wistia/index.js';
20
  import './youtube/index.js';
21
  import './document/index.js';
22
+ import './embedpress/index.js';
23
 
24
  ( function() {
25
  let a = <svg width="33" height="20" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
Gutenberg/src/common/Iframe.js CHANGED
@@ -6,9 +6,12 @@ import ReactDOM from 'react-dom'
6
  const { Component } = wp.element;
7
 
8
  class Iframe extends Component {
9
-
 
 
 
10
  componentDidMount () {
11
- let iframe = ReactDOM.findDOMNode(this.refs.iframe)
12
  iframe.addEventListener('load', this.props.onLoad);
13
  }
14
 
@@ -16,9 +19,9 @@ class Iframe extends Component {
16
 
17
  return (
18
  <iframe
19
- ref="iframe"
20
  {...this.props}
21
-
22
  />
23
  )
24
  }
6
  const { Component } = wp.element;
7
 
8
  class Iframe extends Component {
9
+ constructor(props) {
10
+ super(props);
11
+ this.myRef = React.createRef();
12
+ }
13
  componentDidMount () {
14
+ let iframe = ReactDOM.findDOMNode(this.myRef.current)
15
  iframe.addEventListener('load', this.props.onLoad);
16
  }
17
 
19
 
20
  return (
21
  <iframe
22
+ ref={this.myRef}
23
  {...this.props}
24
+
25
  />
26
  )
27
  }
Gutenberg/src/common/core-embeds.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * Internal dependencies
3
  */
4
- import { embedGoogleDocsIcon } from './icons';
5
  /**
6
  * WordPress dependencies
7
  */
@@ -12,7 +12,7 @@ export const common = [
12
  name: 'embedpress-blocks/google',
13
  settings: {
14
  title: 'Google Docs',
15
- icon: embedGoogleDocsIcon,
16
  keywords: [ 'google' , 'docs' ],
17
  description: __( 'Embed a google document.' ),
18
  },
1
  /**
2
  * Internal dependencies
3
  */
4
+ import { googleDocsIcon } from './icons';
5
  /**
6
  * WordPress dependencies
7
  */
12
  name: 'embedpress-blocks/google',
13
  settings: {
14
  title: 'Google Docs',
15
+ icon: googleDocsIcon,
16
  keywords: [ 'google' , 'docs' ],
17
  description: __( 'Embed a google document.' ),
18
  },
Gutenberg/src/common/embed-placeholder.js CHANGED
@@ -22,7 +22,7 @@ const EmbedPlaceholder = (props) => {
22
  placeholder={__('Enter URL to embed here…')}
23
  onChange={onChange}/>
24
  <Button
25
- isLarge
26
  type="submit">
27
  {_x('Embed', 'button label')}
28
  </Button>
22
  placeholder={__('Enter URL to embed here…')}
23
  onChange={onChange}/>
24
  <Button
25
+ isSmall
26
  type="submit">
27
  {_x('Embed', 'button label')}
28
  </Button>
Gutenberg/src/common/embed-wrap.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ INIT: ensure Babel/Eslint/Flow is configured for ES Class Fields & Static Properties
3
+ JSX USAGE: <Epwrap src='http://web.site' onLoad={myOnloadFunction}/>
4
+ */
5
+ import ReactDOM from 'react-dom'
6
+ const { Component } = wp.element;
7
+
8
+ export default class EmbedWrap extends Component {
9
+ constructor(props) {
10
+ super(props);
11
+ this.myRef = React.createRef();
12
+ }
13
+ componentDidMount () {
14
+ let wrap = ReactDOM.findDOMNode(this.myRef.current)
15
+ wrap.addEventListener('load', this.props.onLoad);
16
+ }
17
+
18
+ render () {
19
+
20
+ return (
21
+ <div
22
+ ref={this.myRef}
23
+ {...this.props}
24
+ ></div>
25
+ )
26
+ }
27
+
28
+ }
Gutenberg/src/common/icons.js CHANGED
@@ -24,7 +24,7 @@ export const googleDocsIcon =
24
  export const googleSlidesIcon =
25
  <SVG
26
  xmlns="http://www.w3.org/1999/xlink"
27
- enable-background="new 0 0 24 24" id="Layer_2"
28
  version="1.1"
29
  viewBox="0 0 24 24">
30
  <G>
@@ -43,7 +43,6 @@ export const googleSlidesIcon =
43
 
44
  <Path d="M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14 c1.1045704,0,2-0.8954296,2-2V6z" style={{ fill: "url(#SVGID_2_)" }} />
45
  </G>
46
- <G/><G/><G/><G/><G/><G/><G/><G/><G/><G/><G/><G/><G/><G/><G/>
47
  </SVG>
48
 
49
  export const googleSheetsIcon =
@@ -184,4 +183,29 @@ export const youtubeNewIcon =
184
  </g>
185
  </svg>;
186
 
187
- export const DocumentIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 276 340" ><path d="M196.7.6H24.3C11.1.6.4 11.3.4 24.6v292.9c0 12.3 10 22.2 22.2 22.2H252c13.3 0 23.9-10.7 23.9-23.9V80.9L196.7.6z" fill="#e94848"/><path d="M196.7 57c0 13.3 10.7 23.9 23.9 23.9H276L196.7.6V57z" fill="#f19191"/><linearGradient id="A" gradientUnits="userSpaceOnUse" x1="44.744" y1="77.111" x2="116.568" y2="77.111"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><path d="M113 84.5H48.3c-1.9 0-3.5-1.6-3.5-3.5v-7.7c0-1.9 1.6-3.5 3.5-3.5H113c1.9 0 3.5 1.6 3.5 3.5V81c.1 1.9-1.5 3.5-3.5 3.5z" fill="url(#A)"/><linearGradient id="B" gradientUnits="userSpaceOnUse" x1="44.744" y1="136.016" x2="233.927" y2="136.016"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><use href="#H" opacity=".8" fill="url(#B)"/><linearGradient id="C" gradientUnits="userSpaceOnUse" x1="44.744" y1="135.993" x2="233.927" y2="135.993"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><use href="#H" y="33.6" opacity=".7" fill="url(#C)"/><linearGradient id="D" gradientUnits="userSpaceOnUse" x1="44.744" y1="135.969" x2="233.927" y2="135.969"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><use href="#H" y="67.2" opacity=".6" fill="url(#D)"/><linearGradient id="E" gradientUnits="userSpaceOnUse" x1="44.744" y1="136.045" x2="233.927" y2="136.045"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><use href="#H" y="100.7" opacity=".4" fill="url(#E)"/><linearGradient id="F" gradientUnits="userSpaceOnUse" x1="44.744" y1="270.322" x2="174.778" y2="270.322"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff0f0"/></linearGradient><path d="M171.9 277.7H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9h124.3c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z" opacity=".3" fill="url(#F)"/><defs ><path id="H" d="M231 143.4H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9H231c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z"/></defs></svg>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  export const googleSlidesIcon =
25
  <SVG
26
  xmlns="http://www.w3.org/1999/xlink"
27
+ enableBackground="new 0 0 24 24" id="Layer_2"
28
  version="1.1"
29
  viewBox="0 0 24 24">
30
  <G>
43
 
44
  <Path d="M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14 c1.1045704,0,2-0.8954296,2-2V6z" style={{ fill: "url(#SVGID_2_)" }} />
45
  </G>
 
46
  </SVG>
47
 
48
  export const googleSheetsIcon =
183
  </g>
184
  </svg>;
185
 
186
+ export const DocumentIcon = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 276 340" ><path d="M196.7.6H24.3C11.1.6.4 11.3.4 24.6v292.9c0 12.3 10 22.2 22.2 22.2H252c13.3 0 23.9-10.7 23.9-23.9V80.9L196.7.6z" fill="#e94848"/><path d="M196.7 57c0 13.3 10.7 23.9 23.9 23.9H276L196.7.6V57z" fill="#f19191"/><linearGradient id="A" gradientUnits="userSpaceOnUse" x1="44.744" y1="77.111" x2="116.568" y2="77.111"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><path d="M113 84.5H48.3c-1.9 0-3.5-1.6-3.5-3.5v-7.7c0-1.9 1.6-3.5 3.5-3.5H113c1.9 0 3.5 1.6 3.5 3.5V81c.1 1.9-1.5 3.5-3.5 3.5z" fill="url(#A)"/><linearGradient id="B" gradientUnits="userSpaceOnUse" x1="44.744" y1="136.016" x2="233.927" y2="136.016"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><use href="#H" opacity=".8" fill="url(#B)"/><linearGradient id="C" gradientUnits="userSpaceOnUse" x1="44.744" y1="135.993" x2="233.927" y2="135.993"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><use href="#H" y="33.6" opacity=".7" fill="url(#C)"/><linearGradient id="D" gradientUnits="userSpaceOnUse" x1="44.744" y1="135.969" x2="233.927" y2="135.969"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><use href="#H" y="67.2" opacity=".6" fill="url(#D)"/><linearGradient id="E" gradientUnits="userSpaceOnUse" x1="44.744" y1="136.045" x2="233.927" y2="136.045"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><use href="#H" y="100.7" opacity=".4" fill="url(#E)"/><linearGradient id="F" gradientUnits="userSpaceOnUse" x1="44.744" y1="270.322" x2="174.778" y2="270.322"><stop offset="0" stopColor="#fff"/><stop offset="1" stopColor="#fff0f0"/></linearGradient><path d="M171.9 277.7H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9h124.3c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z" opacity=".3" fill="url(#F)"/><defs ><path id="H" d="M231 143.4H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9H231c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z"/></defs></svg>;
187
+ export const embedPressIcon =<svg
188
+ width="33"
189
+ height="20"
190
+ version="1.1"
191
+ id="Layer_1"
192
+ xmlns="http://www.w3.org/2000/svg"
193
+ x="0px"
194
+ y="0px"
195
+ viewBox="0 0 270 270"
196
+ role="img"
197
+ focusable="false">
198
+ <g>
199
+ <polygon
200
+ className="st0"
201
+ fill="#9595C1"
202
+ points="0,0 0,52 15,52 15,15 52,15 52,0 "></polygon>
203
+ <polygon
204
+ className="st0"
205
+ fill="#9595C1"
206
+ points="255,218 255,255 218,255 218,270 270,270 270,218 "></polygon>
207
+ <path
208
+ fill="#5B4E96"
209
+ d="M260.7,68.1c-10.4-18.6-29.3-31.2-50.6-33.6c-12.4-1.4-25,0.6-36.3,6c-1.3,0.6-2.6,1.3-3.9,2 C154.5,51,143,65.3,138.3,81.7l0,0.1l-36.4,103.8c-3.1,9.4-9.1,17-17.1,21.4c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.5,3.2 c-11.5-1.3-21.6-8.1-27.2-18.1c-4.6-8.3-5.7-18-3.1-27.2c2.6-9.2,8.7-16.9,17.1-21.5c0.7-0.4,1.4-0.8,2.1-1.1 c6.1-2.9,12.7-4,19.6-3.2c0.3,0,0.5,0.1,0.8,0.1L64.9,162c-0.5,1.5,0.3,3.1,1.8,3.6l19.4,6.3c1.5,0.5,3-0.3,3.5-1.7l16.7-47.4 c0.4-1.2,0.3-2.5-0.3-3.6c-0.6-1.1-1.6-2-2.8-2.4l-17.6-5.1c-0.4-0.1-0.8-0.2-1.2-0.3l-1.6-0.5l0,0.1c-2.5-0.6-5-1.1-7.5-1.3 c-12.5-1.4-25.1,0.6-36.4,6c-1.3,0.6-2.6,1.3-3.9,2c-15.6,8.7-27,22.9-31.9,40.1c-4.9,17.1-2.8,35.1,5.8,50.5 c10.4,18.6,29.3,31.2,50.6,33.6c12.4,1.4,25-0.6,36.3-6c1.3-0.6,2.6-1.3,3.9-2c15.3-8.5,26.8-22.8,31.6-39.2l0-0.1L167.8,91 l0.1-0.2l0-0.1c4.1-10.5,9.3-17,17-21.3c0.7-0.4,1.4-0.7,2.1-1.1c6.1-2.9,12.8-4,19.5-3.2c11.5,1.3,21.6,8.1,27.2,18.1 c9.6,17.2,3.3,39.1-14,48.7c-0.7,0.4-1.4,0.7-2.1,1.1c-6.1,2.9-12.8,4-19.7,3.2c-2-0.2-4.1-0.6-6.1-1.2l-0.2-0.1l-11.3-3.4 c-1.2-0.4-2.5,0.3-2.9,1.5l-8.8,24.8c-0.5,1.3,0.3,2.7,1.6,3.1l13.9,4c3.4,0.9,6.8,1.6,10.3,2c12.4,1.4,25-0.6,36.3-6l0.1,0 c1.3-0.6,2.6-1.3,3.9-2C266.8,140.8,278.5,100.1,260.7,68.1z"></path>
210
+ </g>
211
+ </svg>
Gutenberg/src/document/edit.js CHANGED
@@ -176,8 +176,7 @@ class DocumentEdit extends Component {
176
 
177
  ) }
178
  { mime !== 'application/pdf' && (
179
- <Iframe onMouseUponMouseUp={ this.hideOverlay } style={{height:height,width:width,display: fetching || !loadPdf ? 'none' : ''}} onLoad={this.onLoad} src={url}
180
- mozallowfullscreen="true" webkitallowfullscreen="true"/>
181
  ) }
182
  { ! interactive && (
183
  <div
176
 
177
  ) }
178
  { mime !== 'application/pdf' && (
179
+ <Iframe onMouseUponMouseUp={ this.hideOverlay } style={{height:height,width:width,display: fetching || !loadPdf ? 'none' : ''}} onLoad={this.onLoad} src={url}/>
 
180
  ) }
181
  { ! interactive && (
182
  <div
Gutenberg/src/embedpress/edit.js ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import EmbedControls from '../common/embed-controls';
5
+ import EmbedLoading from '../common/embed-loading';
6
+ import EmbedPlaceholder from '../common/embed-placeholder';
7
+ import EmbedWrap from '../common/embed-wrap';
8
+
9
+ /**
10
+ * WordPress dependencies
11
+ */
12
+ const {__} = wp.i18n;
13
+ import {embedPressIcon} from '../common/icons';
14
+ const {TextControl, PanelBody} = wp.components;
15
+ const { InspectorControls } = wp.blockEditor;
16
+ const { Fragment } = wp.element;
17
+
18
+ export default function EmbedPress({attributes, className, setAttributes}){
19
+ const {url, editingURL, fetching, cannotEmbed, interactive, embedHTML, height, width} = attributes;
20
+
21
+ function switchBackToURLInput() {
22
+ setAttributes( {editingURL: true});
23
+ }
24
+ function onLoad() {
25
+ setAttributes( {fetching: false});
26
+ }
27
+
28
+ function embed(event) {
29
+ if (event) event.preventDefault();
30
+ if (url) {
31
+ // send api request to get iframe url
32
+ let fetchData = async (url) => {
33
+ setAttributes({
34
+ fetching: true
35
+ });
36
+ return await fetch(`${embedpressObj.site_url}/wp-json/embedpress/v1/oembed/embedpress?url=${url}&width=${width}&height=${height}`).then(response => response.json());
37
+ }
38
+ fetchData(url).then(data => {
39
+ setAttributes({
40
+ fetching: false
41
+ });
42
+ if ((data.data && data.data.status === 404) || !data.embed){
43
+ setAttributes({
44
+ cannotEmbed: true,
45
+ editingURL: true,
46
+ })
47
+ }else{
48
+ setAttributes({
49
+ embedHTML: data.embed,
50
+ cannotEmbed: false,
51
+ editingURL: false,
52
+ });
53
+ }
54
+ });
55
+
56
+
57
+ } else {
58
+ setAttributes({
59
+ cannotEmbed: true,
60
+ editingURL: true
61
+ })
62
+ }
63
+ }
64
+ return (
65
+ <Fragment>
66
+ <InspectorControls>
67
+ <PanelBody title={__("Customize Embedded Link")}>
68
+ <TextControl
69
+ label={__("Width")}
70
+ value={ width }
71
+ onChange={ ( width ) => setAttributes( { width } ) }
72
+ />
73
+ <TextControl
74
+ label={__("Height")}
75
+ value={ height }
76
+ onChange={ ( height ) => setAttributes( { height } ) }
77
+ />
78
+ </PanelBody>
79
+ </InspectorControls>
80
+
81
+ { (!embedHTML || editingURL) && <EmbedPlaceholder
82
+ label={__('EmbedPress - Embed anything from 100+ sites')}
83
+ onSubmit={embed}
84
+ value={url}
85
+ cannotEmbed={cannotEmbed}
86
+ onChange={(event) => setAttributes({url: event.target.value})}
87
+ icon={embedPressIcon}
88
+ DocTitle={__('Learn more about EmbedPress')}
89
+ docLink={'https://embedpress.com/docs/'}
90
+ /> }
91
+
92
+ {(embedHTML && !editingURL) && <div className={className}>
93
+ {fetching ? <EmbedLoading/> : null}
94
+ <EmbedWrap style={{display: fetching ? 'none' : ''}} dangerouslySetInnerHTML={{
95
+ __html: embedHTML
96
+ }}></EmbedWrap>
97
+
98
+ <div
99
+ className="block-library-embed__interactive-overlay"
100
+ onMouseUp={ setAttributes({interactive: true}) }
101
+ />
102
+
103
+ <EmbedControls
104
+ showEditButton={embedHTML && !cannotEmbed}
105
+ switchBackToURLInput={switchBackToURLInput}
106
+ />
107
+ </div>}
108
+
109
+ </Fragment>
110
+
111
+ );
112
+
113
+ }
114
+
115
+
Gutenberg/src/embedpress/editor.scss ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * #.# Editor Styles
3
+ *
4
+ * CSS for just Backend enqueued after style.scss
5
+ * which makes it higher in priority.
6
+ */
7
+ .wp-block-embedpress-embedpress iframe{
8
+ width: 100%;
9
+ height: 100%;
10
+ }
Gutenberg/src/embedpress/index.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BLOCK: embedpress-blocks
3
+ *
4
+ * Registering a basic block with Gutenberg.
5
+ * Simple block, renders and saves the same content without any interactivity.
6
+ */
7
+
8
+ // Import CSS.
9
+ import './style.scss';
10
+ import './editor.scss';
11
+ import edit from './edit';
12
+ import {embedPressIcon} from '../common/icons';
13
+
14
+ const {__} = wp.i18n; // Import __() from wp.i18n
15
+ const {registerBlockType} = wp.blocks; // Import registerBlockType() from wp.blocks
16
+
17
+ /**
18
+ * Register: aa Gutenberg Block.
19
+ *
20
+ * Registers a new block provided a unique name and an object defining its
21
+ * behavior. Once registered, the block is made editor as an option to any
22
+ * editor interface where blocks are implemented.
23
+ *
24
+ * @link https://wordpress.org/gutenberg/handbook/block-api/
25
+ * @param {string} name Block name.
26
+ * @param {Object} settings Block settings.
27
+ * @return {?WPBlock} The block, if it has been successfully
28
+ * registered; otherwise `undefined`.
29
+ */
30
+ registerBlockType('embedpress/embedpress', {
31
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
32
+ title: __('EmbedPress'), // Block title.
33
+ icon: embedPressIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
34
+ category: 'embedpress', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
35
+ keywords: [
36
+ 'embedpress',
37
+ 'embed',
38
+ 'google',
39
+ 'youtube',
40
+ 'docs',
41
+ ],
42
+ supports: {align: ["wide", "full","right","left"], default: '', html:true},
43
+ attributes: {
44
+ url: {
45
+ type: 'string',
46
+ default: ''
47
+ },
48
+ iframeSrc: {
49
+ type: 'string',
50
+ default: ''
51
+ },
52
+ embedHTML: {
53
+ type: 'string',
54
+ default: ''
55
+ },
56
+ height: {
57
+ type: 'string',
58
+ default: '360'
59
+ },
60
+ width: {
61
+ type: 'string',
62
+ default: '600'
63
+ },
64
+ editingURL: {
65
+ type: 'boolean',
66
+ default: false
67
+ },
68
+ fetching: {
69
+ type: 'boolean',
70
+ default: true
71
+ },
72
+ cannotEmbed: {
73
+ type: 'boolean',
74
+ default: false
75
+ },
76
+ interactive: {
77
+ type: 'boolean',
78
+ default: false
79
+ },
80
+ },
81
+ /**
82
+ * The edit function describes the structure of your block in the context of the editor.
83
+ * This represents what the editor will render when the block is used.
84
+ *
85
+ * The "edit" property must be a valid function.
86
+ *
87
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
88
+ */
89
+ edit,
90
+
91
+ /**
92
+ * The save function defines the way in which the different attributes should be combined
93
+ * into the final markup, which is then serialized by Gutenberg into post_content.
94
+ *
95
+ * The "save" property must be specified and must be a valid function.
96
+ *
97
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
98
+ */
99
+ save: () => null,
100
+ });
Gutenberg/src/embedpress/index.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * It renders gutenberg block of embedpress on the frontend
8
+ * @param array $attributes
9
+ */
10
+ function embedpress_render_block($attributes){
11
+ if ( !empty( $attributes['embedHTML']) ) {
12
+ $embed = apply_filters( 'embedpress_gutenberg_embed', $attributes['embedHTML'], $attributes );
13
+ ob_start();
14
+ ?>
15
+ <div class="embedpress-gutenberg-wrapper">
16
+ <?php echo $embed; ?>
17
+ </div>
18
+ <?php
19
+ return ob_get_clean();
20
+ }
21
+ }
Gutenberg/src/embedpress/style.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * #.# Styles
3
+ *
4
+ * CSS for both Frontend+Backend.
5
+ */
6
+ .embedpress-gutenberg-wrapper iframe{
7
+ width: 100%;
8
+ height: 100%;
9
+ }
Gutenberg/src/google-docs/edit.js CHANGED
@@ -83,7 +83,7 @@ class GoogleDocsEdit extends Component {
83
  var regEx = /google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i;
84
  var match = regEx.exec(iframeSrc);
85
  var type = match[1];
86
- if (type && type == 'document') {
87
  if (!iframeSrc.match(/([?&])embedded=true/i)) {
88
  if (iframeSrc.indexOf('?') > -1) {
89
  iframeSrc += '&embedded=true';
@@ -139,8 +139,7 @@ class GoogleDocsEdit extends Component {
139
  {fetching ? <EmbedLoading/> : null}
140
 
141
  <Iframe src={iframeSrc} onMouseUp={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
142
- frameBorder="0" width="600" height="450" allowFullScreen="true"
143
- mozAllowFullScreen="true" webkitAllowFullScreen="true"/>
144
 
145
  { ! interactive && (
146
  <div
83
  var regEx = /google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i;
84
  var match = regEx.exec(iframeSrc);
85
  var type = match[1];
86
+ if (type && type === 'document') {
87
  if (!iframeSrc.match(/([?&])embedded=true/i)) {
88
  if (iframeSrc.indexOf('?') > -1) {
89
  iframeSrc += '&embedded=true';
139
  {fetching ? <EmbedLoading/> : null}
140
 
141
  <Iframe src={iframeSrc} onMouseUp={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
142
+ frameBorder="0" width="600" height="450"/>
 
143
 
144
  { ! interactive && (
145
  <div
Gutenberg/src/google-forms/edit.js CHANGED
@@ -120,8 +120,7 @@ class GoogleFormsEdit extends Component {
120
  {fetching ? <EmbedLoading/> : null}
121
 
122
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
123
- frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true"
124
- webkitallowfullscreen="true"/>
125
 
126
  { ! interactive && (
127
  <div
120
  {fetching ? <EmbedLoading/> : null}
121
 
122
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
123
+ frameborder="0" width="600" height="450"/>
 
124
 
125
  { ! interactive && (
126
  <div
Gutenberg/src/google-maps/edit.js CHANGED
@@ -121,11 +121,8 @@ class GoogleMapsEdit extends Component {
121
  return (
122
  <Fragment>
123
  {fetching ? <EmbedLoading/> : null}
124
- <Disabled>
125
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
126
- frameborder="0" width="600" height="450" allowfullscreen="true"
127
- mozallowfullscreen="true" webkitallowfullscreen="true"/>
128
- </Disabled>
129
 
130
  { ! interactive && (
131
  <div
121
  return (
122
  <Fragment>
123
  {fetching ? <EmbedLoading/> : null}
 
124
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
125
+ frameborder="0" width="600" height="450"/>
 
 
126
 
127
  { ! interactive && (
128
  <div
Gutenberg/src/google-sheets/edit.js CHANGED
@@ -144,8 +144,7 @@ class GoogleSheetsEdit extends Component {
144
  {fetching ? <EmbedLoading/> : null}
145
 
146
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
147
- frameborder="0" width="600" height="450" allowfullscreen="true"
148
- mozallowfullscreen="true" webkitallowfullscreen="true"/>
149
  { ! interactive && (
150
  <div
151
  className="block-library-embed__interactive-overlay"
144
  {fetching ? <EmbedLoading/> : null}
145
 
146
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
147
+ frameborder="0" width="600" height="450"/>
 
148
  { ! interactive && (
149
  <div
150
  className="block-library-embed__interactive-overlay"
Gutenberg/src/google-slides/edit.js CHANGED
@@ -121,7 +121,7 @@ class GoogleSlidesEdit extends Component {
121
  <Fragment>
122
  {fetching ? <EmbedLoading /> : null}
123
 
124
- <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{ display: fetching ? 'none' : '' }} frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" />
125
  { ! interactive && (
126
  <div
127
  className="block-library-embed__interactive-overlay"
121
  <Fragment>
122
  {fetching ? <EmbedLoading /> : null}
123
 
124
+ <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{ display: fetching ? 'none' : '' }} frameborder="0" width="600" height="450" />
125
  { ! interactive && (
126
  <div
127
  className="block-library-embed__interactive-overlay"
Gutenberg/src/init.php CHANGED
@@ -24,8 +24,8 @@ function embedpress_blocks_cgb_block_assets() { // phpcs:ignore
24
  wp_enqueue_style(
25
  'embedpress_blocks-cgb-style-css', // Handle.
26
  plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS.
27
- is_admin() ? array( 'wp-editor' ) : null // Dependency to include the CSS after it.
28
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
29
  );
30
  }
31
 
@@ -46,8 +46,8 @@ function embedpress_blocks_cgb_editor_assets() { // phpcs:ignore
46
  wp_enqueue_script(
47
  'embedpress_blocks-cgb-block-js', // Handle.
48
  plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.
49
- array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor','embedpress-pdfobject' ), // Dependencies, defined above.
50
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
51
  true // Enqueue the script in the footer.
52
  );
53
  $wistia_labels = array(
@@ -66,15 +66,16 @@ function embedpress_blocks_cgb_editor_assets() { // phpcs:ignore
66
  'wisita_options' => $wistia_options,
67
  'embedpress_powered_by' => apply_filters('embedpress_document_block_powered_by',true),
68
  'embedpress_pro' => defined('EMBEDPRESS_PRO_PLUGIN_FILE'),
69
- 'twitch_host' => !empty($pars_url['host'])?$pars_url['host']:''
 
70
  ) );
71
 
72
  // Styles.
73
  wp_enqueue_style(
74
  'embedpress_blocks-cgb-block-editor-css', // Handle.
75
  plugins_url( 'dist/blocks.editor.build.css', dirname( __FILE__ ) ), // Block editor CSS.
76
- array( 'wp-edit-blocks' ) // Dependency to include the CSS after it.
77
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
78
  );
79
  }
80
 
@@ -104,6 +105,7 @@ add_filter( 'block_categories', 'embedpress_block_category', 10, 2 );
104
 
105
  function embedpress_gutenberg_register_all_block() {
106
  if ( function_exists( 'register_block_type' ) ) :
 
107
  register_block_type( 'embedpress/twitch-block' );
108
  register_block_type( 'embedpress/google-slides-block' );
109
  register_block_type( 'embedpress/google-sheets-block' );
@@ -111,6 +113,10 @@ function embedpress_gutenberg_register_all_block() {
111
  register_block_type( 'embedpress/google-forms-block' );
112
  register_block_type( 'embedpress/google-drawings-block' );
113
  register_block_type( 'embedpress/google-docs-block' );
 
 
 
 
114
  endif;
115
  }
116
 
24
  wp_enqueue_style(
25
  'embedpress_blocks-cgb-style-css', // Handle.
26
  plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS.
27
+ is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it.
28
+ filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
29
  );
30
  }
31
 
46
  wp_enqueue_script(
47
  'embedpress_blocks-cgb-block-js', // Handle.
48
  plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.
49
+ array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor','wp-components', 'embedpress-pdfobject' ), // Dependencies, defined above.
50
+ filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
51
  true // Enqueue the script in the footer.
52
  );
53
  $wistia_labels = array(
66
  'wisita_options' => $wistia_options,
67
  'embedpress_powered_by' => apply_filters('embedpress_document_block_powered_by',true),
68
  'embedpress_pro' => defined('EMBEDPRESS_PRO_PLUGIN_FILE'),
69
+ 'twitch_host' => !empty($pars_url['host'])?$pars_url['host']:'',
70
+ 'site_url' => site_url(),
71
  ) );
72
 
73
  // Styles.
74
  wp_enqueue_style(
75
  'embedpress_blocks-cgb-block-editor-css', // Handle.
76
  plugins_url( 'dist/blocks.editor.build.css', dirname( __FILE__ ) ), // Block editor CSS.
77
+ array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
78
+ filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
79
  );
80
  }
81
 
105
 
106
  function embedpress_gutenberg_register_all_block() {
107
  if ( function_exists( 'register_block_type' ) ) :
108
+ require_once plugin_dir_path( __FILE__ ) . 'embedpress/index.php';
109
  register_block_type( 'embedpress/twitch-block' );
110
  register_block_type( 'embedpress/google-slides-block' );
111
  register_block_type( 'embedpress/google-sheets-block' );
113
  register_block_type( 'embedpress/google-forms-block' );
114
  register_block_type( 'embedpress/google-drawings-block' );
115
  register_block_type( 'embedpress/google-docs-block' );
116
+ register_block_type( 'embedpress/embedpress', [
117
+ 'render_callback' => 'embedpress_render_block',
118
+ ]);
119
+
120
  endif;
121
  }
122
 
Gutenberg/src/wistia/edit.js CHANGED
@@ -146,8 +146,7 @@ class WistiaEdit extends Component {
146
 
147
  <div className="ose-wistia" id={"wistia_" + this.state.mediaId}>
148
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
149
- frameborder="0" width="600" height="330" allowfullscreen="true"
150
- mozallowfullscreen="true" webkitallowfullscreen="true"/>
151
  </div>
152
 
153
  { ! interactive && (
146
 
147
  <div className="ose-wistia" id={"wistia_" + this.state.mediaId}>
148
  <Iframe src={iframeSrc} onFocus={ this.hideOverlay } onLoad={this.onLoad} style={{display: fetching ? 'none' : ''}}
149
+ frameborder="0" width="600" height="330"/>
 
150
  </div>
151
 
152
  { ! interactive && (
Gutenberg/src/youtube/edit.js CHANGED
@@ -133,7 +133,7 @@ class YoutubeEdit extends Component {
133
  style={{display: fetching ? "none" : ""}}
134
  width="640"
135
  onFocus={ this.hideOverlay }
136
- height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"
137
  />
138
  { ! interactive && (
139
  <div
133
  style={{display: fetching ? "none" : ""}}
134
  width="640"
135
  onFocus={ this.hideOverlay }
136
+ height="450"
137
  />
138
  { ! interactive && (
139
  <div
assets/css/embedpress-elementor.css CHANGED
@@ -37,6 +37,12 @@
37
  background-color: #000;
38
  }
39
 
 
 
 
 
 
 
40
  .embedpress-fit-aspect-ratio video {
41
  width: 100%;
42
  }
37
  background-color: #000;
38
  }
39
 
40
+
41
+ .embedpress-elements-wrapper .embedpress-wrapper iframe {
42
+ height: 100%;
43
+ width: 100%;
44
+ border: 0;
45
+ }
46
  .embedpress-fit-aspect-ratio video {
47
  width: 100%;
48
  }
embedpress.php CHANGED
@@ -2,20 +2,20 @@
2
  /**
3
  * Plugin Name: EmbedPress
4
  * Plugin URI: https://embedpress.com/
5
- * Description: EmbedPress lets you embed videos, images, posts, audio, maps and uplaoad PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 75+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.net
8
- * Version: 2.7.1
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
12
- * Copyright (c) 2020 WPDeveloper
13
  *
14
  * EmbedPress plugin bootstrap file.
15
  *
16
  * @package EmbedPress
17
  * @author EmbedPress <help@embedpress.com>
18
- * @copyright Copyright (C) 2020 WPDeveloper. All rights reserved.
19
  * @license GPLv3 or later
20
  * @since 1.0.0
21
  */
2
  /**
3
  * Plugin Name: EmbedPress
4
  * Plugin URI: https://embedpress.com/
5
+ * Description: EmbedPress lets you embed videos, images, posts, audio, maps and uplaoad PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 100+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.net
8
+ * Version: 2.7.2
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
12
+ * Copyright (c) 2021 WPDeveloper
13
  *
14
  * EmbedPress plugin bootstrap file.
15
  *
16
  * @package EmbedPress
17
  * @author EmbedPress <help@embedpress.com>
18
+ * @copyright Copyright (C) 2021 WPDeveloper. All rights reserved.
19
  * @license GPLv3 or later
20
  * @since 1.0.0
21
  */
includes.php CHANGED
@@ -6,7 +6,7 @@ defined('ABSPATH') or die("No direct script access allowed.");
6
  *
7
  * @package EmbedPress
8
  * @author EmbedPress <help@embedpress.com>
9
- * @copyright Copyright (C) 2020 WPDeveloper. All rights reserved.
10
  * @license GPLv3 or later
11
  * @since 1.0.0
12
  */
@@ -22,7 +22,7 @@ if ( ! defined('EMBEDPRESS_PLG_NAME')) {
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
- define('EMBEDPRESS_VERSION', "2.7.1");
26
  /**
27
  * @deprecated 2.2.0
28
  */
6
  *
7
  * @package EmbedPress
8
  * @author EmbedPress <help@embedpress.com>
9
+ * @copyright Copyright (C) 2021 WPDeveloper. All rights reserved.
10
  * @license GPLv3 or later
11
  * @since 1.0.0
12
  */
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
+ define('EMBEDPRESS_VERSION', "2.7.2");
26
  /**
27
  * @deprecated 2.2.0
28
  */
readme.txt CHANGED
@@ -2,11 +2,11 @@
2
  Contributors: EmbedPress, asif2bd, re_enter_rupok, wpdevteam, manzurahammed, kamalahmed
3
  Author: WPDeveloper
4
  Author URI: https://wpdeveloper.net
5
- Tags: embed, embed youtube, gutenberg embed, pdf, doc, docs, ppt, elementor embed, video embed, Google Doc, map embed, youTube Embed, content embed, iframes, vimeo embed, wistia, google sheet, youtube player, block editor, embed wordpress
6
  Requires at least: 4.6
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
9
- Stable tag: 2.7.1
10
  License: GPLv3 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
@@ -220,7 +220,7 @@ We’ve seen that EmbedPress supports YouTube, Wistia and Vimeo, but EmbedPress
220
 
221
  ## 🚀BACKED BY A TRUSTED TEAM
222
 
223
- This embed plugin is brought to you by the team behind [WPDeveloper](https://wpdeveloper.net/), a dedicated marketplace for WordPress, trusted by 800,000+ happy users.
224
 
225
  ### 👨‍💻 DOCUMENTATION AND SUPPORT
226
 
@@ -242,7 +242,7 @@ This embed plugin is brought to you by the team behind [WPDeveloper](https://wpd
242
  🔥 WHAT’S NEXT
243
  If you like EmbedPress, then consider checking out our other WordPress Plugins:
244
 
245
- 🔝[Essential Addons For Elementor](https://essential-addons.com/elementor/) – Most popular Elementor extensions with 600,000+ active users in the WordPress repository.
246
 
247
  🔔[NotificationX](https://notificationx.com/) – Best Social Proof & FOMO Marketing Solution to increase conversion rates.
248
 
@@ -250,6 +250,11 @@ If you like EmbedPress, then consider checking out our other WordPress Plugins:
250
 
251
  🗒️[BetterDocs](https://betterdocs.co/) – Best Documentation & Knowledge Base Plugin for WordPress, whcih also reduce your manual support request.
252
 
 
 
 
 
 
253
 
254
  Visit [WPDeveloper](https://wpdeveloper.net/) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks](https://wpdeveloper.net/blog).
255
 
@@ -294,6 +299,14 @@ Not at all. You can set up everything your team needs without any coding knowled
294
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
295
  and this project adheres to [Semantic Versioning](http://semver.org/).
296
 
 
 
 
 
 
 
 
 
297
  = [2.7.1] - 2021-02-01 =
298
  * Few minor bug fix and improvements
299
 
2
  Contributors: EmbedPress, asif2bd, re_enter_rupok, wpdevteam, manzurahammed, kamalahmed
3
  Author: WPDeveloper
4
  Author URI: https://wpdeveloper.net
5
+ Tags: embed, embed youtube, gutenberg embed, pdf, doc, docs, ppt, elementor embed, video embed, Google Doc, map embed, youTube Embed, content embed, iframes, vimeo embed, wistia, google sheet, youtube player, block editor, embed wordpress, elementor
6
  Requires at least: 4.6
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
9
+ Stable tag: 2.7.2
10
  License: GPLv3 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
220
 
221
  ## 🚀BACKED BY A TRUSTED TEAM
222
 
223
+ This embed plugin is brought to you by the team behind [WPDeveloper](https://wpdeveloper.net/), a dedicated marketplace for WordPress, trusted by 3,000,000+ happy users.
224
 
225
  ### 👨‍💻 DOCUMENTATION AND SUPPORT
226
 
242
  🔥 WHAT’S NEXT
243
  If you like EmbedPress, then consider checking out our other WordPress Plugins:
244
 
245
+ 🔝[Essential Addons For Elementor](https://essential-addons.com/elementor/) – Most popular Elementor extensions with 900,000+ active users in the WordPress repository.
246
 
247
  🔔[NotificationX](https://notificationx.com/) – Best Social Proof & FOMO Marketing Solution to increase conversion rates.
248
 
250
 
251
  🗒️[BetterDocs](https://betterdocs.co/) – Best Documentation & Knowledge Base Plugin for WordPress, whcih also reduce your manual support request.
252
 
253
+ ☁ [Templately](https://wordpress.org/plugins/templately/): Ultimate Template clouds with 1000+ ready templates for Elementor & Gutenberg along with FREE cloud collaboration with your team
254
+
255
+ ⭐ [ReviewX](https://wordpress.org/plugins/reviewx/): WooCommerce Product review plugin that allows users to submit product reviews with multiple criteria, photos, videos, and more.
256
+
257
+ ⚡ [Flexia](http://wordpress.org/plugins/flexia): Most lightweight, customizable & multi purpose theme for WordPress.
258
 
259
  Visit [WPDeveloper](https://wpdeveloper.net/) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks](https://wpdeveloper.net/blog).
260
 
299
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
300
  and this project adheres to [Semantic Versioning](http://semver.org/).
301
 
302
+ = [2.7.2] - 2021-02-18 =
303
+ * Added: New Gutenberg block 'EmbedPress' that supports 100+ sites.
304
+ * Added: Controls in elementor widget like height width, color etc
305
+ * Fixed: Gutenberg editor preview issue on google maps and docs etc.
306
+ * Fixed: Default aspect ratio and background issue in Elementor widget
307
+ * Upgraded: cbg-scripts version
308
+ * Few minor bug fix and improvements
309
+
310
  = [2.7.1] - 2021-02-01 =
311
  * Few minor bug fix and improvements
312
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit69d10d2d4bdea3f2ca3f6a8fe2e8656a::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitfa112be3a45897b53eb16b7ddc526d6f::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -37,8 +37,8 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see https://www.php-fig.org/psr/psr-0/
41
- * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
@@ -60,7 +60,7 @@ class ClassLoader
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
- return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
64
  }
65
 
66
  return array();
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
64
  }
65
 
66
  return array();
vendor/composer/InstalledVersions.php DELETED
@@ -1,218 +0,0 @@
1
- <?php
2
-
3
- namespace Composer;
4
-
5
- use Composer\Semver\VersionParser;
6
-
7
-
8
-
9
-
10
-
11
-
12
- class InstalledVersions
13
- {
14
- private static $installed = array (
15
- 'root' =>
16
- array (
17
- 'pretty_version' => 'dev-master',
18
- 'version' => 'dev-master',
19
- 'aliases' =>
20
- array (
21
- ),
22
- 'reference' => '897b5fe665a1479df548815ad22d48a7458c301a',
23
- 'name' => 'embedpress/embedpress',
24
- ),
25
- 'versions' =>
26
- array (
27
- 'embedpress/embedpress' =>
28
- array (
29
- 'pretty_version' => 'dev-master',
30
- 'version' => 'dev-master',
31
- 'aliases' =>
32
- array (
33
- ),
34
- 'reference' => '897b5fe665a1479df548815ad22d48a7458c301a',
35
- ),
36
- 'wpdevelopers/embera' =>
37
- array (
38
- 'pretty_version' => '2.0.17',
39
- 'version' => '2.0.17.0',
40
- 'aliases' =>
41
- array (
42
- ),
43
- 'reference' => '5f521fbe77fdfc992dc399ee39e5fdb338ea1f04',
44
- ),
45
- ),
46
- );
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
- public static function getInstalledPackages()
55
- {
56
- return array_keys(self::$installed['versions']);
57
- }
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
- public static function isInstalled($packageName)
68
- {
69
- return isset(self::$installed['versions'][$packageName]);
70
- }
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
- public static function satisfies(VersionParser $parser, $packageName, $constraint)
86
- {
87
- $constraint = $parser->parseConstraints($constraint);
88
- $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
89
-
90
- return $provided->matches($constraint);
91
- }
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
- public static function getVersionRanges($packageName)
103
- {
104
- if (!isset(self::$installed['versions'][$packageName])) {
105
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
106
- }
107
-
108
- $ranges = array();
109
- if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
110
- $ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
111
- }
112
- if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
113
- $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
114
- }
115
- if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
116
- $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
117
- }
118
- if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
119
- $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
120
- }
121
-
122
- return implode(' || ', $ranges);
123
- }
124
-
125
-
126
-
127
-
128
-
129
- public static function getVersion($packageName)
130
- {
131
- if (!isset(self::$installed['versions'][$packageName])) {
132
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
133
- }
134
-
135
- if (!isset(self::$installed['versions'][$packageName]['version'])) {
136
- return null;
137
- }
138
-
139
- return self::$installed['versions'][$packageName]['version'];
140
- }
141
-
142
-
143
-
144
-
145
-
146
- public static function getPrettyVersion($packageName)
147
- {
148
- if (!isset(self::$installed['versions'][$packageName])) {
149
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
150
- }
151
-
152
- if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
153
- return null;
154
- }
155
-
156
- return self::$installed['versions'][$packageName]['pretty_version'];
157
- }
158
-
159
-
160
-
161
-
162
-
163
- public static function getReference($packageName)
164
- {
165
- if (!isset(self::$installed['versions'][$packageName])) {
166
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
167
- }
168
-
169
- if (!isset(self::$installed['versions'][$packageName]['reference'])) {
170
- return null;
171
- }
172
-
173
- return self::$installed['versions'][$packageName]['reference'];
174
- }
175
-
176
-
177
-
178
-
179
-
180
- public static function getRootPackage()
181
- {
182
- return self::$installed['root'];
183
- }
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
- public static function getRawData()
192
- {
193
- return self::$installed;
194
- }
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
- public static function reload($data)
215
- {
216
- self::$installed = $data;
217
- }
218
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php CHANGED
@@ -6,5 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit69d10d2d4bdea3f2ca3f6a8fe2e8656a
6
  {
7
  private static $loader;
8
 
@@ -22,17 +22,15 @@ class ComposerAutoloaderInit69d10d2d4bdea3f2ca3f6a8fe2e8656a
22
  return self::$loader;
23
  }
24
 
25
- require __DIR__ . '/platform_check.php';
26
-
27
- spl_autoload_register(array('ComposerAutoloaderInit69d10d2d4bdea3f2ca3f6a8fe2e8656a', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
- spl_autoload_unregister(array('ComposerAutoloaderInit69d10d2d4bdea3f2ca3f6a8fe2e8656a', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
- require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitfa112be3a45897b53eb16b7ddc526d6f
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitfa112be3a45897b53eb16b7ddc526d6f', 'loadClassLoader'), true, true);
 
 
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitfa112be3a45897b53eb16b7ddc526d6f', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
+ require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitfa112be3a45897b53eb16b7ddc526d6f::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'E' =>
@@ -20,16 +20,11 @@ class ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a
20
  ),
21
  );
22
 
23
- public static $classMap = array (
24
- 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
25
- );
26
-
27
  public static function getInitializer(ClassLoader $loader)
28
  {
29
  return \Closure::bind(function () use ($loader) {
30
- $loader->prefixLengthsPsr4 = ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a::$prefixLengthsPsr4;
31
- $loader->prefixDirsPsr4 = ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a::$prefixDirsPsr4;
32
- $loader->classMap = ComposerStaticInit69d10d2d4bdea3f2ca3f6a8fe2e8656a::$classMap;
33
 
34
  }, null, ClassLoader::class);
35
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitfa112be3a45897b53eb16b7ddc526d6f
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'E' =>
20
  ),
21
  );
22
 
 
 
 
 
23
  public static function getInitializer(ClassLoader $loader)
24
  {
25
  return \Closure::bind(function () use ($loader) {
26
+ $loader->prefixLengthsPsr4 = ComposerStaticInitfa112be3a45897b53eb16b7ddc526d6f::$prefixLengthsPsr4;
27
+ $loader->prefixDirsPsr4 = ComposerStaticInitfa112be3a45897b53eb16b7ddc526d6f::$prefixDirsPsr4;
 
28
 
29
  }, null, ClassLoader::class);
30
  }
vendor/composer/installed.json CHANGED
@@ -1,71 +1,66 @@
1
- {
2
- "packages": [
3
- {
4
- "name": "wpdevelopers/embera",
5
- "version": "2.0.17",
6
- "version_normalized": "2.0.17.0",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/WPDevelopers/Embera",
10
- "reference": "5f521fbe77fdfc992dc399ee39e5fdb338ea1f04"
11
- },
12
- "require": {
13
- "ext-json": "*",
14
- "php": ">=5.6"
15
- },
16
- "require-dev": {
17
- "phpunit/phpunit": "^8.3"
18
- },
19
- "suggest": {
20
- "ext-curl": "Allow to fetch data using curl instead of using file_get_contents"
21
- },
22
- "time": "2021-01-28T07:14:10+00:00",
23
- "type": "library",
24
- "installation-source": "source",
25
- "autoload": {
26
- "psr-4": {
27
- "Embera\\": "src/Embera"
28
- }
29
- },
30
- "autoload-dev": {
31
- "psr-4": {
32
- "Embera\\": "tests/Embera"
33
- }
34
- },
35
- "scripts": {
36
- "test": [
37
- "phpunit"
38
- ]
39
- },
40
- "license": [
41
- "MIT"
42
- ],
43
- "authors": [
44
- {
45
- "name": "Michael Pratt",
46
- "email": "yo@michael-pratt.com",
47
- "homepage": "http://www.michael-pratt.com",
48
- "role": "Author/Developer"
49
- }
50
- ],
51
- "description": "Oembed consumer library. Converts urls into their html embed code. Supports 150+ sites, such as Youtube, Twitter, vimeo, Instagram etc.",
52
- "homepage": "https://github.com/WPDevelopers/Embera",
53
- "keywords": [
54
- "Auto embed",
55
- "Embed",
56
- "Embed Text",
57
- "Instagram",
58
- "Oembed",
59
- "Responsive Embeds",
60
- "Twitter",
61
- "Url Embed",
62
- "Vimeo",
63
- "Vine",
64
- "Youtube"
65
- ],
66
- "install-path": "../wpdevelopers/embera"
67
- }
68
- ],
69
- "dev": true,
70
- "dev-package-names": []
71
- }
1
+ [
2
+ {
3
+ "name": "wpdevelopers/embera",
4
+ "version": "2.0.17",
5
+ "version_normalized": "2.0.17.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/WPDevelopers/Embera",
9
+ "reference": "5f521fbe77fdfc992dc399ee39e5fdb338ea1f04"
10
+ },
11
+ "require": {
12
+ "ext-json": "*",
13
+ "php": ">=5.6"
14
+ },
15
+ "require-dev": {
16
+ "phpunit/phpunit": "^8.3"
17
+ },
18
+ "suggest": {
19
+ "ext-curl": "Allow to fetch data using curl instead of using file_get_contents"
20
+ },
21
+ "time": "2021-01-28T07:14:10+00:00",
22
+ "type": "library",
23
+ "installation-source": "source",
24
+ "autoload": {
25
+ "psr-4": {
26
+ "Embera\\": "src/Embera"
27
+ }
28
+ },
29
+ "autoload-dev": {
30
+ "psr-4": {
31
+ "Embera\\": "tests/Embera"
32
+ }
33
+ },
34
+ "scripts": {
35
+ "test": [
36
+ "phpunit"
37
+ ]
38
+ },
39
+ "license": [
40
+ "MIT"
41
+ ],
42
+ "authors": [
43
+ {
44
+ "name": "Michael Pratt",
45
+ "email": "yo@michael-pratt.com",
46
+ "homepage": "http://www.michael-pratt.com",
47
+ "role": "Author/Developer"
48
+ }
49
+ ],
50
+ "description": "Oembed consumer library. Converts urls into their html embed code. Supports 150+ sites, such as Youtube, Twitter, vimeo, Instagram etc.",
51
+ "homepage": "https://github.com/WPDevelopers/Embera",
52
+ "keywords": [
53
+ "Auto embed",
54
+ "Embed",
55
+ "Embed Text",
56
+ "Instagram",
57
+ "Oembed",
58
+ "Responsive Embeds",
59
+ "Twitter",
60
+ "Url Embed",
61
+ "Vimeo",
62
+ "Vine",
63
+ "Youtube"
64
+ ]
65
+ }
66
+ ]
 
 
 
 
 
vendor/composer/installed.php DELETED
@@ -1,33 +0,0 @@
1
- <?php return array (
2
- 'root' =>
3
- array (
4
- 'pretty_version' => 'dev-master',
5
- 'version' => 'dev-master',
6
- 'aliases' =>
7
- array (
8
- ),
9
- 'reference' => '897b5fe665a1479df548815ad22d48a7458c301a',
10
- 'name' => 'embedpress/embedpress',
11
- ),
12
- 'versions' =>
13
- array (
14
- 'embedpress/embedpress' =>
15
- array (
16
- 'pretty_version' => 'dev-master',
17
- 'version' => 'dev-master',
18
- 'aliases' =>
19
- array (
20
- ),
21
- 'reference' => '897b5fe665a1479df548815ad22d48a7458c301a',
22
- ),
23
- 'wpdevelopers/embera' =>
24
- array (
25
- 'pretty_version' => '2.0.17',
26
- 'version' => '2.0.17.0',
27
- 'aliases' =>
28
- array (
29
- ),
30
- 'reference' => '5f521fbe77fdfc992dc399ee39e5fdb338ea1f04',
31
- ),
32
- ),
33
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/platform_check.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- // platform_check.php @generated by Composer
4
-
5
- $issues = array();
6
-
7
- if (!(PHP_VERSION_ID >= 50600)) {
8
- $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
9
- }
10
-
11
- if ($issues) {
12
- if (!headers_sent()) {
13
- header('HTTP/1.1 500 Internal Server Error');
14
- }
15
- if (!ini_get('display_errors')) {
16
- if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
- fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
- } elseif (!headers_sent()) {
19
- echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
- }
21
- }
22
- trigger_error(
23
- 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
- E_USER_ERROR
25
- );
26
- }