Full Site Editing - Version 1.9

Version Description

  • Add Mailerlite subscriber widget.
  • When launching a site created via /new, save the post content. Prevent lost content alert.
  • Update block pattern categories.
  • Fix text-domain of translated strings.
Download this release

Release Info

Developer philipmjackson
Plugin Icon wp plugin Full Site Editing
Version 1.9
Comparing to
See all releases

Code changes from version 1.8 to 1.9

Files changed (112) hide show
  1. block-inserter-modifications/contextual-tips/list.js +44 -15
  2. block-inserter-modifications/dist/contextual-tips.asset.php +1 -1
  3. block-inserter-modifications/dist/contextual-tips.js +1 -1
  4. block-patterns/class-block-patterns.php +33 -21
  5. block-patterns/patterns/call-to-action-02.php +3 -3
  6. block-patterns/patterns/collage-gallery.php +3 -4
  7. block-patterns/patterns/contact-02.php +3 -3
  8. block-patterns/patterns/contact-03.php +5 -3
  9. block-patterns/patterns/contact.php +3 -3
  10. block-patterns/patterns/description-and-image.php +3 -3
  11. block-patterns/patterns/food-menu.php +3 -4
  12. block-patterns/patterns/headline-02.php +3 -3
  13. block-patterns/patterns/headline.php +3 -3
  14. block-patterns/patterns/image-and-description.php +3 -3
  15. block-patterns/patterns/image-and-text.php +3 -3
  16. block-patterns/patterns/masonry-gallery.php +3 -6
  17. block-patterns/patterns/numbers.php +3 -3
  18. block-patterns/patterns/recent-posts-02.php +3 -3
  19. block-patterns/patterns/recent-posts.php +3 -3
  20. block-patterns/patterns/three-columns-and-image.php +3 -3
  21. block-patterns/patterns/three-images-side-by-side.php +3 -3
  22. block-patterns/patterns/two-images-and-quote.php +3 -3
  23. block-patterns/patterns/two-images-side-by-side.php +3 -3
  24. donations/dist/donations.asset.php +1 -0
  25. donations/dist/donations.css +1 -0
  26. donations/dist/donations.js +6 -0
  27. donations/dist/donations.rtl.css +1 -0
  28. donations/donations.php +37 -0
  29. donations/edit.js +55 -0
  30. donations/index.js +101 -0
  31. donations/style.scss +36 -0
  32. dotcom-fse/blocks/navigation-menu/edit.js +7 -4
  33. dotcom-fse/blocks/navigation-menu/index.js +2 -2
  34. dotcom-fse/blocks/post-content/index.js +2 -2
  35. dotcom-fse/blocks/site-credit/edit.js +5 -2
  36. dotcom-fse/blocks/site-credit/index.js +5 -2
  37. dotcom-fse/blocks/site-credit/index.php +10 -10
  38. dotcom-fse/blocks/site-description/edit.js +13 -7
  39. dotcom-fse/blocks/site-description/index.js +2 -2
  40. dotcom-fse/blocks/site-title/edit.js +12 -6
  41. dotcom-fse/blocks/site-title/index.js +2 -2
  42. dotcom-fse/blocks/template/edit.js +3 -2
  43. dotcom-fse/blocks/template/index.js +2 -2
  44. dotcom-fse/dist/dotcom-fse.asset.php +1 -1
  45. dotcom-fse/dist/dotcom-fse.js +1 -1
  46. dotcom-fse/lib/site-options/use-site-options.js +7 -3
  47. dotcom-fse/plugins/close-button-override/index.js +3 -3
  48. dotcom-fse/plugins/template-update-notice/index.js +1 -1
  49. editor-gutenboarding-launch/dist/editor-gutenboarding-launch.asset.php +1 -1
  50. editor-gutenboarding-launch/dist/editor-gutenboarding-launch.js +1 -1
  51. editor-gutenboarding-launch/index.ts +2 -2
  52. full-site-editing-plugin.php +18 -2
  53. global-styles/dist/global-styles.asset.php +1 -1
  54. global-styles/dist/global-styles.js +2 -2
  55. global-styles/src/font-pairings-panel.js +2 -2
  56. global-styles/src/font-selection-panel.js +3 -3
  57. global-styles/src/global-styles-sidebar.js +15 -11
  58. global-styles/src/no-support.js +4 -1
  59. mailerlite/subscriber-popup.js +10 -0
  60. mailerlite/subscriber-popup.php +130 -0
  61. newspack-blocks/dist/blog-posts-block-editor.asset.php +1 -1
  62. newspack-blocks/dist/blog-posts-block-editor.js +2 -2
  63. newspack-blocks/dist/blog-posts-block-view.asset.php +1 -1
  64. newspack-blocks/dist/carousel-block-editor.asset.php +1 -1
  65. newspack-blocks/dist/carousel-block-editor.js +1 -1
  66. newspack-blocks/dist/carousel-block-view.asset.php +1 -1
  67. newspack-blocks/synced-newspack-blocks/blocks/carousel/create-swiper.js +11 -11
  68. newspack-blocks/synced-newspack-blocks/blocks/carousel/edit.js +14 -14
  69. newspack-blocks/synced-newspack-blocks/blocks/carousel/index.js +7 -3
  70. newspack-blocks/synced-newspack-blocks/blocks/carousel/view.js +1 -1
  71. newspack-blocks/synced-newspack-blocks/blocks/carousel/view.php +10 -10
  72. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/edit.js +22 -20
  73. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/index.js +5 -1
  74. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/store.js +6 -6
  75. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/utils.js +7 -7
  76. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.js +6 -6
  77. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.php +5 -5
  78. newspack-blocks/synced-newspack-blocks/class-newspack-blocks.php +1 -1
  79. newspack-blocks/synced-newspack-blocks/components/autocomplete-tokenfield.js +11 -11
  80. newspack-blocks/synced-newspack-blocks/components/query-controls.js +41 -41
  81. newspack-blocks/synced-newspack-blocks/shared/js/utils.js +5 -5
  82. phpunit.xml.dist +14 -0
  83. phpunit/bootstrap.php +61 -0
  84. phpunit/class-is-fse-active-test.php +23 -0
  85. premium-content/blocks/container/controls.js +2 -2
  86. premium-content/blocks/container/edit.js +23 -23
  87. premium-content/blocks/container/index.js +4 -4
  88. premium-content/blocks/container/inspector.js +7 -7
  89. premium-content/blocks/container/new-plan.js +1 -1
  90. premium-content/blocks/container/plans.js +1 -1
  91. premium-content/blocks/container/stripe-nudge.js +7 -5
  92. premium-content/blocks/container/tab.js +2 -2
  93. premium-content/blocks/container/tabs.js +2 -2
  94. premium-content/blocks/logged-out-view/edit.js +3 -3
  95. premium-content/blocks/logged-out-view/index.js +3 -3
  96. premium-content/blocks/logged-out-view/submit-buttons.js +6 -6
  97. premium-content/blocks/subscriber-view/edit.js +2 -2
  98. premium-content/blocks/subscriber-view/index.js +2 -2
  99. premium-content/dist/premium-content.asset.php +1 -1
  100. premium-content/dist/premium-content.js +4 -4
  101. premium-content/index.js +1 -1
  102. premium-content/premium-content.php +6 -4
  103. readme.txt +9 -2
  104. starter-page-templates/dist/starter-page-templates.asset.php +1 -1
  105. starter-page-templates/dist/starter-page-templates.js +1 -1
  106. starter-page-templates/index.js +1 -1
  107. starter-page-templates/page-template-modal/components/block-iframe-preview.js +1 -1
  108. starter-page-templates/page-template-modal/components/sidebar-modal-opener.js +6 -5
  109. starter-page-templates/page-template-modal/index.js +2 -2
  110. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php +1 -1
  111. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js +1 -1
  112. wpcom-block-editor-nav-sidebar/src/wpcom-block-editor-nav-sidebar.tsx +1 -1
block-inserter-modifications/contextual-tips/list.js CHANGED
@@ -20,61 +20,90 @@ function getTipDescription( text, conversion, textFallback ) {
20
  const tips = [
21
  {
22
  context: 'theme',
23
- keywords: [ 'theme', __( 'theme' ) ],
24
  description: getTipDescription(
25
- __( 'You can visit the <a>theme directory</a> to select a different design for your site.' ),
 
 
 
26
  {
27
  a: <TipLink section="themes" />,
28
  },
29
- __( 'You can visit the theme directory to select a different design for your site.' )
 
 
 
30
  ),
31
  permission: 'settings',
32
  },
33
  {
34
  context: 'css',
35
- keywords: [ 'css', __( 'css' ), 'style', __( 'style' ) ],
 
 
 
 
 
36
  description: getTipDescription(
37
- __( 'You can visit the the <a>Customizer</a> to edit the CSS on your site.' ),
 
 
 
38
  {
39
  a: <TipLink section="customizer" subsection="custom_css" />,
40
  },
41
- __( 'You can visit the the Customizer to edit the CSS on your site.' )
42
  ),
43
  permission: 'settings',
44
  },
45
  {
46
  context: 'plugin',
47
- keywords: [ 'plugin', __( 'plugin' ) ],
48
  description: getTipDescription(
49
- __( 'You can visit the <a>plugin directory</a> to get started with installing new plugins.' ),
 
 
 
50
  {
51
  a: <TipLink section="plugins" />,
52
  },
53
- __( 'You can visit the plugin directory to get started with installing new plugins.' )
 
 
 
54
  ),
55
  permission: 'settings',
56
  },
57
  {
58
  context: 'header',
59
- keywords: [ 'header', __( 'header' ) ],
60
  description: getTipDescription(
61
- __( 'You can visit the the <a>Customizer</a> to edit your logo and site title.' ),
 
 
 
62
  {
63
  a: <TipLink section="customizer" subsection="title_tagline" />,
64
  },
65
- __( 'You can visit the the Customizer to edit your logo and site title.' )
 
 
 
66
  ),
67
  permission: 'settings',
68
  },
69
  {
70
  context: 'color',
71
- keywords: [ 'color', __( 'color' ) ],
72
  description: getTipDescription(
73
- __( 'You can visit the the <a>Customizer</a> to edit the colors on your site.' ),
 
 
 
74
  {
75
  a: <TipLink section="customizer" subsection="colors" />,
76
  },
77
- __( 'You can visit the the Customizer to edit the colors on your site.' )
78
  ),
79
  permission: 'settings',
80
  },
20
  const tips = [
21
  {
22
  context: 'theme',
23
+ keywords: [ 'theme', __( 'theme', 'full-site-editing' ) ],
24
  description: getTipDescription(
25
+ __(
26
+ 'You can visit the <a>theme directory</a> to select a different design for your site.',
27
+ 'full-site-editing'
28
+ ),
29
  {
30
  a: <TipLink section="themes" />,
31
  },
32
+ __(
33
+ 'You can visit the theme directory to select a different design for your site.',
34
+ 'full-site-editing'
35
+ )
36
  ),
37
  permission: 'settings',
38
  },
39
  {
40
  context: 'css',
41
+ keywords: [
42
+ 'css',
43
+ __( 'css', 'full-site-editing' ),
44
+ 'style',
45
+ __( 'style', 'full-site-editing' ),
46
+ ],
47
  description: getTipDescription(
48
+ __(
49
+ 'You can visit the the <a>Customizer</a> to edit the CSS on your site.',
50
+ 'full-site-editing'
51
+ ),
52
  {
53
  a: <TipLink section="customizer" subsection="custom_css" />,
54
  },
55
+ __( 'You can visit the the Customizer to edit the CSS on your site.', 'full-site-editing' )
56
  ),
57
  permission: 'settings',
58
  },
59
  {
60
  context: 'plugin',
61
+ keywords: [ 'plugin', __( 'plugin', 'full-site-editing' ) ],
62
  description: getTipDescription(
63
+ __(
64
+ 'You can visit the <a>plugin directory</a> to get started with installing new plugins.',
65
+ 'full-site-editing'
66
+ ),
67
  {
68
  a: <TipLink section="plugins" />,
69
  },
70
+ __(
71
+ 'You can visit the plugin directory to get started with installing new plugins.',
72
+ 'full-site-editing'
73
+ )
74
  ),
75
  permission: 'settings',
76
  },
77
  {
78
  context: 'header',
79
+ keywords: [ 'header', __( 'header', 'full-site-editing' ) ],
80
  description: getTipDescription(
81
+ __(
82
+ 'You can visit the the <a>Customizer</a> to edit your logo and site title.',
83
+ 'full-site-editing'
84
+ ),
85
  {
86
  a: <TipLink section="customizer" subsection="title_tagline" />,
87
  },
88
+ __(
89
+ 'You can visit the the Customizer to edit your logo and site title.',
90
+ 'full-site-editing'
91
+ )
92
  ),
93
  permission: 'settings',
94
  },
95
  {
96
  context: 'color',
97
+ keywords: [ 'color', __( 'color', 'full-site-editing' ) ],
98
  description: getTipDescription(
99
+ __(
100
+ 'You can visit the the <a>Customizer</a> to edit the colors on your site.',
101
+ 'full-site-editing'
102
+ ),
103
  {
104
  a: <TipLink section="customizer" subsection="colors" />,
105
  },
106
+ __( 'You can visit the the Customizer to edit the colors on your site.', 'full-site-editing' )
107
  ),
108
  permission: 'settings',
109
  },
block-inserter-modifications/dist/contextual-tips.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => 'a6f9f4d12a9ace424979170ce9169285');
1
+ <?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '80e618e0c504585bd704d228486f5ebc');
block-inserter-modifications/dist/contextual-tips.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blockEditor}()},function(t,e,n){var r=n(9),o=n(10),i=n(11),c=n(13);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||c()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(t,e,n){var r=n(12);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(5),o=n.n(r),i=n(0),c=n(2),s=n(4),u=n(6),a=n(7),l=n(3),p=n(8),f=n(1),d=!(!window||!window._currentSiteType||"simple"!==window._currentSiteType),b=function(){try{return window.self!==window.top}catch(t){return!0}}(),m=function(t){var e=t.section,n=t.children,r=t.subsection,o=window.location.hostname,c=Object(l.select)("core/editor"),s=c.getCurrentPostId(),u=c.getCurrentPostType(),a=b&&!d?"&"+encodeURIComponent("return=https://wordpress.com/block-editor/".concat(u,"/").concat(o,"/").concat(s)):"",p="autofocus[section]=".concat(r),f="#";switch(e){case"themes":f=b?"https://wordpress.com/themes/".concat(o):"./themes.php";break;case"plugins":f=b||d?"https://wordpress.com/plugins/".concat(o):"./plugin-install.php";break;case"customizer":f=b&&d?"https://wordpress.com/customize/".concat(o,"?").concat(p):"./customize.php?".concat(p).concat(a)}return Object(i.createElement)("a",{href:f,target:"_blank",rel:"noreferrer noopener"},n)};function h(t,e,n){return void 0!==i.createInterpolateElement?Object(i.createInterpolateElement)(t,e):n}var y=[{context:"theme",keywords:["theme",Object(f.__)("theme")],description:h(Object(f.__)("You can visit the <a>theme directory</a> to select a different design for your site."),{a:Object(i.createElement)(m,{section:"themes"})},Object(f.__)("You can visit the theme directory to select a different design for your site.")),permission:"settings"},{context:"css",keywords:["css",Object(f.__)("css"),"style",Object(f.__)("style")],description:h(Object(f.__)("You can visit the the <a>Customizer</a> to edit the CSS on your site."),{a:Object(i.createElement)(m,{section:"customizer",subsection:"custom_css"})},Object(f.__)("You can visit the the Customizer to edit the CSS on your site.")),permission:"settings"},{context:"plugin",keywords:["plugin",Object(f.__)("plugin")],description:h(Object(f.__)("You can visit the <a>plugin directory</a> to get started with installing new plugins."),{a:Object(i.createElement)(m,{section:"plugins"})},Object(f.__)("You can visit the plugin directory to get started with installing new plugins.")),permission:"settings"},{context:"header",keywords:["header",Object(f.__)("header")],description:h(Object(f.__)("You can visit the the <a>Customizer</a> to edit your logo and site title."),{a:Object(i.createElement)(m,{section:"customizer",subsection:"title_tagline"})},Object(f.__)("You can visit the the Customizer to edit your logo and site title.")),permission:"settings"},{context:"color",keywords:["color",Object(f.__)("color")],description:h(Object(f.__)("You can visit the the <a>Customizer</a> to edit the colors on your site."),{a:Object(i.createElement)(m,{section:"customizer",subsection:"colors"})},Object(f.__)("You can visit the the Customizer to edit the colors on your site.")),permission:"settings"}];var j=Object(p.compose)(Object(l.withSelect)((function(t){return{canUserCreate:function(e){return t("core").canUser("create",e)}}})))((function(t){var e=t.searchTerm,n=t.random,r=void 0!==n&&n,o=t.canUserCreate;if(!e)return null;if(!y.length)return null;var s=Object(c.deburr)(Object(c.lowerCase)(e)).replace(/^\//,""),u=Object(c.filter)(y,(function(t){var e=t.keywords,n=t.permission;return o(n)&&Object(c.filter)(Object(c.uniq)(e),(function(t){return Object(c.includes)(s,t)})).length}));if(!u.length)return null;var l=r?Math.floor(Math.random()*u.length):0;return Object(i.createElement)("div",{className:"contextual-tip"},Object(i.createElement)(a.Tip,null,Object(c.get)(u,[l,"description"])))})),O=(n(14),function(){var t=Object(i.useState)(""),e=o()(t,2),n=e[0],r=e[1],u=Object(c.debounce)(r,400);return Object(i.createElement)(s.__experimentalInserterMenuExtension,null,(function(t){var e=t.filterValue;return t.hasItems||!e?null:(n!==e&&u(e),Object(i.createElement)(j,{searchTerm:e}))}))});void 0!==s.__experimentalInserterMenuExtension&&Object(u.registerPlugin)("block-inserter-contextual-tips",{render:function(){return Object(i.createElement)(O,null)}})}]));
1
+ !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blockEditor}()},function(t,e,n){var r=n(9),i=n(10),o=n(11),c=n(13);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||c()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(t,e,n){var r=n(12);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(5),i=n.n(r),o=n(0),c=n(2),s=n(4),u=n(6),l=n(7),a=n(3),f=n(8),d=n(1),p=!(!window||!window._currentSiteType||"simple"!==window._currentSiteType),b=function(){try{return window.self!==window.top}catch(t){return!0}}(),m=function(t){var e=t.section,n=t.children,r=t.subsection,i=window.location.hostname,c=Object(a.select)("core/editor"),s=c.getCurrentPostId(),u=c.getCurrentPostType(),l=b&&!p?"&"+encodeURIComponent("return=https://wordpress.com/block-editor/".concat(u,"/").concat(i,"/").concat(s)):"",f="autofocus[section]=".concat(r),d="#";switch(e){case"themes":d=b?"https://wordpress.com/themes/".concat(i):"./themes.php";break;case"plugins":d=b||p?"https://wordpress.com/plugins/".concat(i):"./plugin-install.php";break;case"customizer":d=b&&p?"https://wordpress.com/customize/".concat(i,"?").concat(f):"./customize.php?".concat(f).concat(l)}return Object(o.createElement)("a",{href:d,target:"_blank",rel:"noreferrer noopener"},n)};function h(t,e,n){return void 0!==o.createInterpolateElement?Object(o.createInterpolateElement)(t,e):n}var g=[{context:"theme",keywords:["theme",Object(d.__)("theme","full-site-editing")],description:h(Object(d.__)("You can visit the <a>theme directory</a> to select a different design for your site.","full-site-editing"),{a:Object(o.createElement)(m,{section:"themes"})},Object(d.__)("You can visit the theme directory to select a different design for your site.","full-site-editing")),permission:"settings"},{context:"css",keywords:["css",Object(d.__)("css","full-site-editing"),"style",Object(d.__)("style","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit the CSS on your site.","full-site-editing"),{a:Object(o.createElement)(m,{section:"customizer",subsection:"custom_css"})},Object(d.__)("You can visit the the Customizer to edit the CSS on your site.","full-site-editing")),permission:"settings"},{context:"plugin",keywords:["plugin",Object(d.__)("plugin","full-site-editing")],description:h(Object(d.__)("You can visit the <a>plugin directory</a> to get started with installing new plugins.","full-site-editing"),{a:Object(o.createElement)(m,{section:"plugins"})},Object(d.__)("You can visit the plugin directory to get started with installing new plugins.","full-site-editing")),permission:"settings"},{context:"header",keywords:["header",Object(d.__)("header","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit your logo and site title.","full-site-editing"),{a:Object(o.createElement)(m,{section:"customizer",subsection:"title_tagline"})},Object(d.__)("You can visit the the Customizer to edit your logo and site title.","full-site-editing")),permission:"settings"},{context:"color",keywords:["color",Object(d.__)("color","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit the colors on your site.","full-site-editing"),{a:Object(o.createElement)(m,{section:"customizer",subsection:"colors"})},Object(d.__)("You can visit the the Customizer to edit the colors on your site.","full-site-editing")),permission:"settings"}];var y=Object(f.compose)(Object(a.withSelect)((function(t){return{canUserCreate:function(e){return t("core").canUser("create",e)}}})))((function(t){var e=t.searchTerm,n=t.random,r=void 0!==n&&n,i=t.canUserCreate;if(!e)return null;if(!g.length)return null;var s=Object(c.deburr)(Object(c.lowerCase)(e)).replace(/^\//,""),u=Object(c.filter)(g,(function(t){var e=t.keywords,n=t.permission;return i(n)&&Object(c.filter)(Object(c.uniq)(e),(function(t){return Object(c.includes)(s,t)})).length}));if(!u.length)return null;var a=r?Math.floor(Math.random()*u.length):0;return Object(o.createElement)("div",{className:"contextual-tip"},Object(o.createElement)(l.Tip,null,Object(c.get)(u,[a,"description"])))})),j=(n(14),function(){var t=Object(o.useState)(""),e=i()(t,2),n=e[0],r=e[1],u=Object(c.debounce)(r,400);return Object(o.createElement)(s.__experimentalInserterMenuExtension,null,(function(t){var e=t.filterValue;return t.hasItems||!e?null:(n!==e&&u(e),Object(o.createElement)(y,{searchTerm:e}))}))});void 0!==s.__experimentalInserterMenuExtension&&Object(u.registerPlugin)("block-inserter-contextual-tips",{render:function(){return Object(o.createElement)(j,null)}})}]));
block-patterns/class-block-patterns.php CHANGED
@@ -12,6 +12,8 @@ namespace A8C\FSE;
12
  */
13
  class Block_Patterns {
14
 
 
 
15
  /**
16
  * Class instance.
17
  *
@@ -24,7 +26,7 @@ class Block_Patterns {
24
  * Block_Patterns constructor.
25
  */
26
  private function __construct() {
27
- add_filter( 'block_editor_settings', array( $this, 'register_patterns' ), 11 );
28
  }
29
 
30
  /**
@@ -41,27 +43,35 @@ class Block_Patterns {
41
  }
42
 
43
  /**
44
- * Extends block editor settings to include FSE block patterns.
45
- *
46
- * @param array $settings Default editor settings.
47
- * @return array Filtered editor settings.
48
  */
49
- public function register_patterns( $settings ) {
50
- // Remove core patterns except 'Two Columns of Text'.
51
- $settings['__experimentalBlockPatterns'] = wp_list_filter(
52
- $settings['__experimentalBlockPatterns'],
53
- array(
54
- 'title' => 'Two Columns of Text',
55
- )
56
- );
 
 
 
 
57
 
58
- // Add our patterns.
59
- $settings['__experimentalBlockPatterns'] = array_merge(
60
- $this->get_patterns(),
61
- $settings['__experimentalBlockPatterns']
62
- );
 
 
 
63
 
64
- return $settings;
 
 
 
 
65
  }
66
 
67
  /**
@@ -124,7 +134,8 @@ class Block_Patterns {
124
  // Get the pattern files contents.
125
  foreach ( $pattern_files as $pattern_file ) {
126
  if ( substr( $pattern_file, -5 ) === '.json' ) {
127
- $patterns[] = json_decode(
 
128
  // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
129
  file_get_contents( $patterns_dir . $pattern_file ),
130
  true
@@ -132,7 +143,8 @@ class Block_Patterns {
132
  }
133
 
134
  if ( substr( $pattern_file, -4 ) === '.php' ) {
135
- $patterns[] = include_once $patterns_dir . $pattern_file;
 
136
  }
137
  }
138
 
12
  */
13
  class Block_Patterns {
14
 
15
+ const PATTERN_NAMESPACE = 'a8c/';
16
+
17
  /**
18
  * Class instance.
19
  *
26
  * Block_Patterns constructor.
27
  */
28
  private function __construct() {
29
+ $this->register_patterns();
30
  }
31
 
32
  /**
43
  }
44
 
45
  /**
46
+ * Register FSE block patterns and categories.
 
 
 
47
  */
48
+ public function register_patterns() {
49
+ // Register Block Pattern Categories.
50
+ if ( class_exists( 'WP_Block_Pattern_Categories_Registry' ) ) {
51
+ register_block_pattern_category( 'blog', array( 'label' => _x( 'Blog', 'Block pattern category', 'full-site-editing' ) ) );
52
+ register_block_pattern_category( 'call-to-action', array( 'label' => _x( 'Call to Action', 'Block pattern category', 'full-site-editing' ) ) );
53
+ register_block_pattern_category( 'contact', array( 'label' => _x( 'Contact', 'Block pattern category', 'full-site-editing' ) ) );
54
+ register_block_pattern_category( 'images', array( 'label' => _x( 'Images', 'Block pattern category', 'full-site-editing' ) ) );
55
+
56
+ // The 'Two Columns of Text' pattern is in the 'columns' and 'text' categories.
57
+ // Removing 'columns' so it doesn't appear as a category with only a single item.
58
+ unregister_block_pattern_category( 'columns' );
59
+ }
60
 
61
+ if ( class_exists( 'WP_Block_Patterns_Registry' ) ) {
62
+ // Remove core patterns except 'Two Columns of Text'.
63
+ // Unfortunately, \WP_Block_Patterns_Registry::get_instance()->get_all_registered() doesn't return the pattern names as keys.
64
+ foreach ( \WP_Block_Patterns_Registry::get_instance()->get_all_registered() as $pattern ) {
65
+ if ( 'core/' === substr( $pattern['name'], 0, 5 ) && 'core/text-two-columns' !== $pattern['name'] ) {
66
+ unregister_block_pattern( $pattern['name'] );
67
+ }
68
+ }
69
 
70
+ // Add our patterns.
71
+ foreach ( $this->get_patterns() as $name => $pattern ) {
72
+ register_block_pattern( $name, $pattern );
73
+ }
74
+ }
75
  }
76
 
77
  /**
134
  // Get the pattern files contents.
135
  foreach ( $pattern_files as $pattern_file ) {
136
  if ( substr( $pattern_file, -5 ) === '.json' ) {
137
+ $pattern_name = self::PATTERN_NAMESPACE . substr( $pattern_file, 0, -5 );
138
+ $patterns[ $pattern_name ] = json_decode(
139
  // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
140
  file_get_contents( $patterns_dir . $pattern_file ),
141
  true
143
  }
144
 
145
  if ( substr( $pattern_file, -4 ) === '.php' ) {
146
+ $pattern_name = self::PATTERN_NAMESPACE . substr( $pattern_file, 0, -4 );
147
+ $patterns[ $pattern_name ] = include $patterns_dir . $pattern_file;
148
  }
149
  }
150
 
block-patterns/patterns/call-to-action-02.php CHANGED
@@ -37,7 +37,7 @@ $markup = '
37
  ';
38
 
39
  return array(
40
- '__file' => 'wp_block',
41
- 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
42
- 'content' => $markup,
43
  );
37
  ';
38
 
39
  return array(
40
+ 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
41
+ 'categories' => array( 'call-to-action' ),
42
+ 'content' => $markup,
43
  );
block-patterns/patterns/collage-gallery.php CHANGED
@@ -12,8 +12,7 @@ $markup = '
12
  ';
13
 
14
  return array(
15
- '__file' => 'wp_block',
16
- 'title' => esc_html__( 'Collage gallery', 'full-site-editing' ),
17
- 'content' => $markup,
18
  );
19
-
12
  ';
13
 
14
  return array(
15
+ 'title' => esc_html__( 'Collage gallery', 'full-site-editing' ),
16
+ 'categories' => array( 'gallery' ),
17
+ 'content' => $markup,
18
  );
 
block-patterns/patterns/contact-02.php CHANGED
@@ -44,9 +44,9 @@ $markup = '
44
  ';
45
 
46
  return array(
47
- '__file' => 'wp_block',
48
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
49
- 'content' => sprintf(
50
  $markup,
51
  esc_html__( 'Contact', 'full-site-editing' ),
52
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
44
  ';
45
 
46
  return array(
47
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
48
+ 'categories' => array( 'contact' ),
49
+ 'content' => sprintf(
50
  $markup,
51
  esc_html__( 'Contact', 'full-site-editing' ),
52
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
block-patterns/patterns/contact-03.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package A8C\FSE
6
  */
7
 
 
8
  $markup = '
9
  <!-- wp:group {"align":"full","style":{"color":{"background":"#2b2729"}}} -->
10
  <div class="wp-block-group alignfull has-background" style="background-color:#2b2729"><div class="wp-block-group__inner-container"><!-- wp:spacer {"height":60} -->
@@ -46,11 +47,12 @@ $markup = '
46
  <!-- /wp:spacer --></div></div>
47
  <!-- /wp:group -->
48
  ';
 
49
 
50
  return array(
51
- '__file' => 'wp_block',
52
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
53
- 'content' => sprintf(
54
  $markup,
55
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
56
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
5
  * @package A8C\FSE
6
  */
7
 
8
+ // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled
9
  $markup = '
10
  <!-- wp:group {"align":"full","style":{"color":{"background":"#2b2729"}}} -->
11
  <div class="wp-block-group alignfull has-background" style="background-color:#2b2729"><div class="wp-block-group__inner-container"><!-- wp:spacer {"height":60} -->
47
  <!-- /wp:spacer --></div></div>
48
  <!-- /wp:group -->
49
  ';
50
+ // phpcs:enable WordPress.WP.CapitalPDangit.Misspelled
51
 
52
  return array(
53
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
+ 'categories' => array( 'contact' ),
55
+ 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
58
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
block-patterns/patterns/contact.php CHANGED
@@ -50,9 +50,9 @@ $markup = '
50
  ';
51
 
52
  return array(
53
- '__file' => 'wp_block',
54
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
55
- 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Get in touch', 'full-site-editing' ),
58
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
50
  ';
51
 
52
  return array(
53
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
+ 'categories' => array( 'contact' ),
55
+ 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Get in touch', 'full-site-editing' ),
58
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
block-patterns/patterns/description-and-image.php CHANGED
@@ -30,9 +30,9 @@ $markup = '
30
  ';
31
 
32
  return array(
33
- '__file' => 'wp_block',
34
- 'title' => esc_html__( 'Description and Image', 'full-site-editing' ),
35
- 'content' => sprintf(
36
  $markup,
37
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' ),
38
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/leaf.jpg' )
30
  ';
31
 
32
  return array(
33
+ 'title' => esc_html__( 'Description and Image', 'full-site-editing' ),
34
+ 'categories' => array( 'images' ),
35
+ 'content' => sprintf(
36
  $markup,
37
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' ),
38
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/leaf.jpg' )
block-patterns/patterns/food-menu.php CHANGED
@@ -56,9 +56,9 @@ $markup = '
56
  ';
57
 
58
  return array(
59
- '__file' => 'wp_block',
60
- 'title' => esc_html__( 'Food Menu', 'full-site-editing' ),
61
- 'content' => sprintf(
62
  $markup,
63
  esc_html__( 'Awesome Burger', 'full-site-editing' ),
64
  esc_html__( 'The burger that made us famous. 100% pure lean beef grilled to perfection.', 'full-site-editing' ),
@@ -71,4 +71,3 @@ return array(
71
  esc_html__( 'Fresh greens with cheddar cheese diced tomatoes, and honey mustard dressing.', 'full-site-editing' )
72
  ),
73
  );
74
-
56
  ';
57
 
58
  return array(
59
+ 'title' => esc_html__( 'Food Menu', 'full-site-editing' ),
60
+ 'categories' => array( 'text' ),
61
+ 'content' => sprintf(
62
  $markup,
63
  esc_html__( 'Awesome Burger', 'full-site-editing' ),
64
  esc_html__( 'The burger that made us famous. 100% pure lean beef grilled to perfection.', 'full-site-editing' ),
71
  esc_html__( 'Fresh greens with cheddar cheese diced tomatoes, and honey mustard dressing.', 'full-site-editing' )
72
  ),
73
  );
 
block-patterns/patterns/headline-02.php CHANGED
@@ -24,9 +24,9 @@ $markup = '
24
  ';
25
 
26
  return array(
27
- '__file' => 'wp_block',
28
- 'title' => esc_html__( 'Headline', 'full-site-editing' ),
29
- 'content' => sprintf(
30
  $markup,
31
  esc_html__( 'Eat Dessert First is for my love of food and sharing my favorites with you.', 'full-site-editing' ),
32
  esc_html__( 'Hi, I’m Lillie. Previously a magazine editor, I became a full-time mother and freelance writer in 2017. I spend most of my time with my kids and husband over at The Brown Bear Family.', 'full-site-editing' )
24
  ';
25
 
26
  return array(
27
+ 'title' => esc_html__( 'Headline', 'full-site-editing' ),
28
+ 'categories' => array( 'text' ),
29
+ 'content' => sprintf(
30
  $markup,
31
  esc_html__( 'Eat Dessert First is for my love of food and sharing my favorites with you.', 'full-site-editing' ),
32
  esc_html__( 'Hi, I’m Lillie. Previously a magazine editor, I became a full-time mother and freelance writer in 2017. I spend most of my time with my kids and husband over at The Brown Bear Family.', 'full-site-editing' )
block-patterns/patterns/headline.php CHANGED
@@ -40,9 +40,9 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- '__file' => 'wp_block',
44
- 'title' => esc_html__( 'Headline', 'full-site-editing' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/cayla1-w6ftfbpcs9i-unsplash.jpg' ),
48
  esc_html__( 'Weekly Recipe', 'full-site-editing' ),
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Headline', 'full-site-editing' ),
44
+ 'categories' => array( 'blog' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/cayla1-w6ftfbpcs9i-unsplash.jpg' ),
48
  esc_html__( 'Weekly Recipe', 'full-site-editing' ),
block-patterns/patterns/image-and-description.php CHANGED
@@ -30,9 +30,9 @@ $markup = '
30
  ';
31
 
32
  return array(
33
- '__file' => 'wp_block',
34
- 'title' => esc_html__( 'Image and Description', 'full-site-editing' ),
35
- 'content' => sprintf(
36
  $markup,
37
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/lollipop.jpg' ),
38
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' )
30
  ';
31
 
32
  return array(
33
+ 'title' => esc_html__( 'Image and Description', 'full-site-editing' ),
34
+ 'categories' => array( 'images' ),
35
+ 'content' => sprintf(
36
  $markup,
37
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/lollipop.jpg' ),
38
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' )
block-patterns/patterns/image-and-text.php CHANGED
@@ -32,9 +32,9 @@ $markup = '
32
  ';
33
 
34
  return array(
35
- '__file' => 'wp_block',
36
- 'title' => esc_html__( 'Image and Text', 'full-site-editing' ),
37
- 'content' => sprintf(
38
  $markup,
39
  esc_html__( 'His latest work is A Life Well-Lived, a selection of photos and stories of people across Nebraska highlighting their stories from the past 70 years. These are photographs and stories of those who might be forgotten in the rush of history.', 'full-site-editing' )
40
  ),
32
  ';
33
 
34
  return array(
35
+ 'title' => esc_html__( 'Image and Text', 'full-site-editing' ),
36
+ 'categories' => array( 'images' ),
37
+ 'content' => sprintf(
38
  $markup,
39
  esc_html__( 'His latest work is A Life Well-Lived, a selection of photos and stories of people across Nebraska highlighting their stories from the past 70 years. These are photographs and stories of those who might be forgotten in the rush of history.', 'full-site-editing' )
40
  ),
block-patterns/patterns/masonry-gallery.php CHANGED
@@ -12,10 +12,7 @@ $markup = '
12
  ';
13
 
14
  return array(
15
- '__file' => 'wp_block',
16
- 'title' => esc_html__( 'Masonry gallery', 'full-site-editing' ),
17
- 'content' => $markup,
18
  );
19
-
20
-
21
-
12
  ';
13
 
14
  return array(
15
+ 'title' => esc_html__( 'Masonry gallery', 'full-site-editing' ),
16
+ 'categories' => array( 'gallery' ),
17
+ 'content' => $markup,
18
  );
 
 
 
block-patterns/patterns/numbers.php CHANGED
@@ -40,9 +40,9 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- '__file' => 'wp_block',
44
- 'title' => esc_html__( 'Numbers', 'full-site-editing' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_html__( '1,652', 'full-site-editing' ),
48
  esc_html__( 'Volunteers available', 'full-site-editing' ),
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Numbers', 'full-site-editing' ),
44
+ 'categories' => array( 'text' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_html__( '1,652', 'full-site-editing' ),
48
  esc_html__( 'Volunteers available', 'full-site-editing' ),
block-patterns/patterns/recent-posts-02.php CHANGED
@@ -20,9 +20,9 @@ $markup = '
20
  ';
21
 
22
  return array(
23
- '__file' => 'wp_block',
24
- 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
25
- 'content' => sprintf(
26
  $markup,
27
  esc_html__( 'Latest Posts', 'full-site-editing' )
28
  ),
20
  ';
21
 
22
  return array(
23
+ 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
24
+ 'categories' => array( 'blog' ),
25
+ 'content' => sprintf(
26
  $markup,
27
  esc_html__( 'Latest Posts', 'full-site-editing' )
28
  ),
block-patterns/patterns/recent-posts.php CHANGED
@@ -14,7 +14,7 @@ $markup = '
14
  ';
15
 
16
  return array(
17
- '__file' => 'wp_block',
18
- 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
19
- 'content' => $markup,
20
  );
14
  ';
15
 
16
  return array(
17
+ 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
18
+ 'categories' => array( 'blog' ),
19
+ 'content' => $markup,
20
  );
block-patterns/patterns/three-columns-and-image.php CHANGED
@@ -66,9 +66,9 @@ $markup = '
66
  ';
67
 
68
  return array(
69
- '__file' => 'wp_block',
70
- 'title' => esc_html__( 'Three columns', 'full-site-editing' ),
71
- 'content' => sprintf(
72
  $markup,
73
  esc_html__( 'Salainis', 'full-site-editing' ),
74
  esc_html__( 'I had learned already many of the Outland methods of communicating by forest notes rather than trust to the betraying, high-pitched human voice.', 'full-site-editing' ),
66
  ';
67
 
68
  return array(
69
+ 'title' => esc_html__( 'Three columns', 'full-site-editing' ),
70
+ 'categories' => array( 'images' ),
71
+ 'content' => sprintf(
72
  $markup,
73
  esc_html__( 'Salainis', 'full-site-editing' ),
74
  esc_html__( 'I had learned already many of the Outland methods of communicating by forest notes rather than trust to the betraying, high-pitched human voice.', 'full-site-editing' ),
block-patterns/patterns/three-images-side-by-side.php CHANGED
@@ -42,7 +42,7 @@ $markup = '
42
  ';
43
 
44
  return array(
45
- '__file' => 'wp_block',
46
- 'title' => esc_html__( 'Three images side-by-side', 'full-site-editing' ),
47
- 'content' => $markup,
48
  );
42
  ';
43
 
44
  return array(
45
+ 'title' => esc_html__( 'Three images side-by-side', 'full-site-editing' ),
46
+ 'categories' => array( 'gallery', 'images' ),
47
+ 'content' => $markup,
48
  );
block-patterns/patterns/two-images-and-quote.php CHANGED
@@ -40,9 +40,9 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- '__file' => 'wp_block',
44
- 'title' => esc_html__( 'Two images and quote', 'full-site-editing' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-l4-sra8ii80-unsplash-2.jpg' ),
48
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-pyvtnjcwc-g-unsplash.jpg' ),
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Two images and quote', 'full-site-editing' ),
44
+ 'categories' => array( 'images' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-l4-sra8ii80-unsplash-2.jpg' ),
48
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-pyvtnjcwc-g-unsplash.jpg' ),
block-patterns/patterns/two-images-side-by-side.php CHANGED
@@ -32,7 +32,7 @@ $markup = '
32
  ';
33
 
34
  return array(
35
- '__file' => 'wp_block',
36
- 'title' => esc_html__( 'Two images side-by-side', 'full-site-editing' ),
37
- 'content' => $markup,
38
  );
32
  ';
33
 
34
  return array(
35
+ 'title' => esc_html__( 'Two images side-by-side', 'full-site-editing' ),
36
+ 'categories' => array( 'gallery', 'images' ),
37
+ 'content' => $markup,
38
  );
donations/dist/donations.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '7d5b94993dc75244ededa976b9c6932b');
donations/dist/donations.css ADDED
@@ -0,0 +1 @@
 
1
+ .donations__container{border:1px solid #ddd;display:grid;grid-template-columns:repeat(3,1fr)}.donations__container .components-button{border-bottom:1px solid #ddd}.donations__container .components-button:first-child.active{border-right:1px solid #ddd}.donations__container .components-button:nth-child(2).active{border-left:1px solid #ddd;border-right:1px solid #ddd}.donations__container .components-button:nth-child(3).active{border-left:1px solid #ddd}.donations__container .components-button.active{border-bottom:none}.donations__tab{grid-area:2/1/2/4;visibility:hidden}.donations__tab.active{visibility:visible}
donations/dist/donations.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=16)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e,n){var r;
2
+ /*!
3
+ Copyright (c) 2017 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&t.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&t.push(a)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e,n){var r=n(9);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},function(t,e){function n(t,e,n,r,o,i,c){try{var a=t[i](c),u=a.value}catch(l){return void n(l)}a.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var c=t.apply(e,r);function a(t){n(c,o,i,a,u,"next",t)}function u(t){n(c,o,i,a,u,"throw",t)}a(void 0)}))}}},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e,n){var r=n(10),o=n(11),i=n(12),c=n(14);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||c()}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(5),o=n.n(r),i=n(6),c=n.n(i),a=n(0),u=n(7),l=n.n(u),s=n(2),f=n(1),p=n(8),b=n.n(p),d=n(3),y=n.n(d),m=n(4),v=function(){var t=Object(a.useState)("one-time"),e=b()(t,2),n=e[0],r=e[1],o=function(t){return n===t?"active":null};return Object(a.createElement)("div",{className:"donations__container"},Object(a.createElement)(m.Button,{className:o("one-time"),onClick:function(){return r("one-time")}},Object(f.__)("One-Time","full-site-editing")),Object(a.createElement)(m.Button,{className:o("monthly"),onClick:function(){return r("monthly")}},Object(f.__)("Monthly","full-site-editing")),Object(a.createElement)(m.Button,{className:o("annually"),onClick:function(){return r("annually")}},Object(f.__)("Annually","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-one-time",className:y()("donations__tab",{active:o("one-time")})},Object(f.__)("One time","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-monthly",className:y()("donations__tab",{active:o("monthly")})},Object(f.__)("Monthly","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-annually",className:y()("donations__tab",{active:o("annually")})},Object(f.__)("Annually","full-site-editing")))},O=(n(15),function(){var t=c()(regeneratorRuntime.mark((function t(){var e,n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l()({path:"/wpcom/v2/memberships/status"});case 3:e=t.sent,t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return");case 9:if(!e.should_upgrade_to_access_memberships){t.next=17;break}if(n=Object(s.getBlockType)("a8c/donations")){t.next=14;break}return t.abrupt("return");case 14:r=Object(f._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing"),Object(s.unregisterBlockType)("a8c/donations"),Object(s.registerBlockType)("a8c/donations",o()({},n,{title:"".concat(n.title," (").concat(r,")")}));case 17:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}());Object(s.registerBlockType)("a8c/donations",{title:Object(f.__)("Donations (a8c-only)","full-site-editing"),description:Object(f.__)("Accept donations on your site.","full-site-editing"),category:"common",icon:Object(a.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(a.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(a.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["donations",Object(f.__)("premium","full-site-editing"),Object(f.__)("paywall","full-site-editing")],edit:v,save:function(){return Object(a.createElement)("div",null,"Donations block")}}),O()}]));
donations/dist/donations.rtl.css ADDED
@@ -0,0 +1 @@
 
1
+ .donations__container{border:1px solid #ddd;display:grid;grid-template-columns:repeat(3,1fr)}.donations__container .components-button{border-bottom:1px solid #ddd}.donations__container .components-button:first-child.active{border-left:1px solid #ddd}.donations__container .components-button:nth-child(2).active{border-right:1px solid #ddd;border-left:1px solid #ddd}.donations__container .components-button:nth-child(3).active{border-right:1px solid #ddd}.donations__container .components-button.active{border-bottom:none}.donations__tab{grid-area:2/1/2/4;visibility:hidden}.donations__tab.active{visibility:visible}
donations/donations.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Donations block
4
+ *
5
+ * @package A8C\FSE
6
+ */
7
+
8
+ namespace A8C\FSE\Earn\Donations;
9
+
10
+ /**
11
+ * Initialize the Donations block.
12
+ */
13
+ function fse_donations_block() {
14
+ $gate = apply_filters( 'wpcom_donations_block_init', false );
15
+ if ( ! $gate ) {
16
+ return;
17
+ }
18
+
19
+ $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/donations.asset.php';
20
+
21
+ wp_enqueue_script(
22
+ 'a8c-donations',
23
+ plugins_url( 'dist/donations.js', __FILE__ ),
24
+ $asset_file['dependencies'],
25
+ $asset_file['version'],
26
+ true
27
+ );
28
+
29
+ wp_enqueue_style(
30
+ 'a8c-donations',
31
+ plugins_url( 'dist/donations.css', __FILE__ ),
32
+ array(),
33
+ filemtime( plugin_dir_path( __FILE__ ) . 'dist/donations.css' )
34
+ );
35
+ }
36
+
37
+ add_action( 'init', 'A8C\FSE\Earn\Donations\fse_donations_block' );
donations/edit.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classNames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { useState } from '@wordpress/element';
10
+ import { __ } from '@wordpress/i18n';
11
+ import { Button } from '@wordpress/components';
12
+
13
+ /**
14
+ * Internal dependencies
15
+ */
16
+
17
+ const Edit = () => {
18
+ const [ activeTab, setActiveTab ] = useState( 'one-time' );
19
+
20
+ const isActive = ( button ) => ( activeTab === button ? 'active' : null );
21
+
22
+ return (
23
+ <div className="donations__container">
24
+ <Button className={ isActive( 'one-time' ) } onClick={ () => setActiveTab( 'one-time' ) }>
25
+ { __( 'One-Time', 'full-site-editing' ) }
26
+ </Button>
27
+ <Button className={ isActive( 'monthly' ) } onClick={ () => setActiveTab( 'monthly' ) }>
28
+ { __( 'Monthly', 'full-site-editing' ) }
29
+ </Button>
30
+ <Button className={ isActive( 'annually' ) } onClick={ () => setActiveTab( 'annually' ) }>
31
+ { __( 'Annually', 'full-site-editing' ) }
32
+ </Button>
33
+ <div
34
+ id="donations__tab-one-time"
35
+ className={ classNames( 'donations__tab', { active: isActive( 'one-time' ) } ) }
36
+ >
37
+ { __( 'One time', 'full-site-editing' ) }
38
+ </div>
39
+ <div
40
+ id="donations__tab-monthly"
41
+ className={ classNames( 'donations__tab', { active: isActive( 'monthly' ) } ) }
42
+ >
43
+ { __( 'Monthly', 'full-site-editing' ) }
44
+ </div>
45
+ <div
46
+ id="donations__tab-annually"
47
+ className={ classNames( 'donations__tab', { active: isActive( 'annually' ) } ) }
48
+ >
49
+ { __( 'Annually', 'full-site-editing' ) }
50
+ </div>
51
+ </div>
52
+ );
53
+ };
54
+
55
+ export default Edit;
donations/index.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-disable wpcalypso/import-docblock */
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import apiFetch from '@wordpress/api-fetch';
6
+ import { getBlockType, registerBlockType, unregisterBlockType } from '@wordpress/blocks';
7
+ import { __, _x } from '@wordpress/i18n';
8
+ /* eslint-enable wpcalypso/import-docblock */
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import edit from './edit';
14
+ import './style.scss';
15
+
16
+ /**
17
+ * Appends a "paid" tag to the Donations block title if site requires an upgrade.
18
+ */
19
+ const addPaidBlockFlags = async () => {
20
+ let membershipsStatus;
21
+ try {
22
+ membershipsStatus = await apiFetch( { path: '/wpcom/v2/memberships/status' } );
23
+ } catch {
24
+ // Do not add any flag if request fails.
25
+ return;
26
+ }
27
+ const shouldUpgrade = membershipsStatus.should_upgrade_to_access_memberships;
28
+ if ( shouldUpgrade ) {
29
+ const donationsBlock = getBlockType( 'a8c/donations' );
30
+ if ( ! donationsBlock ) {
31
+ return;
32
+ }
33
+
34
+ const paidFlag = _x(
35
+ 'paid',
36
+ 'Short label appearing near a block requiring a paid plan',
37
+ 'full-site-editing'
38
+ );
39
+
40
+ unregisterBlockType( 'a8c/donations' );
41
+ registerBlockType( 'a8c/donations', {
42
+ ...donationsBlock,
43
+ title: `${ donationsBlock.title } (${ paidFlag })`,
44
+ } );
45
+ }
46
+ };
47
+
48
+ function registerDonationsBlock() {
49
+ registerBlockType( 'a8c/donations', {
50
+ title: __( 'Donations (a8c-only)', 'full-site-editing' ),
51
+ description: __( 'Accept donations on your site.', 'full-site-editing' ),
52
+ category: 'common',
53
+ icon: (
54
+ <svg
55
+ width="25"
56
+ height="24"
57
+ viewBox="0 0 25 24"
58
+ fill="none"
59
+ xmlns="http://www.w3.org/2000/svg"
60
+ >
61
+ <path
62
+ d="M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"
63
+ fill="black"
64
+ />
65
+ <circle
66
+ cx="12.7439"
67
+ cy="8.69796"
68
+ r="5.94466"
69
+ stroke="black"
70
+ strokeWidth="1.5"
71
+ fill="none"
72
+ />
73
+ <path
74
+ d="M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533"
75
+ stroke="black"
76
+ strokeWidth="1.5"
77
+ fill="none"
78
+ />
79
+ </svg>
80
+ ),
81
+ supports: {
82
+ html: false,
83
+ },
84
+ keywords: [
85
+ 'donations',
86
+ /* translators: block keyword */
87
+ __( 'premium', 'full-site-editing' ),
88
+ /* translators: block keyword */
89
+ __( 'paywall', 'full-site-editing' ),
90
+ ],
91
+ edit,
92
+ save() {
93
+ return <div>Donations block</div>;
94
+ },
95
+ } );
96
+
97
+ // Done after registration so the status API request doesn't suspend the execution.
98
+ addPaidBlockFlags();
99
+ }
100
+
101
+ registerDonationsBlock();
donations/style.scss ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .donations__container {
2
+ border: 1px solid #ddd;
3
+ display: grid;
4
+ grid-template-columns: repeat( 3, 1fr );
5
+ }
6
+
7
+ .donations__container .components-button {
8
+ border-bottom: 1px solid #ddd;
9
+ }
10
+
11
+ .donations__container .components-button:first-child.active {
12
+ border-right: 1px solid #ddd;
13
+ }
14
+
15
+ .donations__container .components-button:nth-child( 2 ).active {
16
+ border-left: 1px solid #ddd;
17
+ border-right: 1px solid #ddd;
18
+ }
19
+
20
+ .donations__container .components-button:nth-child( 3 ).active {
21
+ border-left: 1px solid #ddd;
22
+ }
23
+
24
+ .donations__container .components-button.active {
25
+ border-bottom: none;
26
+ }
27
+
28
+ .donations__tab {
29
+ grid-area: 2/1/2/4;
30
+ visibility: hidden;
31
+ }
32
+
33
+ .donations__tab.active {
34
+ visibility: visible;
35
+ }
36
+
dotcom-fse/blocks/navigation-menu/edit.js CHANGED
@@ -50,22 +50,25 @@ const NavigationMenuEdit = ( {
50
  />
51
  </BlockControls>
52
  <InspectorControls>
53
- <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
 
 
 
54
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
55
  </PanelBody>
56
  <PanelColorSettings
57
- title={ __( 'Color Settings' ) }
58
  initialOpen={ false }
59
  colorSettings={ [
60
  {
61
  value: backgroundColor.color,
62
  onChange: setBackgroundColor,
63
- label: __( 'Background Color' ),
64
  },
65
  {
66
  value: textColor.color,
67
  onChange: setTextColor,
68
- label: __( 'Text Color' ),
69
  },
70
  ] }
71
  >
50
  />
51
  </BlockControls>
52
  <InspectorControls>
53
+ <PanelBody
54
+ className="blocks-font-size"
55
+ title={ __( 'Text Settings', 'full-site-editing' ) }
56
+ >
57
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
58
  </PanelBody>
59
  <PanelColorSettings
60
+ title={ __( 'Color Settings', 'full-site-editing' ) }
61
  initialOpen={ false }
62
  colorSettings={ [
63
  {
64
  value: backgroundColor.color,
65
  onChange: setBackgroundColor,
66
+ label: __( 'Background Color', 'full-site-editing' ),
67
  },
68
  {
69
  value: textColor.color,
70
  onChange: setTextColor,
71
+ label: __( 'Text Color', 'full-site-editing' ),
72
  },
73
  ] }
74
  >
dotcom-fse/blocks/navigation-menu/index.js CHANGED
@@ -19,8 +19,8 @@ const icon = (
19
  );
20
 
21
  registerBlockType( 'a8c/navigation-menu', {
22
- title: __( 'Navigation Menu' ),
23
- description: __( 'Visual placeholder for site-wide navigation and menus.' ),
24
  icon,
25
  category: 'layout',
26
  supports: {
19
  );
20
 
21
  registerBlockType( 'a8c/navigation-menu', {
22
+ title: __( 'Navigation Menu', 'full-site-editing' ),
23
+ description: __( 'Visual placeholder for site-wide navigation and menus.', 'full-site-editing' ),
24
  icon,
25
  category: 'layout',
26
  supports: {
dotcom-fse/blocks/post-content/index.js CHANGED
@@ -15,8 +15,8 @@ import save from './save';
15
  import './style.scss';
16
 
17
  registerBlockType( 'a8c/post-content', {
18
- title: __( 'Content' ),
19
- description: __( 'The page content.' ),
20
  icon: 'layout',
21
  category: 'layout',
22
  supports: {
15
  import './style.scss';
16
 
17
  registerBlockType( 'a8c/post-content', {
18
+ title: __( 'Content', 'full-site-editing' ),
19
+ description: __( 'The page content.', 'full-site-editing' ),
20
  icon: 'layout',
21
  category: 'layout',
22
  supports: {
dotcom-fse/blocks/site-credit/edit.js CHANGED
@@ -66,10 +66,13 @@ function SiteCreditEdit( {
66
 
67
  export default compose( [
68
  withSiteOptions( {
69
- siteTitleOption: { optionName: 'title', defaultValue: __( 'Site title loading…' ) },
 
 
 
70
  footerCreditOption: {
71
  optionName: 'footer_credit',
72
- defaultValue: __( 'Footer credit loading…' ),
73
  },
74
  } ),
75
  ] )( SiteCreditEdit );
66
 
67
  export default compose( [
68
  withSiteOptions( {
69
+ siteTitleOption: {
70
+ optionName: 'title',
71
+ defaultValue: __( 'Site title loading…', 'full-site-editing' ),
72
+ },
73
  footerCreditOption: {
74
  optionName: 'footer_credit',
75
+ defaultValue: __( 'Footer credit loading…', 'full-site-editing' ),
76
  },
77
  } ),
78
  ] )( SiteCreditEdit );
dotcom-fse/blocks/site-credit/index.js CHANGED
@@ -12,8 +12,11 @@ import edit from './edit';
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-credit', {
15
- title: __( 'WordPress.com Credit' ),
16
- description: __( "This block tells the world that you're using WordPress.com." ),
 
 
 
17
  icon: 'wordpress-alt',
18
  category: 'layout',
19
  supports: {
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-credit', {
15
+ title: __( 'WordPress.com Credit', 'full-site-editing' ),
16
+ description: __(
17
+ "This block tells the world that you're using WordPress.com.",
18
+ 'full-site-editing'
19
+ ),
20
  icon: 'wordpress-alt',
21
  category: 'layout',
22
  supports: {
dotcom-fse/blocks/site-credit/index.php CHANGED
@@ -145,22 +145,22 @@ function get_footer_credit_options() {
145
  */
146
  return apply_filters(
147
  'a8c_fse_update_footer_credit_options',
148
- [
149
- [
150
- 'label' => __( 'Proudly powered by WordPress' ),
151
  'value' => 'default',
152
  'renderType' => 'text',
153
- ],
154
- [
155
- 'label' => __( 'WordPress Icon' ),
156
  'value' => 'svg',
157
  'renderType' => 'icon',
158
- 'renderProps' => [
159
  'icon' => 'wordpress',
160
  'color' => 'gray',
161
- ],
162
- ],
163
- ]
164
  );
165
  }
166
 
145
  */
146
  return apply_filters(
147
  'a8c_fse_update_footer_credit_options',
148
+ array(
149
+ array(
150
+ 'label' => __( 'Proudly powered by WordPress', 'full-site-editing' ),
151
  'value' => 'default',
152
  'renderType' => 'text',
153
+ ),
154
+ array(
155
+ 'label' => __( 'WordPress Icon', 'full-site-editing' ),
156
  'value' => 'svg',
157
  'renderType' => 'icon',
158
+ 'renderProps' => array(
159
  'icon' => 'wordpress',
160
  'color' => 'gray',
161
+ ),
162
+ ),
163
+ )
164
  );
165
  }
166
 
dotcom-fse/blocks/site-description/edit.js CHANGED
@@ -61,22 +61,25 @@ function SiteDescriptionEdit( {
61
  />
62
  </BlockControls>
63
  <InspectorControls>
64
- <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
 
 
 
65
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
66
  </PanelBody>
67
  <PanelColorSettings
68
- title={ __( 'Color Settings' ) }
69
  initialOpen={ false }
70
  colorSettings={ [
71
  {
72
  value: backgroundColor.color,
73
  onChange: setBackgroundColor,
74
- label: __( 'Background Color' ),
75
  },
76
  {
77
  value: textColor.color,
78
  onChange: setTextColor,
79
- label: __( 'Text Color' ),
80
  },
81
  ] }
82
  >
@@ -91,7 +94,7 @@ function SiteDescriptionEdit( {
91
  </InspectorControls>
92
  <RichText
93
  allowedFormats={ [] }
94
- aria-label={ __( 'Site Description' ) }
95
  className={ classNames( 'site-description', className, {
96
  'has-text-color': textColor.color,
97
  'has-background': backgroundColor.color,
@@ -104,7 +107,7 @@ function SiteDescriptionEdit( {
104
  onChange={ updateValue }
105
  onReplace={ insertDefaultBlock }
106
  onSplit={ noop }
107
- placeholder={ __( 'Add a Site Description' ) }
108
  style={ {
109
  backgroundColor: backgroundColor.color,
110
  color: textColor.color,
@@ -135,6 +138,9 @@ export default compose( [
135
  dispatch( 'core/block-editor' ).insertDefaultBlock( {}, rootClientId, blockIndex + 1 ),
136
  } ) ),
137
  withSiteOptions( {
138
- siteDescription: { optionName: 'description', defaultValue: __( 'Site description loading…' ) },
 
 
 
139
  } ),
140
  ] )( SiteDescriptionEdit );
61
  />
62
  </BlockControls>
63
  <InspectorControls>
64
+ <PanelBody
65
+ className="blocks-font-size"
66
+ title={ __( 'Text Settings', 'full-site-editing' ) }
67
+ >
68
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
69
  </PanelBody>
70
  <PanelColorSettings
71
+ title={ __( 'Color Settings', 'full-site-editing' ) }
72
  initialOpen={ false }
73
  colorSettings={ [
74
  {
75
  value: backgroundColor.color,
76
  onChange: setBackgroundColor,
77
+ label: __( 'Background Color', 'full-site-editing' ),
78
  },
79
  {
80
  value: textColor.color,
81
  onChange: setTextColor,
82
+ label: __( 'Text Color', 'full-site-editing' ),
83
  },
84
  ] }
85
  >
94
  </InspectorControls>
95
  <RichText
96
  allowedFormats={ [] }
97
+ aria-label={ __( 'Site Description', 'full-site-editing' ) }
98
  className={ classNames( 'site-description', className, {
99
  'has-text-color': textColor.color,
100
  'has-background': backgroundColor.color,
107
  onChange={ updateValue }
108
  onReplace={ insertDefaultBlock }
109
  onSplit={ noop }
110
+ placeholder={ __( 'Add a Site Description', 'full-site-editing' ) }
111
  style={ {
112
  backgroundColor: backgroundColor.color,
113
  color: textColor.color,
138
  dispatch( 'core/block-editor' ).insertDefaultBlock( {}, rootClientId, blockIndex + 1 ),
139
  } ) ),
140
  withSiteOptions( {
141
+ siteDescription: {
142
+ optionName: 'description',
143
+ defaultValue: __( 'Site description loading…', 'full-site-editing' ),
144
+ },
145
  } ),
146
  ] )( SiteDescriptionEdit );
dotcom-fse/blocks/site-description/index.js CHANGED
@@ -12,8 +12,8 @@ import edit from './edit';
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-description', {
15
- title: __( 'Site Description' ),
16
- description: __( 'Site description, also known as the tagline.' ),
17
  icon: (
18
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
19
  <path fill="none" d="M0 0h24v24H0z" />
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-description', {
15
+ title: __( 'Site Description', 'full-site-editing' ),
16
+ description: __( 'Site description, also known as the tagline.', 'full-site-editing' ),
17
  icon: (
18
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
19
  <path fill="none" d="M0 0h24v24H0z" />
dotcom-fse/blocks/site-title/edit.js CHANGED
@@ -58,24 +58,27 @@ function SiteTitleEdit( {
58
  />
59
  </BlockControls>
60
  <InspectorControls>
61
- <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
 
 
 
62
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
63
  </PanelBody>
64
  <PanelColorSettings
65
- title={ __( 'Color Settings' ) }
66
  initialOpen={ false }
67
  colorSettings={ [
68
  {
69
  value: textColor.color,
70
  onChange: setTextColor,
71
- label: __( 'Text Color' ),
72
  },
73
  ] }
74
  />
75
  </InspectorControls>
76
  <RichText
77
  allowedFormats={ [] }
78
- aria-label={ __( 'Site Title' ) }
79
  className={ classNames( 'site-title', className, {
80
  'has-text-color': textColor.color,
81
  [ `has-text-align-${ textAlign }` ]: textAlign,
@@ -86,7 +89,7 @@ function SiteTitleEdit( {
86
  onChange={ updateValue }
87
  onReplace={ insertDefaultBlock }
88
  onSplit={ noop }
89
- placeholder={ __( 'Add a Site Title' ) }
90
  style={ {
91
  color: textColor.color,
92
  fontSize: actualFontSize ? actualFontSize + 'px' : undefined,
@@ -116,6 +119,9 @@ export default compose( [
116
  dispatch( 'core/block-editor' ).insertDefaultBlock( {}, rootClientId, blockIndex + 1 ),
117
  } ) ),
118
  withSiteOptions( {
119
- siteTitle: { optionName: 'title', defaultValue: __( 'Site title loading…' ) },
 
 
 
120
  } ),
121
  ] )( SiteTitleEdit );
58
  />
59
  </BlockControls>
60
  <InspectorControls>
61
+ <PanelBody
62
+ className="blocks-font-size"
63
+ title={ __( 'Text Settings', 'full-site-editing' ) }
64
+ >
65
  <FontSizePicker onChange={ setFontSize } value={ actualFontSize } />
66
  </PanelBody>
67
  <PanelColorSettings
68
+ title={ __( 'Color Settings', 'full-site-editing' ) }
69
  initialOpen={ false }
70
  colorSettings={ [
71
  {
72
  value: textColor.color,
73
  onChange: setTextColor,
74
+ label: __( 'Text Color', 'full-site-editing' ),
75
  },
76
  ] }
77
  />
78
  </InspectorControls>
79
  <RichText
80
  allowedFormats={ [] }
81
+ aria-label={ __( 'Site Title', 'full-site-editing' ) }
82
  className={ classNames( 'site-title', className, {
83
  'has-text-color': textColor.color,
84
  [ `has-text-align-${ textAlign }` ]: textAlign,
89
  onChange={ updateValue }
90
  onReplace={ insertDefaultBlock }
91
  onSplit={ noop }
92
+ placeholder={ __( 'Add a Site Title', 'full-site-editing' ) }
93
  style={ {
94
  color: textColor.color,
95
  fontSize: actualFontSize ? actualFontSize + 'px' : undefined,
119
  dispatch( 'core/block-editor' ).insertDefaultBlock( {}, rootClientId, blockIndex + 1 ),
120
  } ) ),
121
  withSiteOptions( {
122
+ siteTitle: {
123
+ optionName: 'title',
124
+ defaultValue: __( 'Site title loading…', 'full-site-editing' ),
125
+ },
126
  } ),
127
  ] )( SiteTitleEdit );
dotcom-fse/blocks/site-title/index.js CHANGED
@@ -12,8 +12,8 @@ import edit from './edit';
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-title', {
15
- title: __( 'Site Title' ),
16
- description: __( 'Your site title.' ),
17
  icon: 'layout',
18
  category: 'layout',
19
  supports: {
12
  import './style.scss';
13
 
14
  registerBlockType( 'a8c/site-title', {
15
+ title: __( 'Site Title', 'full-site-editing' ),
16
+ description: __( 'Your site title.', 'full-site-editing' ),
17
  icon: 'layout',
18
  category: 'layout',
19
  supports: {
dotcom-fse/blocks/template/edit.js CHANGED
@@ -177,7 +177,8 @@ const TemplateEdit = compose(
177
  <Placeholder className="template-block__overlay" onClick={ save }>
178
  { navigateToTemplate && (
179
  <div className="template-block__loading">
180
- <Spinner /> { sprintf( __( 'Loading editor for: %s' ), templateTitle ) }
 
181
  </div>
182
  ) }
183
  <Button
@@ -188,7 +189,7 @@ const TemplateEdit = compose(
188
  isLarge
189
  ref={ navButton }
190
  >
191
- { sprintf( __( 'Edit %s' ), templateTitle ) }
192
  </Button>
193
  </Placeholder>
194
  </Fragment>
177
  <Placeholder className="template-block__overlay" onClick={ save }>
178
  { navigateToTemplate && (
179
  <div className="template-block__loading">
180
+ <Spinner />{ ' ' }
181
+ { sprintf( __( 'Loading editor for: %s', 'full-site-editing' ), templateTitle ) }
182
  </div>
183
  ) }
184
  <Button
189
  isLarge
190
  ref={ navButton }
191
  >
192
+ { sprintf( __( 'Edit %s', 'full-site-editing' ), templateTitle ) }
193
  </Button>
194
  </Placeholder>
195
  </Fragment>
dotcom-fse/blocks/template/index.js CHANGED
@@ -16,9 +16,9 @@ import './site-logo';
16
 
17
  if ( 'wp_template_part' !== fullSiteEditing.editorPostType ) {
18
  registerBlockType( 'a8c/template', {
19
- title: __( 'Template Part' ),
20
  __experimentalDisplayName: 'label',
21
- description: __( 'Display a Template Part.' ),
22
  icon: 'layout',
23
  category: 'layout',
24
  attributes: {
16
 
17
  if ( 'wp_template_part' !== fullSiteEditing.editorPostType ) {
18
  registerBlockType( 'a8c/template', {
19
+ title: __( 'Template Part', 'full-site-editing' ),
20
  __experimentalDisplayName: 'label',
21
+ description: __( 'Display a Template Part.', 'full-site-editing' ),
22
  icon: 'layout',
23
  category: 'layout',
24
  attributes: {
dotcom-fse/dist/dotcom-fse.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render', 'wp-url'), 'version' => '843361b2e83354a70d99a228ed25b9e3');
1
+ <?php return array('dependencies' => array('lodash', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render', 'wp-url'), 'version' => 'f08a223ef7251ff39097d1162869246c');
dotcom-fse/dist/dotcom-fse.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var c=r.apply(null,o);c&&e.push(c)}else if("object"===i)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var o=n(38),r=n(39),i=n(17),c=n(40);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var o=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){},function(e,t){!function(){e.exports=this.wp.serverSideRender}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(31);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(32),r=n(33),i=n(34);e.exports=function(e){return function(){var t,n=o(e);if(r()){var c=o(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var o=n(45),r=n(46),i=n(17),c=n(47);e.exports=function(e){return o(e)||r(e)||i(e)||c()}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(35),r=n(36);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var c,l=e[Symbol.iterator]();!(o=(c=l.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(a){r=!0,i=a}finally{try{o||null==l.return||l.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var o=n(18);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(7),i=n(1),c=n(10),l=n.n(c),a=n(20),s=n.n(a),u=n(4),p=n(2),d=n(5),f=n(3),b=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e){return{isPublished:e("core/editor").isCurrentPostPublished()}}))])((function(e){var t=e.attributes,n=e.backgroundColor,r=e.fontSize,c=e.setAttributes,a=e.setBackgroundColor,u=e.setFontSize,f=e.setTextColor,b=e.textColor,m=e.isPublished,O=t.customFontSize,g=t.textAlign,j=O||r.size;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:g,onChange:function(e){c({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:u,value:j})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:n.color,onChange:a,label:Object(i.__)("Background Color")},{value:b.color,onChange:f,label:Object(i.__)("Text Color")}]},Object(o.createElement)(p.ContrastChecker,l()({textColor:b.color,backgroundColor:n.color},{fontSize:j})))),Object(o.createElement)(s.a,{isPublished:m,block:"a8c/navigation-menu",attributes:t}))})),m=(n(30),Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(r.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus."),icon:m,category:"layout",supports:{align:["wide","full","right","left"],html:!1,reusable:!1},edit:b,save:function(){return null}});var O=n(12),g=n(6),j=n.n(g),v=n(21),h=n.n(v),y=n(22),_=n.n(y),S=n(23),E=n.n(S),k=n(24),C=n.n(k),w=n(11),x=n.n(w),P=n(25),T=function(e){E()(n,e);var t=C()(n);function n(){return h()(this,n),t.apply(this,arguments)}return _()(n,[{key:"toggleEditing",value:function(){var e=this.props,t=e.isEditing;(0,e.setState)({isEditing:!t})}},{key:"onSelectPost",value:function(e){var t=e.id,n=e.type;this.props.setState({isEditing:!1,selectedPostId:t,selectedPostType:n})}},{key:"render",value:function(){var e=this.props.attributes.align;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:x()("post-content-block",j()({},"align".concat(e),e))},Object(o.createElement)(P.PostTitle,null),Object(o.createElement)(p.InnerBlocks,{templateLock:!1})))}}]),n}(o.Component),B=Object(u.compose)([Object(u.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(f.withSelect)((function(e,t){var n=t.selectedPostId,o=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",o,n)}}))])(T);n(37);Object(r.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content"),description:Object(i.__)("The page content."),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:B,save:function(){return Object(o.createElement)(p.InnerBlocks.Content,null)}});var I=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/post-content"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,l()({},t,{className:"post-content__block"}))}}),"addContentSlotClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",I,9);var N=n(9),A=n.n(N),z=n(13),D=n.n(z),F=n(15),L=n.n(F),R=n(16);function V(e){var t=Object(o.useRef)();return Object(o.useEffect)((function(){t.current=e}),[e]),t.current}function M(e,t,n,r,c,l){var a=Object(o.useState)({option:t,previousOption:"",loaded:!1,error:!1}),s=D()(a,2),u=s[0],p=s[1],d=V(r),f=V(c);function b(){p(A()({},u,{option:u.previousOption,isSaving:!1}))}return Object(o.useEffect)((function(){u.loaded||u.error?function(){var t=u.option,o=u.previousOption,l=!o&&!t||t&&o&&t.trim()===o.trim(),a=!t||0===t.trim().length;!r&&d&&a&&b();if(!c||l)return;!f&&c&&function(t){p(A()({},u,{isSaving:!0})),L()({path:"/wp/v2/settings",method:"POST",data:j()({},e,t)}).then((function(){return function(e){p(A()({},u,{previousOption:e,isDirty:!1,isSaving:!1}))}(t)})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s"),e)),b()}))}(t)}():L()({path:"/wp/v2/settings"}).then((function(t){return p(A()({},u,{option:Object(R.decodeEntities)(t[e]),previousOption:Object(R.decodeEntities)(t[e]),loaded:!0,error:!1}))})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s"),e)),p(A()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s"),e),error:!0}))}))})),{siteOptions:u,handleChange:function(e){l({updated:Date.now()}),p(A()({},u,{option:e}))}}}var U=function(e){return Object(u.createHigherOrderComponent)((function(t){return Object(u.pure)((function(n){var r=Object(f.useSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isPublishingPost,r=t.isAutosavingPost,i=t.isCurrentPostPublished;return(n()&&i()||o())&&!r()})),i=Object(f.useDispatch)((function(e){return e("core/notices").createErrorNotice})),c=n.isSelected,a=n.setAttributes,s=Object.keys(e).reduce((function(t,n){var o=e[n],l=M(o.optionName,o.defaultValue,i,c,r,a),s=l.siteOptions,u=l.handleChange;return t[n]={value:s.option,updateValue:u,loaded:s.loaded},t}),{});return Object(o.createElement)(t,l()({},n,s))}))}),"withSiteOptions")},H=fullSiteEditing.footerCreditOptions,W=function(e){var t=e.choice,n=H.find((function(e){return e.value===t}));if(!n)return null;var r=n.renderType,i=n.renderProps,c=n.label,l=A()({label:c},i);return"icon"===r?Object(o.createElement)(d.Icon,l):Object(o.createElement)("span",null," ",l.label," ")},q=fullSiteEditing,G=q.footerCreditOptions,Q=q.defaultCreditOption;var Y=Object(u.compose)([U({siteTitleOption:{optionName:"title",defaultValue:Object(i.__)("Site title loading…")},footerCreditOption:{optionName:"footer_credit",defaultValue:Object(i.__)("Footer credit loading…")}})])((function(e){var t=e.attributes.textAlign,n=void 0===t?"center":t,r=e.isSelected,i=e.setAttributes,c=e.footerCreditOption,l=c.value,a=c.updateValue,s=e.siteTitleOption.value,u=l||Q;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:n,onChange:function(e){i({textAlign:e})}})),Object(o.createElement)("div",{className:x()("site-info","site-credit__block",j()({},"has-text-align-".concat(n),n))},Object(o.createElement)("span",{className:"site-name"},s),Object(o.createElement)("span",{className:"comma"},","),Object(o.createElement)("span",{className:"site-credit__selection"},r?Object(o.createElement)(d.SelectControl,{onChange:a,value:u,options:G}):Object(o.createElement)(W,{choice:u}))))}));n(41);Object(r.registerBlockType)("a8c/site-credit",{title:Object(i.__)("WordPress.com Credit"),description:Object(i.__)("This block tells the world that you're using WordPress.com."),icon:"wordpress-alt",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,removal:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"}},edit:Y,save:function(){return null}});var $=n(8);var J=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,c=o.getTemplateLock,l=i(n);return{blockIndex:r(n,l),isLocked:!!c(l),rootClientId:l}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),U({siteDescription:{optionName:"description",defaultValue:Object(i.__)("Site description loading…")}})])((function(e){var t,n=e.attributes,r=e.backgroundColor,c=e.className,a=e.fontSize,s=e.insertDefaultBlock,u=e.setAttributes,f=e.setBackgroundColor,b=e.setFontSize,m=e.setTextColor,O=e.siteDescription,g=e.textColor,v=n.customFontSize,h=n.textAlign,y=v||a.size,_=O.value,S=O.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:h,onChange:function(e){u({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:b,value:y})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:r.color,onChange:f,label:Object(i.__)("Background Color")},{value:g.color,onChange:m,label:Object(i.__)("Text Color")}]},Object(o.createElement)(p.ContrastChecker,l()({textColor:g.color,backgroundColor:r.color},{fontSize:y})))),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Description"),className:x()("site-description",c,(t={"has-text-color":g.color,"has-background":r.color},j()(t,"has-text-align-".concat(h),h),j()(t,r.class,r.class),j()(t,g.class,g.class),j()(t,a.class,!v&&a.class),t)),identifier:"content",onChange:S,onReplace:s,onSplit:$.noop,placeholder:Object(i.__)("Add a Site Description"),style:{backgroundColor:r.color,color:g.color,fontSize:y?y+"px":void 0},tagName:"p",value:_}))}));n(42);Object(r.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description"),description:Object(i.__)("Site description, also known as the tagline."),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string",default:"small"},customFontSize:{type:"number"}},edit:J,save:function(){return null}});var K=Object(u.compose)([Object(p.withColors)({textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,c=o.getTemplateLock,l=i(n);return{blockIndex:r(n,l),isLocked:!!c(l),rootClientId:l}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),U({siteTitle:{optionName:"title",defaultValue:Object(i.__)("Site title loading…")}})])((function(e){var t,n=e.attributes,r=e.className,c=e.fontSize,l=e.insertDefaultBlock,a=e.setAttributes,s=e.setFontSize,u=e.setTextColor,f=e.siteTitle,b=e.textColor,m=n.customFontSize,O=n.textAlign,g=m||c.size,v=f.value,h=f.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:O,onChange:function(e){a({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:s,value:g})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:b.color,onChange:u,label:Object(i.__)("Text Color")}]})),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Title"),className:x()("site-title",r,(t={"has-text-color":b.color},j()(t,"has-text-align-".concat(O),O),j()(t,b.class,b.class),j()(t,c.class,!m&&c.class),t)),identifier:"content",onChange:h,onReplace:l,onSplit:$.noop,placeholder:Object(i.__)("Add a Site Title"),style:{color:b.color,fontSize:g?g+"px":void 0},tagName:"h1",value:v}))}));n(43);Object(r.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title"),description:Object(i.__)("Your site title."),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string",default:"normal"},customFontSize:{type:"number"}},edit:K,save:function(){return null}});var X=n(26),Z=(n(19),Object(u.compose)(Object(u.withState)({templateClientId:null}),Object(f.withSelect)((function(e,t){var n=t.attributes,o=t.templateClientId,r=e("core").getEntityRecord,i=e("core/editor"),c=i.getCurrentPostId,l=i.isEditedPostDirty,a=e("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,p=e("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=c(),b=d&&r("postType","wp_template_part",d),m=Object(X.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),O=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(o),templateTitle:Object($.get)(b,["title","rendered"],""),isDirty:l(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:O&&"a8c/template"===O.name}})),Object(f.withDispatch)((function(e,t){var n=e("core/block-editor").receiveBlocks,o=e("core/edit-post").openGeneralSidebar,i=t.template,c=t.templateClientId,l=t.setState;return{savePost:e("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!c){var e=Object(r.parse)(Object($.get)(i,["content","raw"],"")),t=Object(r.createBlock)("core/group",{},e);n([t]),l({templateClientId:t.clientId})}},openGeneralSidebar:o}})))((function(e){var t,n=e.attributes,r=e.editTemplateUrl,c=e.receiveTemplateBlocks,l=e.template,a=e.templateBlock,s=e.templateTitle,u=e.isDirty,f=e.savePost,b=e.isEditorSidebarOpened,m=e.openGeneralSidebar,O=e.isAnyTemplateBlockSelected;if(!l)return Object(o.createElement)(d.Placeholder,{className:"template-block__placeholder"},Object(o.createElement)(d.Spinner,null));var g=Object(o.createRef)(),v=Object(o.useState)(!1),h=D()(v,2),y=h[0],_=h[1];Object(o.useEffect)((function(){y&&!u&&g.current.click(),c()})),Object(o.useEffect)((function(){var e=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(b&&e){if(O)return m("edit-post/document"),void e.classList.add("hidden");e.classList.remove("hidden")}}),[O,b,m]);var S=n.align,E=n.className,k=function(e){e.stopPropagation(),_(!0),u&&(e.preventDefault(),f())};return Object(o.createElement)("div",{className:x()("template-block",(t={},j()(t,"align".concat(S),S),j()(t,"is-navigating-to-template",y),t))},a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.Disabled,null,Object(o.createElement)("div",{className:E},Object(o.createElement)(p.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:$.noop}))),Object(o.createElement)(d.Placeholder,{className:"template-block__overlay",onClick:k},y&&Object(o.createElement)("div",{className:"template-block__loading"},Object(o.createElement)(d.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading editor for: %s"),s)),Object(o.createElement)(d.Button,{className:y?"hidden":null,href:r,onClick:k,isDefault:!0,isLarge:!0,ref:g},Object(i.sprintf)(Object(i.__)("Edit %s"),s)))))}))),ee=Object(u.createHigherOrderComponent)((function(e){return function(t){return"fse-site-logo"!==t.attributes.className?Object(o.createElement)(e,t):Object(o.createElement)(e,l()({},t,{className:"template__site-logo"}))}}),"addFSESiteLogoClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",ee),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(r.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part"),__experimentalDisplayName:"label",description:Object(i.__)("Display a Template Part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"},label:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Z,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var te=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/template"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,l()({},t,{className:"template__block-container"}))}}),"addFSETemplateClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",te,9);var ne=n(14),oe=n.n(ne),re=n(27),ie=n.n(re);n(44);function ce(e){var t=e.defaultLabel,n=e.defaultUrl,r=Object(o.useState)(t),i=D()(r,2),c=i[0],l=i[1],a=Object(o.useState)(n),s=D()(a,2),u=s[0],p=s[1];return window.wp.hooks.addAction("updateCloseButtonOverrides","a8c-fse",(function(e){l(e.label),p(e.closeUrl)})),Object(o.createElement)("a",{href:u,"aria-label":c},Object(o.createElement)(d.Button,{className:"components-button components-icon-button"},Object(o.createElement)(d.Dashicon,{icon:"arrow-left-alt2"}),Object(o.createElement)("div",{className:"close-button-override__label"},c)))}oe()((function(){var e=fullSiteEditing.editorPostType;if("wp_template_part"===e||"page"===e||"post"===e)var t=setInterval((function(){var n=document.querySelector(".edit-post-header__toolbar");if(n){clearInterval(t);var r=document.createElement("div");r.className="components-toolbar edit-post-fullscreen-mode-close__toolbar edit-post-fullscreen-mode-close__toolbar__override",n.prepend(r);var c=fullSiteEditing,l=c.closeButtonLabel,a=c.closeButtonUrl,s=window.calypsoifyGutenberg;s&&s.closeUrl&&(a=s.closeUrl),s&&s.closeButtonLabel&&(l=s.closeButtonLabel);var u=a||"edit.php?post_type=".concat(e),p=l||"Back";"page"!==e||l?"post"!==e||l?"wp_template_part"!==e||l||(p=Object(i.__)("Template Parts")):p=Object(i.__)("Posts"):p=Object(i.__)("Pages"),ie.a.render(Object(o.createElement)(ce,{defaultLabel:p,defaultUrl:u}),r)}}))}));var le=n(28),ae=n.n(le),se=n(29),ue=Object(f.withSelect)((function(e){var t=e("core").getEntityRecord,n=e("core/editor").getEditedPostAttribute;return{templateClasses:Object($.map)(n("template_part_types"),(function(e){var n=Object($.get)(t("taxonomy","wp_template_part_type",e),"name","");return Object($.endsWith)(n,"-header")?"fse-header":Object($.endsWith)(n,"-footer")?"fse-footer":void 0}))}}))((function(e){var t=e.templateClasses,n=setInterval((function(){var e=document.querySelector(".block-editor__typewriter > div");e&&(clearInterval(n),e.className=x.a.apply(void 0,["a8c-template-editor fse-template-part"].concat(ae()(t))))}));return null}));"wp_template_part"===fullSiteEditing.editorPostType&&Object(se.registerPlugin)("fse-editor-template-classes",{render:ue}),oe()((function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(f.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site."),{isDismissible:!1})}));var pe=Object(u.compose)(Object(f.withSelect)((function(e){var t=e("core/editor").getEditorSettings,n=e("core/block-editor").getBlocks,o=e("core/edit-post").getEditorMode,r=n().find((function(e){return"a8c/post-content"===e.name}));return{rootClientId:r?r.clientId:"",showInserter:"visual"===o()&&t().richEditingEnabled}})))((function(e){var t=e.rootClientId,n=e.showInserter;return Object(o.createElement)(p.Inserter,{rootClientId:t,disabled:!n,position:"bottom right",toggleProps:{isPrimary:!0}})}));oe()((function(){return function(){if("page"===fullSiteEditing.editorPostType)var e=setInterval((function(){var t=document.querySelector(".edit-post-header-toolbar");if(t){clearInterval(e);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),t.insertBefore(n,t.firstChild),Object(o.render)(Object(o.createElement)(pe,null),n)}}))}()}));var de=Object(f.subscribe)((function(){if("page"!==fullSiteEditing.editorPostType)return de();!1===Object(f.select)("core/block-editor").isValidTemplate()&&Object(f.dispatch)("core/block-editor").setTemplateValidity(!0)})),fe=["logo","brand","emblem","hallmark"];Object(O.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",(function(e,t){return"core/image"!==t?e:e=Object($.assign)({},e,{keywords:e.keywords.concat(fe)})}));n(48);Object(f.use)((function(e){return{dispatch:function(t){var n=A()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;return"core/editor"===t&&n.trashPost&&"wp_template_part"===o&&(n.trashPost=function(){}),n}}})),Object(f.use)((function(e){return{dispatch:function(t){var n=A()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;if("core/editor"===t&&n.editPost&&"wp_template_part"===o){var r=n.editPost;n.editPost=function(e){"draft"!==e.status&&r(e)}}return n}}}));var be=Object(f.subscribe)((function(){var e=Object(f.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&e("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&e("post-status"),be()}))}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var l=r.apply(null,o);l&&e.push(l)}else if("object"===i)for(var c in o)n.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var o=n(38),r=n(39),i=n(17),l=n(40);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||l()}},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var o=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){},function(e,t){!function(){e.exports=this.wp.serverSideRender}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(31);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(32),r=n(33),i=n(34);e.exports=function(e){return function(){var t,n=o(e);if(r()){var l=o(this).constructor;t=Reflect.construct(n,arguments,l)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var o=n(45),r=n(46),i=n(17),l=n(47);e.exports=function(e){return o(e)||r(e)||i(e)||l()}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(35),r=n(36);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(a){r=!0,i=a}finally{try{o||null==c.return||c.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var o=n(18);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(7),i=n(1),l=n(10),c=n.n(l),a=n(20),s=n.n(a),u=n(4),p=n(2),d=n(5),f=n(3),b=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e){return{isPublished:e("core/editor").isCurrentPostPublished()}}))])((function(e){var t=e.attributes,n=e.backgroundColor,r=e.fontSize,l=e.setAttributes,a=e.setBackgroundColor,u=e.setFontSize,f=e.setTextColor,b=e.textColor,m=e.isPublished,g=t.customFontSize,O=t.textAlign,j=g||r.size;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:O,onChange:function(e){l({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(p.FontSizePicker,{onChange:u,value:j})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:n.color,onChange:a,label:Object(i.__)("Background Color","full-site-editing")},{value:b.color,onChange:f,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(p.ContrastChecker,c()({textColor:b.color,backgroundColor:n.color},{fontSize:j})))),Object(o.createElement)(s.a,{isPublished:m,block:"a8c/navigation-menu",attributes:t}))})),m=(n(30),Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(r.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu","full-site-editing"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus.","full-site-editing"),icon:m,category:"layout",supports:{align:["wide","full","right","left"],html:!1,reusable:!1},edit:b,save:function(){return null}});var g=n(12),O=n(6),j=n.n(O),v=n(21),h=n.n(v),y=n(22),_=n.n(y),S=n(23),E=n.n(S),k=n(24),C=n.n(k),w=n(11),x=n.n(w),P=n(25),T=function(e){E()(n,e);var t=C()(n);function n(){return h()(this,n),t.apply(this,arguments)}return _()(n,[{key:"toggleEditing",value:function(){var e=this.props,t=e.isEditing;(0,e.setState)({isEditing:!t})}},{key:"onSelectPost",value:function(e){var t=e.id,n=e.type;this.props.setState({isEditing:!1,selectedPostId:t,selectedPostType:n})}},{key:"render",value:function(){var e=this.props.attributes.align;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:x()("post-content-block",j()({},"align".concat(e),e))},Object(o.createElement)(P.PostTitle,null),Object(o.createElement)(p.InnerBlocks,{templateLock:!1})))}}]),n}(o.Component),B=Object(u.compose)([Object(u.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(f.withSelect)((function(e,t){var n=t.selectedPostId,o=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",o,n)}}))])(T);n(37);Object(r.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content","full-site-editing"),description:Object(i.__)("The page content.","full-site-editing"),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:B,save:function(){return Object(o.createElement)(p.InnerBlocks.Content,null)}});var I=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/post-content"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"post-content__block"}))}}),"addContentSlotClassname");Object(g.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",I,9);var N=n(9),A=n.n(N),z=n(13),D=n.n(z),F=n(15),L=n.n(F),R=n(16);function V(e){var t=Object(o.useRef)();return Object(o.useEffect)((function(){t.current=e}),[e]),t.current}function M(e,t,n,r,l,c){var a=Object(o.useState)({option:t,previousOption:"",loaded:!1,error:!1}),s=D()(a,2),u=s[0],p=s[1],d=V(r),f=V(l);function b(){p(A()({},u,{option:u.previousOption,isSaving:!1}))}return Object(o.useEffect)((function(){u.loaded||u.error?function(){var t=u.option,o=u.previousOption,c=!o&&!t||t&&o&&t.trim()===o.trim(),a=!t||0===t.trim().length;!r&&d&&a&&b();if(!l||c)return;!f&&l&&function(t){p(A()({},u,{isSaving:!0})),L()({path:"/wp/v2/settings",method:"POST",data:j()({},e,t)}).then((function(){return function(e){p(A()({},u,{previousOption:e,isDirty:!1,isSaving:!1}))}(t)})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s","full-site-editing"),e)),b()}))}(t)}():L()({path:"/wp/v2/settings"}).then((function(t){return p(A()({},u,{option:Object(R.decodeEntities)(t[e]),previousOption:Object(R.decodeEntities)(t[e]),loaded:!0,error:!1}))})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s","full-site-editing"),e)),p(A()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s","full-site-editing"),e),error:!0}))}))})),{siteOptions:u,handleChange:function(e){c({updated:Date.now()}),p(A()({},u,{option:e}))}}}var U=function(e){return Object(u.createHigherOrderComponent)((function(t){return Object(u.pure)((function(n){var r=Object(f.useSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isPublishingPost,r=t.isAutosavingPost,i=t.isCurrentPostPublished;return(n()&&i()||o())&&!r()})),i=Object(f.useDispatch)((function(e){return e("core/notices").createErrorNotice})),l=n.isSelected,a=n.setAttributes,s=Object.keys(e).reduce((function(t,n){var o=e[n],c=M(o.optionName,o.defaultValue,i,l,r,a),s=c.siteOptions,u=c.handleChange;return t[n]={value:s.option,updateValue:u,loaded:s.loaded},t}),{});return Object(o.createElement)(t,c()({},n,s))}))}),"withSiteOptions")},H=fullSiteEditing.footerCreditOptions,W=function(e){var t=e.choice,n=H.find((function(e){return e.value===t}));if(!n)return null;var r=n.renderType,i=n.renderProps,l=n.label,c=A()({label:l},i);return"icon"===r?Object(o.createElement)(d.Icon,c):Object(o.createElement)("span",null," ",c.label," ")},q=fullSiteEditing,G=q.footerCreditOptions,Q=q.defaultCreditOption;var Y=Object(u.compose)([U({siteTitleOption:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")},footerCreditOption:{optionName:"footer_credit",defaultValue:Object(i.__)("Footer credit loading…","full-site-editing")}})])((function(e){var t=e.attributes.textAlign,n=void 0===t?"center":t,r=e.isSelected,i=e.setAttributes,l=e.footerCreditOption,c=l.value,a=l.updateValue,s=e.siteTitleOption.value,u=c||Q;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:n,onChange:function(e){i({textAlign:e})}})),Object(o.createElement)("div",{className:x()("site-info","site-credit__block",j()({},"has-text-align-".concat(n),n))},Object(o.createElement)("span",{className:"site-name"},s),Object(o.createElement)("span",{className:"comma"},","),Object(o.createElement)("span",{className:"site-credit__selection"},r?Object(o.createElement)(d.SelectControl,{onChange:a,value:u,options:G}):Object(o.createElement)(W,{choice:u}))))}));n(41);Object(r.registerBlockType)("a8c/site-credit",{title:Object(i.__)("WordPress.com Credit","full-site-editing"),description:Object(i.__)("This block tells the world that you're using WordPress.com.","full-site-editing"),icon:"wordpress-alt",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,removal:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"}},edit:Y,save:function(){return null}});var $=n(8);var J=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),U({siteDescription:{optionName:"description",defaultValue:Object(i.__)("Site description loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.backgroundColor,l=e.className,a=e.fontSize,s=e.insertDefaultBlock,u=e.setAttributes,f=e.setBackgroundColor,b=e.setFontSize,m=e.setTextColor,g=e.siteDescription,O=e.textColor,v=n.customFontSize,h=n.textAlign,y=v||a.size,_=g.value,S=g.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:h,onChange:function(e){u({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(p.FontSizePicker,{onChange:b,value:y})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:r.color,onChange:f,label:Object(i.__)("Background Color","full-site-editing")},{value:O.color,onChange:m,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(p.ContrastChecker,c()({textColor:O.color,backgroundColor:r.color},{fontSize:y})))),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Description","full-site-editing"),className:x()("site-description",l,(t={"has-text-color":O.color,"has-background":r.color},j()(t,"has-text-align-".concat(h),h),j()(t,r.class,r.class),j()(t,O.class,O.class),j()(t,a.class,!v&&a.class),t)),identifier:"content",onChange:S,onReplace:s,onSplit:$.noop,placeholder:Object(i.__)("Add a Site Description","full-site-editing"),style:{backgroundColor:r.color,color:O.color,fontSize:y?y+"px":void 0},tagName:"p",value:_}))}));n(42);Object(r.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description","full-site-editing"),description:Object(i.__)("Site description, also known as the tagline.","full-site-editing"),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string",default:"small"},customFontSize:{type:"number"}},edit:J,save:function(){return null}});var K=Object(u.compose)([Object(p.withColors)({textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),U({siteTitle:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.className,l=e.fontSize,c=e.insertDefaultBlock,a=e.setAttributes,s=e.setFontSize,u=e.setTextColor,f=e.siteTitle,b=e.textColor,m=n.customFontSize,g=n.textAlign,O=m||l.size,v=f.value,h=f.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:g,onChange:function(e){a({textAlign:e})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(p.FontSizePicker,{onChange:s,value:O})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:b.color,onChange:u,label:Object(i.__)("Text Color","full-site-editing")}]})),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Title","full-site-editing"),className:x()("site-title",r,(t={"has-text-color":b.color},j()(t,"has-text-align-".concat(g),g),j()(t,b.class,b.class),j()(t,l.class,!m&&l.class),t)),identifier:"content",onChange:h,onReplace:c,onSplit:$.noop,placeholder:Object(i.__)("Add a Site Title","full-site-editing"),style:{color:b.color,fontSize:O?O+"px":void 0},tagName:"h1",value:v}))}));n(43);Object(r.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title","full-site-editing"),description:Object(i.__)("Your site title.","full-site-editing"),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string",default:"normal"},customFontSize:{type:"number"}},edit:K,save:function(){return null}});var X=n(26),Z=(n(19),Object(u.compose)(Object(u.withState)({templateClientId:null}),Object(f.withSelect)((function(e,t){var n=t.attributes,o=t.templateClientId,r=e("core").getEntityRecord,i=e("core/editor"),l=i.getCurrentPostId,c=i.isEditedPostDirty,a=e("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,p=e("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=l(),b=d&&r("postType","wp_template_part",d),m=Object(X.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),g=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(o),templateTitle:Object($.get)(b,["title","rendered"],""),isDirty:c(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:g&&"a8c/template"===g.name}})),Object(f.withDispatch)((function(e,t){var n=e("core/block-editor").receiveBlocks,o=e("core/edit-post").openGeneralSidebar,i=t.template,l=t.templateClientId,c=t.setState;return{savePost:e("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!l){var e=Object(r.parse)(Object($.get)(i,["content","raw"],"")),t=Object(r.createBlock)("core/group",{},e);n([t]),c({templateClientId:t.clientId})}},openGeneralSidebar:o}})))((function(e){var t,n=e.attributes,r=e.editTemplateUrl,l=e.receiveTemplateBlocks,c=e.template,a=e.templateBlock,s=e.templateTitle,u=e.isDirty,f=e.savePost,b=e.isEditorSidebarOpened,m=e.openGeneralSidebar,g=e.isAnyTemplateBlockSelected;if(!c)return Object(o.createElement)(d.Placeholder,{className:"template-block__placeholder"},Object(o.createElement)(d.Spinner,null));var O=Object(o.createRef)(),v=Object(o.useState)(!1),h=D()(v,2),y=h[0],_=h[1];Object(o.useEffect)((function(){y&&!u&&O.current.click(),l()})),Object(o.useEffect)((function(){var e=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(b&&e){if(g)return m("edit-post/document"),void e.classList.add("hidden");e.classList.remove("hidden")}}),[g,b,m]);var S=n.align,E=n.className,k=function(e){e.stopPropagation(),_(!0),u&&(e.preventDefault(),f())};return Object(o.createElement)("div",{className:x()("template-block",(t={},j()(t,"align".concat(S),S),j()(t,"is-navigating-to-template",y),t))},a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.Disabled,null,Object(o.createElement)("div",{className:E},Object(o.createElement)(p.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:$.noop}))),Object(o.createElement)(d.Placeholder,{className:"template-block__overlay",onClick:k},y&&Object(o.createElement)("div",{className:"template-block__loading"},Object(o.createElement)(d.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading editor for: %s","full-site-editing"),s)),Object(o.createElement)(d.Button,{className:y?"hidden":null,href:r,onClick:k,isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s","full-site-editing"),s)))))}))),ee=Object(u.createHigherOrderComponent)((function(e){return function(t){return"fse-site-logo"!==t.attributes.className?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__site-logo"}))}}),"addFSESiteLogoClassname");Object(g.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",ee),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(r.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part","full-site-editing"),__experimentalDisplayName:"label",description:Object(i.__)("Display a Template Part.","full-site-editing"),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"},label:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Z,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var te=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/template"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__block-container"}))}}),"addFSETemplateClassname");Object(g.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",te,9);var ne=n(14),oe=n.n(ne),re=n(27),ie=n.n(re);n(44);function le(e){var t=e.defaultLabel,n=e.defaultUrl,r=Object(o.useState)(t),i=D()(r,2),l=i[0],c=i[1],a=Object(o.useState)(n),s=D()(a,2),u=s[0],p=s[1];return window.wp.hooks.addAction("updateCloseButtonOverrides","a8c-fse",(function(e){c(e.label),p(e.closeUrl)})),Object(o.createElement)("a",{href:u,"aria-label":l},Object(o.createElement)(d.Button,{className:"components-button components-icon-button"},Object(o.createElement)(d.Dashicon,{icon:"arrow-left-alt2"}),Object(o.createElement)("div",{className:"close-button-override__label"},l)))}oe()((function(){var e=fullSiteEditing.editorPostType;if("wp_template_part"===e||"page"===e||"post"===e)var t=setInterval((function(){var n=document.querySelector(".edit-post-header__toolbar");if(n){clearInterval(t);var r=document.createElement("div");r.className="components-toolbar edit-post-fullscreen-mode-close__toolbar edit-post-fullscreen-mode-close__toolbar__override",n.prepend(r);var l=fullSiteEditing,c=l.closeButtonLabel,a=l.closeButtonUrl,s=window.calypsoifyGutenberg;s&&s.closeUrl&&(a=s.closeUrl),s&&s.closeButtonLabel&&(c=s.closeButtonLabel);var u=a||"edit.php?post_type=".concat(e),p=c||"Back";"page"!==e||c?"post"!==e||c?"wp_template_part"!==e||c||(p=Object(i.__)("Template Parts","full-site-editing")):p=Object(i.__)("Posts","full-site-editing"):p=Object(i.__)("Pages","full-site-editing"),ie.a.render(Object(o.createElement)(le,{defaultLabel:p,defaultUrl:u}),r)}}))}));var ce=n(28),ae=n.n(ce),se=n(29),ue=Object(f.withSelect)((function(e){var t=e("core").getEntityRecord,n=e("core/editor").getEditedPostAttribute;return{templateClasses:Object($.map)(n("template_part_types"),(function(e){var n=Object($.get)(t("taxonomy","wp_template_part_type",e),"name","");return Object($.endsWith)(n,"-header")?"fse-header":Object($.endsWith)(n,"-footer")?"fse-footer":void 0}))}}))((function(e){var t=e.templateClasses,n=setInterval((function(){var e=document.querySelector(".block-editor__typewriter > div");e&&(clearInterval(n),e.className=x.a.apply(void 0,["a8c-template-editor fse-template-part"].concat(ae()(t))))}));return null}));"wp_template_part"===fullSiteEditing.editorPostType&&Object(se.registerPlugin)("fse-editor-template-classes",{render:ue}),oe()((function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(f.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site.","full-site-editing"),{isDismissible:!1})}));var pe=Object(u.compose)(Object(f.withSelect)((function(e){var t=e("core/editor").getEditorSettings,n=e("core/block-editor").getBlocks,o=e("core/edit-post").getEditorMode,r=n().find((function(e){return"a8c/post-content"===e.name}));return{rootClientId:r?r.clientId:"",showInserter:"visual"===o()&&t().richEditingEnabled}})))((function(e){var t=e.rootClientId,n=e.showInserter;return Object(o.createElement)(p.Inserter,{rootClientId:t,disabled:!n,position:"bottom right",toggleProps:{isPrimary:!0}})}));oe()((function(){return function(){if("page"===fullSiteEditing.editorPostType)var e=setInterval((function(){var t=document.querySelector(".edit-post-header-toolbar");if(t){clearInterval(e);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),t.insertBefore(n,t.firstChild),Object(o.render)(Object(o.createElement)(pe,null),n)}}))}()}));var de=Object(f.subscribe)((function(){if("page"!==fullSiteEditing.editorPostType)return de();!1===Object(f.select)("core/block-editor").isValidTemplate()&&Object(f.dispatch)("core/block-editor").setTemplateValidity(!0)})),fe=["logo","brand","emblem","hallmark"];Object(g.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",(function(e,t){return"core/image"!==t?e:e=Object($.assign)({},e,{keywords:e.keywords.concat(fe)})}));n(48);Object(f.use)((function(e){return{dispatch:function(t){var n=A()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;return"core/editor"===t&&n.trashPost&&"wp_template_part"===o&&(n.trashPost=function(){}),n}}})),Object(f.use)((function(e){return{dispatch:function(t){var n=A()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;if("core/editor"===t&&n.editPost&&"wp_template_part"===o){var r=n.editPost;n.editPost=function(e){"draft"!==e.status&&r(e)}}return n}}}));var be=Object(f.subscribe)((function(){var e=Object(f.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&e("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&e("post-status"),be()}))}]));
dotcom-fse/lib/site-options/use-site-options.js CHANGED
@@ -51,10 +51,12 @@ export function useSiteOptions(
51
  } )
52
  )
53
  .catch( () => {
54
- createErrorNotice( sprintf( __( 'Unable to load site %s' ), siteOption ) );
 
 
55
  setSiteOptions( {
56
  ...siteOptions,
57
- option: sprintf( __( 'Error loading site %s' ), siteOption ),
58
  error: true,
59
  } );
60
  } );
@@ -93,7 +95,9 @@ export function useSiteOptions(
93
  apiFetch( { path: '/wp/v2/settings', method: 'POST', data: { [ siteOption ]: option } } )
94
  .then( () => updatePreviousOption( option ) )
95
  .catch( () => {
96
- createErrorNotice( sprintf( __( 'Unable to save site %s' ), siteOption ) );
 
 
97
  revertOption();
98
  } );
99
  }
51
  } )
52
  )
53
  .catch( () => {
54
+ createErrorNotice(
55
+ sprintf( __( 'Unable to load site %s', 'full-site-editing' ), siteOption )
56
+ );
57
  setSiteOptions( {
58
  ...siteOptions,
59
+ option: sprintf( __( 'Error loading site %s', 'full-site-editing' ), siteOption ),
60
  error: true,
61
  } );
62
  } );
95
  apiFetch( { path: '/wp/v2/settings', method: 'POST', data: { [ siteOption ]: option } } )
96
  .then( () => updatePreviousOption( option ) )
97
  .catch( () => {
98
+ createErrorNotice(
99
+ sprintf( __( 'Unable to save site %s', 'full-site-editing' ), siteOption )
100
+ );
101
  revertOption();
102
  } );
103
  }
dotcom-fse/plugins/close-button-override/index.js CHANGED
@@ -85,11 +85,11 @@ domReady( () => {
85
 
86
  let defaultLabel = closeButtonLabel || 'Back';
87
  if ( 'page' === editorPostType && ! closeButtonLabel ) {
88
- defaultLabel = __( 'Pages' );
89
  } else if ( 'post' === editorPostType && ! closeButtonLabel ) {
90
- defaultLabel = __( 'Posts' );
91
  } else if ( 'wp_template_part' === editorPostType && ! closeButtonLabel ) {
92
- defaultLabel = __( 'Template Parts' );
93
  }
94
 
95
  ReactDOM.render(
85
 
86
  let defaultLabel = closeButtonLabel || 'Back';
87
  if ( 'page' === editorPostType && ! closeButtonLabel ) {
88
+ defaultLabel = __( 'Pages', 'full-site-editing' );
89
  } else if ( 'post' === editorPostType && ! closeButtonLabel ) {
90
+ defaultLabel = __( 'Posts', 'full-site-editing' );
91
  } else if ( 'wp_template_part' === editorPostType && ! closeButtonLabel ) {
92
+ defaultLabel = __( 'Template Parts', 'full-site-editing' );
93
  }
94
 
95
  ReactDOM.render(
dotcom-fse/plugins/template-update-notice/index.js CHANGED
@@ -12,7 +12,7 @@ domReady( () => {
12
  }
13
  dispatch( 'core/notices' ).createNotice(
14
  'info',
15
- __( 'Updates to this template will affect all pages on your site.' ),
16
  {
17
  isDismissible: false,
18
  }
12
  }
13
  dispatch( 'core/notices' ).createNotice(
14
  'info',
15
+ __( 'Updates to this template will affect all pages on your site.', 'full-site-editing' ),
16
  {
17
  isDismissible: false,
18
  }
editor-gutenboarding-launch/dist/editor-gutenboarding-launch.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-data', 'wp-dom-ready', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '27ea122731a4f396f15d95bd0abb9623');
1
+ <?php return array('dependencies' => array('wp-data', 'wp-dom-ready', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '7ae869be12d3ea651cb284187cc85484');
editor-gutenboarding-launch/dist/editor-gutenboarding-launch.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){for(var t in n)e[t]=n[t]}(window,function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return 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,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=5)}([function(e,n){function t(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(f){return void t(f)}c.done?n(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var u=e.apply(n,r);function c(e){t(u,o,i,c,a,"next",e)}function a(e){t(u,o,i,c,a,"throw",e)}c(void 0)}))}}},function(e,n){!function(){e.exports=this.wp.i18n}()},function(e,n){!function(){e.exports=this.wp.domReady}()},function(e,n){!function(){e.exports=this.wp.hooks}()},function(e,n){!function(){e.exports=this.wp.data}()},function(e,n,t){"use strict";t.r(n);var r=t(0),o=t.n(r),i=t(1),u=t(2),c=t.n(u),a=t(3),f=t(4);t(6),t(7);c()((function(){l(),Object(a.addAction)("setGutenboardingStatus","a8c-gutenboarding",l)}));var d=!1;function l(){var e,n,t,r;if(!d&&(null===(e=window)||void 0===e||null===(n=e.calypsoifyGutenberg)||void 0===n?void 0:n.isFseGutenboarding)&&(null===(t=window)||void 0===t||null===(r=t.calypsoifyGutenberg)||void 0===r?void 0:r.frankenflowUrl)){d=!0;var u=setInterval((function(){var e,n,t=document.querySelector(".edit-post-header__settings");if(t){clearInterval(u),document.querySelector("body").classList.add("editor-gutenberg-launch__fse-overrides");var r=t.querySelector(".editor-post-publish-button__button"),c=document.createElement("a"),a=null===(e=window)||void 0===e||null===(n=e.calypsoifyGutenberg)||void 0===n?void 0:n.frankenflowUrl;c.href=a,c.target="_top",c.className="editor-gutenberg-launch__launch-button components-button is-primary";var d=document.createTextNode(Object(i.__)("Launch"));c.appendChild(d);var l=function(){var e=o()(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,Object(f.dispatch)("core/editor").autosave();case 3:window.top.location.href=a;case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();c.addEventListener("click",l),t.prepend(c),r&&t.prepend(r)}}))}}},function(e,n){!function(){e.exports=this.wp.editor}()},function(e,n,t){}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){function n(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(f){return void n(f)}c.done?t(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(1),u=n(2),c=n.n(u),a=n(3),f=n(4);n(6),n(7);c()((function(){l(),Object(a.addAction)("setGutenboardingStatus","a8c-gutenboarding",l)}));var d=!1;function l(){var e,t,n,r;if(!d&&(null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.isFseGutenboarding)&&(null===(n=window)||void 0===n||null===(r=n.calypsoifyGutenberg)||void 0===r?void 0:r.frankenflowUrl)){d=!0;var u=setInterval((function(){var e,t,n=document.querySelector(".edit-post-header__settings");if(n){clearInterval(u),document.querySelector("body").classList.add("editor-gutenberg-launch__fse-overrides");var r=n.querySelector(".editor-post-publish-button__button"),c=document.createElement("a"),a=null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.frankenflowUrl;c.href=a,c.target="_top",c.className="editor-gutenberg-launch__launch-button components-button is-primary";var d=document.createTextNode(Object(i.__)("Launch","full-site-editing"));c.appendChild(d);var l=function(){var e=o()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,Object(f.dispatch)("core/editor").savePost();case 3:window.top.location.href=a;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();c.addEventListener("click",l),n.prepend(c),r&&n.prepend(r)}}))}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t,n){}]));
editor-gutenboarding-launch/index.ts CHANGED
@@ -64,13 +64,13 @@ function updateEditor() {
64
  launchLink.href = launchHref;
65
  launchLink.target = '_top';
66
  launchLink.className = 'editor-gutenberg-launch__launch-button components-button is-primary';
67
- const textContent = document.createTextNode( __( 'Launch' ) );
68
  launchLink.appendChild( textContent );
69
 
70
  const saveAndNavigate = async ( e: Event ) => {
71
  // Disable href navigation
72
  e.preventDefault();
73
- await dispatch( 'core/editor' ).autosave();
74
  // Using window.top to escape from the editor iframe on WordPress.com
75
  window.top.location.href = launchHref;
76
  };
64
  launchLink.href = launchHref;
65
  launchLink.target = '_top';
66
  launchLink.className = 'editor-gutenberg-launch__launch-button components-button is-primary';
67
+ const textContent = document.createTextNode( __( 'Launch', 'full-site-editing' ) );
68
  launchLink.appendChild( textContent );
69
 
70
  const saveAndNavigate = async ( e: Event ) => {
71
  // Disable href navigation
72
  e.preventDefault();
73
+ await dispatch( 'core/editor' ).savePost();
74
  // Using window.top to escape from the editor iframe on WordPress.com
75
  window.top.location.href = launchHref;
76
  };
full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 1.8
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -35,7 +35,7 @@ namespace A8C\FSE;
35
  *
36
  * @var string
37
  */
38
- define( 'PLUGIN_VERSION', '1.8' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
@@ -290,6 +290,14 @@ function load_block_inserter_modifications() {
290
  }
291
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_block_inserter_modifications' );
292
 
 
 
 
 
 
 
 
 
293
  /**
294
  * Load WPCOM block editor nav sidebar
295
  */
@@ -299,3 +307,11 @@ function load_wpcom_block_editor_sidebar() {
299
  }
300
  }
301
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_block_editor_sidebar' );
 
 
 
 
 
 
 
 
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 1.9
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
35
  *
36
  * @var string
37
  */
38
+ define( 'PLUGIN_VERSION', '1.9' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
290
  }
291
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_block_inserter_modifications' );
292
 
293
+ /**
294
+ * Load Mailerlite module
295
+ */
296
+ function load_mailerlite() {
297
+ require_once __DIR__ . '/mailerlite/subscriber-popup.php';
298
+ }
299
+ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_mailerlite' );
300
+
301
  /**
302
  * Load WPCOM block editor nav sidebar
303
  */
307
  }
308
  }
309
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_block_editor_sidebar' );
310
+
311
+ /**
312
+ * Load Donations block.
313
+ */
314
+ function load_donations() {
315
+ require_once __DIR__ . '/donations/donations.php';
316
+ }
317
+ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_donations' );
global-styles/dist/global-styles.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill'), 'version' => 'ad2515be4725fb3aa6438b2ec7334c1a');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill'), 'version' => '69c4ffc86b2950f461cc6fccd986b602');
global-styles/dist/global-styles.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){for(var c in t)e[c]=t[c]}(window,function(e){var t={};function c(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,c),a.l=!0,a.exports}return c.m=e,c.c=t,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)c.d(n,a,function(t){return e[t]}.bind(null,a));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c(c.s=15)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){e.exports=function(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}},function(e,t,c){var n=c(4);function a(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}e.exports=function(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach((function(t){n(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,c){var n;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var c={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=a.apply(null,n);o&&e.push(o)}else if("object"===r)for(var l in n)c.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t,c){},function(e,t,c){"use strict";c.r(t);var n,a,r,o,l=c(9),s=c(3),i=c(10),u=c(5),h=c.n(u),f=c(7),p=c.n(f),v={},b=!1,O={publishOptions:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"IO_PUBLISH_OPTIONS",options:t};case 2:return e.abrupt("return",{type:"PUBLISH_OPTIONS",options:t});case 3:case"end":return e.stop()}}),e)})),updateOptions:function(e){return{type:"UPDATE_OPTIONS",options:e}},fetchOptions:function(){return{type:"IO_FETCH_OPTIONS"}},resetLocalChanges:function(){return{type:"RESET_OPTIONS",options:v}}},m=c(11),d=c.n(m),g=c(8),j=c(4),_=c.n(j),E=c(0),z=c(6),y=c(1),P=c(2),w=c(12),V=c(13),S=c.n(V),H=function(e){var t=e.unsupportedFeature;return Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("Your active theme doesn't support %s."),t))},x=function(e,t,c){switch(e){case"SPACE_LORA":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#fa4d4b",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M24.1 62c-3.6-2.9-8.9-5-15.8-6.3-2.8-.5-5-1-6.9-1.6-.5-.2-1-.3-1.5-.5v12.5c1.4.3 2.9.6 4.4.9 2.5.4 4.6 1 6.2 1.6s2.9 1.3 3.9 2.2c.9.8 1.6 1.6 2 2.6.4.9.6 1.9.6 3 0 2.3-.9 4.2-2.7 5.8-1.8 1.6-4.6 2.4-8.4 2.4-2.2 0-4.2-.3-5.9-.8v12c1.8.3 3.7.4 5.7.4 3.7 0 7-.5 10-1.4 2.9-.9 5.5-2.3 7.5-4s3.6-3.9 4.7-6.3c1.1-2.5 1.7-5.3 1.7-8.4V75c0-5.7-1.8-10-5.5-13zM12.9 42.5c2.1 1.9 3.1 4.2 3.1 6.9v2.3h12.4v-3.4c0-2.7-.5-5.3-1.6-7.7-1-2.4-2.5-4.6-4.6-6.5-2-1.9-4.5-3.4-7.5-4.4-3-1.1-6.5-1.7-10.3-1.7-1.5 0-3 .1-4.4.3v11.9c1.3-.4 2.7-.5 4.4-.5 3.7-.2 6.5.8 8.5 2.8zm67.9 10.9c-1.8-2.1-4-3.6-6.5-4.7-2.4-1.1-5-1.6-7.8-1.6-3.7 0-6.7.7-9.1 2.2-2.4 1.4-4.2 3.4-5.5 5.9h-1.7v-6.8H38.4v65.4h11.8V88.2H52c.6 1.1 1.2 2.1 2 3.1.8.9 1.8 1.8 2.9 2.5 1.2.8 2.6 1.3 4.1 1.8 1.6.4 3.4.7 5.5.7 2.9 0 5.5-.5 8-1.5 2.5-1.1 4.7-2.6 6.5-4.6 1.8-2.1 3.3-4.6 4.3-7.5 1.1-2.9 1.6-6.3 1.6-10.2v-1.7c0-3.8-.6-7.1-1.7-10.1-1-2.9-2.5-5.3-4.4-7.3zm-5.7 18.9c0 3.9-1.2 7.1-3.5 9.4-2.3 2.3-5.2 3.4-8.9 3.4s-6.7-1.2-9-3.5c-2.3-2.4-3.4-5.5-3.4-9.3v-1.1c0-3.8 1.1-6.9 3.4-9.2 2.3-2.4 5.3-3.6 9-3.6s6.7 1.2 8.9 3.5c2.3 2.3 3.5 5.4 3.5 9.3v1.1zm66.2 8.6V48.4h-11.8V54h-1.7c-1.2-2.4-2.8-4.1-4.9-5.3-2-1.1-4.7-1.7-8-1.7-2.8 0-5.4.6-7.8 1.7-2.4 1.1-4.5 2.6-6.3 4.7-1.8 2.1-3.3 4.6-4.3 7.6-1.1 2.9-1.6 6.3-1.6 10v1.5c0 3.8.5 7.1 1.6 10.1 1.1 2.9 2.6 5.5 4.5 7.5 1.9 2.1 4 3.6 6.5 4.7s5.2 1.6 8 1.6c3 0 5.6-.6 7.9-1.8 2.3-1.3 4-3.4 5.3-6.3h1.7c0 2 .7 3.6 2 4.9 1.4 1.3 3.1 1.9 5.3 1.9h8.1V83.7H144c-1.8 0-2.7-.9-2.7-2.8zm-11.8-8.6c0 3.9-1 7.1-3.1 9.4-2.1 2.3-4.8 3.4-8.3 3.4-3.4 0-6.2-1.1-8.3-3.4-2.1-2.3-3.1-5.5-3.1-9.4v-1.1c0-3.9 1-7.1 3.1-9.3 2.1-2.3 4.8-3.5 8.3-3.5 3.4 0 6.2 1.2 8.3 3.5 2.1 2.3 3.1 5.4 3.1 9.3v1.1zm98.3-12.2c1.2-1 2.6-1.6 4.2-2V47.3c-2.1.3-4 .8-5.9 1.6-2.8 1.1-5.3 2.7-7.4 4.8-2.1 2.1-3.8 4.6-5.1 7.5-1.2 2.9-1.8 6.2-1.8 9.8v.6c0 3.9.6 7.4 1.7 10.4 1.2 3.1 2.8 5.7 4.9 7.8 2.1 2.1 4.6 3.8 7.5 4.9 1.9.7 4 1.2 6.1 1.5V84.7c-.4-.1-.7-.2-1.1-.3-1.3-.5-2.5-1.2-3.6-2-1-.9-1.8-1.9-2.4-3-.6-1.2-.9-2.5-.9-3.9h8V65.4h-7.8c.5-2 1.8-3.8 3.6-5.3zm-61.5 6.1c.7-1.7 1.6-3.1 2.7-4.2 1.1-1.2 2.4-2.1 3.9-2.7 1.5-.6 3.1-.9 4.8-.9 3.6 0 6.5 1 8.5 3s3.2 4.4 3.6 7.1l11.7-3c-1.1-5.5-3.6-10-7.7-13.3-4-3.4-9.3-5.1-15.8-5.1-3.4 0-6.6.6-9.6 1.7-2.9 1.1-5.5 2.8-7.8 4.9-2.2 2.1-3.9 4.7-5.2 7.7s-1.9 6.4-1.9 10.2v1.1c0 3.8.6 7.1 1.9 10.1 1.3 2.9 3 5.4 5.2 7.4s4.8 3.5 7.7 4.6c3 1.1 6.2 1.6 9.7 1.6 6.6 0 11.9-1.7 15.9-5.1 4-3.4 6.5-7.8 7.6-13.3l-11.7-3c-.6 3.1-1.8 5.5-3.8 7.3-1.9 1.8-4.6 2.7-8.3 2.7-1.7 0-3.3-.3-4.8-.8-1.5-.6-2.8-1.4-3.9-2.4-1.1-1.1-2-2.4-2.7-3.9-.6-1.6-.9-3.5-.9-5.5v-.6c0-2.1.3-3.9.9-5.6z",fill:"#270920"}),Object(E.createElement)(y.Path,{d:"M49.7 89.3c-1.1 1.3-2.6 2-4.5 2h-6.5c.1-1.1.2-2.5.2-4.3V68.5c0-1.3.1-2.2.4-2.8s.6-1 1.1-1.1c.5-.2 1.1-.3 2-.3v-3.2h-14v3.7l3.6-.1c-.1 1.1-.2 2.5-.2 4.4v18.5c0 1.3-.1 2.2-.4 2.8-.3.6-.6 1-1.1 1.2-.5.2-1.1.3-2 .3V95h25.8l.3-11.6h-3.2c.1 2.6-.5 4.5-1.5 5.9zM101.3 70c-2.5 0-4.8 1.5-7 4.5h-.1v-2.3c0-.8-.1-1.4-.1-1.9h-2.4c-.4.4-1.3.7-2.5 1-1.3.3-2.9.4-4.9.4v3.7l3.4-.1c-.1 1.3-.2 2.7-.2 4.1v8.1c0 1.5-.2 2.6-.5 3.3-.3.7-1.1 1-2.3 1V95h12.7v-3.7c-1.1 0-2.1 0-3.1.1.1-1.3.2-2.7.2-4.3v-7.9c.3-1 1-2.1 1.9-3.1 1-1.1 1.9-1.6 2.8-1.6.1 1 .5 1.8 1.1 2.2.6.4 1.4.6 2.2.6 1.1 0 1.9-.4 2.5-1.1.5-.7.8-1.5.8-2.3 0-1.3-.4-2.3-1.2-3-1-.5-2-.9-3.3-.9zm25.8 21.5c.1-1.3.2-2.7.2-4.3v-7.9c0-6.2-3-9.2-9-9.2-1.9 0-3.6.3-5.2.8-1.5.5-2.8 1.3-3.7 2.2-.9 1-1.4 2.1-1.4 3.3 0 .9.3 1.7.8 2.4.5.6 1.3.9 2.3.9 1 0 1.8-.3 2.3-.9.5-.6.8-1.3.8-2.1s-.2-1.4-.6-1.8c.9-.9 2.1-1.4 3.5-1.4 2.2 0 3.3 1.5 3.3 4.4v2.5c-3.7.2-6.9 1-9.5 2.5-2.6 1.5-4 3.6-4 6.4 0 1.9.6 3.4 1.7 4.6 1.2 1.2 2.8 1.8 4.8 1.8 2.8 0 5.2-1 7.2-3 .1 1.1.1 1.8.2 2.2h9.1v-3.7c-.7.1-1.8.2-2.8.3zm-6.6-2.2c-1.1 1.2-2.4 1.7-3.8 1.7-.8 0-1.4-.2-2-.6-.5-.4-.8-1.1-.8-1.9 0-1.3.6-2.4 1.8-3.1 1.3-.8 2.8-1.3 4.7-1.5v5.4zM75.1 71.5c-1.8-1-3.9-1.5-6.2-1.5-2.2 0-4.3.6-6.1 1.7-1.8 1.1-3.3 2.7-4.4 4.7-1.1 2-1.6 4.4-1.6 7 0 2.5.5 4.7 1.6 6.5 1.1 1.9 2.5 3.3 4.4 4.3 1.9 1 4 1.5 6.3 1.5 2.4 0 4.4-.5 6.2-1.6 1.8-1.1 3.3-2.6 4.3-4.6 1-2 1.5-4.3 1.5-7 0-2.5-.5-4.7-1.6-6.6-1.1-1.9-2.5-3.4-4.4-4.4zm-2.2 18.4c-.7 1.6-2 2.5-3.7 2.5-1.8 0-3.1-1-4-3-.9-2-1.3-4.4-1.3-7.2 0-2.5.4-4.5 1.2-6.2.8-1.7 2.1-2.5 3.9-2.5 1.7 0 3 1 3.8 3s1.2 4.4 1.2 7.2c-.1 2.5-.4 4.5-1.1 6.2z",fill:"#fff"}));case"SYSTEM_BASKER":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#F18F1B",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M10.016 50.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.203 0-3.422-2.078-5.344-6.844-6.297l-2.39-.485c-2.657-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.203 3.078h4.454c-.078-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM53 37v-8.422l7.86-14.125h-5.063l-5.063 9.625h-.109l-5.047-9.625h-5.14l7.843 14.125V37H53zM73.016 60.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.204 0-3.421-2.078-5.343-6.844-6.296l-2.39-.485c-2.656-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.204 3.078h4.453c-.079-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM114.984 47V28.344h6.532v-3.89H103.75v3.89h6.516V47h4.718zM149.812 43.094h-10.218v-5.688h9.64v-3.625h-9.64v-5.437h10.218v-3.89h-14.937V47h14.937v-3.906zM187.75 37V14.453h-5.469l-6.406 16.188h-.125l-6.406-16.188h-5.469V37h4.203V21.781h.125L174.328 37h2.969l6.125-15.219h.125V37h4.203z",fill:"#492B06"}),Object(E.createElement)(y.Path,{d:"M22.032 92H9.63v-.72c.396-.012.72-.048.972-.108s.444-.162.576-.306c.132-.144.222-.348.27-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.024-.756-.072-1.008-.036-.264-.114-.468-.234-.612a.852.852 0 0 0-.522-.306 4.454 4.454 0 0 0-.864-.126v-.72h6.21v.72a5.062 5.062 0 0 0-.99.108c-.24.06-.426.168-.558.324-.132.156-.222.372-.27.648a8.868 8.868 0 0 0-.054 1.098v7.542c0 .504.048.918.144 1.242.108.312.288.558.54.738.252.168.588.288 1.008.36.42.06.942.09 1.566.09.696 0 1.278-.042 1.746-.126.468-.084.858-.24 1.17-.468.324-.24.582-.558.774-.954.192-.396.354-.912.486-1.548h.72L22.032 92zm5.182-2.952c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.574 9.594c0 .444.06.858.18 1.242.132.372.306.696.522.972.216.276.474.492.774.648.3.156.63.234.99.234.72 0 1.266-.33 1.638-.99.372-.66.558-1.632.558-2.916 0-1.248-.186-2.196-.558-2.844-.36-.66-.906-.99-1.638-.99-.432 0-.834.12-1.206.36-.36.228-.642.552-.846.972-.276.576-.414 1.302-.414 2.178v1.134zm-.036-4.356h.072a3.07 3.07 0 0 1 1.206-1.044c.492-.252 1.05-.378 1.674-.378.636 0 1.224.132 1.764.396.552.252 1.026.6 1.422 1.044.408.444.726.966.954 1.566.228.6.342 1.242.342 1.926 0 .72-.126 1.386-.378 1.998-.24.6-.576 1.122-1.008 1.566-.42.444-.918.792-1.494 1.044a4.362 4.362 0 0 1-1.8.378c-.66 0-1.284-.126-1.872-.378-.576-.264-1.038-.606-1.386-1.026L31.234 92h-.612V81.29c0-1.128-.078-1.902-.234-2.322a.93.93 0 0 0-.126-.216.488.488 0 0 0-.216-.144 1.07 1.07 0 0 0-.36-.108 7.62 7.62 0 0 0-.612-.108v-.612l4.032-.72v6.642zm12.759 5.508c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92H41.76v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zM59.8 90.326c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zM65.985 92v-.72a4.75 4.75 0 0 0 .972-.108c.252-.06.444-.162.576-.306.144-.144.24-.348.288-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.018-.756-.054-1.008-.036-.264-.114-.468-.234-.612a.755.755 0 0 0-.468-.306 3.572 3.572 0 0 0-.774-.126v-.72h5.778c1.812 0 3.204.294 4.176.882.984.576 1.476 1.404 1.476 2.484 0 1.428-1.026 2.436-3.078 3.024v.072c.66 0 1.254.096 1.782.288.54.18.996.438 1.368.774a3.523 3.523 0 0 1 1.17 2.682c0 .612-.15 1.146-.45 1.602-.288.456-.708.84-1.26 1.152-1.068.6-2.538.9-4.41.9h-6.93zm7.056-1.098c1.932 0 2.898-.87 2.898-2.61 0-1.068-.348-1.848-1.044-2.34-.36-.252-.828-.432-1.404-.54-.564-.108-1.26-.162-2.088-.162h-.864v3.6c0 .744.192 1.272.576 1.584.384.312 1.026.468 1.926.468zM71.6 84.17c.54 0 1.008-.048 1.404-.144a3.249 3.249 0 0 0 1.008-.45c.576-.396.864-1.014.864-1.854 0-.876-.216-1.506-.648-1.89-.432-.396-1.128-.594-2.088-.594h-1.278c-.216 0-.324.102-.324.306v4.626H71.6zm14.325 2.7c-1.008.456-1.77.882-2.286 1.278-.504.384-.756.786-.756 1.206 0 .348.096.624.288.828a.948.948 0 0 0 .72.306c.288 0 .558-.048.81-.144.252-.108.468-.246.648-.414.18-.168.318-.366.414-.594.108-.24.162-.492.162-.756v-1.71zm0-.954v-.756c0-.696-.126-1.2-.378-1.512-.24-.324-.618-.486-1.134-.486-.348 0-.612.096-.792.288-.18.18-.348.486-.504.918-.108.3-.264.534-.468.702-.192.168-.462.252-.81.252-.336 0-.594-.102-.774-.306-.18-.204-.27-.492-.27-.864 0-.576.312-1.032.936-1.368.636-.336 1.59-.504 2.862-.504 1.344 0 2.304.246 2.88.738.576.48.864 1.29.864 2.43v3.942c0 1.02.204 1.53.612 1.53a.978.978 0 0 0 .63-.234l.27.522c-.168.3-.432.54-.792.72a2.7 2.7 0 0 1-1.188.252c-.552 0-.972-.168-1.26-.504-.288-.336-.432-.81-.432-1.422h-.09c-.348.624-.798 1.098-1.35 1.422-.552.324-1.182.486-1.89.486-.756 0-1.362-.21-1.818-.63-.456-.432-.684-.99-.684-1.674 0-.528.234-1.02.702-1.476.468-.468 1.248-.924 2.34-1.368l2.538-1.098zM91.6 92h-.558v-3.276h.756c.204.864.498 1.494.882 1.89.384.396.882.594 1.494.594.444 0 .786-.09 1.026-.27a.923.923 0 0 0 .378-.774c0-.336-.15-.66-.45-.972-.3-.324-.786-.666-1.458-1.026-.912-.492-1.566-.978-1.962-1.458a2.574 2.574 0 0 1-.594-1.656c0-.396.072-.762.216-1.098.156-.348.36-.648.612-.9.264-.252.576-.444.936-.576.36-.144.75-.216 1.17-.216.372 0 .738.054 1.098.162.372.108.696.258.972.45l.324-.432h.468v2.718h-.702c-.276-.684-.564-1.176-.864-1.476-.288-.3-.642-.45-1.062-.45-.336 0-.606.09-.81.27-.192.18-.288.42-.288.72 0 .336.144.654.432.954.3.3.792.63 1.476.99.48.264.894.522 1.242.774s.63.51.846.774c.216.252.372.522.468.81.108.276.162.576.162.9 0 .42-.078.798-.234 1.134a2.462 2.462 0 0 1-.666.864c-.288.24-.636.426-1.044.558-.396.132-.84.198-1.332.198-.516 0-.996-.066-1.44-.198-.444-.144-.81-.348-1.098-.612L91.6 92zm13.299-.72c.384 0 .654-.012.81-.036.156-.036.234-.102.234-.198 0-.072-.084-.246-.252-.522-.156-.288-.36-.618-.612-.99l-1.368-2.052-.9.864v.702c0 .468.018.846.054 1.134.036.288.096.516.18.684a.759.759 0 0 0 .378.324c.168.06.378.09.63.09V92h-5.31v-.72c.336-.012.606-.048.81-.108a.969.969 0 0 0 .486-.306c.12-.156.198-.366.234-.63a6.4 6.4 0 0 0 .072-1.062v-7.632c0-.732-.012-1.308-.036-1.728-.024-.42-.09-.732-.198-.936a.647.647 0 0 0-.468-.396 3.877 3.877 0 0 0-.846-.072v-.666l4.014-.684v10.008l1.728-1.638a28.697 28.697 0 0 0 1.332-1.314c.264-.3.396-.516.396-.648 0-.108-.114-.18-.342-.216-.216-.048-.624-.072-1.224-.072v-.72h4.914v.72c-.456 0-.858.078-1.206.234-.348.156-.726.426-1.134.81l-1.746 1.638 3.114 4.41c.276.384.546.648.81.792.264.144.612.216 1.044.216V92h-5.598v-.72zm14.737-.954c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zm8.945 3.618c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92h-6.012v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zm6.139-4.428a5.587 5.587 0 0 0-.378-.828 1.667 1.667 0 0 0-.378-.486.847.847 0 0 0-.414-.234 2.18 2.18 0 0 0-.522-.054v-.72h5.382v.72c-.3 0-.54.012-.72.036-.168.024-.3.06-.396.108a.328.328 0 0 0-.162.198.798.798 0 0 0-.036.252c0 .156.03.336.09.54.06.204.132.408.216.612l1.71 4.716h.072l1.926-4.698a6.35 6.35 0 0 0 .198-.54 1.66 1.66 0 0 0 .072-.45c0-.264-.09-.456-.27-.576-.18-.12-.498-.186-.954-.198v-.72h3.978v.72c-.324 0-.606.084-.846.252-.228.168-.468.54-.72 1.116l-3.366 7.632h-1.638l-2.844-7.398zm14.041 4.266c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.969 10.584c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm6.399 0c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm11.672 1.278c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61z",fill:"#FFF1E1"}));case"RUBIK_WORK":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#000",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M14.936 62c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.696c0-.352.128-.656.384-.912s.56-.384.912-.384h14.208c4.608 0 8.208 1.04 10.8 3.12 2.592 2.048 3.888 4.896 3.888 8.544 0 2.08-.464 3.92-1.392 5.52-.928 1.568-2.192 2.864-3.792 3.888l5.904 10.944c.096.192.144.368.144.528 0 .288-.112.544-.336.768a.977.977 0 0 1-.72.288H33.8c-.576 0-1.04-.128-1.392-.384-.32-.288-.544-.592-.672-.912l-4.128-9.168H25.64v9.168c0 .352-.128.656-.384.912s-.56.384-.912.384h-9.408zm14.208-19.584c.704 0 1.248-.224 1.632-.672.384-.48.576-1.072.576-1.776s-.192-1.312-.576-1.824c-.352-.544-.896-.816-1.632-.816H25.64v5.088h3.504zM56.873 62.48c-1.696 0-3.248-.384-4.656-1.152-1.408-.8-2.544-2.016-3.408-3.648-.832-1.632-1.248-3.664-1.248-6.096V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.168c.352 0 .656.128.912.384s.384.56.384.912v12.912c0 .864.208 1.52.624 1.968.416.448 1.008.672 1.776.672s1.36-.224 1.776-.672c.416-.448.624-1.104.624-1.968V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.12c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V59.12c-.768 1.12-1.84 1.968-3.216 2.544-1.376.544-2.96.816-4.752.816zm41.127 0c-3.04 0-5.408-.96-7.104-2.88v1.104c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.16c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.88c.352 0 .656.128.912.384s.384.56.384.912v9.6C93.28 37.312 95.408 36.56 98 36.56c2.912 0 5.296.944 7.152 2.832 1.888 1.856 2.896 4.592 3.024 8.208.032.48.048 1.104.048 1.872 0 .8-.016 1.44-.048 1.92-.16 3.808-1.152 6.608-2.976 8.4-1.824 1.792-4.224 2.688-7.2 2.688zm-3.984-8.592c.832 0 1.408-.224 1.728-.672.352-.448.576-1.152.672-2.112.064-.64.096-1.168.096-1.584 0-.416-.032-.944-.096-1.584-.096-.96-.32-1.664-.672-2.112-.32-.448-.896-.672-1.728-.672-.8 0-1.392.208-1.776.624-.352.384-.56.976-.624 1.776-.032.48-.048 1.072-.048 1.776s.016 1.296.048 1.776c.064.928.272 1.632.624 2.112.352.448.944.672 1.776.672zM113.415 34.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912v-5.808c0-.352.128-.656.384-.912s.56-.384.912-.384h8.112c.352 0 .656.128.912.384s.384.56.384.912v5.808c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.112zm-.24 27.6c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h8.592c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.592zm15.515 0c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.4c.352 0 .656.128.912.384s.384.56.384.912v15.552l4.224-6.912c.32-.544.784-.816 1.392-.816h9.696c.32 0 .592.112.816.336.224.224.336.496.336.816 0 .224-.08.464-.24.72l-6.576 9.36 7.776 11.952c.128.192.192.4.192.624 0 .32-.112.592-.336.816a1.11 1.11 0 0 1-.816.336h-10.08c-.64 0-1.136-.272-1.488-.816l-4.896-8.16v7.68c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4zM25.4 105.48c-3.776 0-6.768-.88-8.976-2.64-2.208-1.76-3.312-4.16-3.312-7.2 0-1.952.56-3.664 1.68-5.136 1.12-1.472 2.72-2.8 4.8-3.984-1.216-1.312-2.096-2.528-2.64-3.648-.512-1.152-.768-2.32-.768-3.504 0-1.536.4-2.944 1.2-4.224.8-1.28 1.984-2.304 3.552-3.072 1.568-.768 3.456-1.152 5.664-1.152 2.048 0 3.824.384 5.328 1.152 1.536.736 2.688 1.744 3.456 3.024a7.494 7.494 0 0 1 1.2 4.128c0 1.856-.56 3.456-1.68 4.8-1.12 1.312-2.784 2.608-4.992 3.888l5.712 5.712c.512-.832.944-1.632 1.296-2.4.384-.8.768-1.84 1.152-3.12.128-.448.464-.672 1.008-.672h4.848c.256 0 .48.096.672.288.192.16.288.368.288.624-.032 1.12-.56 2.64-1.584 4.56-.992 1.92-2.096 3.616-3.312 5.088l5.376 5.424c.224.288.336.528.336.72a.774.774 0 0 1-.288.624.844.844 0 0 1-.624.24h-6.528c-.512 0-.928-.16-1.248-.48l-2.16-2.064c-2.464 2.016-5.616 3.024-9.456 3.024zm.432-21.984c1.28-.64 2.24-1.264 2.88-1.872.672-.608 1.008-1.328 1.008-2.16 0-.864-.304-1.552-.912-2.064-.576-.544-1.312-.816-2.208-.816a3.31 3.31 0 0 0-2.208.816c-.608.544-.912 1.248-.912 2.112 0 .576.176 1.184.528 1.824.384.608.992 1.328 1.824 2.16zM25.4 99.384c1.984 0 3.632-.592 4.944-1.776l-6.384-6.384c-2.112 1.12-3.168 2.48-3.168 4.08 0 1.216.464 2.208 1.392 2.976.928.736 2 1.104 3.216 1.104zM65.56 105h-3.168l-6.24-21.12h2.752l5.088 19.104 4.992-19.104h2.912l4.992 19.168 5.12-19.168H84.6L78.392 105h-3.168L71.48 91.304l-1.088-4.768h-.032l-1.088 4.768L65.56 105zm28.824-16.32c2.41 0 4.299.736 5.664 2.208 1.387 1.472 2.08 3.51 2.08 6.112 0 2.603-.693 4.64-2.08 6.112-1.365 1.472-3.253 2.208-5.664 2.208-2.41 0-4.31-.736-5.696-2.208-1.365-1.472-2.048-3.51-2.048-6.112 0-2.603.683-4.64 2.048-6.112 1.387-1.472 3.286-2.208 5.696-2.208zm0 2.208c-1.621 0-2.89.544-3.808 1.632C89.66 93.608 89.2 95.101 89.2 97c0 1.899.459 3.392 1.376 4.48.918 1.088 2.187 1.632 3.808 1.632 1.622 0 2.89-.544 3.808-1.632.918-1.088 1.376-2.581 1.376-4.48 0-1.899-.458-3.392-1.376-4.48-.917-1.088-2.186-1.632-3.808-1.632zm20.269-2.208c.768 0 1.355.107 1.76.32l-.512 2.496c-.512-.277-1.184-.416-2.016-.416-.683 0-1.355.203-2.016.608-.64.384-1.173.981-1.6 1.792-.405.79-.608 1.75-.608 2.88V105h-2.56V89h2.08l.352 2.624c.896-1.963 2.603-2.944 5.12-2.944zm11.463 8.416l-3.392 3.392V105h-2.56V81.64h2.56v15.648L131.012 89h3.2l-6.24 6.24 6.624 9.76h-3.104l-5.376-7.904zm29.655-13.536c3.776 0 6.496 1.493 8.16 4.48l-2.208 1.792c-.64-1.408-1.408-2.4-2.304-2.976-.874-.597-2.08-.896-3.616-.896-1.621 0-2.901.341-3.84 1.024-.917.661-1.376 1.515-1.376 2.56 0 .683.182 1.248.544 1.696.363.448.96.843 1.792 1.184.854.32 2.027.608 3.52.864 2.795.47 4.768 1.173 5.92 2.112 1.174.939 1.76 2.24 1.76 3.904 0 1.195-.341 2.251-1.024 3.168-.661.896-1.61 1.6-2.848 2.112-1.237.491-2.666.736-4.288.736-2.133 0-3.957-.416-5.472-1.248-1.493-.832-2.634-1.941-3.424-3.328l2.208-1.792c.576 1.259 1.419 2.24 2.528 2.944 1.131.683 2.539 1.024 4.224 1.024 1.664 0 2.987-.299 3.968-.896.982-.619 1.472-1.483 1.472-2.592 0-.939-.426-1.685-1.28-2.24-.853-.555-2.368-1.024-4.544-1.408-2.816-.49-4.81-1.195-5.984-2.112-1.173-.917-1.76-2.197-1.76-3.84 0-1.13.32-2.176.96-3.136.64-.96 1.558-1.717 2.752-2.272 1.195-.576 2.582-.864 4.16-.864zm26.044 19.584a5.25 5.25 0 0 0 1.28-.16l-.16 2.016a5.68 5.68 0 0 1-1.92.32c-.832 0-1.494-.181-1.984-.544-.47-.363-.768-.971-.896-1.824-.491.747-1.216 1.333-2.176 1.76a7.435 7.435 0 0 1-2.976.608c-1.579 0-2.88-.363-3.904-1.088-1.024-.747-1.536-1.813-1.536-3.2 0-1.216.533-2.261 1.6-3.136 1.066-.896 2.613-1.515 4.64-1.856l4.256-.704v-.896c0-1.067-.331-1.92-.992-2.56-.662-.64-1.579-.96-2.752-.96-1.067 0-1.995.256-2.784.768-.768.512-1.366 1.27-1.792 2.272l-1.888-1.376c.426-1.195 1.216-2.144 2.368-2.848 1.173-.704 2.538-1.056 4.096-1.056 1.898 0 3.424.459 4.576 1.376 1.152.917 1.728 2.272 1.728 4.064v7.872c0 .384.096.672.288.864.192.192.501.288.928.288zm-8.704-.064c1.344 0 2.496-.32 3.456-.96.981-.64 1.472-1.472 1.472-2.496v-2.208l-3.584.672c-1.43.256-2.496.63-3.2 1.12-.704.47-1.056 1.077-1.056 1.824 0 .661.256 1.173.768 1.536.512.341 1.226.512 2.144.512zm21.485-14.4c1.813 0 3.306.523 4.48 1.568 1.173 1.045 1.76 2.55 1.76 4.512V105h-2.56v-9.344c0-1.664-.363-2.87-1.088-3.616-.704-.747-1.654-1.12-2.848-1.12-.854 0-1.654.192-2.4.576-.747.363-1.366.97-1.856 1.824-.47.832-.704 1.888-.704 3.168V105h-2.56V89h2.24l.16 2.496c.533-.96 1.269-1.664 2.208-2.112.938-.47 1.994-.704 3.168-.704zm17.476 16.64c-1.536 0-2.922-.299-4.16-.896-1.237-.619-2.144-1.525-2.72-2.72l2.08-1.44a3.898 3.898 0 0 0 1.888 2.112c.896.469 1.952.704 3.168.704 1.259 0 2.219-.224 2.88-.672.662-.448.992-1.013.992-1.696 0-.619-.309-1.11-.928-1.472-.618-.384-1.706-.715-3.264-.992-1.536-.277-2.752-.608-3.648-.992-.896-.405-1.546-.907-1.952-1.504-.405-.619-.608-1.376-.608-2.272 0-.875.256-1.675.768-2.4.512-.725 1.248-1.301 2.208-1.728.96-.448 2.07-.672 3.328-.672 1.707 0 3.072.32 4.096.96 1.046.619 1.792 1.579 2.24 2.88l-2.176 1.28c-.341-1.024-.864-1.76-1.568-2.208-.682-.448-1.546-.672-2.592-.672-1.045 0-1.93.235-2.656.704-.725.47-1.088 1.013-1.088 1.632 0 .704.31 1.248.928 1.632.64.384 1.771.715 3.392.992 2.219.363 3.787.907 4.704 1.632.918.725 1.376 1.75 1.376 3.072a3.95 3.95 0 0 1-.832 2.464c-.533.704-1.312 1.259-2.336 1.664-1.002.405-2.176.608-3.52.608z",fill:"#fff"}));case"PLAY_ROBOTO":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#B9B5B8",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M149.438 101c-.75-2.125-1.23-5.27-1.438-9.438-2.625 3.417-5.979 6.063-10.062 7.938-4.042 1.833-8.334 2.75-12.876 2.75-6.5 0-11.77-1.812-15.812-5.438-4-3.624-6-8.208-6-13.75 0-6.583 2.729-11.791 8.188-15.624 5.5-3.834 13.145-5.75 22.937-5.75h13.563V54c0-4.833-1.5-8.625-4.5-11.375-2.959-2.792-7.292-4.188-13-4.188-5.209 0-9.521 1.334-12.938 4-3.417 2.667-5.125 5.876-5.125 9.626l-7.5-.063c0-5.375 2.5-10.02 7.5-13.938 5-3.958 11.146-5.937 18.437-5.937 7.542 0 13.48 1.896 17.813 5.688 4.375 3.75 6.625 9 6.75 15.75v32c0 6.541.687 11.437 2.063 14.687v.75h-8zm-23.5-5.375c5 0 9.458-1.208 13.374-3.625 3.959-2.417 6.834-5.646 8.626-9.688V67.439h-13.376c-7.458.083-13.291 1.458-17.5 4.124-4.208 2.626-6.312 6.25-6.312 10.876 0 3.791 1.396 6.937 4.188 9.437 2.833 2.5 6.5 3.75 11 3.75zM39.328 101.896c-5.461 0-9.6-1.451-12.416-4.352-2.73-2.987-4.096-6.699-4.096-11.136 0-3.84.981-6.997 2.944-9.472 2.048-2.56 4.437-4.523 7.168-5.888 2.73-1.365 6.272-2.773 10.624-4.224 4.608-1.536 7.979-2.944 10.112-4.224 2.133-1.28 3.2-3.072 3.2-5.376V45.832c0-2.73-.683-5.163-2.048-7.296s-3.712-3.2-7.04-3.2c-2.645 0-5.035.725-7.168 2.176 2.901 1.024 5.035 2.56 6.4 4.608 1.45 1.963 2.176 4.181 2.176 6.656 0 3.328-1.195 6.016-3.584 8.064-2.304 1.963-5.12 2.944-8.448 2.944-3.328 0-5.973-1.024-7.936-3.072-1.877-2.133-2.816-4.821-2.816-8.064 0-2.56.64-4.779 1.92-6.656 1.28-1.877 3.285-3.584 6.016-5.12 4.779-2.73 11.605-4.096 20.48-4.096 4.693 0 8.747.47 12.16 1.408 3.413.853 6.315 2.517 8.704 4.992 1.707 1.792 2.816 4.053 3.328 6.784.597 2.645.896 6.357.896 11.136V91.4c0 2.133.128 3.584.384 4.352.341.768.896 1.152 1.664 1.152.597 0 1.237-.17 1.92-.512a15.863 15.863 0 0 0 1.92-1.408l1.28 2.176c-3.67 3.157-8.917 4.736-15.744 4.736-5.12 0-8.704-.853-10.752-2.56-2.048-1.792-3.157-4.181-3.328-7.168-4.01 6.485-9.984 9.728-17.92 9.728zm12.8-10.24c1.792 0 3.37-.725 4.736-2.176V62.472c-.768 1.28-2.176 2.944-4.224 4.992-2.304 2.219-4.053 4.395-5.248 6.528-1.195 2.048-1.792 4.864-1.792 8.448 0 6.144 2.176 9.216 6.528 9.216z",fill:"#270920"}));default:return Object(E.createElement)("div",{className:"font-pairings-panel__preview"},Object(E.createElement)("h1",{style:{fontFamily:t}},"Lorem Ipsum"),Object(E.createElement)("p",{style:{fontFamily:c}},"Etiam tempor orci eu lobortis elementum nibh tellus molestie."))}},M=function(e){var t=e.fontPairings,c=e.fontBase,n=e.fontHeadings,a=e.update;return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("h3",null,Object(P.__)("Font Pairings")),t&&n&&c?Object(E.createElement)("div",{role:"listbox"},t.map((function(e){var t=e.label,r=e.headings,o=e.base,l=e.preview,s=r===n&&o===c,i=S()("font-pairings-panel",{"is-selected":s});return Object(E.createElement)("div",{key:t,tabIndex:0,role:"option","aria-selected":s,className:i,onClick:function(){return a({headings:r,base:o})},onKeyDown:function(e){return e.keyCode===w.ENTER?a({headings:r,base:o}):null}},Object(E.createElement)("div",{className:"font-pairings-panel__preview"},x(l,r,o)),Object(E.createElement)("p",{className:"font-pairings-panel__label"},t))}))):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("font pairings")}))},B=function(e){var t=e.fontBase,c=e.fontBaseDefault,n=e.fontHeadings,a=e.fontHeadingsDefault,r=e.fontBaseOptions,o=e.fontHeadingsOptions,l=e.updateBaseFont,s=e.updateHeadingsFont;return r&&o?Object(E.createElement)(E.Fragment,null,Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Heading Font"),value:n,options:o,onChange:function(e){return s(e)},style:{fontFamily:"unset"!==n?n:a}}),Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Base Font"),value:t,options:r,onChange:function(e){return l(e)},style:{fontFamily:"unset"!==t?t:c}}),Object(E.createElement)("hr",null)):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("custom font selection")})},T=function(){return Object(E.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(E.createElement)(y.Path,{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"}))},L=function(e){if("object"==typeof e){var t=e.label,c=e.value,n=e.prop;return{label:t,value:c,prop:void 0===n?"ANY_PROPERTY":n}}return{label:e,value:e,prop:"ANY_PROPERTY"}},N=function(e){return null!==e.value&&null!==e.label},C=function(e,t){return e?e.map(L).filter(N).filter(function(e){return function(t){return"ANY_PROPERTY"===t.prop||t.prop===e}}(t)):[]},F=function(e){var t=e.hasLocalChanges,c=e.resetAction,n=e.publishAction,a=e.className,r=void 0===a?null:a;return Object(E.createElement)("div",{className:r},Object(E.createElement)(y.Button,{disabled:!t,isDefault:!0,onClick:c},Object(P.__)("Reset")),Object(E.createElement)(y.Button,{className:"global-styles-sidebar__publish-button",disabled:!t,isPrimary:!0,onClick:n},Object(P.__)("Publish")))},I=(c(14),JETPACK_GLOBAL_STYLES_EDITOR_CONSTANTS),A=I.PLUGIN_NAME,R=I.STORE_NAME,D=I.REST_PATH;n=R,a=D,Object(s.registerStore)(n,{reducer:function(e,t){switch(t.type){case"UPDATE_OPTIONS":case"RESET_OPTIONS":case"PUBLISH_OPTIONS":return h()({},e,{},t.options)}return e},actions:O,selectors:{getOption:function(e,t){return e?e[t]:void 0},hasLocalChanges:function(e){return!!e&&Object.keys(v).some((function(t){return v[t]!==e[t]}))}},resolvers:{getOption:regeneratorRuntime.mark((function e(t){var c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,b=!0,e.next=6,O.fetchOptions();case 6:c=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c={};case 12:return v=c,e.abrupt("return",{type:"UPDATE_OPTIONS",options:c});case 14:case"end":return e.stop()}}),e,null,[[2,9]])}))},controls:{IO_FETCH_OPTIONS:function(){return p()({path:a})},IO_PUBLISH_OPTIONS:function(e){var t=e.options;return v=t,p()({path:a,method:"POST",data:h()({},t)})}}}),r=["font_base","font_headings"],o=Object(s.select)(R).getOption,d()((function(){var e={},t={},c={};r.forEach((function(e){c[e]="--".concat(e.replace("_","-"))}));var n=null;Object(s.subscribe)((function(){var a=Object(s.select)("core/editor").__unstableIsEditorReady;if(!(a&&!1===a()||(n||(n=document.createElement("style"),document.body.appendChild(n)),r.forEach((function(t){e[t]=o(t)})),Object(g.isEmpty)(e)||Object(g.isEqual)(e,t)))){t=h()({},e);var l="";Object.keys(e).forEach((function(t){l+="".concat(c[t],":").concat(e[t],";")})),n.textContent=".edit-post-visual-editor.editor-styles-wrapper{".concat(l,"}")}}))})),Object(l.registerPlugin)(A,{render:Object(i.compose)(Object(s.withSelect)((function(e){return{siteName:e(R).getOption("blogname"),fontHeadings:e(R).getOption("font_headings"),fontHeadingsDefault:e(R).getOption("font_headings_default"),fontBase:e(R).getOption("font_base"),fontBaseDefault:e(R).getOption("font_base_default"),fontPairings:e(R).getOption("font_pairings"),fontOptions:e(R).getOption("font_options"),hasLocalChanges:e(R).hasLocalChanges()}})),Object(s.withDispatch)((function(e){return{updateOptions:e(R).updateOptions,publishOptions:e(R).publishOptions,resetLocalChanges:e(R).resetLocalChanges}})))((function(e){var t=e.fontHeadings,c=e.fontHeadingsDefault,n=e.fontBase,a=e.fontBaseDefault,r=e.fontPairings,o=e.fontOptions,l=e.siteName,s=e.publishOptions,i=e.updateOptions,u=e.hasLocalChanges,h=e.resetLocalChanges,f=function(){var e;return s((e={},_()(e,"font_base",n),_()(e,"font_headings",t),e))};return Object(E.createElement)(E.Fragment,null,Object(E.createElement)(z.PluginSidebarMoreMenuItem,{icon:Object(E.createElement)(T,null),target:"global-styles"},Object(P.__)("Global Styles")),Object(E.createElement)(z.PluginSidebar,{icon:Object(E.createElement)(T,null),name:"global-styles",title:Object(P.__)("Global Styles"),className:"global-styles-sidebar"},Object(E.createElement)(y.PanelBody,null,Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("You are customizing %s."),l)),Object(E.createElement)("p",null,Object(P.__)("Any change you make here will apply to the entire website.")),u?Object(E.createElement)("div",null,Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))),Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h})):null),Object(E.createElement)(y.PanelBody,{title:Object(P.__)("Font Selection")},Object(E.createElement)(B,{fontBase:n,fontBaseDefault:a,fontHeadings:t,fontHeadingsDefault:c,fontBaseOptions:C(o,"font_base"),fontHeadingsOptions:C(o,"font_headings"),updateBaseFont:function(e){return i(_()({},"font_base",e))},updateHeadingsFont:function(e){return i(_()({},"font_headings",e))}}),Object(E.createElement)(M,{fontHeadings:t,fontBase:n,fontPairings:r,update:function(e){var t,c=e.headings,n=e.base;return i((t={},_()(t,"font_headings",c),_()(t,"font_base",n),t))}})),Object(E.createElement)(y.PanelBody,null,u?Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))):null,Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h,className:"global-styles-sidebar__panel-action-buttons"}))))}))})}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(c){if(t[c])return t[c].exports;var a=t[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(n.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(c,a,function(t){return e[t]}.bind(null,a));return c},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var c=n(4);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){var c;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var c=arguments[t];if(c){var r=typeof c;if("string"===r||"number"===r)e.push(c);else if(Array.isArray(c)&&c.length){var l=a.apply(null,c);l&&e.push(l)}else if("object"===r)for(var o in c)n.call(c,o)&&c[o]&&e.push(o)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(c=function(){return a}.apply(t,[]))||(e.exports=c)}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var c,a,r,l,o=n(9),i=n(3),s=n(10),u=n(5),h=n.n(u),f=n(6),p=n.n(f),v={},b=!1,O={publishOptions:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"IO_PUBLISH_OPTIONS",options:t};case 2:return e.abrupt("return",{type:"PUBLISH_OPTIONS",options:t});case 3:case"end":return e.stop()}}),e)})),updateOptions:function(e){return{type:"UPDATE_OPTIONS",options:e}},fetchOptions:function(){return{type:"IO_FETCH_OPTIONS"}},resetLocalChanges:function(){return{type:"RESET_OPTIONS",options:v}}},m=n(11),d=n.n(m),g=n(7),j=n(4),_=n.n(j),E=n(0),z=n(8),y=n(1),P=n(2),w=n(12),V=n(13),S=n.n(V),H=function(e){var t=e.unsupportedFeature;return Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("Your active theme doesn't support %s.","full-site-editing"),t))},x=function(e,t,n){switch(e){case"SPACE_LORA":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#fa4d4b",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M24.1 62c-3.6-2.9-8.9-5-15.8-6.3-2.8-.5-5-1-6.9-1.6-.5-.2-1-.3-1.5-.5v12.5c1.4.3 2.9.6 4.4.9 2.5.4 4.6 1 6.2 1.6s2.9 1.3 3.9 2.2c.9.8 1.6 1.6 2 2.6.4.9.6 1.9.6 3 0 2.3-.9 4.2-2.7 5.8-1.8 1.6-4.6 2.4-8.4 2.4-2.2 0-4.2-.3-5.9-.8v12c1.8.3 3.7.4 5.7.4 3.7 0 7-.5 10-1.4 2.9-.9 5.5-2.3 7.5-4s3.6-3.9 4.7-6.3c1.1-2.5 1.7-5.3 1.7-8.4V75c0-5.7-1.8-10-5.5-13zM12.9 42.5c2.1 1.9 3.1 4.2 3.1 6.9v2.3h12.4v-3.4c0-2.7-.5-5.3-1.6-7.7-1-2.4-2.5-4.6-4.6-6.5-2-1.9-4.5-3.4-7.5-4.4-3-1.1-6.5-1.7-10.3-1.7-1.5 0-3 .1-4.4.3v11.9c1.3-.4 2.7-.5 4.4-.5 3.7-.2 6.5.8 8.5 2.8zm67.9 10.9c-1.8-2.1-4-3.6-6.5-4.7-2.4-1.1-5-1.6-7.8-1.6-3.7 0-6.7.7-9.1 2.2-2.4 1.4-4.2 3.4-5.5 5.9h-1.7v-6.8H38.4v65.4h11.8V88.2H52c.6 1.1 1.2 2.1 2 3.1.8.9 1.8 1.8 2.9 2.5 1.2.8 2.6 1.3 4.1 1.8 1.6.4 3.4.7 5.5.7 2.9 0 5.5-.5 8-1.5 2.5-1.1 4.7-2.6 6.5-4.6 1.8-2.1 3.3-4.6 4.3-7.5 1.1-2.9 1.6-6.3 1.6-10.2v-1.7c0-3.8-.6-7.1-1.7-10.1-1-2.9-2.5-5.3-4.4-7.3zm-5.7 18.9c0 3.9-1.2 7.1-3.5 9.4-2.3 2.3-5.2 3.4-8.9 3.4s-6.7-1.2-9-3.5c-2.3-2.4-3.4-5.5-3.4-9.3v-1.1c0-3.8 1.1-6.9 3.4-9.2 2.3-2.4 5.3-3.6 9-3.6s6.7 1.2 8.9 3.5c2.3 2.3 3.5 5.4 3.5 9.3v1.1zm66.2 8.6V48.4h-11.8V54h-1.7c-1.2-2.4-2.8-4.1-4.9-5.3-2-1.1-4.7-1.7-8-1.7-2.8 0-5.4.6-7.8 1.7-2.4 1.1-4.5 2.6-6.3 4.7-1.8 2.1-3.3 4.6-4.3 7.6-1.1 2.9-1.6 6.3-1.6 10v1.5c0 3.8.5 7.1 1.6 10.1 1.1 2.9 2.6 5.5 4.5 7.5 1.9 2.1 4 3.6 6.5 4.7s5.2 1.6 8 1.6c3 0 5.6-.6 7.9-1.8 2.3-1.3 4-3.4 5.3-6.3h1.7c0 2 .7 3.6 2 4.9 1.4 1.3 3.1 1.9 5.3 1.9h8.1V83.7H144c-1.8 0-2.7-.9-2.7-2.8zm-11.8-8.6c0 3.9-1 7.1-3.1 9.4-2.1 2.3-4.8 3.4-8.3 3.4-3.4 0-6.2-1.1-8.3-3.4-2.1-2.3-3.1-5.5-3.1-9.4v-1.1c0-3.9 1-7.1 3.1-9.3 2.1-2.3 4.8-3.5 8.3-3.5 3.4 0 6.2 1.2 8.3 3.5 2.1 2.3 3.1 5.4 3.1 9.3v1.1zm98.3-12.2c1.2-1 2.6-1.6 4.2-2V47.3c-2.1.3-4 .8-5.9 1.6-2.8 1.1-5.3 2.7-7.4 4.8-2.1 2.1-3.8 4.6-5.1 7.5-1.2 2.9-1.8 6.2-1.8 9.8v.6c0 3.9.6 7.4 1.7 10.4 1.2 3.1 2.8 5.7 4.9 7.8 2.1 2.1 4.6 3.8 7.5 4.9 1.9.7 4 1.2 6.1 1.5V84.7c-.4-.1-.7-.2-1.1-.3-1.3-.5-2.5-1.2-3.6-2-1-.9-1.8-1.9-2.4-3-.6-1.2-.9-2.5-.9-3.9h8V65.4h-7.8c.5-2 1.8-3.8 3.6-5.3zm-61.5 6.1c.7-1.7 1.6-3.1 2.7-4.2 1.1-1.2 2.4-2.1 3.9-2.7 1.5-.6 3.1-.9 4.8-.9 3.6 0 6.5 1 8.5 3s3.2 4.4 3.6 7.1l11.7-3c-1.1-5.5-3.6-10-7.7-13.3-4-3.4-9.3-5.1-15.8-5.1-3.4 0-6.6.6-9.6 1.7-2.9 1.1-5.5 2.8-7.8 4.9-2.2 2.1-3.9 4.7-5.2 7.7s-1.9 6.4-1.9 10.2v1.1c0 3.8.6 7.1 1.9 10.1 1.3 2.9 3 5.4 5.2 7.4s4.8 3.5 7.7 4.6c3 1.1 6.2 1.6 9.7 1.6 6.6 0 11.9-1.7 15.9-5.1 4-3.4 6.5-7.8 7.6-13.3l-11.7-3c-.6 3.1-1.8 5.5-3.8 7.3-1.9 1.8-4.6 2.7-8.3 2.7-1.7 0-3.3-.3-4.8-.8-1.5-.6-2.8-1.4-3.9-2.4-1.1-1.1-2-2.4-2.7-3.9-.6-1.6-.9-3.5-.9-5.5v-.6c0-2.1.3-3.9.9-5.6z",fill:"#270920"}),Object(E.createElement)(y.Path,{d:"M49.7 89.3c-1.1 1.3-2.6 2-4.5 2h-6.5c.1-1.1.2-2.5.2-4.3V68.5c0-1.3.1-2.2.4-2.8s.6-1 1.1-1.1c.5-.2 1.1-.3 2-.3v-3.2h-14v3.7l3.6-.1c-.1 1.1-.2 2.5-.2 4.4v18.5c0 1.3-.1 2.2-.4 2.8-.3.6-.6 1-1.1 1.2-.5.2-1.1.3-2 .3V95h25.8l.3-11.6h-3.2c.1 2.6-.5 4.5-1.5 5.9zM101.3 70c-2.5 0-4.8 1.5-7 4.5h-.1v-2.3c0-.8-.1-1.4-.1-1.9h-2.4c-.4.4-1.3.7-2.5 1-1.3.3-2.9.4-4.9.4v3.7l3.4-.1c-.1 1.3-.2 2.7-.2 4.1v8.1c0 1.5-.2 2.6-.5 3.3-.3.7-1.1 1-2.3 1V95h12.7v-3.7c-1.1 0-2.1 0-3.1.1.1-1.3.2-2.7.2-4.3v-7.9c.3-1 1-2.1 1.9-3.1 1-1.1 1.9-1.6 2.8-1.6.1 1 .5 1.8 1.1 2.2.6.4 1.4.6 2.2.6 1.1 0 1.9-.4 2.5-1.1.5-.7.8-1.5.8-2.3 0-1.3-.4-2.3-1.2-3-1-.5-2-.9-3.3-.9zm25.8 21.5c.1-1.3.2-2.7.2-4.3v-7.9c0-6.2-3-9.2-9-9.2-1.9 0-3.6.3-5.2.8-1.5.5-2.8 1.3-3.7 2.2-.9 1-1.4 2.1-1.4 3.3 0 .9.3 1.7.8 2.4.5.6 1.3.9 2.3.9 1 0 1.8-.3 2.3-.9.5-.6.8-1.3.8-2.1s-.2-1.4-.6-1.8c.9-.9 2.1-1.4 3.5-1.4 2.2 0 3.3 1.5 3.3 4.4v2.5c-3.7.2-6.9 1-9.5 2.5-2.6 1.5-4 3.6-4 6.4 0 1.9.6 3.4 1.7 4.6 1.2 1.2 2.8 1.8 4.8 1.8 2.8 0 5.2-1 7.2-3 .1 1.1.1 1.8.2 2.2h9.1v-3.7c-.7.1-1.8.2-2.8.3zm-6.6-2.2c-1.1 1.2-2.4 1.7-3.8 1.7-.8 0-1.4-.2-2-.6-.5-.4-.8-1.1-.8-1.9 0-1.3.6-2.4 1.8-3.1 1.3-.8 2.8-1.3 4.7-1.5v5.4zM75.1 71.5c-1.8-1-3.9-1.5-6.2-1.5-2.2 0-4.3.6-6.1 1.7-1.8 1.1-3.3 2.7-4.4 4.7-1.1 2-1.6 4.4-1.6 7 0 2.5.5 4.7 1.6 6.5 1.1 1.9 2.5 3.3 4.4 4.3 1.9 1 4 1.5 6.3 1.5 2.4 0 4.4-.5 6.2-1.6 1.8-1.1 3.3-2.6 4.3-4.6 1-2 1.5-4.3 1.5-7 0-2.5-.5-4.7-1.6-6.6-1.1-1.9-2.5-3.4-4.4-4.4zm-2.2 18.4c-.7 1.6-2 2.5-3.7 2.5-1.8 0-3.1-1-4-3-.9-2-1.3-4.4-1.3-7.2 0-2.5.4-4.5 1.2-6.2.8-1.7 2.1-2.5 3.9-2.5 1.7 0 3 1 3.8 3s1.2 4.4 1.2 7.2c-.1 2.5-.4 4.5-1.1 6.2z",fill:"#fff"}));case"SYSTEM_BASKER":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#F18F1B",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M10.016 50.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.203 0-3.422-2.078-5.344-6.844-6.297l-2.39-.485c-2.657-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.203 3.078h4.454c-.078-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM53 37v-8.422l7.86-14.125h-5.063l-5.063 9.625h-.109l-5.047-9.625h-5.14l7.843 14.125V37H53zM73.016 60.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.204 0-3.421-2.078-5.343-6.844-6.296l-2.39-.485c-2.656-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.204 3.078h4.453c-.079-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM114.984 47V28.344h6.532v-3.89H103.75v3.89h6.516V47h4.718zM149.812 43.094h-10.218v-5.688h9.64v-3.625h-9.64v-5.437h10.218v-3.89h-14.937V47h14.937v-3.906zM187.75 37V14.453h-5.469l-6.406 16.188h-.125l-6.406-16.188h-5.469V37h4.203V21.781h.125L174.328 37h2.969l6.125-15.219h.125V37h4.203z",fill:"#492B06"}),Object(E.createElement)(y.Path,{d:"M22.032 92H9.63v-.72c.396-.012.72-.048.972-.108s.444-.162.576-.306c.132-.144.222-.348.27-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.024-.756-.072-1.008-.036-.264-.114-.468-.234-.612a.852.852 0 0 0-.522-.306 4.454 4.454 0 0 0-.864-.126v-.72h6.21v.72a5.062 5.062 0 0 0-.99.108c-.24.06-.426.168-.558.324-.132.156-.222.372-.27.648a8.868 8.868 0 0 0-.054 1.098v7.542c0 .504.048.918.144 1.242.108.312.288.558.54.738.252.168.588.288 1.008.36.42.06.942.09 1.566.09.696 0 1.278-.042 1.746-.126.468-.084.858-.24 1.17-.468.324-.24.582-.558.774-.954.192-.396.354-.912.486-1.548h.72L22.032 92zm5.182-2.952c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.574 9.594c0 .444.06.858.18 1.242.132.372.306.696.522.972.216.276.474.492.774.648.3.156.63.234.99.234.72 0 1.266-.33 1.638-.99.372-.66.558-1.632.558-2.916 0-1.248-.186-2.196-.558-2.844-.36-.66-.906-.99-1.638-.99-.432 0-.834.12-1.206.36-.36.228-.642.552-.846.972-.276.576-.414 1.302-.414 2.178v1.134zm-.036-4.356h.072a3.07 3.07 0 0 1 1.206-1.044c.492-.252 1.05-.378 1.674-.378.636 0 1.224.132 1.764.396.552.252 1.026.6 1.422 1.044.408.444.726.966.954 1.566.228.6.342 1.242.342 1.926 0 .72-.126 1.386-.378 1.998-.24.6-.576 1.122-1.008 1.566-.42.444-.918.792-1.494 1.044a4.362 4.362 0 0 1-1.8.378c-.66 0-1.284-.126-1.872-.378-.576-.264-1.038-.606-1.386-1.026L31.234 92h-.612V81.29c0-1.128-.078-1.902-.234-2.322a.93.93 0 0 0-.126-.216.488.488 0 0 0-.216-.144 1.07 1.07 0 0 0-.36-.108 7.62 7.62 0 0 0-.612-.108v-.612l4.032-.72v6.642zm12.759 5.508c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92H41.76v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zM59.8 90.326c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zM65.985 92v-.72a4.75 4.75 0 0 0 .972-.108c.252-.06.444-.162.576-.306.144-.144.24-.348.288-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.018-.756-.054-1.008-.036-.264-.114-.468-.234-.612a.755.755 0 0 0-.468-.306 3.572 3.572 0 0 0-.774-.126v-.72h5.778c1.812 0 3.204.294 4.176.882.984.576 1.476 1.404 1.476 2.484 0 1.428-1.026 2.436-3.078 3.024v.072c.66 0 1.254.096 1.782.288.54.18.996.438 1.368.774a3.523 3.523 0 0 1 1.17 2.682c0 .612-.15 1.146-.45 1.602-.288.456-.708.84-1.26 1.152-1.068.6-2.538.9-4.41.9h-6.93zm7.056-1.098c1.932 0 2.898-.87 2.898-2.61 0-1.068-.348-1.848-1.044-2.34-.36-.252-.828-.432-1.404-.54-.564-.108-1.26-.162-2.088-.162h-.864v3.6c0 .744.192 1.272.576 1.584.384.312 1.026.468 1.926.468zM71.6 84.17c.54 0 1.008-.048 1.404-.144a3.249 3.249 0 0 0 1.008-.45c.576-.396.864-1.014.864-1.854 0-.876-.216-1.506-.648-1.89-.432-.396-1.128-.594-2.088-.594h-1.278c-.216 0-.324.102-.324.306v4.626H71.6zm14.325 2.7c-1.008.456-1.77.882-2.286 1.278-.504.384-.756.786-.756 1.206 0 .348.096.624.288.828a.948.948 0 0 0 .72.306c.288 0 .558-.048.81-.144.252-.108.468-.246.648-.414.18-.168.318-.366.414-.594.108-.24.162-.492.162-.756v-1.71zm0-.954v-.756c0-.696-.126-1.2-.378-1.512-.24-.324-.618-.486-1.134-.486-.348 0-.612.096-.792.288-.18.18-.348.486-.504.918-.108.3-.264.534-.468.702-.192.168-.462.252-.81.252-.336 0-.594-.102-.774-.306-.18-.204-.27-.492-.27-.864 0-.576.312-1.032.936-1.368.636-.336 1.59-.504 2.862-.504 1.344 0 2.304.246 2.88.738.576.48.864 1.29.864 2.43v3.942c0 1.02.204 1.53.612 1.53a.978.978 0 0 0 .63-.234l.27.522c-.168.3-.432.54-.792.72a2.7 2.7 0 0 1-1.188.252c-.552 0-.972-.168-1.26-.504-.288-.336-.432-.81-.432-1.422h-.09c-.348.624-.798 1.098-1.35 1.422-.552.324-1.182.486-1.89.486-.756 0-1.362-.21-1.818-.63-.456-.432-.684-.99-.684-1.674 0-.528.234-1.02.702-1.476.468-.468 1.248-.924 2.34-1.368l2.538-1.098zM91.6 92h-.558v-3.276h.756c.204.864.498 1.494.882 1.89.384.396.882.594 1.494.594.444 0 .786-.09 1.026-.27a.923.923 0 0 0 .378-.774c0-.336-.15-.66-.45-.972-.3-.324-.786-.666-1.458-1.026-.912-.492-1.566-.978-1.962-1.458a2.574 2.574 0 0 1-.594-1.656c0-.396.072-.762.216-1.098.156-.348.36-.648.612-.9.264-.252.576-.444.936-.576.36-.144.75-.216 1.17-.216.372 0 .738.054 1.098.162.372.108.696.258.972.45l.324-.432h.468v2.718h-.702c-.276-.684-.564-1.176-.864-1.476-.288-.3-.642-.45-1.062-.45-.336 0-.606.09-.81.27-.192.18-.288.42-.288.72 0 .336.144.654.432.954.3.3.792.63 1.476.99.48.264.894.522 1.242.774s.63.51.846.774c.216.252.372.522.468.81.108.276.162.576.162.9 0 .42-.078.798-.234 1.134a2.462 2.462 0 0 1-.666.864c-.288.24-.636.426-1.044.558-.396.132-.84.198-1.332.198-.516 0-.996-.066-1.44-.198-.444-.144-.81-.348-1.098-.612L91.6 92zm13.299-.72c.384 0 .654-.012.81-.036.156-.036.234-.102.234-.198 0-.072-.084-.246-.252-.522-.156-.288-.36-.618-.612-.99l-1.368-2.052-.9.864v.702c0 .468.018.846.054 1.134.036.288.096.516.18.684a.759.759 0 0 0 .378.324c.168.06.378.09.63.09V92h-5.31v-.72c.336-.012.606-.048.81-.108a.969.969 0 0 0 .486-.306c.12-.156.198-.366.234-.63a6.4 6.4 0 0 0 .072-1.062v-7.632c0-.732-.012-1.308-.036-1.728-.024-.42-.09-.732-.198-.936a.647.647 0 0 0-.468-.396 3.877 3.877 0 0 0-.846-.072v-.666l4.014-.684v10.008l1.728-1.638a28.697 28.697 0 0 0 1.332-1.314c.264-.3.396-.516.396-.648 0-.108-.114-.18-.342-.216-.216-.048-.624-.072-1.224-.072v-.72h4.914v.72c-.456 0-.858.078-1.206.234-.348.156-.726.426-1.134.81l-1.746 1.638 3.114 4.41c.276.384.546.648.81.792.264.144.612.216 1.044.216V92h-5.598v-.72zm14.737-.954c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zm8.945 3.618c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92h-6.012v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zm6.139-4.428a5.587 5.587 0 0 0-.378-.828 1.667 1.667 0 0 0-.378-.486.847.847 0 0 0-.414-.234 2.18 2.18 0 0 0-.522-.054v-.72h5.382v.72c-.3 0-.54.012-.72.036-.168.024-.3.06-.396.108a.328.328 0 0 0-.162.198.798.798 0 0 0-.036.252c0 .156.03.336.09.54.06.204.132.408.216.612l1.71 4.716h.072l1.926-4.698a6.35 6.35 0 0 0 .198-.54 1.66 1.66 0 0 0 .072-.45c0-.264-.09-.456-.27-.576-.18-.12-.498-.186-.954-.198v-.72h3.978v.72c-.324 0-.606.084-.846.252-.228.168-.468.54-.72 1.116l-3.366 7.632h-1.638l-2.844-7.398zm14.041 4.266c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.969 10.584c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm6.399 0c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm11.672 1.278c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61z",fill:"#FFF1E1"}));case"RUBIK_WORK":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#000",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M14.936 62c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.696c0-.352.128-.656.384-.912s.56-.384.912-.384h14.208c4.608 0 8.208 1.04 10.8 3.12 2.592 2.048 3.888 4.896 3.888 8.544 0 2.08-.464 3.92-1.392 5.52-.928 1.568-2.192 2.864-3.792 3.888l5.904 10.944c.096.192.144.368.144.528 0 .288-.112.544-.336.768a.977.977 0 0 1-.72.288H33.8c-.576 0-1.04-.128-1.392-.384-.32-.288-.544-.592-.672-.912l-4.128-9.168H25.64v9.168c0 .352-.128.656-.384.912s-.56.384-.912.384h-9.408zm14.208-19.584c.704 0 1.248-.224 1.632-.672.384-.48.576-1.072.576-1.776s-.192-1.312-.576-1.824c-.352-.544-.896-.816-1.632-.816H25.64v5.088h3.504zM56.873 62.48c-1.696 0-3.248-.384-4.656-1.152-1.408-.8-2.544-2.016-3.408-3.648-.832-1.632-1.248-3.664-1.248-6.096V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.168c.352 0 .656.128.912.384s.384.56.384.912v12.912c0 .864.208 1.52.624 1.968.416.448 1.008.672 1.776.672s1.36-.224 1.776-.672c.416-.448.624-1.104.624-1.968V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.12c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V59.12c-.768 1.12-1.84 1.968-3.216 2.544-1.376.544-2.96.816-4.752.816zm41.127 0c-3.04 0-5.408-.96-7.104-2.88v1.104c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.16c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.88c.352 0 .656.128.912.384s.384.56.384.912v9.6C93.28 37.312 95.408 36.56 98 36.56c2.912 0 5.296.944 7.152 2.832 1.888 1.856 2.896 4.592 3.024 8.208.032.48.048 1.104.048 1.872 0 .8-.016 1.44-.048 1.92-.16 3.808-1.152 6.608-2.976 8.4-1.824 1.792-4.224 2.688-7.2 2.688zm-3.984-8.592c.832 0 1.408-.224 1.728-.672.352-.448.576-1.152.672-2.112.064-.64.096-1.168.096-1.584 0-.416-.032-.944-.096-1.584-.096-.96-.32-1.664-.672-2.112-.32-.448-.896-.672-1.728-.672-.8 0-1.392.208-1.776.624-.352.384-.56.976-.624 1.776-.032.48-.048 1.072-.048 1.776s.016 1.296.048 1.776c.064.928.272 1.632.624 2.112.352.448.944.672 1.776.672zM113.415 34.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912v-5.808c0-.352.128-.656.384-.912s.56-.384.912-.384h8.112c.352 0 .656.128.912.384s.384.56.384.912v5.808c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.112zm-.24 27.6c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h8.592c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.592zm15.515 0c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.4c.352 0 .656.128.912.384s.384.56.384.912v15.552l4.224-6.912c.32-.544.784-.816 1.392-.816h9.696c.32 0 .592.112.816.336.224.224.336.496.336.816 0 .224-.08.464-.24.72l-6.576 9.36 7.776 11.952c.128.192.192.4.192.624 0 .32-.112.592-.336.816a1.11 1.11 0 0 1-.816.336h-10.08c-.64 0-1.136-.272-1.488-.816l-4.896-8.16v7.68c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4zM25.4 105.48c-3.776 0-6.768-.88-8.976-2.64-2.208-1.76-3.312-4.16-3.312-7.2 0-1.952.56-3.664 1.68-5.136 1.12-1.472 2.72-2.8 4.8-3.984-1.216-1.312-2.096-2.528-2.64-3.648-.512-1.152-.768-2.32-.768-3.504 0-1.536.4-2.944 1.2-4.224.8-1.28 1.984-2.304 3.552-3.072 1.568-.768 3.456-1.152 5.664-1.152 2.048 0 3.824.384 5.328 1.152 1.536.736 2.688 1.744 3.456 3.024a7.494 7.494 0 0 1 1.2 4.128c0 1.856-.56 3.456-1.68 4.8-1.12 1.312-2.784 2.608-4.992 3.888l5.712 5.712c.512-.832.944-1.632 1.296-2.4.384-.8.768-1.84 1.152-3.12.128-.448.464-.672 1.008-.672h4.848c.256 0 .48.096.672.288.192.16.288.368.288.624-.032 1.12-.56 2.64-1.584 4.56-.992 1.92-2.096 3.616-3.312 5.088l5.376 5.424c.224.288.336.528.336.72a.774.774 0 0 1-.288.624.844.844 0 0 1-.624.24h-6.528c-.512 0-.928-.16-1.248-.48l-2.16-2.064c-2.464 2.016-5.616 3.024-9.456 3.024zm.432-21.984c1.28-.64 2.24-1.264 2.88-1.872.672-.608 1.008-1.328 1.008-2.16 0-.864-.304-1.552-.912-2.064-.576-.544-1.312-.816-2.208-.816a3.31 3.31 0 0 0-2.208.816c-.608.544-.912 1.248-.912 2.112 0 .576.176 1.184.528 1.824.384.608.992 1.328 1.824 2.16zM25.4 99.384c1.984 0 3.632-.592 4.944-1.776l-6.384-6.384c-2.112 1.12-3.168 2.48-3.168 4.08 0 1.216.464 2.208 1.392 2.976.928.736 2 1.104 3.216 1.104zM65.56 105h-3.168l-6.24-21.12h2.752l5.088 19.104 4.992-19.104h2.912l4.992 19.168 5.12-19.168H84.6L78.392 105h-3.168L71.48 91.304l-1.088-4.768h-.032l-1.088 4.768L65.56 105zm28.824-16.32c2.41 0 4.299.736 5.664 2.208 1.387 1.472 2.08 3.51 2.08 6.112 0 2.603-.693 4.64-2.08 6.112-1.365 1.472-3.253 2.208-5.664 2.208-2.41 0-4.31-.736-5.696-2.208-1.365-1.472-2.048-3.51-2.048-6.112 0-2.603.683-4.64 2.048-6.112 1.387-1.472 3.286-2.208 5.696-2.208zm0 2.208c-1.621 0-2.89.544-3.808 1.632C89.66 93.608 89.2 95.101 89.2 97c0 1.899.459 3.392 1.376 4.48.918 1.088 2.187 1.632 3.808 1.632 1.622 0 2.89-.544 3.808-1.632.918-1.088 1.376-2.581 1.376-4.48 0-1.899-.458-3.392-1.376-4.48-.917-1.088-2.186-1.632-3.808-1.632zm20.269-2.208c.768 0 1.355.107 1.76.32l-.512 2.496c-.512-.277-1.184-.416-2.016-.416-.683 0-1.355.203-2.016.608-.64.384-1.173.981-1.6 1.792-.405.79-.608 1.75-.608 2.88V105h-2.56V89h2.08l.352 2.624c.896-1.963 2.603-2.944 5.12-2.944zm11.463 8.416l-3.392 3.392V105h-2.56V81.64h2.56v15.648L131.012 89h3.2l-6.24 6.24 6.624 9.76h-3.104l-5.376-7.904zm29.655-13.536c3.776 0 6.496 1.493 8.16 4.48l-2.208 1.792c-.64-1.408-1.408-2.4-2.304-2.976-.874-.597-2.08-.896-3.616-.896-1.621 0-2.901.341-3.84 1.024-.917.661-1.376 1.515-1.376 2.56 0 .683.182 1.248.544 1.696.363.448.96.843 1.792 1.184.854.32 2.027.608 3.52.864 2.795.47 4.768 1.173 5.92 2.112 1.174.939 1.76 2.24 1.76 3.904 0 1.195-.341 2.251-1.024 3.168-.661.896-1.61 1.6-2.848 2.112-1.237.491-2.666.736-4.288.736-2.133 0-3.957-.416-5.472-1.248-1.493-.832-2.634-1.941-3.424-3.328l2.208-1.792c.576 1.259 1.419 2.24 2.528 2.944 1.131.683 2.539 1.024 4.224 1.024 1.664 0 2.987-.299 3.968-.896.982-.619 1.472-1.483 1.472-2.592 0-.939-.426-1.685-1.28-2.24-.853-.555-2.368-1.024-4.544-1.408-2.816-.49-4.81-1.195-5.984-2.112-1.173-.917-1.76-2.197-1.76-3.84 0-1.13.32-2.176.96-3.136.64-.96 1.558-1.717 2.752-2.272 1.195-.576 2.582-.864 4.16-.864zm26.044 19.584a5.25 5.25 0 0 0 1.28-.16l-.16 2.016a5.68 5.68 0 0 1-1.92.32c-.832 0-1.494-.181-1.984-.544-.47-.363-.768-.971-.896-1.824-.491.747-1.216 1.333-2.176 1.76a7.435 7.435 0 0 1-2.976.608c-1.579 0-2.88-.363-3.904-1.088-1.024-.747-1.536-1.813-1.536-3.2 0-1.216.533-2.261 1.6-3.136 1.066-.896 2.613-1.515 4.64-1.856l4.256-.704v-.896c0-1.067-.331-1.92-.992-2.56-.662-.64-1.579-.96-2.752-.96-1.067 0-1.995.256-2.784.768-.768.512-1.366 1.27-1.792 2.272l-1.888-1.376c.426-1.195 1.216-2.144 2.368-2.848 1.173-.704 2.538-1.056 4.096-1.056 1.898 0 3.424.459 4.576 1.376 1.152.917 1.728 2.272 1.728 4.064v7.872c0 .384.096.672.288.864.192.192.501.288.928.288zm-8.704-.064c1.344 0 2.496-.32 3.456-.96.981-.64 1.472-1.472 1.472-2.496v-2.208l-3.584.672c-1.43.256-2.496.63-3.2 1.12-.704.47-1.056 1.077-1.056 1.824 0 .661.256 1.173.768 1.536.512.341 1.226.512 2.144.512zm21.485-14.4c1.813 0 3.306.523 4.48 1.568 1.173 1.045 1.76 2.55 1.76 4.512V105h-2.56v-9.344c0-1.664-.363-2.87-1.088-3.616-.704-.747-1.654-1.12-2.848-1.12-.854 0-1.654.192-2.4.576-.747.363-1.366.97-1.856 1.824-.47.832-.704 1.888-.704 3.168V105h-2.56V89h2.24l.16 2.496c.533-.96 1.269-1.664 2.208-2.112.938-.47 1.994-.704 3.168-.704zm17.476 16.64c-1.536 0-2.922-.299-4.16-.896-1.237-.619-2.144-1.525-2.72-2.72l2.08-1.44a3.898 3.898 0 0 0 1.888 2.112c.896.469 1.952.704 3.168.704 1.259 0 2.219-.224 2.88-.672.662-.448.992-1.013.992-1.696 0-.619-.309-1.11-.928-1.472-.618-.384-1.706-.715-3.264-.992-1.536-.277-2.752-.608-3.648-.992-.896-.405-1.546-.907-1.952-1.504-.405-.619-.608-1.376-.608-2.272 0-.875.256-1.675.768-2.4.512-.725 1.248-1.301 2.208-1.728.96-.448 2.07-.672 3.328-.672 1.707 0 3.072.32 4.096.96 1.046.619 1.792 1.579 2.24 2.88l-2.176 1.28c-.341-1.024-.864-1.76-1.568-2.208-.682-.448-1.546-.672-2.592-.672-1.045 0-1.93.235-2.656.704-.725.47-1.088 1.013-1.088 1.632 0 .704.31 1.248.928 1.632.64.384 1.771.715 3.392.992 2.219.363 3.787.907 4.704 1.632.918.725 1.376 1.75 1.376 3.072a3.95 3.95 0 0 1-.832 2.464c-.533.704-1.312 1.259-2.336 1.664-1.002.405-2.176.608-3.52.608z",fill:"#fff"}));case"PLAY_ROBOTO":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#B9B5B8",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M149.438 101c-.75-2.125-1.23-5.27-1.438-9.438-2.625 3.417-5.979 6.063-10.062 7.938-4.042 1.833-8.334 2.75-12.876 2.75-6.5 0-11.77-1.812-15.812-5.438-4-3.624-6-8.208-6-13.75 0-6.583 2.729-11.791 8.188-15.624 5.5-3.834 13.145-5.75 22.937-5.75h13.563V54c0-4.833-1.5-8.625-4.5-11.375-2.959-2.792-7.292-4.188-13-4.188-5.209 0-9.521 1.334-12.938 4-3.417 2.667-5.125 5.876-5.125 9.626l-7.5-.063c0-5.375 2.5-10.02 7.5-13.938 5-3.958 11.146-5.937 18.437-5.937 7.542 0 13.48 1.896 17.813 5.688 4.375 3.75 6.625 9 6.75 15.75v32c0 6.541.687 11.437 2.063 14.687v.75h-8zm-23.5-5.375c5 0 9.458-1.208 13.374-3.625 3.959-2.417 6.834-5.646 8.626-9.688V67.439h-13.376c-7.458.083-13.291 1.458-17.5 4.124-4.208 2.626-6.312 6.25-6.312 10.876 0 3.791 1.396 6.937 4.188 9.437 2.833 2.5 6.5 3.75 11 3.75zM39.328 101.896c-5.461 0-9.6-1.451-12.416-4.352-2.73-2.987-4.096-6.699-4.096-11.136 0-3.84.981-6.997 2.944-9.472 2.048-2.56 4.437-4.523 7.168-5.888 2.73-1.365 6.272-2.773 10.624-4.224 4.608-1.536 7.979-2.944 10.112-4.224 2.133-1.28 3.2-3.072 3.2-5.376V45.832c0-2.73-.683-5.163-2.048-7.296s-3.712-3.2-7.04-3.2c-2.645 0-5.035.725-7.168 2.176 2.901 1.024 5.035 2.56 6.4 4.608 1.45 1.963 2.176 4.181 2.176 6.656 0 3.328-1.195 6.016-3.584 8.064-2.304 1.963-5.12 2.944-8.448 2.944-3.328 0-5.973-1.024-7.936-3.072-1.877-2.133-2.816-4.821-2.816-8.064 0-2.56.64-4.779 1.92-6.656 1.28-1.877 3.285-3.584 6.016-5.12 4.779-2.73 11.605-4.096 20.48-4.096 4.693 0 8.747.47 12.16 1.408 3.413.853 6.315 2.517 8.704 4.992 1.707 1.792 2.816 4.053 3.328 6.784.597 2.645.896 6.357.896 11.136V91.4c0 2.133.128 3.584.384 4.352.341.768.896 1.152 1.664 1.152.597 0 1.237-.17 1.92-.512a15.863 15.863 0 0 0 1.92-1.408l1.28 2.176c-3.67 3.157-8.917 4.736-15.744 4.736-5.12 0-8.704-.853-10.752-2.56-2.048-1.792-3.157-4.181-3.328-7.168-4.01 6.485-9.984 9.728-17.92 9.728zm12.8-10.24c1.792 0 3.37-.725 4.736-2.176V62.472c-.768 1.28-2.176 2.944-4.224 4.992-2.304 2.219-4.053 4.395-5.248 6.528-1.195 2.048-1.792 4.864-1.792 8.448 0 6.144 2.176 9.216 6.528 9.216z",fill:"#270920"}));default:return Object(E.createElement)("div",{className:"font-pairings-panel__preview"},Object(E.createElement)("h1",{style:{fontFamily:t}},"Lorem Ipsum"),Object(E.createElement)("p",{style:{fontFamily:n}},"Etiam tempor orci eu lobortis elementum nibh tellus molestie."))}},M=function(e){var t=e.fontPairings,n=e.fontBase,c=e.fontHeadings,a=e.update;return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("h3",null,Object(P.__)("Font Pairings","full-site-editing")),t&&c&&n?Object(E.createElement)("div",{role:"listbox"},t.map((function(e){var t=e.label,r=e.headings,l=e.base,o=e.preview,i=r===c&&l===n,s=S()("font-pairings-panel",{"is-selected":i});return Object(E.createElement)("div",{key:t,tabIndex:0,role:"option","aria-selected":i,className:s,onClick:function(){return a({headings:r,base:l})},onKeyDown:function(e){return e.keyCode===w.ENTER?a({headings:r,base:l}):null}},Object(E.createElement)("div",{className:"font-pairings-panel__preview"},x(o,r,l)),Object(E.createElement)("p",{className:"font-pairings-panel__label"},t))}))):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("font pairings","full-site-editing")}))},B=function(e){var t=e.fontBase,n=e.fontBaseDefault,c=e.fontHeadings,a=e.fontHeadingsDefault,r=e.fontBaseOptions,l=e.fontHeadingsOptions,o=e.updateBaseFont,i=e.updateHeadingsFont;return r&&l?Object(E.createElement)(E.Fragment,null,Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Heading Font","full-site-editing"),value:c,options:l,onChange:function(e){return i(e)},style:{fontFamily:"unset"!==c?c:a}}),Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Base Font","full-site-editing"),value:t,options:r,onChange:function(e){return o(e)},style:{fontFamily:"unset"!==t?t:n}}),Object(E.createElement)("hr",null)):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("custom font selection","full-site-editing")})},T=function(){return Object(E.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(E.createElement)(y.Path,{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"}))},L=function(e){if("object"==typeof e){var t=e.label,n=e.value,c=e.prop;return{label:t,value:n,prop:void 0===c?"ANY_PROPERTY":c}}return{label:e,value:e,prop:"ANY_PROPERTY"}},N=function(e){return null!==e.value&&null!==e.label},C=function(e,t){return e?e.map(L).filter(N).filter(function(e){return function(t){return"ANY_PROPERTY"===t.prop||t.prop===e}}(t)):[]},F=function(e){var t=e.hasLocalChanges,n=e.resetAction,c=e.publishAction,a=e.className,r=void 0===a?null:a;return Object(E.createElement)("div",{className:r},Object(E.createElement)(y.Button,{disabled:!t,isDefault:!0,onClick:n},Object(P.__)("Reset","full-site-editing")),Object(E.createElement)(y.Button,{className:"global-styles-sidebar__publish-button",disabled:!t,isPrimary:!0,onClick:c},Object(P.__)("Publish","full-site-editing")))},I=(n(14),JETPACK_GLOBAL_STYLES_EDITOR_CONSTANTS),A=I.PLUGIN_NAME,R=I.STORE_NAME,D=I.REST_PATH;c=R,a=D,Object(i.registerStore)(c,{reducer:function(e,t){switch(t.type){case"UPDATE_OPTIONS":case"RESET_OPTIONS":case"PUBLISH_OPTIONS":return h()({},e,{},t.options)}return e},actions:O,selectors:{getOption:function(e,t){return e?e[t]:void 0},hasLocalChanges:function(e){return!!e&&Object.keys(v).some((function(t){return v[t]!==e[t]}))}},resolvers:{getOption:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,b=!0,e.next=6,O.fetchOptions();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),n={};case 12:return v=n,e.abrupt("return",{type:"UPDATE_OPTIONS",options:n});case 14:case"end":return e.stop()}}),e,null,[[2,9]])}))},controls:{IO_FETCH_OPTIONS:function(){return p()({path:a})},IO_PUBLISH_OPTIONS:function(e){var t=e.options;return v=t,p()({path:a,method:"POST",data:h()({},t)})}}}),r=["font_base","font_headings"],l=Object(i.select)(R).getOption,d()((function(){var e={},t={},n={};r.forEach((function(e){n[e]="--".concat(e.replace("_","-"))}));var c=null;Object(i.subscribe)((function(){var a=Object(i.select)("core/editor").__unstableIsEditorReady;if(!(a&&!1===a()||(c||(c=document.createElement("style"),document.body.appendChild(c)),r.forEach((function(t){e[t]=l(t)})),Object(g.isEmpty)(e)||Object(g.isEqual)(e,t)))){t=h()({},e);var o="";Object.keys(e).forEach((function(t){o+="".concat(n[t],":").concat(e[t],";")})),c.textContent=".edit-post-visual-editor.editor-styles-wrapper{".concat(o,"}")}}))})),Object(o.registerPlugin)(A,{render:Object(s.compose)(Object(i.withSelect)((function(e){return{siteName:e(R).getOption("blogname"),fontHeadings:e(R).getOption("font_headings"),fontHeadingsDefault:e(R).getOption("font_headings_default"),fontBase:e(R).getOption("font_base"),fontBaseDefault:e(R).getOption("font_base_default"),fontPairings:e(R).getOption("font_pairings"),fontOptions:e(R).getOption("font_options"),hasLocalChanges:e(R).hasLocalChanges()}})),Object(i.withDispatch)((function(e){return{updateOptions:e(R).updateOptions,publishOptions:e(R).publishOptions,resetLocalChanges:e(R).resetLocalChanges}})))((function(e){var t=e.fontHeadings,n=e.fontHeadingsDefault,c=e.fontBase,a=e.fontBaseDefault,r=e.fontPairings,l=e.fontOptions,o=e.siteName,i=e.publishOptions,s=e.updateOptions,u=e.hasLocalChanges,h=e.resetLocalChanges,f=function(){var e;return i((e={},_()(e,"font_base",c),_()(e,"font_headings",t),e))};return Object(E.createElement)(E.Fragment,null,Object(E.createElement)(z.PluginSidebarMoreMenuItem,{icon:Object(E.createElement)(T,null),target:"global-styles"},Object(P.__)("Global Styles","full-site-editing")),Object(E.createElement)(z.PluginSidebar,{icon:Object(E.createElement)(T,null),name:"global-styles",title:Object(P.__)("Global Styles","full-site-editing"),className:"global-styles-sidebar"},Object(E.createElement)(y.PanelBody,null,Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("You are customizing %s.","full-site-editing"),o)),Object(E.createElement)("p",null,Object(P.__)("Any change you make here will apply to the entire website.","full-site-editing")),u?Object(E.createElement)("div",null,Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes.","full-site-editing"))),Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h})):null),Object(E.createElement)(y.PanelBody,{title:Object(P.__)("Font Selection","full-site-editing")},Object(E.createElement)(B,{fontBase:c,fontBaseDefault:a,fontHeadings:t,fontHeadingsDefault:n,fontBaseOptions:C(l,"font_base"),fontHeadingsOptions:C(l,"font_headings"),updateBaseFont:function(e){return s(_()({},"font_base",e))},updateHeadingsFont:function(e){return s(_()({},"font_headings",e))}}),Object(E.createElement)(M,{fontHeadings:t,fontBase:c,fontPairings:r,update:function(e){var t,n=e.headings,c=e.base;return s((t={},_()(t,"font_headings",n),_()(t,"font_base",c),t))}})),Object(E.createElement)(y.PanelBody,null,u?Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes.","full-site-editing"))):null,Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h,className:"global-styles-sidebar__panel-action-buttons"}))))}))})}]));
global-styles/src/font-pairings-panel.js CHANGED
@@ -14,7 +14,7 @@ import loadFontPairingPreview from './font-pairings-panel-previews';
14
  export default ( { fontPairings, fontBase, fontHeadings, update } ) => {
15
  return (
16
  <>
17
- <h3>{ __( 'Font Pairings' ) }</h3>
18
  { fontPairings && fontHeadings && fontBase ? (
19
  <div role="listbox">
20
  { fontPairings.map( ( { label, headings, base, preview } ) => {
@@ -43,7 +43,7 @@ export default ( { fontPairings, fontBase, fontHeadings, update } ) => {
43
  } ) }
44
  </div>
45
  ) : (
46
- <NoSupport unsupportedFeature={ __( 'font pairings' ) } />
47
  ) }
48
  </>
49
  );
14
  export default ( { fontPairings, fontBase, fontHeadings, update } ) => {
15
  return (
16
  <>
17
+ <h3>{ __( 'Font Pairings', 'full-site-editing' ) }</h3>
18
  { fontPairings && fontHeadings && fontBase ? (
19
  <div role="listbox">
20
  { fontPairings.map( ( { label, headings, base, preview } ) => {
43
  } ) }
44
  </div>
45
  ) : (
46
+ <NoSupport unsupportedFeature={ __( 'font pairings', 'full-site-editing' ) } />
47
  ) }
48
  </>
49
  );
global-styles/src/font-selection-panel.js CHANGED
@@ -24,20 +24,20 @@ export default ( {
24
  updateHeadingsFont,
25
  } ) => {
26
  if ( ! fontBaseOptions || ! fontHeadingsOptions ) {
27
- return <NoSupport unsupportedFeature={ __( 'custom font selection' ) } />;
28
  }
29
 
30
  return (
31
  <>
32
  <SelectControl
33
- label={ __( 'Heading Font' ) }
34
  value={ fontHeadings }
35
  options={ fontHeadingsOptions }
36
  onChange={ ( newValue ) => updateHeadingsFont( newValue ) }
37
  style={ { fontFamily: fontHeadings !== 'unset' ? fontHeadings : fontHeadingsDefault } }
38
  />
39
  <SelectControl
40
- label={ __( 'Base Font' ) }
41
  value={ fontBase }
42
  options={ fontBaseOptions }
43
  onChange={ ( newValue ) => updateBaseFont( newValue ) }
24
  updateHeadingsFont,
25
  } ) => {
26
  if ( ! fontBaseOptions || ! fontHeadingsOptions ) {
27
+ return <NoSupport unsupportedFeature={ __( 'custom font selection', 'full-site-editing' ) } />;
28
  }
29
 
30
  return (
31
  <>
32
  <SelectControl
33
+ label={ __( 'Heading Font', 'full-site-editing' ) }
34
  value={ fontHeadings }
35
  options={ fontHeadingsOptions }
36
  onChange={ ( newValue ) => updateHeadingsFont( newValue ) }
37
  style={ { fontFamily: fontHeadings !== 'unset' ? fontHeadings : fontHeadingsDefault } }
38
  />
39
  <SelectControl
40
+ label={ __( 'Base Font', 'full-site-editing' ) }
41
  value={ fontBase }
42
  options={ fontBaseOptions }
43
  onChange={ ( newValue ) => updateBaseFont( newValue ) }
global-styles/src/global-styles-sidebar.js CHANGED
@@ -1,10 +1,9 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { PluginSidebar } from '@wordpress/edit-post';
5
  import { Button, PanelBody } from '@wordpress/components';
6
  import { __, sprintf } from '@wordpress/i18n';
7
- import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
8
 
9
  /**
10
  * Internal dependencies
@@ -39,7 +38,7 @@ const PanelActionButtons = ( {
39
  } ) => (
40
  <div className={ className }>
41
  <Button disabled={ ! hasLocalChanges } isDefault onClick={ resetAction }>
42
- { __( 'Reset' ) }
43
  </Button>
44
  <Button
45
  className={ 'global-styles-sidebar__publish-button' }
@@ -47,7 +46,7 @@ const PanelActionButtons = ( {
47
  isPrimary
48
  onClick={ publishAction }
49
  >
50
- { __( 'Publish' ) }
51
  </Button>
52
  </div>
53
  );
@@ -73,26 +72,31 @@ export default ( {
73
  return (
74
  <>
75
  <PluginSidebarMoreMenuItem icon={ <GlobalStylesIcon /> } target="global-styles">
76
- { __( 'Global Styles' ) }
77
  </PluginSidebarMoreMenuItem>
78
  <PluginSidebar
79
  icon={ <GlobalStylesIcon /> }
80
  name={ 'global-styles' }
81
- title={ __( 'Global Styles' ) }
82
  className="global-styles-sidebar"
83
  >
84
  <PanelBody>
85
  <p>
86
  {
87
  /* translators: %s: Name of site. */
88
- sprintf( __( 'You are customizing %s.' ), siteName )
89
  }
90
  </p>
91
- <p>{ __( 'Any change you make here will apply to the entire website.' ) }</p>
 
 
 
 
 
92
  { hasLocalChanges ? (
93
  <div>
94
  <p>
95
- <em>{ __( 'You have unsaved changes.' ) }</em>
96
  </p>
97
  <PanelActionButtons
98
  hasLocalChanges={ hasLocalChanges }
@@ -102,7 +106,7 @@ export default ( {
102
  </div>
103
  ) : null }
104
  </PanelBody>
105
- <PanelBody title={ __( 'Font Selection' ) }>
106
  <FontSelectionPanel
107
  fontBase={ fontBase }
108
  fontBaseDefault={ fontBaseDefault }
@@ -125,7 +129,7 @@ export default ( {
125
  <PanelBody>
126
  { hasLocalChanges ? (
127
  <p>
128
- <em>{ __( 'You have unsaved changes.' ) }</em>
129
  </p>
130
  ) : null }
131
  <PanelActionButtons
1
  /**
2
  * External dependencies
3
  */
4
+ import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
5
  import { Button, PanelBody } from '@wordpress/components';
6
  import { __, sprintf } from '@wordpress/i18n';
 
7
 
8
  /**
9
  * Internal dependencies
38
  } ) => (
39
  <div className={ className }>
40
  <Button disabled={ ! hasLocalChanges } isDefault onClick={ resetAction }>
41
+ { __( 'Reset', 'full-site-editing' ) }
42
  </Button>
43
  <Button
44
  className={ 'global-styles-sidebar__publish-button' }
46
  isPrimary
47
  onClick={ publishAction }
48
  >
49
+ { __( 'Publish', 'full-site-editing' ) }
50
  </Button>
51
  </div>
52
  );
72
  return (
73
  <>
74
  <PluginSidebarMoreMenuItem icon={ <GlobalStylesIcon /> } target="global-styles">
75
+ { __( 'Global Styles', 'full-site-editing' ) }
76
  </PluginSidebarMoreMenuItem>
77
  <PluginSidebar
78
  icon={ <GlobalStylesIcon /> }
79
  name={ 'global-styles' }
80
+ title={ __( 'Global Styles', 'full-site-editing' ) }
81
  className="global-styles-sidebar"
82
  >
83
  <PanelBody>
84
  <p>
85
  {
86
  /* translators: %s: Name of site. */
87
+ sprintf( __( 'You are customizing %s.', 'full-site-editing' ), siteName )
88
  }
89
  </p>
90
+ <p>
91
+ { __(
92
+ 'Any change you make here will apply to the entire website.',
93
+ 'full-site-editing'
94
+ ) }
95
+ </p>
96
  { hasLocalChanges ? (
97
  <div>
98
  <p>
99
+ <em>{ __( 'You have unsaved changes.', 'full-site-editing' ) }</em>
100
  </p>
101
  <PanelActionButtons
102
  hasLocalChanges={ hasLocalChanges }
106
  </div>
107
  ) : null }
108
  </PanelBody>
109
+ <PanelBody title={ __( 'Font Selection', 'full-site-editing' ) }>
110
  <FontSelectionPanel
111
  fontBase={ fontBase }
112
  fontBaseDefault={ fontBaseDefault }
129
  <PanelBody>
130
  { hasLocalChanges ? (
131
  <p>
132
+ <em>{ __( 'You have unsaved changes.', 'full-site-editing' ) }</em>
133
  </p>
134
  ) : null }
135
  <PanelActionButtons
global-styles/src/no-support.js CHANGED
@@ -7,7 +7,10 @@ export default ( { unsupportedFeature } ) => (
7
  <p>
8
  {
9
  /* translators: %s: feature name (i.e. font pairings, etc) */
10
- sprintf( __( "Your active theme doesn't support %s." ), unsupportedFeature )
 
 
 
11
  }
12
  </p>
13
  );
7
  <p>
8
  {
9
  /* translators: %s: feature name (i.e. font pairings, etc) */
10
+ sprintf(
11
+ __( "Your active theme doesn't support %s.", 'full-site-editing' ),
12
+ unsupportedFeature
13
+ )
14
  }
15
  </p>
16
  );
mailerlite/subscriber-popup.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /* global ml,jetpackMailerliteSettings */
2
+
3
+ ( function () {
4
+ window.ml_account = ml(
5
+ 'accounts',
6
+ jetpackMailerliteSettings.account,
7
+ jetpackMailerliteSettings.uuid,
8
+ 'load'
9
+ );
10
+ } )();
mailerlite/subscriber-popup.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ namespace A8C\FSE\Mailerlite;
3
+
4
+ /**
5
+ * Mailerlite widget class
6
+ * Display a subscriber popup for Mailerlite.
7
+ */
8
+ class WPCOM_Widget_Mailerlite extends \WP_Widget {
9
+
10
+ /**
11
+ * WPCOM_Widget_Mailerlite constructor.
12
+ */
13
+ public function __construct() {
14
+ parent::__construct(
15
+ 'wpcom-mailerlite',
16
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
17
+ apply_filters( 'jetpack_widget_name', __( 'Mailerlite subscriber popup', 'jetpack' ) ),
18
+ array(
19
+ 'classname' => 'widget_mailerlite',
20
+ 'description' => __( 'Display Mailerlite subscriber popup', 'jetpack' ),
21
+ 'customize_selective_refresh' => true,
22
+ )
23
+ );
24
+ }
25
+
26
+ /**
27
+ * Output the widget.
28
+ *
29
+ * @param array $args Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'.
30
+ * @param array $instance - The settings for the particular instance of the widget.
31
+ */
32
+ public function widget( $args, $instance ) {
33
+ /** This action is documented in modules/widgets/gravatar-profile.php */
34
+ do_action( 'jetpack_stats_extra', 'widget_view', 'mailerlite' );
35
+
36
+ if ( empty( $instance['account'] ) || empty( $instance['uuid'] ) ) {
37
+ if ( current_user_can( 'edit_theme_options' ) ) {
38
+ echo $args['before_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
39
+ echo '<p>' . sprintf(
40
+ wp_kses(
41
+ /* translators: %1$s - URL to manage the widget, %2$s - documentation URL. */
42
+ __( 'You need to enter your numeric account ID and UUID for the <a href="%1$s">Mailerlite Widget</a> to work correctly. <a href="%2$s" target="_blank">Full instructions</a>.', 'jetpack' ),
43
+ array(
44
+ 'a' => array(
45
+ 'href' => array(),
46
+ 'title' => array(),
47
+ ),
48
+ )
49
+ ),
50
+ esc_url( admin_url( 'widgets.php' ) ),
51
+ 'https://wordpress.com/support/widgets/mailerlite'
52
+ ) . '</p>';
53
+ echo $args['after_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
54
+ }
55
+ return;
56
+ }
57
+
58
+ if ( wp_script_is( 'mailerlite-subscriber-popup', 'enqueued' ) ) {
59
+ return;
60
+ }
61
+
62
+ wp_register_script( 'mailerlite-universal', 'https://static.mailerlite.com/js/universal.js', array(), '20200521', true );
63
+ wp_enqueue_script(
64
+ 'mailerlite-subscriber-popup',
65
+ plugins_url( 'subscriber-popup.js', __FILE__ ),
66
+ array( 'mailerlite-universal' ),
67
+ '20200521',
68
+ true
69
+ );
70
+ wp_localize_script(
71
+ 'mailerlite-subscriber-popup',
72
+ 'jetpackMailerliteSettings',
73
+ array(
74
+ 'account' => esc_attr( $instance['account'] ),
75
+ 'uuid' => esc_attr( $instance['uuid'] ),
76
+ )
77
+ );
78
+
79
+ }
80
+
81
+ /**
82
+ * Updates a particular instance of a widget.
83
+ *
84
+ * @param array $new_instance New settings for this instance as input by the user via WP_Widget::form().
85
+ * @param array $old_instance Old settings for this instance.
86
+ *
87
+ * @return mixed
88
+ */
89
+ public function update( $new_instance, $old_instance ) { // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed
90
+ return array(
91
+ 'account' => wp_kses( stripslashes( $new_instance['account'] ), array() ),
92
+ 'uuid' => wp_kses( stripslashes( $new_instance['uuid'] ), array() ),
93
+ );
94
+ }
95
+
96
+ /**
97
+ * Editable form in WP-admin.
98
+ *
99
+ * @param array $instance - settings.
100
+ */
101
+ public function form( $instance ) {
102
+ $instance = wp_parse_args(
103
+ (array) $instance,
104
+ array(
105
+ 'account' => '',
106
+ 'uuid' => '',
107
+ )
108
+ );
109
+
110
+ echo '
111
+ <p><label for="' . esc_attr( $this->get_field_id( 'account' ) ) . '">';
112
+ /* translators: link to documentation */
113
+ printf( wp_kses_post( __( 'Account ID <a href="%s" target="_blank">(instructions)</a>:', 'jetpack' ) ), 'https://wordpress.com/support/widgets/mailerlite' );
114
+ echo '<input class="widefat" id="' . esc_attr( $this->get_field_id( 'account' ) ) . '" name="' . esc_attr( $this->get_field_name( 'account' ) ) . '" type="text" value="' . esc_attr( $instance['account'] ) . '" />
115
+ </label></p>
116
+ <p><label for="' . esc_attr( $this->get_field_id( 'shelf' ) ) . '">' . esc_html__( 'UUID:', 'jetpack' );
117
+ echo '<input class="widefat" id="' . esc_attr( $this->get_field_id( 'uuid' ) ) . '" name="' . esc_attr( $this->get_field_name( 'uuid' ) ) . '" type="text" value="' . esc_attr( $instance['uuid'] ) . '" />';
118
+ echo '</label></p>
119
+ ';
120
+ }
121
+ }
122
+
123
+ /**
124
+ * Registers the widget via widgets_init hook.
125
+ */
126
+ function mailerlite_register_widget() {
127
+ register_widget( '\A8C\FSE\Mailerlite\WPCOM_Widget_Mailerlite' );
128
+ }
129
+ add_action( 'widgets_init', '\A8C\FSE\Mailerlite\mailerlite_register_widget' );
130
+
newspack-blocks/dist/blog-posts-block-editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'dadafebef3b4beca04fda7bf0e15b515');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '08bbe4ba8edcd9c430fc3b7e78dfc02e');
newspack-blocks/dist/blog-posts-block-editor.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(o,c,function(t){return e[t]}.bind(null,c));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=37)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){var o=n(3);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var o=n(25);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(26),c=n(27),r=n(28);e.exports=function(e){return function(){var t,n=o(e);if(c()){var a=o(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return r(this,t)}}},function(e){e.exports=JSON.parse('{"name":"homepage-articles","category":"newspack","attributes":{"className":{"type":"string","default":""},"showExcerpt":{"type":"boolean","default":true},"showDate":{"type":"boolean","default":true},"showImage":{"type":"boolean","default":true},"showCaption":{"type":"boolean","default":false},"imageShape":{"type":"string","default":"landscape"},"minHeight":{"type":"integer","default":0},"moreButton":{"type":"boolean","default":false},"moreButtonText":{"type":"string","default":""},"showAuthor":{"type":"boolean","default":true},"showAvatar":{"type":"boolean","default":true},"showCategory":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"integer","default":3},"postsToShow":{"type":"integer","default":3},"mediaPosition":{"type":"string","default":"top"},"authors":{"type":"array","default":[],"items":{"type":"integer"}},"categories":{"type":"array","default":[],"items":{"type":"integer"}},"tags":{"type":"array","default":[],"items":{"type":"integer"}},"tagExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"specificPosts":{"type":"array","default":[],"items":{"type":"integer"}},"typeScale":{"type":"integer","default":4},"imageScale":{"type":"integer","default":3},"mobileStack":{"type":"boolean","default":false},"sectionHeader":{"type":"string","default":""},"specificMode":{"type":"boolean","default":false},"textColor":{"type":"string","default":""},"customTextColor":{"type":"string","default":""},"singleMode":{"type":"boolean","default":false},"showSubtitle":{"type":"boolean","default":false}}}')},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(30),c=n(31),r=n(32),a=n(33);e.exports=function(e){return o(e)||c(e)||r(e)||a()}},function(e,t,n){var o;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var a=c.apply(null,o);a&&e.push(a)}else if("object"===r)for(var i in o)n.call(o,i)&&o[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(o=function(){return c}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(29),c=n(4);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?c(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var o=n(22);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,n){var o=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(9),c=n.n(o),r=n(16),a=n(1),i=n(17),s=n(0),l=n(2),u=n(12),p=n.n(u),f=n(18),d=n.n(f),h=n(4),g=n.n(h),b=n(13),m=n.n(b),O=n(14),y=n.n(O),j=n(3),v=n.n(j),_=n(23),w=n.n(_),k=n(6),S=n.n(k),E=n(7),C=n(5),P=n(19),x=n.n(P),A=n(11),T=(n(34),function(e){m()(n,e);var t=y()(n);function n(e){var o;return p()(this,n),o=t.call(this,e),v()(g()(o),"isFetchingInfoOnLoad",(function(){var e=o.props,t=e.tokens,n=e.fetchSavedInfo;return Boolean(t.length&&n)})),o.state={suggestions:[],validValues:{},loading:o.isFetchingInfoOnLoad()},o.debouncedUpdateSuggestions=Object(A.debounce)(o.updateSuggestions,500),o}return d()(n,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,n=t.tokens;(0,t.fetchSavedInfo)(n).then((function(t){var n=e.state.validValues;t.forEach((function(e){n[e.value]=e.label})),e.setState({validValues:n,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,n){return t[n]?[].concat(x()(e),[t[n]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(n){return t[n]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,n=this.props.fetchSuggestions;n&&this.setState({loading:!0},(function(){var o=n(e);o.then((function(e){if(t.suggestionsRequest===o){var n=t.state.validValues,c=[];e.forEach((function(e){c.push(e.label),n[e.value]=e.label})),t.setState({suggestions:c,validValues:n,loading:!1})}})).catch((function(){t.suggestionsRequest===o&&t.setState({loading:!1})})),t.suggestionsRequest=o}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.help,o=t.label,c=void 0===o?"":o,r=this.state,a=r.suggestions,i=r.loading;return Object(s.createElement)("div",{className:"autocomplete-tokenfield"},Object(s.createElement)(l.FormTokenField,{value:this.getTokens(),suggestions:a,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:c}),i&&Object(s.createElement)(l.Spinner,null),n&&Object(s.createElement)("p",{className:"autocomplete-tokenfield__help"},n))}}]),n}(s.Component)),I=function(e){m()(n,e);var t=y()(n);function n(){var e;p()(this,n);for(var o=arguments.length,c=new Array(o),r=0;r<o;r++)c[r]=arguments[r];return e=t.call.apply(t,[this].concat(c)),v()(g()(e),"state",{showAdvancedFilters:!1}),v()(g()(e),"fetchPostSuggestions",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,_fields:"id,title",type:"post"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"fetchSavedPosts",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/posts",{per_page:100,include:e.join(","),_fields:"id,title"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title.rendered)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"fetchAuthorSuggestions",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/users",{search:e,per_page:20,_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no name)","newspack-blocks")}}))}))})),v()(g()(e),"fetchSavedAuthors",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/users",{per_page:100,include:e.join(","),_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no name)","newspack-blocks")}}))}))})),v()(g()(e),"fetchCategorySuggestions",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"fetchSavedCategories",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"fetchTagSuggestions",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"fetchSavedTags",(function(e){return S()({path:Object(E.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(a.__)("(no title)","newspack-blocks")}}))}))})),v()(g()(e),"render",(function(){var t=e.props,n=t.specificMode,o=t.onSpecificModeChange,c=t.specificPosts,r=t.onSpecificPostsChange,i=t.authors,u=t.onAuthorsChange,p=t.categories,f=t.onCategoriesChange,d=t.tags,h=t.onTagsChange,g=t.tagExclusions,b=t.onTagExclusionsChange,m=t.enableSpecific,O=e.state.showAdvancedFilters;return[m&&Object(s.createElement)(l.ToggleControl,{key:"specificMode",checked:n,onChange:o,label:Object(a.__)("Choose Specific Posts","newspack-blocks")}),n&&Object(s.createElement)(T,{key:"posts",tokens:c||[],onChange:r,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:Object(a.__)("Posts","newspack-blocks"),help:Object(a.__)("Begin typing post title, click autocomplete result to select.","newspack-blocks")}),!n&&Object(s.createElement)(l.QueryControls,w()({key:"queryControls"},e.props)),!n&&u&&Object(s.createElement)(T,{key:"authors",tokens:i||[],onChange:u,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:Object(a.__)("Authors","newspack-blocks")}),!n&&f&&Object(s.createElement)(T,{key:"categories",tokens:p||[],onChange:f,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:Object(a.__)("Categories","newspack-blocks")}),!n&&h&&Object(s.createElement)(T,{key:"tags",tokens:d||[],onChange:h,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(a.__)("Tags","newspack-blocks")}),!n&&b&&Object(s.createElement)("p",{key:"toggle-advanced-filters"},Object(s.createElement)(l.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!O})}},O?Object(a.__)("Hide Advanced Filters","newspack-blocks"):Object(a.__)("Show Advanced Filters","newspack-blocks"))),!n&&b&&O&&Object(s.createElement)(T,{key:"tag-exclusion",tokens:g||[],onChange:b,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(a.__)("Excluded Tags","newspack-blocks")})]})),e}return n}(s.Component);I.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],tagExclusions:[]};var B,M=I,D=n(10),H=n(15),L=H.name,N={queryBlocks:[],postsByBlock:{},specificPostsByBlock:{}},R={updateBlocks:function(e){return{type:"UPDATE_BLOCKS",blocks:e}},markPostsAsDisplayed:function(e,t){return{type:"MARK_POSTS_DISPLAYED",clientId:e,posts:t}},markSpecificPostsAsDisplayed:function(e,t){return{type:"MARK_SPECIFIC_POSTS_DISPLAYED",clientId:e,posts:t}}},V={previousPostIds:function(e,t){var n,o,c,r=e.queryBlocks,a=e.specificPostsByBlock,i=e.postsByBlock,s=r.filter((function(e){var t=e.clientId;return a[t]})).flatMap((function(e){var t=e.clientId;return a[t].map((function(e){return e.id}))})),l=(n=r,o=t,c=n.findIndex((function(e){return e.clientId===o})),n.slice(0,c)).filter((function(e){var t=e.clientId;return i[t]})).flatMap((function(e){var t=e.clientId;return i[t].map((function(e){return e.id}))}));return Object(A.uniq)(s.concat(l)).sort()}},z=function(){return"object"==typeof window&&window.wpcomGutenberg&&-1===Number(window.wpcomGutenberg.blogPublic)},F=function(e){var t=e.specificMode,n=e.specificPosts;return t&&n&&n.length},q=function(e){return e.map((function(e){return Object(s.createElement)("span",{className:"avatar author-avatar",key:e.id},Object(s.createElement)("a",{className:"url fn n",href:e.author_link},Object(s.createElement)(s.RawHTML,null,e.avatar)))}))},G=function(e){return Object(s.createElement)("span",{className:"byline"},Object(a._x)("by","post author","newspack-blocks")," ",e.reduce((function(t,n,o){return[].concat(x()(t),[Object(s.createElement)("span",{className:"author vcard",key:n.id},Object(s.createElement)("a",{className:"url fn n",href:n.author_link},n.display_name)),o<e.length-2&&", ",e.length>1&&o===e.length-2&&Object(a._x)(" and ","post author","newspack-blocks")])}),[]))},Q=n(20),U=n.n(Q),K=n(21),Y=n(8),W=n(24);"object"==typeof window&&window.newspackIsPostSubtitleSupported&&window.newspackIsPostSubtitleSupported.post_subtitle&&(B=!0);var J=Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"})),X=Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"})),$=Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"})),Z=Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"})),ee=Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"})),te=function(e){m()(n,e);var t=y()(n);function n(){var e;p()(this,n);for(var o=arguments.length,c=new Array(o),r=0;r<o;r++)c[r]=arguments[r];return e=t.call.apply(t,[this].concat(c)),v()(g()(e),"renderPost",(function(t){var n=e.props.attributes,o=n.showImage,c=n.imageShape,r=n.mediaPosition,a=n.minHeight,i=n.showCaption,l=n.showExcerpt,u=n.showSubtitle,p=n.showAuthor,f=n.showAvatar,d=n.showDate,h=n.showCategory,g=n.sectionHeader,b={minHeight:"behind"===r&&o&&t.newspack_featured_image_src&&a+"vh",paddingTop:"behind"===r&&o&&t.newspack_featured_image_src&&a/5+"vh"},m=U()({"post-has-image":t.newspack_featured_image_src},t.newspack_article_classes),O=e.titleForPost(t),y=Object(K.__experimentalGetSettings)().formats.date;return Object(s.createElement)("article",{className:m,key:t.id,style:b},o&&t.newspack_featured_image_src&&Object(s.createElement)("figure",{className:"post-thumbnail",key:"thumbnail"},Object(s.createElement)("a",{href:"#"},"landscape"===c&&Object(s.createElement)("img",{src:t.newspack_featured_image_src.landscape,alt:""}),"portrait"===c&&Object(s.createElement)("img",{src:t.newspack_featured_image_src.portrait,alt:""}),"square"===c&&Object(s.createElement)("img",{src:t.newspack_featured_image_src.square,alt:""}),"uncropped"===c&&Object(s.createElement)("img",{src:t.newspack_featured_image_src.uncropped,alt:""})),i&&""!==t.newspack_featured_image_caption&&Object(s.createElement)("figcaption",null,t.newspack_featured_image_caption)),Object(s.createElement)("div",{className:"entry-wrapper"},h&&t.newspack_category_info.length&&Object(s.createElement)("div",{className:"cat-links"},Object(s.createElement)("a",{href:"#"},Object(C.decodeEntities)(t.newspack_category_info))),Y.RichText.isEmpty(g)?Object(s.createElement)("h2",{className:"entry-title",key:"title"},Object(s.createElement)("a",{href:"#"},O)):Object(s.createElement)("h3",{className:"entry-title",key:"title"},Object(s.createElement)("a",{href:"#"},O)),B&&u&&Object(s.createElement)(s.RawHTML,{key:"subtitle",className:"newspack-post-subtitle newspack-post-subtitle--in-homepage-block"},t.meta.newspack_post_subtitle||""),l&&Object(s.createElement)(s.RawHTML,{key:"excerpt",className:"excerpt-contain"},t.excerpt.rendered),Object(s.createElement)("div",{className:"entry-meta"},p&&f&&q(t.newspack_author_info),p&&G(t.newspack_author_info),d&&Object(s.createElement)("time",{className:"entry-date published",key:"pub-date"},Object(K.dateI18n)(y,t.date_gmt)))))})),v()(g()(e),"titleForPost",(function(e){return e.title?"string"==typeof e.title?Object(C.decodeEntities)(e.title.trim()):"object"==typeof e.title&&e.title.rendered?Object(C.decodeEntities)(e.title.rendered.trim()):void 0:""})),v()(g()(e),"renderInspectorControls",(function(){var t=e.props,n=t.attributes,o=t.setAttributes,c=t.textColor,r=t.setTextColor,i=n.authors,u=n.specificPosts,p=n.postsToShow,f=n.categories,d=n.columns,h=n.showImage,g=n.showCaption,b=n.imageScale,m=n.mobileStack,O=n.minHeight,y=n.moreButton,j=n.showExcerpt,v=n.showSubtitle,_=n.typeScale,w=n.showDate,k=n.showAuthor,S=n.showAvatar,E=n.showCategory,C=n.postLayout,P=n.mediaPosition,x=n.specificMode,A=n.tags,T=n.tagExclusions,I=[{value:1,label:Object(a.__)("Small","full-site-editing"),shortName:Object(a.__)("S","full-site-editing")},{value:2,label:Object(a.__)("Medium","full-site-editing"),shortName:Object(a.__)("M","full-site-editing")},{value:3,label:Object(a.__)("Large","full-site-editing"),shortName:Object(a.__)("L","full-site-editing")},{value:4,label:Object(a.__)("Extra Large","newspack-blocks"),shortName:Object(a.__)("XL","newspack-blocks")}];return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(l.PanelBody,{title:Object(a.__)("Display Settings","full-site-editing"),initialOpen:!0},p&&Object(s.createElement)(M,{numberOfItems:p,onNumberOfItemsChange:function(e){return o({postsToShow:e})},specificMode:x,onSpecificModeChange:function(e){return o({specificMode:e})},specificPosts:u,onSpecificPostsChange:function(e){return o({specificPosts:e})},authors:i,onAuthorsChange:function(e){return o({authors:e})},categories:f,onCategoriesChange:function(e){return o({categories:e})},tags:A,onTagsChange:function(e){o({tags:e})},tagExclusions:T,onTagExclusionsChange:function(e){return o({tagExclusions:e})}}),"grid"===C&&Object(s.createElement)(l.RangeControl,{label:Object(a.__)("Columns","full-site-editing"),value:d,onChange:function(e){return o({columns:e})},min:2,max:6,required:!0}),!x&&!z()&&Object(s.createElement)(l.ToggleControl,{label:Object(a.__)('Show "More" Button',"full-site-editing"),checked:y,onChange:function(){return o({moreButton:!y})}})),Object(s.createElement)(l.PanelBody,{title:Object(a.__)("Featured Image Settings","full-site-editing")},Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Featured Image","full-site-editing"),checked:h,onChange:function(){return o({showImage:!h})}})),h&&Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Featured Image Caption","full-site-editing"),checked:g,onChange:function(){return o({showCaption:!g})}})),h&&"top"!==P&&"behind"!==P&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Stack on mobile","full-site-editing"),checked:m,onChange:function(){return o({mobileStack:!m})}})),Object(s.createElement)(l.BaseControl,{label:Object(a.__)("Featured Image Size","full-site-editing"),id:"newspackfeatured-image-size"},Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ButtonGroup,{id:"newspackfeatured-image-size","aria-label":Object(a.__)("Featured Image Size","full-site-editing")},I.map((function(e){var t=b===e.value;return Object(s.createElement)(l.Button,{isLarge:!0,isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return o({imageScale:e.value})}},e.shortName)})))))),h&&"behind"===P&&Object(s.createElement)(l.RangeControl,{label:Object(a.__)("Minimum height","full-site-editing"),help:Object(a.__)("Sets a minimum height for the block, using a percentage of the screen's current height.","newspack-blocks"),value:O,onChange:function(e){return o({minHeight:e})},min:0,max:100,required:!0})),Object(s.createElement)(l.PanelBody,{title:Object(a.__)("Post Control Settings","full-site-editing")},B&&Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Subtitle","full-site-editing"),checked:v,onChange:function(){return o({showSubtitle:!v})}})),Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Excerpt","full-site-editing"),checked:j,onChange:function(){return o({showExcerpt:!j})}})),Object(s.createElement)(l.RangeControl,{className:"type-scale-slider",label:Object(a.__)("Type Scale","full-site-editing"),value:_,onChange:function(e){return o({typeScale:e})},min:1,max:10,beforeIcon:"editor-textcolor",afterIcon:"editor-textcolor",required:!0})),Object(s.createElement)(Y.PanelColorSettings,{title:Object(a.__)("Color Settings","full-site-editing"),initialOpen:!0,colorSettings:[{value:c.color,onChange:r,label:Object(a.__)("Text Color","full-site-editing")}]}),Object(s.createElement)(l.PanelBody,{title:Object(a.__)("Post Meta Settings","full-site-editing")},Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Date","full-site-editing"),checked:w,onChange:function(){return o({showDate:!w})}})),Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Category","full-site-editing"),checked:E,onChange:function(){return o({showCategory:!E})}})),Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Author","full-site-editing"),checked:k,onChange:function(){return o({showAuthor:!k})}})),k&&Object(s.createElement)(l.PanelRow,null,Object(s.createElement)(l.ToggleControl,{label:Object(a.__)("Show Author Avatar","full-site-editing"),checked:S,onChange:function(){return o({showAvatar:!S})}}))))})),e}return d()(n,[{key:"render",value:function(){var e,t=this,n=this.props,o=n.attributes,c=n.className,r=n.clientId,i=n.setAttributes,u=n.isSelected,p=n.latestPosts,f=n.textColor,d=n.markPostsAsDisplayed,h=o.showImage,g=o.imageShape,b=o.postLayout,m=o.mediaPosition,O=o.moreButton,y=o.moreButtonText,j=o.columns,_=o.typeScale,w=o.imageScale,k=o.mobileStack,S=o.sectionHeader,E=o.showCaption,C=o.showCategory,P=o.specificMode,x=U()(c,(e={"is-grid":"grid"===b,"show-image":h},v()(e,"columns-".concat(j),"grid"===b),v()(e,"ts-".concat(_),"5"!==_),v()(e,"image-align".concat(m),h),v()(e,"is-".concat(w),"1"!==w&&h),v()(e,"mobile-stack",k),v()(e,"is-".concat(g),h),v()(e,"has-text-color",""!==f.color),v()(e,"show-caption",E),v()(e,"show-category",C),v()(e,"wpnbha",!0),e)),A=[{icon:"list-view",title:Object(a.__)("List View","full-site-editing"),onClick:function(){return i({postLayout:"list"})},isActive:"list"===b},{icon:"grid-view",title:Object(a.__)("Grid View","full-site-editing"),onClick:function(){return i({postLayout:"grid"})},isActive:"grid"===b}],T=[{icon:"align-none",title:Object(a.__)("Show media on top","full-site-editing"),isActive:"top"===m,onClick:function(){return i({mediaPosition:"top"})}},{icon:"align-pull-left",title:Object(a.__)("Show media on left","full-site-editing"),isActive:"left"===m,onClick:function(){return i({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(a.__)("Show media on right","full-site-editing"),isActive:"right"===m,onClick:function(){return i({mediaPosition:"right"})}},{icon:ee,title:Object(a.__)("Show media behind","full-site-editing"),isActive:"behind"===m,onClick:function(){return i({mediaPosition:"behind"})}}],I=[{icon:J,title:Object(a.__)("Landscape Image Shape","full-site-editing"),isActive:"landscape"===g,onClick:function(){return i({imageShape:"landscape"})}},{icon:X,title:Object(a.__)("portrait Image Shape","full-site-editing"),isActive:"portrait"===g,onClick:function(){return i({imageShape:"portrait"})}},{icon:$,title:Object(a.__)("Square Image Shape","full-site-editing"),isActive:"square"===g,onClick:function(){return i({imageShape:"square"})}},{icon:Z,title:Object(a.__)("Uncropped","full-site-editing"),isActive:"uncropped"===g,onClick:function(){return i({imageShape:"uncropped"})}}];return d(r,p),Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:x,style:{color:f.color}},Object(s.createElement)("div",null,p&&(!Y.RichText.isEmpty(S)||u)&&Object(s.createElement)(Y.RichText,{onChange:function(e){return i({sectionHeader:e})},placeholder:Object(a.__)("Write header…","full-site-editing"),value:S,tagName:"h2",className:"article-section-title"}),p&&!p.length&&Object(s.createElement)(l.Placeholder,null,Object(a.__)("Sorry, no posts were found.","full-site-editing")),!p&&Object(s.createElement)(l.Placeholder,{icon:Object(s.createElement)(l.Spinner,null),className:"component-placeholder__align-center"}),p&&p.map((function(e){return t.renderPost(e)})))),!P&&p&&O&&!z()&&Object(s.createElement)("div",{className:"editor-styles-wrapper wpnbha__wp-block-button__wrapper"},Object(s.createElement)("div",{className:"wp-block-button"},Object(s.createElement)(Y.RichText,{placeholder:Object(a.__)("Load more posts","full-site-editing"),value:y,onChange:function(e){return i({moreButtonText:e})},className:"wp-block-button__link",keepPlaceholderOnFocus:!0,allowedFormats:[]}))),Object(s.createElement)(Y.BlockControls,null,Object(s.createElement)(l.Toolbar,{controls:A}),h&&Object(s.createElement)(l.Toolbar,{controls:T}),h&&Object(s.createElement)(l.Toolbar,{controls:I})),Object(s.createElement)(Y.InspectorControls,null,this.renderInspectorControls()))}}]),n}(s.Component),ne=Object(W.compose)([Object(Y.withColors)({textColor:"color"}),Object(D.withSelect)((function(e,t){var n=t.attributes,o=t.clientId,c=function(e){var t=e.postsToShow,n=e.authors,o=e.categories,c=e.tags,r=e.specificPosts,a=e.tagExclusions;return Object(A.pickBy)(F(e)?{include:r,orderby:"include",per_page:r.length}:{per_page:t,categories:o,author:n,tags:c,tags_exclude:a},(function(e){return!Object(A.isUndefined)(e)}))}(n);if(!F(n)){var r=e(L).previousPostIds(o);c.exclude=r.join(",")}return{latestPosts:e("core").getEntityRecords("postType","post",c)}})),Object(D.withDispatch)((function(e,t){var n=t.attributes;return{markPostsAsDisplayed:F(n)?e(L).markSpecificPostsAsDisplayed:e(L).markPostsAsDisplayed}}))])(te),oe=(n(35),n(36),H.name,H.attributes),ce=H.category,re={title:Object(a.__)("Homepage Posts","full-site-editing"),icon:Object(s.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(s.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(s.createElement)(l.Path,{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12zM10 9h8v2h-8zm0 3h4v2h-4zm0-6h8v2h-8z"})),attributes:oe,category:ce,keywords:[Object(a.__)("posts","full-site-editing"),Object(a.__)("articles","full-site-editing"),Object(a.__)("latest","full-site-editing")],description:Object(a.__)("A block for displaying homepage posts.","full-site-editing"),styles:[{name:"default",label:Object(a._x)("Default","block style","full-site-editing"),isDefault:!0},{name:"borders",label:Object(a._x)("Borders","block style","full-site-editing")}],supports:{html:!1,align:["wide","full"],default:""},edit:ne,save:function(){return null},transforms:{from:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.displayPostContent,n=e.displayPostDate,o=e.postLayout,c=e.columns,a=e.postsToShow,s=e.categories;return Object(r.createBlock)(Object(i.applyFilters)("blocks.transforms_from_name","newspack-blocks/homepage-articles"),{showExcerpt:t,showDate:n,postLayout:o,columns:c,postsToShow:a,showAuthor:!1,categories:s?[s]:[]})}}],to:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.showExcerpt,n=e.showDate,o=e.postLayout,c=e.columns,a=e.postsToShow,i=e.categories;return Object(r.createBlock)("core/latest-posts",{displayPostContent:t,displayPostDate:n,postLayout:o,columns:c,postsToShow:a,categories:i[0]||""})}}]}};Object(i.addFilter)("blocks.transforms_from_name","set-transformed-block-name",(function(e){return"newspack-blocks/homepage-articles"!==e?e:"a8c/blog-posts"})),Object(r.registerBlockType)("a8c/blog-posts",c()({},re,{title:Object(a.__)("Blog Posts","full-site-editing"),category:"layout"})),function(e){var t=function t(n){return n.flatMap((function(n){var o=[];return n.name===e&&o.push(n),o.concat(t(n.innerBlocks))}))};Object(D.registerStore)(L,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"UPDATE_BLOCKS":return c()({},e,{queryBlocks:t(n.blocks)});case"MARK_POSTS_DISPLAYED":return c()({},e,{postsByBlock:c()({},e.postsByBlock,v()({},n.clientId,n.posts))});case"MARK_SPECIFIC_POSTS_DISPLAYED":return c()({},e,{specificPostsByBlock:c()({},e.specificPostsByBlock,v()({},n.clientId,n.posts))})}return e},actions:R,selectors:V,initialState:N});var n,o=Object(D.select)("core/block-editor"),r=o.getClientIdsWithDescendants,a=o.getBlocks,i=Object(D.dispatch)(L).updateBlocks;Object(D.subscribe)((function(){var e=r(),t=e!==n;n=e,t&&i(a())}))}("a8c/blog-posts")}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=37)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){var o=n(3);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var o=n(25);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(26),i=n(27),r=n(28);e.exports=function(e){return function(){var t,n=o(e);if(i()){var c=o(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return r(this,t)}}},function(e){e.exports=JSON.parse('{"name":"homepage-articles","category":"newspack","attributes":{"className":{"type":"string","default":""},"showExcerpt":{"type":"boolean","default":true},"showDate":{"type":"boolean","default":true},"showImage":{"type":"boolean","default":true},"showCaption":{"type":"boolean","default":false},"imageShape":{"type":"string","default":"landscape"},"minHeight":{"type":"integer","default":0},"moreButton":{"type":"boolean","default":false},"moreButtonText":{"type":"string","default":""},"showAuthor":{"type":"boolean","default":true},"showAvatar":{"type":"boolean","default":true},"showCategory":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"integer","default":3},"postsToShow":{"type":"integer","default":3},"mediaPosition":{"type":"string","default":"top"},"authors":{"type":"array","default":[],"items":{"type":"integer"}},"categories":{"type":"array","default":[],"items":{"type":"integer"}},"tags":{"type":"array","default":[],"items":{"type":"integer"}},"tagExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"specificPosts":{"type":"array","default":[],"items":{"type":"integer"}},"typeScale":{"type":"integer","default":4},"imageScale":{"type":"integer","default":3},"mobileStack":{"type":"boolean","default":false},"sectionHeader":{"type":"string","default":""},"specificMode":{"type":"boolean","default":false},"textColor":{"type":"string","default":""},"customTextColor":{"type":"string","default":""},"singleMode":{"type":"boolean","default":false},"showSubtitle":{"type":"boolean","default":false}}}')},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(30),i=n(31),r=n(32),c=n(33);e.exports=function(e){return o(e)||i(e)||r(e)||c()}},function(e,t,n){var o;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var c=i.apply(null,o);c&&e.push(c)}else if("object"===r)for(var a in o)n.call(o,a)&&o[a]&&e.push(a)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(29),i=n(4);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var o=n(22);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,n){var o=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(9),i=n.n(o),r=n(16),c=n(1),a=n(17),l=n(0),s=n(2),u=n(12),f=n.n(u),p=n(18),d=n.n(p),g=n(4),h=n.n(g),b=n(13),m=n.n(b),O=n(14),y=n.n(O),j=n(3),v=n.n(j),_=n(23),w=n.n(_),S=n(6),E=n.n(S),k=n(7),C=n(5),P=n(19),x=n.n(P),A=n(11),T=(n(34),function(e){m()(n,e);var t=y()(n);function n(e){var o;return f()(this,n),o=t.call(this,e),v()(h()(o),"isFetchingInfoOnLoad",(function(){var e=o.props,t=e.tokens,n=e.fetchSavedInfo;return Boolean(t.length&&n)})),o.state={suggestions:[],validValues:{},loading:o.isFetchingInfoOnLoad()},o.debouncedUpdateSuggestions=Object(A.debounce)(o.updateSuggestions,500),o}return d()(n,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,n=t.tokens;(0,t.fetchSavedInfo)(n).then((function(t){var n=e.state.validValues;t.forEach((function(e){n[e.value]=e.label})),e.setState({validValues:n,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,n){return t[n]?[].concat(x()(e),[t[n]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(n){return t[n]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,n=this.props.fetchSuggestions;n&&this.setState({loading:!0},(function(){var o=n(e);o.then((function(e){if(t.suggestionsRequest===o){var n=t.state.validValues,i=[];e.forEach((function(e){i.push(e.label),n[e.value]=e.label})),t.setState({suggestions:i,validValues:n,loading:!1})}})).catch((function(){t.suggestionsRequest===o&&t.setState({loading:!1})})),t.suggestionsRequest=o}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.help,o=t.label,i=void 0===o?"":o,r=this.state,c=r.suggestions,a=r.loading;return Object(l.createElement)("div",{className:"autocomplete-tokenfield"},Object(l.createElement)(s.FormTokenField,{value:this.getTokens(),suggestions:c,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:i}),a&&Object(l.createElement)(s.Spinner,null),n&&Object(l.createElement)("p",{className:"autocomplete-tokenfield__help"},n))}}]),n}(l.Component)),I=function(e){m()(n,e);var t=y()(n);function n(){var e;f()(this,n);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return e=t.call.apply(t,[this].concat(i)),v()(h()(e),"state",{showAdvancedFilters:!1}),v()(h()(e),"fetchPostSuggestions",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,_fields:"id,title",type:"post"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"fetchSavedPosts",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/posts",{per_page:100,include:e.join(","),_fields:"id,title"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title.rendered)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"fetchAuthorSuggestions",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/users",{search:e,per_page:20,_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no name)","full-site-editing")}}))}))})),v()(h()(e),"fetchSavedAuthors",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/users",{per_page:100,include:e.join(","),_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no name)","full-site-editing")}}))}))})),v()(h()(e),"fetchCategorySuggestions",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"fetchSavedCategories",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"fetchTagSuggestions",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"fetchSavedTags",(function(e){return E()({path:Object(k.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(c.__)("(no title)","full-site-editing")}}))}))})),v()(h()(e),"render",(function(){var t=e.props,n=t.specificMode,o=t.onSpecificModeChange,i=t.specificPosts,r=t.onSpecificPostsChange,a=t.authors,u=t.onAuthorsChange,f=t.categories,p=t.onCategoriesChange,d=t.tags,g=t.onTagsChange,h=t.tagExclusions,b=t.onTagExclusionsChange,m=t.enableSpecific,O=e.state.showAdvancedFilters;return[m&&Object(l.createElement)(s.ToggleControl,{key:"specificMode",checked:n,onChange:o,label:Object(c.__)("Choose Specific Posts","full-site-editing")}),n&&Object(l.createElement)(T,{key:"posts",tokens:i||[],onChange:r,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:Object(c.__)("Posts","full-site-editing"),help:Object(c.__)("Begin typing post title, click autocomplete result to select.","full-site-editing")}),!n&&Object(l.createElement)(s.QueryControls,w()({key:"queryControls"},e.props)),!n&&u&&Object(l.createElement)(T,{key:"authors",tokens:a||[],onChange:u,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:Object(c.__)("Authors","full-site-editing")}),!n&&p&&Object(l.createElement)(T,{key:"categories",tokens:f||[],onChange:p,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:Object(c.__)("Categories","full-site-editing")}),!n&&g&&Object(l.createElement)(T,{key:"tags",tokens:d||[],onChange:g,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(c.__)("Tags","full-site-editing")}),!n&&b&&Object(l.createElement)("p",{key:"toggle-advanced-filters"},Object(l.createElement)(s.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!O})}},O?Object(c.__)("Hide Advanced Filters","full-site-editing"):Object(c.__)("Show Advanced Filters","full-site-editing"))),!n&&b&&O&&Object(l.createElement)(T,{key:"tag-exclusion",tokens:h||[],onChange:b,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(c.__)("Excluded Tags","full-site-editing")})]})),e}return n}(l.Component);I.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],tagExclusions:[]};var B,M=I,D=n(10),H=n(15),L=H.name,N={queryBlocks:[],postsByBlock:{},specificPostsByBlock:{}},R={updateBlocks:function(e){return{type:"UPDATE_BLOCKS",blocks:e}},markPostsAsDisplayed:function(e,t){return{type:"MARK_POSTS_DISPLAYED",clientId:e,posts:t}},markSpecificPostsAsDisplayed:function(e,t){return{type:"MARK_SPECIFIC_POSTS_DISPLAYED",clientId:e,posts:t}}},V={previousPostIds:function(e,t){var n,o,i,r=e.queryBlocks,c=e.specificPostsByBlock,a=e.postsByBlock,l=r.filter((function(e){var t=e.clientId;return c[t]})).flatMap((function(e){var t=e.clientId;return c[t].map((function(e){return e.id}))})),s=(n=r,o=t,i=n.findIndex((function(e){return e.clientId===o})),n.slice(0,i)).filter((function(e){var t=e.clientId;return a[t]})).flatMap((function(e){var t=e.clientId;return a[t].map((function(e){return e.id}))}));return Object(A.uniq)(l.concat(s)).sort()}},z=function(){return"object"==typeof window&&window.wpcomGutenberg&&-1===Number(window.wpcomGutenberg.blogPublic)},F=function(e){var t=e.specificMode,n=e.specificPosts;return t&&n&&n.length},q=function(e){return e.map((function(e){return Object(l.createElement)("span",{className:"avatar author-avatar",key:e.id},Object(l.createElement)("a",{className:"url fn n",href:e.author_link},Object(l.createElement)(l.RawHTML,null,e.avatar)))}))},G=function(e){return Object(l.createElement)("span",{className:"byline"},Object(c._x)("by","post author","full-site-editing")," ",e.reduce((function(t,n,o){return[].concat(x()(t),[Object(l.createElement)("span",{className:"author vcard",key:n.id},Object(l.createElement)("a",{className:"url fn n",href:n.author_link},n.display_name)),o<e.length-2&&", ",e.length>1&&o===e.length-2&&Object(c._x)(" and ","post author","full-site-editing")])}),[]))},Q=n(20),U=n.n(Q),K=n(21),Y=n(8),W=n(24);"object"==typeof window&&window.newspackIsPostSubtitleSupported&&window.newspackIsPostSubtitleSupported.post_subtitle&&(B=!0);var J=Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"})),X=Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"})),$=Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"})),Z=Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"})),ee=Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"})),te=function(e){m()(n,e);var t=y()(n);function n(){var e;f()(this,n);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return e=t.call.apply(t,[this].concat(i)),v()(h()(e),"renderPost",(function(t){var n=e.props.attributes,o=n.showImage,i=n.imageShape,r=n.mediaPosition,c=n.minHeight,a=n.showCaption,s=n.showExcerpt,u=n.showSubtitle,f=n.showAuthor,p=n.showAvatar,d=n.showDate,g=n.showCategory,h=n.sectionHeader,b={minHeight:"behind"===r&&o&&t.newspack_featured_image_src&&c+"vh",paddingTop:"behind"===r&&o&&t.newspack_featured_image_src&&c/5+"vh"},m=U()({"post-has-image":t.newspack_featured_image_src},t.newspack_article_classes),O=e.titleForPost(t),y=Object(K.__experimentalGetSettings)().formats.date;return Object(l.createElement)("article",{className:m,key:t.id,style:b},o&&t.newspack_featured_image_src&&Object(l.createElement)("figure",{className:"post-thumbnail",key:"thumbnail"},Object(l.createElement)("a",{href:"#"},"landscape"===i&&Object(l.createElement)("img",{src:t.newspack_featured_image_src.landscape,alt:""}),"portrait"===i&&Object(l.createElement)("img",{src:t.newspack_featured_image_src.portrait,alt:""}),"square"===i&&Object(l.createElement)("img",{src:t.newspack_featured_image_src.square,alt:""}),"uncropped"===i&&Object(l.createElement)("img",{src:t.newspack_featured_image_src.uncropped,alt:""})),a&&""!==t.newspack_featured_image_caption&&Object(l.createElement)("figcaption",null,t.newspack_featured_image_caption)),Object(l.createElement)("div",{className:"entry-wrapper"},g&&t.newspack_category_info.length&&Object(l.createElement)("div",{className:"cat-links"},Object(l.createElement)("a",{href:"#"},Object(C.decodeEntities)(t.newspack_category_info))),Y.RichText.isEmpty(h)?Object(l.createElement)("h2",{className:"entry-title",key:"title"},Object(l.createElement)("a",{href:"#"},O)):Object(l.createElement)("h3",{className:"entry-title",key:"title"},Object(l.createElement)("a",{href:"#"},O)),B&&u&&Object(l.createElement)(l.RawHTML,{key:"subtitle",className:"newspack-post-subtitle newspack-post-subtitle--in-homepage-block"},t.meta.newspack_post_subtitle||""),s&&Object(l.createElement)(l.RawHTML,{key:"excerpt",className:"excerpt-contain"},t.excerpt.rendered),Object(l.createElement)("div",{className:"entry-meta"},f&&p&&q(t.newspack_author_info),f&&G(t.newspack_author_info),d&&Object(l.createElement)("time",{className:"entry-date published",key:"pub-date"},Object(K.dateI18n)(y,t.date_gmt)))))})),v()(h()(e),"titleForPost",(function(e){return e.title?"string"==typeof e.title?Object(C.decodeEntities)(e.title.trim()):"object"==typeof e.title&&e.title.rendered?Object(C.decodeEntities)(e.title.rendered.trim()):void 0:""})),v()(h()(e),"renderInspectorControls",(function(){var t=e.props,n=t.attributes,o=t.setAttributes,i=t.textColor,r=t.setTextColor,a=n.authors,u=n.specificPosts,f=n.postsToShow,p=n.categories,d=n.columns,g=n.showImage,h=n.showCaption,b=n.imageScale,m=n.mobileStack,O=n.minHeight,y=n.moreButton,j=n.showExcerpt,v=n.showSubtitle,_=n.typeScale,w=n.showDate,S=n.showAuthor,E=n.showAvatar,k=n.showCategory,C=n.postLayout,P=n.mediaPosition,x=n.specificMode,A=n.tags,T=n.tagExclusions,I=[{value:1,label:Object(c.__)("Small","full-site-editing"),shortName:Object(c.__)("S","full-site-editing")},{value:2,label:Object(c.__)("Medium","full-site-editing"),shortName:Object(c.__)("M","full-site-editing")},{value:3,label:Object(c.__)("Large","full-site-editing"),shortName:Object(c.__)("L","full-site-editing")},{value:4,label:Object(c.__)("Extra Large","full-site-editing"),shortName:Object(c.__)("XL","full-site-editing")}];return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(s.PanelBody,{title:Object(c.__)("Display Settings","full-site-editing"),initialOpen:!0},f&&Object(l.createElement)(M,{numberOfItems:f,onNumberOfItemsChange:function(e){return o({postsToShow:e})},specificMode:x,onSpecificModeChange:function(e){return o({specificMode:e})},specificPosts:u,onSpecificPostsChange:function(e){return o({specificPosts:e})},authors:a,onAuthorsChange:function(e){return o({authors:e})},categories:p,onCategoriesChange:function(e){return o({categories:e})},tags:A,onTagsChange:function(e){o({tags:e})},tagExclusions:T,onTagExclusionsChange:function(e){return o({tagExclusions:e})}}),"grid"===C&&Object(l.createElement)(s.RangeControl,{label:Object(c.__)("Columns","full-site-editing"),value:d,onChange:function(e){return o({columns:e})},min:2,max:6,required:!0}),!x&&!z()&&Object(l.createElement)(s.ToggleControl,{label:Object(c.__)('Show "More" Button',"full-site-editing"),checked:y,onChange:function(){return o({moreButton:!y})}})),Object(l.createElement)(s.PanelBody,{title:Object(c.__)("Featured Image Settings","full-site-editing")},Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Featured Image","full-site-editing"),checked:g,onChange:function(){return o({showImage:!g})}})),g&&Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Featured Image Caption","full-site-editing"),checked:h,onChange:function(){return o({showCaption:!h})}})),g&&"top"!==P&&"behind"!==P&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Stack on mobile","full-site-editing"),checked:m,onChange:function(){return o({mobileStack:!m})}})),Object(l.createElement)(s.BaseControl,{label:Object(c.__)("Featured Image Size","full-site-editing"),id:"newspackfeatured-image-size"},Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ButtonGroup,{id:"newspackfeatured-image-size","aria-label":Object(c.__)("Featured Image Size","full-site-editing")},I.map((function(e){var t=b===e.value;return Object(l.createElement)(s.Button,{isLarge:!0,isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return o({imageScale:e.value})}},e.shortName)})))))),g&&"behind"===P&&Object(l.createElement)(s.RangeControl,{label:Object(c.__)("Minimum height","full-site-editing"),help:Object(c.__)("Sets a minimum height for the block, using a percentage of the screen's current height.","full-site-editing"),value:O,onChange:function(e){return o({minHeight:e})},min:0,max:100,required:!0})),Object(l.createElement)(s.PanelBody,{title:Object(c.__)("Post Control Settings","full-site-editing")},B&&Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Subtitle","full-site-editing"),checked:v,onChange:function(){return o({showSubtitle:!v})}})),Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Excerpt","full-site-editing"),checked:j,onChange:function(){return o({showExcerpt:!j})}})),Object(l.createElement)(s.RangeControl,{className:"type-scale-slider",label:Object(c.__)("Type Scale","full-site-editing"),value:_,onChange:function(e){return o({typeScale:e})},min:1,max:10,beforeIcon:"editor-textcolor",afterIcon:"editor-textcolor",required:!0})),Object(l.createElement)(Y.PanelColorSettings,{title:Object(c.__)("Color Settings","full-site-editing"),initialOpen:!0,colorSettings:[{value:i.color,onChange:r,label:Object(c.__)("Text Color","full-site-editing")}]}),Object(l.createElement)(s.PanelBody,{title:Object(c.__)("Post Meta Settings","full-site-editing")},Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Date","full-site-editing"),checked:w,onChange:function(){return o({showDate:!w})}})),Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Category","full-site-editing"),checked:k,onChange:function(){return o({showCategory:!k})}})),Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Author","full-site-editing"),checked:S,onChange:function(){return o({showAuthor:!S})}})),S&&Object(l.createElement)(s.PanelRow,null,Object(l.createElement)(s.ToggleControl,{label:Object(c.__)("Show Author Avatar","full-site-editing"),checked:E,onChange:function(){return o({showAvatar:!E})}}))))})),e}return d()(n,[{key:"render",value:function(){var e,t=this,n=this.props,o=n.attributes,i=n.className,r=n.clientId,a=n.setAttributes,u=n.isSelected,f=n.latestPosts,p=n.textColor,d=n.markPostsAsDisplayed,g=o.showImage,h=o.imageShape,b=o.postLayout,m=o.mediaPosition,O=o.moreButton,y=o.moreButtonText,j=o.columns,_=o.typeScale,w=o.imageScale,S=o.mobileStack,E=o.sectionHeader,k=o.showCaption,C=o.showCategory,P=o.specificMode,x=U()(i,(e={"is-grid":"grid"===b,"show-image":g},v()(e,"columns-".concat(j),"grid"===b),v()(e,"ts-".concat(_),"5"!==_),v()(e,"image-align".concat(m),g),v()(e,"is-".concat(w),"1"!==w&&g),v()(e,"mobile-stack",S),v()(e,"is-".concat(h),g),v()(e,"has-text-color",""!==p.color),v()(e,"show-caption",k),v()(e,"show-category",C),v()(e,"wpnbha",!0),e)),A=[{icon:"list-view",title:Object(c.__)("List View","full-site-editing"),onClick:function(){return a({postLayout:"list"})},isActive:"list"===b},{icon:"grid-view",title:Object(c.__)("Grid View","full-site-editing"),onClick:function(){return a({postLayout:"grid"})},isActive:"grid"===b}],T=[{icon:"align-none",title:Object(c.__)("Show media on top","full-site-editing"),isActive:"top"===m,onClick:function(){return a({mediaPosition:"top"})}},{icon:"align-pull-left",title:Object(c.__)("Show media on left","full-site-editing"),isActive:"left"===m,onClick:function(){return a({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(c.__)("Show media on right","full-site-editing"),isActive:"right"===m,onClick:function(){return a({mediaPosition:"right"})}},{icon:ee,title:Object(c.__)("Show media behind","full-site-editing"),isActive:"behind"===m,onClick:function(){return a({mediaPosition:"behind"})}}],I=[{icon:J,title:Object(c.__)("Landscape Image Shape","full-site-editing"),isActive:"landscape"===h,onClick:function(){return a({imageShape:"landscape"})}},{icon:X,title:Object(c.__)("portrait Image Shape","full-site-editing"),isActive:"portrait"===h,onClick:function(){return a({imageShape:"portrait"})}},{icon:$,title:Object(c.__)("Square Image Shape","full-site-editing"),isActive:"square"===h,onClick:function(){return a({imageShape:"square"})}},{icon:Z,title:Object(c.__)("Uncropped","full-site-editing"),isActive:"uncropped"===h,onClick:function(){return a({imageShape:"uncropped"})}}];return d(r,f),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:x,style:{color:p.color}},Object(l.createElement)("div",null,f&&(!Y.RichText.isEmpty(E)||u)&&Object(l.createElement)(Y.RichText,{onChange:function(e){return a({sectionHeader:e})},placeholder:Object(c.__)("Write header…","full-site-editing"),value:E,tagName:"h2",className:"article-section-title"}),f&&!f.length&&Object(l.createElement)(s.Placeholder,null,Object(c.__)("Sorry, no posts were found.","full-site-editing")),!f&&Object(l.createElement)(s.Placeholder,{icon:Object(l.createElement)(s.Spinner,null),className:"component-placeholder__align-center"}),f&&f.map((function(e){return t.renderPost(e)})))),!P&&f&&O&&!z()&&Object(l.createElement)("div",{className:"editor-styles-wrapper wpnbha__wp-block-button__wrapper"},Object(l.createElement)("div",{className:"wp-block-button"},Object(l.createElement)(Y.RichText,{placeholder:Object(c.__)("Load more posts","full-site-editing"),value:y,onChange:function(e){return a({moreButtonText:e})},className:"wp-block-button__link",keepPlaceholderOnFocus:!0,allowedFormats:[]}))),Object(l.createElement)(Y.BlockControls,null,Object(l.createElement)(s.Toolbar,{controls:A}),g&&Object(l.createElement)(s.Toolbar,{controls:T}),g&&Object(l.createElement)(s.Toolbar,{controls:I})),Object(l.createElement)(Y.InspectorControls,null,this.renderInspectorControls()))}}]),n}(l.Component),ne=Object(W.compose)([Object(Y.withColors)({textColor:"color"}),Object(D.withSelect)((function(e,t){var n=t.attributes,o=t.clientId,i=function(e){var t=e.postsToShow,n=e.authors,o=e.categories,i=e.tags,r=e.specificPosts,c=e.tagExclusions;return Object(A.pickBy)(F(e)?{include:r,orderby:"include",per_page:r.length}:{per_page:t,categories:o,author:n,tags:i,tags_exclude:c},(function(e){return!Object(A.isUndefined)(e)}))}(n);if(!F(n)){var r=e(L).previousPostIds(o);i.exclude=r.join(",")}return{latestPosts:e("core").getEntityRecords("postType","post",i)}})),Object(D.withDispatch)((function(e,t){var n=t.attributes;return{markPostsAsDisplayed:F(n)?e(L).markSpecificPostsAsDisplayed:e(L).markPostsAsDisplayed}}))])(te),oe=(n(35),n(36),H.name,H.attributes),ie=H.category,re={title:Object(c.__)("Homepage Posts","full-site-editing"),icon:Object(l.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(l.createElement)(s.Path,{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12zM10 9h8v2h-8zm0 3h4v2h-4zm0-6h8v2h-8z"})),attributes:oe,category:ie,keywords:[Object(c.__)("posts","full-site-editing"),Object(c.__)("articles","full-site-editing"),Object(c.__)("latest","full-site-editing")],description:Object(c.__)("A block for displaying homepage posts.","full-site-editing"),styles:[{name:"default",label:Object(c._x)("Default","block style","full-site-editing"),isDefault:!0},{name:"borders",label:Object(c._x)("Borders","block style","full-site-editing")}],supports:{html:!1,align:["wide","full"],default:""},edit:ne,save:function(){return null},transforms:{from:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.displayPostContent,n=e.displayPostDate,o=e.postLayout,i=e.columns,c=e.postsToShow,l=e.categories;return Object(r.createBlock)(Object(a.applyFilters)("blocks.transforms_from_name","newspack-blocks/homepage-articles"),{showExcerpt:t,showDate:n,postLayout:o,columns:i,postsToShow:c,showAuthor:!1,categories:l?[l]:[]})}}],to:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.showExcerpt,n=e.showDate,o=e.postLayout,i=e.columns,c=e.postsToShow,a=e.categories;return Object(r.createBlock)("core/latest-posts",{displayPostContent:t,displayPostDate:n,postLayout:o,columns:i,postsToShow:c,categories:a[0]||""})}}]}};Object(a.addFilter)("blocks.transforms_from_name","set-transformed-block-name",(function(e){return"newspack-blocks/homepage-articles"!==e?e:"a8c/blog-posts"})),Object(r.registerBlockType)("a8c/blog-posts",i()({},re,{title:Object(c.__)("Blog Posts","full-site-editing"),category:"layout"})),function(e){var t=function t(n){return n.flatMap((function(n){var o=[];return n.name===e&&o.push(n),o.concat(t(n.innerBlocks))}))};Object(D.registerStore)(L,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"UPDATE_BLOCKS":return i()({},e,{queryBlocks:t(n.blocks)});case"MARK_POSTS_DISPLAYED":return i()({},e,{postsByBlock:i()({},e.postsByBlock,v()({},n.clientId,n.posts))});case"MARK_SPECIFIC_POSTS_DISPLAYED":return i()({},e,{specificPostsByBlock:i()({},e.specificPostsByBlock,v()({},n.clientId,n.posts))})}return e},actions:R,selectors:V,initialState:N});var n,o=Object(D.select)("core/block-editor"),r=o.getClientIdsWithDescendants,c=o.getBlocks,a=Object(D.dispatch)(L).updateBlocks;Object(D.subscribe)((function(){var e=r(),t=e!==n;n=e,t&&a(c())}))}("a8c/blog-posts")}]));
newspack-blocks/dist/blog-posts-block-view.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '85e9f87a55ddf1d8ef398736758935c1');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'a128e210aa21bc891c2e13c3024d5dfb');
newspack-blocks/dist/carousel-block-editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '06528137c67aa6851d7fb649c70f681d');
1
+ <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4a4f8cba2854311ecc303daf7844492f');
newspack-blocks/dist/carousel-block-editor.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var s={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var n=typeof i;if("string"===n||"number"===n)e.push(i);else if(Array.isArray(i)&&i.length){var r=a.apply(null,i);r&&e.push(r)}else if("object"===n)for(var o in i)s.call(i,o)&&i[o]&&e.push(o)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(i=function(){return a}.apply(t,[]))||(e.exports=i)}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function s(){return e.exports=s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},s.apply(this,arguments)}e.exports=s},function(e,t){!function(){e.exports=this.wp.escapeHtml}()},function(e,t){function s(t,i){return e.exports=s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(t,i)}e.exports=s},function(e,t){function s(t){return e.exports=s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(t)}e.exports=s},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,s){var i=s(30),a=s(4);e.exports=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?a(e):t}},function(e,t){function s(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=s=function(e){return typeof e}:e.exports=s=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(t)}e.exports=s},function(e,t,s){var i=s(16);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,s){var i=s(16);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(s):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?i(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,s){},function(e,t,s){},function(e,t,s){},function(e,t,s){},function(e,t,s){"use strict";s.r(t);var i=s(17),a=s.n(i),n=s(18),r=s(19),o=s(0),l=s(2),d=s(1),c=s(8),p=s.n(c),u=s(12),h=s.n(u),m=s(9),f=s.n(m),g=s(10),v=s.n(g),b=s(11),w=s(20),y=s.n(w),x=s(15),E=s(21),S=s(22),T=s(23),C=s(5),k=s(24),$=s.n(k),M=s(4),P=s.n(M),O=s(3),z=s.n(O),I=s(6),L=s.n(I),j=s(7),D=s(13),A=s.n(D),_=(s(35),function(e){f()(s,e);var t=v()(s);function s(e){var i;return p()(this,s),i=t.call(this,e),z()(P()(i),"isFetchingInfoOnLoad",(function(){var e=i.props,t=e.tokens,s=e.fetchSavedInfo;return Boolean(t.length&&s)})),i.state={suggestions:[],validValues:{},loading:i.isFetchingInfoOnLoad()},i.debouncedUpdateSuggestions=Object(b.debounce)(i.updateSuggestions,500),i}return h()(s,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,s=t.tokens;(0,t.fetchSavedInfo)(s).then((function(t){var s=e.state.validValues;t.forEach((function(e){s[e.value]=e.label})),e.setState({validValues:s,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,s){return t[s]?[].concat(A()(e),[t[s]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(s){return t[s]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,s=this.props.fetchSuggestions;s&&this.setState({loading:!0},(function(){var i=s(e);i.then((function(e){if(t.suggestionsRequest===i){var s=t.state.validValues,a=[];e.forEach((function(e){a.push(e.label),s[e.value]=e.label})),t.setState({suggestions:a,validValues:s,loading:!1})}})).catch((function(){t.suggestionsRequest===i&&t.setState({loading:!1})})),t.suggestionsRequest=i}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,s=t.help,i=t.label,a=void 0===i?"":i,n=this.state,r=n.suggestions,d=n.loading;return Object(o.createElement)("div",{className:"autocomplete-tokenfield"},Object(o.createElement)(l.FormTokenField,{value:this.getTokens(),suggestions:r,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:a}),d&&Object(o.createElement)(l.Spinner,null),s&&Object(o.createElement)("p",{className:"autocomplete-tokenfield__help"},s))}}]),s}(o.Component)),N=function(e){f()(s,e);var t=v()(s);function s(){var e;p()(this,s);for(var i=arguments.length,a=new Array(i),n=0;n<i;n++)a[n]=arguments[n];return e=t.call.apply(t,[this].concat(a)),z()(P()(e),"state",{showAdvancedFilters:!1}),z()(P()(e),"fetchPostSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,_fields:"id,title",type:"post"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"fetchSavedPosts",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/posts",{per_page:100,include:e.join(","),_fields:"id,title"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title.rendered)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"fetchAuthorSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/users",{search:e,per_page:20,_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no name)","newspack-blocks")}}))}))})),z()(P()(e),"fetchSavedAuthors",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/users",{per_page:100,include:e.join(","),_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no name)","newspack-blocks")}}))}))})),z()(P()(e),"fetchCategorySuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"fetchSavedCategories",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"fetchTagSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"fetchSavedTags",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","newspack-blocks")}}))}))})),z()(P()(e),"render",(function(){var t=e.props,s=t.specificMode,i=t.onSpecificModeChange,a=t.specificPosts,n=t.onSpecificPostsChange,r=t.authors,c=t.onAuthorsChange,p=t.categories,u=t.onCategoriesChange,h=t.tags,m=t.onTagsChange,f=t.tagExclusions,g=t.onTagExclusionsChange,v=t.enableSpecific,b=e.state.showAdvancedFilters;return[v&&Object(o.createElement)(l.ToggleControl,{key:"specificMode",checked:s,onChange:i,label:Object(d.__)("Choose Specific Posts","newspack-blocks")}),s&&Object(o.createElement)(_,{key:"posts",tokens:a||[],onChange:n,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:Object(d.__)("Posts","newspack-blocks"),help:Object(d.__)("Begin typing post title, click autocomplete result to select.","newspack-blocks")}),!s&&Object(o.createElement)(l.QueryControls,$()({key:"queryControls"},e.props)),!s&&c&&Object(o.createElement)(_,{key:"authors",tokens:r||[],onChange:c,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:Object(d.__)("Authors","newspack-blocks")}),!s&&u&&Object(o.createElement)(_,{key:"categories",tokens:p||[],onChange:u,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:Object(d.__)("Categories","newspack-blocks")}),!s&&m&&Object(o.createElement)(_,{key:"tags",tokens:h||[],onChange:m,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(d.__)("Tags","newspack-blocks")}),!s&&g&&Object(o.createElement)("p",{key:"toggle-advanced-filters"},Object(o.createElement)(l.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!b})}},b?Object(d.__)("Hide Advanced Filters","newspack-blocks"):Object(d.__)("Show Advanced Filters","newspack-blocks"))),!s&&g&&b&&Object(o.createElement)(_,{key:"tag-exclusion",tokens:f||[],onChange:g,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(d.__)("Excluded Tags","newspack-blocks")})]})),e}return s}(o.Component);N.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],tagExclusions:[]};var H=N,B=s(14),V=s(25),G="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,R="undefined"==typeof window?{document:G,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window;class X{constructor(e){const t=this;for(let s=0;s<e.length;s+=1)t[s]=e[s];return t.length=e.length,this}}function Y(e,t){const s=[];let i=0;if(e&&!t&&e instanceof X)return e;if(e)if("string"==typeof e){let a,n;const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";for(0===r.indexOf("<li")&&(e="ul"),0===r.indexOf("<tr")&&(e="tbody"),0!==r.indexOf("<td")&&0!==r.indexOf("<th")||(e="tr"),0===r.indexOf("<tbody")&&(e="table"),0===r.indexOf("<option")&&(e="select"),n=G.createElement(e),n.innerHTML=r,i=0;i<n.childNodes.length;i+=1)s.push(n.childNodes[i])}else for(a=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||G).querySelectorAll(e.trim()):[G.getElementById(e.trim().split("#")[1])],i=0;i<a.length;i+=1)a[i]&&s.push(a[i])}else if(e.nodeType||e===R||e===G)s.push(e);else if(e.length>0&&e[0].nodeType)for(i=0;i<e.length;i+=1)s.push(e[i]);return new X(s)}function F(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}Y.fn=X.prototype,Y.Class=X,Y.Dom7=X;"resize scroll".split(" ");const q={addClass:function(e){if(void 0===e)return this;const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.add(t[s]);return this},removeClass:function(e){const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.remove(t[s]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.toggle(t[s]);return this},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){let s;if(void 0!==t){for(let i=0;i<this.length;i+=1)s=this[i],s.dom7ElementDataStorage||(s.dom7ElementDataStorage={}),s.dom7ElementDataStorage[e]=t;return this}if(s=this[0],s){if(s.dom7ElementDataStorage&&e in s.dom7ElementDataStorage)return s.dom7ElementDataStorage[e];const t=s.getAttribute("data-"+e);return t||void 0}},transform:function(e){for(let t=0;t<this.length;t+=1){const s=this[t].style;s.webkitTransform=e,s.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(let t=0;t<this.length;t+=1){const s=this[t].style;s.webkitTransitionDuration=e,s.transitionDuration=e}return this},on:function(...e){let[t,s,i,a]=e;function n(e){const t=e.target;if(!t)return;const a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),Y(t).is(s))i.apply(t,a);else{const e=Y(t).parents();for(let t=0;t<e.length;t+=1)Y(e[t]).is(s)&&i.apply(e[t],a)}}function r(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),i.apply(this,t)}"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const o=t.split(" ");let l;for(let d=0;d<this.length;d+=1){const e=this[d];if(s)for(l=0;l<o.length;l+=1){const t=o[l];e.dom7LiveListeners||(e.dom7LiveListeners={}),e.dom7LiveListeners[t]||(e.dom7LiveListeners[t]=[]),e.dom7LiveListeners[t].push({listener:i,proxyListener:n}),e.addEventListener(t,n,a)}else for(l=0;l<o.length;l+=1){const t=o[l];e.dom7Listeners||(e.dom7Listeners={}),e.dom7Listeners[t]||(e.dom7Listeners[t]=[]),e.dom7Listeners[t].push({listener:i,proxyListener:r}),e.addEventListener(t,r,a)}}return this},off:function(...e){let[t,s,i,a]=e;"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const n=t.split(" ");for(let r=0;r<n.length;r+=1){const e=n[r];for(let t=0;t<this.length;t+=1){const n=this[t];let r;if(!s&&n.dom7Listeners?r=n.dom7Listeners[e]:s&&n.dom7LiveListeners&&(r=n.dom7LiveListeners[e]),r&&r.length)for(let t=r.length-1;t>=0;t-=1){const s=r[t];i&&s.listener===i||i&&s.listener&&s.listener.dom7proxy&&s.listener.dom7proxy===i?(n.removeEventListener(e,s.proxyListener,a),r.splice(t,1)):i||(n.removeEventListener(e,s.proxyListener,a),r.splice(t,1))}}}return this},trigger:function(...e){const t=e[0].split(" "),s=e[1];for(let a=0;a<t.length;a+=1){const n=t[a];for(let t=0;t<this.length;t+=1){const a=this[t];let r;try{r=new R.CustomEvent(n,{detail:s,bubbles:!0,cancelable:!0})}catch(i){r=G.createEvent("Event"),r.initEvent(n,!0,!0),r.detail=s}a.dom7EventData=e.filter((e,t)=>t>0),a.dispatchEvent(r),a.dom7EventData=[],delete a.dom7EventData}}return this},transitionEnd:function(e){const t=["webkitTransitionEnd","transitionend"],s=this;let i;function a(n){if(n.target===this)for(e.call(this,n),i=0;i<t.length;i+=1)s.off(t[i],a)}if(e)for(i=0;i<t.length;i+=1)s.on(t[i],a);return this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){const e=this[0],t=e.getBoundingClientRect(),s=G.body,i=e.clientTop||s.clientTop||0,a=e.clientLeft||s.clientLeft||0,n=e===R?R.scrollY:e.scrollTop,r=e===R?R.scrollX:e.scrollLeft;return{top:t.top+n-i,left:t.left+r-a}}return null},css:function(e,t){let s;if(1===arguments.length){if("string"!=typeof e){for(s=0;s<this.length;s+=1)for(let t in e)this[s].style[t]=e[t];return this}if(this[0])return R.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(s=0;s<this.length;s+=1)this[s].style[e]=t;return this}return this},each:function(e){if(!e)return this;for(let t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=this[0];let s,i;if(!t||void 0===e)return!1;if("string"==typeof e){if(t.matches)return t.matches(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);for(s=Y(e),i=0;i<s.length;i+=1)if(s[i]===t)return!0;return!1}if(e===G)return t===G;if(e===R)return t===R;if(e.nodeType||e instanceof X){for(s=e.nodeType?[e]:e,i=0;i<s.length;i+=1)if(s[i]===t)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;let s;return e>t-1?new X([]):e<0?(s=t+e,new X(s<0?[]:[this[s]])):new X([this[e]])},append:function(...e){let t;for(let s=0;s<e.length;s+=1){t=e[s];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const s=G.createElement("div");for(s.innerHTML=t;s.firstChild;)this[e].appendChild(s.firstChild)}else if(t instanceof X)for(let s=0;s<t.length;s+=1)this[e].appendChild(t[s]);else this[e].appendChild(t)}return this},prepend:function(e){let t,s;for(t=0;t<this.length;t+=1)if("string"==typeof e){const i=G.createElement("div");for(i.innerHTML=e,s=i.childNodes.length-1;s>=0;s-=1)this[t].insertBefore(i.childNodes[s],this[t].childNodes[0])}else if(e instanceof X)for(s=0;s<e.length;s+=1)this[t].insertBefore(e[s],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&Y(this[0].nextElementSibling).is(e)?new X([this[0].nextElementSibling]):new X([]):this[0].nextElementSibling?new X([this[0].nextElementSibling]):new X([]):new X([])},nextAll:function(e){const t=[];let s=this[0];if(!s)return new X([]);for(;s.nextElementSibling;){const i=s.nextElementSibling;e?Y(i).is(e)&&t.push(i):t.push(i),s=i}return new X(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&Y(t.previousElementSibling).is(e)?new X([t.previousElementSibling]):new X([]):t.previousElementSibling?new X([t.previousElementSibling]):new X([])}return new X([])},prevAll:function(e){const t=[];let s=this[0];if(!s)return new X([]);for(;s.previousElementSibling;){const i=s.previousElementSibling;e?Y(i).is(e)&&t.push(i):t.push(i),s=i}return new X(t)},parent:function(e){const t=[];for(let s=0;s<this.length;s+=1)null!==this[s].parentNode&&(e?Y(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode));return Y(F(t))},parents:function(e){const t=[];for(let s=0;s<this.length;s+=1){let i=this[s].parentNode;for(;i;)e?Y(i).is(e)&&t.push(i):t.push(i),i=i.parentNode}return Y(F(t))},closest:function(e){let t=this;return void 0===e?new X([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].querySelectorAll(e);for(let e=0;e<i.length;e+=1)t.push(i[e])}return new X(t)},children:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].childNodes;for(let s=0;s<i.length;s+=1)e?1===i[s].nodeType&&Y(i[s]).is(e)&&t.push(i[s]):1===i[s].nodeType&&t.push(i[s])}return new X(F(t))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(...e){const t=this;let s,i;for(s=0;s<e.length;s+=1){const a=Y(e[s]);for(i=0;i<a.length;i+=1)t[t.length]=a[i],t.length+=1}return t},styles:function(){return this[0]?R.getComputedStyle(this[0],null):{}}};Object.keys(q).forEach(e=>{Y.fn[e]=Y.fn[e]||q[e]});const W={deleteProps(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(s){}try{delete t[e]}catch(s){}})},nextTick:(e,t=0)=>setTimeout(e,t),now:()=>Date.now(),getTranslate(e,t="x"){let s,i,a;const n=R.getComputedStyle(e,null);return R.WebKitCSSMatrix?(i=n.transform||n.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new R.WebKitCSSMatrix("none"===i?"":i)):(a=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),s=a.toString().split(",")),"x"===t&&(i=R.WebKitCSSMatrix?a.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(i=R.WebKitCSSMatrix?a.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),i||0},parseUrlQuery(e){const t={};let s,i,a,n,r=e||R.location.href;if("string"==typeof r&&r.length)for(r=r.indexOf("?")>-1?r.replace(/\S*\?/,""):"",i=r.split("&").filter(e=>""!==e),n=i.length,s=0;s<n;s+=1)a=i[s].replace(/#\S+/g,"").split("="),t[decodeURIComponent(a[0])]=void 0===a[1]?void 0:decodeURIComponent(a[1])||"";return t},isObject:e=>"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object,extend(...e){const t=Object(e[0]);for(let s=1;s<e.length;s+=1){const i=e[s];if(null!=i){const e=Object.keys(Object(i));for(let s=0,a=e.length;s<a;s+=1){const a=e[s],n=Object.getOwnPropertyDescriptor(i,a);void 0!==n&&n.enumerable&&(W.isObject(t[a])&&W.isObject(i[a])?W.extend(t[a],i[a]):!W.isObject(t[a])&&W.isObject(i[a])?(t[a]={},W.extend(t[a],i[a])):t[a]=i[a])}}}return t}},U=function(){const e=G.createElement("div");return{touch:R.Modernizr&&!0===R.Modernizr.touch||!!(R.navigator.maxTouchPoints>0||"ontouchstart"in R||R.DocumentTouch&&G instanceof R.DocumentTouch),pointerEvents:!!(R.navigator.pointerEnabled||R.PointerEvent||"maxTouchPoints"in R.navigator&&R.navigator.maxTouchPoints>0),prefixedPointerEvents:!!R.navigator.msPointerEnabled,transition:function(){const t=e.style;return"transition"in t||"webkitTransition"in t||"MozTransition"in t}(),transforms3d:R.Modernizr&&!0===R.Modernizr.csstransforms3d||function(){const t=e.style;return"webkitPerspective"in t||"MozPerspective"in t||"OPerspective"in t||"MsPerspective"in t||"perspective"in t}(),flexbox:function(){const t=e.style,s="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" ");for(let e=0;e<s.length;e+=1)if(s[e]in t)return!0;return!1}(),observer:"MutationObserver"in R||"WebkitMutationObserver"in R,passiveListener:function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get(){e=!0}});R.addEventListener("testPassiveListener",null,t)}catch(t){}return e}(),gestures:"ongesturestart"in R}}(),K={isIE:!!R.navigator.userAgent.match(/Trident/g)||!!R.navigator.userAgent.match(/MSIE/g),isEdge:!!R.navigator.userAgent.match(/Edge/g),isSafari:function(){const e=R.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(R.navigator.userAgent)};class Q{constructor(e={}){const t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(e=>{t.on(e,t.params.on[e])})}on(e,t,s){const i=this;if("function"!=typeof t)return i;const a=s?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)}),i}once(e,t,s){const i=this;if("function"!=typeof t)return i;function a(...s){t.apply(i,s),i.off(e,a),a.f7proxy&&delete a.f7proxy}return a.f7proxy=t,i.on(e,a,s)}off(e,t){const s=this;return s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].length&&s.eventsListeners[e].forEach((i,a)=>{(i===t||i.f7proxy&&i.f7proxy===t)&&s.eventsListeners[e].splice(a,1)})}),s):s}emit(...e){const t=this;if(!t.eventsListeners)return t;let s,i,a;return"string"==typeof e[0]||Array.isArray(e[0])?(s=e[0],i=e.slice(1,e.length),a=t):(s=e[0].events,i=e[0].data,a=e[0].context||t),(Array.isArray(s)?s:s.split(" ")).forEach(e=>{if(t.eventsListeners&&t.eventsListeners[e]){const s=[];t.eventsListeners[e].forEach(e=>{s.push(e)}),s.forEach(e=>{e.apply(a,i)})}}),t}useModulesParams(e){const t=this;t.modules&&Object.keys(t.modules).forEach(s=>{const i=t.modules[s];i.params&&W.extend(e,i.params)})}useModules(e={}){const t=this;t.modules&&Object.keys(t.modules).forEach(s=>{const i=t.modules[s],a=e[s]||{};i.instance&&Object.keys(i.instance).forEach(e=>{const s=i.instance[e];t[e]="function"==typeof s?s.bind(t):s}),i.on&&t.on&&Object.keys(i.on).forEach(e=>{t.on(e,i.on[e])}),i.create&&i.create.bind(t)(a)})}static set components(e){this.use&&this.use(e)}static installModule(e,...t){const s=this;s.prototype.modules||(s.prototype.modules={});const i=e.name||`${Object.keys(s.prototype.modules).length}_${W.now()}`;return s.prototype.modules[i]=e,e.proto&&Object.keys(e.proto).forEach(t=>{s.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(t=>{s[t]=e.static[t]}),e.install&&e.install.apply(s,t),s}static use(e,...t){const s=this;return Array.isArray(e)?(e.forEach(e=>s.installModule(e)),s):s.installModule(e,...t)}}var Z={updateSize:function(){const e=this;let t,s;const i=e.$el;t=void 0!==e.params.width?e.params.width:i[0].clientWidth,s=void 0!==e.params.height?e.params.height:i[0].clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),s=s-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),W.extend(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this,t=e.params,{$wrapperEl:s,size:i,rtlTranslate:a,wrongRTL:n}=e,r=e.virtual&&t.virtual.enabled,o=r?e.virtual.slides.length:e.slides.length,l=s.children("."+e.params.slideClass),d=r?e.virtual.slides.length:l.length;let c=[];const p=[],u=[];let h=t.slidesOffsetBefore;"function"==typeof h&&(h=t.slidesOffsetBefore.call(e));let m=t.slidesOffsetAfter;"function"==typeof m&&(m=t.slidesOffsetAfter.call(e));const f=e.snapGrid.length,g=e.snapGrid.length;let v,b,w=t.spaceBetween,y=-h,x=0,E=0;if(void 0===i)return;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*i),e.virtualSize=-w,a?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(v=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(v=Math.max(v,t.slidesPerView*t.slidesPerColumn)));const S=t.slidesPerColumn,T=v/S,C=Math.floor(d/t.slidesPerColumn);for(let $=0;$<d;$+=1){b=0;const s=l.eq($);if(t.slidesPerColumn>1){let i,a,n;if("column"===t.slidesPerColumnFill||"row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){if("column"===t.slidesPerColumnFill)a=Math.floor($/S),n=$-a*S,(a>C||a===C&&n===S-1)&&(n+=1,n>=S&&(n=0,a+=1));else{const e=Math.floor($/t.slidesPerGroup);n=Math.floor($/t.slidesPerView)-e*t.slidesPerColumn,a=$-n*t.slidesPerView-e*t.slidesPerView}i=a+n*v/S,s.css({"-webkit-box-ordinal-group":i,"-moz-box-ordinal-group":i,"-ms-flex-order":i,"-webkit-order":i,order:i})}else n=Math.floor($/T),a=$-n*T;s.css("margin-"+(e.isHorizontal()?"top":"left"),0!==n&&t.spaceBetween&&t.spaceBetween+"px").attr("data-swiper-column",a).attr("data-swiper-row",n)}if("none"!==s.css("display")){if("auto"===t.slidesPerView){const i=R.getComputedStyle(s[0],null),a=s[0].style.transform,n=s[0].style.webkitTransform;if(a&&(s[0].style.transform="none"),n&&(s[0].style.webkitTransform="none"),t.roundLengths)b=e.isHorizontal()?s.outerWidth(!0):s.outerHeight(!0);else if(e.isHorizontal()){const e=parseFloat(i.getPropertyValue("width")),t=parseFloat(i.getPropertyValue("padding-left")),s=parseFloat(i.getPropertyValue("padding-right")),a=parseFloat(i.getPropertyValue("margin-left")),n=parseFloat(i.getPropertyValue("margin-right")),r=i.getPropertyValue("box-sizing");b=r&&"border-box"===r&&!K.isIE?e+a+n:e+t+s+a+n}else{const e=parseFloat(i.getPropertyValue("height")),t=parseFloat(i.getPropertyValue("padding-top")),s=parseFloat(i.getPropertyValue("padding-bottom")),a=parseFloat(i.getPropertyValue("margin-top")),n=parseFloat(i.getPropertyValue("margin-bottom")),r=i.getPropertyValue("box-sizing");b=r&&"border-box"===r&&!K.isIE?e+a+n:e+t+s+a+n}a&&(s[0].style.transform=a),n&&(s[0].style.webkitTransform=n),t.roundLengths&&(b=Math.floor(b))}else b=(i-(t.slidesPerView-1)*w)/t.slidesPerView,t.roundLengths&&(b=Math.floor(b)),l[$]&&(e.isHorizontal()?l[$].style.width=b+"px":l[$].style.height=b+"px");l[$]&&(l[$].swiperSlideSize=b),u.push(b),t.centeredSlides?(y=y+b/2+x/2+w,0===x&&0!==$&&(y=y-i/2-w),0===$&&(y=y-i/2-w),Math.abs(y)<.001&&(y=0),t.roundLengths&&(y=Math.floor(y)),E%t.slidesPerGroup==0&&c.push(y),p.push(y)):(t.roundLengths&&(y=Math.floor(y)),E%t.slidesPerGroup==0&&c.push(y),p.push(y),y=y+b+w),e.virtualSize+=b+w,x=b,E+=1}}let k;if(e.virtualSize=Math.max(e.virtualSize,i)+m,a&&n&&("slide"===t.effect||"coverflow"===t.effect)&&s.css({width:e.virtualSize+t.spaceBetween+"px"}),U.flexbox&&!t.setWrapperSize||(e.isHorizontal()?s.css({width:e.virtualSize+t.spaceBetween+"px"}):s.css({height:e.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(e.virtualSize=(b+t.spaceBetween)*v,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?s.css({width:e.virtualSize+t.spaceBetween+"px"}):s.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){k=[];for(let s=0;s<c.length;s+=1){let i=c[s];t.roundLengths&&(i=Math.floor(i)),c[s]<e.virtualSize+c[0]&&k.push(i)}c=k}if(!t.centeredSlides){k=[];for(let s=0;s<c.length;s+=1){let a=c[s];t.roundLengths&&(a=Math.floor(a)),c[s]<=e.virtualSize-i&&k.push(a)}c=k,Math.floor(e.virtualSize-i)-Math.floor(c[c.length-1])>1&&c.push(e.virtualSize-i)}if(0===c.length&&(c=[0]),0!==t.spaceBetween&&(e.isHorizontal()?a?l.css({marginLeft:w+"px"}):l.css({marginRight:w+"px"}):l.css({marginBottom:w+"px"})),t.centerInsufficientSlides){let e=0;if(u.forEach(s=>{e+=s+(t.spaceBetween?t.spaceBetween:0)}),e-=t.spaceBetween,e<i){const t=(i-e)/2;c.forEach((e,s)=>{c[s]=e-t}),p.forEach((e,s)=>{p[s]=e+t})}}W.extend(e,{slides:l,snapGrid:c,slidesGrid:p,slidesSizesGrid:u}),d!==o&&e.emit("slidesLengthChange"),c.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==g&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()},updateAutoHeight:function(e){const t=this,s=[];let i,a=0;if("number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed),"auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length)break;s.push(t.slides.eq(e)[0])}else s.push(t.slides.eq(t.activeIndex)[0]);for(i=0;i<s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;a=e>a?e:a}a&&t.$wrapperEl.css("height",a+"px")},updateSlidesOffset:function(){const e=this,t=e.slides;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:i,rtlTranslate:a}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;a&&(n=e),i.removeClass(s.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let r=0;r<i.length;r+=1){const e=i[r],o=(n+(s.centeredSlides?t.minTranslate():0)-e.swiperSlideOffset)/(e.swiperSlideSize+s.spaceBetween);if(s.watchSlidesVisibility){const a=-(n-e.swiperSlideOffset),o=a+t.slidesSizesGrid[r];(a>=0&&a<t.size-1||o>1&&o<=t.size||a<=0&&o>=t.size)&&(t.visibleSlides.push(e),t.visibleSlidesIndexes.push(r),i.eq(r).addClass(s.slideVisibleClass))}e.progress=a?-o:o}t.visibleSlides=Y(t.visibleSlides)},updateProgress:function(e=this&&this.translate||0){const t=this,s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:n,isEnd:r}=t;const o=n,l=r;0===i?(a=0,n=!0,r=!0):(a=(e-t.minTranslate())/i,n=a<=0,r=a>=1),W.extend(t,{progress:a,isBeginning:n,isEnd:r}),(s.watchSlidesProgress||s.watchSlidesVisibility)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),r&&!l&&t.emit("reachEnd toEdge"),(o&&!n||l&&!r)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,$wrapperEl:i,activeIndex:a,realIndex:n}=e,r=e.virtual&&s.virtual.enabled;let o;t.removeClass(`${s.slideActiveClass} ${s.slideNextClass} ${s.slidePrevClass} ${s.slideDuplicateActiveClass} ${s.slideDuplicateNextClass} ${s.slideDuplicatePrevClass}`),o=r?e.$wrapperEl.find(`.${s.slideClass}[data-swiper-slide-index="${a}"]`):t.eq(a),o.addClass(s.slideActiveClass),s.loop&&(o.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass));let l=o.nextAll("."+s.slideClass).eq(0).addClass(s.slideNextClass);s.loop&&0===l.length&&(l=t.eq(0),l.addClass(s.slideNextClass));let d=o.prevAll("."+s.slideClass).eq(0).addClass(s.slidePrevClass);s.loop&&0===d.length&&(d=t.eq(-1),d.addClass(s.slidePrevClass)),s.loop&&(l.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass),d.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass))},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:i,snapGrid:a,params:n,activeIndex:r,realIndex:o,snapIndex:l}=t;let d,c=e;if(void 0===c){for(let e=0;e<i.length;e+=1)void 0!==i[e+1]?s>=i[e]&&s<i[e+1]-(i[e+1]-i[e])/2?c=e:s>=i[e]&&s<i[e+1]&&(c=e+1):s>=i[e]&&(c=e);n.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(d=a.indexOf(s)>=0?a.indexOf(s):Math.floor(c/n.slidesPerGroup),d>=a.length&&(d=a.length-1),c===r)return void(d!==l&&(t.snapIndex=d,t.emit("snapIndexChange")));const p=parseInt(t.slides.eq(c).attr("data-swiper-slide-index")||c,10);W.extend(t,{snapIndex:d,realIndex:p,previousIndex:r,activeIndex:c}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),o!==p&&t.emit("realIndexChange"),(t.initialized||t.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,i=Y(e.target).closest("."+s.slideClass)[0];let a=!1;if(i)for(let n=0;n<t.slides.length;n+=1)t.slides[n]===i&&(a=!0);if(!i||!a)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(Y(i).attr("data-swiper-slide-index"),10):t.clickedIndex=Y(i).index(),s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var J={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:s,translate:i,$wrapperEl:a}=this;if(t.virtualTranslate)return s?-i:i;let n=W.getTranslate(a[0],e);return s&&(n=-n),n||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:a,$wrapperEl:n,progress:r}=s;let o,l=0,d=0;s.isHorizontal()?l=i?-e:e:d=e,a.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),a.virtualTranslate||(U.transforms3d?n.transform(`translate3d(${l}px, ${d}px, 0px)`):n.transform(`translate(${l}px, ${d}px)`)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?l:d;const c=s.maxTranslate()-s.minTranslate();o=0===c?0:(e-s.minTranslate())/c,o!==r&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var ee={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const s=this,{activeIndex:i,params:a,previousIndex:n}=s;a.autoHeight&&s.updateAutoHeight();let r=t;if(r||(r=i>n?"next":i<n?"prev":"reset"),s.emit("transitionStart"),e&&i!==n){if("reset"===r)return void s.emit("slideResetTransitionStart");s.emit("slideChangeTransitionStart"),"next"===r?s.emit("slideNextTransitionStart"):s.emit("slidePrevTransitionStart")}},transitionEnd:function(e=!0,t){const s=this,{activeIndex:i,previousIndex:a}=s;s.animating=!1,s.setTransition(0);let n=t;if(n||(n=i>a?"next":i<a?"prev":"reset"),s.emit("transitionEnd"),e&&i!==a){if("reset"===n)return void s.emit("slideResetTransitionEnd");s.emit("slideChangeTransitionEnd"),"next"===n?s.emit("slideNextTransitionEnd"):s.emit("slidePrevTransitionEnd")}}};var te={slideTo:function(e=0,t=this.params.speed,s=!0,i){const a=this;let n=e;n<0&&(n=0);const{params:r,snapGrid:o,slidesGrid:l,previousIndex:d,activeIndex:c,rtlTranslate:p}=a;if(a.animating&&r.preventInteractionOnTransition)return!1;let u=Math.floor(n/r.slidesPerGroup);u>=o.length&&(u=o.length-1),(c||r.initialSlide||0)===(d||0)&&s&&a.emit("beforeSlideChangeStart");const h=-o[u];if(a.updateProgress(h),r.normalizeSlideIndex)for(let f=0;f<l.length;f+=1)-Math.floor(100*h)>=Math.floor(100*l[f])&&(n=f);if(a.initialized&&n!==c){if(!a.allowSlideNext&&h<a.translate&&h<a.minTranslate())return!1;if(!a.allowSlidePrev&&h>a.translate&&h>a.maxTranslate()&&(c||0)!==n)return!1}let m;return m=n>c?"next":n<c?"prev":"reset",p&&-h===a.translate||!p&&h===a.translate?(a.updateActiveIndex(n),r.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==r.effect&&a.setTranslate(h),"reset"!==m&&(a.transitionStart(s,m),a.transitionEnd(s,m)),!1):(0!==t&&U.transition?(a.setTransition(t),a.setTranslate(h),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,i),a.transitionStart(s,m),a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(s,m))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd))):(a.setTransition(0),a.setTranslate(h),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,i),a.transitionStart(s,m),a.transitionEnd(s,m)),!0)},slideToLoop:function(e=0,t=this.params.speed,s=!0,i){const a=this;let n=e;return a.params.loop&&(n+=a.loopedSlides),a.slideTo(n,t,s,i)},slideNext:function(e=this.params.speed,t=!0,s){const i=this,{params:a,animating:n}=i;return a.loop?!n&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+a.slidesPerGroup,e,t,s)):i.slideTo(i.activeIndex+a.slidesPerGroup,e,t,s)},slidePrev:function(e=this.params.speed,t=!0,s){const i=this,{params:a,animating:n,snapGrid:r,slidesGrid:o,rtlTranslate:l}=i;if(a.loop){if(n)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const c=d(l?i.translate:-i.translate),p=r.map(e=>d(e)),u=(o.map(e=>d(e)),r[p.indexOf(c)],r[p.indexOf(c)-1]);let h;return void 0!==u&&(h=o.indexOf(u),h<0&&(h=i.activeIndex-1)),i.slideTo(h,e,t,s)},slideReset:function(e=this.params.speed,t=!0,s){return this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e=this.params.speed,t=!0,s){const i=this;let a=i.activeIndex;const n=Math.floor(a/i.params.slidesPerGroup);if(n<i.snapGrid.length-1){const e=i.rtlTranslate?i.translate:-i.translate,t=i.snapGrid[n];e-t>(i.snapGrid[n+1]-t)/2&&(a=i.params.slidesPerGroup)}return i.slideTo(a,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,n=e.clickedIndex;if(t.loop){if(e.animating)return;a=parseInt(Y(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?n<e.loopedSlides-i/2||n>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),W.nextTick(()=>{e.slideTo(n)})):e.slideTo(n):n>e.slides.length-i?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),W.nextTick(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}};var se={loopCreate:function(){const e=this,{params:t,$wrapperEl:s}=e;s.children(`.${t.slideClass}.${t.slideDuplicateClass}`).remove();let i=s.children("."+t.slideClass);if(t.loopFillGroupWithBlank){const e=t.slidesPerGroup-i.length%t.slidesPerGroup;if(e!==t.slidesPerGroup){for(let i=0;i<e;i+=1){const e=Y(G.createElement("div")).addClass(`${t.slideClass} ${t.slideBlankClass}`);s.append(e)}i=s.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=i.length),e.loopedSlides=parseInt(t.loopedSlides||t.slidesPerView,10),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>i.length&&(e.loopedSlides=i.length);const a=[],n=[];i.each((t,s)=>{const r=Y(s);t<e.loopedSlides&&n.push(s),t<i.length&&t>=i.length-e.loopedSlides&&a.push(s),r.attr("data-swiper-slide-index",t)});for(let r=0;r<n.length;r+=1)s.append(Y(n[r].cloneNode(!0)).addClass(t.slideDuplicateClass));for(let r=a.length-1;r>=0;r-=1)s.prepend(Y(a[r].cloneNode(!0)).addClass(t.slideDuplicateClass))},loopFix:function(){const e=this,{params:t,activeIndex:s,slides:i,loopedSlides:a,allowSlidePrev:n,allowSlideNext:r,snapGrid:o,rtlTranslate:l}=e;let d;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-o[s]-e.getTranslate();if(s<a){d=i.length-3*a+s,d+=a,e.slideTo(d,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}else if("auto"===t.slidesPerView&&s>=2*a||s>=i.length-a){d=-i.length+s+a,d+=a,e.slideTo(d,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}e.allowSlidePrev=n,e.allowSlideNext=r},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:s}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),s.removeAttr("data-swiper-slide-index")}};var ie={setGrabCursor:function(e){if(U.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)return;const t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){U.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var ae={appendSlide:function(e){const t=this,{$wrapperEl:s,params:i}=t;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let a=0;a<e.length;a+=1)e[a]&&s.append(e[a]);else s.append(e);i.loop&&t.loopCreate(),i.observer&&U.observer||t.update()},prependSlide:function(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;s.loop&&t.loopDestroy();let n=a+1;if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&i.prepend(e[t]);n=a+e.length}else i.prepend(e);s.loop&&t.loopCreate(),s.observer&&U.observer||t.update(),t.slideTo(n,0,!1)},addSlide:function(e,t){const s=this,{$wrapperEl:i,params:a,activeIndex:n}=s;let r=n;a.loop&&(r-=s.loopedSlides,s.loopDestroy(),s.slides=i.children("."+a.slideClass));const o=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=o)return void s.appendSlide(t);let l=r>e?r+1:r;const d=[];for(let c=o-1;c>=e;c-=1){const e=s.slides.eq(c);e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);l=r>e?r+t.length:r}else i.append(t);for(let c=0;c<d.length;c+=1)i.append(d[c]);a.loop&&s.loopCreate(),a.observer&&U.observer||s.update(),a.loop?s.slideTo(l+s.loopedSlides,0,!1):s.slideTo(l,0,!1)},removeSlide:function(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;let n=a;s.loop&&(n-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+s.slideClass));let r,o=n;if("object"==typeof e&&"length"in e){for(let s=0;s<e.length;s+=1)r=e[s],t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1);o=Math.max(o,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1),o=Math.max(o,0);s.loop&&t.loopCreate(),s.observer&&U.observer||t.update(),s.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)},removeAllSlides:function(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}};const ne=function(){const e=R.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:R.cordova||R.phonegap,phonegap:R.cordova||R.phonegap},s=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!a&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(s&&(t.os="windows",t.osVersion=s[2],t.windows=!0),i&&!s&&(t.os="android",t.osVersion=i[2],t.android=!0,t.androidChrome=e.toLowerCase().indexOf("chrome")>=0),(a||r||n)&&(t.os="ios",t.ios=!0),r&&!n&&(t.osVersion=r[2].replace(/_/g,"."),t.iphone=!0),a&&(t.osVersion=a[2].replace(/_/g,"."),t.ipad=!0),n&&(t.osVersion=n[3]?n[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&e.indexOf("Version/")>=0&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(r||a||n)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){const e=t.osVersion.split("."),s=G.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(n||r)&&(1*e[0]==7?1*e[1]>=1:1*e[0]>7)&&s&&s.getAttribute("content").indexOf("minimal-ui")>=0}return t.pixelRatio=R.devicePixelRatio||1,t}();function re(e){const t=this,s=t.touchEventsData,{params:i,touches:a}=t;if(t.animating&&i.preventInteractionOnTransition)return;let n=e;if(n.originalEvent&&(n=n.originalEvent),s.isTouchEvent="touchstart"===n.type,!s.isTouchEvent&&"which"in n&&3===n.which)return;if(!s.isTouchEvent&&"button"in n&&n.button>0)return;if(s.isTouched&&s.isMoved)return;if(i.noSwiping&&Y(n.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])return void(t.allowClick=!0);if(i.swipeHandler&&!Y(n).closest(i.swipeHandler)[0])return;a.currentX="touchstart"===n.type?n.targetTouches[0].pageX:n.pageX,a.currentY="touchstart"===n.type?n.targetTouches[0].pageY:n.pageY;const r=a.currentX,o=a.currentY,l=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,d=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!l||!(r<=d||r>=R.screen.width-d)){if(W.extend(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=r,a.startY=o,s.touchStartTime=W.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==n.type){let e=!0;Y(n.target).is(s.formElements)&&(e=!1),G.activeElement&&Y(G.activeElement).is(s.formElements)&&G.activeElement!==n.target&&G.activeElement.blur();const a=e&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||a)&&n.preventDefault()}t.emit("touchStart",n)}}function oe(e){const t=this,s=t.touchEventsData,{params:i,touches:a,rtlTranslate:n}=t;let r=e;if(r.originalEvent&&(r=r.originalEvent),!s.isTouched)return void(s.startMoving&&s.isScrolling&&t.emit("touchMoveOpposite",r));if(s.isTouchEvent&&"mousemove"===r.type)return;const o="touchmove"===r.type?r.targetTouches[0].pageX:r.pageX,l="touchmove"===r.type?r.targetTouches[0].pageY:r.pageY;if(r.preventedByNestedSwiper)return a.startX=o,void(a.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(s.isTouched&&(W.extend(a,{startX:o,startY:l,currentX:o,currentY:l}),s.touchStartTime=W.now()));if(s.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(l<a.startY&&t.translate<=t.maxTranslate()||l>a.startY&&t.translate>=t.minTranslate())return s.isTouched=!1,void(s.isMoved=!1)}else if(o<a.startX&&t.translate<=t.maxTranslate()||o>a.startX&&t.translate>=t.minTranslate())return;if(s.isTouchEvent&&G.activeElement&&r.target===G.activeElement&&Y(r.target).is(s.formElements))return s.isMoved=!0,void(t.allowClick=!1);if(s.allowTouchCallbacks&&t.emit("touchMove",r),r.targetTouches&&r.targetTouches.length>1)return;a.currentX=o,a.currentY=l;const d=a.currentX-a.startX,c=a.currentY-a.startY;if(t.params.threshold&&Math.sqrt(d**2+c**2)<t.params.threshold)return;if(void 0===s.isScrolling){let e;t.isHorizontal()&&a.currentY===a.startY||t.isVertical()&&a.currentX===a.startX?s.isScrolling=!1:d*d+c*c>=25&&(e=180*Math.atan2(Math.abs(c),Math.abs(d))/Math.PI,s.isScrolling=t.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(s.isScrolling&&t.emit("touchMoveOpposite",r),void 0===s.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(s.startMoving=!0)),s.isScrolling)return void(s.isTouched=!1);if(!s.startMoving)return;t.allowClick=!1,r.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&r.stopPropagation(),s.isMoved||(i.loop&&t.loopFix(),s.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),s.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",r)),t.emit("sliderMove",r),s.isMoved=!0;let p=t.isHorizontal()?d:c;a.diff=p,p*=i.touchRatio,n&&(p=-p),t.swipeDirection=p>0?"prev":"next",s.currentTranslate=p+s.startTranslate;let u=!0,h=i.resistanceRatio;if(i.touchReleaseOnEdges&&(h=0),p>0&&s.currentTranslate>t.minTranslate()?(u=!1,i.resistance&&(s.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+s.startTranslate+p)**h)):p<0&&s.currentTranslate<t.maxTranslate()&&(u=!1,i.resistance&&(s.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-s.startTranslate-p)**h)),u&&(r.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&s.currentTranslate<s.startTranslate&&(s.currentTranslate=s.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&s.currentTranslate>s.startTranslate&&(s.currentTranslate=s.startTranslate),i.threshold>0){if(!(Math.abs(p)>i.threshold||s.allowThresholdMove))return void(s.currentTranslate=s.startTranslate);if(!s.allowThresholdMove)return s.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,s.currentTranslate=s.startTranslate,void(a.diff=t.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===s.velocities.length&&s.velocities.push({position:a[t.isHorizontal()?"startX":"startY"],time:s.touchStartTime}),s.velocities.push({position:a[t.isHorizontal()?"currentX":"currentY"],time:W.now()})),t.updateProgress(s.currentTranslate),t.setTranslate(s.currentTranslate))}function le(e){const t=this,s=t.touchEventsData,{params:i,touches:a,rtlTranslate:n,$wrapperEl:r,slidesGrid:o,snapGrid:l}=t;let d=e;if(d.originalEvent&&(d=d.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",d),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&i.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);i.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=W.now(),p=c-s.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),p<300&&c-s.lastClickTime>300&&(s.clickTimeout&&clearTimeout(s.clickTimeout),s.clickTimeout=W.nextTick(()=>{t&&!t.destroyed&&t.emit("click",d)},300)),p<300&&c-s.lastClickTime<300&&(s.clickTimeout&&clearTimeout(s.clickTimeout),t.emit("doubleTap",d))),s.lastClickTime=W.now(),W.nextTick(()=>{t.destroyed||(t.allowClick=!0)}),!s.isTouched||!s.isMoved||!t.swipeDirection||0===a.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let u;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,u=i.followFinger?n?t.translate:-t.translate:-s.currentTranslate,i.freeMode){if(u<-t.minTranslate())return void t.slideTo(t.activeIndex);if(u>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(s.velocities.length>1){const e=s.velocities.pop(),a=s.velocities.pop(),n=e.position-a.position,r=e.time-a.time;t.velocity=n/r,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(r>150||W.now()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,s.velocities.length=0;let e=1e3*i.freeModeMomentumRatio;const a=t.velocity*e;let o=t.translate+a;n&&(o=-o);let d,c=!1;const p=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;let u;if(o<t.maxTranslate())i.freeModeMomentumBounce?(o+t.maxTranslate()<-p&&(o=t.maxTranslate()-p),d=t.maxTranslate(),c=!0,s.allowMomentumBounce=!0):o=t.maxTranslate(),i.loop&&i.centeredSlides&&(u=!0);else if(o>t.minTranslate())i.freeModeMomentumBounce?(o-t.minTranslate()>p&&(o=t.minTranslate()+p),d=t.minTranslate(),c=!0,s.allowMomentumBounce=!0):o=t.minTranslate(),i.loop&&i.centeredSlides&&(u=!0);else if(i.freeModeSticky){let e;for(let t=0;t<l.length;t+=1)if(l[t]>-o){e=t;break}o=Math.abs(l[e]-o)<Math.abs(l[e-1]-o)||"next"===t.swipeDirection?l[e]:l[e-1],o=-o}if(u&&t.once("transitionEnd",()=>{t.loopFix()}),0!==t.velocity)e=n?Math.abs((-o-t.translate)/t.velocity):Math.abs((o-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&c?(t.updateProgress(d),t.setTransition(e),t.setTranslate(o),t.transitionStart(!0,t.swipeDirection),t.animating=!0,r.transitionEnd(()=>{t&&!t.destroyed&&s.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(d),r.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(o),t.setTransition(e),t.setTranslate(o),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,r.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(o),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();return void((!i.freeModeMomentum||p>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses()))}let h=0,m=t.slidesSizesGrid[0];for(let g=0;g<o.length;g+=i.slidesPerGroup)void 0!==o[g+i.slidesPerGroup]?u>=o[g]&&u<o[g+i.slidesPerGroup]&&(h=g,m=o[g+i.slidesPerGroup]-o[g]):u>=o[g]&&(h=g,m=o[o.length-1]-o[o.length-2]);const f=(u-o[h])/m;if(p>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(f>=i.longSwipesRatio?t.slideTo(h+i.slidesPerGroup):t.slideTo(h)),"prev"===t.swipeDirection&&(f>1-i.longSwipesRatio?t.slideTo(h+i.slidesPerGroup):t.slideTo(h))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(h+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(h)}}function de(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:n}=e;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){const s=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}function ce(e){const t=this;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}var pe={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0};const ue={update:Z,translate:J,transition:ee,slide:te,loop:se,grabCursor:ie,manipulation:ae,events:{attachEvents:function(){const e=this,{params:t,touchEvents:s,el:i,wrapperEl:a}=e;e.onTouchStart=re.bind(e),e.onTouchMove=oe.bind(e),e.onTouchEnd=le.bind(e),e.onClick=ce.bind(e);const n="container"===t.touchEventsTarget?i:a,r=!!t.nested;if(U.touch||!U.pointerEvents&&!U.prefixedPointerEvents){if(U.touch){const i=!("touchstart"!==s.start||!U.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};n.addEventListener(s.start,e.onTouchStart,i),n.addEventListener(s.move,e.onTouchMove,U.passiveListener?{passive:!1,capture:r}:r),n.addEventListener(s.end,e.onTouchEnd,i)}(t.simulateTouch&&!ne.ios&&!ne.android||t.simulateTouch&&!U.touch&&ne.ios)&&(n.addEventListener("mousedown",e.onTouchStart,!1),G.addEventListener("mousemove",e.onTouchMove,r),G.addEventListener("mouseup",e.onTouchEnd,!1))}else n.addEventListener(s.start,e.onTouchStart,!1),G.addEventListener(s.move,e.onTouchMove,r),G.addEventListener(s.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&n.addEventListener("click",e.onClick,!0),e.on(ne.ios||ne.android?"resize orientationchange observerUpdate":"resize observerUpdate",de,!0)},detachEvents:function(){const e=this,{params:t,touchEvents:s,el:i,wrapperEl:a}=e,n="container"===t.touchEventsTarget?i:a,r=!!t.nested;if(U.touch||!U.pointerEvents&&!U.prefixedPointerEvents){if(U.touch){const i=!("onTouchStart"!==s.start||!U.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};n.removeEventListener(s.start,e.onTouchStart,i),n.removeEventListener(s.move,e.onTouchMove,r),n.removeEventListener(s.end,e.onTouchEnd,i)}(t.simulateTouch&&!ne.ios&&!ne.android||t.simulateTouch&&!U.touch&&ne.ios)&&(n.removeEventListener("mousedown",e.onTouchStart,!1),G.removeEventListener("mousemove",e.onTouchMove,r),G.removeEventListener("mouseup",e.onTouchEnd,!1))}else n.removeEventListener(s.start,e.onTouchStart,!1),G.removeEventListener(s.move,e.onTouchMove,r),G.removeEventListener(s.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&n.removeEventListener("click",e.onClick,!0),e.off(ne.ios||ne.android?"resize orientationchange observerUpdate":"resize observerUpdate",de)}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:s,loopedSlides:i=0,params:a}=e,n=a.breakpoints;if(!n||n&&0===Object.keys(n).length)return;const r=e.getBreakpoint(n);if(r&&e.currentBreakpoint!==r){const o=r in n?n[r]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(e=>{const t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});const l=o||e.originalParams,d=l.direction&&l.direction!==a.direction,c=a.loop&&(l.slidesPerView!==a.slidesPerView||d);d&&s&&e.changeDirection(),W.extend(e.params,l),W.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=r,c&&s&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}},getBreakpoint:function(e){const t=this;if(!e)return;let s=!1;const i=[];Object.keys(e).forEach(e=>{i.push(e)}),i.sort((e,t)=>parseInt(e,10)-parseInt(t,10));for(let a=0;a<i.length;a+=1){const e=i[a];t.params.breakpointsInverse?e<=R.innerWidth&&(s=e):e>=R.innerWidth&&!s&&(s=e)}return s||"max"}},checkOverflow:{checkOverflow:function(){const e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){const{classNames:e,params:t,rtl:s,$el:i}=this,a=[];a.push("initialized"),a.push(t.direction),t.freeMode&&a.push("free-mode"),U.flexbox||a.push("no-flexbox"),t.autoHeight&&a.push("autoheight"),s&&a.push("rtl"),t.slidesPerColumn>1&&a.push("multirow"),ne.android&&a.push("android"),ne.ios&&a.push("ios"),(K.isIE||K.isEdge)&&(U.pointerEvents||U.prefixedPointerEvents)&&a.push("wp8-"+t.direction),a.forEach(s=>{e.push(t.containerModifierClass+s)}),i.addClass(e.join(" "))},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,s,i,a,n){let r;function o(){n&&n()}e.complete&&a?o():t?(r=new R.Image,r.onload=o,r.onerror=o,i&&(r.sizes=i),s&&(r.srcset=s),t&&(r.src=t)):o()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let s=0;s<e.imagesToLoad.length;s+=1){const i=e.imagesToLoad[s];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},he={};class me extends Q{constructor(...e){let t,s;1===e.length&&e[0].constructor&&e[0].constructor===Object?s=e[0]:[t,s]=e,s||(s={}),s=W.extend({},s),t&&!s.el&&(s.el=t),super(s),Object.keys(ue).forEach(e=>{Object.keys(ue[e]).forEach(t=>{me.prototype[t]||(me.prototype[t]=ue[e][t])})});const i=this;void 0===i.modules&&(i.modules={}),Object.keys(i.modules).forEach(e=>{const t=i.modules[e];if(t.params){const e=Object.keys(t.params)[0],i=t.params[e];if("object"!=typeof i||null===i)return;if(!(e in s)||!("enabled"in i))return;!0===s[e]&&(s[e]={enabled:!0}),"object"!=typeof s[e]||"enabled"in s[e]||(s[e].enabled=!0),s[e]||(s[e]={enabled:!1})}});const a=W.extend({},pe);i.useModulesParams(a),i.params=W.extend({},a,he,s),i.originalParams=W.extend({},i.params),i.passedParams=W.extend({},s),i.$=Y;const n=Y(i.params.el);if(t=n[0],!t)return;if(n.length>1){const e=[];return n.each((t,i)=>{const a=W.extend({},s,{el:i});e.push(new me(a))}),e}t.swiper=i,n.data("swiper",i);const r=n.children("."+i.params.wrapperClass);return W.extend(i,{$el:n,el:t,$wrapperEl:r,wrapperEl:r[0],classNames:[],slides:Y(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===i.params.direction,isVertical:()=>"vertical"===i.params.direction,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===i.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===r.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend"];let t=["mousedown","mousemove","mouseup"];return U.pointerEvents?t=["pointerdown","pointermove","pointerup"]:U.prefixedPointerEvents&&(t=["MSPointerDown","MSPointerMove","MSPointerUp"]),i.touchEventsTouch={start:e[0],move:e[1],end:e[2]},i.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},U.touch||!i.params.simulateTouch?i.touchEventsTouch:i.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:W.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.useModules(),i.params.init&&i.init(),i}slidesPerViewDynamic(){const{params:e,slides:t,slidesGrid:s,size:i,activeIndex:a}=this;let n=1;if(e.centeredSlides){let e,s=t[a].swiperSlideSize;for(let r=a+1;r<t.length;r+=1)t[r]&&!e&&(s+=t[r].swiperSlideSize,n+=1,s>i&&(e=!0));for(let r=a-1;r>=0;r-=1)t[r]&&!e&&(s+=t[r].swiperSlideSize,n+=1,s>i&&(e=!0))}else for(let r=a+1;r<t.length;r+=1)s[r]-s[a]<i&&(n+=1);return n}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let a;s.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(i(),e.params.autoHeight&&e.updateAutoHeight()):(a=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),a||i()),s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.$el.removeClass(`${s.params.containerModifierClass}${i} wp8-${i}`).addClass(`${s.params.containerModifierClass}${e}`),(K.isIE||K.isEdge)&&(U.pointerEvents||U.prefixedPointerEvents)&&s.$el.addClass(`${s.params.containerModifierClass}wp8-${e}`),s.params.direction=e,s.slides.each((t,s)=>{"vertical"===e?s.style.width="":s.style.height=""}),s.emit("changeDirection"),t&&s.update()),s}init(){const e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))}destroy(e=!0,t=!0){const s=this,{params:i,$el:a,$wrapperEl:n,slides:r}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),a.removeAttr("style"),n.removeAttr("style"),r&&r.length&&r.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(e=>{s.off(e)}),!1!==e&&(s.$el[0].swiper=null,s.$el.data("swiper",null),W.deleteProps(s)),s.destroyed=!0),null}static extendDefaults(e){W.extend(he,e)}static get extendedDefaults(){return he}static get defaults(){return pe}static get Class(){return Q}static get $(){return Y}}var fe={name:"device",proto:{device:ne},static:{device:ne}},ge={name:"support",proto:{support:U},static:{support:U}},ve={name:"browser",proto:{browser:K},static:{browser:K}},be={name:"resize",create(){const e=this;W.extend(e,{resize:{resizeHandler(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init(){R.addEventListener("resize",this.resize.resizeHandler),R.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy(){R.removeEventListener("resize",this.resize.resizeHandler),R.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}};const we={func:R.MutationObserver||R.WebkitMutationObserver,attach(e,t={}){const s=this,i=new(0,we.func)(e=>{if(1===e.length)return void s.emit("observerUpdate",e[0]);const t=function(){s.emit("observerUpdate",e[0])};R.requestAnimationFrame?R.requestAnimationFrame(t):R.setTimeout(t,0)});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),s.observer.observers.push(i)},init(){const e=this;if(U.observer&&e.params.observer){if(e.params.observeParents){const t=e.$el.parents();for(let s=0;s<t.length;s+=1)e.observer.attach(t[s])}e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy(){this.observer.observers.forEach(e=>{e.disconnect()}),this.observer.observers=[]}};var ye={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create(){W.extend(this,{observer:{init:we.init.bind(this),attach:we.attach.bind(this),destroy:we.destroy.bind(this),observers:[]}})},on:{init(){this.observer.init()},destroy(){this.observer.destroy()}}};const xe={update(e){const t=this,{slidesPerView:s,slidesPerGroup:i,centeredSlides:a}=t.params,{addSlidesBefore:n,addSlidesAfter:r}=t.params.virtual,{from:o,to:l,slides:d,slidesGrid:c,renderSlide:p,offset:u}=t.virtual;t.updateActiveIndex();const h=t.activeIndex||0;let m,f,g;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",a?(f=Math.floor(s/2)+i+n,g=Math.floor(s/2)+i+r):(f=s+(i-1)+n,g=i+r);const v=Math.max((h||0)-g,0),b=Math.min((h||0)+f,d.length-1),w=(t.slidesGrid[v]||0)-(t.slidesGrid[0]||0);function y(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(W.extend(t.virtual,{from:v,to:b,offset:w,slidesGrid:t.slidesGrid}),o===v&&l===b&&!e)return t.slidesGrid!==c&&w!==u&&t.slides.css(m,w+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:w,from:v,to:b,slides:function(){const e=[];for(let t=v;t<=b;t+=1)e.push(d[t]);return e}()}),void y();const x=[],E=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(let S=o;S<=l;S+=1)(S<v||S>b)&&t.$wrapperEl.find(`.${t.params.slideClass}[data-swiper-slide-index="${S}"]`).remove();for(let S=0;S<d.length;S+=1)S>=v&&S<=b&&(void 0===l||e?E.push(S):(S>l&&E.push(S),S<o&&x.push(S)));E.forEach(e=>{t.$wrapperEl.append(p(d[e],e))}),x.sort((e,t)=>t-e).forEach(e=>{t.$wrapperEl.prepend(p(d[e],e))}),t.$wrapperEl.children(".swiper-slide").css(m,w+"px"),y()},renderSlide(e,t){const s=this,i=s.params.virtual;if(i.cache&&s.virtual.cache[t])return s.virtual.cache[t];const a=i.renderSlide?Y(i.renderSlide.call(s,e,t)):Y(`<div class="${s.params.slideClass}" data-swiper-slide-index="${t}">${e}</div>`);return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(s.virtual.cache[t]=a),a},appendSlide(e){const t=this;if("object"==typeof e&&"length"in e)for(let s=0;s<e.length;s+=1)e[s]&&t.virtual.slides.push(e[s]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide(e){const t=this,s=t.activeIndex;let i=s+1,a=1;if(Array.isArray(e)){for(let s=0;s<e.length;s+=1)e[s]&&t.virtual.slides.unshift(e[s]);i=s+e.length,a=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){const e=t.virtual.cache,s={};Object.keys(e).forEach(t=>{s[parseInt(t,10)+a]=e[t]}),t.virtual.cache=s}t.virtual.update(!0),t.slideTo(i,0)},removeSlide(e){const t=this;if(null==e)return;let s=t.activeIndex;if(Array.isArray(e))for(let i=e.length-1;i>=0;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]<s&&(s-=1),s=Math.max(s,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<s&&(s-=1),s=Math.max(s,0);t.virtual.update(!0),t.slideTo(s,0)},removeAllSlides(){const e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}};var Ee={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create(){W.extend(this,{virtual:{update:xe.update.bind(this),appendSlide:xe.appendSlide.bind(this),prependSlide:xe.prependSlide.bind(this),removeSlide:xe.removeSlide.bind(this),removeAllSlides:xe.removeAllSlides.bind(this),renderSlide:xe.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit(){const e=this;if(!e.params.virtual.enabled)return;e.classNames.push(e.params.containerModifierClass+"virtual");const t={watchSlidesProgress:!0};W.extend(e.params,t),W.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()},setTranslate(){this.params.virtual.enabled&&this.virtual.update()}}};const Se={handle(e){const t=this,{rtlTranslate:s}=t;let i=e;i.originalEvent&&(i=i.originalEvent);const a=i.keyCode||i.charCode;if(!t.allowSlideNext&&(t.isHorizontal()&&39===a||t.isVertical()&&40===a||34===a))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&37===a||t.isVertical()&&38===a||33===a))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||G.activeElement&&G.activeElement.nodeName&&("input"===G.activeElement.nodeName.toLowerCase()||"textarea"===G.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(33===a||34===a||37===a||39===a||38===a||40===a)){let e=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;const i=R.innerWidth,a=R.innerHeight,n=t.$el.offset();s&&(n.left-=t.$el[0].scrollLeft);const r=[[n.left,n.top],[n.left+t.width,n.top],[n.left,n.top+t.height],[n.left+t.width,n.top+t.height]];for(let t=0;t<r.length;t+=1){const s=r[t];s[0]>=0&&s[0]<=i&&s[1]>=0&&s[1]<=a&&(e=!0)}if(!e)return}t.isHorizontal()?(33!==a&&34!==a&&37!==a&&39!==a||(i.preventDefault?i.preventDefault():i.returnValue=!1),(34!==a&&39!==a||s)&&(33!==a&&37!==a||!s)||t.slideNext(),(33!==a&&37!==a||s)&&(34!==a&&39!==a||!s)||t.slidePrev()):(33!==a&&34!==a&&38!==a&&40!==a||(i.preventDefault?i.preventDefault():i.returnValue=!1),34!==a&&40!==a||t.slideNext(),33!==a&&38!==a||t.slidePrev()),t.emit("keyPress",a)}},enable(){this.keyboard.enabled||(Y(G).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable(){this.keyboard.enabled&&(Y(G).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}};var Te={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create(){W.extend(this,{keyboard:{enabled:!1,enable:Se.enable.bind(this),disable:Se.disable.bind(this),handle:Se.handle.bind(this)}})},on:{init(){const e=this;e.params.keyboard.enabled&&e.keyboard.enable()},destroy(){const e=this;e.keyboard.enabled&&e.keyboard.disable()}}};const Ce={lastScrollTime:W.now(),event:R.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){let e="onwheel"in G;if(!e){const t=G.createElement("div");t.setAttribute("onwheel","return;"),e="function"==typeof t.onwheel}return!e&&G.implementation&&G.implementation.hasFeature&&!0!==G.implementation.hasFeature("","")&&(e=G.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel",normalize(e){let t=0,s=0,i=0,a=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),i=10*t,a=10*s,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||a)&&e.deltaMode&&(1===e.deltaMode?(i*=40,a*=40):(i*=800,a*=800)),i&&!t&&(t=i<1?-1:1),a&&!s&&(s=a<1?-1:1),{spinX:t,spinY:s,pixelX:i,pixelY:a}},handleMouseEnter(){this.mouseEntered=!0},handleMouseLeave(){this.mouseEntered=!1},handle(e){let t=e;const s=this,i=s.params.mousewheel;if(!s.mouseEntered&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);let a=0;const n=s.rtlTranslate?-1:1,r=Ce.normalize(t);if(i.forceToAxis)if(s.isHorizontal()){if(!(Math.abs(r.pixelX)>Math.abs(r.pixelY)))return!0;a=r.pixelX*n}else{if(!(Math.abs(r.pixelY)>Math.abs(r.pixelX)))return!0;a=r.pixelY}else a=Math.abs(r.pixelX)>Math.abs(r.pixelY)?-r.pixelX*n:-r.pixelY;if(0===a)return!0;if(i.invert&&(a=-a),s.params.freeMode){s.params.loop&&s.loopFix();let e=s.getTranslate()+a*i.sensitivity;const n=s.isBeginning,r=s.isEnd;if(e>=s.minTranslate()&&(e=s.minTranslate()),e<=s.maxTranslate()&&(e=s.maxTranslate()),s.setTransition(0),s.setTranslate(e),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses(),(!n&&s.isBeginning||!r&&s.isEnd)&&s.updateSlidesClasses(),s.params.freeModeSticky&&(clearTimeout(s.mousewheel.timeout),s.mousewheel.timeout=W.nextTick(()=>{s.slideToClosest()},300)),s.emit("scroll",t),s.params.autoplay&&s.params.autoplayDisableOnInteraction&&s.autoplay.stop(),e===s.minTranslate()||e===s.maxTranslate())return!0}else{if(W.now()-s.mousewheel.lastScrollTime>60)if(a<0)if(s.isEnd&&!s.params.loop||s.animating){if(i.releaseOnEdges)return!0}else s.slideNext(),s.emit("scroll",t);else if(s.isBeginning&&!s.params.loop||s.animating){if(i.releaseOnEdges)return!0}else s.slidePrev(),s.emit("scroll",t);s.mousewheel.lastScrollTime=(new R.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable(){const e=this;if(!Ce.event)return!1;if(e.mousewheel.enabled)return!1;let t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=Y(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(Ce.event,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable(){const e=this;if(!Ce.event)return!1;if(!e.mousewheel.enabled)return!1;let t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=Y(e.params.mousewheel.eventsTarged)),t.off(Ce.event,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}};const ke={update(){const e=this,t=e.params.navigation;if(e.params.loop)return;const{$nextEl:s,$prevEl:i}=e.navigation;i&&i.length>0&&(e.isBeginning?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),s&&s.length>0&&(e.isEnd?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))},onPrevClick(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init(){const e=this,t=e.params.navigation;if(!t.nextEl&&!t.prevEl)return;let s,i;t.nextEl&&(s=Y(t.nextEl),e.params.uniqueNavElements&&"string"==typeof t.nextEl&&s.length>1&&1===e.$el.find(t.nextEl).length&&(s=e.$el.find(t.nextEl))),t.prevEl&&(i=Y(t.prevEl),e.params.uniqueNavElements&&"string"==typeof t.prevEl&&i.length>1&&1===e.$el.find(t.prevEl).length&&(i=e.$el.find(t.prevEl))),s&&s.length>0&&s.on("click",e.navigation.onNextClick),i&&i.length>0&&i.on("click",e.navigation.onPrevClick),W.extend(e.navigation,{$nextEl:s,nextEl:s&&s[0],$prevEl:i,prevEl:i&&i[0]})},destroy(){const e=this,{$nextEl:t,$prevEl:s}=e.navigation;t&&t.length&&(t.off("click",e.navigation.onNextClick),t.removeClass(e.params.navigation.disabledClass)),s&&s.length&&(s.off("click",e.navigation.onPrevClick),s.removeClass(e.params.navigation.disabledClass))}};const $e={update(){const e=this,t=e.rtl,s=e.params.pagination;if(!s.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length)return;const i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,a=e.pagination.$el;let n;const r=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(n=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),n>i-1-2*e.loopedSlides&&(n-=i-2*e.loopedSlides),n>r-1&&(n-=r),n<0&&"bullets"!==e.params.paginationType&&(n=r+n)):n=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const i=e.pagination.bullets;let r,o,l;if(s.dynamicBullets&&(e.pagination.bulletSize=i.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),s.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=n-e.previousIndex,e.pagination.dynamicBulletIndex>s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),r=n-e.pagination.dynamicBulletIndex,o=r+(Math.min(i.length,s.dynamicMainBullets)-1),l=(o+r)/2),i.removeClass(`${s.bulletActiveClass} ${s.bulletActiveClass}-next ${s.bulletActiveClass}-next-next ${s.bulletActiveClass}-prev ${s.bulletActiveClass}-prev-prev ${s.bulletActiveClass}-main`),a.length>1)i.each((e,t)=>{const i=Y(t),a=i.index();a===n&&i.addClass(s.bulletActiveClass),s.dynamicBullets&&(a>=r&&a<=o&&i.addClass(s.bulletActiveClass+"-main"),a===r&&i.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),a===o&&i.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else{if(i.eq(n).addClass(s.bulletActiveClass),s.dynamicBullets){const e=i.eq(r),t=i.eq(o);for(let a=r;a<=o;a+=1)i.eq(a).addClass(s.bulletActiveClass+"-main");e.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),t.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),n=(e.pagination.bulletSize*a-e.pagination.bulletSize)/2-l*e.pagination.bulletSize,r=t?"right":"left";i.css(e.isHorizontal()?r:"top",n+"px")}}if("fraction"===s.type&&(a.find("."+s.currentClass).text(s.formatFractionCurrent(n+1)),a.find("."+s.totalClass).text(s.formatFractionTotal(r))),"progressbar"===s.type){let t;t=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const i=(n+1)/r;let o=1,l=1;"horizontal"===t?o=i:l=i,a.find("."+s.progressbarFillClass).transform(`translate3d(0,0,0) scaleX(${o}) scaleY(${l})`).transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(a.html(s.renderCustom(e,n+1,r)),e.emit("paginationRender",e,a[0])):e.emit("paginationUpdate",e,a[0]),a[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](s.lockClass)},render(){const e=this,t=e.params.pagination;if(!t.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length)return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el;let a="";if("bullets"===t.type){const n=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;for(let s=0;s<n;s+=1)t.renderBullet?a+=t.renderBullet.call(e,s,t.bulletClass):a+=`<${t.bulletElement} class="${t.bulletClass}"></${t.bulletElement}>`;i.html(a),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(a=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`,i.html(a)),"progressbar"===t.type&&(a=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`,i.html(a)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])},init(){const e=this,t=e.params.pagination;if(!t.el)return;let s=Y(t.el);0!==s.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&s.length>1&&1===e.$el.find(t.el).length&&(s=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&s.addClass(t.clickableClass),s.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(s.addClass(`${t.modifierClass}${t.type}-dynamic`),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&s.addClass(t.progressbarOppositeClass),t.clickable&&s.on("click","."+t.bulletClass,(function(t){t.preventDefault();let s=Y(this).index()*e.params.slidesPerGroup;e.params.loop&&(s+=e.loopedSlides),e.slideTo(s)})),W.extend(e.pagination,{$el:s,el:s[0]}))},destroy(){const e=this.params.pagination;if(!e.el||!this.pagination.el||!this.pagination.$el||0===this.pagination.$el.length)return;const t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}};const Me={setTranslate(){const e=this;if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t,rtlTranslate:s,progress:i}=e,{dragSize:a,trackSize:n,$dragEl:r,$el:o}=t,l=e.params.scrollbar;let d=a,c=(n-a)*i;s?(c=-c,c>0?(d=a-c,c=0):-c+a>n&&(d=n+c)):c<0?(d=a+c,c=0):c+a>n&&(d=n-c),e.isHorizontal()?(U.transforms3d?r.transform(`translate3d(${c}px, 0, 0)`):r.transform(`translateX(${c}px)`),r[0].style.width=d+"px"):(U.transforms3d?r.transform(`translate3d(0px, ${c}px, 0)`):r.transform(`translateY(${c}px)`),r[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout(()=>{o[0].style.opacity=0,o.transition(400)},1e3))},setTransition(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize(){const e=this;if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t}=e,{$dragEl:s,$el:i}=t;s[0].style.width="",s[0].style.height="";const a=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,r=n*(a/e.size);let o;o="auto"===e.params.scrollbar.dragSize?a*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?s[0].style.width=o+"px":s[0].style.height=o+"px",i[0].style.display=n>=1?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),W.extend(t,{trackSize:a,divider:n,moveDivider:r,dragSize:o}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)},getPointerPosition(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY},setDragPosition(e){const{scrollbar:t,rtlTranslate:s}=this,{$el:i,dragSize:a,trackSize:n,dragStartPos:r}=t;let o;o=(t.getPointerPosition(e)-i.offset()[this.isHorizontal()?"left":"top"]-(null!==r?r:a/2))/(n-a),o=Math.max(Math.min(o,1),0),s&&(o=1-o);const l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*o;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart(e){const t=this.params.scrollbar,{scrollbar:s,$wrapperEl:i}=this,{$el:a,$dragEl:n}=s;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===n[0]||e.target===n?s.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.transition(100),n.transition(100),s.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.emit("scrollbarDragStart",e)},onDragMove(e){const{scrollbar:t,$wrapperEl:s}=this,{$el:i,$dragEl:a}=t;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),s.transition(0),i.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd(e){const t=this,s=t.params.scrollbar,{scrollbar:i}=t,{$el:a}=i;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,s.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=W.nextTick(()=>{a.css("opacity",0),a.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())},enableDraggable(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,touchEventsTouch:s,touchEventsDesktop:i,params:a}=e,n=t.$el[0],r=!(!U.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!U.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};U.touch?(n.addEventListener(s.start,e.scrollbar.onDragStart,r),n.addEventListener(s.move,e.scrollbar.onDragMove,r),n.addEventListener(s.end,e.scrollbar.onDragEnd,o)):(n.addEventListener(i.start,e.scrollbar.onDragStart,r),G.addEventListener(i.move,e.scrollbar.onDragMove,r),G.addEventListener(i.end,e.scrollbar.onDragEnd,o))},disableDraggable(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,touchEventsTouch:s,touchEventsDesktop:i,params:a}=e,n=t.$el[0],r=!(!U.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!U.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};U.touch?(n.removeEventListener(s.start,e.scrollbar.onDragStart,r),n.removeEventListener(s.move,e.scrollbar.onDragMove,r),n.removeEventListener(s.end,e.scrollbar.onDragEnd,o)):(n.removeEventListener(i.start,e.scrollbar.onDragStart,r),G.removeEventListener(i.move,e.scrollbar.onDragMove,r),G.removeEventListener(i.end,e.scrollbar.onDragEnd,o))},init(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,$el:s}=e,i=e.params.scrollbar;let a=Y(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&a.length>1&&1===s.find(i.el).length&&(a=s.find(i.el));let n=a.find("."+e.params.scrollbar.dragClass);0===n.length&&(n=Y(`<div class="${e.params.scrollbar.dragClass}"></div>`),a.append(n)),W.extend(t,{$el:a,el:a[0],$dragEl:n,dragEl:n[0]}),i.draggable&&t.enableDraggable()},destroy(){this.scrollbar.disableDraggable()}};const Pe={setTransform(e,t){const{rtl:s}=this,i=Y(e),a=s?-1:1,n=i.attr("data-swiper-parallax")||"0";let r=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y");const l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(r||o?(r=r||"0",o=o||"0"):this.isHorizontal()?(r=n,o="0"):(o=n,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*a+"%":r*t*a+"px",o=o.indexOf("%")>=0?parseInt(o,10)*t+"%":o*t+"px",null!=d){const e=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=e}if(null==l)i.transform(`translate3d(${r}, ${o}, 0px)`);else{const e=l-(l-1)*(1-Math.abs(t));i.transform(`translate3d(${r}, ${o}, 0px) scale(${e})`)}},setTranslate(){const e=this,{$el:t,slides:s,progress:i,snapGrid:a}=e;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{e.parallax.setTransform(s,i)}),s.each((t,s)=>{let n=s.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-i*(a.length-1)),n=Math.min(Math.max(n,-1),1),Y(s).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{e.parallax.setTransform(s,n)})})},setTransition(e=this.params.speed){const{$el:t}=this;t.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{const i=Y(s);let a=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(a=0),i.transition(a)})}};const Oe={getDistanceBetweenTouches(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,s=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt((i-t)**2+(a-s)**2)},onGestureStart(e){const t=this,s=t.params.zoom,i=t.zoom,{gesture:a}=i;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!U.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=Oe.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=Y(e.target).closest(".swiper-slide"),0===a.$slideEl.length&&(a.$slideEl=t.slides.eq(t.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+s.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||s.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl.transition(0),t.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange(e){const t=this.params.zoom,s=this.zoom,{gesture:i}=s;if(!U.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;s.fakeGestureMoved=!0,i.scaleMove=Oe.getDistanceBetweenTouches(e)}i.$imageEl&&0!==i.$imageEl.length&&(U.gestures?s.scale=e.scale*s.currentScale:s.scale=i.scaleMove/i.scaleStart*s.currentScale,s.scale>i.maxRatio&&(s.scale=i.maxRatio-1+(s.scale-i.maxRatio+1)**.5),s.scale<t.minRatio&&(s.scale=t.minRatio+1-(t.minRatio-s.scale+1)**.5),i.$imageEl.transform(`translate3d(0,0,0) scale(${s.scale})`))},onGestureEnd(e){const t=this.params.zoom,s=this.zoom,{gesture:i}=s;if(!U.gestures){if(!s.fakeGestureTouched||!s.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!ne.android)return;s.fakeGestureTouched=!1,s.fakeGestureMoved=!1}i.$imageEl&&0!==i.$imageEl.length&&(s.scale=Math.max(Math.min(s.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform(`translate3d(0,0,0) scale(${s.scale})`),s.currentScale=s.scale,s.isScaling=!1,1===s.scale&&(i.$slideEl=void 0))},onTouchStart(e){const t=this.zoom,{gesture:s,image:i}=t;s.$imageEl&&0!==s.$imageEl.length&&(i.isTouched||(ne.android&&e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove(e){const t=this,s=t.zoom,{gesture:i,image:a,velocity:n}=s;if(!i.$imageEl||0===i.$imageEl.length)return;if(t.allowClick=!1,!a.isTouched||!i.$slideEl)return;a.isMoved||(a.width=i.$imageEl[0].offsetWidth,a.height=i.$imageEl[0].offsetHeight,a.startX=W.getTranslate(i.$imageWrapEl[0],"x")||0,a.startY=W.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&&(a.startX=-a.startX,a.startY=-a.startY));const r=a.width*s.scale,o=a.height*s.scale;if(!(r<i.slideWidth&&o<i.slideHeight)){if(a.minX=Math.min(i.slideWidth/2-r/2,0),a.maxX=-a.minX,a.minY=Math.min(i.slideHeight/2-o/2,0),a.maxY=-a.minY,a.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.isMoved&&!s.isScaling){if(t.isHorizontal()&&(Math.floor(a.minX)===Math.floor(a.startX)&&a.touchesCurrent.x<a.touchesStart.x||Math.floor(a.maxX)===Math.floor(a.startX)&&a.touchesCurrent.x>a.touchesStart.x))return void(a.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(a.minY)===Math.floor(a.startY)&&a.touchesCurrent.y<a.touchesStart.y||Math.floor(a.maxY)===Math.floor(a.startY)&&a.touchesCurrent.y>a.touchesStart.y))return void(a.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.isMoved=!0,a.currentX=a.touchesCurrent.x-a.touchesStart.x+a.startX,a.currentY=a.touchesCurrent.y-a.touchesStart.y+a.startY,a.currentX<a.minX&&(a.currentX=a.minX+1-(a.minX-a.currentX+1)**.8),a.currentX>a.maxX&&(a.currentX=a.maxX-1+(a.currentX-a.maxX+1)**.8),a.currentY<a.minY&&(a.currentY=a.minY+1-(a.minY-a.currentY+1)**.8),a.currentY>a.maxY&&(a.currentY=a.maxY-1+(a.currentY-a.maxY+1)**.8),n.prevPositionX||(n.prevPositionX=a.touchesCurrent.x),n.prevPositionY||(n.prevPositionY=a.touchesCurrent.y),n.prevTime||(n.prevTime=Date.now()),n.x=(a.touchesCurrent.x-n.prevPositionX)/(Date.now()-n.prevTime)/2,n.y=(a.touchesCurrent.y-n.prevPositionY)/(Date.now()-n.prevTime)/2,Math.abs(a.touchesCurrent.x-n.prevPositionX)<2&&(n.x=0),Math.abs(a.touchesCurrent.y-n.prevPositionY)<2&&(n.y=0),n.prevPositionX=a.touchesCurrent.x,n.prevPositionY=a.touchesCurrent.y,n.prevTime=Date.now(),i.$imageWrapEl.transform(`translate3d(${a.currentX}px, ${a.currentY}px,0)`)}},onTouchEnd(){const e=this.zoom,{gesture:t,image:s,velocity:i}=e;if(!t.$imageEl||0===t.$imageEl.length)return;if(!s.isTouched||!s.isMoved)return s.isTouched=!1,void(s.isMoved=!1);s.isTouched=!1,s.isMoved=!1;let a=300,n=300;const r=i.x*a,o=s.currentX+r,l=i.y*n,d=s.currentY+l;0!==i.x&&(a=Math.abs((o-s.currentX)/i.x)),0!==i.y&&(n=Math.abs((d-s.currentY)/i.y));const c=Math.max(a,n);s.currentX=o,s.currentY=d;const p=s.width*e.scale,u=s.height*e.scale;s.minX=Math.min(t.slideWidth/2-p/2,0),s.maxX=-s.minX,s.minY=Math.min(t.slideHeight/2-u/2,0),s.maxY=-s.minY,s.currentX=Math.max(Math.min(s.currentX,s.maxX),s.minX),s.currentY=Math.max(Math.min(s.currentY,s.maxY),s.minY),t.$imageWrapEl.transition(c).transform(`translate3d(${s.currentX}px, ${s.currentY}px,0)`)},onTransitionEnd(){const e=this.zoom,{gesture:t}=e;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle(e){const t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in(e){const t=this,s=t.zoom,i=t.params.zoom,{gesture:a,image:n}=s;if(a.$slideEl||(a.$slideEl=t.clickedSlide?Y(t.clickedSlide):t.slides.eq(t.activeIndex),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+i.containerClass)),!a.$imageEl||0===a.$imageEl.length)return;let r,o,l,d,c,p,u,h,m,f,g,v,b,w,y,x,E,S;a.$slideEl.addClass(""+i.zoomedSlideClass),void 0===n.touchesStart.x&&e?(r="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,o="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(r=n.touchesStart.x,o=n.touchesStart.y),s.scale=a.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,s.currentScale=a.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,e?(E=a.$slideEl[0].offsetWidth,S=a.$slideEl[0].offsetHeight,l=a.$slideEl.offset().left,d=a.$slideEl.offset().top,c=l+E/2-r,p=d+S/2-o,m=a.$imageEl[0].offsetWidth,f=a.$imageEl[0].offsetHeight,g=m*s.scale,v=f*s.scale,b=Math.min(E/2-g/2,0),w=Math.min(S/2-v/2,0),y=-b,x=-w,u=c*s.scale,h=p*s.scale,u<b&&(u=b),u>y&&(u=y),h<w&&(h=w),h>x&&(h=x)):(u=0,h=0),a.$imageWrapEl.transition(300).transform(`translate3d(${u}px, ${h}px,0)`),a.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${s.scale})`)},out(){const e=this,t=e.zoom,s=e.params.zoom,{gesture:i}=t;i.$slideEl||(i.$slideEl=e.clickedSlide?Y(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+s.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+s.zoomedSlideClass),i.$slideEl=void 0)},enable(){const e=this,t=e.zoom;if(t.enabled)return;t.enabled=!0;const s=!("touchstart"!==e.touchEvents.start||!U.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};U.gestures?(e.$wrapperEl.on("gesturestart",".swiper-slide",t.onGestureStart,s),e.$wrapperEl.on("gesturechange",".swiper-slide",t.onGestureChange,s),e.$wrapperEl.on("gestureend",".swiper-slide",t.onGestureEnd,s)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,".swiper-slide",t.onGestureStart,s),e.$wrapperEl.on(e.touchEvents.move,".swiper-slide",t.onGestureChange,s),e.$wrapperEl.on(e.touchEvents.end,".swiper-slide",t.onGestureEnd,s)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)},disable(){const e=this,t=e.zoom;if(!t.enabled)return;e.zoom.enabled=!1;const s=!("touchstart"!==e.touchEvents.start||!U.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};U.gestures?(e.$wrapperEl.off("gesturestart",".swiper-slide",t.onGestureStart,s),e.$wrapperEl.off("gesturechange",".swiper-slide",t.onGestureChange,s),e.$wrapperEl.off("gestureend",".swiper-slide",t.onGestureEnd,s)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,".swiper-slide",t.onGestureStart,s),e.$wrapperEl.off(e.touchEvents.move,".swiper-slide",t.onGestureChange,s),e.$wrapperEl.off(e.touchEvents.end,".swiper-slide",t.onGestureEnd,s)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}};const ze={loadInSlide(e,t=!0){const s=this,i=s.params.lazy;if(void 0===e)return;if(0===s.slides.length)return;const a=s.virtual&&s.params.virtual.enabled?s.$wrapperEl.children(`.${s.params.slideClass}[data-swiper-slide-index="${e}"]`):s.slides.eq(e);let n=a.find(`.${i.elementClass}:not(.${i.loadedClass}):not(.${i.loadingClass})`);!a.hasClass(i.elementClass)||a.hasClass(i.loadedClass)||a.hasClass(i.loadingClass)||(n=n.add(a[0])),0!==n.length&&n.each((e,n)=>{const r=Y(n);r.addClass(i.loadingClass);const o=r.attr("data-background"),l=r.attr("data-src"),d=r.attr("data-srcset"),c=r.attr("data-sizes");s.loadImage(r[0],l||o,d,c,!1,()=>{if(null!=s&&s&&(!s||s.params)&&!s.destroyed){if(o?(r.css("background-image",`url("${o}")`),r.removeAttr("data-background")):(d&&(r.attr("srcset",d),r.removeAttr("data-srcset")),c&&(r.attr("sizes",c),r.removeAttr("data-sizes")),l&&(r.attr("src",l),r.removeAttr("data-src"))),r.addClass(i.loadedClass).removeClass(i.loadingClass),a.find("."+i.preloaderClass).remove(),s.params.loop&&t){const e=a.attr("data-swiper-slide-index");if(a.hasClass(s.params.slideDuplicateClass)){const t=s.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${s.params.slideDuplicateClass})`);s.lazy.loadInSlide(t.index(),!1)}else{const t=s.$wrapperEl.children(`.${s.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`);s.lazy.loadInSlide(t.index(),!1)}}s.emit("lazyImageReady",a[0],r[0])}}),s.emit("lazyImageLoad",a[0],r[0])})},load(){const e=this,{$wrapperEl:t,params:s,slides:i,activeIndex:a}=e,n=e.virtual&&s.virtual.enabled,r=s.lazy;let o=s.slidesPerView;function l(e){if(n){if(t.children(`.${s.slideClass}[data-swiper-slide-index="${e}"]`).length)return!0}else if(i[e])return!0;return!1}function d(e){return n?Y(e).attr("data-swiper-slide-index"):Y(e).index()}if("auto"===o&&(o=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+s.slideVisibleClass).each((t,s)=>{const i=n?Y(s).attr("data-swiper-slide-index"):Y(s).index();e.lazy.loadInSlide(i)});else if(o>1)for(let c=a;c<a+o;c+=1)l(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(a);if(r.loadPrevNext)if(o>1||r.loadPrevNextAmount&&r.loadPrevNextAmount>1){const t=r.loadPrevNextAmount,s=o,n=Math.min(a+s+Math.max(t,s),i.length),d=Math.max(a-Math.max(s,t),0);for(let i=a+o;i<n;i+=1)l(i)&&e.lazy.loadInSlide(i);for(let i=d;i<a;i+=1)l(i)&&e.lazy.loadInSlide(i)}else{const i=t.children("."+s.slideNextClass);i.length>0&&e.lazy.loadInSlide(d(i));const a=t.children("."+s.slidePrevClass);a.length>0&&e.lazy.loadInSlide(d(a))}}};const Ie={LinearSpline:function(e,t){const s=function(){let e,t,s;return(i,a)=>{for(t=-1,e=i.length;e-t>1;)s=e+t>>1,i[s]<=a?t=s:e=s;return e}}();let i,a;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(a=s(this.x,e),i=a-1,(e-this.x[i])*(this.y[a]-this.y[i])/(this.x[a]-this.x[i])+this.y[i]):0},this},getInterpolateFunction(e){const t=this;t.controller.spline||(t.controller.spline=t.params.loop?new Ie.LinearSpline(t.slidesGrid,e.slidesGrid):new Ie.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate(e,t){const s=this,i=s.controller.control;let a,n;function r(e){const t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),n=-s.controller.spline.interpolate(-t)),n&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),n=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(i))for(let o=0;o<i.length;o+=1)i[o]!==t&&i[o]instanceof me&&r(i[o]);else i instanceof me&&t!==i&&r(i)},setTransition(e,t){const s=this,i=s.controller.control;let a;function n(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.params.autoHeight&&W.nextTick(()=>{t.updateAutoHeight()}),t.$wrapperEl.transitionEnd(()=>{i&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(i))for(a=0;a<i.length;a+=1)i[a]!==t&&i[a]instanceof me&&n(i[a]);else i instanceof me&&t!==i&&n(i)}};const Le={makeElFocusable:e=>(e.attr("tabIndex","0"),e),addElRole:(e,t)=>(e.attr("role",t),e),addElLabel:(e,t)=>(e.attr("aria-label",t),e),disableEl:e=>(e.attr("aria-disabled",!0),e),enableEl:e=>(e.attr("aria-disabled",!1),e),onEnterKey(e){const t=this,s=t.params.a11y;if(13!==e.keyCode)return;const i=Y(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(s.lastSlideMessage):t.a11y.notify(s.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(s.firstSlideMessage):t.a11y.notify(s.prevSlideMessage)),t.pagination&&i.is("."+t.params.pagination.bulletClass)&&i[0].click()},notify(e){const t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation(){const e=this;if(e.params.loop)return;const{$nextEl:t,$prevEl:s}=e.navigation;s&&s.length>0&&(e.isBeginning?e.a11y.disableEl(s):e.a11y.enableEl(s)),t&&t.length>0&&(e.isEnd?e.a11y.disableEl(t):e.a11y.enableEl(t))},updatePagination(){const e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((s,i)=>{const a=Y(i);e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,t.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init(){const e=this;e.$el.append(e.a11y.liveRegion);const t=e.params.a11y;let s,i;e.navigation&&e.navigation.$nextEl&&(s=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(i=e.navigation.$prevEl),s&&(e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.nextSlideMessage),s.on("keydown",e.a11y.onEnterKey)),i&&(e.a11y.makeElFocusable(i),e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,t.prevSlideMessage),i.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy(){const e=this;let t,s;e.a11y.liveRegion&&e.a11y.liveRegion.length>0&&e.a11y.liveRegion.remove(),e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(s=e.navigation.$prevEl),t&&t.off("keydown",e.a11y.onEnterKey),s&&s.off("keydown",e.a11y.onEnterKey),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.off("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)}};const je={init(){const e=this;if(!e.params.history)return;if(!R.history||!R.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);const t=e.history;t.initialized=!0,t.paths=je.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||R.addEventListener("popstate",e.history.setHistoryPopState))},destroy(){const e=this;e.params.history.replaceState||R.removeEventListener("popstate",e.history.setHistoryPopState)},setHistoryPopState(){this.history.paths=je.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues(){const e=R.location.pathname.slice(1).split("/").filter(e=>""!==e),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory(e,t){if(!this.history.initialized||!this.params.history.enabled)return;const s=this.slides.eq(t);let i=je.slugify(s.attr("data-history"));R.location.pathname.includes(e)||(i=`${e}/${i}`);const a=R.history.state;a&&a.value===i||(this.params.history.replaceState?R.history.replaceState({value:i},null,i):R.history.pushState({value:i},null,i))},slugify:e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),scrollToSlide(e,t,s){const i=this;if(t)for(let a=0,n=i.slides.length;a<n;a+=1){const n=i.slides.eq(a);if(je.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){const t=n.index();i.slideTo(t,e,s)}}else i.slideTo(0,e,s)}};const De={onHashCange(){const e=this,t=G.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){const s=e.$wrapperEl.children(`.${e.params.slideClass}[data-hash="${t}"]`).index();if(void 0===s)return;e.slideTo(s)}},setHash(){const e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&R.history&&R.history.replaceState)R.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||"");else{const t=e.slides.eq(e.activeIndex),s=t.attr("data-hash")||t.attr("data-history");G.location.hash=s||""}},init(){const e=this;if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;e.hashNavigation.initialized=!0;const t=G.location.hash.replace("#","");if(t){const s=0;for(let i=0,a=e.slides.length;i<a;i+=1){const a=e.slides.eq(i);if((a.attr("data-hash")||a.attr("data-history"))===t&&!a.hasClass(e.params.slideDuplicateClass)){const t=a.index();e.slideTo(t,s,e.params.runCallbacksOnInit,!0)}}}e.params.hashNavigation.watchState&&Y(R).on("hashchange",e.hashNavigation.onHashCange)},destroy(){const e=this;e.params.hashNavigation.watchState&&Y(R).off("hashchange",e.hashNavigation.onHashCange)}};const Ae={run(){const e=this,t=e.slides.eq(e.activeIndex);let s=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(s=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=W.nextTick(()=>{e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},s)},start(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop(){const e=this;return!!e.autoplay.running&&(void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause(e){const t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}};const _e={setTranslate(){const e=this,{slides:t}=e;for(let s=0;s<t.length;s+=1){const t=e.slides.eq(s);let i=-t[0].swiperSlideOffset;e.params.virtualTranslate||(i-=e.translate);let a=0;e.isHorizontal()||(a=i,i=0);const n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);t.css({opacity:n}).transform(`translate3d(${i}px, ${a}px, 0px)`)}},setTransition(e){const t=this,{slides:s,$wrapperEl:i}=t;if(s.transition(e),t.params.virtualTranslate&&0!==e){let e=!1;s.transitionEnd(()=>{if(e)return;if(!t||t.destroyed)return;e=!0,t.animating=!1;const s=["webkitTransitionEnd","transitionend"];for(let e=0;e<s.length;e+=1)i.trigger(s[e])})}}};const Ne={setTranslate(){const{$el:e,$wrapperEl:t,slides:s,width:i,height:a,rtlTranslate:n,size:r}=this,o=this.params.cubeEffect,l=this.isHorizontal(),d=this.virtual&&this.params.virtual.enabled;let c,p=0;o.shadow&&(l?(c=t.find(".swiper-cube-shadow"),0===c.length&&(c=Y('<div class="swiper-cube-shadow"></div>'),t.append(c)),c.css({height:i+"px"})):(c=e.find(".swiper-cube-shadow"),0===c.length&&(c=Y('<div class="swiper-cube-shadow"></div>'),e.append(c))));for(let h=0;h<s.length;h+=1){const e=s.eq(h);let t=h;d&&(t=parseInt(e.attr("data-swiper-slide-index"),10));let i=90*t,a=Math.floor(i/360);n&&(i=-i,a=Math.floor(-i/360));const c=Math.max(Math.min(e[0].progress,1),-1);let u=0,m=0,f=0;t%4==0?(u=4*-a*r,f=0):(t-1)%4==0?(u=0,f=4*-a*r):(t-2)%4==0?(u=r+4*a*r,f=r):(t-3)%4==0&&(u=-r,f=3*r+4*r*a),n&&(u=-u),l||(m=u,u=0);const g=`rotateX(${l?0:-i}deg) rotateY(${l?i:0}deg) translate3d(${u}px, ${m}px, ${f}px)`;if(c<=1&&c>-1&&(p=90*t+90*c,n&&(p=90*-t-90*c)),e.transform(g),o.slideShadows){let t=l?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),s=l?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${l?"left":"top"}"></div>`),e.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${l?"right":"bottom"}"></div>`),e.append(s)),t.length&&(t[0].style.opacity=Math.max(-c,0)),s.length&&(s[0].style.opacity=Math.max(c,0))}}if(t.css({"-webkit-transform-origin":`50% 50% -${r/2}px`,"-moz-transform-origin":`50% 50% -${r/2}px`,"-ms-transform-origin":`50% 50% -${r/2}px`,"transform-origin":`50% 50% -${r/2}px`}),o.shadow)if(l)c.transform(`translate3d(0px, ${i/2+o.shadowOffset}px, ${-i/2}px) rotateX(90deg) rotateZ(0deg) scale(${o.shadowScale})`);else{const e=Math.abs(p)-90*Math.floor(Math.abs(p)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=o.shadowScale,i=o.shadowScale/t,n=o.shadowOffset;c.transform(`scale3d(${s}, 1, ${i}) translate3d(0px, ${a/2+n}px, ${-a/2/i}px) rotateX(-90deg)`)}const u=K.isSafari||K.isUiWebView?-r/2:0;t.transform(`translate3d(0px,0,${u}px) rotateX(${this.isHorizontal()?0:p}deg) rotateY(${this.isHorizontal()?-p:0}deg)`)},setTransition(e){const{$el:t,slides:s}=this;s.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}};const He={setTranslate(){const e=this,{slides:t,rtlTranslate:s}=e;for(let i=0;i<t.length;i+=1){const a=t.eq(i);let n=a[0].progress;e.params.flipEffect.limitRotation&&(n=Math.max(Math.min(a[0].progress,1),-1));let r=-180*n,o=0,l=-a[0].swiperSlideOffset,d=0;if(e.isHorizontal()?s&&(r=-r):(d=l,l=0,o=-r,r=0),a[0].style.zIndex=-Math.abs(Math.round(n))+t.length,e.params.flipEffect.slideShadows){let t=e.isHorizontal()?a.find(".swiper-slide-shadow-left"):a.find(".swiper-slide-shadow-top"),s=e.isHorizontal()?a.find(".swiper-slide-shadow-right"):a.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${e.isHorizontal()?"left":"top"}"></div>`),a.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${e.isHorizontal()?"right":"bottom"}"></div>`),a.append(s)),t.length&&(t[0].style.opacity=Math.max(-n,0)),s.length&&(s[0].style.opacity=Math.max(n,0))}a.transform(`translate3d(${l}px, ${d}px, 0px) rotateX(${o}deg) rotateY(${r}deg)`)}},setTransition(e){const t=this,{slides:s,activeIndex:i,$wrapperEl:a}=t;if(s.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){let e=!1;s.eq(i).transitionEnd((function(){if(e)return;if(!t||t.destroyed)return;e=!0,t.animating=!1;const s=["webkitTransitionEnd","transitionend"];for(let e=0;e<s.length;e+=1)a.trigger(s[e])}))}}};const Be={setTranslate(){const{width:e,height:t,slides:s,$wrapperEl:i,slidesSizesGrid:a}=this,n=this.params.coverflowEffect,r=this.isHorizontal(),o=this.translate,l=r?e/2-o:t/2-o,d=r?n.rotate:-n.rotate,c=n.depth;for(let p=0,u=s.length;p<u;p+=1){const e=s.eq(p),t=a[p],i=(l-e[0].swiperSlideOffset-t/2)/t*n.modifier;let o=r?d*i:0,u=r?0:d*i,h=-c*Math.abs(i),m=r?0:n.stretch*i,f=r?n.stretch*i:0;Math.abs(f)<.001&&(f=0),Math.abs(m)<.001&&(m=0),Math.abs(h)<.001&&(h=0),Math.abs(o)<.001&&(o=0),Math.abs(u)<.001&&(u=0);const g=`translate3d(${f}px,${m}px,${h}px) rotateX(${u}deg) rotateY(${o}deg)`;if(e.transform(g),e[0].style.zIndex=1-Math.abs(Math.round(i)),n.slideShadows){let t=r?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),s=r?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${r?"left":"top"}"></div>`),e.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${r?"right":"bottom"}"></div>`),e.append(s)),t.length&&(t[0].style.opacity=i>0?i:0),s.length&&(s[0].style.opacity=-i>0?-i:0)}}if(U.pointerEvents||U.prefixedPointerEvents){i[0].style.perspectiveOrigin=l+"px 50%"}},setTransition(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}};const Ve={init(){const e=this,{thumbs:t}=e.params,s=e.constructor;t.swiper instanceof s?(e.thumbs.swiper=t.swiper,W.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),W.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):W.isObject(t.swiper)&&(e.thumbs.swiper=new s(W.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick(){const e=this,t=e.thumbs.swiper;if(!t)return;const s=t.clickedIndex,i=t.clickedSlide;if(i&&Y(i).hasClass(e.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let a;if(a=t.params.loop?parseInt(Y(t.clickedSlide).attr("data-swiper-slide-index"),10):s,e.params.loop){let t=e.activeIndex;e.slides.eq(t).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,t=e.activeIndex);const s=e.slides.eq(t).prevAll(`[data-swiper-slide-index="${a}"]`).eq(0).index(),i=e.slides.eq(t).nextAll(`[data-swiper-slide-index="${a}"]`).eq(0).index();a=void 0===s?i:void 0===i?s:i-t<t-s?i:s}e.slideTo(a)},update(e){const t=this,s=t.thumbs.swiper;if(!s)return;const i="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;if(t.realIndex!==s.realIndex){let a,n=s.activeIndex;if(s.params.loop){s.slides.eq(n).hasClass(s.params.slideDuplicateClass)&&(s.loopFix(),s._clientLeft=s.$wrapperEl[0].clientLeft,n=s.activeIndex);const e=s.slides.eq(n).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(),i=s.slides.eq(n).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index();a=void 0===e?i:void 0===i?e:i-n==n-e?n:i-n<n-e?i:e}else a=t.realIndex;s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(a)<0&&(s.params.centeredSlides?a=a>n?a-Math.floor(i/2)+1:a+Math.floor(i/2)-1:a>n&&(a=a-i+1),s.slideTo(a,e?0:void 0))}let a=1;const n=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(a=t.params.slidesPerView),s.slides.removeClass(n),s.params.loop||s.params.virtual)for(let r=0;r<a;r+=1)s.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex+r}"]`).addClass(n);else for(let r=0;r<a;r+=1)s.slides.eq(t.realIndex+r).addClass(n)}};const Ge=[fe,ge,ve,be,ye,Ee,Te,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create(){W.extend(this,{mousewheel:{enabled:!1,enable:Ce.enable.bind(this),disable:Ce.disable.bind(this),handle:Ce.handle.bind(this),handleMouseEnter:Ce.handleMouseEnter.bind(this),handleMouseLeave:Ce.handleMouseLeave.bind(this),lastScrollTime:W.now()}})},on:{init(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create(){W.extend(this,{navigation:{init:ke.init.bind(this),update:ke.update.bind(this),destroy:ke.destroy.bind(this),onNextClick:ke.onNextClick.bind(this),onPrevClick:ke.onPrevClick.bind(this)}})},on:{init(){this.navigation.init(),this.navigation.update()},toEdge(){this.navigation.update()},fromEdge(){this.navigation.update()},destroy(){this.navigation.destroy()},click(e){const t=this,{$nextEl:s,$prevEl:i}=t.navigation;if(t.params.navigation.hideOnClick&&!Y(e.target).is(i)&&!Y(e.target).is(s)){let e;s?e=s.hasClass(t.params.navigation.hiddenClass):i&&(e=i.hasClass(t.params.navigation.hiddenClass)),!0===e?t.emit("navigationShow",t):t.emit("navigationHide",t),s&&s.toggleClass(t.params.navigation.hiddenClass),i&&i.toggleClass(t.params.navigation.hiddenClass)}}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create(){W.extend(this,{pagination:{init:$e.init.bind(this),render:$e.render.bind(this),update:$e.update.bind(this),destroy:$e.destroy.bind(this),dynamicBulletIndex:0}})},on:{init(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange(){const e=this;(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange(){const e=this;e.params.loop||e.pagination.update()},slidesLengthChange(){const e=this;e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange(){const e=this;e.params.loop||(e.pagination.render(),e.pagination.update())},destroy(){this.pagination.destroy()},click(e){const t=this;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&t.pagination.$el.length>0&&!Y(e.target).hasClass(t.params.pagination.bulletClass)){!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create(){W.extend(this,{scrollbar:{init:Me.init.bind(this),destroy:Me.destroy.bind(this),updateSize:Me.updateSize.bind(this),setTranslate:Me.setTranslate.bind(this),setTransition:Me.setTransition.bind(this),enableDraggable:Me.enableDraggable.bind(this),disableDraggable:Me.disableDraggable.bind(this),setDragPosition:Me.setDragPosition.bind(this),getPointerPosition:Me.getPointerPosition.bind(this),onDragStart:Me.onDragStart.bind(this),onDragMove:Me.onDragMove.bind(this),onDragEnd:Me.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update(){this.scrollbar.updateSize()},resize(){this.scrollbar.updateSize()},observerUpdate(){this.scrollbar.updateSize()},setTranslate(){this.scrollbar.setTranslate()},setTransition(e){this.scrollbar.setTransition(e)},destroy(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create(){W.extend(this,{parallax:{setTransform:Pe.setTransform.bind(this),setTranslate:Pe.setTranslate.bind(this),setTransition:Pe.setTransition.bind(this)}})},on:{beforeInit(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create(){const e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(s=>{t[s]=Oe[s].bind(e)}),W.extend(e,{zoom:t});let s=1;Object.defineProperty(e.zoom,"scale",{get:()=>s,set(t){if(s!==t){const s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,i=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,i)}s=t}})},on:{init(){const e=this;e.params.zoom.enabled&&e.zoom.enable()},destroy(){this.zoom.disable()},touchStart(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap(e){const t=this;t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&t.zoom.toggle(e)},transitionEnd(){const e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create(){W.extend(this,{lazy:{initialImageLoaded:!1,load:ze.load.bind(this),loadInSlide:ze.loadInSlide.bind(this)}})},on:{beforeInit(){const e=this;e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init(){const e=this;e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll(){const e=this;e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize(){const e=this;e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove(){const e=this;e.params.lazy.enabled&&e.lazy.load()},transitionStart(){const e=this;e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd(){const e=this;e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create(){W.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:Ie.getInterpolateFunction.bind(this),setTranslate:Ie.setTranslate.bind(this),setTransition:Ie.setTransition.bind(this)}})},on:{update(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create(){const e=this;W.extend(e,{a11y:{liveRegion:Y(`<span class="${e.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}}),Object.keys(Le).forEach(t=>{e.a11y[t]=Le[t].bind(e)})},on:{init(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create(){W.extend(this,{history:{init:je.init.bind(this),setHistory:je.setHistory.bind(this),setHistoryPopState:je.setHistoryPopState.bind(this),scrollToSlide:je.scrollToSlide.bind(this),destroy:je.destroy.bind(this)}})},on:{init(){const e=this;e.params.history.enabled&&e.history.init()},destroy(){const e=this;e.params.history.enabled&&e.history.destroy()},transitionEnd(){const e=this;e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create(){W.extend(this,{hashNavigation:{initialized:!1,init:De.init.bind(this),destroy:De.destroy.bind(this),setHash:De.setHash.bind(this),onHashCange:De.onHashCange.bind(this)}})},on:{init(){const e=this;e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy(){const e=this;e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd(){const e=this;e.hashNavigation.initialized&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create(){const e=this;W.extend(e,{autoplay:{running:!1,paused:!1,run:Ae.run.bind(e),start:Ae.start.bind(e),stop:Ae.stop.bind(e),pause:Ae.pause.bind(e),onTransitionEnd(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init(){const e=this;e.params.autoplay.enabled&&e.autoplay.start()},beforeTransitionStart(e,t){const s=this;s.autoplay.running&&(t||!s.params.autoplay.disableOnInteraction?s.autoplay.pause(e):s.autoplay.stop())},sliderFirstMove(){const e=this;e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},destroy(){const e=this;e.autoplay.running&&e.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create(){W.extend(this,{fadeEffect:{setTranslate:_e.setTranslate.bind(this),setTransition:_e.setTransition.bind(this)}})},on:{beforeInit(){if("fade"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"fade");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create(){W.extend(this,{cubeEffect:{setTranslate:Ne.setTranslate.bind(this),setTransition:Ne.setTransition.bind(this)}})},on:{beforeInit(){if("cube"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create(){W.extend(this,{flipEffect:{setTranslate:He.setTranslate.bind(this),setTransition:He.setTransition.bind(this)}})},on:{beforeInit(){if("flip"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create(){W.extend(this,{coverflowEffect:{setTranslate:Be.setTranslate.bind(this),setTransition:Be.setTransition.bind(this)}})},on:{beforeInit(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create(){W.extend(this,{thumbs:{swiper:null,init:Ve.init.bind(this),update:Ve.update.bind(this),onThumbClick:Ve.onThumbClick.bind(this)}})},on:{beforeInit(){const{thumbs:e}=this.params;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange(){this.thumbs.swiper&&this.thumbs.update()},update(){this.thumbs.swiper&&this.thumbs.update()},resize(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate(){this.thumbs.swiper&&this.thumbs.update()},setTransition(e){const t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy(){const e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];void 0===me.use&&(me.use=me.Class.use,me.installModule=me.Class.installModule),me.use(Ge);var Re=me,Xe=(s(36),"wp-block-newspack-blocks-carousel__autoplay-playing");function Ye(e,t){Array.prototype.forEach.call(e,t)}function Fe(e){e.setAttribute("aria-hidden","false"),Ye(e.querySelectorAll("a"),(function(e){return e.removeAttribute("tabindex")}))}function qe(e){e.setAttribute("aria-hidden","true"),Ye(e.querySelectorAll("a"),(function(e){return e.setAttribute("tabindex","-1")}))}var We=function(e){f()(s,e);var t=v()(s);function s(e){var i;return p()(this,s),(i=t.call(this,e)).btnPlayRef=Object(o.createRef)(),i.btnPauseRef=Object(o.createRef)(),i.btnNextRef=Object(o.createRef)(),i.btnPrevRef=Object(o.createRef)(),i.carouselRef=Object(o.createRef)(),i.paginationRef=Object(o.createRef)(),i}return h()(s,[{key:"componentDidMount",value:function(){this.initializeSwiper(0)}},{key:"componentDidUpdate",value:function(e){var t=this.props,s=t.attributes,i=t.latestPosts;if(e.latestPosts!==i||e.latestPosts&&i&&e.latestPosts.length!==i.length||!Object(b.isEqual)(e.attributes,s)){var a=0;this.swiperInstance&&(i&&this.swiperInstance.realIndex<i.length&&(a=this.swiperInstance.realIndex),this.swiperInstance.destroy(!0,!0)),this.initializeSwiper(a)}}},{key:"initializeSwiper",value:function(e){var t=this.props.latestPosts;if(t&&t.length){var s=this.props.attributes,i=s.autoplay,a=s.delay;this.swiperInstance=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=new Re(e.container,{a11y:!1,autoplay:!!t.autoplay&&{delay:t.delay,disableOnInteraction:!1},effect:"slide",grabCursor:!0,init:!1,initialSlide:t.initialSlide||0,loop:!0,navigation:{nextEl:e.next,prevEl:e.prev},pagination:{bulletElement:"button",clickable:!0,el:e.pagination,type:"bullets",renderBullet:function(e,t){return'<button class="'.concat(t,'"><span>').concat(Object(d.sprintf)(Object(d.__)("Slide %s","full-site-editing"),e+1),"</span></button>")}},preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,touchStartPreventDefault:!1,on:{init:function(){Ye(this.wrapperEl.querySelectorAll(".swiper-slide"),(function(e){return qe(e)})),Fe(this.slides[this.activeIndex])},slideChange:function(){var e=this.slides[this.activeIndex];if(qe(this.slides[this.previousIndex]),Fe(e),!this.autoplay.running){var t=e.querySelector("img"),s=!!t&&t.alt,i=Object(d.sprintf)(Object(d.__)("Slide %s of %s","full-site-editing"),this.realIndex+1,this.pagination.bullets.length);Object(B.speak)(Object(V.escapeHTML)("".concat(e.innerText,",\n\t\t\t\t\t\t\t").concat(s?Object(d.sprintf)(Object(d.__)("Image: %s, ","full-site-editing"),s):"","\n\t\t\t\t\t\t\t").concat(i)),"assertive")}}}});if(t.autoplay){function i(){s.autoplay.stop(),e.play.focus()}function a(){s.autoplay.start(),e.pause.focus()}s.on("init",(function(){e.play.addEventListener("click",a),e.pause.addEventListener("click",i)})),s.on("autoplayStart",(function(){e.block.classList.add(Xe),Object(B.speak)(Object(d.__)("Playing","full-site-editing"),"assertive")})),s.on("autoplayStop",(function(){e.block.classList.remove(Xe),Object(B.speak)(Object(d.__)("Paused","full-site-editing"),"assertive")})),s.on("beforeDestroy",(function(){e.play.removeEventListener("click",a),e.pause.removeEventListener("click",i)}))}return s.init(),s}({block:this.carouselRef.current,container:this.carouselRef.current,next:this.btnNextRef.current,prev:this.btnPrevRef.current,play:this.btnPlayRef.current,pause:this.btnPauseRef.current,pagination:this.paginationRef.current},{autoplay:i,delay:1e3*a,initialSlide:e})}}},{key:"render",value:function(){var e=this.props,t=e.attributes,s=e.className,i=e.setAttributes,a=e.latestPosts,n=t.authors,r=t.autoplay,c=t.categories,p=t.delay,u=t.postsToShow,h=t.showCategory,m=t.showDate,f=t.showAuthor,g=t.showAvatar,v=t.tags,b=y()(s,"wp-block-newspack-blocks-carousel","swiper-container",r&&"wp-block-newspack-blocks-carousel__autoplay-playing"),w=Object(x.__experimentalGetSettings)().formats.date;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:b,ref:this.carouselRef},a&&!a.length&&Object(o.createElement)(l.Placeholder,null,Object(d.__)("Sorry, no posts were found.")),!a&&Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(l.Spinner,null),className:"component-placeholder__align-center"}),a&&Object(o.createElement)(o.Fragment,null,r&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"amp-carousel-button-pause amp-carousel-button",ref:this.btnPauseRef}),Object(o.createElement)("button",{className:"amp-carousel-button-play amp-carousel-button",ref:this.btnPlayRef})),Object(o.createElement)("div",{className:"swiper-wrapper"},a.map((function(e){return e.newspack_featured_image_src&&Object(o.createElement)("article",{className:"post-has-image swiper-slide",key:e.id},Object(o.createElement)("figure",{className:"post-thumbnail"},e.newspack_featured_image_src&&Object(o.createElement)("a",{href:"#",rel:"bookmark"},Object(o.createElement)("img",{src:e.newspack_featured_image_src.large,alt:""}))),Object(o.createElement)("div",{className:"entry-wrapper"},h&&e.newspack_category_info.length&&Object(o.createElement)("div",{className:"cat-links"},Object(o.createElement)("a",{href:"#"},Object(C.decodeEntities)(e.newspack_category_info))),Object(o.createElement)("h3",{className:"entry-title"},Object(o.createElement)("a",{href:"#"},Object(C.decodeEntities)(e.title.rendered.trim()))),Object(o.createElement)("div",{className:"entry-meta"},f&&g&&e.newspack_author_info.map((function(e){return Object(o.createElement)("span",{className:"avatar author-avatar",key:e.id},Object(o.createElement)("a",{className:"url fn n",href:e.author_link},Object(o.createElement)(o.RawHTML,null,e.avatar)))})),f&&function(e){return Object(o.createElement)("span",{className:"byline"},Object(d._x)("by","post author","newspack-blocks")," ",e.reduce((function(t,s,i){return[].concat(A()(t),[Object(o.createElement)("span",{className:"author vcard",key:s.id},Object(o.createElement)("a",{className:"url fn n",href:s.author_link},s.display_name)),i<e.length-2&&", ",e.length>1&&i===e.length-2&&Object(d._x)(" and ","post author","newspack-blocks")])}),[]))}(e.newspack_author_info),m&&Object(o.createElement)("time",{className:"entry-date published",key:"pub-date"},Object(x.dateI18n)(w,e.date_gmt)))))}))),Object(o.createElement)("button",{className:"amp-carousel-button amp-carousel-button-prev swiper-button-prev",ref:this.btnPrevRef}),Object(o.createElement)("button",{className:"amp-carousel-button amp-carousel-button-next swiper-button-next",ref:this.btnNextRef}),Object(o.createElement)("div",{className:"swiper-pagination-bullets amp-pagination",ref:this.paginationRef}))),Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Display Settings"),initialOpen:!0},u&&Object(o.createElement)(H,{enableSpecific:!1,numberOfItems:u,onNumberOfItemsChange:function(e){return i({postsToShow:e||1})},authors:n,onAuthorsChange:function(e){return i({authors:e})},categories:c,onCategoriesChange:function(e){return i({categories:e})},tags:v,onTagsChange:function(e){return i({tags:e})}})),Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Slideshow Settings"),initialOpen:!0},Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Autoplay"),help:Object(d.__)("Autoplay between slides"),checked:r,onChange:function(e){i({autoplay:e})}}),r&&Object(o.createElement)(l.RangeControl,{label:Object(d.__)("Delay between transitions (in seconds)"),value:p,onChange:function(e){i({delay:e})},min:1,max:20})),Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Article Meta Settings","full-site-editing")},Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Date","full-site-editing"),checked:m,onChange:function(){return i({showDate:!m})}})),Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Category","full-site-editing"),checked:h,onChange:function(){return i({showCategory:!h})}})),Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Author","full-site-editing"),checked:f,onChange:function(){return i({showAuthor:!f})}})),f&&Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Author Avatar","full-site-editing"),checked:g,onChange:function(){return i({showAvatar:!g})}})))))}}]),s}(o.Component),Ue=Object(T.compose)([Object(S.withSelect)((function(e,t){var s=t.attributes,i=s.postsToShow,a=s.authors,n=s.categories,r=s.tags;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(b.pickBy)({per_page:i,categories:n,author:a,tags:r,meta_key:"_thumbnail_id",meta_value_num:0,meta_compare:">"},(function(e){return!Object(b.isUndefined)(e)})))}}))])(We),Ke=(s(37),s(38),{title:Object(d.__)("Post Carousel"),icon:Object(o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)(l.Path,{d:"M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"})),category:"newspack",keywords:[Object(d.__)("posts"),Object(d.__)("slideshow"),Object(d.__)("carousel")],description:Object(d.__)("A carousel of posts."),attributes:{className:{type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:5},postsToShow:{type:"integer",default:3},authors:{type:"array"},categories:{type:"array"},tags:{type:"array"},showDate:{type:"boolean",default:!0},showAuthor:{type:"boolean",default:!0},showAvatar:{type:"boolean",default:!0},showCategory:{type:"boolean",default:!1}},supports:{html:!1,align:!1},edit:Ue,save:function(){return null}});Object(r.addFilter)("blocks.transforms_from_name","set-transformed-block-name",(function(e){return"newspack-blocks/carousel"!==e?e:"a8c/posts-carousel"})),Object(n.registerBlockType)("a8c/posts-carousel",a()({},Ke,{category:"layout"}))}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var s={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var n=typeof i;if("string"===n||"number"===n)e.push(i);else if(Array.isArray(i)&&i.length){var r=a.apply(null,i);r&&e.push(r)}else if("object"===n)for(var o in i)s.call(i,o)&&i[o]&&e.push(o)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(i=function(){return a}.apply(t,[]))||(e.exports=i)}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function s(){return e.exports=s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},s.apply(this,arguments)}e.exports=s},function(e,t){!function(){e.exports=this.wp.escapeHtml}()},function(e,t){function s(t,i){return e.exports=s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(t,i)}e.exports=s},function(e,t){function s(t){return e.exports=s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(t)}e.exports=s},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,s){var i=s(30),a=s(4);e.exports=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?a(e):t}},function(e,t){function s(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=s=function(e){return typeof e}:e.exports=s=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(t)}e.exports=s},function(e,t,s){var i=s(16);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,s){var i=s(16);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(s):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?i(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,s){},function(e,t,s){},function(e,t,s){},function(e,t,s){},function(e,t,s){"use strict";s.r(t);var i=s(17),a=s.n(i),n=s(18),r=s(19),o=s(0),l=s(2),d=s(1),c=s(8),p=s.n(c),u=s(12),h=s.n(u),f=s(9),m=s.n(f),g=s(10),v=s.n(g),b=s(11),y=s(20),w=s.n(y),x=s(15),E=s(21),S=s(22),T=s(23),C=s(5),$=s(24),k=s.n($),M=s(4),P=s.n(M),O=s(3),z=s.n(O),I=s(6),L=s.n(I),j=s(7),D=s(13),A=s.n(D),_=(s(35),function(e){m()(s,e);var t=v()(s);function s(e){var i;return p()(this,s),i=t.call(this,e),z()(P()(i),"isFetchingInfoOnLoad",(function(){var e=i.props,t=e.tokens,s=e.fetchSavedInfo;return Boolean(t.length&&s)})),i.state={suggestions:[],validValues:{},loading:i.isFetchingInfoOnLoad()},i.debouncedUpdateSuggestions=Object(b.debounce)(i.updateSuggestions,500),i}return h()(s,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,s=t.tokens;(0,t.fetchSavedInfo)(s).then((function(t){var s=e.state.validValues;t.forEach((function(e){s[e.value]=e.label})),e.setState({validValues:s,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,s){return t[s]?[].concat(A()(e),[t[s]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(s){return t[s]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,s=this.props.fetchSuggestions;s&&this.setState({loading:!0},(function(){var i=s(e);i.then((function(e){if(t.suggestionsRequest===i){var s=t.state.validValues,a=[];e.forEach((function(e){a.push(e.label),s[e.value]=e.label})),t.setState({suggestions:a,validValues:s,loading:!1})}})).catch((function(){t.suggestionsRequest===i&&t.setState({loading:!1})})),t.suggestionsRequest=i}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,s=t.help,i=t.label,a=void 0===i?"":i,n=this.state,r=n.suggestions,d=n.loading;return Object(o.createElement)("div",{className:"autocomplete-tokenfield"},Object(o.createElement)(l.FormTokenField,{value:this.getTokens(),suggestions:r,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:a}),d&&Object(o.createElement)(l.Spinner,null),s&&Object(o.createElement)("p",{className:"autocomplete-tokenfield__help"},s))}}]),s}(o.Component)),N=function(e){m()(s,e);var t=v()(s);function s(){var e;p()(this,s);for(var i=arguments.length,a=new Array(i),n=0;n<i;n++)a[n]=arguments[n];return e=t.call.apply(t,[this].concat(a)),z()(P()(e),"state",{showAdvancedFilters:!1}),z()(P()(e),"fetchPostSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,_fields:"id,title",type:"post"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"fetchSavedPosts",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/posts",{per_page:100,include:e.join(","),_fields:"id,title"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.title.rendered)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"fetchAuthorSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/users",{search:e,per_page:20,_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no name)","full-site-editing")}}))}))})),z()(P()(e),"fetchSavedAuthors",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/users",{per_page:100,include:e.join(","),_fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no name)","full-site-editing")}}))}))})),z()(P()(e),"fetchCategorySuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"fetchSavedCategories",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"fetchTagSuggestions",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"fetchSavedTags",(function(e){return L()({path:Object(j.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:Object(C.decodeEntities)(e.name)||Object(d.__)("(no title)","full-site-editing")}}))}))})),z()(P()(e),"render",(function(){var t=e.props,s=t.specificMode,i=t.onSpecificModeChange,a=t.specificPosts,n=t.onSpecificPostsChange,r=t.authors,c=t.onAuthorsChange,p=t.categories,u=t.onCategoriesChange,h=t.tags,f=t.onTagsChange,m=t.tagExclusions,g=t.onTagExclusionsChange,v=t.enableSpecific,b=e.state.showAdvancedFilters;return[v&&Object(o.createElement)(l.ToggleControl,{key:"specificMode",checked:s,onChange:i,label:Object(d.__)("Choose Specific Posts","full-site-editing")}),s&&Object(o.createElement)(_,{key:"posts",tokens:a||[],onChange:n,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:Object(d.__)("Posts","full-site-editing"),help:Object(d.__)("Begin typing post title, click autocomplete result to select.","full-site-editing")}),!s&&Object(o.createElement)(l.QueryControls,k()({key:"queryControls"},e.props)),!s&&c&&Object(o.createElement)(_,{key:"authors",tokens:r||[],onChange:c,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:Object(d.__)("Authors","full-site-editing")}),!s&&u&&Object(o.createElement)(_,{key:"categories",tokens:p||[],onChange:u,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:Object(d.__)("Categories","full-site-editing")}),!s&&f&&Object(o.createElement)(_,{key:"tags",tokens:h||[],onChange:f,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(d.__)("Tags","full-site-editing")}),!s&&g&&Object(o.createElement)("p",{key:"toggle-advanced-filters"},Object(o.createElement)(l.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!b})}},b?Object(d.__)("Hide Advanced Filters","full-site-editing"):Object(d.__)("Show Advanced Filters","full-site-editing"))),!s&&g&&b&&Object(o.createElement)(_,{key:"tag-exclusion",tokens:m||[],onChange:g,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:Object(d.__)("Excluded Tags","full-site-editing")})]})),e}return s}(o.Component);N.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],tagExclusions:[]};var H=N,B=s(14),V=s(25),G="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,R="undefined"==typeof window?{document:G,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window;class X{constructor(e){const t=this;for(let s=0;s<e.length;s+=1)t[s]=e[s];return t.length=e.length,this}}function Y(e,t){const s=[];let i=0;if(e&&!t&&e instanceof X)return e;if(e)if("string"==typeof e){let a,n;const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";for(0===r.indexOf("<li")&&(e="ul"),0===r.indexOf("<tr")&&(e="tbody"),0!==r.indexOf("<td")&&0!==r.indexOf("<th")||(e="tr"),0===r.indexOf("<tbody")&&(e="table"),0===r.indexOf("<option")&&(e="select"),n=G.createElement(e),n.innerHTML=r,i=0;i<n.childNodes.length;i+=1)s.push(n.childNodes[i])}else for(a=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||G).querySelectorAll(e.trim()):[G.getElementById(e.trim().split("#")[1])],i=0;i<a.length;i+=1)a[i]&&s.push(a[i])}else if(e.nodeType||e===R||e===G)s.push(e);else if(e.length>0&&e[0].nodeType)for(i=0;i<e.length;i+=1)s.push(e[i]);return new X(s)}function F(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}Y.fn=X.prototype,Y.Class=X,Y.Dom7=X;"resize scroll".split(" ");const q={addClass:function(e){if(void 0===e)return this;const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.add(t[s]);return this},removeClass:function(e){const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.remove(t[s]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){const t=e.split(" ");for(let s=0;s<t.length;s+=1)for(let e=0;e<this.length;e+=1)void 0!==this[e]&&void 0!==this[e].classList&&this[e].classList.toggle(t[s]);return this},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){let s;if(void 0!==t){for(let i=0;i<this.length;i+=1)s=this[i],s.dom7ElementDataStorage||(s.dom7ElementDataStorage={}),s.dom7ElementDataStorage[e]=t;return this}if(s=this[0],s){if(s.dom7ElementDataStorage&&e in s.dom7ElementDataStorage)return s.dom7ElementDataStorage[e];const t=s.getAttribute("data-"+e);return t||void 0}},transform:function(e){for(let t=0;t<this.length;t+=1){const s=this[t].style;s.webkitTransform=e,s.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(let t=0;t<this.length;t+=1){const s=this[t].style;s.webkitTransitionDuration=e,s.transitionDuration=e}return this},on:function(...e){let[t,s,i,a]=e;function n(e){const t=e.target;if(!t)return;const a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),Y(t).is(s))i.apply(t,a);else{const e=Y(t).parents();for(let t=0;t<e.length;t+=1)Y(e[t]).is(s)&&i.apply(e[t],a)}}function r(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),i.apply(this,t)}"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const o=t.split(" ");let l;for(let d=0;d<this.length;d+=1){const e=this[d];if(s)for(l=0;l<o.length;l+=1){const t=o[l];e.dom7LiveListeners||(e.dom7LiveListeners={}),e.dom7LiveListeners[t]||(e.dom7LiveListeners[t]=[]),e.dom7LiveListeners[t].push({listener:i,proxyListener:n}),e.addEventListener(t,n,a)}else for(l=0;l<o.length;l+=1){const t=o[l];e.dom7Listeners||(e.dom7Listeners={}),e.dom7Listeners[t]||(e.dom7Listeners[t]=[]),e.dom7Listeners[t].push({listener:i,proxyListener:r}),e.addEventListener(t,r,a)}}return this},off:function(...e){let[t,s,i,a]=e;"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const n=t.split(" ");for(let r=0;r<n.length;r+=1){const e=n[r];for(let t=0;t<this.length;t+=1){const n=this[t];let r;if(!s&&n.dom7Listeners?r=n.dom7Listeners[e]:s&&n.dom7LiveListeners&&(r=n.dom7LiveListeners[e]),r&&r.length)for(let t=r.length-1;t>=0;t-=1){const s=r[t];i&&s.listener===i||i&&s.listener&&s.listener.dom7proxy&&s.listener.dom7proxy===i?(n.removeEventListener(e,s.proxyListener,a),r.splice(t,1)):i||(n.removeEventListener(e,s.proxyListener,a),r.splice(t,1))}}}return this},trigger:function(...e){const t=e[0].split(" "),s=e[1];for(let a=0;a<t.length;a+=1){const n=t[a];for(let t=0;t<this.length;t+=1){const a=this[t];let r;try{r=new R.CustomEvent(n,{detail:s,bubbles:!0,cancelable:!0})}catch(i){r=G.createEvent("Event"),r.initEvent(n,!0,!0),r.detail=s}a.dom7EventData=e.filter((e,t)=>t>0),a.dispatchEvent(r),a.dom7EventData=[],delete a.dom7EventData}}return this},transitionEnd:function(e){const t=["webkitTransitionEnd","transitionend"],s=this;let i;function a(n){if(n.target===this)for(e.call(this,n),i=0;i<t.length;i+=1)s.off(t[i],a)}if(e)for(i=0;i<t.length;i+=1)s.on(t[i],a);return this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){const e=this[0],t=e.getBoundingClientRect(),s=G.body,i=e.clientTop||s.clientTop||0,a=e.clientLeft||s.clientLeft||0,n=e===R?R.scrollY:e.scrollTop,r=e===R?R.scrollX:e.scrollLeft;return{top:t.top+n-i,left:t.left+r-a}}return null},css:function(e,t){let s;if(1===arguments.length){if("string"!=typeof e){for(s=0;s<this.length;s+=1)for(let t in e)this[s].style[t]=e[t];return this}if(this[0])return R.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(s=0;s<this.length;s+=1)this[s].style[e]=t;return this}return this},each:function(e){if(!e)return this;for(let t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=this[0];let s,i;if(!t||void 0===e)return!1;if("string"==typeof e){if(t.matches)return t.matches(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);for(s=Y(e),i=0;i<s.length;i+=1)if(s[i]===t)return!0;return!1}if(e===G)return t===G;if(e===R)return t===R;if(e.nodeType||e instanceof X){for(s=e.nodeType?[e]:e,i=0;i<s.length;i+=1)if(s[i]===t)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;let s;return e>t-1?new X([]):e<0?(s=t+e,new X(s<0?[]:[this[s]])):new X([this[e]])},append:function(...e){let t;for(let s=0;s<e.length;s+=1){t=e[s];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const s=G.createElement("div");for(s.innerHTML=t;s.firstChild;)this[e].appendChild(s.firstChild)}else if(t instanceof X)for(let s=0;s<t.length;s+=1)this[e].appendChild(t[s]);else this[e].appendChild(t)}return this},prepend:function(e){let t,s;for(t=0;t<this.length;t+=1)if("string"==typeof e){const i=G.createElement("div");for(i.innerHTML=e,s=i.childNodes.length-1;s>=0;s-=1)this[t].insertBefore(i.childNodes[s],this[t].childNodes[0])}else if(e instanceof X)for(s=0;s<e.length;s+=1)this[t].insertBefore(e[s],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&Y(this[0].nextElementSibling).is(e)?new X([this[0].nextElementSibling]):new X([]):this[0].nextElementSibling?new X([this[0].nextElementSibling]):new X([]):new X([])},nextAll:function(e){const t=[];let s=this[0];if(!s)return new X([]);for(;s.nextElementSibling;){const i=s.nextElementSibling;e?Y(i).is(e)&&t.push(i):t.push(i),s=i}return new X(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&Y(t.previousElementSibling).is(e)?new X([t.previousElementSibling]):new X([]):t.previousElementSibling?new X([t.previousElementSibling]):new X([])}return new X([])},prevAll:function(e){const t=[];let s=this[0];if(!s)return new X([]);for(;s.previousElementSibling;){const i=s.previousElementSibling;e?Y(i).is(e)&&t.push(i):t.push(i),s=i}return new X(t)},parent:function(e){const t=[];for(let s=0;s<this.length;s+=1)null!==this[s].parentNode&&(e?Y(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode));return Y(F(t))},parents:function(e){const t=[];for(let s=0;s<this.length;s+=1){let i=this[s].parentNode;for(;i;)e?Y(i).is(e)&&t.push(i):t.push(i),i=i.parentNode}return Y(F(t))},closest:function(e){let t=this;return void 0===e?new X([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].querySelectorAll(e);for(let e=0;e<i.length;e+=1)t.push(i[e])}return new X(t)},children:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].childNodes;for(let s=0;s<i.length;s+=1)e?1===i[s].nodeType&&Y(i[s]).is(e)&&t.push(i[s]):1===i[s].nodeType&&t.push(i[s])}return new X(F(t))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(...e){const t=this;let s,i;for(s=0;s<e.length;s+=1){const a=Y(e[s]);for(i=0;i<a.length;i+=1)t[t.length]=a[i],t.length+=1}return t},styles:function(){return this[0]?R.getComputedStyle(this[0],null):{}}};Object.keys(q).forEach(e=>{Y.fn[e]=Y.fn[e]||q[e]});const W={deleteProps(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(s){}try{delete t[e]}catch(s){}})},nextTick:(e,t=0)=>setTimeout(e,t),now:()=>Date.now(),getTranslate(e,t="x"){let s,i,a;const n=R.getComputedStyle(e,null);return R.WebKitCSSMatrix?(i=n.transform||n.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new R.WebKitCSSMatrix("none"===i?"":i)):(a=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),s=a.toString().split(",")),"x"===t&&(i=R.WebKitCSSMatrix?a.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(i=R.WebKitCSSMatrix?a.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),i||0},parseUrlQuery(e){const t={};let s,i,a,n,r=e||R.location.href;if("string"==typeof r&&r.length)for(r=r.indexOf("?")>-1?r.replace(/\S*\?/,""):"",i=r.split("&").filter(e=>""!==e),n=i.length,s=0;s<n;s+=1)a=i[s].replace(/#\S+/g,"").split("="),t[decodeURIComponent(a[0])]=void 0===a[1]?void 0:decodeURIComponent(a[1])||"";return t},isObject:e=>"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object,extend(...e){const t=Object(e[0]);for(let s=1;s<e.length;s+=1){const i=e[s];if(null!=i){const e=Object.keys(Object(i));for(let s=0,a=e.length;s<a;s+=1){const a=e[s],n=Object.getOwnPropertyDescriptor(i,a);void 0!==n&&n.enumerable&&(W.isObject(t[a])&&W.isObject(i[a])?W.extend(t[a],i[a]):!W.isObject(t[a])&&W.isObject(i[a])?(t[a]={},W.extend(t[a],i[a])):t[a]=i[a])}}}return t}},U=function(){const e=G.createElement("div");return{touch:R.Modernizr&&!0===R.Modernizr.touch||!!(R.navigator.maxTouchPoints>0||"ontouchstart"in R||R.DocumentTouch&&G instanceof R.DocumentTouch),pointerEvents:!!(R.navigator.pointerEnabled||R.PointerEvent||"maxTouchPoints"in R.navigator&&R.navigator.maxTouchPoints>0),prefixedPointerEvents:!!R.navigator.msPointerEnabled,transition:function(){const t=e.style;return"transition"in t||"webkitTransition"in t||"MozTransition"in t}(),transforms3d:R.Modernizr&&!0===R.Modernizr.csstransforms3d||function(){const t=e.style;return"webkitPerspective"in t||"MozPerspective"in t||"OPerspective"in t||"MsPerspective"in t||"perspective"in t}(),flexbox:function(){const t=e.style,s="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" ");for(let e=0;e<s.length;e+=1)if(s[e]in t)return!0;return!1}(),observer:"MutationObserver"in R||"WebkitMutationObserver"in R,passiveListener:function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get(){e=!0}});R.addEventListener("testPassiveListener",null,t)}catch(t){}return e}(),gestures:"ongesturestart"in R}}(),K={isIE:!!R.navigator.userAgent.match(/Trident/g)||!!R.navigator.userAgent.match(/MSIE/g),isEdge:!!R.navigator.userAgent.match(/Edge/g),isSafari:function(){const e=R.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(R.navigator.userAgent)};class Q{constructor(e={}){const t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(e=>{t.on(e,t.params.on[e])})}on(e,t,s){const i=this;if("function"!=typeof t)return i;const a=s?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)}),i}once(e,t,s){const i=this;if("function"!=typeof t)return i;function a(...s){t.apply(i,s),i.off(e,a),a.f7proxy&&delete a.f7proxy}return a.f7proxy=t,i.on(e,a,s)}off(e,t){const s=this;return s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].length&&s.eventsListeners[e].forEach((i,a)=>{(i===t||i.f7proxy&&i.f7proxy===t)&&s.eventsListeners[e].splice(a,1)})}),s):s}emit(...e){const t=this;if(!t.eventsListeners)return t;let s,i,a;return"string"==typeof e[0]||Array.isArray(e[0])?(s=e[0],i=e.slice(1,e.length),a=t):(s=e[0].events,i=e[0].data,a=e[0].context||t),(Array.isArray(s)?s:s.split(" ")).forEach(e=>{if(t.eventsListeners&&t.eventsListeners[e]){const s=[];t.eventsListeners[e].forEach(e=>{s.push(e)}),s.forEach(e=>{e.apply(a,i)})}}),t}useModulesParams(e){const t=this;t.modules&&Object.keys(t.modules).forEach(s=>{const i=t.modules[s];i.params&&W.extend(e,i.params)})}useModules(e={}){const t=this;t.modules&&Object.keys(t.modules).forEach(s=>{const i=t.modules[s],a=e[s]||{};i.instance&&Object.keys(i.instance).forEach(e=>{const s=i.instance[e];t[e]="function"==typeof s?s.bind(t):s}),i.on&&t.on&&Object.keys(i.on).forEach(e=>{t.on(e,i.on[e])}),i.create&&i.create.bind(t)(a)})}static set components(e){this.use&&this.use(e)}static installModule(e,...t){const s=this;s.prototype.modules||(s.prototype.modules={});const i=e.name||`${Object.keys(s.prototype.modules).length}_${W.now()}`;return s.prototype.modules[i]=e,e.proto&&Object.keys(e.proto).forEach(t=>{s.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(t=>{s[t]=e.static[t]}),e.install&&e.install.apply(s,t),s}static use(e,...t){const s=this;return Array.isArray(e)?(e.forEach(e=>s.installModule(e)),s):s.installModule(e,...t)}}var Z={updateSize:function(){const e=this;let t,s;const i=e.$el;t=void 0!==e.params.width?e.params.width:i[0].clientWidth,s=void 0!==e.params.height?e.params.height:i[0].clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),s=s-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),W.extend(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this,t=e.params,{$wrapperEl:s,size:i,rtlTranslate:a,wrongRTL:n}=e,r=e.virtual&&t.virtual.enabled,o=r?e.virtual.slides.length:e.slides.length,l=s.children("."+e.params.slideClass),d=r?e.virtual.slides.length:l.length;let c=[];const p=[],u=[];let h=t.slidesOffsetBefore;"function"==typeof h&&(h=t.slidesOffsetBefore.call(e));let f=t.slidesOffsetAfter;"function"==typeof f&&(f=t.slidesOffsetAfter.call(e));const m=e.snapGrid.length,g=e.snapGrid.length;let v,b,y=t.spaceBetween,w=-h,x=0,E=0;if(void 0===i)return;"string"==typeof y&&y.indexOf("%")>=0&&(y=parseFloat(y.replace("%",""))/100*i),e.virtualSize=-y,a?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(v=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(v=Math.max(v,t.slidesPerView*t.slidesPerColumn)));const S=t.slidesPerColumn,T=v/S,C=Math.floor(d/t.slidesPerColumn);for(let k=0;k<d;k+=1){b=0;const s=l.eq(k);if(t.slidesPerColumn>1){let i,a,n;if("column"===t.slidesPerColumnFill||"row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){if("column"===t.slidesPerColumnFill)a=Math.floor(k/S),n=k-a*S,(a>C||a===C&&n===S-1)&&(n+=1,n>=S&&(n=0,a+=1));else{const e=Math.floor(k/t.slidesPerGroup);n=Math.floor(k/t.slidesPerView)-e*t.slidesPerColumn,a=k-n*t.slidesPerView-e*t.slidesPerView}i=a+n*v/S,s.css({"-webkit-box-ordinal-group":i,"-moz-box-ordinal-group":i,"-ms-flex-order":i,"-webkit-order":i,order:i})}else n=Math.floor(k/T),a=k-n*T;s.css("margin-"+(e.isHorizontal()?"top":"left"),0!==n&&t.spaceBetween&&t.spaceBetween+"px").attr("data-swiper-column",a).attr("data-swiper-row",n)}if("none"!==s.css("display")){if("auto"===t.slidesPerView){const i=R.getComputedStyle(s[0],null),a=s[0].style.transform,n=s[0].style.webkitTransform;if(a&&(s[0].style.transform="none"),n&&(s[0].style.webkitTransform="none"),t.roundLengths)b=e.isHorizontal()?s.outerWidth(!0):s.outerHeight(!0);else if(e.isHorizontal()){const e=parseFloat(i.getPropertyValue("width")),t=parseFloat(i.getPropertyValue("padding-left")),s=parseFloat(i.getPropertyValue("padding-right")),a=parseFloat(i.getPropertyValue("margin-left")),n=parseFloat(i.getPropertyValue("margin-right")),r=i.getPropertyValue("box-sizing");b=r&&"border-box"===r&&!K.isIE?e+a+n:e+t+s+a+n}else{const e=parseFloat(i.getPropertyValue("height")),t=parseFloat(i.getPropertyValue("padding-top")),s=parseFloat(i.getPropertyValue("padding-bottom")),a=parseFloat(i.getPropertyValue("margin-top")),n=parseFloat(i.getPropertyValue("margin-bottom")),r=i.getPropertyValue("box-sizing");b=r&&"border-box"===r&&!K.isIE?e+a+n:e+t+s+a+n}a&&(s[0].style.transform=a),n&&(s[0].style.webkitTransform=n),t.roundLengths&&(b=Math.floor(b))}else b=(i-(t.slidesPerView-1)*y)/t.slidesPerView,t.roundLengths&&(b=Math.floor(b)),l[k]&&(e.isHorizontal()?l[k].style.width=b+"px":l[k].style.height=b+"px");l[k]&&(l[k].swiperSlideSize=b),u.push(b),t.centeredSlides?(w=w+b/2+x/2+y,0===x&&0!==k&&(w=w-i/2-y),0===k&&(w=w-i/2-y),Math.abs(w)<.001&&(w=0),t.roundLengths&&(w=Math.floor(w)),E%t.slidesPerGroup==0&&c.push(w),p.push(w)):(t.roundLengths&&(w=Math.floor(w)),E%t.slidesPerGroup==0&&c.push(w),p.push(w),w=w+b+y),e.virtualSize+=b+y,x=b,E+=1}}let $;if(e.virtualSize=Math.max(e.virtualSize,i)+f,a&&n&&("slide"===t.effect||"coverflow"===t.effect)&&s.css({width:e.virtualSize+t.spaceBetween+"px"}),U.flexbox&&!t.setWrapperSize||(e.isHorizontal()?s.css({width:e.virtualSize+t.spaceBetween+"px"}):s.css({height:e.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(e.virtualSize=(b+t.spaceBetween)*v,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?s.css({width:e.virtualSize+t.spaceBetween+"px"}):s.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){$=[];for(let s=0;s<c.length;s+=1){let i=c[s];t.roundLengths&&(i=Math.floor(i)),c[s]<e.virtualSize+c[0]&&$.push(i)}c=$}if(!t.centeredSlides){$=[];for(let s=0;s<c.length;s+=1){let a=c[s];t.roundLengths&&(a=Math.floor(a)),c[s]<=e.virtualSize-i&&$.push(a)}c=$,Math.floor(e.virtualSize-i)-Math.floor(c[c.length-1])>1&&c.push(e.virtualSize-i)}if(0===c.length&&(c=[0]),0!==t.spaceBetween&&(e.isHorizontal()?a?l.css({marginLeft:y+"px"}):l.css({marginRight:y+"px"}):l.css({marginBottom:y+"px"})),t.centerInsufficientSlides){let e=0;if(u.forEach(s=>{e+=s+(t.spaceBetween?t.spaceBetween:0)}),e-=t.spaceBetween,e<i){const t=(i-e)/2;c.forEach((e,s)=>{c[s]=e-t}),p.forEach((e,s)=>{p[s]=e+t})}}W.extend(e,{slides:l,snapGrid:c,slidesGrid:p,slidesSizesGrid:u}),d!==o&&e.emit("slidesLengthChange"),c.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==g&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()},updateAutoHeight:function(e){const t=this,s=[];let i,a=0;if("number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed),"auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length)break;s.push(t.slides.eq(e)[0])}else s.push(t.slides.eq(t.activeIndex)[0]);for(i=0;i<s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;a=e>a?e:a}a&&t.$wrapperEl.css("height",a+"px")},updateSlidesOffset:function(){const e=this,t=e.slides;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:i,rtlTranslate:a}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;a&&(n=e),i.removeClass(s.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let r=0;r<i.length;r+=1){const e=i[r],o=(n+(s.centeredSlides?t.minTranslate():0)-e.swiperSlideOffset)/(e.swiperSlideSize+s.spaceBetween);if(s.watchSlidesVisibility){const a=-(n-e.swiperSlideOffset),o=a+t.slidesSizesGrid[r];(a>=0&&a<t.size-1||o>1&&o<=t.size||a<=0&&o>=t.size)&&(t.visibleSlides.push(e),t.visibleSlidesIndexes.push(r),i.eq(r).addClass(s.slideVisibleClass))}e.progress=a?-o:o}t.visibleSlides=Y(t.visibleSlides)},updateProgress:function(e=this&&this.translate||0){const t=this,s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:n,isEnd:r}=t;const o=n,l=r;0===i?(a=0,n=!0,r=!0):(a=(e-t.minTranslate())/i,n=a<=0,r=a>=1),W.extend(t,{progress:a,isBeginning:n,isEnd:r}),(s.watchSlidesProgress||s.watchSlidesVisibility)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),r&&!l&&t.emit("reachEnd toEdge"),(o&&!n||l&&!r)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,$wrapperEl:i,activeIndex:a,realIndex:n}=e,r=e.virtual&&s.virtual.enabled;let o;t.removeClass(`${s.slideActiveClass} ${s.slideNextClass} ${s.slidePrevClass} ${s.slideDuplicateActiveClass} ${s.slideDuplicateNextClass} ${s.slideDuplicatePrevClass}`),o=r?e.$wrapperEl.find(`.${s.slideClass}[data-swiper-slide-index="${a}"]`):t.eq(a),o.addClass(s.slideActiveClass),s.loop&&(o.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass));let l=o.nextAll("."+s.slideClass).eq(0).addClass(s.slideNextClass);s.loop&&0===l.length&&(l=t.eq(0),l.addClass(s.slideNextClass));let d=o.prevAll("."+s.slideClass).eq(0).addClass(s.slidePrevClass);s.loop&&0===d.length&&(d=t.eq(-1),d.addClass(s.slidePrevClass)),s.loop&&(l.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass),d.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass))},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:i,snapGrid:a,params:n,activeIndex:r,realIndex:o,snapIndex:l}=t;let d,c=e;if(void 0===c){for(let e=0;e<i.length;e+=1)void 0!==i[e+1]?s>=i[e]&&s<i[e+1]-(i[e+1]-i[e])/2?c=e:s>=i[e]&&s<i[e+1]&&(c=e+1):s>=i[e]&&(c=e);n.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(d=a.indexOf(s)>=0?a.indexOf(s):Math.floor(c/n.slidesPerGroup),d>=a.length&&(d=a.length-1),c===r)return void(d!==l&&(t.snapIndex=d,t.emit("snapIndexChange")));const p=parseInt(t.slides.eq(c).attr("data-swiper-slide-index")||c,10);W.extend(t,{snapIndex:d,realIndex:p,previousIndex:r,activeIndex:c}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),o!==p&&t.emit("realIndexChange"),(t.initialized||t.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,i=Y(e.target).closest("."+s.slideClass)[0];let a=!1;if(i)for(let n=0;n<t.slides.length;n+=1)t.slides[n]===i&&(a=!0);if(!i||!a)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(Y(i).attr("data-swiper-slide-index"),10):t.clickedIndex=Y(i).index(),s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var J={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:s,translate:i,$wrapperEl:a}=this;if(t.virtualTranslate)return s?-i:i;let n=W.getTranslate(a[0],e);return s&&(n=-n),n||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:a,$wrapperEl:n,progress:r}=s;let o,l=0,d=0;s.isHorizontal()?l=i?-e:e:d=e,a.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),a.virtualTranslate||(U.transforms3d?n.transform(`translate3d(${l}px, ${d}px, 0px)`):n.transform(`translate(${l}px, ${d}px)`)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?l:d;const c=s.maxTranslate()-s.minTranslate();o=0===c?0:(e-s.minTranslate())/c,o!==r&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var ee={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const s=this,{activeIndex:i,params:a,previousIndex:n}=s;a.autoHeight&&s.updateAutoHeight();let r=t;if(r||(r=i>n?"next":i<n?"prev":"reset"),s.emit("transitionStart"),e&&i!==n){if("reset"===r)return void s.emit("slideResetTransitionStart");s.emit("slideChangeTransitionStart"),"next"===r?s.emit("slideNextTransitionStart"):s.emit("slidePrevTransitionStart")}},transitionEnd:function(e=!0,t){const s=this,{activeIndex:i,previousIndex:a}=s;s.animating=!1,s.setTransition(0);let n=t;if(n||(n=i>a?"next":i<a?"prev":"reset"),s.emit("transitionEnd"),e&&i!==a){if("reset"===n)return void s.emit("slideResetTransitionEnd");s.emit("slideChangeTransitionEnd"),"next"===n?s.emit("slideNextTransitionEnd"):s.emit("slidePrevTransitionEnd")}}};var te={slideTo:function(e=0,t=this.params.speed,s=!0,i){const a=this;let n=e;n<0&&(n=0);const{params:r,snapGrid:o,slidesGrid:l,previousIndex:d,activeIndex:c,rtlTranslate:p}=a;if(a.animating&&r.preventInteractionOnTransition)return!1;let u=Math.floor(n/r.slidesPerGroup);u>=o.length&&(u=o.length-1),(c||r.initialSlide||0)===(d||0)&&s&&a.emit("beforeSlideChangeStart");const h=-o[u];if(a.updateProgress(h),r.normalizeSlideIndex)for(let m=0;m<l.length;m+=1)-Math.floor(100*h)>=Math.floor(100*l[m])&&(n=m);if(a.initialized&&n!==c){if(!a.allowSlideNext&&h<a.translate&&h<a.minTranslate())return!1;if(!a.allowSlidePrev&&h>a.translate&&h>a.maxTranslate()&&(c||0)!==n)return!1}let f;return f=n>c?"next":n<c?"prev":"reset",p&&-h===a.translate||!p&&h===a.translate?(a.updateActiveIndex(n),r.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==r.effect&&a.setTranslate(h),"reset"!==f&&(a.transitionStart(s,f),a.transitionEnd(s,f)),!1):(0!==t&&U.transition?(a.setTransition(t),a.setTranslate(h),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,i),a.transitionStart(s,f),a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(s,f))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd))):(a.setTransition(0),a.setTranslate(h),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,i),a.transitionStart(s,f),a.transitionEnd(s,f)),!0)},slideToLoop:function(e=0,t=this.params.speed,s=!0,i){const a=this;let n=e;return a.params.loop&&(n+=a.loopedSlides),a.slideTo(n,t,s,i)},slideNext:function(e=this.params.speed,t=!0,s){const i=this,{params:a,animating:n}=i;return a.loop?!n&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+a.slidesPerGroup,e,t,s)):i.slideTo(i.activeIndex+a.slidesPerGroup,e,t,s)},slidePrev:function(e=this.params.speed,t=!0,s){const i=this,{params:a,animating:n,snapGrid:r,slidesGrid:o,rtlTranslate:l}=i;if(a.loop){if(n)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const c=d(l?i.translate:-i.translate),p=r.map(e=>d(e)),u=(o.map(e=>d(e)),r[p.indexOf(c)],r[p.indexOf(c)-1]);let h;return void 0!==u&&(h=o.indexOf(u),h<0&&(h=i.activeIndex-1)),i.slideTo(h,e,t,s)},slideReset:function(e=this.params.speed,t=!0,s){return this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e=this.params.speed,t=!0,s){const i=this;let a=i.activeIndex;const n=Math.floor(a/i.params.slidesPerGroup);if(n<i.snapGrid.length-1){const e=i.rtlTranslate?i.translate:-i.translate,t=i.snapGrid[n];e-t>(i.snapGrid[n+1]-t)/2&&(a=i.params.slidesPerGroup)}return i.slideTo(a,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,n=e.clickedIndex;if(t.loop){if(e.animating)return;a=parseInt(Y(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?n<e.loopedSlides-i/2||n>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),W.nextTick(()=>{e.slideTo(n)})):e.slideTo(n):n>e.slides.length-i?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),W.nextTick(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}};var se={loopCreate:function(){const e=this,{params:t,$wrapperEl:s}=e;s.children(`.${t.slideClass}.${t.slideDuplicateClass}`).remove();let i=s.children("."+t.slideClass);if(t.loopFillGroupWithBlank){const e=t.slidesPerGroup-i.length%t.slidesPerGroup;if(e!==t.slidesPerGroup){for(let i=0;i<e;i+=1){const e=Y(G.createElement("div")).addClass(`${t.slideClass} ${t.slideBlankClass}`);s.append(e)}i=s.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=i.length),e.loopedSlides=parseInt(t.loopedSlides||t.slidesPerView,10),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>i.length&&(e.loopedSlides=i.length);const a=[],n=[];i.each((t,s)=>{const r=Y(s);t<e.loopedSlides&&n.push(s),t<i.length&&t>=i.length-e.loopedSlides&&a.push(s),r.attr("data-swiper-slide-index",t)});for(let r=0;r<n.length;r+=1)s.append(Y(n[r].cloneNode(!0)).addClass(t.slideDuplicateClass));for(let r=a.length-1;r>=0;r-=1)s.prepend(Y(a[r].cloneNode(!0)).addClass(t.slideDuplicateClass))},loopFix:function(){const e=this,{params:t,activeIndex:s,slides:i,loopedSlides:a,allowSlidePrev:n,allowSlideNext:r,snapGrid:o,rtlTranslate:l}=e;let d;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-o[s]-e.getTranslate();if(s<a){d=i.length-3*a+s,d+=a,e.slideTo(d,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}else if("auto"===t.slidesPerView&&s>=2*a||s>=i.length-a){d=-i.length+s+a,d+=a,e.slideTo(d,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}e.allowSlidePrev=n,e.allowSlideNext=r},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:s}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),s.removeAttr("data-swiper-slide-index")}};var ie={setGrabCursor:function(e){if(U.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)return;const t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){U.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var ae={appendSlide:function(e){const t=this,{$wrapperEl:s,params:i}=t;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let a=0;a<e.length;a+=1)e[a]&&s.append(e[a]);else s.append(e);i.loop&&t.loopCreate(),i.observer&&U.observer||t.update()},prependSlide:function(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;s.loop&&t.loopDestroy();let n=a+1;if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&i.prepend(e[t]);n=a+e.length}else i.prepend(e);s.loop&&t.loopCreate(),s.observer&&U.observer||t.update(),t.slideTo(n,0,!1)},addSlide:function(e,t){const s=this,{$wrapperEl:i,params:a,activeIndex:n}=s;let r=n;a.loop&&(r-=s.loopedSlides,s.loopDestroy(),s.slides=i.children("."+a.slideClass));const o=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=o)return void s.appendSlide(t);let l=r>e?r+1:r;const d=[];for(let c=o-1;c>=e;c-=1){const e=s.slides.eq(c);e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);l=r>e?r+t.length:r}else i.append(t);for(let c=0;c<d.length;c+=1)i.append(d[c]);a.loop&&s.loopCreate(),a.observer&&U.observer||s.update(),a.loop?s.slideTo(l+s.loopedSlides,0,!1):s.slideTo(l,0,!1)},removeSlide:function(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;let n=a;s.loop&&(n-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+s.slideClass));let r,o=n;if("object"==typeof e&&"length"in e){for(let s=0;s<e.length;s+=1)r=e[s],t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1);o=Math.max(o,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1),o=Math.max(o,0);s.loop&&t.loopCreate(),s.observer&&U.observer||t.update(),s.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)},removeAllSlides:function(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}};const ne=function(){const e=R.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:R.cordova||R.phonegap,phonegap:R.cordova||R.phonegap},s=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!a&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(s&&(t.os="windows",t.osVersion=s[2],t.windows=!0),i&&!s&&(t.os="android",t.osVersion=i[2],t.android=!0,t.androidChrome=e.toLowerCase().indexOf("chrome")>=0),(a||r||n)&&(t.os="ios",t.ios=!0),r&&!n&&(t.osVersion=r[2].replace(/_/g,"."),t.iphone=!0),a&&(t.osVersion=a[2].replace(/_/g,"."),t.ipad=!0),n&&(t.osVersion=n[3]?n[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&e.indexOf("Version/")>=0&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(r||a||n)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){const e=t.osVersion.split("."),s=G.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(n||r)&&(1*e[0]==7?1*e[1]>=1:1*e[0]>7)&&s&&s.getAttribute("content").indexOf("minimal-ui")>=0}return t.pixelRatio=R.devicePixelRatio||1,t}();function re(e){const t=this,s=t.touchEventsData,{params:i,touches:a}=t;if(t.animating&&i.preventInteractionOnTransition)return;let n=e;if(n.originalEvent&&(n=n.originalEvent),s.isTouchEvent="touchstart"===n.type,!s.isTouchEvent&&"which"in n&&3===n.which)return;if(!s.isTouchEvent&&"button"in n&&n.button>0)return;if(s.isTouched&&s.isMoved)return;if(i.noSwiping&&Y(n.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])return void(t.allowClick=!0);if(i.swipeHandler&&!Y(n).closest(i.swipeHandler)[0])return;a.currentX="touchstart"===n.type?n.targetTouches[0].pageX:n.pageX,a.currentY="touchstart"===n.type?n.targetTouches[0].pageY:n.pageY;const r=a.currentX,o=a.currentY,l=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,d=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!l||!(r<=d||r>=R.screen.width-d)){if(W.extend(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=r,a.startY=o,s.touchStartTime=W.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==n.type){let e=!0;Y(n.target).is(s.formElements)&&(e=!1),G.activeElement&&Y(G.activeElement).is(s.formElements)&&G.activeElement!==n.target&&G.activeElement.blur();const a=e&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||a)&&n.preventDefault()}t.emit("touchStart",n)}}function oe(e){const t=this,s=t.touchEventsData,{params:i,touches:a,rtlTranslate:n}=t;let r=e;if(r.originalEvent&&(r=r.originalEvent),!s.isTouched)return void(s.startMoving&&s.isScrolling&&t.emit("touchMoveOpposite",r));if(s.isTouchEvent&&"mousemove"===r.type)return;const o="touchmove"===r.type?r.targetTouches[0].pageX:r.pageX,l="touchmove"===r.type?r.targetTouches[0].pageY:r.pageY;if(r.preventedByNestedSwiper)return a.startX=o,void(a.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(s.isTouched&&(W.extend(a,{startX:o,startY:l,currentX:o,currentY:l}),s.touchStartTime=W.now()));if(s.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(l<a.startY&&t.translate<=t.maxTranslate()||l>a.startY&&t.translate>=t.minTranslate())return s.isTouched=!1,void(s.isMoved=!1)}else if(o<a.startX&&t.translate<=t.maxTranslate()||o>a.startX&&t.translate>=t.minTranslate())return;if(s.isTouchEvent&&G.activeElement&&r.target===G.activeElement&&Y(r.target).is(s.formElements))return s.isMoved=!0,void(t.allowClick=!1);if(s.allowTouchCallbacks&&t.emit("touchMove",r),r.targetTouches&&r.targetTouches.length>1)return;a.currentX=o,a.currentY=l;const d=a.currentX-a.startX,c=a.currentY-a.startY;if(t.params.threshold&&Math.sqrt(d**2+c**2)<t.params.threshold)return;if(void 0===s.isScrolling){let e;t.isHorizontal()&&a.currentY===a.startY||t.isVertical()&&a.currentX===a.startX?s.isScrolling=!1:d*d+c*c>=25&&(e=180*Math.atan2(Math.abs(c),Math.abs(d))/Math.PI,s.isScrolling=t.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(s.isScrolling&&t.emit("touchMoveOpposite",r),void 0===s.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(s.startMoving=!0)),s.isScrolling)return void(s.isTouched=!1);if(!s.startMoving)return;t.allowClick=!1,r.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&r.stopPropagation(),s.isMoved||(i.loop&&t.loopFix(),s.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),s.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",r)),t.emit("sliderMove",r),s.isMoved=!0;let p=t.isHorizontal()?d:c;a.diff=p,p*=i.touchRatio,n&&(p=-p),t.swipeDirection=p>0?"prev":"next",s.currentTranslate=p+s.startTranslate;let u=!0,h=i.resistanceRatio;if(i.touchReleaseOnEdges&&(h=0),p>0&&s.currentTranslate>t.minTranslate()?(u=!1,i.resistance&&(s.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+s.startTranslate+p)**h)):p<0&&s.currentTranslate<t.maxTranslate()&&(u=!1,i.resistance&&(s.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-s.startTranslate-p)**h)),u&&(r.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&s.currentTranslate<s.startTranslate&&(s.currentTranslate=s.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&s.currentTranslate>s.startTranslate&&(s.currentTranslate=s.startTranslate),i.threshold>0){if(!(Math.abs(p)>i.threshold||s.allowThresholdMove))return void(s.currentTranslate=s.startTranslate);if(!s.allowThresholdMove)return s.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,s.currentTranslate=s.startTranslate,void(a.diff=t.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===s.velocities.length&&s.velocities.push({position:a[t.isHorizontal()?"startX":"startY"],time:s.touchStartTime}),s.velocities.push({position:a[t.isHorizontal()?"currentX":"currentY"],time:W.now()})),t.updateProgress(s.currentTranslate),t.setTranslate(s.currentTranslate))}function le(e){const t=this,s=t.touchEventsData,{params:i,touches:a,rtlTranslate:n,$wrapperEl:r,slidesGrid:o,snapGrid:l}=t;let d=e;if(d.originalEvent&&(d=d.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",d),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&i.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);i.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=W.now(),p=c-s.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),p<300&&c-s.lastClickTime>300&&(s.clickTimeout&&clearTimeout(s.clickTimeout),s.clickTimeout=W.nextTick(()=>{t&&!t.destroyed&&t.emit("click",d)},300)),p<300&&c-s.lastClickTime<300&&(s.clickTimeout&&clearTimeout(s.clickTimeout),t.emit("doubleTap",d))),s.lastClickTime=W.now(),W.nextTick(()=>{t.destroyed||(t.allowClick=!0)}),!s.isTouched||!s.isMoved||!t.swipeDirection||0===a.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let u;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,u=i.followFinger?n?t.translate:-t.translate:-s.currentTranslate,i.freeMode){if(u<-t.minTranslate())return void t.slideTo(t.activeIndex);if(u>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(s.velocities.length>1){const e=s.velocities.pop(),a=s.velocities.pop(),n=e.position-a.position,r=e.time-a.time;t.velocity=n/r,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(r>150||W.now()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,s.velocities.length=0;let e=1e3*i.freeModeMomentumRatio;const a=t.velocity*e;let o=t.translate+a;n&&(o=-o);let d,c=!1;const p=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;let u;if(o<t.maxTranslate())i.freeModeMomentumBounce?(o+t.maxTranslate()<-p&&(o=t.maxTranslate()-p),d=t.maxTranslate(),c=!0,s.allowMomentumBounce=!0):o=t.maxTranslate(),i.loop&&i.centeredSlides&&(u=!0);else if(o>t.minTranslate())i.freeModeMomentumBounce?(o-t.minTranslate()>p&&(o=t.minTranslate()+p),d=t.minTranslate(),c=!0,s.allowMomentumBounce=!0):o=t.minTranslate(),i.loop&&i.centeredSlides&&(u=!0);else if(i.freeModeSticky){let e;for(let t=0;t<l.length;t+=1)if(l[t]>-o){e=t;break}o=Math.abs(l[e]-o)<Math.abs(l[e-1]-o)||"next"===t.swipeDirection?l[e]:l[e-1],o=-o}if(u&&t.once("transitionEnd",()=>{t.loopFix()}),0!==t.velocity)e=n?Math.abs((-o-t.translate)/t.velocity):Math.abs((o-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&c?(t.updateProgress(d),t.setTransition(e),t.setTranslate(o),t.transitionStart(!0,t.swipeDirection),t.animating=!0,r.transitionEnd(()=>{t&&!t.destroyed&&s.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(d),r.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(o),t.setTransition(e),t.setTranslate(o),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,r.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(o),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();return void((!i.freeModeMomentum||p>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses()))}let h=0,f=t.slidesSizesGrid[0];for(let g=0;g<o.length;g+=i.slidesPerGroup)void 0!==o[g+i.slidesPerGroup]?u>=o[g]&&u<o[g+i.slidesPerGroup]&&(h=g,f=o[g+i.slidesPerGroup]-o[g]):u>=o[g]&&(h=g,f=o[o.length-1]-o[o.length-2]);const m=(u-o[h])/f;if(p>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(m>=i.longSwipesRatio?t.slideTo(h+i.slidesPerGroup):t.slideTo(h)),"prev"===t.swipeDirection&&(m>1-i.longSwipesRatio?t.slideTo(h+i.slidesPerGroup):t.slideTo(h))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(h+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(h)}}function de(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:n}=e;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){const s=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}function ce(e){const t=this;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}var pe={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0};const ue={update:Z,translate:J,transition:ee,slide:te,loop:se,grabCursor:ie,manipulation:ae,events:{attachEvents:function(){const e=this,{params:t,touchEvents:s,el:i,wrapperEl:a}=e;e.onTouchStart=re.bind(e),e.onTouchMove=oe.bind(e),e.onTouchEnd=le.bind(e),e.onClick=ce.bind(e);const n="container"===t.touchEventsTarget?i:a,r=!!t.nested;if(U.touch||!U.pointerEvents&&!U.prefixedPointerEvents){if(U.touch){const i=!("touchstart"!==s.start||!U.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};n.addEventListener(s.start,e.onTouchStart,i),n.addEventListener(s.move,e.onTouchMove,U.passiveListener?{passive:!1,capture:r}:r),n.addEventListener(s.end,e.onTouchEnd,i)}(t.simulateTouch&&!ne.ios&&!ne.android||t.simulateTouch&&!U.touch&&ne.ios)&&(n.addEventListener("mousedown",e.onTouchStart,!1),G.addEventListener("mousemove",e.onTouchMove,r),G.addEventListener("mouseup",e.onTouchEnd,!1))}else n.addEventListener(s.start,e.onTouchStart,!1),G.addEventListener(s.move,e.onTouchMove,r),G.addEventListener(s.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&n.addEventListener("click",e.onClick,!0),e.on(ne.ios||ne.android?"resize orientationchange observerUpdate":"resize observerUpdate",de,!0)},detachEvents:function(){const e=this,{params:t,touchEvents:s,el:i,wrapperEl:a}=e,n="container"===t.touchEventsTarget?i:a,r=!!t.nested;if(U.touch||!U.pointerEvents&&!U.prefixedPointerEvents){if(U.touch){const i=!("onTouchStart"!==s.start||!U.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};n.removeEventListener(s.start,e.onTouchStart,i),n.removeEventListener(s.move,e.onTouchMove,r),n.removeEventListener(s.end,e.onTouchEnd,i)}(t.simulateTouch&&!ne.ios&&!ne.android||t.simulateTouch&&!U.touch&&ne.ios)&&(n.removeEventListener("mousedown",e.onTouchStart,!1),G.removeEventListener("mousemove",e.onTouchMove,r),G.removeEventListener("mouseup",e.onTouchEnd,!1))}else n.removeEventListener(s.start,e.onTouchStart,!1),G.removeEventListener(s.move,e.onTouchMove,r),G.removeEventListener(s.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&n.removeEventListener("click",e.onClick,!0),e.off(ne.ios||ne.android?"resize orientationchange observerUpdate":"resize observerUpdate",de)}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:s,loopedSlides:i=0,params:a}=e,n=a.breakpoints;if(!n||n&&0===Object.keys(n).length)return;const r=e.getBreakpoint(n);if(r&&e.currentBreakpoint!==r){const o=r in n?n[r]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(e=>{const t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});const l=o||e.originalParams,d=l.direction&&l.direction!==a.direction,c=a.loop&&(l.slidesPerView!==a.slidesPerView||d);d&&s&&e.changeDirection(),W.extend(e.params,l),W.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=r,c&&s&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}},getBreakpoint:function(e){const t=this;if(!e)return;let s=!1;const i=[];Object.keys(e).forEach(e=>{i.push(e)}),i.sort((e,t)=>parseInt(e,10)-parseInt(t,10));for(let a=0;a<i.length;a+=1){const e=i[a];t.params.breakpointsInverse?e<=R.innerWidth&&(s=e):e>=R.innerWidth&&!s&&(s=e)}return s||"max"}},checkOverflow:{checkOverflow:function(){const e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){const{classNames:e,params:t,rtl:s,$el:i}=this,a=[];a.push("initialized"),a.push(t.direction),t.freeMode&&a.push("free-mode"),U.flexbox||a.push("no-flexbox"),t.autoHeight&&a.push("autoheight"),s&&a.push("rtl"),t.slidesPerColumn>1&&a.push("multirow"),ne.android&&a.push("android"),ne.ios&&a.push("ios"),(K.isIE||K.isEdge)&&(U.pointerEvents||U.prefixedPointerEvents)&&a.push("wp8-"+t.direction),a.forEach(s=>{e.push(t.containerModifierClass+s)}),i.addClass(e.join(" "))},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,s,i,a,n){let r;function o(){n&&n()}e.complete&&a?o():t?(r=new R.Image,r.onload=o,r.onerror=o,i&&(r.sizes=i),s&&(r.srcset=s),t&&(r.src=t)):o()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let s=0;s<e.imagesToLoad.length;s+=1){const i=e.imagesToLoad[s];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},he={};class fe extends Q{constructor(...e){let t,s;1===e.length&&e[0].constructor&&e[0].constructor===Object?s=e[0]:[t,s]=e,s||(s={}),s=W.extend({},s),t&&!s.el&&(s.el=t),super(s),Object.keys(ue).forEach(e=>{Object.keys(ue[e]).forEach(t=>{fe.prototype[t]||(fe.prototype[t]=ue[e][t])})});const i=this;void 0===i.modules&&(i.modules={}),Object.keys(i.modules).forEach(e=>{const t=i.modules[e];if(t.params){const e=Object.keys(t.params)[0],i=t.params[e];if("object"!=typeof i||null===i)return;if(!(e in s)||!("enabled"in i))return;!0===s[e]&&(s[e]={enabled:!0}),"object"!=typeof s[e]||"enabled"in s[e]||(s[e].enabled=!0),s[e]||(s[e]={enabled:!1})}});const a=W.extend({},pe);i.useModulesParams(a),i.params=W.extend({},a,he,s),i.originalParams=W.extend({},i.params),i.passedParams=W.extend({},s),i.$=Y;const n=Y(i.params.el);if(t=n[0],!t)return;if(n.length>1){const e=[];return n.each((t,i)=>{const a=W.extend({},s,{el:i});e.push(new fe(a))}),e}t.swiper=i,n.data("swiper",i);const r=n.children("."+i.params.wrapperClass);return W.extend(i,{$el:n,el:t,$wrapperEl:r,wrapperEl:r[0],classNames:[],slides:Y(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===i.params.direction,isVertical:()=>"vertical"===i.params.direction,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===i.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===r.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend"];let t=["mousedown","mousemove","mouseup"];return U.pointerEvents?t=["pointerdown","pointermove","pointerup"]:U.prefixedPointerEvents&&(t=["MSPointerDown","MSPointerMove","MSPointerUp"]),i.touchEventsTouch={start:e[0],move:e[1],end:e[2]},i.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},U.touch||!i.params.simulateTouch?i.touchEventsTouch:i.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:W.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.useModules(),i.params.init&&i.init(),i}slidesPerViewDynamic(){const{params:e,slides:t,slidesGrid:s,size:i,activeIndex:a}=this;let n=1;if(e.centeredSlides){let e,s=t[a].swiperSlideSize;for(let r=a+1;r<t.length;r+=1)t[r]&&!e&&(s+=t[r].swiperSlideSize,n+=1,s>i&&(e=!0));for(let r=a-1;r>=0;r-=1)t[r]&&!e&&(s+=t[r].swiperSlideSize,n+=1,s>i&&(e=!0))}else for(let r=a+1;r<t.length;r+=1)s[r]-s[a]<i&&(n+=1);return n}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let a;s.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(i(),e.params.autoHeight&&e.updateAutoHeight()):(a=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),a||i()),s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.$el.removeClass(`${s.params.containerModifierClass}${i} wp8-${i}`).addClass(`${s.params.containerModifierClass}${e}`),(K.isIE||K.isEdge)&&(U.pointerEvents||U.prefixedPointerEvents)&&s.$el.addClass(`${s.params.containerModifierClass}wp8-${e}`),s.params.direction=e,s.slides.each((t,s)=>{"vertical"===e?s.style.width="":s.style.height=""}),s.emit("changeDirection"),t&&s.update()),s}init(){const e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))}destroy(e=!0,t=!0){const s=this,{params:i,$el:a,$wrapperEl:n,slides:r}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),a.removeAttr("style"),n.removeAttr("style"),r&&r.length&&r.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(e=>{s.off(e)}),!1!==e&&(s.$el[0].swiper=null,s.$el.data("swiper",null),W.deleteProps(s)),s.destroyed=!0),null}static extendDefaults(e){W.extend(he,e)}static get extendedDefaults(){return he}static get defaults(){return pe}static get Class(){return Q}static get $(){return Y}}var me={name:"device",proto:{device:ne},static:{device:ne}},ge={name:"support",proto:{support:U},static:{support:U}},ve={name:"browser",proto:{browser:K},static:{browser:K}},be={name:"resize",create(){const e=this;W.extend(e,{resize:{resizeHandler(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init(){R.addEventListener("resize",this.resize.resizeHandler),R.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy(){R.removeEventListener("resize",this.resize.resizeHandler),R.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}};const ye={func:R.MutationObserver||R.WebkitMutationObserver,attach(e,t={}){const s=this,i=new(0,ye.func)(e=>{if(1===e.length)return void s.emit("observerUpdate",e[0]);const t=function(){s.emit("observerUpdate",e[0])};R.requestAnimationFrame?R.requestAnimationFrame(t):R.setTimeout(t,0)});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),s.observer.observers.push(i)},init(){const e=this;if(U.observer&&e.params.observer){if(e.params.observeParents){const t=e.$el.parents();for(let s=0;s<t.length;s+=1)e.observer.attach(t[s])}e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy(){this.observer.observers.forEach(e=>{e.disconnect()}),this.observer.observers=[]}};var we={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create(){W.extend(this,{observer:{init:ye.init.bind(this),attach:ye.attach.bind(this),destroy:ye.destroy.bind(this),observers:[]}})},on:{init(){this.observer.init()},destroy(){this.observer.destroy()}}};const xe={update(e){const t=this,{slidesPerView:s,slidesPerGroup:i,centeredSlides:a}=t.params,{addSlidesBefore:n,addSlidesAfter:r}=t.params.virtual,{from:o,to:l,slides:d,slidesGrid:c,renderSlide:p,offset:u}=t.virtual;t.updateActiveIndex();const h=t.activeIndex||0;let f,m,g;f=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",a?(m=Math.floor(s/2)+i+n,g=Math.floor(s/2)+i+r):(m=s+(i-1)+n,g=i+r);const v=Math.max((h||0)-g,0),b=Math.min((h||0)+m,d.length-1),y=(t.slidesGrid[v]||0)-(t.slidesGrid[0]||0);function w(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(W.extend(t.virtual,{from:v,to:b,offset:y,slidesGrid:t.slidesGrid}),o===v&&l===b&&!e)return t.slidesGrid!==c&&y!==u&&t.slides.css(f,y+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:y,from:v,to:b,slides:function(){const e=[];for(let t=v;t<=b;t+=1)e.push(d[t]);return e}()}),void w();const x=[],E=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(let S=o;S<=l;S+=1)(S<v||S>b)&&t.$wrapperEl.find(`.${t.params.slideClass}[data-swiper-slide-index="${S}"]`).remove();for(let S=0;S<d.length;S+=1)S>=v&&S<=b&&(void 0===l||e?E.push(S):(S>l&&E.push(S),S<o&&x.push(S)));E.forEach(e=>{t.$wrapperEl.append(p(d[e],e))}),x.sort((e,t)=>t-e).forEach(e=>{t.$wrapperEl.prepend(p(d[e],e))}),t.$wrapperEl.children(".swiper-slide").css(f,y+"px"),w()},renderSlide(e,t){const s=this,i=s.params.virtual;if(i.cache&&s.virtual.cache[t])return s.virtual.cache[t];const a=i.renderSlide?Y(i.renderSlide.call(s,e,t)):Y(`<div class="${s.params.slideClass}" data-swiper-slide-index="${t}">${e}</div>`);return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(s.virtual.cache[t]=a),a},appendSlide(e){const t=this;if("object"==typeof e&&"length"in e)for(let s=0;s<e.length;s+=1)e[s]&&t.virtual.slides.push(e[s]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide(e){const t=this,s=t.activeIndex;let i=s+1,a=1;if(Array.isArray(e)){for(let s=0;s<e.length;s+=1)e[s]&&t.virtual.slides.unshift(e[s]);i=s+e.length,a=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){const e=t.virtual.cache,s={};Object.keys(e).forEach(t=>{s[parseInt(t,10)+a]=e[t]}),t.virtual.cache=s}t.virtual.update(!0),t.slideTo(i,0)},removeSlide(e){const t=this;if(null==e)return;let s=t.activeIndex;if(Array.isArray(e))for(let i=e.length-1;i>=0;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]<s&&(s-=1),s=Math.max(s,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<s&&(s-=1),s=Math.max(s,0);t.virtual.update(!0),t.slideTo(s,0)},removeAllSlides(){const e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}};var Ee={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create(){W.extend(this,{virtual:{update:xe.update.bind(this),appendSlide:xe.appendSlide.bind(this),prependSlide:xe.prependSlide.bind(this),removeSlide:xe.removeSlide.bind(this),removeAllSlides:xe.removeAllSlides.bind(this),renderSlide:xe.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit(){const e=this;if(!e.params.virtual.enabled)return;e.classNames.push(e.params.containerModifierClass+"virtual");const t={watchSlidesProgress:!0};W.extend(e.params,t),W.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()},setTranslate(){this.params.virtual.enabled&&this.virtual.update()}}};const Se={handle(e){const t=this,{rtlTranslate:s}=t;let i=e;i.originalEvent&&(i=i.originalEvent);const a=i.keyCode||i.charCode;if(!t.allowSlideNext&&(t.isHorizontal()&&39===a||t.isVertical()&&40===a||34===a))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&37===a||t.isVertical()&&38===a||33===a))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||G.activeElement&&G.activeElement.nodeName&&("input"===G.activeElement.nodeName.toLowerCase()||"textarea"===G.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(33===a||34===a||37===a||39===a||38===a||40===a)){let e=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;const i=R.innerWidth,a=R.innerHeight,n=t.$el.offset();s&&(n.left-=t.$el[0].scrollLeft);const r=[[n.left,n.top],[n.left+t.width,n.top],[n.left,n.top+t.height],[n.left+t.width,n.top+t.height]];for(let t=0;t<r.length;t+=1){const s=r[t];s[0]>=0&&s[0]<=i&&s[1]>=0&&s[1]<=a&&(e=!0)}if(!e)return}t.isHorizontal()?(33!==a&&34!==a&&37!==a&&39!==a||(i.preventDefault?i.preventDefault():i.returnValue=!1),(34!==a&&39!==a||s)&&(33!==a&&37!==a||!s)||t.slideNext(),(33!==a&&37!==a||s)&&(34!==a&&39!==a||!s)||t.slidePrev()):(33!==a&&34!==a&&38!==a&&40!==a||(i.preventDefault?i.preventDefault():i.returnValue=!1),34!==a&&40!==a||t.slideNext(),33!==a&&38!==a||t.slidePrev()),t.emit("keyPress",a)}},enable(){this.keyboard.enabled||(Y(G).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable(){this.keyboard.enabled&&(Y(G).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}};var Te={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create(){W.extend(this,{keyboard:{enabled:!1,enable:Se.enable.bind(this),disable:Se.disable.bind(this),handle:Se.handle.bind(this)}})},on:{init(){const e=this;e.params.keyboard.enabled&&e.keyboard.enable()},destroy(){const e=this;e.keyboard.enabled&&e.keyboard.disable()}}};const Ce={lastScrollTime:W.now(),event:R.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){let e="onwheel"in G;if(!e){const t=G.createElement("div");t.setAttribute("onwheel","return;"),e="function"==typeof t.onwheel}return!e&&G.implementation&&G.implementation.hasFeature&&!0!==G.implementation.hasFeature("","")&&(e=G.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel",normalize(e){let t=0,s=0,i=0,a=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),i=10*t,a=10*s,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||a)&&e.deltaMode&&(1===e.deltaMode?(i*=40,a*=40):(i*=800,a*=800)),i&&!t&&(t=i<1?-1:1),a&&!s&&(s=a<1?-1:1),{spinX:t,spinY:s,pixelX:i,pixelY:a}},handleMouseEnter(){this.mouseEntered=!0},handleMouseLeave(){this.mouseEntered=!1},handle(e){let t=e;const s=this,i=s.params.mousewheel;if(!s.mouseEntered&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);let a=0;const n=s.rtlTranslate?-1:1,r=Ce.normalize(t);if(i.forceToAxis)if(s.isHorizontal()){if(!(Math.abs(r.pixelX)>Math.abs(r.pixelY)))return!0;a=r.pixelX*n}else{if(!(Math.abs(r.pixelY)>Math.abs(r.pixelX)))return!0;a=r.pixelY}else a=Math.abs(r.pixelX)>Math.abs(r.pixelY)?-r.pixelX*n:-r.pixelY;if(0===a)return!0;if(i.invert&&(a=-a),s.params.freeMode){s.params.loop&&s.loopFix();let e=s.getTranslate()+a*i.sensitivity;const n=s.isBeginning,r=s.isEnd;if(e>=s.minTranslate()&&(e=s.minTranslate()),e<=s.maxTranslate()&&(e=s.maxTranslate()),s.setTransition(0),s.setTranslate(e),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses(),(!n&&s.isBeginning||!r&&s.isEnd)&&s.updateSlidesClasses(),s.params.freeModeSticky&&(clearTimeout(s.mousewheel.timeout),s.mousewheel.timeout=W.nextTick(()=>{s.slideToClosest()},300)),s.emit("scroll",t),s.params.autoplay&&s.params.autoplayDisableOnInteraction&&s.autoplay.stop(),e===s.minTranslate()||e===s.maxTranslate())return!0}else{if(W.now()-s.mousewheel.lastScrollTime>60)if(a<0)if(s.isEnd&&!s.params.loop||s.animating){if(i.releaseOnEdges)return!0}else s.slideNext(),s.emit("scroll",t);else if(s.isBeginning&&!s.params.loop||s.animating){if(i.releaseOnEdges)return!0}else s.slidePrev(),s.emit("scroll",t);s.mousewheel.lastScrollTime=(new R.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable(){const e=this;if(!Ce.event)return!1;if(e.mousewheel.enabled)return!1;let t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=Y(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(Ce.event,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable(){const e=this;if(!Ce.event)return!1;if(!e.mousewheel.enabled)return!1;let t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=Y(e.params.mousewheel.eventsTarged)),t.off(Ce.event,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}};const $e={update(){const e=this,t=e.params.navigation;if(e.params.loop)return;const{$nextEl:s,$prevEl:i}=e.navigation;i&&i.length>0&&(e.isBeginning?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),s&&s.length>0&&(e.isEnd?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))},onPrevClick(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init(){const e=this,t=e.params.navigation;if(!t.nextEl&&!t.prevEl)return;let s,i;t.nextEl&&(s=Y(t.nextEl),e.params.uniqueNavElements&&"string"==typeof t.nextEl&&s.length>1&&1===e.$el.find(t.nextEl).length&&(s=e.$el.find(t.nextEl))),t.prevEl&&(i=Y(t.prevEl),e.params.uniqueNavElements&&"string"==typeof t.prevEl&&i.length>1&&1===e.$el.find(t.prevEl).length&&(i=e.$el.find(t.prevEl))),s&&s.length>0&&s.on("click",e.navigation.onNextClick),i&&i.length>0&&i.on("click",e.navigation.onPrevClick),W.extend(e.navigation,{$nextEl:s,nextEl:s&&s[0],$prevEl:i,prevEl:i&&i[0]})},destroy(){const e=this,{$nextEl:t,$prevEl:s}=e.navigation;t&&t.length&&(t.off("click",e.navigation.onNextClick),t.removeClass(e.params.navigation.disabledClass)),s&&s.length&&(s.off("click",e.navigation.onPrevClick),s.removeClass(e.params.navigation.disabledClass))}};const ke={update(){const e=this,t=e.rtl,s=e.params.pagination;if(!s.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length)return;const i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,a=e.pagination.$el;let n;const r=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(n=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),n>i-1-2*e.loopedSlides&&(n-=i-2*e.loopedSlides),n>r-1&&(n-=r),n<0&&"bullets"!==e.params.paginationType&&(n=r+n)):n=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const i=e.pagination.bullets;let r,o,l;if(s.dynamicBullets&&(e.pagination.bulletSize=i.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),s.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=n-e.previousIndex,e.pagination.dynamicBulletIndex>s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),r=n-e.pagination.dynamicBulletIndex,o=r+(Math.min(i.length,s.dynamicMainBullets)-1),l=(o+r)/2),i.removeClass(`${s.bulletActiveClass} ${s.bulletActiveClass}-next ${s.bulletActiveClass}-next-next ${s.bulletActiveClass}-prev ${s.bulletActiveClass}-prev-prev ${s.bulletActiveClass}-main`),a.length>1)i.each((e,t)=>{const i=Y(t),a=i.index();a===n&&i.addClass(s.bulletActiveClass),s.dynamicBullets&&(a>=r&&a<=o&&i.addClass(s.bulletActiveClass+"-main"),a===r&&i.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),a===o&&i.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else{if(i.eq(n).addClass(s.bulletActiveClass),s.dynamicBullets){const e=i.eq(r),t=i.eq(o);for(let a=r;a<=o;a+=1)i.eq(a).addClass(s.bulletActiveClass+"-main");e.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),t.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),n=(e.pagination.bulletSize*a-e.pagination.bulletSize)/2-l*e.pagination.bulletSize,r=t?"right":"left";i.css(e.isHorizontal()?r:"top",n+"px")}}if("fraction"===s.type&&(a.find("."+s.currentClass).text(s.formatFractionCurrent(n+1)),a.find("."+s.totalClass).text(s.formatFractionTotal(r))),"progressbar"===s.type){let t;t=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const i=(n+1)/r;let o=1,l=1;"horizontal"===t?o=i:l=i,a.find("."+s.progressbarFillClass).transform(`translate3d(0,0,0) scaleX(${o}) scaleY(${l})`).transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(a.html(s.renderCustom(e,n+1,r)),e.emit("paginationRender",e,a[0])):e.emit("paginationUpdate",e,a[0]),a[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](s.lockClass)},render(){const e=this,t=e.params.pagination;if(!t.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length)return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el;let a="";if("bullets"===t.type){const n=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;for(let s=0;s<n;s+=1)t.renderBullet?a+=t.renderBullet.call(e,s,t.bulletClass):a+=`<${t.bulletElement} class="${t.bulletClass}"></${t.bulletElement}>`;i.html(a),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(a=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`,i.html(a)),"progressbar"===t.type&&(a=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`,i.html(a)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])},init(){const e=this,t=e.params.pagination;if(!t.el)return;let s=Y(t.el);0!==s.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&s.length>1&&1===e.$el.find(t.el).length&&(s=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&s.addClass(t.clickableClass),s.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(s.addClass(`${t.modifierClass}${t.type}-dynamic`),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&s.addClass(t.progressbarOppositeClass),t.clickable&&s.on("click","."+t.bulletClass,(function(t){t.preventDefault();let s=Y(this).index()*e.params.slidesPerGroup;e.params.loop&&(s+=e.loopedSlides),e.slideTo(s)})),W.extend(e.pagination,{$el:s,el:s[0]}))},destroy(){const e=this.params.pagination;if(!e.el||!this.pagination.el||!this.pagination.$el||0===this.pagination.$el.length)return;const t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}};const Me={setTranslate(){const e=this;if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t,rtlTranslate:s,progress:i}=e,{dragSize:a,trackSize:n,$dragEl:r,$el:o}=t,l=e.params.scrollbar;let d=a,c=(n-a)*i;s?(c=-c,c>0?(d=a-c,c=0):-c+a>n&&(d=n+c)):c<0?(d=a+c,c=0):c+a>n&&(d=n-c),e.isHorizontal()?(U.transforms3d?r.transform(`translate3d(${c}px, 0, 0)`):r.transform(`translateX(${c}px)`),r[0].style.width=d+"px"):(U.transforms3d?r.transform(`translate3d(0px, ${c}px, 0)`):r.transform(`translateY(${c}px)`),r[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout(()=>{o[0].style.opacity=0,o.transition(400)},1e3))},setTransition(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize(){const e=this;if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t}=e,{$dragEl:s,$el:i}=t;s[0].style.width="",s[0].style.height="";const a=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,r=n*(a/e.size);let o;o="auto"===e.params.scrollbar.dragSize?a*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?s[0].style.width=o+"px":s[0].style.height=o+"px",i[0].style.display=n>=1?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),W.extend(t,{trackSize:a,divider:n,moveDivider:r,dragSize:o}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)},getPointerPosition(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY},setDragPosition(e){const{scrollbar:t,rtlTranslate:s}=this,{$el:i,dragSize:a,trackSize:n,dragStartPos:r}=t;let o;o=(t.getPointerPosition(e)-i.offset()[this.isHorizontal()?"left":"top"]-(null!==r?r:a/2))/(n-a),o=Math.max(Math.min(o,1),0),s&&(o=1-o);const l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*o;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart(e){const t=this.params.scrollbar,{scrollbar:s,$wrapperEl:i}=this,{$el:a,$dragEl:n}=s;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===n[0]||e.target===n?s.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.transition(100),n.transition(100),s.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.emit("scrollbarDragStart",e)},onDragMove(e){const{scrollbar:t,$wrapperEl:s}=this,{$el:i,$dragEl:a}=t;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),s.transition(0),i.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd(e){const t=this,s=t.params.scrollbar,{scrollbar:i}=t,{$el:a}=i;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,s.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=W.nextTick(()=>{a.css("opacity",0),a.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())},enableDraggable(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,touchEventsTouch:s,touchEventsDesktop:i,params:a}=e,n=t.$el[0],r=!(!U.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!U.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};U.touch?(n.addEventListener(s.start,e.scrollbar.onDragStart,r),n.addEventListener(s.move,e.scrollbar.onDragMove,r),n.addEventListener(s.end,e.scrollbar.onDragEnd,o)):(n.addEventListener(i.start,e.scrollbar.onDragStart,r),G.addEventListener(i.move,e.scrollbar.onDragMove,r),G.addEventListener(i.end,e.scrollbar.onDragEnd,o))},disableDraggable(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,touchEventsTouch:s,touchEventsDesktop:i,params:a}=e,n=t.$el[0],r=!(!U.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!U.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};U.touch?(n.removeEventListener(s.start,e.scrollbar.onDragStart,r),n.removeEventListener(s.move,e.scrollbar.onDragMove,r),n.removeEventListener(s.end,e.scrollbar.onDragEnd,o)):(n.removeEventListener(i.start,e.scrollbar.onDragStart,r),G.removeEventListener(i.move,e.scrollbar.onDragMove,r),G.removeEventListener(i.end,e.scrollbar.onDragEnd,o))},init(){const e=this;if(!e.params.scrollbar.el)return;const{scrollbar:t,$el:s}=e,i=e.params.scrollbar;let a=Y(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&a.length>1&&1===s.find(i.el).length&&(a=s.find(i.el));let n=a.find("."+e.params.scrollbar.dragClass);0===n.length&&(n=Y(`<div class="${e.params.scrollbar.dragClass}"></div>`),a.append(n)),W.extend(t,{$el:a,el:a[0],$dragEl:n,dragEl:n[0]}),i.draggable&&t.enableDraggable()},destroy(){this.scrollbar.disableDraggable()}};const Pe={setTransform(e,t){const{rtl:s}=this,i=Y(e),a=s?-1:1,n=i.attr("data-swiper-parallax")||"0";let r=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y");const l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(r||o?(r=r||"0",o=o||"0"):this.isHorizontal()?(r=n,o="0"):(o=n,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*a+"%":r*t*a+"px",o=o.indexOf("%")>=0?parseInt(o,10)*t+"%":o*t+"px",null!=d){const e=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=e}if(null==l)i.transform(`translate3d(${r}, ${o}, 0px)`);else{const e=l-(l-1)*(1-Math.abs(t));i.transform(`translate3d(${r}, ${o}, 0px) scale(${e})`)}},setTranslate(){const e=this,{$el:t,slides:s,progress:i,snapGrid:a}=e;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{e.parallax.setTransform(s,i)}),s.each((t,s)=>{let n=s.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-i*(a.length-1)),n=Math.min(Math.max(n,-1),1),Y(s).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{e.parallax.setTransform(s,n)})})},setTransition(e=this.params.speed){const{$el:t}=this;t.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t,s)=>{const i=Y(s);let a=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(a=0),i.transition(a)})}};const Oe={getDistanceBetweenTouches(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,s=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt((i-t)**2+(a-s)**2)},onGestureStart(e){const t=this,s=t.params.zoom,i=t.zoom,{gesture:a}=i;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!U.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=Oe.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=Y(e.target).closest(".swiper-slide"),0===a.$slideEl.length&&(a.$slideEl=t.slides.eq(t.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+s.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||s.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl.transition(0),t.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange(e){const t=this.params.zoom,s=this.zoom,{gesture:i}=s;if(!U.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;s.fakeGestureMoved=!0,i.scaleMove=Oe.getDistanceBetweenTouches(e)}i.$imageEl&&0!==i.$imageEl.length&&(U.gestures?s.scale=e.scale*s.currentScale:s.scale=i.scaleMove/i.scaleStart*s.currentScale,s.scale>i.maxRatio&&(s.scale=i.maxRatio-1+(s.scale-i.maxRatio+1)**.5),s.scale<t.minRatio&&(s.scale=t.minRatio+1-(t.minRatio-s.scale+1)**.5),i.$imageEl.transform(`translate3d(0,0,0) scale(${s.scale})`))},onGestureEnd(e){const t=this.params.zoom,s=this.zoom,{gesture:i}=s;if(!U.gestures){if(!s.fakeGestureTouched||!s.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!ne.android)return;s.fakeGestureTouched=!1,s.fakeGestureMoved=!1}i.$imageEl&&0!==i.$imageEl.length&&(s.scale=Math.max(Math.min(s.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform(`translate3d(0,0,0) scale(${s.scale})`),s.currentScale=s.scale,s.isScaling=!1,1===s.scale&&(i.$slideEl=void 0))},onTouchStart(e){const t=this.zoom,{gesture:s,image:i}=t;s.$imageEl&&0!==s.$imageEl.length&&(i.isTouched||(ne.android&&e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove(e){const t=this,s=t.zoom,{gesture:i,image:a,velocity:n}=s;if(!i.$imageEl||0===i.$imageEl.length)return;if(t.allowClick=!1,!a.isTouched||!i.$slideEl)return;a.isMoved||(a.width=i.$imageEl[0].offsetWidth,a.height=i.$imageEl[0].offsetHeight,a.startX=W.getTranslate(i.$imageWrapEl[0],"x")||0,a.startY=W.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&&(a.startX=-a.startX,a.startY=-a.startY));const r=a.width*s.scale,o=a.height*s.scale;if(!(r<i.slideWidth&&o<i.slideHeight)){if(a.minX=Math.min(i.slideWidth/2-r/2,0),a.maxX=-a.minX,a.minY=Math.min(i.slideHeight/2-o/2,0),a.maxY=-a.minY,a.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.isMoved&&!s.isScaling){if(t.isHorizontal()&&(Math.floor(a.minX)===Math.floor(a.startX)&&a.touchesCurrent.x<a.touchesStart.x||Math.floor(a.maxX)===Math.floor(a.startX)&&a.touchesCurrent.x>a.touchesStart.x))return void(a.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(a.minY)===Math.floor(a.startY)&&a.touchesCurrent.y<a.touchesStart.y||Math.floor(a.maxY)===Math.floor(a.startY)&&a.touchesCurrent.y>a.touchesStart.y))return void(a.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.isMoved=!0,a.currentX=a.touchesCurrent.x-a.touchesStart.x+a.startX,a.currentY=a.touchesCurrent.y-a.touchesStart.y+a.startY,a.currentX<a.minX&&(a.currentX=a.minX+1-(a.minX-a.currentX+1)**.8),a.currentX>a.maxX&&(a.currentX=a.maxX-1+(a.currentX-a.maxX+1)**.8),a.currentY<a.minY&&(a.currentY=a.minY+1-(a.minY-a.currentY+1)**.8),a.currentY>a.maxY&&(a.currentY=a.maxY-1+(a.currentY-a.maxY+1)**.8),n.prevPositionX||(n.prevPositionX=a.touchesCurrent.x),n.prevPositionY||(n.prevPositionY=a.touchesCurrent.y),n.prevTime||(n.prevTime=Date.now()),n.x=(a.touchesCurrent.x-n.prevPositionX)/(Date.now()-n.prevTime)/2,n.y=(a.touchesCurrent.y-n.prevPositionY)/(Date.now()-n.prevTime)/2,Math.abs(a.touchesCurrent.x-n.prevPositionX)<2&&(n.x=0),Math.abs(a.touchesCurrent.y-n.prevPositionY)<2&&(n.y=0),n.prevPositionX=a.touchesCurrent.x,n.prevPositionY=a.touchesCurrent.y,n.prevTime=Date.now(),i.$imageWrapEl.transform(`translate3d(${a.currentX}px, ${a.currentY}px,0)`)}},onTouchEnd(){const e=this.zoom,{gesture:t,image:s,velocity:i}=e;if(!t.$imageEl||0===t.$imageEl.length)return;if(!s.isTouched||!s.isMoved)return s.isTouched=!1,void(s.isMoved=!1);s.isTouched=!1,s.isMoved=!1;let a=300,n=300;const r=i.x*a,o=s.currentX+r,l=i.y*n,d=s.currentY+l;0!==i.x&&(a=Math.abs((o-s.currentX)/i.x)),0!==i.y&&(n=Math.abs((d-s.currentY)/i.y));const c=Math.max(a,n);s.currentX=o,s.currentY=d;const p=s.width*e.scale,u=s.height*e.scale;s.minX=Math.min(t.slideWidth/2-p/2,0),s.maxX=-s.minX,s.minY=Math.min(t.slideHeight/2-u/2,0),s.maxY=-s.minY,s.currentX=Math.max(Math.min(s.currentX,s.maxX),s.minX),s.currentY=Math.max(Math.min(s.currentY,s.maxY),s.minY),t.$imageWrapEl.transition(c).transform(`translate3d(${s.currentX}px, ${s.currentY}px,0)`)},onTransitionEnd(){const e=this.zoom,{gesture:t}=e;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle(e){const t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in(e){const t=this,s=t.zoom,i=t.params.zoom,{gesture:a,image:n}=s;if(a.$slideEl||(a.$slideEl=t.clickedSlide?Y(t.clickedSlide):t.slides.eq(t.activeIndex),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+i.containerClass)),!a.$imageEl||0===a.$imageEl.length)return;let r,o,l,d,c,p,u,h,f,m,g,v,b,y,w,x,E,S;a.$slideEl.addClass(""+i.zoomedSlideClass),void 0===n.touchesStart.x&&e?(r="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,o="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(r=n.touchesStart.x,o=n.touchesStart.y),s.scale=a.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,s.currentScale=a.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,e?(E=a.$slideEl[0].offsetWidth,S=a.$slideEl[0].offsetHeight,l=a.$slideEl.offset().left,d=a.$slideEl.offset().top,c=l+E/2-r,p=d+S/2-o,f=a.$imageEl[0].offsetWidth,m=a.$imageEl[0].offsetHeight,g=f*s.scale,v=m*s.scale,b=Math.min(E/2-g/2,0),y=Math.min(S/2-v/2,0),w=-b,x=-y,u=c*s.scale,h=p*s.scale,u<b&&(u=b),u>w&&(u=w),h<y&&(h=y),h>x&&(h=x)):(u=0,h=0),a.$imageWrapEl.transition(300).transform(`translate3d(${u}px, ${h}px,0)`),a.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${s.scale})`)},out(){const e=this,t=e.zoom,s=e.params.zoom,{gesture:i}=t;i.$slideEl||(i.$slideEl=e.clickedSlide?Y(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+s.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+s.zoomedSlideClass),i.$slideEl=void 0)},enable(){const e=this,t=e.zoom;if(t.enabled)return;t.enabled=!0;const s=!("touchstart"!==e.touchEvents.start||!U.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};U.gestures?(e.$wrapperEl.on("gesturestart",".swiper-slide",t.onGestureStart,s),e.$wrapperEl.on("gesturechange",".swiper-slide",t.onGestureChange,s),e.$wrapperEl.on("gestureend",".swiper-slide",t.onGestureEnd,s)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,".swiper-slide",t.onGestureStart,s),e.$wrapperEl.on(e.touchEvents.move,".swiper-slide",t.onGestureChange,s),e.$wrapperEl.on(e.touchEvents.end,".swiper-slide",t.onGestureEnd,s)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)},disable(){const e=this,t=e.zoom;if(!t.enabled)return;e.zoom.enabled=!1;const s=!("touchstart"!==e.touchEvents.start||!U.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};U.gestures?(e.$wrapperEl.off("gesturestart",".swiper-slide",t.onGestureStart,s),e.$wrapperEl.off("gesturechange",".swiper-slide",t.onGestureChange,s),e.$wrapperEl.off("gestureend",".swiper-slide",t.onGestureEnd,s)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,".swiper-slide",t.onGestureStart,s),e.$wrapperEl.off(e.touchEvents.move,".swiper-slide",t.onGestureChange,s),e.$wrapperEl.off(e.touchEvents.end,".swiper-slide",t.onGestureEnd,s)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}};const ze={loadInSlide(e,t=!0){const s=this,i=s.params.lazy;if(void 0===e)return;if(0===s.slides.length)return;const a=s.virtual&&s.params.virtual.enabled?s.$wrapperEl.children(`.${s.params.slideClass}[data-swiper-slide-index="${e}"]`):s.slides.eq(e);let n=a.find(`.${i.elementClass}:not(.${i.loadedClass}):not(.${i.loadingClass})`);!a.hasClass(i.elementClass)||a.hasClass(i.loadedClass)||a.hasClass(i.loadingClass)||(n=n.add(a[0])),0!==n.length&&n.each((e,n)=>{const r=Y(n);r.addClass(i.loadingClass);const o=r.attr("data-background"),l=r.attr("data-src"),d=r.attr("data-srcset"),c=r.attr("data-sizes");s.loadImage(r[0],l||o,d,c,!1,()=>{if(null!=s&&s&&(!s||s.params)&&!s.destroyed){if(o?(r.css("background-image",`url("${o}")`),r.removeAttr("data-background")):(d&&(r.attr("srcset",d),r.removeAttr("data-srcset")),c&&(r.attr("sizes",c),r.removeAttr("data-sizes")),l&&(r.attr("src",l),r.removeAttr("data-src"))),r.addClass(i.loadedClass).removeClass(i.loadingClass),a.find("."+i.preloaderClass).remove(),s.params.loop&&t){const e=a.attr("data-swiper-slide-index");if(a.hasClass(s.params.slideDuplicateClass)){const t=s.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${s.params.slideDuplicateClass})`);s.lazy.loadInSlide(t.index(),!1)}else{const t=s.$wrapperEl.children(`.${s.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`);s.lazy.loadInSlide(t.index(),!1)}}s.emit("lazyImageReady",a[0],r[0])}}),s.emit("lazyImageLoad",a[0],r[0])})},load(){const e=this,{$wrapperEl:t,params:s,slides:i,activeIndex:a}=e,n=e.virtual&&s.virtual.enabled,r=s.lazy;let o=s.slidesPerView;function l(e){if(n){if(t.children(`.${s.slideClass}[data-swiper-slide-index="${e}"]`).length)return!0}else if(i[e])return!0;return!1}function d(e){return n?Y(e).attr("data-swiper-slide-index"):Y(e).index()}if("auto"===o&&(o=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+s.slideVisibleClass).each((t,s)=>{const i=n?Y(s).attr("data-swiper-slide-index"):Y(s).index();e.lazy.loadInSlide(i)});else if(o>1)for(let c=a;c<a+o;c+=1)l(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(a);if(r.loadPrevNext)if(o>1||r.loadPrevNextAmount&&r.loadPrevNextAmount>1){const t=r.loadPrevNextAmount,s=o,n=Math.min(a+s+Math.max(t,s),i.length),d=Math.max(a-Math.max(s,t),0);for(let i=a+o;i<n;i+=1)l(i)&&e.lazy.loadInSlide(i);for(let i=d;i<a;i+=1)l(i)&&e.lazy.loadInSlide(i)}else{const i=t.children("."+s.slideNextClass);i.length>0&&e.lazy.loadInSlide(d(i));const a=t.children("."+s.slidePrevClass);a.length>0&&e.lazy.loadInSlide(d(a))}}};const Ie={LinearSpline:function(e,t){const s=function(){let e,t,s;return(i,a)=>{for(t=-1,e=i.length;e-t>1;)s=e+t>>1,i[s]<=a?t=s:e=s;return e}}();let i,a;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(a=s(this.x,e),i=a-1,(e-this.x[i])*(this.y[a]-this.y[i])/(this.x[a]-this.x[i])+this.y[i]):0},this},getInterpolateFunction(e){const t=this;t.controller.spline||(t.controller.spline=t.params.loop?new Ie.LinearSpline(t.slidesGrid,e.slidesGrid):new Ie.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate(e,t){const s=this,i=s.controller.control;let a,n;function r(e){const t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),n=-s.controller.spline.interpolate(-t)),n&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),n=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(i))for(let o=0;o<i.length;o+=1)i[o]!==t&&i[o]instanceof fe&&r(i[o]);else i instanceof fe&&t!==i&&r(i)},setTransition(e,t){const s=this,i=s.controller.control;let a;function n(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.params.autoHeight&&W.nextTick(()=>{t.updateAutoHeight()}),t.$wrapperEl.transitionEnd(()=>{i&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(i))for(a=0;a<i.length;a+=1)i[a]!==t&&i[a]instanceof fe&&n(i[a]);else i instanceof fe&&t!==i&&n(i)}};const Le={makeElFocusable:e=>(e.attr("tabIndex","0"),e),addElRole:(e,t)=>(e.attr("role",t),e),addElLabel:(e,t)=>(e.attr("aria-label",t),e),disableEl:e=>(e.attr("aria-disabled",!0),e),enableEl:e=>(e.attr("aria-disabled",!1),e),onEnterKey(e){const t=this,s=t.params.a11y;if(13!==e.keyCode)return;const i=Y(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(s.lastSlideMessage):t.a11y.notify(s.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(s.firstSlideMessage):t.a11y.notify(s.prevSlideMessage)),t.pagination&&i.is("."+t.params.pagination.bulletClass)&&i[0].click()},notify(e){const t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation(){const e=this;if(e.params.loop)return;const{$nextEl:t,$prevEl:s}=e.navigation;s&&s.length>0&&(e.isBeginning?e.a11y.disableEl(s):e.a11y.enableEl(s)),t&&t.length>0&&(e.isEnd?e.a11y.disableEl(t):e.a11y.enableEl(t))},updatePagination(){const e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((s,i)=>{const a=Y(i);e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,t.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init(){const e=this;e.$el.append(e.a11y.liveRegion);const t=e.params.a11y;let s,i;e.navigation&&e.navigation.$nextEl&&(s=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(i=e.navigation.$prevEl),s&&(e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.nextSlideMessage),s.on("keydown",e.a11y.onEnterKey)),i&&(e.a11y.makeElFocusable(i),e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,t.prevSlideMessage),i.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy(){const e=this;let t,s;e.a11y.liveRegion&&e.a11y.liveRegion.length>0&&e.a11y.liveRegion.remove(),e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(s=e.navigation.$prevEl),t&&t.off("keydown",e.a11y.onEnterKey),s&&s.off("keydown",e.a11y.onEnterKey),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.off("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)}};const je={init(){const e=this;if(!e.params.history)return;if(!R.history||!R.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);const t=e.history;t.initialized=!0,t.paths=je.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||R.addEventListener("popstate",e.history.setHistoryPopState))},destroy(){const e=this;e.params.history.replaceState||R.removeEventListener("popstate",e.history.setHistoryPopState)},setHistoryPopState(){this.history.paths=je.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues(){const e=R.location.pathname.slice(1).split("/").filter(e=>""!==e),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory(e,t){if(!this.history.initialized||!this.params.history.enabled)return;const s=this.slides.eq(t);let i=je.slugify(s.attr("data-history"));R.location.pathname.includes(e)||(i=`${e}/${i}`);const a=R.history.state;a&&a.value===i||(this.params.history.replaceState?R.history.replaceState({value:i},null,i):R.history.pushState({value:i},null,i))},slugify:e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),scrollToSlide(e,t,s){const i=this;if(t)for(let a=0,n=i.slides.length;a<n;a+=1){const n=i.slides.eq(a);if(je.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){const t=n.index();i.slideTo(t,e,s)}}else i.slideTo(0,e,s)}};const De={onHashCange(){const e=this,t=G.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){const s=e.$wrapperEl.children(`.${e.params.slideClass}[data-hash="${t}"]`).index();if(void 0===s)return;e.slideTo(s)}},setHash(){const e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&R.history&&R.history.replaceState)R.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||"");else{const t=e.slides.eq(e.activeIndex),s=t.attr("data-hash")||t.attr("data-history");G.location.hash=s||""}},init(){const e=this;if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;e.hashNavigation.initialized=!0;const t=G.location.hash.replace("#","");if(t){const s=0;for(let i=0,a=e.slides.length;i<a;i+=1){const a=e.slides.eq(i);if((a.attr("data-hash")||a.attr("data-history"))===t&&!a.hasClass(e.params.slideDuplicateClass)){const t=a.index();e.slideTo(t,s,e.params.runCallbacksOnInit,!0)}}}e.params.hashNavigation.watchState&&Y(R).on("hashchange",e.hashNavigation.onHashCange)},destroy(){const e=this;e.params.hashNavigation.watchState&&Y(R).off("hashchange",e.hashNavigation.onHashCange)}};const Ae={run(){const e=this,t=e.slides.eq(e.activeIndex);let s=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(s=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=W.nextTick(()=>{e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},s)},start(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop(){const e=this;return!!e.autoplay.running&&(void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause(e){const t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}};const _e={setTranslate(){const e=this,{slides:t}=e;for(let s=0;s<t.length;s+=1){const t=e.slides.eq(s);let i=-t[0].swiperSlideOffset;e.params.virtualTranslate||(i-=e.translate);let a=0;e.isHorizontal()||(a=i,i=0);const n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);t.css({opacity:n}).transform(`translate3d(${i}px, ${a}px, 0px)`)}},setTransition(e){const t=this,{slides:s,$wrapperEl:i}=t;if(s.transition(e),t.params.virtualTranslate&&0!==e){let e=!1;s.transitionEnd(()=>{if(e)return;if(!t||t.destroyed)return;e=!0,t.animating=!1;const s=["webkitTransitionEnd","transitionend"];for(let e=0;e<s.length;e+=1)i.trigger(s[e])})}}};const Ne={setTranslate(){const{$el:e,$wrapperEl:t,slides:s,width:i,height:a,rtlTranslate:n,size:r}=this,o=this.params.cubeEffect,l=this.isHorizontal(),d=this.virtual&&this.params.virtual.enabled;let c,p=0;o.shadow&&(l?(c=t.find(".swiper-cube-shadow"),0===c.length&&(c=Y('<div class="swiper-cube-shadow"></div>'),t.append(c)),c.css({height:i+"px"})):(c=e.find(".swiper-cube-shadow"),0===c.length&&(c=Y('<div class="swiper-cube-shadow"></div>'),e.append(c))));for(let h=0;h<s.length;h+=1){const e=s.eq(h);let t=h;d&&(t=parseInt(e.attr("data-swiper-slide-index"),10));let i=90*t,a=Math.floor(i/360);n&&(i=-i,a=Math.floor(-i/360));const c=Math.max(Math.min(e[0].progress,1),-1);let u=0,f=0,m=0;t%4==0?(u=4*-a*r,m=0):(t-1)%4==0?(u=0,m=4*-a*r):(t-2)%4==0?(u=r+4*a*r,m=r):(t-3)%4==0&&(u=-r,m=3*r+4*r*a),n&&(u=-u),l||(f=u,u=0);const g=`rotateX(${l?0:-i}deg) rotateY(${l?i:0}deg) translate3d(${u}px, ${f}px, ${m}px)`;if(c<=1&&c>-1&&(p=90*t+90*c,n&&(p=90*-t-90*c)),e.transform(g),o.slideShadows){let t=l?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),s=l?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${l?"left":"top"}"></div>`),e.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${l?"right":"bottom"}"></div>`),e.append(s)),t.length&&(t[0].style.opacity=Math.max(-c,0)),s.length&&(s[0].style.opacity=Math.max(c,0))}}if(t.css({"-webkit-transform-origin":`50% 50% -${r/2}px`,"-moz-transform-origin":`50% 50% -${r/2}px`,"-ms-transform-origin":`50% 50% -${r/2}px`,"transform-origin":`50% 50% -${r/2}px`}),o.shadow)if(l)c.transform(`translate3d(0px, ${i/2+o.shadowOffset}px, ${-i/2}px) rotateX(90deg) rotateZ(0deg) scale(${o.shadowScale})`);else{const e=Math.abs(p)-90*Math.floor(Math.abs(p)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=o.shadowScale,i=o.shadowScale/t,n=o.shadowOffset;c.transform(`scale3d(${s}, 1, ${i}) translate3d(0px, ${a/2+n}px, ${-a/2/i}px) rotateX(-90deg)`)}const u=K.isSafari||K.isUiWebView?-r/2:0;t.transform(`translate3d(0px,0,${u}px) rotateX(${this.isHorizontal()?0:p}deg) rotateY(${this.isHorizontal()?-p:0}deg)`)},setTransition(e){const{$el:t,slides:s}=this;s.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}};const He={setTranslate(){const e=this,{slides:t,rtlTranslate:s}=e;for(let i=0;i<t.length;i+=1){const a=t.eq(i);let n=a[0].progress;e.params.flipEffect.limitRotation&&(n=Math.max(Math.min(a[0].progress,1),-1));let r=-180*n,o=0,l=-a[0].swiperSlideOffset,d=0;if(e.isHorizontal()?s&&(r=-r):(d=l,l=0,o=-r,r=0),a[0].style.zIndex=-Math.abs(Math.round(n))+t.length,e.params.flipEffect.slideShadows){let t=e.isHorizontal()?a.find(".swiper-slide-shadow-left"):a.find(".swiper-slide-shadow-top"),s=e.isHorizontal()?a.find(".swiper-slide-shadow-right"):a.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${e.isHorizontal()?"left":"top"}"></div>`),a.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${e.isHorizontal()?"right":"bottom"}"></div>`),a.append(s)),t.length&&(t[0].style.opacity=Math.max(-n,0)),s.length&&(s[0].style.opacity=Math.max(n,0))}a.transform(`translate3d(${l}px, ${d}px, 0px) rotateX(${o}deg) rotateY(${r}deg)`)}},setTransition(e){const t=this,{slides:s,activeIndex:i,$wrapperEl:a}=t;if(s.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){let e=!1;s.eq(i).transitionEnd((function(){if(e)return;if(!t||t.destroyed)return;e=!0,t.animating=!1;const s=["webkitTransitionEnd","transitionend"];for(let e=0;e<s.length;e+=1)a.trigger(s[e])}))}}};const Be={setTranslate(){const{width:e,height:t,slides:s,$wrapperEl:i,slidesSizesGrid:a}=this,n=this.params.coverflowEffect,r=this.isHorizontal(),o=this.translate,l=r?e/2-o:t/2-o,d=r?n.rotate:-n.rotate,c=n.depth;for(let p=0,u=s.length;p<u;p+=1){const e=s.eq(p),t=a[p],i=(l-e[0].swiperSlideOffset-t/2)/t*n.modifier;let o=r?d*i:0,u=r?0:d*i,h=-c*Math.abs(i),f=r?0:n.stretch*i,m=r?n.stretch*i:0;Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(h)<.001&&(h=0),Math.abs(o)<.001&&(o=0),Math.abs(u)<.001&&(u=0);const g=`translate3d(${m}px,${f}px,${h}px) rotateX(${u}deg) rotateY(${o}deg)`;if(e.transform(g),e[0].style.zIndex=1-Math.abs(Math.round(i)),n.slideShadows){let t=r?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),s=r?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=Y(`<div class="swiper-slide-shadow-${r?"left":"top"}"></div>`),e.append(t)),0===s.length&&(s=Y(`<div class="swiper-slide-shadow-${r?"right":"bottom"}"></div>`),e.append(s)),t.length&&(t[0].style.opacity=i>0?i:0),s.length&&(s[0].style.opacity=-i>0?-i:0)}}if(U.pointerEvents||U.prefixedPointerEvents){i[0].style.perspectiveOrigin=l+"px 50%"}},setTransition(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}};const Ve={init(){const e=this,{thumbs:t}=e.params,s=e.constructor;t.swiper instanceof s?(e.thumbs.swiper=t.swiper,W.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),W.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):W.isObject(t.swiper)&&(e.thumbs.swiper=new s(W.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick(){const e=this,t=e.thumbs.swiper;if(!t)return;const s=t.clickedIndex,i=t.clickedSlide;if(i&&Y(i).hasClass(e.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let a;if(a=t.params.loop?parseInt(Y(t.clickedSlide).attr("data-swiper-slide-index"),10):s,e.params.loop){let t=e.activeIndex;e.slides.eq(t).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,t=e.activeIndex);const s=e.slides.eq(t).prevAll(`[data-swiper-slide-index="${a}"]`).eq(0).index(),i=e.slides.eq(t).nextAll(`[data-swiper-slide-index="${a}"]`).eq(0).index();a=void 0===s?i:void 0===i?s:i-t<t-s?i:s}e.slideTo(a)},update(e){const t=this,s=t.thumbs.swiper;if(!s)return;const i="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;if(t.realIndex!==s.realIndex){let a,n=s.activeIndex;if(s.params.loop){s.slides.eq(n).hasClass(s.params.slideDuplicateClass)&&(s.loopFix(),s._clientLeft=s.$wrapperEl[0].clientLeft,n=s.activeIndex);const e=s.slides.eq(n).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(),i=s.slides.eq(n).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index();a=void 0===e?i:void 0===i?e:i-n==n-e?n:i-n<n-e?i:e}else a=t.realIndex;s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(a)<0&&(s.params.centeredSlides?a=a>n?a-Math.floor(i/2)+1:a+Math.floor(i/2)-1:a>n&&(a=a-i+1),s.slideTo(a,e?0:void 0))}let a=1;const n=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(a=t.params.slidesPerView),s.slides.removeClass(n),s.params.loop||s.params.virtual)for(let r=0;r<a;r+=1)s.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex+r}"]`).addClass(n);else for(let r=0;r<a;r+=1)s.slides.eq(t.realIndex+r).addClass(n)}};const Ge=[me,ge,ve,be,we,Ee,Te,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create(){W.extend(this,{mousewheel:{enabled:!1,enable:Ce.enable.bind(this),disable:Ce.disable.bind(this),handle:Ce.handle.bind(this),handleMouseEnter:Ce.handleMouseEnter.bind(this),handleMouseLeave:Ce.handleMouseLeave.bind(this),lastScrollTime:W.now()}})},on:{init(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create(){W.extend(this,{navigation:{init:$e.init.bind(this),update:$e.update.bind(this),destroy:$e.destroy.bind(this),onNextClick:$e.onNextClick.bind(this),onPrevClick:$e.onPrevClick.bind(this)}})},on:{init(){this.navigation.init(),this.navigation.update()},toEdge(){this.navigation.update()},fromEdge(){this.navigation.update()},destroy(){this.navigation.destroy()},click(e){const t=this,{$nextEl:s,$prevEl:i}=t.navigation;if(t.params.navigation.hideOnClick&&!Y(e.target).is(i)&&!Y(e.target).is(s)){let e;s?e=s.hasClass(t.params.navigation.hiddenClass):i&&(e=i.hasClass(t.params.navigation.hiddenClass)),!0===e?t.emit("navigationShow",t):t.emit("navigationHide",t),s&&s.toggleClass(t.params.navigation.hiddenClass),i&&i.toggleClass(t.params.navigation.hiddenClass)}}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create(){W.extend(this,{pagination:{init:ke.init.bind(this),render:ke.render.bind(this),update:ke.update.bind(this),destroy:ke.destroy.bind(this),dynamicBulletIndex:0}})},on:{init(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange(){const e=this;(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange(){const e=this;e.params.loop||e.pagination.update()},slidesLengthChange(){const e=this;e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange(){const e=this;e.params.loop||(e.pagination.render(),e.pagination.update())},destroy(){this.pagination.destroy()},click(e){const t=this;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&t.pagination.$el.length>0&&!Y(e.target).hasClass(t.params.pagination.bulletClass)){!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create(){W.extend(this,{scrollbar:{init:Me.init.bind(this),destroy:Me.destroy.bind(this),updateSize:Me.updateSize.bind(this),setTranslate:Me.setTranslate.bind(this),setTransition:Me.setTransition.bind(this),enableDraggable:Me.enableDraggable.bind(this),disableDraggable:Me.disableDraggable.bind(this),setDragPosition:Me.setDragPosition.bind(this),getPointerPosition:Me.getPointerPosition.bind(this),onDragStart:Me.onDragStart.bind(this),onDragMove:Me.onDragMove.bind(this),onDragEnd:Me.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update(){this.scrollbar.updateSize()},resize(){this.scrollbar.updateSize()},observerUpdate(){this.scrollbar.updateSize()},setTranslate(){this.scrollbar.setTranslate()},setTransition(e){this.scrollbar.setTransition(e)},destroy(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create(){W.extend(this,{parallax:{setTransform:Pe.setTransform.bind(this),setTranslate:Pe.setTranslate.bind(this),setTransition:Pe.setTransition.bind(this)}})},on:{beforeInit(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create(){const e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(s=>{t[s]=Oe[s].bind(e)}),W.extend(e,{zoom:t});let s=1;Object.defineProperty(e.zoom,"scale",{get:()=>s,set(t){if(s!==t){const s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,i=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,i)}s=t}})},on:{init(){const e=this;e.params.zoom.enabled&&e.zoom.enable()},destroy(){this.zoom.disable()},touchStart(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap(e){const t=this;t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&t.zoom.toggle(e)},transitionEnd(){const e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create(){W.extend(this,{lazy:{initialImageLoaded:!1,load:ze.load.bind(this),loadInSlide:ze.loadInSlide.bind(this)}})},on:{beforeInit(){const e=this;e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init(){const e=this;e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll(){const e=this;e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize(){const e=this;e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove(){const e=this;e.params.lazy.enabled&&e.lazy.load()},transitionStart(){const e=this;e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd(){const e=this;e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create(){W.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:Ie.getInterpolateFunction.bind(this),setTranslate:Ie.setTranslate.bind(this),setTransition:Ie.setTransition.bind(this)}})},on:{update(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate(){const e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create(){const e=this;W.extend(e,{a11y:{liveRegion:Y(`<span class="${e.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}}),Object.keys(Le).forEach(t=>{e.a11y[t]=Le[t].bind(e)})},on:{init(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create(){W.extend(this,{history:{init:je.init.bind(this),setHistory:je.setHistory.bind(this),setHistoryPopState:je.setHistoryPopState.bind(this),scrollToSlide:je.scrollToSlide.bind(this),destroy:je.destroy.bind(this)}})},on:{init(){const e=this;e.params.history.enabled&&e.history.init()},destroy(){const e=this;e.params.history.enabled&&e.history.destroy()},transitionEnd(){const e=this;e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create(){W.extend(this,{hashNavigation:{initialized:!1,init:De.init.bind(this),destroy:De.destroy.bind(this),setHash:De.setHash.bind(this),onHashCange:De.onHashCange.bind(this)}})},on:{init(){const e=this;e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy(){const e=this;e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd(){const e=this;e.hashNavigation.initialized&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create(){const e=this;W.extend(e,{autoplay:{running:!1,paused:!1,run:Ae.run.bind(e),start:Ae.start.bind(e),stop:Ae.stop.bind(e),pause:Ae.pause.bind(e),onTransitionEnd(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init(){const e=this;e.params.autoplay.enabled&&e.autoplay.start()},beforeTransitionStart(e,t){const s=this;s.autoplay.running&&(t||!s.params.autoplay.disableOnInteraction?s.autoplay.pause(e):s.autoplay.stop())},sliderFirstMove(){const e=this;e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},destroy(){const e=this;e.autoplay.running&&e.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create(){W.extend(this,{fadeEffect:{setTranslate:_e.setTranslate.bind(this),setTransition:_e.setTransition.bind(this)}})},on:{beforeInit(){if("fade"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"fade");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create(){W.extend(this,{cubeEffect:{setTranslate:Ne.setTranslate.bind(this),setTransition:Ne.setTransition.bind(this)}})},on:{beforeInit(){if("cube"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create(){W.extend(this,{flipEffect:{setTranslate:He.setTranslate.bind(this),setTransition:He.setTransition.bind(this)}})},on:{beforeInit(){if("flip"!==this.params.effect)return;this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");const e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};W.extend(this.params,e),W.extend(this.originalParams,e)},setTranslate(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create(){W.extend(this,{coverflowEffect:{setTranslate:Be.setTranslate.bind(this),setTransition:Be.setTransition.bind(this)}})},on:{beforeInit(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create(){W.extend(this,{thumbs:{swiper:null,init:Ve.init.bind(this),update:Ve.update.bind(this),onThumbClick:Ve.onThumbClick.bind(this)}})},on:{beforeInit(){const{thumbs:e}=this.params;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange(){this.thumbs.swiper&&this.thumbs.update()},update(){this.thumbs.swiper&&this.thumbs.update()},resize(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate(){this.thumbs.swiper&&this.thumbs.update()},setTransition(e){const t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy(){const e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];void 0===fe.use&&(fe.use=fe.Class.use,fe.installModule=fe.Class.installModule),fe.use(Ge);var Re=fe,Xe=(s(36),"wp-block-newspack-blocks-carousel__autoplay-playing");function Ye(e,t){Array.prototype.forEach.call(e,t)}function Fe(e){e.setAttribute("aria-hidden","false"),Ye(e.querySelectorAll("a"),(function(e){return e.removeAttribute("tabindex")}))}function qe(e){e.setAttribute("aria-hidden","true"),Ye(e.querySelectorAll("a"),(function(e){return e.setAttribute("tabindex","-1")}))}var We=function(e){m()(s,e);var t=v()(s);function s(e){var i;return p()(this,s),(i=t.call(this,e)).btnPlayRef=Object(o.createRef)(),i.btnPauseRef=Object(o.createRef)(),i.btnNextRef=Object(o.createRef)(),i.btnPrevRef=Object(o.createRef)(),i.carouselRef=Object(o.createRef)(),i.paginationRef=Object(o.createRef)(),i}return h()(s,[{key:"componentDidMount",value:function(){this.initializeSwiper(0)}},{key:"componentDidUpdate",value:function(e){var t=this.props,s=t.attributes,i=t.latestPosts;if(e.latestPosts!==i||e.latestPosts&&i&&e.latestPosts.length!==i.length||!Object(b.isEqual)(e.attributes,s)){var a=0;this.swiperInstance&&(i&&this.swiperInstance.realIndex<i.length&&(a=this.swiperInstance.realIndex),this.swiperInstance.destroy(!0,!0)),this.initializeSwiper(a)}}},{key:"initializeSwiper",value:function(e){var t=this.props.latestPosts;if(t&&t.length){var s=this.props.attributes,i=s.autoplay,a=s.delay;this.swiperInstance=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=new Re(e.container,{a11y:!1,autoplay:!!t.autoplay&&{delay:t.delay,disableOnInteraction:!1},effect:"slide",grabCursor:!0,init:!1,initialSlide:t.initialSlide||0,loop:!0,navigation:{nextEl:e.next,prevEl:e.prev},pagination:{bulletElement:"button",clickable:!0,el:e.pagination,type:"bullets",renderBullet:function(e,t){return'<button class="'.concat(t,'"><span>').concat(Object(d.sprintf)(Object(d.__)("Slide %s","full-site-editing"),e+1),"</span></button>")}},preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,touchStartPreventDefault:!1,on:{init:function(){Ye(this.wrapperEl.querySelectorAll(".swiper-slide"),(function(e){return qe(e)})),Fe(this.slides[this.activeIndex])},slideChange:function(){var e=this.slides[this.activeIndex];if(qe(this.slides[this.previousIndex]),Fe(e),!this.autoplay.running){var t=e.querySelector("img"),s=!!t&&t.alt,i=Object(d.sprintf)(Object(d.__)("Slide %s of %s","full-site-editing"),this.realIndex+1,this.pagination.bullets.length);Object(B.speak)(Object(V.escapeHTML)("".concat(e.innerText,",\n\t\t\t\t\t\t\t").concat(s?Object(d.sprintf)(Object(d.__)("Image: %s, ","full-site-editing"),s):"","\n\t\t\t\t\t\t\t").concat(i)),"assertive")}}}});if(t.autoplay){function i(){s.autoplay.stop(),e.play.focus()}function a(){s.autoplay.start(),e.pause.focus()}s.on("init",(function(){e.play.addEventListener("click",a),e.pause.addEventListener("click",i)})),s.on("autoplayStart",(function(){e.block.classList.add(Xe),Object(B.speak)(Object(d.__)("Playing","full-site-editing"),"assertive")})),s.on("autoplayStop",(function(){e.block.classList.remove(Xe),Object(B.speak)(Object(d.__)("Paused","full-site-editing"),"assertive")})),s.on("beforeDestroy",(function(){e.play.removeEventListener("click",a),e.pause.removeEventListener("click",i)}))}return s.init(),s}({block:this.carouselRef.current,container:this.carouselRef.current,next:this.btnNextRef.current,prev:this.btnPrevRef.current,play:this.btnPlayRef.current,pause:this.btnPauseRef.current,pagination:this.paginationRef.current},{autoplay:i,delay:1e3*a,initialSlide:e})}}},{key:"render",value:function(){var e=this.props,t=e.attributes,s=e.className,i=e.setAttributes,a=e.latestPosts,n=t.authors,r=t.autoplay,c=t.categories,p=t.delay,u=t.postsToShow,h=t.showCategory,f=t.showDate,m=t.showAuthor,g=t.showAvatar,v=t.tags,b=w()(s,"wp-block-newspack-blocks-carousel","swiper-container",r&&"wp-block-newspack-blocks-carousel__autoplay-playing"),y=Object(x.__experimentalGetSettings)().formats.date;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:b,ref:this.carouselRef},a&&!a.length&&Object(o.createElement)(l.Placeholder,null,Object(d.__)("Sorry, no posts were found.","full-site-editing")),!a&&Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(l.Spinner,null),className:"component-placeholder__align-center"}),a&&Object(o.createElement)(o.Fragment,null,r&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"amp-carousel-button-pause amp-carousel-button",ref:this.btnPauseRef}),Object(o.createElement)("button",{className:"amp-carousel-button-play amp-carousel-button",ref:this.btnPlayRef})),Object(o.createElement)("div",{className:"swiper-wrapper"},a.map((function(e){return e.newspack_featured_image_src&&Object(o.createElement)("article",{className:"post-has-image swiper-slide",key:e.id},Object(o.createElement)("figure",{className:"post-thumbnail"},e.newspack_featured_image_src&&Object(o.createElement)("a",{href:"#",rel:"bookmark"},Object(o.createElement)("img",{src:e.newspack_featured_image_src.large,alt:""}))),Object(o.createElement)("div",{className:"entry-wrapper"},h&&e.newspack_category_info.length&&Object(o.createElement)("div",{className:"cat-links"},Object(o.createElement)("a",{href:"#"},Object(C.decodeEntities)(e.newspack_category_info))),Object(o.createElement)("h3",{className:"entry-title"},Object(o.createElement)("a",{href:"#"},Object(C.decodeEntities)(e.title.rendered.trim()))),Object(o.createElement)("div",{className:"entry-meta"},m&&g&&e.newspack_author_info.map((function(e){return Object(o.createElement)("span",{className:"avatar author-avatar",key:e.id},Object(o.createElement)("a",{className:"url fn n",href:e.author_link},Object(o.createElement)(o.RawHTML,null,e.avatar)))})),m&&function(e){return Object(o.createElement)("span",{className:"byline"},Object(d._x)("by","post author","full-site-editing")," ",e.reduce((function(t,s,i){return[].concat(A()(t),[Object(o.createElement)("span",{className:"author vcard",key:s.id},Object(o.createElement)("a",{className:"url fn n",href:s.author_link},s.display_name)),i<e.length-2&&", ",e.length>1&&i===e.length-2&&Object(d._x)(" and ","post author","full-site-editing")])}),[]))}(e.newspack_author_info),f&&Object(o.createElement)("time",{className:"entry-date published",key:"pub-date"},Object(x.dateI18n)(y,e.date_gmt)))))}))),Object(o.createElement)("button",{className:"amp-carousel-button amp-carousel-button-prev swiper-button-prev",ref:this.btnPrevRef}),Object(o.createElement)("button",{className:"amp-carousel-button amp-carousel-button-next swiper-button-next",ref:this.btnNextRef}),Object(o.createElement)("div",{className:"swiper-pagination-bullets amp-pagination",ref:this.paginationRef}))),Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Display Settings","full-site-editing"),initialOpen:!0},u&&Object(o.createElement)(H,{enableSpecific:!1,numberOfItems:u,onNumberOfItemsChange:function(e){return i({postsToShow:e||1})},authors:n,onAuthorsChange:function(e){return i({authors:e})},categories:c,onCategoriesChange:function(e){return i({categories:e})},tags:v,onTagsChange:function(e){return i({tags:e})}})),Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Slideshow Settings","full-site-editing"),initialOpen:!0},Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Autoplay","full-site-editing"),help:Object(d.__)("Autoplay between slides","full-site-editing"),checked:r,onChange:function(e){i({autoplay:e})}}),r&&Object(o.createElement)(l.RangeControl,{label:Object(d.__)("Delay between transitions (in seconds)","full-site-editing"),value:p,onChange:function(e){i({delay:e})},min:1,max:20})),Object(o.createElement)(l.PanelBody,{title:Object(d.__)("Article Meta Settings","full-site-editing")},Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Date","full-site-editing"),checked:f,onChange:function(){return i({showDate:!f})}})),Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Category","full-site-editing"),checked:h,onChange:function(){return i({showCategory:!h})}})),Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Author","full-site-editing"),checked:m,onChange:function(){return i({showAuthor:!m})}})),m&&Object(o.createElement)(l.PanelRow,null,Object(o.createElement)(l.ToggleControl,{label:Object(d.__)("Show Author Avatar","full-site-editing"),checked:g,onChange:function(){return i({showAvatar:!g})}})))))}}]),s}(o.Component),Ue=Object(T.compose)([Object(S.withSelect)((function(e,t){var s=t.attributes,i=s.postsToShow,a=s.authors,n=s.categories,r=s.tags;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(b.pickBy)({per_page:i,categories:n,author:a,tags:r,meta_key:"_thumbnail_id",meta_value_num:0,meta_compare:">"},(function(e){return!Object(b.isUndefined)(e)})))}}))])(We),Ke=(s(37),s(38),{title:Object(d.__)("Post Carousel","full-site-editing"),icon:Object(o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)(l.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)(l.Path,{d:"M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"})),category:"newspack",keywords:[Object(d.__)("posts","full-site-editing"),Object(d.__)("slideshow","full-site-editing"),Object(d.__)("carousel","full-site-editing")],description:Object(d.__)("A carousel of posts.","full-site-editing"),attributes:{className:{type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:5},postsToShow:{type:"integer",default:3},authors:{type:"array"},categories:{type:"array"},tags:{type:"array"},showDate:{type:"boolean",default:!0},showAuthor:{type:"boolean",default:!0},showAvatar:{type:"boolean",default:!0},showCategory:{type:"boolean",default:!1}},supports:{html:!1,align:!1},edit:Ue,save:function(){return null}});Object(r.addFilter)("blocks.transforms_from_name","set-transformed-block-name",(function(e){return"newspack-blocks/carousel"!==e?e:"a8c/posts-carousel"})),Object(n.registerBlockType)("a8c/posts-carousel",a()({},Ke,{category:"layout"}))}]));
newspack-blocks/dist/carousel-block-view.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-a11y', 'wp-dom-ready', 'wp-escape-html', 'wp-i18n', 'wp-polyfill'), 'version' => '99320a106d5708840dc6ec599f3819e7');
1
+ <?php return array('dependencies' => array('wp-a11y', 'wp-dom-ready', 'wp-escape-html', 'wp-i18n', 'wp-polyfill'), 'version' => '739a1f6fe9bc0b92c712cf218bb53c59');
newspack-blocks/synced-newspack-blocks/blocks/carousel/create-swiper.js CHANGED
@@ -12,7 +12,7 @@ const autoplayClassName = 'wp-block-newspack-blocks-carousel__autoplay-playing';
12
  /**
13
  * A helper for IE11-compatible iteration over NodeList elements.
14
  *
15
- * @param {Object} nodeList List of nodes to be iterated over.
16
  * @param {Function} cb Invoked for each iteratee.
17
  */
18
  function forEachNode( nodeList, cb ) {
@@ -31,7 +31,7 @@ function forEachNode( nodeList, cb ) {
31
  */
32
  function activateSlide( slide ) {
33
  slide.setAttribute( 'aria-hidden', 'false' );
34
- forEachNode( slide.querySelectorAll( 'a' ), el => el.removeAttribute( 'tabindex' ) );
35
  }
36
 
37
  /**
@@ -41,14 +41,14 @@ function activateSlide( slide ) {
41
  */
42
  function deactivateSlide( slide ) {
43
  slide.setAttribute( 'aria-hidden', 'true' );
44
- forEachNode( slide.querySelectorAll( 'a' ), el => el.setAttribute( 'tabindex', '-1' ) );
45
  }
46
 
47
  /**
48
  * Creates a Swiper instance with predefined config used by the Articles
49
  * Carousel block in both front-end and editor.
50
  *
51
- * @param {Object} els Swiper elements
52
  * @param {Element} els.block Block element
53
  * @param {Element} els.container Swiper container element
54
  * @param {Element} els.next Next button element
@@ -56,8 +56,8 @@ function deactivateSlide( slide ) {
56
  * @param {Element} els.play Play button element
57
  * @param {Element} els.pause Pause button element
58
  * @param {Element} els.pagination Pagination element
59
- * @param {Object} config Swiper config
60
- * @return {Object} Swiper instance
61
  */
62
  export default function createSwiper( els, config = {} ) {
63
  const swiper = new Swiper( els.container, {
@@ -98,7 +98,7 @@ export default function createSwiper( els, config = {} ) {
98
  touchStartPreventDefault: false,
99
  on: {
100
  init() {
101
- forEachNode( this.wrapperEl.querySelectorAll( '.swiper-slide' ), slide =>
102
  deactivateSlide( slide )
103
  );
104
 
@@ -158,22 +158,22 @@ export default function createSwiper( els, config = {} ) {
158
  els.pause.focus(); // Move focus to the pause button.
159
  }
160
 
161
- swiper.on( 'init', function() {
162
  els.play.addEventListener( 'click', handlePlayButtonClick );
163
  els.pause.addEventListener( 'click', handlePauseButtonClick );
164
  } );
165
 
166
- swiper.on( 'autoplayStart', function() {
167
  els.block.classList.add( autoplayClassName ); // Hide play & show pause button.
168
  speak( __( 'Playing', 'full-site-editing' ), 'assertive' );
169
  } );
170
 
171
- swiper.on( 'autoplayStop', function() {
172
  els.block.classList.remove( autoplayClassName ); // Hide pause & show play button.
173
  speak( __( 'Paused', 'full-site-editing' ), 'assertive' );
174
  } );
175
 
176
- swiper.on( 'beforeDestroy', function() {
177
  els.play.removeEventListener( 'click', handlePlayButtonClick );
178
  els.pause.removeEventListener( 'click', handlePauseButtonClick );
179
  } );
12
  /**
13
  * A helper for IE11-compatible iteration over NodeList elements.
14
  *
15
+ * @param {object} nodeList List of nodes to be iterated over.
16
  * @param {Function} cb Invoked for each iteratee.
17
  */
18
  function forEachNode( nodeList, cb ) {
31
  */
32
  function activateSlide( slide ) {
33
  slide.setAttribute( 'aria-hidden', 'false' );
34
+ forEachNode( slide.querySelectorAll( 'a' ), ( el ) => el.removeAttribute( 'tabindex' ) );
35
  }
36
 
37
  /**
41
  */
42
  function deactivateSlide( slide ) {
43
  slide.setAttribute( 'aria-hidden', 'true' );
44
+ forEachNode( slide.querySelectorAll( 'a' ), ( el ) => el.setAttribute( 'tabindex', '-1' ) );
45
  }
46
 
47
  /**
48
  * Creates a Swiper instance with predefined config used by the Articles
49
  * Carousel block in both front-end and editor.
50
  *
51
+ * @param {object} els Swiper elements
52
  * @param {Element} els.block Block element
53
  * @param {Element} els.container Swiper container element
54
  * @param {Element} els.next Next button element
56
  * @param {Element} els.play Play button element
57
  * @param {Element} els.pause Pause button element
58
  * @param {Element} els.pagination Pagination element
59
+ * @param {object} config Swiper config
60
+ * @returns {object} Swiper instance
61
  */
62
  export default function createSwiper( els, config = {} ) {
63
  const swiper = new Swiper( els.container, {
98
  touchStartPreventDefault: false,
99
  on: {
100
  init() {
101
+ forEachNode( this.wrapperEl.querySelectorAll( '.swiper-slide' ), ( slide ) =>
102
  deactivateSlide( slide )
103
  );
104
 
158
  els.pause.focus(); // Move focus to the pause button.
159
  }
160
 
161
+ swiper.on( 'init', function () {
162
  els.play.addEventListener( 'click', handlePlayButtonClick );
163
  els.pause.addEventListener( 'click', handlePauseButtonClick );
164
  } );
165
 
166
+ swiper.on( 'autoplayStart', function () {
167
  els.block.classList.add( autoplayClassName ); // Hide play & show pause button.
168
  speak( __( 'Playing', 'full-site-editing' ), 'assertive' );
169
  } );
170
 
171
+ swiper.on( 'autoplayStop', function () {
172
  els.block.classList.remove( autoplayClassName ); // Hide pause & show play button.
173
  speak( __( 'Paused', 'full-site-editing' ), 'assertive' );
174
  } );
175
 
176
+ swiper.on( 'beforeDestroy', function () {
177
  els.play.removeEventListener( 'click', handlePlayButtonClick );
178
  els.pause.removeEventListener( 'click', handlePauseButtonClick );
179
  } );
newspack-blocks/synced-newspack-blocks/blocks/carousel/edit.js CHANGED
@@ -121,7 +121,7 @@ class Edit extends Component {
121
  <Fragment>
122
  <div className={ classes } ref={ this.carouselRef }>
123
  { latestPosts && ! latestPosts.length && (
124
- <Placeholder>{ __( 'Sorry, no posts were found.' ) }</Placeholder>
125
  ) }
126
  { ! latestPosts && (
127
  <Placeholder icon={ <Spinner /> } className="component-placeholder__align-center" />
@@ -142,7 +142,7 @@ class Edit extends Component {
142
  ) }
143
  <div className="swiper-wrapper">
144
  { latestPosts.map(
145
- post =>
146
  post.newspack_featured_image_src && (
147
  <article className="post-has-image swiper-slide" key={ post.id }>
148
  <figure className="post-thumbnail">
@@ -193,37 +193,37 @@ class Edit extends Component {
193
  ) }
194
  </div>
195
  <InspectorControls>
196
- <PanelBody title={ __( 'Display Settings' ) } initialOpen={ true }>
197
  { postsToShow && (
198
  <QueryControls
199
  enableSpecific={ false }
200
  numberOfItems={ postsToShow }
201
- onNumberOfItemsChange={ value =>
202
  setAttributes( { postsToShow: value ? value : 1 } )
203
  }
204
  authors={ authors }
205
- onAuthorsChange={ value => setAttributes( { authors: value } ) }
206
  categories={ categories }
207
- onCategoriesChange={ value => setAttributes( { categories: value } ) }
208
  tags={ tags }
209
- onTagsChange={ value => setAttributes( { tags: value } ) }
210
  />
211
  ) }
212
  </PanelBody>
213
- <PanelBody title={ __( 'Slideshow Settings' ) } initialOpen={ true }>
214
  <ToggleControl
215
- label={ __( 'Autoplay' ) }
216
- help={ __( 'Autoplay between slides' ) }
217
  checked={ autoplay }
218
- onChange={ _autoplay => {
219
  setAttributes( { autoplay: _autoplay } );
220
  } }
221
  />
222
  { autoplay && (
223
  <RangeControl
224
- label={ __( 'Delay between transitions (in seconds)' ) }
225
  value={ delay }
226
- onChange={ _delay => {
227
  setAttributes( { delay: _delay } );
228
  } }
229
  min={ 1 }
@@ -283,7 +283,7 @@ export default compose( [
283
  meta_value_num: 0,
284
  meta_compare: '>',
285
  },
286
- value => ! isUndefined( value )
287
  );
288
  return {
289
  latestPosts: getEntityRecords( 'postType', 'post', latestPostsQuery ),
121
  <Fragment>
122
  <div className={ classes } ref={ this.carouselRef }>
123
  { latestPosts && ! latestPosts.length && (
124
+ <Placeholder>{ __( 'Sorry, no posts were found.', 'full-site-editing' ) }</Placeholder>
125
  ) }
126
  { ! latestPosts && (
127
  <Placeholder icon={ <Spinner /> } className="component-placeholder__align-center" />
142
  ) }
143
  <div className="swiper-wrapper">
144
  { latestPosts.map(
145
+ ( post ) =>
146
  post.newspack_featured_image_src && (
147
  <article className="post-has-image swiper-slide" key={ post.id }>
148
  <figure className="post-thumbnail">
193
  ) }
194
  </div>
195
  <InspectorControls>
196
+ <PanelBody title={ __( 'Display Settings', 'full-site-editing' ) } initialOpen={ true }>
197
  { postsToShow && (
198
  <QueryControls
199
  enableSpecific={ false }
200
  numberOfItems={ postsToShow }
201
+ onNumberOfItemsChange={ ( value ) =>
202
  setAttributes( { postsToShow: value ? value : 1 } )
203
  }
204
  authors={ authors }
205
+ onAuthorsChange={ ( value ) => setAttributes( { authors: value } ) }
206
  categories={ categories }
207
+ onCategoriesChange={ ( value ) => setAttributes( { categories: value } ) }
208
  tags={ tags }
209
+ onTagsChange={ ( value ) => setAttributes( { tags: value } ) }
210
  />
211
  ) }
212
  </PanelBody>
213
+ <PanelBody title={ __( 'Slideshow Settings', 'full-site-editing' ) } initialOpen={ true }>
214
  <ToggleControl
215
+ label={ __( 'Autoplay', 'full-site-editing' ) }
216
+ help={ __( 'Autoplay between slides', 'full-site-editing' ) }
217
  checked={ autoplay }
218
+ onChange={ ( _autoplay ) => {
219
  setAttributes( { autoplay: _autoplay } );
220
  } }
221
  />
222
  { autoplay && (
223
  <RangeControl
224
+ label={ __( 'Delay between transitions (in seconds)', 'full-site-editing' ) }
225
  value={ delay }
226
+ onChange={ ( _delay ) => {
227
  setAttributes( { delay: _delay } );
228
  } }
229
  min={ 1 }
283
  meta_value_num: 0,
284
  meta_compare: '>',
285
  },
286
+ ( value ) => ! isUndefined( value )
287
  );
288
  return {
289
  latestPosts: getEntityRecords( 'postType', 'post', latestPostsQuery ),
newspack-blocks/synced-newspack-blocks/blocks/carousel/index.js CHANGED
@@ -16,7 +16,7 @@ import './view.scss';
16
  import './editor.scss';
17
 
18
  export const name = 'carousel';
19
- export const title = __( 'Post Carousel' );
20
 
21
  /* From https://material.io/tools/icons */
22
  export const icon = (
@@ -30,8 +30,12 @@ export const settings = {
30
  title,
31
  icon,
32
  category: 'newspack',
33
- keywords: [ __( 'posts' ), __( 'slideshow' ), __( 'carousel' ) ],
34
- description: __( 'A carousel of posts.' ),
 
 
 
 
35
  attributes: {
36
  className: {
37
  type: 'string',
16
  import './editor.scss';
17
 
18
  export const name = 'carousel';
19
+ export const title = __( 'Post Carousel', 'full-site-editing' );
20
 
21
  /* From https://material.io/tools/icons */
22
  export const icon = (
30
  title,
31
  icon,
32
  category: 'newspack',
33
+ keywords: [
34
+ __( 'posts', 'full-site-editing' ),
35
+ __( 'slideshow', 'full-site-editing' ),
36
+ __( 'carousel', 'full-site-editing' ),
37
+ ],
38
+ description: __( 'A carousel of posts.', 'full-site-editing' ),
39
  attributes: {
40
  className: {
41
  type: 'string',
newspack-blocks/synced-newspack-blocks/blocks/carousel/view.js CHANGED
@@ -14,7 +14,7 @@ if ( typeof window !== 'undefined' ) {
14
  const blocksArray = Array.from(
15
  document.querySelectorAll( '.wp-block-newspack-blocks-carousel' )
16
  );
17
- blocksArray.forEach( block => {
18
  createSwiper(
19
  {
20
  block,
14
  const blocksArray = Array.from(
15
  document.querySelectorAll( '.wp-block-newspack-blocks-carousel' )
16
  );
17
+ blocksArray.forEach( ( block ) => {
18
  createSwiper(
19
  {
20
  block,
newspack-blocks/synced-newspack-blocks/blocks/carousel/view.php CHANGED
@@ -132,7 +132,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
132
  <?php
133
  printf(
134
  /* translators: %s: post author. */
135
- esc_html_x( 'by %s', 'post author', 'full-site-editing' ),
136
  '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
137
  );
138
  ?>
@@ -160,7 +160,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
160
  for ( $x = 0; $x < $counter; $x++ ) {
161
  $aria_label = sprintf(
162
  /* translators: %d: Slide number. */
163
- __( 'Go to slide %d', 'full-site-editing' ),
164
  absint( $x + 1 )
165
  );
166
  $buttons[] = sprintf(
@@ -178,8 +178,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
178
  );
179
  $carousel = sprintf(
180
  '<amp-carousel width="4" height="3" layout="responsive" type="slides" data-next-button-aria-label="%1$s" data-prev-button-aria-label="%2$s" controls loop %3$s id="wp-block-newspack-carousel__amp-carousel__%4$s" on="slideChange:wp-block-newspack-carousel__amp-pagination__%4$s.toggle(index=event.index, value=true)">%5$s</amp-carousel>',
181
- esc_attr__( 'Next Slide', 'full-site-editing' ),
182
- esc_attr__( 'Previous Slide', 'full-site-editing' ),
183
  $autoplay ? 'autoplay delay=' . esc_attr( $delay * 1000 ) : '',
184
  absint( $newspack_blocks_carousel_id ),
185
  $slides
@@ -192,8 +192,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
192
  );
193
  $navigation = sprintf(
194
  '<button class="swiper-button swiper-button-prev" aria-label="%s"></button><button class="swiper-button swiper-button-next" aria-label="%s"></button>',
195
- esc_attr__( 'Previous Slide', 'full-site-editing' ),
196
- esc_attr__( 'Next Slide', 'full-site-editing' )
197
  );
198
  $carousel = sprintf(
199
  '<div class="swiper-container"><div class="swiper-wrapper">%s</div>%s</div>',
@@ -230,8 +230,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
230
  function newspack_blocks_carousel_block_autoplay_ui( $block_ordinal = 0 ) {
231
  return sprintf(
232
  '<button aria-label="%s" class="swiper-button swiper-button-pause"></button><button aria-label="%s" class="swiper-button swiper-button-play"></button>',
233
- esc_attr__( 'Pause Slideshow', 'full-site-editing' ),
234
- esc_attr__( 'Play Slideshow', 'full-site-editing' )
235
  );
236
  }
237
 
@@ -253,13 +253,13 @@ function newspack_blocks_carousel_block_autoplay_ui_amp( $block_ordinal = 0 ) {
253
  );
254
  $autoplay_pause = sprintf(
255
  '<button aria-label="%s" class="amp-carousel-button-pause amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=false),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=false)"></button>',
256
- esc_attr__( 'Pause Slideshow', 'full-site-editing' ),
257
  esc_attr( $amp_carousel_id ),
258
  esc_attr( $block_id )
259
  );
260
  $autoplay_play = sprintf(
261
  '<button aria-label="%s" class="amp-carousel-button-play amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=true),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=true)"></button>',
262
- esc_attr__( 'Play Slideshow', 'full-site-editing' ),
263
  esc_attr( $amp_carousel_id ),
264
  esc_attr( $block_id )
265
  );
132
  <?php
133
  printf(
134
  /* translators: %s: post author. */
135
+ esc_html_x( 'by %s', 'post author', 'newspack-blocks' ),
136
  '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
137
  );
138
  ?>
160
  for ( $x = 0; $x < $counter; $x++ ) {
161
  $aria_label = sprintf(
162
  /* translators: %d: Slide number. */
163
+ __( 'Go to slide %d', 'newspack-blocks' ),
164
  absint( $x + 1 )
165
  );
166
  $buttons[] = sprintf(
178
  );
179
  $carousel = sprintf(
180
  '<amp-carousel width="4" height="3" layout="responsive" type="slides" data-next-button-aria-label="%1$s" data-prev-button-aria-label="%2$s" controls loop %3$s id="wp-block-newspack-carousel__amp-carousel__%4$s" on="slideChange:wp-block-newspack-carousel__amp-pagination__%4$s.toggle(index=event.index, value=true)">%5$s</amp-carousel>',
181
+ esc_attr__( 'Next Slide', 'newspack-blocks' ),
182
+ esc_attr__( 'Previous Slide', 'newspack-blocks' ),
183
  $autoplay ? 'autoplay delay=' . esc_attr( $delay * 1000 ) : '',
184
  absint( $newspack_blocks_carousel_id ),
185
  $slides
192
  );
193
  $navigation = sprintf(
194
  '<button class="swiper-button swiper-button-prev" aria-label="%s"></button><button class="swiper-button swiper-button-next" aria-label="%s"></button>',
195
+ esc_attr__( 'Previous Slide', 'newspack-blocks' ),
196
+ esc_attr__( 'Next Slide', 'newspack-blocks' )
197
  );
198
  $carousel = sprintf(
199
  '<div class="swiper-container"><div class="swiper-wrapper">%s</div>%s</div>',
230
  function newspack_blocks_carousel_block_autoplay_ui( $block_ordinal = 0 ) {
231
  return sprintf(
232
  '<button aria-label="%s" class="swiper-button swiper-button-pause"></button><button aria-label="%s" class="swiper-button swiper-button-play"></button>',
233
+ esc_attr__( 'Pause Slideshow', 'newspack-blocks' ),
234
+ esc_attr__( 'Play Slideshow', 'newspack-blocks' )
235
  );
236
  }
237
 
253
  );
254
  $autoplay_pause = sprintf(
255
  '<button aria-label="%s" class="amp-carousel-button-pause amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=false),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=false)"></button>',
256
+ esc_attr__( 'Pause Slideshow', 'newspack-blocks' ),
257
  esc_attr( $amp_carousel_id ),
258
  esc_attr( $block_id )
259
  );
260
  $autoplay_play = sprintf(
261
  '<button aria-label="%s" class="amp-carousel-button-play amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=true),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=true)"></button>',
262
+ esc_attr__( 'Play Slideshow', 'newspack-blocks' ),
263
  esc_attr( $amp_carousel_id ),
264
  esc_attr( $block_id )
265
  );
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/edit.js CHANGED
@@ -90,7 +90,7 @@ const coverIcon = (
90
  );
91
 
92
  class Edit extends Component {
93
- renderPost = post => {
94
  const { attributes } = this.props;
95
  const {
96
  showImage,
@@ -193,7 +193,7 @@ class Edit extends Component {
193
  );
194
  };
195
 
196
- titleForPost = post => {
197
  if ( ! post.title ) {
198
  return '';
199
  }
@@ -254,11 +254,11 @@ class Edit extends Component {
254
  value: 4,
255
  label: /* translators: label for extra large size option */ __(
256
  'Extra Large',
257
- 'newspack-blocks'
258
  ),
259
  shortName: /* translators: abbreviation for extra large size */ __(
260
  'XL',
261
- 'newspack-blocks'
262
  ),
263
  },
264
  ];
@@ -269,27 +269,27 @@ class Edit extends Component {
269
  { postsToShow && (
270
  <QueryControls
271
  numberOfItems={ postsToShow }
272
- onNumberOfItemsChange={ _postsToShow =>
273
  setAttributes( { postsToShow: _postsToShow } )
274
  }
275
  specificMode={ specificMode }
276
- onSpecificModeChange={ _specificMode =>
277
  setAttributes( { specificMode: _specificMode } )
278
  }
279
  specificPosts={ specificPosts }
280
- onSpecificPostsChange={ _specificPosts =>
281
  setAttributes( { specificPosts: _specificPosts } )
282
  }
283
  authors={ authors }
284
- onAuthorsChange={ _authors => setAttributes( { authors: _authors } ) }
285
  categories={ categories }
286
- onCategoriesChange={ _categories => setAttributes( { categories: _categories } ) }
287
  tags={ tags }
288
- onTagsChange={ _tags => {
289
  setAttributes( { tags: _tags } );
290
  } }
291
  tagExclusions={ tagExclusions }
292
- onTagExclusionsChange={ _tagExclusions =>
293
  setAttributes( { tagExclusions: _tagExclusions } )
294
  }
295
  />
@@ -298,7 +298,7 @@ class Edit extends Component {
298
  <RangeControl
299
  label={ __( 'Columns', 'full-site-editing' ) }
300
  value={ columns }
301
- onChange={ _columns => setAttributes( { columns: _columns } ) }
302
  min={ 2 }
303
  max={ 6 }
304
  required
@@ -356,7 +356,7 @@ class Edit extends Component {
356
  id="newspackfeatured-image-size"
357
  aria-label={ __( 'Featured Image Size', 'full-site-editing' ) }
358
  >
359
- { imageSizeOptions.map( option => {
360
  const isCurrent = imageScale === option.value;
361
  return (
362
  <Button
@@ -382,10 +382,10 @@ class Edit extends Component {
382
  label={ __( 'Minimum height', 'full-site-editing' ) }
383
  help={ __(
384
  "Sets a minimum height for the block, using a percentage of the screen's current height.",
385
- 'newspack-blocks'
386
  ) }
387
  value={ minHeight }
388
- onChange={ _minHeight => setAttributes( { minHeight: _minHeight } ) }
389
  min={ 0 }
390
  max={ 100 }
391
  required
@@ -413,7 +413,7 @@ class Edit extends Component {
413
  className="type-scale-slider"
414
  label={ __( 'Type Scale', 'full-site-editing' ) }
415
  value={ typeScale }
416
- onChange={ _typeScale => setAttributes( { typeScale: _typeScale } ) }
417
  min={ 1 }
418
  max={ 10 }
419
  beforeIcon="editor-textcolor"
@@ -597,7 +597,7 @@ class Edit extends Component {
597
  <div>
598
  { latestPosts && ( ! RichText.isEmpty( sectionHeader ) || isSelected ) && (
599
  <RichText
600
- onChange={ value => setAttributes( { sectionHeader: value } ) }
601
  placeholder={ __( 'Write header…', 'full-site-editing' ) }
602
  value={ sectionHeader }
603
  tagName="h2"
@@ -605,12 +605,14 @@ class Edit extends Component {
605
  />
606
  ) }
607
  { latestPosts && ! latestPosts.length && (
608
- <Placeholder>{ __( 'Sorry, no posts were found.', 'full-site-editing' ) }</Placeholder>
 
 
609
  ) }
610
  { ! latestPosts && (
611
  <Placeholder icon={ <Spinner /> } className="component-placeholder__align-center" />
612
  ) }
613
- { latestPosts && latestPosts.map( post => this.renderPost( post ) ) }
614
  </div>
615
  </div>
616
 
@@ -624,7 +626,7 @@ class Edit extends Component {
624
  <RichText
625
  placeholder={ __( 'Load more posts', 'full-site-editing' ) }
626
  value={ moreButtonText }
627
- onChange={ value => setAttributes( { moreButtonText: value } ) }
628
  className="wp-block-button__link"
629
  keepPlaceholderOnFocus
630
  allowedFormats={ [] }
90
  );
91
 
92
  class Edit extends Component {
93
+ renderPost = ( post ) => {
94
  const { attributes } = this.props;
95
  const {
96
  showImage,
193
  );
194
  };
195
 
196
+ titleForPost = ( post ) => {
197
  if ( ! post.title ) {
198
  return '';
199
  }
254
  value: 4,
255
  label: /* translators: label for extra large size option */ __(
256
  'Extra Large',
257
+ 'full-site-editing'
258
  ),
259
  shortName: /* translators: abbreviation for extra large size */ __(
260
  'XL',
261
+ 'full-site-editing'
262
  ),
263
  },
264
  ];
269
  { postsToShow && (
270
  <QueryControls
271
  numberOfItems={ postsToShow }
272
+ onNumberOfItemsChange={ ( _postsToShow ) =>
273
  setAttributes( { postsToShow: _postsToShow } )
274
  }
275
  specificMode={ specificMode }
276
+ onSpecificModeChange={ ( _specificMode ) =>
277
  setAttributes( { specificMode: _specificMode } )
278
  }
279
  specificPosts={ specificPosts }
280
+ onSpecificPostsChange={ ( _specificPosts ) =>
281
  setAttributes( { specificPosts: _specificPosts } )
282
  }
283
  authors={ authors }
284
+ onAuthorsChange={ ( _authors ) => setAttributes( { authors: _authors } ) }
285
  categories={ categories }
286
+ onCategoriesChange={ ( _categories ) => setAttributes( { categories: _categories } ) }
287
  tags={ tags }
288
+ onTagsChange={ ( _tags ) => {
289
  setAttributes( { tags: _tags } );
290
  } }
291
  tagExclusions={ tagExclusions }
292
+ onTagExclusionsChange={ ( _tagExclusions ) =>
293
  setAttributes( { tagExclusions: _tagExclusions } )
294
  }
295
  />
298
  <RangeControl
299
  label={ __( 'Columns', 'full-site-editing' ) }
300
  value={ columns }
301
+ onChange={ ( _columns ) => setAttributes( { columns: _columns } ) }
302
  min={ 2 }
303
  max={ 6 }
304
  required
356
  id="newspackfeatured-image-size"
357
  aria-label={ __( 'Featured Image Size', 'full-site-editing' ) }
358
  >
359
+ { imageSizeOptions.map( ( option ) => {
360
  const isCurrent = imageScale === option.value;
361
  return (
362
  <Button
382
  label={ __( 'Minimum height', 'full-site-editing' ) }
383
  help={ __(
384
  "Sets a minimum height for the block, using a percentage of the screen's current height.",
385
+ 'full-site-editing'
386
  ) }
387
  value={ minHeight }
388
+ onChange={ ( _minHeight ) => setAttributes( { minHeight: _minHeight } ) }
389
  min={ 0 }
390
  max={ 100 }
391
  required
413
  className="type-scale-slider"
414
  label={ __( 'Type Scale', 'full-site-editing' ) }
415
  value={ typeScale }
416
+ onChange={ ( _typeScale ) => setAttributes( { typeScale: _typeScale } ) }
417
  min={ 1 }
418
  max={ 10 }
419
  beforeIcon="editor-textcolor"
597
  <div>
598
  { latestPosts && ( ! RichText.isEmpty( sectionHeader ) || isSelected ) && (
599
  <RichText
600
+ onChange={ ( value ) => setAttributes( { sectionHeader: value } ) }
601
  placeholder={ __( 'Write header…', 'full-site-editing' ) }
602
  value={ sectionHeader }
603
  tagName="h2"
605
  />
606
  ) }
607
  { latestPosts && ! latestPosts.length && (
608
+ <Placeholder>
609
+ { __( 'Sorry, no posts were found.', 'full-site-editing' ) }
610
+ </Placeholder>
611
  ) }
612
  { ! latestPosts && (
613
  <Placeholder icon={ <Spinner /> } className="component-placeholder__align-center" />
614
  ) }
615
+ { latestPosts && latestPosts.map( ( post ) => this.renderPost( post ) ) }
616
  </div>
617
  </div>
618
 
626
  <RichText
627
  placeholder={ __( 'Load more posts', 'full-site-editing' ) }
628
  value={ moreButtonText }
629
+ onChange={ ( value ) => setAttributes( { moreButtonText: value } ) }
630
  className="wp-block-button__link"
631
  keepPlaceholderOnFocus
632
  allowedFormats={ [] }
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/index.js CHANGED
@@ -48,7 +48,11 @@ export const settings = {
48
  ],
49
  description: __( 'A block for displaying homepage posts.', 'full-site-editing' ),
50
  styles: [
51
- { name: 'default', label: _x( 'Default', 'block style', 'full-site-editing' ), isDefault: true },
 
 
 
 
52
  { name: 'borders', label: _x( 'Borders', 'block style', 'full-site-editing' ) },
53
  ],
54
  supports: {
48
  ],
49
  description: __( 'A block for displaying homepage posts.', 'full-site-editing' ),
50
  styles: [
51
+ {
52
+ name: 'default',
53
+ label: _x( 'Default', 'block style', 'full-site-editing' ),
54
+ isDefault: true,
55
+ },
56
  { name: 'borders', label: _x( 'Borders', 'block style', 'full-site-editing' ) },
57
  ],
58
  supports: {
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/store.js CHANGED
@@ -64,7 +64,7 @@ const actions = {
64
  * @returns {Block[]} blocks
65
  */
66
  const blocksBefore = ( orderedBlocks, clientId ) => {
67
- const ourBlockIdx = orderedBlocks.findIndex( b => b.clientId === clientId );
68
  return orderedBlocks.slice( 0, ourBlockIdx );
69
  };
70
 
@@ -74,17 +74,17 @@ const selectors = {
74
 
75
  const postIdsFromSpecificMode = queryBlocks
76
  .filter( ( { clientId } ) => specificPostsByBlock[ clientId ] )
77
- .flatMap( ( { clientId } ) => specificPostsByBlock[ clientId ].map( p => p.id ) );
78
 
79
  const previousPostIds = blocksBefore( queryBlocks, _clientId )
80
  .filter( ( { clientId } ) => postsByBlock[ clientId ] )
81
- .flatMap( ( { clientId } ) => postsByBlock[ clientId ].map( p => p.id ) );
82
 
83
  return uniq( postIdsFromSpecificMode.concat( previousPostIds ) ).sort();
84
  },
85
  };
86
 
87
- export const registerQueryStore = blockName => {
88
  /**
89
  * Returns an array of all newspack-blocks/query blocks in the order they are on
90
  * the page. This is needed to be able to show the editor blocks in the order
@@ -93,8 +93,8 @@ export const registerQueryStore = blockName => {
93
  * @param {Block[]} blocks any blocks
94
  * @returns {Block[]} ordered newspack-blocks/query blocks
95
  */
96
- const getQueryBlocksInOrder = blocks =>
97
- blocks.flatMap( block => {
98
  const queryBlocks = [];
99
  if ( block.name === blockName ) {
100
  queryBlocks.push( block );
64
  * @returns {Block[]} blocks
65
  */
66
  const blocksBefore = ( orderedBlocks, clientId ) => {
67
+ const ourBlockIdx = orderedBlocks.findIndex( ( b ) => b.clientId === clientId );
68
  return orderedBlocks.slice( 0, ourBlockIdx );
69
  };
70
 
74
 
75
  const postIdsFromSpecificMode = queryBlocks
76
  .filter( ( { clientId } ) => specificPostsByBlock[ clientId ] )
77
+ .flatMap( ( { clientId } ) => specificPostsByBlock[ clientId ].map( ( p ) => p.id ) );
78
 
79
  const previousPostIds = blocksBefore( queryBlocks, _clientId )
80
  .filter( ( { clientId } ) => postsByBlock[ clientId ] )
81
+ .flatMap( ( { clientId } ) => postsByBlock[ clientId ].map( ( p ) => p.id ) );
82
 
83
  return uniq( postIdsFromSpecificMode.concat( previousPostIds ) ).sort();
84
  },
85
  };
86
 
87
+ export const registerQueryStore = ( blockName ) => {
88
  /**
89
  * Returns an array of all newspack-blocks/query blocks in the order they are on
90
  * the page. This is needed to be able to show the editor blocks in the order
93
  * @param {Block[]} blocks any blocks
94
  * @returns {Block[]} ordered newspack-blocks/query blocks
95
  */
96
+ const getQueryBlocksInOrder = ( blocks ) =>
97
+ blocks.flatMap( ( block ) => {
98
  const queryBlocks = [];
99
  if ( block.name === blockName ) {
100
  queryBlocks.push( block );
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/utils.js CHANGED
@@ -7,7 +7,7 @@ import { isUndefined, pickBy } from 'lodash';
7
  * Based global WP.com blog_public option, checks whether current blog is
8
  * private or not.
9
  *
10
- * @return {boolean} a private WP.com blog flag
11
  */
12
  export const isBlogPrivate = () =>
13
  typeof window === 'object' &&
@@ -17,8 +17,8 @@ export const isBlogPrivate = () =>
17
  /**
18
  * Checks whether the specific post mode is active.
19
  *
20
- * @param {Object} attributes block attributes
21
- * @return {boolean} specific mode active flag
22
  */
23
  export const isSpecificPostModeActive = ( { specificMode, specificPosts } ) =>
24
  specificMode && specificPosts && specificPosts.length;
@@ -26,10 +26,10 @@ export const isSpecificPostModeActive = ( { specificMode, specificPosts } ) =>
26
  /**
27
  * Builds query criteria from given attributes.
28
  *
29
- * @param {Object} attributes block attributes
30
- * @return {Object} criteria
31
  */
32
- export const queryCriteriaFromAttributes = attributes => {
33
  const { postsToShow, authors, categories, tags, specificPosts, tagExclusions } = attributes;
34
  const criteria = pickBy(
35
  isSpecificPostModeActive( attributes )
@@ -45,7 +45,7 @@ export const queryCriteriaFromAttributes = attributes => {
45
  tags,
46
  tags_exclude: tagExclusions,
47
  },
48
- value => ! isUndefined( value )
49
  );
50
  return criteria;
51
  };
7
  * Based global WP.com blog_public option, checks whether current blog is
8
  * private or not.
9
  *
10
+ * @returns {boolean} a private WP.com blog flag
11
  */
12
  export const isBlogPrivate = () =>
13
  typeof window === 'object' &&
17
  /**
18
  * Checks whether the specific post mode is active.
19
  *
20
+ * @param {object} attributes block attributes
21
+ * @returns {boolean} specific mode active flag
22
  */
23
  export const isSpecificPostModeActive = ( { specificMode, specificPosts } ) =>
24
  specificMode && specificPosts && specificPosts.length;
26
  /**
27
  * Builds query criteria from given attributes.
28
  *
29
+ * @param {object} attributes block attributes
30
+ * @returns {object} criteria
31
  */
32
+ export const queryCriteriaFromAttributes = ( attributes ) => {
33
  const { postsToShow, authors, categories, tags, specificPosts, tagExclusions } = attributes;
34
  const criteria = pickBy(
35
  isSpecificPostModeActive( attributes )
45
  tags,
46
  tags_exclude: tagExclusions,
47
  },
48
+ ( value ) => ! isUndefined( value )
49
  );
50
  return criteria;
51
  };
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.js CHANGED
@@ -58,7 +58,7 @@ function buildLoadMoreHandler( blockWrapperEl ) {
58
  fetchWithRetry( { url: requestURL, onSuccess, onError }, fetchRetryCount );
59
 
60
  /**
61
- * @param {Object} data Post data
62
  */
63
  function onSuccess( data ) {
64
  // Validate received data.
@@ -68,7 +68,7 @@ function buildLoadMoreHandler( blockWrapperEl ) {
68
 
69
  if ( data.items.length ) {
70
  // Render posts' HTML from string.
71
- const postsHTML = data.items.map( item => item.html ).join( '' );
72
  postsContainerEl.insertAdjacentHTML( 'beforeend', postsHTML );
73
  }
74
 
@@ -106,7 +106,7 @@ function getRenderedPostsIds() {
106
  const postEls = document.querySelectorAll(
107
  '.wp-block-newspack-blocks-homepage-articles [data-post-id]'
108
  );
109
- const postIds = Array.from( postEls ).map( el => el.getAttribute( 'data-post-id' ) );
110
 
111
  return [ ...new Set( postIds ) ]; // Make values unique with Set
112
  }
@@ -115,7 +115,7 @@ function getRenderedPostsIds() {
115
  * Wrapper for XMLHttpRequest that performs given number of retries when error
116
  * occurs.
117
  *
118
- * @param {Object} options XMLHttpRequest options
119
  * @param {number} n retry count before throwing
120
  */
121
  function fetchWithRetry( options, n ) {
@@ -172,7 +172,7 @@ function fetchWithRetry( options, n ) {
172
  * "required": ["items", "next"]
173
  * }
174
  *
175
- * @param {Object} data posts endpoint payload
176
  */
177
  function isPostsDataValid( data ) {
178
  let isValid = false;
@@ -200,7 +200,7 @@ function isPostsDataValid( data ) {
200
  /**
201
  * Checks if object has own property.
202
  *
203
- * @param {Object} obj Object
204
  * @param {string} prop Property to check
205
  */
206
  function hasOwnProp( obj, prop ) {
58
  fetchWithRetry( { url: requestURL, onSuccess, onError }, fetchRetryCount );
59
 
60
  /**
61
+ * @param {object} data Post data
62
  */
63
  function onSuccess( data ) {
64
  // Validate received data.
68
 
69
  if ( data.items.length ) {
70
  // Render posts' HTML from string.
71
+ const postsHTML = data.items.map( ( item ) => item.html ).join( '' );
72
  postsContainerEl.insertAdjacentHTML( 'beforeend', postsHTML );
73
  }
74
 
106
  const postEls = document.querySelectorAll(
107
  '.wp-block-newspack-blocks-homepage-articles [data-post-id]'
108
  );
109
+ const postIds = Array.from( postEls ).map( ( el ) => el.getAttribute( 'data-post-id' ) );
110
 
111
  return [ ...new Set( postIds ) ]; // Make values unique with Set
112
  }
115
  * Wrapper for XMLHttpRequest that performs given number of retries when error
116
  * occurs.
117
  *
118
+ * @param {object} options XMLHttpRequest options
119
  * @param {number} n retry count before throwing
120
  */
121
  function fetchWithRetry( options, n ) {
172
  * "required": ["items", "next"]
173
  * }
174
  *
175
+ * @param {object} data posts endpoint payload
176
  */
177
  function isPostsDataValid( data ) {
178
  let isValid = false;
200
  /**
201
  * Checks if object has own property.
202
  *
203
+ * @param {object} obj Object
204
  * @param {string} prop Property to check
205
  */
206
  function hasOwnProp( obj, prop ) {
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.php CHANGED
@@ -137,15 +137,15 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
137
  if ( ! empty( $attributes['moreButtonText'] ) ) {
138
  echo esc_html( $attributes['moreButtonText'] );
139
  } else {
140
- esc_html_e( 'Load more posts', 'full-site-editing' );
141
  }
142
  ?>
143
  </button>
144
  <p class="loading">
145
- <?php _e( 'Loading...', 'full-site-editing' ); ?>
146
  </p>
147
  <p class="error">
148
- <?php _e( 'Something went wrong. Please refresh the page and/or try again.', 'full-site-editing' ); ?>
149
  </p>
150
 
151
  <?php endif; ?>
@@ -215,7 +215,7 @@ function newspack_blocks_format_byline( $author_info ) {
215
  $index = -1;
216
  $elements = array_merge(
217
  [
218
- esc_html_x( 'by', 'post author', 'full-site-editing' ) . ' ',
219
  ],
220
  array_reduce(
221
  $author_info,
@@ -238,7 +238,7 @@ function newspack_blocks_format_byline( $author_info ) {
238
  esc_html( $author->display_name )
239
  ),
240
  ( $index < $penultimate ) ? ', ' : '',
241
- ( count( $author_info ) > 1 && $penultimate === $index ) ? esc_html_x( ' and ', 'post author', 'full-site-editing' ) : '',
242
  ]
243
  );
244
  },
137
  if ( ! empty( $attributes['moreButtonText'] ) ) {
138
  echo esc_html( $attributes['moreButtonText'] );
139
  } else {
140
+ esc_html_e( 'Load more posts', 'newspack-blocks' );
141
  }
142
  ?>
143
  </button>
144
  <p class="loading">
145
+ <?php _e( 'Loading...', 'newspack-blocks' ); ?>
146
  </p>
147
  <p class="error">
148
+ <?php _e( 'Something went wrong. Please refresh the page and/or try again.', 'newspack-blocks' ); ?>
149
  </p>
150
 
151
  <?php endif; ?>
215
  $index = -1;
216
  $elements = array_merge(
217
  [
218
+ esc_html_x( 'by', 'post author', 'newspack-blocks' ) . ' ',
219
  ],
220
  array_reduce(
221
  $author_info,
238
  esc_html( $author->display_name )
239
  ),
240
  ( $index < $penultimate ) ? ', ' : '',
241
+ ( count( $author_info ) > 1 && $penultimate === $index ) ? esc_html_x( ' and ', 'post author', 'newspack-blocks' ) : '',
242
  ]
243
  );
244
  },
newspack-blocks/synced-newspack-blocks/class-newspack-blocks.php CHANGED
@@ -67,7 +67,7 @@ class Newspack_Blocks {
67
 
68
  wp_set_script_translations(
69
  'newspack-blocks-editor',
70
- 'full-site-editing',
71
  plugin_dir_path( __FILE__ ) . 'languages'
72
  );
73
  }
67
 
68
  wp_set_script_translations(
69
  'newspack-blocks-editor',
70
+ 'newspack-blocks',
71
  plugin_dir_path( __FILE__ ) . 'languages'
72
  );
73
  }
newspack-blocks/synced-newspack-blocks/components/autocomplete-tokenfield.js CHANGED
@@ -45,10 +45,10 @@ class AutocompleteTokenField extends Component {
45
  if ( this.isFetchingInfoOnLoad() ) {
46
  const { tokens, fetchSavedInfo } = this.props;
47
 
48
- fetchSavedInfo( tokens ).then( results => {
49
  const { validValues } = this.state;
50
 
51
- results.forEach( suggestion => {
52
  validValues[ suggestion.value ] = suggestion.label;
53
  } );
54
 
@@ -69,7 +69,7 @@ class AutocompleteTokenField extends Component {
69
  * Get a list of labels for input values.
70
  *
71
  * @param {Array} values Array of values (ids, etc.).
72
- * @return {Array} array of valid labels corresponding to the values.
73
  */
74
  getLabelsForValues( values ) {
75
  const { validValues } = this.state;
@@ -84,12 +84,12 @@ class AutocompleteTokenField extends Component {
84
  * Get a list of values for input labels.
85
  *
86
  * @param {Array} labels Array of labels from the tokens.
87
- * @return {Array} Array of valid values corresponding to the labels.
88
  */
89
  getValuesForLabels( labels ) {
90
  const { validValues } = this.state;
91
- return labels.map( label =>
92
- Object.keys( validValues ).find( key => validValues[ key ] === label )
93
  );
94
  }
95
 
@@ -107,7 +107,7 @@ class AutocompleteTokenField extends Component {
107
  this.setState( { loading: true }, () => {
108
  const request = fetchSuggestions( input );
109
  request
110
- .then( suggestions => {
111
  // A fetch Promise doesn't have an abort option. It's mimicked by
112
  // comparing the request reference in on the instance, which is
113
  // reset or deleted on subsequent requests or unmounting.
@@ -118,7 +118,7 @@ class AutocompleteTokenField extends Component {
118
  const { validValues } = this.state;
119
  const currentSuggestions = [];
120
 
121
- suggestions.forEach( suggestion => {
122
  currentSuggestions.push( suggestion.label );
123
  validValues[ suggestion.value ] = suggestion.label;
124
  } );
@@ -150,7 +150,7 @@ class AutocompleteTokenField extends Component {
150
  /**
151
  * To populate the tokens, we need to convert the values into a human-readable label.
152
  *
153
- * @return {Array} An array of token label strings.
154
  */
155
  getTokens() {
156
  const { tokens } = this.props;
@@ -169,8 +169,8 @@ class AutocompleteTokenField extends Component {
169
  <FormTokenField
170
  value={ this.getTokens() }
171
  suggestions={ suggestions }
172
- onChange={ tokens => this.handleOnChange( tokens ) }
173
- onInputChange={ input => this.debouncedUpdateSuggestions( input ) }
174
  label={ label }
175
  />
176
  { loading && <Spinner /> }
45
  if ( this.isFetchingInfoOnLoad() ) {
46
  const { tokens, fetchSavedInfo } = this.props;
47
 
48
+ fetchSavedInfo( tokens ).then( ( results ) => {
49
  const { validValues } = this.state;
50
 
51
+ results.forEach( ( suggestion ) => {
52
  validValues[ suggestion.value ] = suggestion.label;
53
  } );
54
 
69
  * Get a list of labels for input values.
70
  *
71
  * @param {Array} values Array of values (ids, etc.).
72
+ * @returns {Array} array of valid labels corresponding to the values.
73
  */
74
  getLabelsForValues( values ) {
75
  const { validValues } = this.state;
84
  * Get a list of values for input labels.
85
  *
86
  * @param {Array} labels Array of labels from the tokens.
87
+ * @returns {Array} Array of valid values corresponding to the labels.
88
  */
89
  getValuesForLabels( labels ) {
90
  const { validValues } = this.state;
91
+ return labels.map( ( label ) =>
92
+ Object.keys( validValues ).find( ( key ) => validValues[ key ] === label )
93
  );
94
  }
95
 
107
  this.setState( { loading: true }, () => {
108
  const request = fetchSuggestions( input );
109
  request
110
+ .then( ( suggestions ) => {
111
  // A fetch Promise doesn't have an abort option. It's mimicked by
112
  // comparing the request reference in on the instance, which is
113
  // reset or deleted on subsequent requests or unmounting.
118
  const { validValues } = this.state;
119
  const currentSuggestions = [];
120
 
121
+ suggestions.forEach( ( suggestion ) => {
122
  currentSuggestions.push( suggestion.label );
123
  validValues[ suggestion.value ] = suggestion.label;
124
  } );
150
  /**
151
  * To populate the tokens, we need to convert the values into a human-readable label.
152
  *
153
+ * @returns {Array} An array of token label strings.
154
  */
155
  getTokens() {
156
  const { tokens } = this.props;
169
  <FormTokenField
170
  value={ this.getTokens() }
171
  suggestions={ suggestions }
172
+ onChange={ ( tokens ) => this.handleOnChange( tokens ) }
173
+ onInputChange={ ( input ) => this.debouncedUpdateSuggestions( input ) }
174
  label={ label }
175
  />
176
  { loading && <Spinner /> }
newspack-blocks/synced-newspack-blocks/components/query-controls.js CHANGED
@@ -22,7 +22,7 @@ class QueryControls extends Component {
22
  showAdvancedFilters: false,
23
  };
24
 
25
- fetchPostSuggestions = search => {
26
  return apiFetch( {
27
  path: addQueryArgs( '/wp/v2/search', {
28
  search,
@@ -30,59 +30,59 @@ class QueryControls extends Component {
30
  _fields: 'id,title',
31
  type: 'post',
32
  } ),
33
- } ).then( function( posts ) {
34
- const result = posts.map( post => ( {
35
  value: post.id,
36
- label: decodeEntities( post.title ) || __( '(no title)', 'newspack-blocks' ),
37
  } ) );
38
  return result;
39
  } );
40
  };
41
- fetchSavedPosts = postIDs => {
42
  return apiFetch( {
43
  path: addQueryArgs( '/wp/v2/posts', {
44
  per_page: 100,
45
  include: postIDs.join( ',' ),
46
  _fields: 'id,title',
47
  } ),
48
- } ).then( function( posts ) {
49
- return posts.map( post => ( {
50
  value: post.id,
51
- label: decodeEntities( post.title.rendered ) || __( '(no title)', 'newspack-blocks' ),
52
  } ) );
53
  } );
54
  };
55
 
56
- fetchAuthorSuggestions = search => {
57
  return apiFetch( {
58
  path: addQueryArgs( '/wp/v2/users', {
59
  search,
60
  per_page: 20,
61
  _fields: 'id,name',
62
  } ),
63
- } ).then( function( users ) {
64
- return users.map( user => ( {
65
  value: user.id,
66
- label: decodeEntities( user.name ) || __( '(no name)', 'newspack-blocks' ),
67
  } ) );
68
  } );
69
  };
70
- fetchSavedAuthors = userIDs => {
71
  return apiFetch( {
72
  path: addQueryArgs( '/wp/v2/users', {
73
  per_page: 100,
74
  include: userIDs.join( ',' ),
75
  _fields: 'id,name',
76
  } ),
77
- } ).then( function( users ) {
78
- return users.map( user => ( {
79
  value: user.id,
80
- label: decodeEntities( user.name ) || __( '(no name)', 'newspack-blocks' ),
81
  } ) );
82
  } );
83
  };
84
 
85
- fetchCategorySuggestions = search => {
86
  return apiFetch( {
87
  path: addQueryArgs( '/wp/v2/categories', {
88
  search,
@@ -91,29 +91,29 @@ class QueryControls extends Component {
91
  orderby: 'count',
92
  order: 'desc',
93
  } ),
94
- } ).then( function( categories ) {
95
- return categories.map( category => ( {
96
  value: category.id,
97
- label: decodeEntities( category.name ) || __( '(no title)', 'newspack-blocks' ),
98
  } ) );
99
  } );
100
  };
101
- fetchSavedCategories = categoryIDs => {
102
  return apiFetch( {
103
  path: addQueryArgs( '/wp/v2/categories', {
104
  per_page: 100,
105
  _fields: 'id,name',
106
  include: categoryIDs.join( ',' ),
107
  } ),
108
- } ).then( function( categories ) {
109
- return categories.map( category => ( {
110
  value: category.id,
111
- label: decodeEntities( category.name ) || __( '(no title)', 'newspack-blocks' ),
112
  } ) );
113
  } );
114
  };
115
 
116
- fetchTagSuggestions = search => {
117
  return apiFetch( {
118
  path: addQueryArgs( '/wp/v2/tags', {
119
  search,
@@ -122,24 +122,24 @@ class QueryControls extends Component {
122
  orderby: 'count',
123
  order: 'desc',
124
  } ),
125
- } ).then( function( tags ) {
126
- return tags.map( tag => ( {
127
  value: tag.id,
128
- label: decodeEntities( tag.name ) || __( '(no title)', 'newspack-blocks' ),
129
  } ) );
130
  } );
131
  };
132
- fetchSavedTags = tagIDs => {
133
  return apiFetch( {
134
  path: addQueryArgs( '/wp/v2/tags', {
135
  per_page: 100,
136
  _fields: 'id,name',
137
  include: tagIDs.join( ',' ),
138
  } ),
139
- } ).then( function( tags ) {
140
- return tags.map( tag => ( {
141
  value: tag.id,
142
- label: decodeEntities( tag.name ) || __( '(no title)', 'newspack-blocks' ),
143
  } ) );
144
  } );
145
  };
@@ -168,7 +168,7 @@ class QueryControls extends Component {
168
  key="specificMode"
169
  checked={ specificMode }
170
  onChange={ onSpecificModeChange }
171
- label={ __( 'Choose Specific Posts', 'newspack-blocks' ) }
172
  />
173
  ),
174
  specificMode && (
@@ -178,10 +178,10 @@ class QueryControls extends Component {
178
  onChange={ onSpecificPostsChange }
179
  fetchSuggestions={ this.fetchPostSuggestions }
180
  fetchSavedInfo={ this.fetchSavedPosts }
181
- label={ __( 'Posts', 'newspack-blocks' ) }
182
  help={ __(
183
  'Begin typing post title, click autocomplete result to select.',
184
- 'newspack-blocks'
185
  ) }
186
  />
187
  ),
@@ -193,7 +193,7 @@ class QueryControls extends Component {
193
  onChange={ onAuthorsChange }
194
  fetchSuggestions={ this.fetchAuthorSuggestions }
195
  fetchSavedInfo={ this.fetchSavedAuthors }
196
- label={ __( 'Authors', 'newspack-blocks' ) }
197
  />
198
  ),
199
  ! specificMode && onCategoriesChange && (
@@ -203,7 +203,7 @@ class QueryControls extends Component {
203
  onChange={ onCategoriesChange }
204
  fetchSuggestions={ this.fetchCategorySuggestions }
205
  fetchSavedInfo={ this.fetchSavedCategories }
206
- label={ __( 'Categories', 'newspack-blocks' ) }
207
  />
208
  ),
209
  ! specificMode && onTagsChange && (
@@ -213,7 +213,7 @@ class QueryControls extends Component {
213
  onChange={ onTagsChange }
214
  fetchSuggestions={ this.fetchTagSuggestions }
215
  fetchSavedInfo={ this.fetchSavedTags }
216
- label={ __( 'Tags', 'newspack-blocks' ) }
217
  />
218
  ),
219
  ! specificMode && onTagExclusionsChange && (
@@ -223,8 +223,8 @@ class QueryControls extends Component {
223
  onClick={ () => this.setState( { showAdvancedFilters: ! showAdvancedFilters } ) }
224
  >
225
  { showAdvancedFilters
226
- ? __( 'Hide Advanced Filters', 'newspack-blocks' )
227
- : __( 'Show Advanced Filters', 'newspack-blocks' ) }
228
  </Button>
229
  </p>
230
  ),
@@ -235,7 +235,7 @@ class QueryControls extends Component {
235
  onChange={ onTagExclusionsChange }
236
  fetchSuggestions={ this.fetchTagSuggestions }
237
  fetchSavedInfo={ this.fetchSavedTags }
238
- label={ __( 'Excluded Tags', 'newspack-blocks' ) }
239
  />
240
  ),
241
  ];
22
  showAdvancedFilters: false,
23
  };
24
 
25
+ fetchPostSuggestions = ( search ) => {
26
  return apiFetch( {
27
  path: addQueryArgs( '/wp/v2/search', {
28
  search,
30
  _fields: 'id,title',
31
  type: 'post',
32
  } ),
33
+ } ).then( function ( posts ) {
34
+ const result = posts.map( ( post ) => ( {
35
  value: post.id,
36
+ label: decodeEntities( post.title ) || __( '(no title)', 'full-site-editing' ),
37
  } ) );
38
  return result;
39
  } );
40
  };
41
+ fetchSavedPosts = ( postIDs ) => {
42
  return apiFetch( {
43
  path: addQueryArgs( '/wp/v2/posts', {
44
  per_page: 100,
45
  include: postIDs.join( ',' ),
46
  _fields: 'id,title',
47
  } ),
48
+ } ).then( function ( posts ) {
49
+ return posts.map( ( post ) => ( {
50
  value: post.id,
51
+ label: decodeEntities( post.title.rendered ) || __( '(no title)', 'full-site-editing' ),
52
  } ) );
53
  } );
54
  };
55
 
56
+ fetchAuthorSuggestions = ( search ) => {
57
  return apiFetch( {
58
  path: addQueryArgs( '/wp/v2/users', {
59
  search,
60
  per_page: 20,
61
  _fields: 'id,name',
62
  } ),
63
+ } ).then( function ( users ) {
64
+ return users.map( ( user ) => ( {
65
  value: user.id,
66
+ label: decodeEntities( user.name ) || __( '(no name)', 'full-site-editing' ),
67
  } ) );
68
  } );
69
  };
70
+ fetchSavedAuthors = ( userIDs ) => {
71
  return apiFetch( {
72
  path: addQueryArgs( '/wp/v2/users', {
73
  per_page: 100,
74
  include: userIDs.join( ',' ),
75
  _fields: 'id,name',
76
  } ),
77
+ } ).then( function ( users ) {
78
+ return users.map( ( user ) => ( {
79
  value: user.id,
80
+ label: decodeEntities( user.name ) || __( '(no name)', 'full-site-editing' ),
81
  } ) );
82
  } );
83
  };
84
 
85
+ fetchCategorySuggestions = ( search ) => {
86
  return apiFetch( {
87
  path: addQueryArgs( '/wp/v2/categories', {
88
  search,
91
  orderby: 'count',
92
  order: 'desc',
93
  } ),
94
+ } ).then( function ( categories ) {
95
+ return categories.map( ( category ) => ( {
96
  value: category.id,
97
+ label: decodeEntities( category.name ) || __( '(no title)', 'full-site-editing' ),
98
  } ) );
99
  } );
100
  };
101
+ fetchSavedCategories = ( categoryIDs ) => {
102
  return apiFetch( {
103
  path: addQueryArgs( '/wp/v2/categories', {
104
  per_page: 100,
105
  _fields: 'id,name',
106
  include: categoryIDs.join( ',' ),
107
  } ),
108
+ } ).then( function ( categories ) {
109
+ return categories.map( ( category ) => ( {
110
  value: category.id,
111
+ label: decodeEntities( category.name ) || __( '(no title)', 'full-site-editing' ),
112
  } ) );
113
  } );
114
  };
115
 
116
+ fetchTagSuggestions = ( search ) => {
117
  return apiFetch( {
118
  path: addQueryArgs( '/wp/v2/tags', {
119
  search,
122
  orderby: 'count',
123
  order: 'desc',
124
  } ),
125
+ } ).then( function ( tags ) {
126
+ return tags.map( ( tag ) => ( {
127
  value: tag.id,
128
+ label: decodeEntities( tag.name ) || __( '(no title)', 'full-site-editing' ),
129
  } ) );
130
  } );
131
  };
132
+ fetchSavedTags = ( tagIDs ) => {
133
  return apiFetch( {
134
  path: addQueryArgs( '/wp/v2/tags', {
135
  per_page: 100,
136
  _fields: 'id,name',
137
  include: tagIDs.join( ',' ),
138
  } ),
139
+ } ).then( function ( tags ) {
140
+ return tags.map( ( tag ) => ( {
141
  value: tag.id,
142
+ label: decodeEntities( tag.name ) || __( '(no title)', 'full-site-editing' ),
143
  } ) );
144
  } );
145
  };
168
  key="specificMode"
169
  checked={ specificMode }
170
  onChange={ onSpecificModeChange }
171
+ label={ __( 'Choose Specific Posts', 'full-site-editing' ) }
172
  />
173
  ),
174
  specificMode && (
178
  onChange={ onSpecificPostsChange }
179
  fetchSuggestions={ this.fetchPostSuggestions }
180
  fetchSavedInfo={ this.fetchSavedPosts }
181
+ label={ __( 'Posts', 'full-site-editing' ) }
182
  help={ __(
183
  'Begin typing post title, click autocomplete result to select.',
184
+ 'full-site-editing'
185
  ) }
186
  />
187
  ),
193
  onChange={ onAuthorsChange }
194
  fetchSuggestions={ this.fetchAuthorSuggestions }
195
  fetchSavedInfo={ this.fetchSavedAuthors }
196
+ label={ __( 'Authors', 'full-site-editing' ) }
197
  />
198
  ),
199
  ! specificMode && onCategoriesChange && (
203
  onChange={ onCategoriesChange }
204
  fetchSuggestions={ this.fetchCategorySuggestions }
205
  fetchSavedInfo={ this.fetchSavedCategories }
206
+ label={ __( 'Categories', 'full-site-editing' ) }
207
  />
208
  ),
209
  ! specificMode && onTagsChange && (
213
  onChange={ onTagsChange }
214
  fetchSuggestions={ this.fetchTagSuggestions }
215
  fetchSavedInfo={ this.fetchSavedTags }
216
+ label={ __( 'Tags', 'full-site-editing' ) }
217
  />
218
  ),
219
  ! specificMode && onTagExclusionsChange && (
223
  onClick={ () => this.setState( { showAdvancedFilters: ! showAdvancedFilters } ) }
224
  >
225
  { showAdvancedFilters
226
+ ? __( 'Hide Advanced Filters', 'full-site-editing' )
227
+ : __( 'Show Advanced Filters', 'full-site-editing' ) }
228
  </Button>
229
  </p>
230
  ),
235
  onChange={ onTagExclusionsChange }
236
  fetchSuggestions={ this.fetchTagSuggestions }
237
  fetchSavedInfo={ this.fetchSavedTags }
238
+ label={ __( 'Excluded Tags', 'full-site-editing' ) }
239
  />
240
  ),
241
  ];
newspack-blocks/synced-newspack-blocks/shared/js/utils.js CHANGED
@@ -4,8 +4,8 @@
4
  import { _x } from '@wordpress/i18n';
5
  import { RawHTML } from '@wordpress/element';
6
 
7
- export const formatAvatars = authorInfo =>
8
- authorInfo.map( author => (
9
  <span className="avatar author-avatar" key={ author.id }>
10
  <a className="url fn n" href={ author.author_link }>
11
  <RawHTML>{ author.avatar }</RawHTML>
@@ -13,9 +13,9 @@ export const formatAvatars = authorInfo =>
13
  </span>
14
  ) );
15
 
16
- export const formatByline = authorInfo => (
17
  <span className="byline">
18
- { _x( 'by', 'post author', 'newspack-blocks' ) }{' '}
19
  { authorInfo.reduce( ( accumulator, author, index ) => {
20
  return [
21
  ...accumulator,
@@ -27,7 +27,7 @@ export const formatByline = authorInfo => (
27
  index < authorInfo.length - 2 && ', ',
28
  authorInfo.length > 1 &&
29
  index === authorInfo.length - 2 &&
30
- _x( ' and ', 'post author', 'newspack-blocks' ),
31
  ];
32
  }, [] ) }
33
  </span>
4
  import { _x } from '@wordpress/i18n';
5
  import { RawHTML } from '@wordpress/element';
6
 
7
+ export const formatAvatars = ( authorInfo ) =>
8
+ authorInfo.map( ( author ) => (
9
  <span className="avatar author-avatar" key={ author.id }>
10
  <a className="url fn n" href={ author.author_link }>
11
  <RawHTML>{ author.avatar }</RawHTML>
13
  </span>
14
  ) );
15
 
16
+ export const formatByline = ( authorInfo ) => (
17
  <span className="byline">
18
+ { _x( 'by', 'post author', 'full-site-editing' ) }{ ' ' }
19
  { authorInfo.reduce( ( accumulator, author, index ) => {
20
  return [
21
  ...accumulator,
27
  index < authorInfo.length - 2 && ', ',
28
  authorInfo.length > 1 &&
29
  index === authorInfo.length - 2 &&
30
+ _x( ' and ', 'post author', 'full-site-editing' ),
31
  ];
32
  }, [] ) }
33
  </span>
phpunit.xml.dist ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit
2
+ bootstrap="phpunit/bootstrap.php"
3
+ backupGlobals="false"
4
+ colors="true"
5
+ convertErrorsToExceptions="true"
6
+ convertNoticesToExceptions="true"
7
+ convertWarningsToExceptions="true"
8
+ >
9
+ <testsuites>
10
+ <testsuite name="default">
11
+ <directory suffix="-test.php">./phpunit/</directory>
12
+ </testsuite>
13
+ </testsuites>
14
+ </phpunit>
phpunit/bootstrap.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PHPUnit bootstrap file
4
+ *
5
+ * @see https://github.com/WordPress/gutenberg/blob/master/phpunit/bootstrap.php
6
+ *
7
+ * @package FullSiteEditing
8
+ */
9
+
10
+ // Require composer dependencies.
11
+ require_once dirname( dirname( __FILE__ ) ) . '/vendor/autoload.php';
12
+
13
+ $_tests_dir = getenv( 'WP_PHPUNIT__DIR' );
14
+
15
+
16
+ if ( ! $_tests_dir ) {
17
+ throw new Exception( 'Could not find the WordPress test lib.' );
18
+ }
19
+
20
+ // Give access to tests_add_filter() function.
21
+ require_once $_tests_dir . '/includes/functions.php';
22
+
23
+ /**
24
+ * Manually load the plugin being tested.
25
+ */
26
+ function _manually_load_plugin() {
27
+ update_option(
28
+ 'active_plugins',
29
+ array(
30
+ 'full-site-editing-plugin/full-site-editing-plugin.php',
31
+ )
32
+ );
33
+ }
34
+ tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
35
+
36
+ /**
37
+ * Adds a wp_die handler for use during tests.
38
+ *
39
+ * If bootstrap.php triggers wp_die, it will not cause the script to fail. This
40
+ * means that tests will look like they passed even though they should have
41
+ * failed. So we throw an exception if WordPress dies during test setup. This
42
+ * way the failure is observable.
43
+ *
44
+ * @param string|WP_Error $message The error message.
45
+ *
46
+ * @throws Exception When a `wp_die()` occurs.
47
+ */
48
+ function fail_if_died( $message ) {
49
+ if ( is_wp_error( $message ) ) {
50
+ $message = $message->get_error_message();
51
+ }
52
+
53
+ throw new Exception( 'WordPress died: ' . $message );
54
+ }
55
+ tests_add_filter( 'wp_die_handler', 'fail_if_died' );
56
+
57
+ // Start up the WP testing environment.
58
+ require $_tests_dir . '/includes/bootstrap.php';
59
+
60
+ // Use existing behavior for wp_die during actual test execution.
61
+ remove_filter( 'wp_die_handler', 'fail_if_died' );
phpunit/class-is-fse-active-test.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Is FSE Active Tests File
4
+ *
5
+ * @package full-site-editing-plugin
6
+ */
7
+
8
+ namespace A8C\FSE;
9
+
10
+ use PHPUnit\Framework\TestCase;
11
+
12
+ /**
13
+ * Class Is_FSE_Active_Test
14
+ */
15
+ class Is_FSE_Active_Test extends TestCase {
16
+ /**
17
+ * Tests that the is fse active function exists.
18
+ */
19
+ public function testFunctionExists() {
20
+ $does_exist = function_exists( '\A8C\FSE\is_full_site_editing_active' );
21
+ $this->assertTrue( $does_exist );
22
+ }
23
+ }
premium-content/blocks/container/controls.js CHANGED
@@ -15,7 +15,7 @@ import NewPlan from './new-plan';
15
  /**
16
  * @typedef { import('./plans').Plan } Plan
17
  *
18
- * @typedef { Object } Props
19
  * @property { number } selectedPlanId
20
  * @property { (plan: Plan) => void } onSelected
21
  * @property { (plan: Plan) => string } formatPrice
@@ -42,7 +42,7 @@ export default function Controls( props ) {
42
  { planDescription && <Fragment>{ planDescription }</Fragment> }
43
  </Fragment>
44
  }
45
- label={ __( 'Select a plan', 'premium-content' ) }
46
  className={ 'premium-content-toolbar-button' }
47
  >
48
  { ( { onClose } ) => (
15
  /**
16
  * @typedef { import('./plans').Plan } Plan
17
  *
18
+ * @typedef {object} Props
19
  * @property { number } selectedPlanId
20
  * @property { (plan: Plan) => void } onSelected
21
  * @property { (plan: Plan) => string } formatPrice
42
  { planDescription && <Fragment>{ planDescription }</Fragment> }
43
  </Fragment>
44
  }
45
+ label={ __( 'Select a plan', 'full-site-editing' ) }
46
  className={ 'premium-content-toolbar-button' }
47
  >
48
  { ( { onClose } ) => (
premium-content/blocks/container/edit.js CHANGED
@@ -39,12 +39,12 @@ import { isPriceValid, minimumTransactionAmountForCurrency } from '.';
39
  const tabs = [
40
  {
41
  id: 'premium',
42
- label: <span>{ __( 'Subscriber View', 'premium-content' ) }</span>,
43
  className: 'wp-premium-content-subscriber-view',
44
  },
45
  {
46
  id: 'wall',
47
- label: <span>{ __( 'Non-subscriber View', 'premium-content' ) }</span>,
48
  className: 'wp-premium-content-logged-out-view',
49
  },
50
  ];
@@ -73,7 +73,7 @@ const defaultString = null;
73
  *
74
  * @typedef { import('@wordpress/components').withNotices.Props } NoticeProps
75
  * @typedef { import('./').Attributes } Attributes
76
- * @typedef { Object } OwnProps
77
  * @property { boolean } isSelected
78
  * @property { string } className
79
  * @property { string } clientId
@@ -111,7 +111,7 @@ function Edit( props ) {
111
  const path = '/wpcom/v2/memberships/product';
112
  const method = 'POST';
113
  if ( ! attributes.newPlanName || attributes.newPlanName.length === 0 ) {
114
- onError( props, __( 'Plan requires a name', 'premium-content' ) );
115
  callback( false );
116
  return;
117
  }
@@ -119,7 +119,7 @@ function Edit( props ) {
119
  const newPrice = parseFloat( attributes.newPlanPrice );
120
  const minPrice = minimumTransactionAmountForCurrency( attributes.newPlanCurrency );
121
  const minimumPriceNote = sprintf(
122
- __( 'Minimum allowed price is %s.', 'premium-content' ),
123
  formatCurrency( minPrice, attributes.newPlanCurrency )
124
  );
125
 
@@ -130,7 +130,7 @@ function Edit( props ) {
130
  }
131
 
132
  if ( ! isPriceValid( attributes.newPlanCurrency, newPrice ) ) {
133
- onError( props, __( 'Plan requires a valid price', 'premium-content' ) );
134
  callback( false );
135
  return;
136
  }
@@ -145,7 +145,7 @@ function Edit( props ) {
145
  apiFetch( fetch ).then(
146
  /**
147
  * @param { any } result
148
- * @return { void }
149
  */
150
  ( result ) => {
151
  /**
@@ -161,17 +161,17 @@ function Edit( props ) {
161
  setProducts( products.concat( [ newProduct ] ) );
162
  // After successful adding of product, we want to select it. Presumably that is the product user wants.
163
  selectPlan( newProduct );
164
- onSuccess( props, __( 'Successfully created plan', 'premium-content' ) );
165
  if ( callback ) {
166
  callback( true );
167
  }
168
  },
169
  /**
170
  * @param { Error } error
171
- * @return { void }
172
  */
173
  () => {
174
- onError( props, __( 'There was an error when adding the plan.' ) );
175
  if ( callback ) {
176
  callback( false );
177
  }
@@ -185,15 +185,15 @@ function Edit( props ) {
185
  function getPlanDescription( plan ) {
186
  const amount = formatCurrency( parseFloat( plan.price ), plan.currency );
187
  if ( plan.interval === '1 month' ) {
188
- return sprintf( __( '%s / month', 'premium-content' ), amount );
189
  }
190
  if ( plan.interval === '1 year' ) {
191
- return sprintf( __( '%s / year', 'premium-content' ), amount );
192
  }
193
  if ( plan.interval === 'one-time' ) {
194
  return amount;
195
  }
196
- return sprintf( __( '%s / %s', 'premium-content' ), amount, plan.interval );
197
  }
198
 
199
  /**
@@ -249,7 +249,7 @@ function Edit( props ) {
249
  {
250
  newPlanCurrency: 'USD',
251
  newPlanPrice: 5,
252
- newPlanName: __( 'Monthly Subscription' ),
253
  newPlanInterval: '1 month',
254
  },
255
  () => {
@@ -285,8 +285,8 @@ function Edit( props ) {
285
  { props.noticeUI }
286
  <Placeholder
287
  icon="lock"
288
- label={ __( 'Premium Content', 'premium-content' ) }
289
- instructions={ __( 'Loading data...', 'premium-content' ) }
290
  >
291
  <Spinner />
292
  </Placeholder>
@@ -300,10 +300,10 @@ function Edit( props ) {
300
  { props.noticeUI }
301
  <Placeholder
302
  icon="lock"
303
- label={ __( 'Premium Content', 'premium-content' ) }
304
  instructions={ __(
305
  "You'll need to upgrade your plan to use the Premium Content block.",
306
- 'premium-content'
307
  ) }
308
  >
309
  <Button
@@ -317,11 +317,11 @@ function Edit( props ) {
317
  target="_blank"
318
  className="premium-content-block-nudge__button plan-nudge__button"
319
  >
320
- { __( 'Upgrade Your Plan', 'premium-content' ) }
321
  </Button>
322
  <div className="membership-button__disclaimer">
323
  <ExternalLink href="https://wordpress.com/support/premium-content-block/">
324
- { __( 'Read more about Premium Content and related fees.', 'premium-content' ) }
325
  </ExternalLink>
326
  </div>
327
  </Placeholder>
@@ -404,7 +404,7 @@ function useOutsideAlerter( ref, callback ) {
404
  /**
405
  * @param { Props } props
406
  * @param { string } message
407
- * @return { void }
408
  */
409
  function onError( props, message ) {
410
  const { noticeOperations } = props;
@@ -415,7 +415,7 @@ function onError( props, message ) {
415
  /**
416
  * @param { Props } props
417
  * @param { string } message
418
- * @return { void }
419
  */
420
  function onSuccess( props, message ) {
421
  const { noticeOperations } = props;
@@ -426,7 +426,7 @@ function onSuccess( props, message ) {
426
  /**
427
  * @param { Props } props
428
  * @param { string } connectURL
429
- * @return { null | string } URL
430
  */
431
  function getConnectUrl( props, connectURL ) {
432
  const { postId } = props;
39
  const tabs = [
40
  {
41
  id: 'premium',
42
+ label: <span>{ __( 'Subscriber View', 'full-site-editing' ) }</span>,
43
  className: 'wp-premium-content-subscriber-view',
44
  },
45
  {
46
  id: 'wall',
47
+ label: <span>{ __( 'Non-subscriber View', 'full-site-editing' ) }</span>,
48
  className: 'wp-premium-content-logged-out-view',
49
  },
50
  ];
73
  *
74
  * @typedef { import('@wordpress/components').withNotices.Props } NoticeProps
75
  * @typedef { import('./').Attributes } Attributes
76
+ * @typedef {object} OwnProps
77
  * @property { boolean } isSelected
78
  * @property { string } className
79
  * @property { string } clientId
111
  const path = '/wpcom/v2/memberships/product';
112
  const method = 'POST';
113
  if ( ! attributes.newPlanName || attributes.newPlanName.length === 0 ) {
114
+ onError( props, __( 'Plan requires a name', 'full-site-editing' ) );
115
  callback( false );
116
  return;
117
  }
119
  const newPrice = parseFloat( attributes.newPlanPrice );
120
  const minPrice = minimumTransactionAmountForCurrency( attributes.newPlanCurrency );
121
  const minimumPriceNote = sprintf(
122
+ __( 'Minimum allowed price is %s.', 'full-site-editing' ),
123
  formatCurrency( minPrice, attributes.newPlanCurrency )
124
  );
125
 
130
  }
131
 
132
  if ( ! isPriceValid( attributes.newPlanCurrency, newPrice ) ) {
133
+ onError( props, __( 'Plan requires a valid price', 'full-site-editing' ) );
134
  callback( false );
135
  return;
136
  }
145
  apiFetch( fetch ).then(
146
  /**
147
  * @param { any } result
148
+ * @returns { void }
149
  */
150
  ( result ) => {
151
  /**
161
  setProducts( products.concat( [ newProduct ] ) );
162
  // After successful adding of product, we want to select it. Presumably that is the product user wants.
163
  selectPlan( newProduct );
164
+ onSuccess( props, __( 'Successfully created plan', 'full-site-editing' ) );
165
  if ( callback ) {
166
  callback( true );
167
  }
168
  },
169
  /**
170
  * @param { Error } error
171
+ * @returns { void }
172
  */
173
  () => {
174
+ onError( props, __( 'There was an error when adding the plan.', 'full-site-editing' ) );
175
  if ( callback ) {
176
  callback( false );
177
  }
185
  function getPlanDescription( plan ) {
186
  const amount = formatCurrency( parseFloat( plan.price ), plan.currency );
187
  if ( plan.interval === '1 month' ) {
188
+ return sprintf( __( '%s / month', 'full-site-editing' ), amount );
189
  }
190
  if ( plan.interval === '1 year' ) {
191
+ return sprintf( __( '%s / year', 'full-site-editing' ), amount );
192
  }
193
  if ( plan.interval === 'one-time' ) {
194
  return amount;
195
  }
196
+ return sprintf( __( '%s / %s', 'full-site-editing' ), amount, plan.interval );
197
  }
198
 
199
  /**
249
  {
250
  newPlanCurrency: 'USD',
251
  newPlanPrice: 5,
252
+ newPlanName: __( 'Monthly Subscription', 'full-site-editing' ),
253
  newPlanInterval: '1 month',
254
  },
255
  () => {
285
  { props.noticeUI }
286
  <Placeholder
287
  icon="lock"
288
+ label={ __( 'Premium Content', 'full-site-editing' ) }
289
+ instructions={ __( 'Loading data', 'full-site-editing' ) }
290
  >
291
  <Spinner />
292
  </Placeholder>
300
  { props.noticeUI }
301
  <Placeholder
302
  icon="lock"
303
+ label={ __( 'Premium Content', 'full-site-editing' ) }
304
  instructions={ __(
305
  "You'll need to upgrade your plan to use the Premium Content block.",
306
+ 'full-site-editing'
307
  ) }
308
  >
309
  <Button
317
  target="_blank"
318
  className="premium-content-block-nudge__button plan-nudge__button"
319
  >
320
+ { __( 'Upgrade Your Plan', 'full-site-editing' ) }
321
  </Button>
322
  <div className="membership-button__disclaimer">
323
  <ExternalLink href="https://wordpress.com/support/premium-content-block/">
324
+ { __( 'Read more about Premium Content and related fees.', 'full-site-editing' ) }
325
  </ExternalLink>
326
  </div>
327
  </Placeholder>
404
  /**
405
  * @param { Props } props
406
  * @param { string } message
407
+ * @returns { void }
408
  */
409
  function onError( props, message ) {
410
  const { noticeOperations } = props;
415
  /**
416
  * @param { Props } props
417
  * @param { string } message
418
+ * @returns { void }
419
  */
420
  function onSuccess( props, message ) {
421
  const { noticeOperations } = props;
426
  /**
427
  * @param { Props } props
428
  * @param { string } connectURL
429
+ * @returns { null | string } URL
430
  */
431
  function getConnectUrl( props, connectURL ) {
432
  const { postId } = props;
premium-content/blocks/container/index.js CHANGED
@@ -53,13 +53,13 @@ const settings = {
53
  * This is the display title for your block, which can be translated with `i18n` functions.
54
  * The block inserter will show this name.
55
  */
56
- title: __( 'Premium Content', 'premium-content' ),
57
 
58
  /**
59
  * This is a short description for your block, can be translated with `i18n` functions.
60
  * It will be shown in the Block Tab in the Settings Sidebar.
61
  */
62
- description: __( 'Restrict access to your content for paying subscribers.', 'premium-content' ),
63
 
64
  /**
65
  * Blocks are grouped into categories to help users browse and discover them.
@@ -97,9 +97,9 @@ const settings = {
97
  keywords: [
98
  'premium-content',
99
  /* translators: block keyword */
100
- __( 'premium', 'premium-content' ),
101
  /* translators: block keyword */
102
- __( 'paywall', 'premium-content' ),
103
  ],
104
  edit,
105
  save,
53
  * This is the display title for your block, which can be translated with `i18n` functions.
54
  * The block inserter will show this name.
55
  */
56
+ title: __( 'Premium Content', 'full-site-editing' ),
57
 
58
  /**
59
  * This is a short description for your block, can be translated with `i18n` functions.
60
  * It will be shown in the Block Tab in the Settings Sidebar.
61
  */
62
+ description: __( 'Restrict access to your content for paying subscribers.', 'full-site-editing' ),
63
 
64
  /**
65
  * Blocks are grouped into categories to help users browse and discover them.
97
  keywords: [
98
  'premium-content',
99
  /* translators: block keyword */
100
+ __( 'premium', 'full-site-editing' ),
101
  /* translators: block keyword */
102
+ __( 'paywall', 'full-site-editing' ),
103
  ],
104
  edit,
105
  save,
premium-content/blocks/container/inspector.js CHANGED
@@ -24,17 +24,17 @@ const API_STATE_NOT_REQUESTING = 0;
24
  const API_STATE_REQUESTING = 1;
25
 
26
  /**
27
- * @typedef { Object } PlanAttributes
28
  * @property { string } newPlanCurrency
29
  * @property { string } newPlanName
30
  * @property { number } newPlanPrice
31
  * @property { string } newPlanInterval
32
  *
33
- * @typedef { Object } Currency
34
  * @property { string } label
35
  * @property { string } symbol
36
  *
37
- * @typedef { Object } Props
38
  * @property { PlanAttributes } attributes
39
  * @property { (attributes: Partial<PlanAttributes>) => void } setAttributes
40
  * @property { string } className
@@ -55,7 +55,7 @@ export default function Inspector( props ) {
55
  href={ `https://wordpress.com/earn/payments/${ siteSlug }` }
56
  className={ 'wp-block-premium-content-container---link-to-earn' }
57
  >
58
- { __( 'Manage your subscriptions.', 'premium-content' ) }
59
  </ExternalLink>
60
  ) }
61
  <PanelBody
@@ -66,8 +66,8 @@ export default function Inspector( props ) {
66
  { apiState === API_STATE_REQUESTING && (
67
  <Placeholder
68
  icon="lock"
69
- label={ __( 'Premium Content', 'premium-content' ) }
70
- instructions={ __( 'Saving plan...', 'premium-content' ) }
71
  >
72
  <Spinner />
73
  </Placeholder>
@@ -129,7 +129,7 @@ export default function Inspector( props ) {
129
  }
130
  }
131
  >
132
- { __( 'Add subscription', 'premium-content' ) }
133
  </Button>
134
  </PanelRow>
135
  </div>
24
  const API_STATE_REQUESTING = 1;
25
 
26
  /**
27
+ * @typedef {object} PlanAttributes
28
  * @property { string } newPlanCurrency
29
  * @property { string } newPlanName
30
  * @property { number } newPlanPrice
31
  * @property { string } newPlanInterval
32
  *
33
+ * @typedef {object} Currency
34
  * @property { string } label
35
  * @property { string } symbol
36
  *
37
+ * @typedef {object} Props
38
  * @property { PlanAttributes } attributes
39
  * @property { (attributes: Partial<PlanAttributes>) => void } setAttributes
40
  * @property { string } className
55
  href={ `https://wordpress.com/earn/payments/${ siteSlug }` }
56
  className={ 'wp-block-premium-content-container---link-to-earn' }
57
  >
58
+ { __( 'Manage your subscriptions.', 'full-site-editing' ) }
59
  </ExternalLink>
60
  ) }
61
  <PanelBody
66
  { apiState === API_STATE_REQUESTING && (
67
  <Placeholder
68
  icon="lock"
69
+ label={ __( 'Premium Content', 'full-site-editing' ) }
70
+ instructions={ __( 'Saving plan', 'full-site-editing' ) }
71
  >
72
  <Spinner />
73
  </Placeholder>
129
  }
130
  }
131
  >
132
+ { __( 'Add subscription', 'full-site-editing' ) }
133
  </Button>
134
  </PanelRow>
135
  </div>
premium-content/blocks/container/new-plan.js CHANGED
@@ -27,7 +27,7 @@ export default function NewPlan( props ) {
27
  props.onClose();
28
  } }
29
  >
30
- { __( 'Add a new subscription', 'premium-content' ) }
31
  </MenuItem>
32
  </MenuGroup>
33
  );
27
  props.onClose();
28
  } }
29
  >
30
+ { __( 'Add a new subscription', 'full-site-editing' ) }
31
  </MenuItem>
32
  </MenuGroup>
33
  );
premium-content/blocks/container/plans.js CHANGED
@@ -11,7 +11,7 @@ import Plan from './plan';
11
  /**
12
  * @typedef { import('./plan').Plan } Plan
13
  *
14
- * @typedef { Object } Props
15
  * @property { Plan[] } plans
16
  * @property { undefined | Plan } selectedPlan
17
  * @property { (plan: Plan) => void } onSelected
11
  /**
12
  * @typedef { import('./plan').Plan } Plan
13
  *
14
+ * @typedef {object} Props
15
  * @property { Plan[] } plans
16
  * @property { undefined | Plan } selectedPlan
17
  * @property { (plan: Plan) => void } onSelected
premium-content/blocks/container/stripe-nudge.js CHANGED
@@ -10,7 +10,7 @@ import { withDispatch } from '@wordpress/data';
10
  /**
11
  * @typedef { import('react').MouseEvent<HTMLElement> } MouseEvent
12
  *
13
- * @typedef { Object } Props
14
  * @property { (event: MouseEvent) => void } autosaveAndRedirect
15
  * @property { string } stripeConnectUrl
16
  * @property { () => void } onClick
@@ -29,7 +29,7 @@ export const StripeNudge = ( { autosaveAndRedirect, stripeConnectUrl } ) => (
29
  isDefault
30
  className="premium-content-block-nudge__button stripe-nudge__button"
31
  >
32
- { __( 'Connect', 'premium-content' ) }
33
  </Button>,
34
  ]
35
  }
@@ -39,12 +39,12 @@ export const StripeNudge = ( { autosaveAndRedirect, stripeConnectUrl } ) => (
39
  { <Dashicon icon="star-filled" /> }
40
  <span className="premium-content-block-nudge__text-container">
41
  <span className="premium-content-block-nudge__title">
42
- { __( 'Connect to Stripe to use this block on your site', 'premium-content' ) }
43
  </span>
44
  <span className="premium-content-block-nudge__message">
45
  { __(
46
  'This block will be hidden from your visitors until you connect to Stripe.',
47
- 'premium-content'
48
  ) }
49
  </span>
50
  </span>
@@ -62,12 +62,14 @@ export default compose( [
62
  withDispatch(
63
  /**
64
  * Complicated to define the valid type with JSDoc
 
 
65
  */
66
  // @ts-ignore
67
  ( dispatch, { stripeConnectUrl } ) => ( {
68
  /**
69
  * @param { MouseEvent } event
70
- * @return { Promise<void> } When completed
71
  */
72
  autosaveAndRedirect: async ( event ) => {
73
  event.preventDefault(); // Don't follow the href before autosaving
10
  /**
11
  * @typedef { import('react').MouseEvent<HTMLElement> } MouseEvent
12
  *
13
+ * @typedef {object} Props
14
  * @property { (event: MouseEvent) => void } autosaveAndRedirect
15
  * @property { string } stripeConnectUrl
16
  * @property { () => void } onClick
29
  isDefault
30
  className="premium-content-block-nudge__button stripe-nudge__button"
31
  >
32
+ { __( 'Connect', 'full-site-editing' ) }
33
  </Button>,
34
  ]
35
  }
39
  { <Dashicon icon="star-filled" /> }
40
  <span className="premium-content-block-nudge__text-container">
41
  <span className="premium-content-block-nudge__title">
42
+ { __( 'Connect to Stripe to use this block on your site', 'full-site-editing' ) }
43
  </span>
44
  <span className="premium-content-block-nudge__message">
45
  { __(
46
  'This block will be hidden from your visitors until you connect to Stripe.',
47
+ 'full-site-editing'
48
  ) }
49
  </span>
50
  </span>
62
  withDispatch(
63
  /**
64
  * Complicated to define the valid type with JSDoc
65
+ *
66
+ * @param dispatch
67
  */
68
  // @ts-ignore
69
  ( dispatch, { stripeConnectUrl } ) => ( {
70
  /**
71
  * @param { MouseEvent } event
72
+ * @returns { Promise<void> } When completed
73
  */
74
  autosaveAndRedirect: async ( event ) => {
75
  event.preventDefault(); // Don't follow the href before autosaving
premium-content/blocks/container/tab.js CHANGED
@@ -2,12 +2,12 @@
2
  *
3
  * @typedef { import('react').ReactNode } ReactNode
4
  *
5
- * @typedef { Object } Tab
6
  * @property { string } id
7
  * @property { (ReactNode | string) } label
8
  * @property { string } className
9
  *
10
- * @typedef { Object } Props
11
  * @property { Tab } tab
12
  * @property { Tab } selectedTab
13
  * @property { string } className
2
  *
3
  * @typedef { import('react').ReactNode } ReactNode
4
  *
5
+ * @typedef {object} Tab
6
  * @property { string } id
7
  * @property { (ReactNode | string) } label
8
  * @property { string } className
9
  *
10
+ * @typedef {object} Props
11
  * @property { Tab } tab
12
  * @property { Tab } selectedTab
13
  * @property { string } className
premium-content/blocks/container/tabs.js CHANGED
@@ -7,7 +7,7 @@ import { dispatch, select } from '@wordpress/data';
7
 
8
  /**
9
  * @typedef { import('./tab').Tab } Tab
10
- * @typedef { Object } Props
11
  * @property { string } className
12
  * @property { Tab } selectedTab
13
  * @property { Tab[] } tabs
@@ -43,7 +43,7 @@ export default function Tabs( props ) {
43
  />
44
  ) ) }
45
  <button onClick={ focusBlock } className="edit components-button is-button is-secondary">
46
- { __( 'Edit', 'premium-content' ) }
47
  </button>
48
  </div>
49
  );
7
 
8
  /**
9
  * @typedef { import('./tab').Tab } Tab
10
+ * @typedef {object} Props
11
  * @property { string } className
12
  * @property { Tab } selectedTab
13
  * @property { Tab[] } tabs
43
  />
44
  ) ) }
45
  <button onClick={ focusBlock } className="edit components-button is-button is-secondary">
46
+ { __( 'Edit', 'full-site-editing' ) }
47
  </button>
48
  </div>
49
  );
premium-content/blocks/logged-out-view/edit.js CHANGED
@@ -18,7 +18,7 @@ import SubmitButtons from './submit-buttons';
18
  * Block edit function
19
  *
20
  * @typedef { import('./').Attributes } Attributes
21
- * @typedef { Object } Props
22
  * @property { boolean } isSelected
23
  * @property { string } className
24
  * @property { string } clientId
@@ -62,14 +62,14 @@ function Edit( props ) {
62
  template={ [
63
  [
64
  'core/heading',
65
- { content: __( 'Subscribe to get access', 'premium-content' ), level: 3 },
66
  ],
67
  [
68
  'core/paragraph',
69
  {
70
  content: __(
71
  'Read more of this content when you subscribe today.',
72
- 'premium-content'
73
  ),
74
  },
75
  ],
18
  * Block edit function
19
  *
20
  * @typedef { import('./').Attributes } Attributes
21
+ * @typedef {object} Props
22
  * @property { boolean } isSelected
23
  * @property { string } className
24
  * @property { string } clientId
62
  template={ [
63
  [
64
  'core/heading',
65
+ { content: __( 'Subscribe to get access', 'full-site-editing' ), level: 3 },
66
  ],
67
  [
68
  'core/paragraph',
69
  {
70
  content: __(
71
  'Read more of this content when you subscribe today.',
72
+ 'full-site-editing'
73
  ),
74
  },
75
  ],
premium-content/blocks/logged-out-view/index.js CHANGED
@@ -15,7 +15,7 @@ import { registerFormatType, unregisterFormatType } from '@wordpress/rich-text';
15
  const name = 'premium-content/logged-out-view';
16
  const category = 'common';
17
  /**
18
- * @typedef {Object} Attributes
19
  * @property {string} subscribeButtonText
20
  * @property {string} loginButtonText
21
  * @property {string} buttonClasses
@@ -62,9 +62,9 @@ const settings = {
62
  },
63
 
64
  /* translators: block name */
65
- title: __( 'Logged Out View', 'premium-content' ),
66
  /* translators: block description */
67
- description: __( 'Logged Out View.', 'premium-content' ),
68
  parent: [ 'premium-content/container' ],
69
  supports: {
70
  // Hide this block from the inserter.
15
  const name = 'premium-content/logged-out-view';
16
  const category = 'common';
17
  /**
18
+ * @typedef {object} Attributes
19
  * @property {string} subscribeButtonText
20
  * @property {string} loginButtonText
21
  * @property {string} buttonClasses
62
  },
63
 
64
  /* translators: block name */
65
+ title: __( 'Logged Out View', 'full-site-editing' ),
66
  /* translators: block description */
67
+ description: __( 'Logged Out View.', 'full-site-editing' ),
68
  parent: [ 'premium-content/container' ],
69
  supports: {
70
  // Hide this block from the inserter.
premium-content/blocks/logged-out-view/submit-buttons.js CHANGED
@@ -63,7 +63,7 @@ const applyFallbackStyles = withFallbackStyles( ( node, ownProps ) => {
63
  * @property { string } slug
64
  *
65
  * @typedef { import('./').Attributes } Attributes
66
- * @typedef { Object } Props
67
  * @property { Color } backgroundButtonColor
68
  * @property { Color } textButtonColor
69
  * @property { string } fallbackBackgroundColor
@@ -139,7 +139,7 @@ function SubmitButtons( props ) {
139
  <div>
140
  <div className="wp-block-button premium-content-logged-out-view-button">
141
  <RichText
142
- placeholder={ __( 'Add text…', 'premium-content' ) }
143
  value={ attributes.subscribeButtonText }
144
  onChange={ ( nextValue ) => setAttributes( { subscribeButtonText: nextValue } ) }
145
  className={ buttonClasses }
@@ -147,7 +147,7 @@ function SubmitButtons( props ) {
147
  keepPlaceholderOnFocus
148
  />
149
  <RichText
150
- placeholder={ __( 'Add text…', 'premium-content' ) }
151
  value={ attributes.loginButtonText }
152
  onChange={ ( nextValue ) => setAttributes( { loginButtonText: nextValue } ) }
153
  className={ buttonClasses }
@@ -157,17 +157,17 @@ function SubmitButtons( props ) {
157
  </div>
158
  <InspectorControls>
159
  <PanelColorSettings
160
- title={ __( 'Button Color Settings', 'premium-content' ) }
161
  colorSettings={ [
162
  {
163
  value: backgroundButtonColor || undefined,
164
  onChange: setBackgroundButtonColor,
165
- label: __( 'Background Color', 'premium-content' ),
166
  },
167
  {
168
  value: textButtonColor || undefined,
169
  onChange: setTextButtonColor,
170
- label: __( 'Text Color', 'premium-content' ),
171
  },
172
  ] }
173
  />
63
  * @property { string } slug
64
  *
65
  * @typedef { import('./').Attributes } Attributes
66
+ * @typedef {object} Props
67
  * @property { Color } backgroundButtonColor
68
  * @property { Color } textButtonColor
69
  * @property { string } fallbackBackgroundColor
139
  <div>
140
  <div className="wp-block-button premium-content-logged-out-view-button">
141
  <RichText
142
+ placeholder={ __( 'Add text…', 'full-site-editing' ) }
143
  value={ attributes.subscribeButtonText }
144
  onChange={ ( nextValue ) => setAttributes( { subscribeButtonText: nextValue } ) }
145
  className={ buttonClasses }
147
  keepPlaceholderOnFocus
148
  />
149
  <RichText
150
+ placeholder={ __( 'Add text…', 'full-site-editing' ) }
151
  value={ attributes.loginButtonText }
152
  onChange={ ( nextValue ) => setAttributes( { loginButtonText: nextValue } ) }
153
  className={ buttonClasses }
157
  </div>
158
  <InspectorControls>
159
  <PanelColorSettings
160
+ title={ __( 'Button Color Settings', 'full-site-editing' ) }
161
  colorSettings={ [
162
  {
163
  value: backgroundButtonColor || undefined,
164
  onChange: setBackgroundButtonColor,
165
+ label: __( 'Background Color', 'full-site-editing' ),
166
  },
167
  {
168
  value: textButtonColor || undefined,
169
  onChange: setTextButtonColor,
170
+ label: __( 'Text Color', 'full-site-editing' ),
171
  },
172
  ] }
173
  />
premium-content/blocks/subscriber-view/edit.js CHANGED
@@ -15,7 +15,7 @@ import Context from '../container/context';
15
  /**
16
  * Block edit function
17
  *
18
- * @typedef { Object } Props
19
  * @property { string } clientId
20
  * @property { string } containerClientId
21
  * @property { () => void } selectBlock
@@ -43,7 +43,7 @@ function Edit( props ) {
43
  {
44
  placeholder: __(
45
  'Insert the piece of content you want your visitors to see after they subscribe.',
46
- 'premium-content'
47
  ),
48
  },
49
  ],
15
  /**
16
  * Block edit function
17
  *
18
+ * @typedef {object} Props
19
  * @property { string } clientId
20
  * @property { string } containerClientId
21
  * @property { () => void } selectBlock
43
  {
44
  placeholder: __(
45
  'Insert the piece of content you want your visitors to see after they subscribe.',
46
+ 'full-site-editing'
47
  ),
48
  },
49
  ],
premium-content/blocks/subscriber-view/index.js CHANGED
@@ -17,9 +17,9 @@ const settings = {
17
  attributes: {},
18
 
19
  /* translators: block name */
20
- title: __( 'Subscriber View', 'premium-content' ),
21
  /* translators: block description */
22
- description: __( 'Subscriber View.', 'premium-content' ),
23
  parent: [ 'premium-content/container' ],
24
  supports: {
25
  // Hide this block from the inserter.
17
  attributes: {},
18
 
19
  /* translators: block name */
20
+ title: __( 'Subscriber View', 'full-site-editing' ),
21
  /* translators: block description */
22
+ description: __( 'Subscriber View.', 'full-site-editing' ),
23
  parent: [ 'premium-content/container' ],
24
  supports: {
25
  // Hide this block from the inserter.
premium-content/dist/premium-content.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text', 'wp-url'), 'version' => '68147f895516e627a7458c607320a41b');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text', 'wp-url'), 'version' => '441798b79c347b47c809c6c87ff325e3');
premium-content/dist/premium-content.js CHANGED
@@ -1,9 +1,9 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=57)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(36),o=n(37),i=n(21),c=n(38);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var r=n(10);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function n(e,t,n,r,o,i,c){try{var s=e[i](c),a=s.value}catch(l){return void n(l)}s.done?t(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function s(e){n(c,o,i,s,a,"next",e)}function a(e){n(c,o,i,s,a,"throw",e)}s(void 0)}))}}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(25),o=n(24);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):i(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=c(o)),n+=a(o.toString(16))}return n},t.zero2=s,t.zero8=a,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var c=new Array(i/4),s=0,a=t;s<c.length;s++,a+=4){var l;l="big"===o?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],c[s]=l>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,c=(i<r?1:0)+n+o;e[t]=c>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,c,s){var a=0,l=t;return a+=(l=l+r>>>0)<t?1:0,a+=(l=l+i>>>0)<i?1:0,e+n+o+c+(a+=(l=l+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,c,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,c,s,a,l){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+i>>>0)<i?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+o+c+a+(u+=(p=p+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,c,s,a,l){return t+r+i+s+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(39),o=n(40),i=n(21),c=n(41);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,c,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),c=i[t]),void 0===c)c=i[t]=n,++e._eventsCount;else if("function"==typeof c?c=i[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(o=u(e))>0&&c.length>o&&!c.warned){c.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=c.length,s=a,console&&console.warn&&console.warn(s)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=m.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):b(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)i(a,this,t);else{var l=a.length,u=b(a,l);for(n=0;n<l;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return p(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return p(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,c;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t,n){var r=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(42)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=s(n(8)),i=s(n(44)),c=s(n(47));function s(e){return e&&e.__esModule?e:{default:e}}var a=void 0;function l(e,t){var n,c,s,u,p,m,f,d,g=[],b={};for(m=0;m<e.length;m++)if("string"!==(p=e[m]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+a);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],s=m;break}g.push(t[p.value])}else g.push(p.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),f=l(e.slice(s+1,u),t),c=o.default.cloneElement(n,{},f),g.push(c),u<e.length-1&&(d=l(e.slice(u+1),t),g=g.concat(d))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(a=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return l(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(19),o=n(24);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(17),o=n(48),i=n(49),c=r.rotl32,s=r.sum32,a=r.sum32_5,l=i.ft_1,u=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function m(){if(!(this instanceof m))return new m;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(m,u),e.exports=m,m.blockSize=512,m.outSize=160,m.hmacStrength=80,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],u=this.h[2],m=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=a(c(o,5),l(d,i,u,m),f,n[r],p[d]);f=m,m=u,u=c(i,30),i=o,o=g}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],m),this.h[4]=s(this.h[4],f)},m.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(50);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(51),o=n(52),i=n(53);e.exports=function(e){return function(){var t,n=r(e);if(o()){var c=r(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){"use strict";e.exports=n(55)},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){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 c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(22);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(18);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var c=r,s=Number(new Date),a=s-(n||s);c.diff=a,c.prev=n,c.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var r=o.formatters[n];if("function"==typeof r){var i=t[l];e=r.call(c,i),t.splice(l,1),l--}return e})),o.formatArgs.call(c,t);var u=c.log||o.log;u.apply(c,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=c,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function c(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(43),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(8),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(23),c=n(45),s=n(46),a="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+l(e,0):t),1;var p=0,m=""===t?".":t+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)p+=u(i=e[f],m+l(i,f),n,r);else{var d=function(e){var t=e&&(a&&e[a]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var g,b=d.call(e),h=0;!(g=b.next()).done;)p+=u(i=g.value,m+l(i,h++),n,r)}else if("object"===s){0;var y=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return p}var p=/\/+/g;function m(e){return(""+e).replace(p,"$&/")}var f,d,g=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},h=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function y(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function v(e,t,n){var o,c,s=e.result,a=e.keyPrefix,l=e.func,u=e.context,p=l.call(u,t,e.count++);Array.isArray(p)?O(p,s,n,i.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(o=p,c=a+(!p.key||t&&t.key===p.key?"":m(p.key)+"/")+n,p=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),s.push(p))}function O(e,t,n,r,o){var i="";null!=n&&(i=m(n)+"/");var c=y.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,c),y.release(c)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(d=y).instancePool=[],d.getPooled=f||g,d.poolSize||(d.poolSize=10),d.release=h;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)O(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,c,s){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,c,s],u=0;(a=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(23);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(17),o=n(25);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(17).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?c(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=c,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(54),o=n(15);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
7
  /** @license React v1.3.0
8
  * use-subscription.production.min.js
9
  *
@@ -16,11 +16,11 @@
16
  object-assign
17
  (c) Sindre Sorhus
18
  @license MIT
19
- */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,a=c(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))o.call(n,u)&&(a[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(a[s[p]]=n[s[p]])}}return a}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return mt}));var r={};n.r(r),n.d(r,"name",(function(){return Ke})),n.d(r,"category",(function(){return He})),n.d(r,"settings",(function(){return Ge})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Ve})),n.d(r,"CURRENCY_OPTIONS",(function(){return We})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return ze})),n.d(r,"isPriceValid",(function(){return Ze}));var o={};n.r(o),n.d(o,"name",(function(){return Je})),n.d(o,"category",(function(){return qe})),n.d(o,"settings",(function(){return Xe}));var i={};n.r(i),n.d(i,"name",(function(){return ct})),n.d(i,"category",(function(){return st})),n.d(i,"settings",(function(){return at}));var c=n(14),s=n.n(c),a=n(9),l=n.n(a),u=n(12),p=n.n(u),m=n(13),f=n(1),d=n(0),g={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function b(e){return g[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var h,y,v,O,j=n(11),w=n(6),C=n.n(w),_=n(7),k=n.n(_),x=n(2),S=n(5),E=n(4),P=n(16),F=n(18),B=n.n(F),N=n(10),A=n.n(N),L=n(26),R=n.n(L),T=n(27),D=n.n(T);h={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},y=["(","?"],v={")":["("],":":["?","?:"]},O=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var M={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function I(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(O);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(v[n]){if(v[n][0]===o){n=v[n][1]||n;break}}else if(y.indexOf(o)>=0||h[o]<h[n]){c.push(o);break}i.push(o)}v[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,a=[];for(n=0;n<e.length;n++){if(c=e[n],i=M[c]){for(r=i.length,o=Array(r);r--;)o[r]=a.pop();try{s=i.apply(null,o)}catch(l){return l}}else s=t.hasOwnProperty(c)?t[c]:+c;a.push(s)}return a[0]}(t,e)}}var $={contextDelimiter:"",onMissingKey:null};function U(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},$)this.options[n]=void 0!==t&&n in t?t[n]:$[n]}U.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=I(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},U.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var K=n(28),H=n.n(K),G=n(29),V=n.n(G),W=n(19),z=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function Z(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(z,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
20
  /*
21
  * Exposes number format capability
22
  *
23
  * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
24
  * @license See CREDITS.md
25
  * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
26
- */function Y(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,a="";return(a=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(s)}var J=R()("i18n-calypso"),q=[function(e){return e}],X={};function Q(){oe.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ee(e){return Array.prototype.slice.call(e)}function te(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&Q("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ee(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&Q("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ee(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function ne(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function re(e,t){for(var n=q.length-1;n>=0;n--){var r=q[n](Object.assign({},t));if(e.state.locale[r.original])return ne(e.state.tannin,r)}return null}function oe(){if(!(this instanceof oe))return new oe;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:H()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new W.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}oe.throwErrors=!1,oe.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},oe.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},oe.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},oe.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return Y(e,n,r,o)},oe.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},oe.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==X[n+e])return X[n+e];var r=V()().update(e).digest("hex");return X[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)q.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var a=Number(o.substr(5));q.push(c(a))}else for(var l=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=l;p<=u;p++)q.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new U(A()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=ne(this.state.tannin,te(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=ne(this.state.tannin,te(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},oe.prototype.getLocale=function(){return this.state.locale},oe.prototype.getLocaleSlug=function(){return this.state.localeSlug},oe.prototype.isRtl=function(){return"rtl"===this.state.textDirection},oe.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},oe.prototype.hasTranslation=function(){return!!re(this,te(arguments))},oe.prototype.translate=function(){var e=te(arguments),t=re(this,e);if(t||(t=ne(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=Z.apply(void 0,B()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=D()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},oe.prototype.reRenderTranslations=function(){J("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},oe.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},oe.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var ie=oe,ce=n(30),se=n.n(ce),ae=n(31),le=n.n(ae),ue=n(15),pe=n.n(ue),me=n(32),fe=n.n(me),de=n(33),ge=n.n(de),be=n(8),he=n.n(be),ye=n(34);var ve,Oe,je=new ie,we=je.numberFormat.bind(je),Ce=(je.translate.bind(je),je.configure.bind(je),je.setLocale.bind(je),je.getLocale.bind(je),je.getLocaleSlug.bind(je),je.addTranslations.bind(je),je.reRenderTranslations.bind(je),je.registerComponentUpdateHook.bind(je),je.registerTranslateHook.bind(je),je.state,je.stateObserver,je.on.bind(je),je.off.bind(je),je.emit.bind(je),Oe={numberFormat:(ve=je).numberFormat.bind(ve),translate:ve.translate.bind(ve)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(je),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(ye.useSubscription)(t)}var r=Object(S.createHigherOrderComponent)((function(e){return Object(be.forwardRef)((function(t,r){var o=n();return he.a.createElement(e,C()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(je));Ce.useRtl,Ce.withRtl;function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=b(t);if(!r||isNaN(e))return null;var o=l()({},r,{},n),i=o.decimal,c=o.grouping,s=o.precision,a=o.symbol,u=e<0?"-":"",p=we(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(p=ke(p,i)),"".concat(u).concat(a).concat(p)}function ke(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function xe(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(d.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Se(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(d.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(d.createElement)(xe,C()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(d.createElement)("button",{onClick:function(){Object(E.select)("core/edit-post").isEditorSidebarOpened()||Object(E.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(f.__)("Edit","premium-content")))}var Ee=n(3);function Pe(){return Object(d.createElement)("div",{className:"premium-content-wrapper"},Object(d.createElement)(Ee.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Fe(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,a=(s?["is-selected"]:[]).concat([t]).join(" "),l=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(d.createElement)(x.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:a,key:n.id,value:n.id,selected:s,icon:l},n.title," : ",u)}function Be(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(d.createElement)(x.MenuGroup,null,t.map((function(t){return Object(d.createElement)(Fe,C()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ne(e){return Object(d.createElement)(x.MenuGroup,null,Object(d.createElement)(x.MenuItem,{onClick:function(t){t.preventDefault(),Object(E.select)("core/edit-post").isEditorSidebarOpened()||Object(E.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(f.__)("Add a new subscription","premium-content")))}function Ae(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(d.createElement)(Ee.BlockControls,null,Object(d.createElement)(x.Toolbar,null,Object(d.createElement)(x.DropdownMenu,{icon:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(x.Dashicon,{icon:"update"})," ",c&&Object(d.createElement)(d.Fragment,null,c)),label:Object(f.__)("Select a plan","premium-content"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Be,C()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(d.createElement)(Ne,C()({},e,{onClose:r})))}))))}function Le(e){var t=Object(d.useState)(0),n=k()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,a=e.savePlan,l=(e.currencies,e.siteSlug);return Object(d.createElement)(Ee.InspectorControls,null,l&&Object(d.createElement)(x.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(l),className:"wp-block-premium-content-container---link-to-earn"},Object(f.__)("Manage your subscriptions.","premium-content")),Object(d.createElement)(x.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(f.__)("Premium Content","premium-content"),instructions:Object(f.__)("Saving plan...","premium-content")},Object(d.createElement)(x.Spinner,null)),0===r&&Object(d.createElement)("div",null,Object(d.createElement)(x.PanelRow,{className:"plan-name"},Object(d.createElement)(x.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(d.createElement)(x.PanelRow,{className:"plan-price"},Object(d.createElement)(x.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:We}),Object(d.createElement)(x.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(d.createElement)(x.PanelRow,{className:"plan-interval"},Object(d.createElement)(x.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(d.createElement)(x.PanelRow,null,Object(d.createElement)(x.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),a(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(f.__)("Add subscription","premium-content"))))))}var Re=Object(S.compose)([Object(E.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=s()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(d.createElement)(Ee.Warning,{actions:n&&[Object(d.createElement)(x.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(f.__)("Connect","premium-content"))],className:"premium-content-block-nudge"},Object(d.createElement)("span",{className:"premium-content-block-nudge__info"},Object(d.createElement)(x.Dashicon,{icon:"star-filled"}),Object(d.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(d.createElement)("span",{className:"premium-content-block-nudge__title"},Object(f.__)("Connect to Stripe to use this block on your site","premium-content")),Object(d.createElement)("span",{className:"premium-content-block-nudge__message"},Object(f.__)("This block will be hidden from your visitors until you connect to Stripe.","premium-content")))))})),Te={selectedTab:{id:"",className:"",label:Object(d.createElement)(d.Fragment,null)},stripeNudge:null},De=Object(d.createContext)(Te),Me=[{id:"premium",label:Object(d.createElement)("span",null,Object(f.__)("Subscriber View","premium-content")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(d.createElement)("span",null,Object(f.__)("Non-subscriber View","premium-content")),className:"wp-premium-content-logged-out-view"}],Ie=[];function $e(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var Ue=Object(S.compose)([Object(E.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),x.withNotices,Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(d.useState)(Me[1]),n=k()(t,2),r=n[0],o=n[1],i=Object(d.useState)(!1),c=k()(i,2),s=c[0],a=c[1],l=Object(d.useState)(Ie),u=k()(l,2),m=u[0],g=u[1],b=Object(d.useState)(null),h=k()(b,2),y=h[0],v=h[1],O=Object(d.useState)(0),j=k()(O,2),w=j[0],_=j[1],S=Object(d.useState)(!1),E=k()(S,2),F=E[0],B=E[1],N=Object(d.useState)(""),A=k()(N,2),L=A[0],R=A[1],T=Object(d.useState)(""),D=k()(T,2),M=D[0],I=D[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return $e(e,Object(f.__)("Plan requires a name","premium-content")),void n(!1);var r=parseFloat(t.newPlanPrice),o=ze(t.newPlanCurrency),i=Object(f.sprintf)(Object(f.__)("Minimum allowed price is %s.","premium-content"),_e(o,t.newPlanCurrency));if(r<o)return $e(e,i),void n(!1);if(!Ze(t.newPlanCurrency,r))return $e(e,Object(f.__)("Plan requires a valid price","premium-content")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};p()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};g(m.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(f.__)("Successfully created plan","premium-content")),n&&n(!0)}),(function(){$e(e,Object(f.__)("There was an error when adding the plan.")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(d.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(d.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,a);var H=e.isSelected,G=e.className;if(Object(d.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};p()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return _(2),void $e(e,Object.values(t.errors)[0][0]);v(t.connect_url),B(t.should_upgrade_to_access_memberships),R(t.upgrade_url),I(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(f.__)("Monthly Subscription"),newPlanInterval:"1 month"},(function(){_(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(g(t.products),e.attributes.selectedPlanId||U(t.products[0])),_(t.connected_account_id?1:2))}}),(function(t){v(null),_(2),$e(e,t.message)})),e.selectBlock()}),[]),0===w)return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(f.__)("Premium Content","premium-content"),instructions:Object(f.__)("Loading data...","premium-content")},Object(d.createElement)(x.Spinner,null)));if(F)return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(f.__)("Premium Content","premium-content"),instructions:Object(f.__)("You'll need to upgrade your plan to use the Premium Content block.","premium-content")},Object(d.createElement)(x.Button,{isSecondary:!0,isLarge:!0,href:L,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(f.__)("Upgrade Your Plan","premium-content")),Object(d.createElement)("div",{className:"membership-button__disclaimer"},Object(d.createElement)(x.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(f.__)("Read more about Premium Content and related fees.","premium-content")))));var V=null;if(!F&&1!==w&&y){var W=function(e,t){var n,r=e.postId;if(!Object(P.isURL)(t))return null;if(!r)return t;try{var o=Object(P.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(P.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,y);V=Object(d.createElement)(Re,C()({},e,{stripeConnectUrl:W}))}return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,(H||s)&&1===w&&Object(d.createElement)(Ae,C()({},e,{plans:m,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=_e(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(f.sprintf)(Object(f.__)("%s / month","premium-content"),t):"1 year"===e.interval?Object(f.sprintf)(Object(f.__)("%s / year","premium-content"),t):"one-time"===e.interval?t:Object(f.sprintf)(Object(f.__)("%s / %s","premium-content"),t,e.interval)}})),(H||s)&&1===w&&Object(d.createElement)(Le,C()({},e,{savePlan:$,siteSlug:M})),(H||s)&&Object(d.createElement)(Se,C()({},e,{tabs:Me,selectedTab:r,onSelected:o})),Object(d.createElement)(De.Provider,{value:{selectedTab:r,stripeNudge:V}},Object(d.createElement)(Pe,null)))}));var Ke="premium-content/container",He="common",Ge={name:Ke,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(f.__)("Premium Content","premium-content"),description:Object(f.__)("Restrict access to your content for paying subscribers.","premium-content"),category:He,icon:Object(d.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(d.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(d.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["premium-content",Object(f.__)("premium","premium-content"),Object(f.__)("paywall","premium-content")],edit:Ue,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-container"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},Ve={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},We=Object.keys(Ve).map((function(e){var t=b(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(j.trimEnd)(t,"."))}}));function ze(e){return Ve[e]}function Ze(e,t){return!isNaN(t)&&t>=ze(e)}var Ye=Object(S.compose)([Object(E.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length,containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(d.useEffect)((function(){e.selectBlock()}),[]),Object(d.createElement)(De.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(d.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(d.createElement)(Ee.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&Ee.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(f.__)("Insert the piece of content you want your visitors to see after they subscribe.","premium-content")}]]}))}))}));var Je="premium-content/subscriber-view",qe="common",Xe={name:Je,category:qe,attributes:{},title:Object(f.__)("Subscriber View","premium-content"),description:Object(f.__)("Subscriber View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:Ye,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},Qe=n(35),et=n.n(Qe),tt=window.getComputedStyle,nt=Object(x.withFallbackStyles)((function(e,t){var n,r,o,i,c=t.textButtonColor,s=t.backgroundButtonColor,a=s&&s.color,l=c&&c.color;return!l&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&r&&(o=tt(r).backgroundColor),n&&(i=tt(n).color),{fallbackBackgroundColor:a||o,fallbackTextColor:l||i}}));var rt=Object(S.compose)([Object(Ee.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),nt])((function(e){function t(){var t,n=e.textButtonColor,r=e.backgroundButtonColor,o=Object(j.get)(n,"class"),i=Object(j.get)(r,"class");return et()("wp-block-button__link",(t={"has-text-color":n.color},A()(t,o,o),A()(t,"has-background",r.color),A()(t,i,i),t))}Object(d.useEffect)((function(){!function(){var n=t();e.setAttributes({buttonClasses:n})}(),function(){var t=Object(j.get)(e.textButtonColor,"color"),n=Object(j.get)(e.backgroundButtonColor,"color");void 0!==t&&e.setAttributes({customTextButtonColor:t});void 0!==n&&e.setAttributes({customBackgroundButtonColor:n})}()}),[e.backgroundButtonColor,e.textButtonColor]);var n=e.attributes,r=e.setAttributes,o=e.backgroundButtonColor,i=e.textButtonColor,c=e.setBackgroundButtonColor,s=e.setTextButtonColor,a=e.fallbackBackgroundColor,l=e.fallbackTextColor,u=o.color||a,p=i.color||l,m={border:"none",backgroundColor:u,color:p},g=t();return Object(d.createElement)("div",null,Object(d.createElement)("div",{className:"wp-block-button premium-content-logged-out-view-button"},Object(d.createElement)(Ee.RichText,{placeholder:Object(f.__)("Add text…","premium-content"),value:n.subscribeButtonText,onChange:function(e){return r({subscribeButtonText:e})},className:g,style:m,keepPlaceholderOnFocus:!0}),Object(d.createElement)(Ee.RichText,{placeholder:Object(f.__)("Add text…","premium-content"),value:n.loginButtonText,onChange:function(e){return r({loginButtonText:e})},className:g,style:m,keepPlaceholderOnFocus:!0})),Object(d.createElement)(Ee.InspectorControls,null,Object(d.createElement)(Ee.PanelColorSettings,{title:Object(f.__)("Button Color Settings","premium-content"),colorSettings:[{value:o||void 0,onChange:c,label:Object(f.__)("Background Color","premium-content")},{value:i||void 0,onChange:s,label:Object(f.__)("Text Color","premium-content")}]}),Object(d.createElement)(Ee.ContrastChecker,{textColor:p,backgroundColor:u,fallbackBackgroundColor:a,fallbackTextColor:l})))}));var ot=Object(S.compose)([Object(E.withSelect)((function(e,t){return{containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){Object(d.useEffect)((function(){e.selectBlock()}),[]);var t=Object(d.createElement)(rt,{attributes:Object(j.pick)(e.attributes,["subscribeButtonText","loginButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"]),setAttributes:e.setAttributes});return Object(d.createElement)(De.Consumer,null,(function(e){var n=e.selectedTab,r=e.stripeNudge;return Object(d.createElement)("div",{hidden:"premium"===n.id,className:n.className},r,Object(d.createElement)(Ee.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(f.__)("Subscribe to get access","premium-content"),level:3}],["core/paragraph",{content:Object(f.__)("Read more of this content when you subscribe today.","premium-content")}]]}),t)}))}));var it=n(20),ct="premium-content/logged-out-view",st="common",at={name:ct,category:st,attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},title:Object(f.__)("Logged Out View","premium-content"),description:Object(f.__)("Logged Out View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:ot,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},lt=Object(E.subscribe)((function(){var e=Object(E.select)("core/rich-text").getFormatType("core/link");if(e){lt(),Object(it.unregisterFormatType)("core/link");var t=Object(S.compose)(Object(E.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(S.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ct})))(e.edit);Object(it.registerFormatType)("core/link",l()({},e,{edit:t}))}})),ut=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(m.registerBlockType)(t,l()({category:n},r))}},pt=function(){var e=s()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p()({path:"/wpcom/v2/memberships/status"});case 3:t=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return");case 9:if(!t.should_upgrade_to_access_memberships){e.next=17;break}if(n=Object(m.getBlockType)(Ke)){e.next=14;break}return e.abrupt("return");case 14:r=Object(f._x)("paid","Short label appearing near a block requiring a paid plan","premium-content"),Object(m.unregisterBlockType)(Ke),Object(m.registerBlockType)(Ke,l()({},n,{title:"".concat(n.title," (").concat(r,")")}));case 17:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),mt=function(){[r,i,o].forEach(ut),pt()};mt()}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=57)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(36),o=n(37),i=n(21),c=n(38);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var r=n(10);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function n(e,t,n,r,o,i,c){try{var s=e[i](c),a=s.value}catch(l){return void n(l)}s.done?t(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function s(e){n(c,o,i,s,a,"next",e)}function a(e){n(c,o,i,s,a,"throw",e)}s(void 0)}))}}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(25),o=n(24);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):i(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=c(o)),n+=a(o.toString(16))}return n},t.zero2=s,t.zero8=a,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var c=new Array(i/4),s=0,a=t;s<c.length;s++,a+=4){var l;l="big"===o?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],c[s]=l>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,c=(i<r?1:0)+n+o;e[t]=c>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,c,s){var a=0,l=t;return a+=(l=l+r>>>0)<t?1:0,a+=(l=l+i>>>0)<i?1:0,e+n+o+c+(a+=(l=l+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,c,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,c,s,a,l){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+i>>>0)<i?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+o+c+a+(u+=(p=p+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,c,s,a,l){return t+r+i+s+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(39),o=n(40),i=n(21),c=n(41);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,c,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),c=i[t]),void 0===c)c=i[t]=n,++e._eventsCount;else if("function"==typeof c?c=i[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(o=u(e))>0&&c.length>o&&!c.warned){c.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=c.length,s=a,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):b(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)i(a,this,t);else{var l=a.length,u=b(a,l);for(n=0;n<l;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return p(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return p(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,m(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,m(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,c;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t,n){var r=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(42)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=s(n(8)),i=s(n(44)),c=s(n(47));function s(e){return e&&e.__esModule?e:{default:e}}var a=void 0;function l(e,t){var n,c,s,u,p,f,m,d,g=[],b={};for(f=0;f<e.length;f++)if("string"!==(p=e[f]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+a);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],s=f;break}g.push(t[p.value])}else g.push(p.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),m=l(e.slice(s+1,u),t),c=o.default.cloneElement(n,{},m),g.push(c),u<e.length-1&&(d=l(e.slice(u+1),t),g=g.concat(d))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(a=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return l(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(19),o=n(24);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(17),o=n(48),i=n(49),c=r.rotl32,s=r.sum32,a=r.sum32_5,l=i.ft_1,u=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,u),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],u=this.h[2],f=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=a(c(o,5),l(d,i,u,f),m,n[r],p[d]);m=f,f=u,u=c(i,30),i=o,o=g}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],m)},f.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(50);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(51),o=n(52),i=n(53);e.exports=function(e){return function(){var t,n=r(e);if(o()){var c=r(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){"use strict";e.exports=n(55)},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){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 c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(22);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(18);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var c=r,s=Number(new Date),a=s-(n||s);c.diff=a,c.prev=n,c.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var r=o.formatters[n];if("function"==typeof r){var i=t[l];e=r.call(c,i),t.splice(l,1),l--}return e})),o.formatArgs.call(c,t);var u=c.log||o.log;u.apply(c,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=c,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function c(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(43),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(8),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(23),c=n(45),s=n(46),a="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+l(e,0):t),1;var p=0,f=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)p+=u(i=e[m],f+l(i,m),n,r);else{var d=function(e){var t=e&&(a&&e[a]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var g,b=d.call(e),h=0;!(g=b.next()).done;)p+=u(i=g.value,f+l(i,h++),n,r)}else if("object"===s){0;var y=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return p}var p=/\/+/g;function f(e){return(""+e).replace(p,"$&/")}var m,d,g=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},h=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function y(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function v(e,t,n){var o,c,s=e.result,a=e.keyPrefix,l=e.func,u=e.context,p=l.call(u,t,e.count++);Array.isArray(p)?O(p,s,n,i.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(o=p,c=a+(!p.key||t&&t.key===p.key?"":f(p.key)+"/")+n,p=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),s.push(p))}function O(e,t,n,r,o){var i="";null!=n&&(i=f(n)+"/");var c=y.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,c),y.release(c)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(d=y).instancePool=[],d.getPooled=m||g,d.poolSize||(d.poolSize=10),d.release=h;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)O(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,c,s){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,c,s],u=0;(a=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(23);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(17),o=n(25);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(17).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?c(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=c,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(54),o=n(15);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
7
  /** @license React v1.3.0
8
  * use-subscription.production.min.js
9
  *
16
  object-assign
17
  (c) Sindre Sorhus
18
  @license MIT
19
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,a=c(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))o.call(n,u)&&(a[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(a[s[p]]=n[s[p]])}}return a}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return ft}));var r={};n.r(r),n.d(r,"name",(function(){return Ke})),n.d(r,"category",(function(){return He})),n.d(r,"settings",(function(){return Ge})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Ve})),n.d(r,"CURRENCY_OPTIONS",(function(){return We})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return ze})),n.d(r,"isPriceValid",(function(){return Ze}));var o={};n.r(o),n.d(o,"name",(function(){return Je})),n.d(o,"category",(function(){return qe})),n.d(o,"settings",(function(){return Xe}));var i={};n.r(i),n.d(i,"name",(function(){return ct})),n.d(i,"category",(function(){return st})),n.d(i,"settings",(function(){return at}));var c=n(14),s=n.n(c),a=n(9),l=n.n(a),u=n(12),p=n.n(u),f=n(13),m=n(1),d=n(0),g={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function b(e){return g[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var h,y,v,O,j=n(11),w=n(6),C=n.n(w),_=n(7),k=n.n(_),x=n(2),S=n(5),E=n(4),P=n(16),F=n(18),B=n.n(F),N=n(10),A=n.n(N),L=n(26),R=n.n(L),T=n(27),D=n.n(T);h={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},y=["(","?"],v={")":["("],":":["?","?:"]},O=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var M={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function I(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(O);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(v[n]){if(v[n][0]===o){n=v[n][1]||n;break}}else if(y.indexOf(o)>=0||h[o]<h[n]){c.push(o);break}i.push(o)}v[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,a=[];for(n=0;n<e.length;n++){if(c=e[n],i=M[c]){for(r=i.length,o=Array(r);r--;)o[r]=a.pop();try{s=i.apply(null,o)}catch(l){return l}}else s=t.hasOwnProperty(c)?t[c]:+c;a.push(s)}return a[0]}(t,e)}}var $={contextDelimiter:"",onMissingKey:null};function U(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},$)this.options[n]=void 0!==t&&n in t?t[n]:$[n]}U.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=I(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},U.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var K=n(28),H=n.n(K),G=n(29),V=n.n(G),W=n(19),z=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function Z(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(z,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
20
  /*
21
  * Exposes number format capability
22
  *
23
  * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
24
  * @license See CREDITS.md
25
  * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
26
+ */function Y(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,a="";return(a=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(s)}var J=R()("i18n-calypso"),q=[function(e){return e}],X={};function Q(){oe.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ee(e){return Array.prototype.slice.call(e)}function te(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&Q("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ee(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&Q("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ee(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function ne(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function re(e,t){for(var n=q.length-1;n>=0;n--){var r=q[n](Object.assign({},t));if(e.state.locale[r.original])return ne(e.state.tannin,r)}return null}function oe(){if(!(this instanceof oe))return new oe;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:H()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new W.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}oe.throwErrors=!1,oe.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},oe.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},oe.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},oe.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return Y(e,n,r,o)},oe.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},oe.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==X[n+e])return X[n+e];var r=V()().update(e).digest("hex");return X[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)q.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var a=Number(o.substr(5));q.push(c(a))}else for(var l=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=l;p<=u;p++)q.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new U(A()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=ne(this.state.tannin,te(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=ne(this.state.tannin,te(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},oe.prototype.getLocale=function(){return this.state.locale},oe.prototype.getLocaleSlug=function(){return this.state.localeSlug},oe.prototype.isRtl=function(){return"rtl"===this.state.textDirection},oe.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},oe.prototype.hasTranslation=function(){return!!re(this,te(arguments))},oe.prototype.translate=function(){var e=te(arguments),t=re(this,e);if(t||(t=ne(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=Z.apply(void 0,B()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=D()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},oe.prototype.reRenderTranslations=function(){J("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},oe.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},oe.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var ie=oe,ce=n(30),se=n.n(ce),ae=n(31),le=n.n(ae),ue=n(15),pe=n.n(ue),fe=n(32),me=n.n(fe),de=n(33),ge=n.n(de),be=n(8),he=n.n(be),ye=n(34);var ve,Oe,je=new ie,we=je.numberFormat.bind(je),Ce=(je.translate.bind(je),je.configure.bind(je),je.setLocale.bind(je),je.getLocale.bind(je),je.getLocaleSlug.bind(je),je.addTranslations.bind(je),je.reRenderTranslations.bind(je),je.registerComponentUpdateHook.bind(je),je.registerTranslateHook.bind(je),je.state,je.stateObserver,je.on.bind(je),je.off.bind(je),je.emit.bind(je),Oe={numberFormat:(ve=je).numberFormat.bind(ve),translate:ve.translate.bind(ve)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(je),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(ye.useSubscription)(t)}var r=Object(S.createHigherOrderComponent)((function(e){return Object(be.forwardRef)((function(t,r){var o=n();return he.a.createElement(e,C()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(je));Ce.useRtl,Ce.withRtl;function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=b(t);if(!r||isNaN(e))return null;var o=l()({},r,{},n),i=o.decimal,c=o.grouping,s=o.precision,a=o.symbol,u=e<0?"-":"",p=we(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(p=ke(p,i)),"".concat(u).concat(a).concat(p)}function ke(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function xe(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(d.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Se(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(d.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(d.createElement)(xe,C()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(d.createElement)("button",{onClick:function(){Object(E.select)("core/edit-post").isEditorSidebarOpened()||Object(E.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(m.__)("Edit","full-site-editing")))}var Ee=n(3);function Pe(){return Object(d.createElement)("div",{className:"premium-content-wrapper"},Object(d.createElement)(Ee.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Fe(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,a=(s?["is-selected"]:[]).concat([t]).join(" "),l=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(d.createElement)(x.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:a,key:n.id,value:n.id,selected:s,icon:l},n.title," : ",u)}function Be(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(d.createElement)(x.MenuGroup,null,t.map((function(t){return Object(d.createElement)(Fe,C()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ne(e){return Object(d.createElement)(x.MenuGroup,null,Object(d.createElement)(x.MenuItem,{onClick:function(t){t.preventDefault(),Object(E.select)("core/edit-post").isEditorSidebarOpened()||Object(E.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(m.__)("Add a new subscription","full-site-editing")))}function Ae(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(d.createElement)(Ee.BlockControls,null,Object(d.createElement)(x.Toolbar,null,Object(d.createElement)(x.DropdownMenu,{icon:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(x.Dashicon,{icon:"update"})," ",c&&Object(d.createElement)(d.Fragment,null,c)),label:Object(m.__)("Select a plan","full-site-editing"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Be,C()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(d.createElement)(Ne,C()({},e,{onClose:r})))}))))}function Le(e){var t=Object(d.useState)(0),n=k()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,a=e.savePlan,l=(e.currencies,e.siteSlug);return Object(d.createElement)(Ee.InspectorControls,null,l&&Object(d.createElement)(x.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(l),className:"wp-block-premium-content-container---link-to-earn"},Object(m.__)("Manage your subscriptions.","full-site-editing")),Object(d.createElement)(x.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(m.__)("Premium Content","full-site-editing"),instructions:Object(m.__)("Saving plan…","full-site-editing")},Object(d.createElement)(x.Spinner,null)),0===r&&Object(d.createElement)("div",null,Object(d.createElement)(x.PanelRow,{className:"plan-name"},Object(d.createElement)(x.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(d.createElement)(x.PanelRow,{className:"plan-price"},Object(d.createElement)(x.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:We}),Object(d.createElement)(x.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(d.createElement)(x.PanelRow,{className:"plan-interval"},Object(d.createElement)(x.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(d.createElement)(x.PanelRow,null,Object(d.createElement)(x.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),a(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(m.__)("Add subscription","full-site-editing"))))))}var Re=Object(S.compose)([Object(E.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=s()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(d.createElement)(Ee.Warning,{actions:n&&[Object(d.createElement)(x.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(m.__)("Connect","full-site-editing"))],className:"premium-content-block-nudge"},Object(d.createElement)("span",{className:"premium-content-block-nudge__info"},Object(d.createElement)(x.Dashicon,{icon:"star-filled"}),Object(d.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(d.createElement)("span",{className:"premium-content-block-nudge__title"},Object(m.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(d.createElement)("span",{className:"premium-content-block-nudge__message"},Object(m.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),Te={selectedTab:{id:"",className:"",label:Object(d.createElement)(d.Fragment,null)},stripeNudge:null},De=Object(d.createContext)(Te),Me=[{id:"premium",label:Object(d.createElement)("span",null,Object(m.__)("Subscriber View","full-site-editing")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(d.createElement)("span",null,Object(m.__)("Non-subscriber View","full-site-editing")),className:"wp-premium-content-logged-out-view"}],Ie=[];function $e(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var Ue=Object(S.compose)([Object(E.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),x.withNotices,Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(d.useState)(Me[1]),n=k()(t,2),r=n[0],o=n[1],i=Object(d.useState)(!1),c=k()(i,2),s=c[0],a=c[1],l=Object(d.useState)(Ie),u=k()(l,2),f=u[0],g=u[1],b=Object(d.useState)(null),h=k()(b,2),y=h[0],v=h[1],O=Object(d.useState)(0),j=k()(O,2),w=j[0],_=j[1],S=Object(d.useState)(!1),E=k()(S,2),F=E[0],B=E[1],N=Object(d.useState)(""),A=k()(N,2),L=A[0],R=A[1],T=Object(d.useState)(""),D=k()(T,2),M=D[0],I=D[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return $e(e,Object(m.__)("Plan requires a name","full-site-editing")),void n(!1);var r=parseFloat(t.newPlanPrice),o=ze(t.newPlanCurrency),i=Object(m.sprintf)(Object(m.__)("Minimum allowed price is %s.","full-site-editing"),_e(o,t.newPlanCurrency));if(r<o)return $e(e,i),void n(!1);if(!Ze(t.newPlanCurrency,r))return $e(e,Object(m.__)("Plan requires a valid price","full-site-editing")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};p()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};g(f.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(m.__)("Successfully created plan","full-site-editing")),n&&n(!0)}),(function(){$e(e,Object(m.__)("There was an error when adding the plan.","full-site-editing")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(d.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(d.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,a);var H=e.isSelected,G=e.className;if(Object(d.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};p()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return _(2),void $e(e,Object.values(t.errors)[0][0]);v(t.connect_url),B(t.should_upgrade_to_access_memberships),R(t.upgrade_url),I(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(m.__)("Monthly Subscription","full-site-editing"),newPlanInterval:"1 month"},(function(){_(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(g(t.products),e.attributes.selectedPlanId||U(t.products[0])),_(t.connected_account_id?1:2))}}),(function(t){v(null),_(2),$e(e,t.message)})),e.selectBlock()}),[]),0===w)return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(m.__)("Premium Content","full-site-editing"),instructions:Object(m.__)("Loading data…","full-site-editing")},Object(d.createElement)(x.Spinner,null)));if(F)return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,Object(d.createElement)(x.Placeholder,{icon:"lock",label:Object(m.__)("Premium Content","full-site-editing"),instructions:Object(m.__)("You'll need to upgrade your plan to use the Premium Content block.","full-site-editing")},Object(d.createElement)(x.Button,{isSecondary:!0,isLarge:!0,href:L,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(m.__)("Upgrade Your Plan","full-site-editing")),Object(d.createElement)("div",{className:"membership-button__disclaimer"},Object(d.createElement)(x.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(m.__)("Read more about Premium Content and related fees.","full-site-editing")))));var V=null;if(!F&&1!==w&&y){var W=function(e,t){var n,r=e.postId;if(!Object(P.isURL)(t))return null;if(!r)return t;try{var o=Object(P.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(P.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,y);V=Object(d.createElement)(Re,C()({},e,{stripeConnectUrl:W}))}return Object(d.createElement)("div",{className:G,ref:K},e.noticeUI,(H||s)&&1===w&&Object(d.createElement)(Ae,C()({},e,{plans:f,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=_e(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(m.sprintf)(Object(m.__)("%s / month","full-site-editing"),t):"1 year"===e.interval?Object(m.sprintf)(Object(m.__)("%s / year","full-site-editing"),t):"one-time"===e.interval?t:Object(m.sprintf)(Object(m.__)("%s / %s","full-site-editing"),t,e.interval)}})),(H||s)&&1===w&&Object(d.createElement)(Le,C()({},e,{savePlan:$,siteSlug:M})),(H||s)&&Object(d.createElement)(Se,C()({},e,{tabs:Me,selectedTab:r,onSelected:o})),Object(d.createElement)(De.Provider,{value:{selectedTab:r,stripeNudge:V}},Object(d.createElement)(Pe,null)))}));var Ke="premium-content/container",He="common",Ge={name:Ke,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(m.__)("Premium Content","full-site-editing"),description:Object(m.__)("Restrict access to your content for paying subscribers.","full-site-editing"),category:He,icon:Object(d.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(d.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(d.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["premium-content",Object(m.__)("premium","full-site-editing"),Object(m.__)("paywall","full-site-editing")],edit:Ue,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-container"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},Ve={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},We=Object.keys(Ve).map((function(e){var t=b(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(j.trimEnd)(t,"."))}}));function ze(e){return Ve[e]}function Ze(e,t){return!isNaN(t)&&t>=ze(e)}var Ye=Object(S.compose)([Object(E.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length,containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(d.useEffect)((function(){e.selectBlock()}),[]),Object(d.createElement)(De.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(d.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(d.createElement)(Ee.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&Ee.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(m.__)("Insert the piece of content you want your visitors to see after they subscribe.","full-site-editing")}]]}))}))}));var Je="premium-content/subscriber-view",qe="common",Xe={name:Je,category:qe,attributes:{},title:Object(m.__)("Subscriber View","full-site-editing"),description:Object(m.__)("Subscriber View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:Ye,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},Qe=n(35),et=n.n(Qe),tt=window.getComputedStyle,nt=Object(x.withFallbackStyles)((function(e,t){var n,r,o,i,c=t.textButtonColor,s=t.backgroundButtonColor,a=s&&s.color,l=c&&c.color;return!l&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&r&&(o=tt(r).backgroundColor),n&&(i=tt(n).color),{fallbackBackgroundColor:a||o,fallbackTextColor:l||i}}));var rt=Object(S.compose)([Object(Ee.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),nt])((function(e){function t(){var t,n=e.textButtonColor,r=e.backgroundButtonColor,o=Object(j.get)(n,"class"),i=Object(j.get)(r,"class");return et()("wp-block-button__link",(t={"has-text-color":n.color},A()(t,o,o),A()(t,"has-background",r.color),A()(t,i,i),t))}Object(d.useEffect)((function(){!function(){var n=t();e.setAttributes({buttonClasses:n})}(),function(){var t=Object(j.get)(e.textButtonColor,"color"),n=Object(j.get)(e.backgroundButtonColor,"color");void 0!==t&&e.setAttributes({customTextButtonColor:t});void 0!==n&&e.setAttributes({customBackgroundButtonColor:n})}()}),[e.backgroundButtonColor,e.textButtonColor]);var n=e.attributes,r=e.setAttributes,o=e.backgroundButtonColor,i=e.textButtonColor,c=e.setBackgroundButtonColor,s=e.setTextButtonColor,a=e.fallbackBackgroundColor,l=e.fallbackTextColor,u=o.color||a,p=i.color||l,f={border:"none",backgroundColor:u,color:p},g=t();return Object(d.createElement)("div",null,Object(d.createElement)("div",{className:"wp-block-button premium-content-logged-out-view-button"},Object(d.createElement)(Ee.RichText,{placeholder:Object(m.__)("Add text…","full-site-editing"),value:n.subscribeButtonText,onChange:function(e){return r({subscribeButtonText:e})},className:g,style:f,keepPlaceholderOnFocus:!0}),Object(d.createElement)(Ee.RichText,{placeholder:Object(m.__)("Add text…","full-site-editing"),value:n.loginButtonText,onChange:function(e){return r({loginButtonText:e})},className:g,style:f,keepPlaceholderOnFocus:!0})),Object(d.createElement)(Ee.InspectorControls,null,Object(d.createElement)(Ee.PanelColorSettings,{title:Object(m.__)("Button Color Settings","full-site-editing"),colorSettings:[{value:o||void 0,onChange:c,label:Object(m.__)("Background Color","full-site-editing")},{value:i||void 0,onChange:s,label:Object(m.__)("Text Color","full-site-editing")}]}),Object(d.createElement)(Ee.ContrastChecker,{textColor:p,backgroundColor:u,fallbackBackgroundColor:a,fallbackTextColor:l})))}));var ot=Object(S.compose)([Object(E.withSelect)((function(e,t){return{containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(E.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){Object(d.useEffect)((function(){e.selectBlock()}),[]);var t=Object(d.createElement)(rt,{attributes:Object(j.pick)(e.attributes,["subscribeButtonText","loginButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"]),setAttributes:e.setAttributes});return Object(d.createElement)(De.Consumer,null,(function(e){var n=e.selectedTab,r=e.stripeNudge;return Object(d.createElement)("div",{hidden:"premium"===n.id,className:n.className},r,Object(d.createElement)(Ee.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(m.__)("Subscribe to get access","full-site-editing"),level:3}],["core/paragraph",{content:Object(m.__)("Read more of this content when you subscribe today.","full-site-editing")}]]}),t)}))}));var it=n(20),ct="premium-content/logged-out-view",st="common",at={name:ct,category:st,attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},title:Object(m.__)("Logged Out View","full-site-editing"),description:Object(m.__)("Logged Out View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:ot,save:function(){return Object(d.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(d.createElement)(Ee.InnerBlocks.Content,null))}},lt=Object(E.subscribe)((function(){var e=Object(E.select)("core/rich-text").getFormatType("core/link");if(e){lt(),Object(it.unregisterFormatType)("core/link");var t=Object(S.compose)(Object(E.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(S.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ct})))(e.edit);Object(it.registerFormatType)("core/link",l()({},e,{edit:t}))}})),ut=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(f.registerBlockType)(t,l()({category:n},r))}},pt=function(){var e=s()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p()({path:"/wpcom/v2/memberships/status"});case 3:t=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return");case 9:if(!t.should_upgrade_to_access_memberships){e.next=17;break}if(n=Object(f.getBlockType)(Ke)){e.next=14;break}return e.abrupt("return");case 14:r=Object(m._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing"),Object(f.unregisterBlockType)(Ke),Object(f.registerBlockType)(Ke,l()({},n,{title:"".concat(n.title," (").concat(r,")")}));case 17:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),ft=function(){[r,i,o].forEach(ut),pt()};ft()}]));
premium-content/index.js CHANGED
@@ -60,7 +60,7 @@ const addPaidBlockFlags = async () => {
60
  const paidFlag = _x(
61
  'paid',
62
  'Short label appearing near a block requiring a paid plan',
63
- 'premium-content'
64
  );
65
 
66
  unregisterBlockType( container.name );
60
  const paidFlag = _x(
61
  'paid',
62
  'Short label appearing near a block requiring a paid plan',
63
+ 'full-site-editing'
64
  );
65
 
66
  unregisterBlockType( container.name );
premium-content/premium-content.php CHANGED
@@ -38,8 +38,8 @@ require_once __DIR__ . '/premium-content-dom.php';
38
  * @return void
39
  */
40
  function premium_content_block_init() {
41
- $url_path = plugin_dir_url( __FILE__ );
42
- $dir = __DIR__;
43
 
44
  $script_asset_path = "$dir/dist/premium-content.asset.php";
45
  if ( ! file_exists( $script_asset_path ) ) {
@@ -93,6 +93,8 @@ function premium_content_block_init() {
93
  'render_callback' => '\A8C\FSE\Earn\PremiumContent\premium_content_block_logged_out_view_render',
94
  )
95
  );
 
 
96
  }
97
 
98
  /**
@@ -227,7 +229,7 @@ function premium_content_block_logged_out_view_render( $attributes, $content ) {
227
  premium_content_subscription_service()->access_url(),
228
  empty( $attributes['buttonClasses'] ) ? 'wp-block-button__link' : esc_attr( $attributes['buttonClasses'] ),
229
  esc_attr( $button_styles ),
230
- empty( $attributes['loginButtonText'] ) ? __( 'Log In', 'premium-content' ) : $attributes['loginButtonText']
231
  );
232
 
233
  $subscribe_button = sprintf(
@@ -235,7 +237,7 @@ function premium_content_block_logged_out_view_render( $attributes, $content ) {
235
  empty( $attributes['buttonClasses'] ) ? 'wp-block-button__link' : esc_attr( $attributes['buttonClasses'] ),
236
  empty( $attributes['customTextButtonColor'] ) ? '' : esc_attr( $attributes['customTextButtonColor'] ),
237
  empty( $attributes['customBackgroundButtonColor'] ) ? '' : esc_attr( $attributes['customBackgroundButtonColor'] ),
238
- empty( $attributes['subscribeButtonText'] ) ? __( 'Subscribe' ) : esc_attr( $attributes['subscribeButtonText'] )
239
  );
240
 
241
  return $content . "<div class='wp-block-premium-content-logged-out-view__buttons'>{$subscribe_button}{$login_button}</div>";
38
  * @return void
39
  */
40
  function premium_content_block_init() {
41
+ $url_path = rtrim( plugin_dir_url( __FILE__ ), '/' );
42
+ $dir = __DIR__;
43
 
44
  $script_asset_path = "$dir/dist/premium-content.asset.php";
45
  if ( ! file_exists( $script_asset_path ) ) {
93
  'render_callback' => '\A8C\FSE\Earn\PremiumContent\premium_content_block_logged_out_view_render',
94
  )
95
  );
96
+
97
+ wp_set_script_translations( 'premium-content-container-block-editor', 'full-site-editing' );
98
  }
99
 
100
  /**
229
  premium_content_subscription_service()->access_url(),
230
  empty( $attributes['buttonClasses'] ) ? 'wp-block-button__link' : esc_attr( $attributes['buttonClasses'] ),
231
  esc_attr( $button_styles ),
232
+ empty( $attributes['loginButtonText'] ) ? __( 'Log In', 'full-site-editing' ) : $attributes['loginButtonText']
233
  );
234
 
235
  $subscribe_button = sprintf(
237
  empty( $attributes['buttonClasses'] ) ? 'wp-block-button__link' : esc_attr( $attributes['buttonClasses'] ),
238
  empty( $attributes['customTextButtonColor'] ) ? '' : esc_attr( $attributes['customTextButtonColor'] ),
239
  empty( $attributes['customBackgroundButtonColor'] ) ? '' : esc_attr( $attributes['customBackgroundButtonColor'] ),
240
+ empty( $attributes['subscribeButtonText'] ) ? __( 'Subscribe', 'full-site-editing' ) : esc_attr( $attributes['subscribeButtonText'] )
241
  );
242
 
243
  return $content . "<div class='wp-block-premium-content-logged-out-view__buttons'>{$subscribe_button}{$login_button}</div>";
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Full Site Editing ===
2
- Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons, dmsnell, get_dave, glendaviesnz, gwwar, iamtakashi, jeryj, Joen, jonsurrell, kwight, marekhrabe, mattwiebe, mkaz, mmtr86, mppfeiffer, noahtallen, nrqsnchz, nosolosw, obenland, okenobi, owolski, themeshaper, vindl
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
- Stable tag: 1.8
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -40,6 +40,13 @@ This plugin is experimental, so we don't provide any support for it outside of w
40
 
41
  == Changelog ==
42
 
 
 
 
 
 
 
 
43
  = 1.8 =
44
  * Fix issue with Newspack blocks not loading assets.
45
  * Fix block-editor NUX issues.
1
  === Full Site Editing ===
2
+ Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons, dmsnell, get_dave, glendaviesnz, gwwar, iamtakashi, iandstewart, jeryj, Joen, jonsurrell, kwight, marekhrabe, mattwiebe, mkaz, mmtr86, mppfeiffer, noahtallen, nosolosw, nrqsnchz, obenland, okenobi, owolski, philipmjackson, vindl
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.9
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
40
 
41
  == Changelog ==
42
 
43
+ = 1.9 =
44
+ * Add Mailerlite subscriber widget.
45
+ * When launching a site created via `/new`, save the post content.
46
+ Prevent lost content alert.
47
+ * Update block pattern categories.
48
+ * Fix text-domain of translated strings.
49
+
50
  = 1.8 =
51
  * Fix issue with Newspack blocks not loading assets.
52
  * Fix block-editor NUX issues.
starter-page-templates/dist/starter-page-templates.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => 'f3128f2c18399be22906636621fb2e56');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => 'ca084a84a90b3c8b4b90de34aaa2afcb');
starter-page-templates/dist/starter-page-templates.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(3);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(29);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(30),i=n(31),o=n(32);e.exports=function(e){return function(){var t,n=r(e);if(i()){var a=r(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return o(this,t)}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var r=n(36),i=n(37),o=n(21),a=n(38);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(39),i=n(40),o=n(21),a=n(41);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){var r=n(42);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(33),i=n(4);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.nux}()},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(22);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";n.r(t);var r=n(23),i=n.n(r),o=n(0),a=n(2),s=n(15),c=n(6),l=n(24),u=n(9),p=n.n(u),m=n(10),d=n.n(m),f=n(11),b=n.n(f),g=n(4),O=n.n(g),v=n(12),h=n.n(v),y=n(13),j=n.n(y),_=n(3),w=n.n(_),T=n(1),k=n(8),P=n.n(k),E=(n(34),n(7)),S=n(5),x=n(14),B=n(16),I=(n(35),n(17)),C=n.n(I),N=n(18),A=n(25),D=function(e){var t=e.blocks,n=e.settings,r=e.hidePageTitle,i=e.recomputeBlockListKey;return Object(o.createElement)(N.BlockEditorProvider,{value:t,settings:n},Object(o.createElement)(S.Disabled,{key:i},!r&&Object(o.createElement)("div",{className:"block-iframe-preview__template-title edit-post-visual-editor__post-title-wrapper"},Object(o.createElement)(A.PostTitle,null)),Object(o.createElement)(N.BlockList,null)))},L=Object(E.compose)(E.withSafeTimeout,Object(c.withSelect)((function(e){var t=e("core/block-editor");return{settings:t?t.getSettings():{}}})))((function(e){var t=e.className,n=void 0===t?"block-iframe-preview":t,r=e.bodyClassName,i=void 0===r?"block-iframe-preview-body":r,s=e.viewportWidth,c=e.blocks,l=e.settings,u=e.setTimeout,p=void 0===u?T.noop:u,m=e.title,d=Object(o.useRef)(),f=Object(o.useRef)(),b=Object(o.useRef)(),g=Object(o.useState)({transform:"scale( 1 )"}),O=C()(g,2),v=O[0],h=O[1],y=Object(o.useMemo)((function(){return Object(T.castArray)(c)}),[c]),j=Object(o.useReducer)((function(e){return e+1}),0),_=C()(j,2),w=_[0],k=_[1];Object(o.useLayoutEffect)(k,[c]);var E=Object(o.useCallback)((function(){var e=Object(T.get)(d,["current","parentNode"]);if(e){var t=s||d.current.offsetWidth,n=e.offsetWidth/s,r=e.offsetHeight/n;h({width:t,height:r,transform:"scale( ".concat(n," )")})}}),[s]);return Object(o.useEffect)((function(){if(m){var e=Object(T.get)(b,["current","contentDocument","body"]);if(e){var t=e.querySelector(".editor-post-title .editor-post-title__input");t&&(t.value=m)}}}),[w]),Object(o.useEffect)((function(){p((function(){var e,t,n,r;e=window.document,t=b.current.contentDocument,n=["link","style"],r={head:document.createDocumentFragment(),body:document.createDocumentFragment()},Object(T.each)(Object.keys(r),(function(t){return Object(T.each)(Object(T.filter)(e[t].children,(function(e){var t=e.localName;return n.includes(t)})),(function(e){r[t].appendChild(e.cloneNode(!0))}))})),t.head.appendChild(r.head),t.body.appendChild(r.body),b.current.contentDocument.body.classList.add(i,"editor-styles-wrapper","block-editor__container"),E()}),0)}),[p,i,E]),Object(o.useEffect)((function(){var e=Object(T.get)(b,["current","contentDocument","body"]);e&&(e.scrollTop=0)}),[w]),Object(o.useEffect)((function(){var e=f&&f.current;e&&b.current.contentDocument.body.appendChild(e)}),[w]),Object(o.useEffect)((function(){var e=Object(T.debounce)(E,300);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[E]),Object(o.useEffect)((function(){return window.jQuery&&window.jQuery(window.document).on("wp-collapse-menu",E),function(){window.jQuery&&window.jQuery(window.document).off("wp-collapse-menu",E)}}),[E]),Object(o.createElement)("div",{ref:d},Object(o.createElement)("iframe",{ref:b,title:Object(a.__)("Preview"),className:P()("editor-styles-wrapper",n),style:v}),Object(o.createElement)("div",{ref:f,className:"block-editor"},Object(o.createElement)("div",{className:"edit-post-visual-editor"},Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"editor-writing-flow"},Object(o.createElement)(D,{blocks:y,settings:l,hidePageTitle:!m,recomputeBlockListKey:w}))))))})),M=function(e){var t=e.id,n=e.value,r=e.onSelect,i=e.label,a=e.useDynamicPreview,s=void 0!==a&&a,c=e.staticPreviewImg,l=e.staticPreviewImgAlt,u=void 0===l?"":l,p=e.blocks,m=void 0===p?[]:p,d=e.isSelected;if(Object(T.isNil)(t)||Object(T.isNil)(i)||Object(T.isNil)(n))return null;if(s&&(Object(T.isNil)(m)||Object(T.isEmpty)(m)))return null;var f=s?Object(o.createElement)(S.Disabled,null,Object(o.createElement)(L,{blocks:m,viewportWidth:960})):Object(o.createElement)("img",{className:"template-selector-item__media",src:c,alt:u}),b="label-".concat(t,"-").concat(n);return Object(o.createElement)("button",{type:"button",className:P()("template-selector-item__label",{"is-selected":d}),value:n,onClick:function(){r(n)},"aria-labelledby":"".concat(t," ").concat(b)},Object(o.createElement)("span",{className:"template-selector-item__preview-wrap"},f))},F={Address:Object(a._x)("123 Main St","default address","full-site-editing"),Phone:Object(a._x)("555-555-5555","default phone number","full-site-editing"),CompanyName:Object(a._x)("Your Company Name","default company name","full-site-editing"),Vertical:Object(a._x)("Business","default vertical name","full-site-editing")},W={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=F[n];return t[W[n]]||r||n})):""},G=Object(E.compose)(o.memo,E.withInstanceId)((function(e){var t=e.label,n=e.className,r=e.help,i=e.instanceId,a=e.templates,s=void 0===a?[]:a,c=e.blocksByTemplates,l=void 0===c?{}:c,u=e.useDynamicPreview,p=void 0!==u&&u,m=e.onTemplateSelect,d=void 0===m?T.noop:m,f=e.siteInformation,b=void 0===f?{}:f,g=e.selectedTemplate;if(Object(T.isEmpty)(s)||!Object(T.isArray)(s))return null;if(!0===p&&Object(T.isEmpty)(l))return null;var O="template-selector-control-".concat(i);return Object(o.createElement)(S.BaseControl,{label:t,id:O,help:r,className:P()(n,"template-selector-control")},Object(o.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options"},Object(T.map)(s,(function(e){var t=e.slug,n=e.title,i=e.preview,a=e.previewAlt;return Object(o.createElement)("li",{key:"".concat(O,"-").concat(t),className:"template-selector-control__template"},Object(o.createElement)(M,{id:O,value:t,label:R(n,b),help:r,onSelect:d,staticPreviewImg:i,staticPreviewImgAlt:a,blocks:l.hasOwnProperty(t)?l[t]:[],useDynamicPreview:p,isSelected:t===g}))}))))})),q=function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.viewportWidth,i=e.title,s=!n.length;return Object(o.createElement)("div",{className:"template-selector-preview ".concat(s?"not-selected":"")},s&&Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"template-selector-preview__empty-state"},Object(a.__)("Select a layout to preview.","full-site-editing"))),Object(o.createElement)(L,{blocks:n,viewportWidth:r,title:i}))};window._tkq=window._tkq||[];var U=null,z=function(e,t){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:U.blogid,segment_id:e,vertical_id:t}])},V=function(e,t,n){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:U.blogid,segment_id:e,vertical_id:t,template:n}])},Q=n(19),H=n.n(Q),K=n(20),Y=n.n(K),$=n(26),J=n.n($),X=n(27),Z=function(e,t,n){var r=e[t=Object(X.removeQueryArgs)(t,"w","s")]||{url:t,usages:[]};return p()({},e,w()({},t,p()({},r,{usages:[].concat(Y()(r.usages),Y()(n))})))},ee=function e(t,n){switch(t.blocksByClientId[n.clientId]=n,n.name){case"core/cover":case"core/image":var r=n.attributes.url;r&&(t.assets=Z(t.assets,r,[{prop:"url",path:[n.clientId,"attributes","url"]},{prop:"id",path:[n.clientId,"attributes","id"]}]));case"core/media-text":var i=n.attributes.mediaUrl;i&&"image"===n.attributes.mediaType&&(t.assets=Z(t.assets,i,[{prop:"url",path:[n.clientId,"attributes","mediaUrl"]},{prop:"id",path:[n.clientId,"attributes","mediaId"]}]));case"core/gallery":Object(T.forEach)(n.attributes.images,(function(e,r){t.assets=Z(t.assets,e.url,[{prop:"url",path:[n.clientId,"attributes","images",r,"url"]},{prop:"url",path:[n.clientId,"attributes","images",r,"link"]},{prop:"id",path:[n.clientId,"attributes","images",r,"id"]},{prop:"id",path:[n.clientId,"attributes","ids",r]}])}))}return Object(T.isEmpty)(n.innerBlocks)?t:Object(T.reduce)(n.innerBlocks,e,t)},te=function(){var e=H()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J()({method:"POST",path:"/fse/v1/sideload/image/batch",data:{resources:Object(T.map)(t)}}).then((function(e){return Object(T.reduce)(t,(function(t,n){var r=e.shift(),i=r.id,o=r.source_url;return p()({},t,w()({},n.url,{id:i,url:o}))}),{})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(e,t){return Object(T.forEach)(e.assets,(function(n){var r=t[n.url];r&&Object(T.forEach)(n.usages,(function(t){Object(T.set)(e.blocksByClientId,t.path,r[t.prop])}))})),e.blocks},re=function(){var e=H()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(T.reduce)(t,ee,{assets:{},blocksByClientId:{},blocks:t}),!Object(T.isEmpty)(n.assets)){e.next=3;break}return e.abrupt("return",t);case 3:return e.abrupt("return",te(n.assets).then((function(e){return ne(n,e)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var ie=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.identity;return t.map((function(t){return(t=n(Object(x.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))};var oe=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))},ae=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isLoading:!1,previewedTemplate:null,error:null}),w()(O()(e),"getTitlesByTemplateSlugs",Object(T.memoize)((function(e){return Object(T.mapValues)(Object(T.keyBy)(e,"slug"),"title")}))),w()(O()(e),"getBlocksByTemplateSlugs",Object(T.memoize)((function(t){var n=Object(T.reduce)(t,(function(t,n){var r=n.slug,i=n.content;return t[r]=i?Object(x.parse)(R(i,e.props.siteInformation)):[],t}),{});return e.filterTemplatesWithMissingBlocks(n)}))),w()(O()(e),"getBlocksForPreview",Object(T.memoize)((function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"jetpack/contact-form"===e.name&&void 0!==e.attributes.hasFormSettingsSet&&(e.attributes.hasFormSettingsSet=!0),e}))}))),w()(O()(e),"getBlocksForSelection",(function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),w()(O()(e),"setTemplate",(function(t){if(V(e.props.segment.id,e.props.vertical.id,t),e.props.saveTemplateChoice(t),"blank"===t)return e.props.insertTemplate("",[]),void e.props.setIsOpen(!1);var n=Object(T.find)(e.props.templates,{slug:t,category:"home"}),r=e.getBlocksForSelection(t),i=n?null:e.getTitleByTemplateSlug(t);r&&r.length?(e.setState({error:null,isLoading:!0}),e.maybePrefetchAssets(r).then((function(t){e.setState({isLoading:!1}),e.props.isOpen&&(e.props.insertTemplate(i,t),e.props.setIsOpen(!1))})).catch((function(t){e.setState({isLoading:!1,error:t})}))):e.props.setIsOpen(!1)})),w()(O()(e),"maybePrefetchAssets",(function(t){return e.props.shouldPrefetchAssets?re(t):Promise.resolve(t)})),w()(O()(e),"handleConfirmation",(function(t){"string"!=typeof t&&(t=e.state.previewedTemplate),e.setTemplate(t),e.props.isPromptedFromSidebar&&e.props.toggleTemplateModal()})),w()(O()(e),"previewTemplate",(function(t){e.setState({previewedTemplate:t}),window.matchMedia("(min-width: 660px)").matches||e.handleConfirmation(t)})),w()(O()(e),"closeModal",(function(t){if(t.target.matches("button.template-selector-item__label"))return!1;z(e.props.segment.id,e.props.vertical.id);var n=Object(T.get)(window,["calypsoifyGutenberg","closeUrl"]);window.top.location=n||"edit.php?post_type=page"})),w()(O()(e),"getTemplateGroups",(function(){return{blankTemplate:Object(T.filter)(e.props.templates,{slug:"blank"}),aboutTemplates:Object(T.filter)(e.props.templates,{category:"about"}),blogTemplates:Object(T.filter)(e.props.templates,{category:"blog"}),contactTemplates:Object(T.filter)(e.props.templates,{category:"contact"}),eventTemplates:Object(T.filter)(e.props.templates,{category:"event"}),menuTemplates:Object(T.filter)(e.props.templates,{category:"menu"}),portfolioTemplates:Object(T.filter)(e.props.templates,{category:"portfolio"}),productTemplates:Object(T.filter)(e.props.templates,{category:"product"}),servicesTemplates:Object(T.filter)(e.props.templates,{category:"services"}),teamTemplates:Object(T.filter)(e.props.templates,{category:"team"}),homepageTemplates:Object(T.sortBy)(Object(T.filter)(e.props.templates,{category:"home"}),"title")}})),w()(O()(e),"renderTemplatesList",(function(t,n){if(!t.length)return null;var r,i=e.getBlocksByTemplateSlugs(e.props.templates),s=Object.keys(i),c=(r=s,t.filter((function(e){return r.includes(e.slug)})));return c.length?Object(o.createElement)("fieldset",{className:"page-template-modal__list"},Object(o.createElement)("legend",{className:"page-template-modal__form-title"},n),Object(o.createElement)(G,{label:Object(a.__)("Layout","full-site-editing"),templates:c,blocksByTemplates:i,onTemplateSelect:e.previewTemplate,useDynamicPreview:!1,siteInformation:e.props.siteInformation,selectedTemplate:e.state.previewedTemplate})):null})),e}return b()(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object(T.reduce)(e,(function(e,t,n){return oe(t)&&t.length||(e[n]=t),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){var e,t,n;e=this.props.segment.id,t=this.props.vertical.id,n=this.props.isPromptedFromSidebar?"sidebar":"add-page",U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:U.blogid,segment_id:e,vertical_id:t,source:n}])}},{key:"getBlocksByTemplateSlug",value:function(e){return Object(T.get)(this.getBlocksByTemplateSlugs(this.props.templates),[e],[])}},{key:"getTitleByTemplateSlug",value:function(e){return Object(T.get)(this.getTitlesByTemplateSlugs(this.props.templates),[e],"")}},{key:"render",value:function(){var e=this.state,t=e.previewedTemplate,n=e.isLoading,r=this.props,i=r.isPromptedFromSidebar,s=r.hidePageTitle;if(!r.isOpen)return null;var c=this.getTemplateGroups(),l=c.blankTemplate,u=c.aboutTemplates,p=c.blogTemplates,m=c.contactTemplates,d=c.eventTemplates,f=c.menuTemplates,b=c.portfolioTemplates,g=c.productTemplates,O=c.servicesTemplates,v=c.teamTemplates,h=c.homepageTemplates;return Object(o.createElement)(S.Modal,{title:Object(a.__)("Select Page Layout","full-site-editing"),className:"page-template-modal",overlayClassName:"page-template-modal-screen-overlay",shouldCloseOnClickOutside:!1,isDismissable:!1,isDismissible:!1},i?Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.props.toggleTemplateModal,icon:"no-alt",label:Object(a.__)("Close Layout Selector")}):Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.closeModal,icon:"arrow-left-alt2",label:Object(a.__)("Go back")}),Object(o.createElement)("div",{className:"page-template-modal__inner"},n?Object(o.createElement)("div",{className:"page-template-modal__loading"},Object(o.createElement)(S.Spinner,null),Object(a.__)("Adding layout…","full-site-editing")):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("form",{className:"page-template-modal__form"},this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing")),this.renderTemplatesList(l,Object(a.__)("Blank","full-site-editing")),this.renderTemplatesList(u,Object(a.__)("About Pages","full-site-editing")),this.renderTemplatesList(p,Object(a.__)("Blog Pages","full-site-editing")),this.renderTemplatesList(m,Object(a.__)("Contact Pages","full-site-editing")),this.renderTemplatesList(d,Object(a.__)("Event Pages","full-site-editing")),this.renderTemplatesList(f,Object(a.__)("Menu Pages","full-site-editing")),this.renderTemplatesList(b,Object(a.__)("Portfolio Pages","full-site-editing")),this.renderTemplatesList(g,Object(a.__)("Product Pages","full-site-editing")),this.renderTemplatesList(O,Object(a.__)("Services Pages","full-site-editing")),this.renderTemplatesList(v,Object(a.__)("Team Pages","full-site-editing")),!this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing"))),Object(o.createElement)(q,{blocks:this.getBlocksForPreview(t),viewportWidth:1200,title:!s&&this.getTitleByTemplateSlug(t)}))),Object(o.createElement)("div",{className:P()("page-template-modal__buttons",{"is-visually-hidden":Object(T.isEmpty)(t)||n})},Object(o.createElement)(S.Button,{isPrimary:!0,isLarge:!0,disabled:Object(T.isEmpty)(t)||n,onClick:this.handleConfirmation},Object(a.sprintf)(Object(a.__)("Use %s layout","full-site-editing"),this.getTitleByTemplateSlug(t)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.previewedTemplate||Object(T.isEmpty)(e.templates)?null:{previewedTemplate:n.getDefaultSelectedTemplate(e)}}}]),n}(o.Component);w()(ae,"getDefaultSelectedTemplate",(function(e){var t=Object(T.get)(e.templates,[0,"slug"]),n=e._starter_page_template;if(!e.isFrontPage&&!n)return t;"home"===n&&(n=e.theme);var r=n||e.theme;return Object(T.find)(e.templates,{slug:r})?r:Object(T.find)(e.templates,{slug:"maywood"})?"maywood":t}));var se=Object(E.compose)(Object(c.withSelect)((function(e){var t=function(){return e("core/editor").getEditedPostAttribute("meta")},n=t()._starter_page_template;return{isOpen:e("automattic/starter-page-layouts").isOpen(),getMeta:t,_starter_page_template:n,postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name})),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),Object(c.withDispatch)((function(e,t){var n=e("core/editor");return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen,saveTemplateChoice:function(e){var r=t.getMeta();n.editPost({meta:p()({},r,{_starter_page_template:e})})},insertTemplate:function(r,i){Object(B.addFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template",T.stubTrue),r&&n.editPost({title:r});var o=t.postContentBlock;e("core/block-editor").replaceInnerBlocks(o?o.clientId:"",i,!1),Object(B.removeFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template")},hideWelcomeGuide:function(){t.isWelcomeGuideActive?e("core/edit-post").toggleFeature("welcomeGuide"):t.areTipsEnabled&&e("core/nux").disableTips()}}})))(ae),ce=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isWarningOpen:!1}),w()(O()(e),"toggleTemplateModal",(function(){e.props.setIsOpen(!e.props.isOpen)})),w()(O()(e),"toggleWarningModal",(function(){e.setState({isWarningOpen:!e.state.isWarningOpen})})),e}return b()(n,[{key:"render",value:function(){var e=this.props,t=e.templates,n=e.theme,r=e.vertical,i=e.segment,s=e.hidePageTitle,c=e.isFrontPage,l=e.isOpen;return Object(o.createElement)("div",{className:"sidebar-modal-opener"},Object(o.createElement)(S.Button,{isSecondary:!0,onClick:this.toggleWarningModal},Object(a.__)("Change Layout")),l&&Object(o.createElement)(se,{shouldPrefetchAssets:!1,templates:t,theme:n,vertical:r,segment:i,toggleTemplateModal:this.toggleTemplateModal,hidePageTitle:s,isFrontPage:c,isPromptedFromSidebar:!0}),this.state.isWarningOpen&&Object(o.createElement)(S.Modal,{title:Object(a.__)("Overwrite Page Content?"),isDismissible:!1,onRequestClose:this.toggleWarningModal,className:"sidebar-modal-opener__warning-modal"},Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-text"},Object(a.__)("Changing the page's layout will remove any customizations or edits you have already made.")),Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-options"},Object(o.createElement)(S.Button,{isDefault:!0,onClick:this.toggleWarningModal},Object(a.__)("Cancel")),Object(o.createElement)(S.Button,{isPrimary:!0,onClick:this.toggleTemplateModal},Object(a.__)("Change Layout")))))}}]),n}(o.Component),le=Object(E.compose)(Object(c.withSelect)((function(e){return{isOpen:e("automattic/starter-page-layouts").isOpen()}})),Object(c.withDispatch)((function(e){return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen}})))(ce),ue=n(28),pe=n.n(ue);Object(c.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=pe()(t,["type"]);return"SET_IS_OPEN"===n?p()({},e,{isOpen:r.isOpen}):e},actions:{setIsOpen:function(e){return{type:"SET_IS_OPEN",isOpen:e}}},selectors:{isOpen:function(e){return e.isOpen}}});var me,de=window.starterPageTemplatesConfig,fe=de.templates,be=void 0===fe?[]:fe,ge=de.vertical,Oe=de.segment,ve=de.tracksUserData,he=de.screenAction,ye=de.theme,je=de.isFrontPage,_e=de.hideFrontPageTitle;ve&&(U=me=ve,window._tkq.push(["identifyUser",me.userid,me.username]));var we={segment:Oe,templates:be,theme:ye,vertical:ge,isFrontPage:je,hidePageTitle:Boolean(je&&_e)};"add"===he&&(Object(c.dispatch)("automattic/starter-page-layouts").setIsOpen(!0),Object(s.registerPlugin)("page-templates",{render:function(){return Object(o.createElement)(se,i()({},we,{shouldPrefetchAssets:!1}))}})),Object(s.registerPlugin)("page-templates-sidebar",{render:function(){return Object(o.createElement)(l.PluginDocumentSettingPanel,{name:"Template Modal Opener",title:Object(a.__)("Page Layout"),className:"page-template-modal__sidebar",icon:"none"},Object(o.createElement)(le,we))}});var Te=Object(c.subscribe)((function(){Object(c.select)("core/edit-post").isEditorPanelOpened("page-templates-sidebar/Template Modal Opener")||Object(c.dispatch)("core/edit-post").toggleEditorPanelOpened("page-templates-sidebar/Template Modal Opener"),Te()}))}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(3);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(29);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(30),i=n(31),o=n(32);e.exports=function(e){return function(){var t,n=r(e);if(i()){var a=r(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return o(this,t)}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var r=n(36),i=n(37),o=n(21),a=n(38);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(39),i=n(40),o=n(21),a=n(41);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){var r=n(42);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(33),i=n(4);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.nux}()},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(22);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";n.r(t);var r=n(23),i=n.n(r),o=n(0),a=n(2),s=n(15),c=n(6),l=n(24),u=n(9),p=n.n(u),m=n(10),d=n.n(m),f=n(11),b=n.n(f),g=n(4),O=n.n(g),v=n(12),h=n.n(v),y=n(13),j=n.n(y),_=n(3),w=n.n(_),T=n(1),k=n(8),P=n.n(k),E=(n(34),n(7)),S=n(5),x=n(14),B=n(16),I=(n(35),n(17)),C=n.n(I),N=n(18),A=n(25),D=function(e){var t=e.blocks,n=e.settings,r=e.hidePageTitle,i=e.recomputeBlockListKey;return Object(o.createElement)(N.BlockEditorProvider,{value:t,settings:n},Object(o.createElement)(S.Disabled,{key:i},!r&&Object(o.createElement)("div",{className:"block-iframe-preview__template-title edit-post-visual-editor__post-title-wrapper"},Object(o.createElement)(A.PostTitle,null)),Object(o.createElement)(N.BlockList,null)))},L=Object(E.compose)(E.withSafeTimeout,Object(c.withSelect)((function(e){var t=e("core/block-editor");return{settings:t?t.getSettings():{}}})))((function(e){var t=e.className,n=void 0===t?"block-iframe-preview":t,r=e.bodyClassName,i=void 0===r?"block-iframe-preview-body":r,s=e.viewportWidth,c=e.blocks,l=e.settings,u=e.setTimeout,p=void 0===u?T.noop:u,m=e.title,d=Object(o.useRef)(),f=Object(o.useRef)(),b=Object(o.useRef)(),g=Object(o.useState)({transform:"scale( 1 )"}),O=C()(g,2),v=O[0],h=O[1],y=Object(o.useMemo)((function(){return Object(T.castArray)(c)}),[c]),j=Object(o.useReducer)((function(e){return e+1}),0),_=C()(j,2),w=_[0],k=_[1];Object(o.useLayoutEffect)(k,[c]);var E=Object(o.useCallback)((function(){var e=Object(T.get)(d,["current","parentNode"]);if(e){var t=s||d.current.offsetWidth,n=e.offsetWidth/s,r=e.offsetHeight/n;h({width:t,height:r,transform:"scale( ".concat(n," )")})}}),[s]);return Object(o.useEffect)((function(){if(m){var e=Object(T.get)(b,["current","contentDocument","body"]);if(e){var t=e.querySelector(".editor-post-title .editor-post-title__input");t&&(t.value=m)}}}),[w]),Object(o.useEffect)((function(){p((function(){var e,t,n,r;e=window.document,t=b.current.contentDocument,n=["link","style"],r={head:document.createDocumentFragment(),body:document.createDocumentFragment()},Object(T.each)(Object.keys(r),(function(t){return Object(T.each)(Object(T.filter)(e[t].children,(function(e){var t=e.localName;return n.includes(t)})),(function(e){r[t].appendChild(e.cloneNode(!0))}))})),t.head.appendChild(r.head),t.body.appendChild(r.body),b.current.contentDocument.body.classList.add(i,"editor-styles-wrapper","block-editor__container"),E()}),0)}),[p,i,E]),Object(o.useEffect)((function(){var e=Object(T.get)(b,["current","contentDocument","body"]);e&&(e.scrollTop=0)}),[w]),Object(o.useEffect)((function(){var e=f&&f.current;e&&b.current.contentDocument.body.appendChild(e)}),[w]),Object(o.useEffect)((function(){var e=Object(T.debounce)(E,300);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[E]),Object(o.useEffect)((function(){return window.jQuery&&window.jQuery(window.document).on("wp-collapse-menu",E),function(){window.jQuery&&window.jQuery(window.document).off("wp-collapse-menu",E)}}),[E]),Object(o.createElement)("div",{ref:d},Object(o.createElement)("iframe",{ref:b,title:Object(a.__)("Preview","full-site-editing"),className:P()("editor-styles-wrapper",n),style:v}),Object(o.createElement)("div",{ref:f,className:"block-editor"},Object(o.createElement)("div",{className:"edit-post-visual-editor"},Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"editor-writing-flow"},Object(o.createElement)(D,{blocks:y,settings:l,hidePageTitle:!m,recomputeBlockListKey:w}))))))})),M=function(e){var t=e.id,n=e.value,r=e.onSelect,i=e.label,a=e.useDynamicPreview,s=void 0!==a&&a,c=e.staticPreviewImg,l=e.staticPreviewImgAlt,u=void 0===l?"":l,p=e.blocks,m=void 0===p?[]:p,d=e.isSelected;if(Object(T.isNil)(t)||Object(T.isNil)(i)||Object(T.isNil)(n))return null;if(s&&(Object(T.isNil)(m)||Object(T.isEmpty)(m)))return null;var f=s?Object(o.createElement)(S.Disabled,null,Object(o.createElement)(L,{blocks:m,viewportWidth:960})):Object(o.createElement)("img",{className:"template-selector-item__media",src:c,alt:u}),b="label-".concat(t,"-").concat(n);return Object(o.createElement)("button",{type:"button",className:P()("template-selector-item__label",{"is-selected":d}),value:n,onClick:function(){r(n)},"aria-labelledby":"".concat(t," ").concat(b)},Object(o.createElement)("span",{className:"template-selector-item__preview-wrap"},f))},F={Address:Object(a._x)("123 Main St","default address","full-site-editing"),Phone:Object(a._x)("555-555-5555","default phone number","full-site-editing"),CompanyName:Object(a._x)("Your Company Name","default company name","full-site-editing"),Vertical:Object(a._x)("Business","default vertical name","full-site-editing")},W={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=F[n];return t[W[n]]||r||n})):""},G=Object(E.compose)(o.memo,E.withInstanceId)((function(e){var t=e.label,n=e.className,r=e.help,i=e.instanceId,a=e.templates,s=void 0===a?[]:a,c=e.blocksByTemplates,l=void 0===c?{}:c,u=e.useDynamicPreview,p=void 0!==u&&u,m=e.onTemplateSelect,d=void 0===m?T.noop:m,f=e.siteInformation,b=void 0===f?{}:f,g=e.selectedTemplate;if(Object(T.isEmpty)(s)||!Object(T.isArray)(s))return null;if(!0===p&&Object(T.isEmpty)(l))return null;var O="template-selector-control-".concat(i);return Object(o.createElement)(S.BaseControl,{label:t,id:O,help:r,className:P()(n,"template-selector-control")},Object(o.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options"},Object(T.map)(s,(function(e){var t=e.slug,n=e.title,i=e.preview,a=e.previewAlt;return Object(o.createElement)("li",{key:"".concat(O,"-").concat(t),className:"template-selector-control__template"},Object(o.createElement)(M,{id:O,value:t,label:R(n,b),help:r,onSelect:d,staticPreviewImg:i,staticPreviewImgAlt:a,blocks:l.hasOwnProperty(t)?l[t]:[],useDynamicPreview:p,isSelected:t===g}))}))))})),q=function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.viewportWidth,i=e.title,s=!n.length;return Object(o.createElement)("div",{className:"template-selector-preview ".concat(s?"not-selected":"")},s&&Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"template-selector-preview__empty-state"},Object(a.__)("Select a layout to preview.","full-site-editing"))),Object(o.createElement)(L,{blocks:n,viewportWidth:r,title:i}))};window._tkq=window._tkq||[];var U=null,z=function(e,t){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:U.blogid,segment_id:e,vertical_id:t}])},V=function(e,t,n){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:U.blogid,segment_id:e,vertical_id:t,template:n}])},Q=n(19),H=n.n(Q),K=n(20),Y=n.n(K),$=n(26),J=n.n($),X=n(27),Z=function(e,t,n){var r=e[t=Object(X.removeQueryArgs)(t,"w","s")]||{url:t,usages:[]};return p()({},e,w()({},t,p()({},r,{usages:[].concat(Y()(r.usages),Y()(n))})))},ee=function e(t,n){switch(t.blocksByClientId[n.clientId]=n,n.name){case"core/cover":case"core/image":var r=n.attributes.url;r&&(t.assets=Z(t.assets,r,[{prop:"url",path:[n.clientId,"attributes","url"]},{prop:"id",path:[n.clientId,"attributes","id"]}]));case"core/media-text":var i=n.attributes.mediaUrl;i&&"image"===n.attributes.mediaType&&(t.assets=Z(t.assets,i,[{prop:"url",path:[n.clientId,"attributes","mediaUrl"]},{prop:"id",path:[n.clientId,"attributes","mediaId"]}]));case"core/gallery":Object(T.forEach)(n.attributes.images,(function(e,r){t.assets=Z(t.assets,e.url,[{prop:"url",path:[n.clientId,"attributes","images",r,"url"]},{prop:"url",path:[n.clientId,"attributes","images",r,"link"]},{prop:"id",path:[n.clientId,"attributes","images",r,"id"]},{prop:"id",path:[n.clientId,"attributes","ids",r]}])}))}return Object(T.isEmpty)(n.innerBlocks)?t:Object(T.reduce)(n.innerBlocks,e,t)},te=function(){var e=H()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J()({method:"POST",path:"/fse/v1/sideload/image/batch",data:{resources:Object(T.map)(t)}}).then((function(e){return Object(T.reduce)(t,(function(t,n){var r=e.shift(),i=r.id,o=r.source_url;return p()({},t,w()({},n.url,{id:i,url:o}))}),{})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(e,t){return Object(T.forEach)(e.assets,(function(n){var r=t[n.url];r&&Object(T.forEach)(n.usages,(function(t){Object(T.set)(e.blocksByClientId,t.path,r[t.prop])}))})),e.blocks},re=function(){var e=H()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(T.reduce)(t,ee,{assets:{},blocksByClientId:{},blocks:t}),!Object(T.isEmpty)(n.assets)){e.next=3;break}return e.abrupt("return",t);case 3:return e.abrupt("return",te(n.assets).then((function(e){return ne(n,e)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var ie=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.identity;return t.map((function(t){return(t=n(Object(x.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))};var oe=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))},ae=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isLoading:!1,previewedTemplate:null,error:null}),w()(O()(e),"getTitlesByTemplateSlugs",Object(T.memoize)((function(e){return Object(T.mapValues)(Object(T.keyBy)(e,"slug"),"title")}))),w()(O()(e),"getBlocksByTemplateSlugs",Object(T.memoize)((function(t){var n=Object(T.reduce)(t,(function(t,n){var r=n.slug,i=n.content;return t[r]=i?Object(x.parse)(R(i,e.props.siteInformation)):[],t}),{});return e.filterTemplatesWithMissingBlocks(n)}))),w()(O()(e),"getBlocksForPreview",Object(T.memoize)((function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"jetpack/contact-form"===e.name&&void 0!==e.attributes.hasFormSettingsSet&&(e.attributes.hasFormSettingsSet=!0),e}))}))),w()(O()(e),"getBlocksForSelection",(function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),w()(O()(e),"setTemplate",(function(t){if(V(e.props.segment.id,e.props.vertical.id,t),e.props.saveTemplateChoice(t),"blank"===t)return e.props.insertTemplate("",[]),void e.props.setIsOpen(!1);var n=Object(T.find)(e.props.templates,{slug:t,category:"home"}),r=e.getBlocksForSelection(t),i=n?null:e.getTitleByTemplateSlug(t);r&&r.length?(e.setState({error:null,isLoading:!0}),e.maybePrefetchAssets(r).then((function(t){e.setState({isLoading:!1}),e.props.isOpen&&(e.props.insertTemplate(i,t),e.props.setIsOpen(!1))})).catch((function(t){e.setState({isLoading:!1,error:t})}))):e.props.setIsOpen(!1)})),w()(O()(e),"maybePrefetchAssets",(function(t){return e.props.shouldPrefetchAssets?re(t):Promise.resolve(t)})),w()(O()(e),"handleConfirmation",(function(t){"string"!=typeof t&&(t=e.state.previewedTemplate),e.setTemplate(t),e.props.isPromptedFromSidebar&&e.props.toggleTemplateModal()})),w()(O()(e),"previewTemplate",(function(t){e.setState({previewedTemplate:t}),window.matchMedia("(min-width: 660px)").matches||e.handleConfirmation(t)})),w()(O()(e),"closeModal",(function(t){if(t.target.matches("button.template-selector-item__label"))return!1;z(e.props.segment.id,e.props.vertical.id);var n=Object(T.get)(window,["calypsoifyGutenberg","closeUrl"]);window.top.location=n||"edit.php?post_type=page"})),w()(O()(e),"getTemplateGroups",(function(){return{blankTemplate:Object(T.filter)(e.props.templates,{slug:"blank"}),aboutTemplates:Object(T.filter)(e.props.templates,{category:"about"}),blogTemplates:Object(T.filter)(e.props.templates,{category:"blog"}),contactTemplates:Object(T.filter)(e.props.templates,{category:"contact"}),eventTemplates:Object(T.filter)(e.props.templates,{category:"event"}),menuTemplates:Object(T.filter)(e.props.templates,{category:"menu"}),portfolioTemplates:Object(T.filter)(e.props.templates,{category:"portfolio"}),productTemplates:Object(T.filter)(e.props.templates,{category:"product"}),servicesTemplates:Object(T.filter)(e.props.templates,{category:"services"}),teamTemplates:Object(T.filter)(e.props.templates,{category:"team"}),homepageTemplates:Object(T.sortBy)(Object(T.filter)(e.props.templates,{category:"home"}),"title")}})),w()(O()(e),"renderTemplatesList",(function(t,n){if(!t.length)return null;var r,i=e.getBlocksByTemplateSlugs(e.props.templates),s=Object.keys(i),c=(r=s,t.filter((function(e){return r.includes(e.slug)})));return c.length?Object(o.createElement)("fieldset",{className:"page-template-modal__list"},Object(o.createElement)("legend",{className:"page-template-modal__form-title"},n),Object(o.createElement)(G,{label:Object(a.__)("Layout","full-site-editing"),templates:c,blocksByTemplates:i,onTemplateSelect:e.previewTemplate,useDynamicPreview:!1,siteInformation:e.props.siteInformation,selectedTemplate:e.state.previewedTemplate})):null})),e}return b()(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object(T.reduce)(e,(function(e,t,n){return oe(t)&&t.length||(e[n]=t),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){var e,t,n;e=this.props.segment.id,t=this.props.vertical.id,n=this.props.isPromptedFromSidebar?"sidebar":"add-page",U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:U.blogid,segment_id:e,vertical_id:t,source:n}])}},{key:"getBlocksByTemplateSlug",value:function(e){return Object(T.get)(this.getBlocksByTemplateSlugs(this.props.templates),[e],[])}},{key:"getTitleByTemplateSlug",value:function(e){return Object(T.get)(this.getTitlesByTemplateSlugs(this.props.templates),[e],"")}},{key:"render",value:function(){var e=this.state,t=e.previewedTemplate,n=e.isLoading,r=this.props,i=r.isPromptedFromSidebar,s=r.hidePageTitle;if(!r.isOpen)return null;var c=this.getTemplateGroups(),l=c.blankTemplate,u=c.aboutTemplates,p=c.blogTemplates,m=c.contactTemplates,d=c.eventTemplates,f=c.menuTemplates,b=c.portfolioTemplates,g=c.productTemplates,O=c.servicesTemplates,v=c.teamTemplates,h=c.homepageTemplates;return Object(o.createElement)(S.Modal,{title:Object(a.__)("Select Page Layout","full-site-editing"),className:"page-template-modal",overlayClassName:"page-template-modal-screen-overlay",shouldCloseOnClickOutside:!1,isDismissable:!1,isDismissible:!1},i?Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.props.toggleTemplateModal,icon:"no-alt",label:Object(a.__)("Close Layout Selector","full-site-editing")}):Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.closeModal,icon:"arrow-left-alt2",label:Object(a.__)("Go back","full-site-editing")}),Object(o.createElement)("div",{className:"page-template-modal__inner"},n?Object(o.createElement)("div",{className:"page-template-modal__loading"},Object(o.createElement)(S.Spinner,null),Object(a.__)("Adding layout…","full-site-editing")):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("form",{className:"page-template-modal__form"},this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing")),this.renderTemplatesList(l,Object(a.__)("Blank","full-site-editing")),this.renderTemplatesList(u,Object(a.__)("About Pages","full-site-editing")),this.renderTemplatesList(p,Object(a.__)("Blog Pages","full-site-editing")),this.renderTemplatesList(m,Object(a.__)("Contact Pages","full-site-editing")),this.renderTemplatesList(d,Object(a.__)("Event Pages","full-site-editing")),this.renderTemplatesList(f,Object(a.__)("Menu Pages","full-site-editing")),this.renderTemplatesList(b,Object(a.__)("Portfolio Pages","full-site-editing")),this.renderTemplatesList(g,Object(a.__)("Product Pages","full-site-editing")),this.renderTemplatesList(O,Object(a.__)("Services Pages","full-site-editing")),this.renderTemplatesList(v,Object(a.__)("Team Pages","full-site-editing")),!this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing"))),Object(o.createElement)(q,{blocks:this.getBlocksForPreview(t),viewportWidth:1200,title:!s&&this.getTitleByTemplateSlug(t)}))),Object(o.createElement)("div",{className:P()("page-template-modal__buttons",{"is-visually-hidden":Object(T.isEmpty)(t)||n})},Object(o.createElement)(S.Button,{isPrimary:!0,isLarge:!0,disabled:Object(T.isEmpty)(t)||n,onClick:this.handleConfirmation},Object(a.sprintf)(Object(a.__)("Use %s layout","full-site-editing"),this.getTitleByTemplateSlug(t)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.previewedTemplate||Object(T.isEmpty)(e.templates)?null:{previewedTemplate:n.getDefaultSelectedTemplate(e)}}}]),n}(o.Component);w()(ae,"getDefaultSelectedTemplate",(function(e){var t=Object(T.get)(e.templates,[0,"slug"]),n=e._starter_page_template;if(!e.isFrontPage&&!n)return t;"home"===n&&(n=e.theme);var r=n||e.theme;return Object(T.find)(e.templates,{slug:r})?r:Object(T.find)(e.templates,{slug:"maywood"})?"maywood":t}));var se=Object(E.compose)(Object(c.withSelect)((function(e){var t=function(){return e("core/editor").getEditedPostAttribute("meta")},n=t()._starter_page_template;return{isOpen:e("automattic/starter-page-layouts").isOpen(),getMeta:t,_starter_page_template:n,postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name})),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),Object(c.withDispatch)((function(e,t){var n=e("core/editor");return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen,saveTemplateChoice:function(e){var r=t.getMeta();n.editPost({meta:p()({},r,{_starter_page_template:e})})},insertTemplate:function(r,i){Object(B.addFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template",T.stubTrue),r&&n.editPost({title:r});var o=t.postContentBlock;e("core/block-editor").replaceInnerBlocks(o?o.clientId:"",i,!1),Object(B.removeFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template")},hideWelcomeGuide:function(){t.isWelcomeGuideActive?e("core/edit-post").toggleFeature("welcomeGuide"):t.areTipsEnabled&&e("core/nux").disableTips()}}})))(ae),ce=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isWarningOpen:!1}),w()(O()(e),"toggleTemplateModal",(function(){e.props.setIsOpen(!e.props.isOpen)})),w()(O()(e),"toggleWarningModal",(function(){e.setState({isWarningOpen:!e.state.isWarningOpen})})),e}return b()(n,[{key:"render",value:function(){var e=this.props,t=e.templates,n=e.theme,r=e.vertical,i=e.segment,s=e.hidePageTitle,c=e.isFrontPage,l=e.isOpen;return Object(o.createElement)("div",{className:"sidebar-modal-opener"},Object(o.createElement)(S.Button,{isSecondary:!0,onClick:this.toggleWarningModal},Object(a.__)("Change Layout","full-site-editing")),l&&Object(o.createElement)(se,{shouldPrefetchAssets:!1,templates:t,theme:n,vertical:r,segment:i,toggleTemplateModal:this.toggleTemplateModal,hidePageTitle:s,isFrontPage:c,isPromptedFromSidebar:!0}),this.state.isWarningOpen&&Object(o.createElement)(S.Modal,{title:Object(a.__)("Overwrite Page Content?","full-site-editing"),isDismissible:!1,onRequestClose:this.toggleWarningModal,className:"sidebar-modal-opener__warning-modal"},Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-text"},Object(a.__)("Changing the page's layout will remove any customizations or edits you have already made.","full-site-editing")),Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-options"},Object(o.createElement)(S.Button,{isDefault:!0,onClick:this.toggleWarningModal},Object(a.__)("Cancel","full-site-editing")),Object(o.createElement)(S.Button,{isPrimary:!0,onClick:this.toggleTemplateModal},Object(a.__)("Change Layout","full-site-editing")))))}}]),n}(o.Component),le=Object(E.compose)(Object(c.withSelect)((function(e){return{isOpen:e("automattic/starter-page-layouts").isOpen()}})),Object(c.withDispatch)((function(e){return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen}})))(ce),ue=n(28),pe=n.n(ue);Object(c.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=pe()(t,["type"]);return"SET_IS_OPEN"===n?p()({},e,{isOpen:r.isOpen}):e},actions:{setIsOpen:function(e){return{type:"SET_IS_OPEN",isOpen:e}}},selectors:{isOpen:function(e){return e.isOpen}}});var me,de=window.starterPageTemplatesConfig,fe=de.templates,be=void 0===fe?[]:fe,ge=de.vertical,Oe=de.segment,ve=de.tracksUserData,he=de.screenAction,ye=de.theme,je=de.isFrontPage,_e=de.hideFrontPageTitle;ve&&(U=me=ve,window._tkq.push(["identifyUser",me.userid,me.username]));var we={segment:Oe,templates:be,theme:ye,vertical:ge,isFrontPage:je,hidePageTitle:Boolean(je&&_e)};"add"===he&&(Object(c.dispatch)("automattic/starter-page-layouts").setIsOpen(!0),Object(s.registerPlugin)("page-templates",{render:function(){return Object(o.createElement)(se,i()({},we,{shouldPrefetchAssets:!1}))}})),Object(s.registerPlugin)("page-templates-sidebar",{render:function(){return Object(o.createElement)(l.PluginDocumentSettingPanel,{name:"Template Modal Opener",title:Object(a.__)("Page Layout","full-site-editing"),className:"page-template-modal__sidebar",icon:"none"},Object(o.createElement)(le,we))}});var Te=Object(c.subscribe)((function(){Object(c.select)("core/edit-post").isEditorPanelOpened("page-templates-sidebar/Template Modal Opener")||Object(c.dispatch)("core/edit-post").toggleEditorPanelOpened("page-templates-sidebar/Template Modal Opener"),Te()}))}]));
starter-page-templates/index.js CHANGED
@@ -57,7 +57,7 @@ registerPlugin( 'page-templates-sidebar', {
57
  return (
58
  <PluginDocumentSettingPanel
59
  name="Template Modal Opener"
60
- title={ __( 'Page Layout' ) }
61
  className="page-template-modal__sidebar" // eslint-disable-line wpcalypso/jsx-classname-namespace
62
  icon="none"
63
  >
57
  return (
58
  <PluginDocumentSettingPanel
59
  name="Template Modal Opener"
60
+ title={ __( 'Page Layout', 'full-site-editing' ) }
61
  className="page-template-modal__sidebar" // eslint-disable-line wpcalypso/jsx-classname-namespace
62
  icon="none"
63
  >
starter-page-templates/page-template-modal/components/block-iframe-preview.js CHANGED
@@ -212,7 +212,7 @@ const BlockFramePreview = ( {
212
  <div ref={ frameContainerRef }>
213
  <iframe
214
  ref={ iframeRef }
215
- title={ __( 'Preview' ) }
216
  className={ classnames( 'editor-styles-wrapper', className ) }
217
  style={ style }
218
  />
212
  <div ref={ frameContainerRef }>
213
  <iframe
214
  ref={ iframeRef }
215
+ title={ __( 'Preview', 'full-site-editing' ) }
216
  className={ classnames( 'editor-styles-wrapper', className ) }
217
  style={ style }
218
  />
starter-page-templates/page-template-modal/components/sidebar-modal-opener.js CHANGED
@@ -32,7 +32,7 @@ class SidebarModalOpener extends Component {
32
  return (
33
  <div className="sidebar-modal-opener">
34
  <Button isSecondary onClick={ this.toggleWarningModal }>
35
- { __( 'Change Layout' ) }
36
  </Button>
37
 
38
  { isOpen && (
@@ -51,22 +51,23 @@ class SidebarModalOpener extends Component {
51
 
52
  { this.state.isWarningOpen && (
53
  <Modal
54
- title={ __( 'Overwrite Page Content?' ) }
55
  isDismissible={ false }
56
  onRequestClose={ this.toggleWarningModal }
57
  className="sidebar-modal-opener__warning-modal"
58
  >
59
  <div className="sidebar-modal-opener__warning-text">
60
  { __(
61
- `Changing the page's layout will remove any customizations or edits you have already made.`
 
62
  ) }
63
  </div>
64
  <div className="sidebar-modal-opener__warning-options">
65
  <Button isDefault onClick={ this.toggleWarningModal }>
66
- { __( 'Cancel' ) }
67
  </Button>
68
  <Button isPrimary onClick={ this.toggleTemplateModal }>
69
- { __( 'Change Layout' ) }
70
  </Button>
71
  </div>
72
  </Modal>
32
  return (
33
  <div className="sidebar-modal-opener">
34
  <Button isSecondary onClick={ this.toggleWarningModal }>
35
+ { __( 'Change Layout', 'full-site-editing' ) }
36
  </Button>
37
 
38
  { isOpen && (
51
 
52
  { this.state.isWarningOpen && (
53
  <Modal
54
+ title={ __( 'Overwrite Page Content?', 'full-site-editing' ) }
55
  isDismissible={ false }
56
  onRequestClose={ this.toggleWarningModal }
57
  className="sidebar-modal-opener__warning-modal"
58
  >
59
  <div className="sidebar-modal-opener__warning-text">
60
  { __(
61
+ `Changing the page's layout will remove any customizations or edits you have already made.`,
62
+ 'full-site-editing'
63
  ) }
64
  </div>
65
  <div className="sidebar-modal-opener__warning-options">
66
  <Button isDefault onClick={ this.toggleWarningModal }>
67
+ { __( 'Cancel', 'full-site-editing' ) }
68
  </Button>
69
  <Button isPrimary onClick={ this.toggleTemplateModal }>
70
+ { __( 'Change Layout', 'full-site-editing' ) }
71
  </Button>
72
  </div>
73
  </Modal>
starter-page-templates/page-template-modal/index.js CHANGED
@@ -393,14 +393,14 @@ class PageTemplateModal extends Component {
393
  className="page-template-modal__close-button components-icon-button"
394
  onClick={ this.props.toggleTemplateModal }
395
  icon="no-alt"
396
- label={ __( 'Close Layout Selector' ) }
397
  />
398
  ) : (
399
  <IconButton
400
  className="page-template-modal__close-button components-icon-button"
401
  onClick={ this.closeModal }
402
  icon="arrow-left-alt2"
403
- label={ __( 'Go back' ) }
404
  />
405
  ) }
406
 
393
  className="page-template-modal__close-button components-icon-button"
394
  onClick={ this.props.toggleTemplateModal }
395
  icon="no-alt"
396
+ label={ __( 'Close Layout Selector', 'full-site-editing' ) }
397
  />
398
  ) : (
399
  <IconButton
400
  className="page-template-modal__close-button components-icon-button"
401
  onClick={ this.closeModal }
402
  icon="arrow-left-alt2"
403
+ label={ __( 'Go back', 'full-site-editing' ) }
404
  />
405
  ) }
406
 
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'c084f2ffecbc53295d30c1d83c366a1f');
1
+ <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '58bf00d7206f189917aea842aaa9cc07');
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(u){o=!0,c=u}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t,n){var r=n(15);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),c=n(0),i=n(1),a=n(2),u="automattic/block-editor-nav-sidebar",s=n(5),l=n.n(s),d=n(6),p=n.n(d),f=n(7),b=n(3),m=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(b.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),v=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(b.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),y=n(8),h=n(9),O=n(10),w=n(11),j=n.n(w),g=function(e){var t=e.children,n=p()(e,["children"]);return Object(c.createElement)(f.Button,n,t)};function x(){var e=Object(i.useSelect)((function(e){var t=e("core").getPostType;return[k(e),e(u).isSidebarOpened(),t(e("core/editor").getCurrentPostType())]})),t=l()(e,3),n=t[0],r=t[1],o=t[2],s=Object(c.useRef)(r),d=Object(c.useState)(!1),p=l()(d,2),f=p[0],b=p[1];Object(c.useEffect)((function(){r?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-close-hidden"):s.current&&b(!0),s.current=r}),[r,s,b]);var w=Object(i.useDispatch)(u).toggleSidebar,x=Object(O.addQueryArgs)("edit.php",{post_type:o.slug});x=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",x);var S=Object(h.get)(o,["labels","all_items"],Object(y.__)("Back"));S=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",S);return Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__container","aria-hidden":!r},(r||f)&&Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__header"},Object(c.createElement)(g,{icon:m,iconSize:36,className:j()({"wpcom-block-editor-nav-sidebar__is-shrinking":r,"wpcom-block-editor-nav-sidebar__is-growing":f}),onClick:function(){r&&b(!0),w()},onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar__grow"===e.animationName&&(b(!1),document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-close-hidden"))}})),Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__header-space"}),Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__home-button-container"},Object(c.createElement)(g,{href:x,className:"wpcom-block-editor-nav-sidebar__home-button",icon:v,onClick:function(e){Object(a.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(a.doAction)("a8c.wpcom-block-editor.closeEditor"))}},S)),Object(c.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar__page-list"},n.map((function(e){return Object(c.createElement)(E,{key:e.id,item:e})}))))}function E(e){var t=e.item;return Object(c.createElement)("li",null,Object(c.createElement)("div",null,t.title.rendered),Object(c.createElement)("pre",null,"/".concat(t.slug,"/")))}function k(e){var t=e("core/editor").getCurrentPostType();return e("core").getEntityRecords("postType",t,{_fields:"id,slug,status,title"})||[]}n(18);function S(e){return _.apply(this,arguments)}function _(){return(_=o()(regeneratorRuntime.mark((function e(t){var n,r,o,c,i,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:5e3,o=new Promise((function(e){!function n(){var o=document.querySelector(t);o?e(o):r=setTimeout(n,200)}()})),c=new Promise((function(e){return setTimeout(e,n,"timeout")})),e.next=5,Promise.race([o,c]);case 5:if(i=e.sent,clearTimeout(r),"timeout"!==i){e.next=9;break}return e.abrupt("return",void 0);case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=o()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(".edit-post-fullscreen-mode-close");case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:Object(a.addFilter)("a8c.wpcom-block-editor.shouldCloseEditor","a8c/fse/attachSidebar",(function(){return!1})),document.body.classList.add("is-wpcom-block-editor-nav-sidebar-attached"),t.addEventListener("click",(function(e){e.preventDefault(),Object(i.dispatch)(u).toggleSidebar()})),n=!1,Object(i.subscribe)((function(){var e=Object(i.select)(u).isSidebarOpened();n!==e&&((n=e)?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-opened"):document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-opened"))})),r=document.createElement("div"),document.body.appendChild(r),Object(c.render)(Object(c.createElement)(x,null),r),k(i.select);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){P.apply(this,arguments)}();var A={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}}},T=Object(i.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}}});Object(i.registerStore)(u,{actions:A,reducer:T,selectors:{isSidebarOpened:function(e){return e.opened}}})}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(u){o=!0,c=u}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t,n){var r=n(15);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),c=n(0),i=n(1),a=n(2),u="automattic/block-editor-nav-sidebar",s=n(5),l=n.n(s),d=n(6),f=n.n(d),p=n(7),b=n(3),m=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(b.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),v=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(b.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),y=n(8),h=n(9),O=n(10),w=n(11),j=n.n(w),g=function(e){var t=e.children,n=f()(e,["children"]);return Object(c.createElement)(p.Button,n,t)};function x(){var e=Object(i.useSelect)((function(e){var t=e("core").getPostType;return[k(e),e(u).isSidebarOpened(),t(e("core/editor").getCurrentPostType())]})),t=l()(e,3),n=t[0],r=t[1],o=t[2],s=Object(c.useRef)(r),d=Object(c.useState)(!1),f=l()(d,2),p=f[0],b=f[1];Object(c.useEffect)((function(){r?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-close-hidden"):s.current&&b(!0),s.current=r}),[r,s,b]);var w=Object(i.useDispatch)(u).toggleSidebar,x=Object(O.addQueryArgs)("edit.php",{post_type:o.slug});x=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",x);var S=Object(h.get)(o,["labels","all_items"],Object(y.__)("Back","full-site-editing"));S=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",S);return Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__container","aria-hidden":!r},(r||p)&&Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__header"},Object(c.createElement)(g,{icon:m,iconSize:36,className:j()({"wpcom-block-editor-nav-sidebar__is-shrinking":r,"wpcom-block-editor-nav-sidebar__is-growing":p}),onClick:function(){r&&b(!0),w()},onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar__grow"===e.animationName&&(b(!1),document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-close-hidden"))}})),Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__header-space"}),Object(c.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__home-button-container"},Object(c.createElement)(g,{href:x,className:"wpcom-block-editor-nav-sidebar__home-button",icon:v,onClick:function(e){Object(a.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(a.doAction)("a8c.wpcom-block-editor.closeEditor"))}},S)),Object(c.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar__page-list"},n.map((function(e){return Object(c.createElement)(E,{key:e.id,item:e})}))))}function E(e){var t=e.item;return Object(c.createElement)("li",null,Object(c.createElement)("div",null,t.title.rendered),Object(c.createElement)("pre",null,"/".concat(t.slug,"/")))}function k(e){var t=e("core/editor").getCurrentPostType();return e("core").getEntityRecords("postType",t,{_fields:"id,slug,status,title"})||[]}n(18);function S(e){return _.apply(this,arguments)}function _(){return(_=o()(regeneratorRuntime.mark((function e(t){var n,r,o,c,i,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:5e3,o=new Promise((function(e){!function n(){var o=document.querySelector(t);o?e(o):r=setTimeout(n,200)}()})),c=new Promise((function(e){return setTimeout(e,n,"timeout")})),e.next=5,Promise.race([o,c]);case 5:if(i=e.sent,clearTimeout(r),"timeout"!==i){e.next=9;break}return e.abrupt("return",void 0);case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=o()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(".edit-post-fullscreen-mode-close");case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:Object(a.addFilter)("a8c.wpcom-block-editor.shouldCloseEditor","a8c/fse/attachSidebar",(function(){return!1})),document.body.classList.add("is-wpcom-block-editor-nav-sidebar-attached"),t.addEventListener("click",(function(e){e.preventDefault(),Object(i.dispatch)(u).toggleSidebar()})),n=!1,Object(i.subscribe)((function(){var e=Object(i.select)(u).isSidebarOpened();n!==e&&((n=e)?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-opened"):document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-opened"))})),r=document.createElement("div"),document.body.appendChild(r),Object(c.render)(Object(c.createElement)(x,null),r),k(i.select);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){P.apply(this,arguments)}();var A={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}}},T=Object(i.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}}});Object(i.registerStore)(u,{actions:A,reducer:T,selectors:{isSidebarOpened:function(e){return e.opened}}})}]));
wpcom-block-editor-nav-sidebar/src/wpcom-block-editor-nav-sidebar.tsx CHANGED
@@ -61,7 +61,7 @@ export default function WpcomBlockEditorNavSidebar() {
61
  let closeUrl = addQueryArgs( 'edit.php', { post_type: postType.slug } );
62
  closeUrl = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeUrl', closeUrl );
63
 
64
- let closeLabel = get( postType, [ 'labels', 'all_items' ], __( 'Back' ) );
65
  closeLabel = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeLabel', closeLabel );
66
 
67
  const handleClose = ( e: React.WPSyntheticEvent ) => {
61
  let closeUrl = addQueryArgs( 'edit.php', { post_type: postType.slug } );
62
  closeUrl = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeUrl', closeUrl );
63
 
64
+ let closeLabel = get( postType, [ 'labels', 'all_items' ], __( 'Back', 'full-site-editing' ) );
65
  closeLabel = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeLabel', closeLabel );
66
 
67
  const handleClose = ( e: React.WPSyntheticEvent ) => {