Jetpack by WordPress.com - Version 10.9-a.1

Version Description

Download this release

Release Info

Developer wpkaren
Plugin Icon 128x128 Jetpack by WordPress.com
Version 10.9-a.1
Comparing to
See all releases

Code changes from version 10.8 to 10.9-a.1

CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ## 10.8 - 2022-04-05
6
  ### Enhancements
7
  - Blocks: make settings discoverable and toggleable, and add a card to highlight the blocks available from Jetpack on the dashboard.
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
5
+ ## 10.9-a.1 - 2022-04-06
6
+ ### Enhancements
7
+ - Payments Block: Re-loading the page will not cause payment form to open again.
8
+
9
+ ### Improved compatibility
10
+ - Dashboard: Display block settings even when the Classic Editor plugin is active.
11
+ - Mailchimp Popup widget: Widget deprecation.
12
+
13
+ ### Bug fixes
14
+ - Contact Form: Ensure the form's input fields inherit a default font size.
15
+ - Subscribe Block: Fix default styles block setting selection to "Split".
16
+
17
+ ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
18
+ - Blocks: Add Pocket Casts dev block (for internal use only).
19
+ - Creating and verifying a nonce for the Jetpack comments form.
20
+ - E2E tests - bumped dependencies versions.
21
+ - E2E tests: added custom error messages to the expect functions.
22
+ - Janitorial: Refactor classes into shared package.
23
+ - Re-added the jetpack-waf package to update the autoloader files in the composer.lock.
24
+ - Removed eslint dependency which will now be loaded from root directory.
25
+ - Updated package dependencies.
26
+ - PHPCS updates to bring in line with WordPress standards. Files affected include SAL, lib, Custom CSS, JSON endpoints.
27
+ - SEO Tools: Use the new feature eligibility checks for WordPress.com sites.
28
+ - Made changes updating WordPress.com Personal plans to Pro.
29
+
30
+
31
  ## 10.8 - 2022-04-05
32
  ### Enhancements
33
  - Blocks: make settings discoverable and toggleable, and add a card to highlight the blocks available from Jetpack on the dashboard.
_inc/blocks/donations/view.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-dom-ready', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => '4c8f1718e5da9fc8ce5e32ccc176f2c5');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-dom-ready', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => 'f9a50c30923ae0ac1d8079518327ec2f');
_inc/blocks/donations/view.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see view.js.LICENSE.txt */
2
- !function(){var t={8172:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(31354),i=n(64803);function o(t){var e=(0,r.Z)(t);return function(t){return(0,i.Z)(e,t)}}},64803:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function i(t,e){var n,i,o,s,c,u,a=[];for(n=0;n<t.length;n++){if(c=t[n],s=r[c]){for(i=s.length,o=Array(i);i--;)o[i]=a.pop();try{u=s.apply(null,o)}catch(t){return t}}else u=e.hasOwnProperty(c)?e[c]:+c;a.push(u)}return a[0]}},7478:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(8172);function i(t){var e=(0,r.Z)(t);return function(t){return+e({n:t})}}},31354:function(t,e,n){"use strict";var r,i,o,s;function c(t){for(var e,n,c,u,a=[],l=[];e=t.match(s);){for(n=e[0],(c=t.substr(0,e.index).trim())&&a.push(c);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]<r[n]){l.push(u);break}a.push(u)}o[n]||l.push(n),t=t.substr(e.index+n.length)}return(t=t.trim())&&a.push(t),a.concat(l.reverse())}n.d(e,{Z:function(){return c}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function i(t,e){var n;if(!Array.isArray(e))for(e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n=1,t.replace(r,(function(){var t,r,i,o,s;return t=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=e[n-1],n++),void 0!==r?e[0]&&"object"==typeof e[0]&&e[0].hasOwnProperty(r)&&(s=e[0][r]):(void 0===t&&(t=n),n++,s=e[t-1]),"f"===o?s=parseFloat(s)||0:"d"===o&&(s=parseInt(s)||0),void 0!==i&&("f"===o?s=s.toFixed(i):"s"===o&&(s=s.substr(0,i))),null!=s?s:"")}))}},2571:function(t){"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){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 p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.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},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var a=u.length,l=d(u,a);for(n=0;n<a;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return a(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return a(this,t,e,!0)},o.prototype.once=function(t,e){return c(e),this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},95949:function(t,e,n){"use strict";var r=n(53566),i=n(48282);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},69016:function(t,e,n){"use strict";var r=n(53566),i=n(95949),o=n(47574),s=r.rotl32,c=r.sum32,u=r.sum32_5,a=o.ft_1,l=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=u(s(i,5),a(d,o,l,f),m,n[r],p[d]);m=f,f=l,l=s(o,30),o=i,i=g}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],l),this.h[3]=c(this.h[3],f),this.h[4]=c(this.h[4],m)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(t,e,n){"use strict";var r=n(53566).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},53566:function(t,e,n){"use strict";var r=n(48282),i=n(59503);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function c(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=c(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=c,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),c=0,u=e;c<s.length;c++,u+=4){var a;a="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[c]=a>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,c){var u=0,a=e;return u+=(a=a+r>>>0)<e?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,c){return e+r+o+c>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,c,u,a){var l=0,p=e;return l+=(p=p+r>>>0)<e?1:0,l+=(p=p+o>>>0)<o?1:0,l+=(p=p+c>>>0)<c?1:0,t+n+i+s+u+(l+=(p=p+a>>>0)<a?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,c,u,a){return e+r+o+c+a>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},88617:function(t,e,n){"use strict";var r=n(92450),i=n(99788),o=n(64473),s=n.n(o),c=n(28457),u=n(88090),a=n(75565),l=n.n(a),p=n(69016),f=n.n(p),m=n(2571),d=n(702),g=n(92846),h=s()("i18n-calypso"),y="number_format_decimals",b="number_format_thousands_sep",v="messages",w=[function(t){return t}],C={};function _(){L.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function S(t){return Array.prototype.slice.call(t)}function F(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&_("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",S(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&_("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",S(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function O(t,e){return t.dcnpgettext(v,e.context,e.original,e.plural,e.count)}function A(t,e){for(var n=w.length-1;n>=0;n--){var r=w[n](Object.assign({},e)),i=r.context?r.context+""+r.original:r.original;if(t.state.locale[i])return O(t.state.tannin,r)}return null}function L(){if(!(this instanceof L))return new L;this.defaultLocaleSlug="en",this.defaultPluralForms=function(t){return 1===t?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:l()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}L.throwErrors=!1,L.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},L.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},L.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},L.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,g.Z)(t,n,r,i)},L.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},L.prototype.setLocale=function(t){var e,n,r;if(t&&t[""]&&t[""]["key-hash"]){var o=t[""]["key-hash"],s=function(t,e){var n=!1===e?"":String(e);if(void 0!==C[n+t])return C[n+t];var r=f()().update(t).digest("hex");return C[n+t]=e?r.substr(0,e):r},c=function(t){return function(e){return e.context?(e.original=s(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=s(e.original,t),e}};if("sha1"===o.substr(0,4))if(4===o.length)w.push(c(!1));else{var a=o.substr(5).indexOf("-");if(a<0){var l=Number(o.substr(5));w.push(c(l))}else for(var p=Number(o.substr(5,a)),m=Number(o.substr(6+a)),d=p;d<=m;d++)w.push(c(d))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(e=this.state.locale["text directionltr"])||void 0===e?void 0:e[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.Z((0,i.Z)({},v,this.state.locale)),this.state.numberFormatSettings.decimal_point=O(this.state.tannin,F([y])),this.state.numberFormatSettings.thousands_sep=O(this.state.tannin,F([b])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===b&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},L.prototype.getLocale=function(){return this.state.locale},L.prototype.getLocaleSlug=function(){return this.state.localeSlug},L.prototype.isRtl=function(){return"rtl"===this.state.textDirection},L.prototype.addTranslations=function(t){for(var e in t)""!==e&&(this.state.tannin.data.messages[e]=t[e]);this.stateObserver.emit("change")},L.prototype.hasTranslation=function(){return!!A(this,F(arguments))},L.prototype.translate=function(){var t=F(arguments),e=A(this,t);if(e||(e=O(this.state.tannin,t)),t.args){var n=Array.isArray(t.args)?t.args.slice(0):[t.args];n.unshift(e);try{e=d.Z.apply(void 0,(0,r.Z)(n))}catch(t){if(!window||!window.console)return;var i=this.throwErrors?"error":"warn";"string"!=typeof t?window.console[i](t):window.console[i]("i18n sprintf error:",n)}}return t.components&&(e=(0,c.Z)({mixedString:e,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){e=n(e,t)})),e},L.prototype.reRenderTranslations=function(){h("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},L.prototype.registerComponentUpdateHook=function(t){this.componentUpdateHooks.push(t)},L.prototype.registerTranslateHook=function(t){this.translateHooks.push(t)},e.Z=L},63807:function(t,e,n){"use strict";n.d(e,{Y4:function(){return u}});var r=n(88617),i=n(42928),o=n(80975),s=n(24531),c=new r.Z,u=c.numberFormat.bind(c),a=(c.translate.bind(c),c.configure.bind(c),c.setLocale.bind(c),c.getLocale.bind(c),c.getLocaleSlug.bind(c),c.addTranslations.bind(c),c.reRenderTranslations.bind(c),c.registerComponentUpdateHook.bind(c),c.registerTranslateHook.bind(c),c.state,c.stateObserver,c.on.bind(c),c.off.bind(c),c.emit.bind(c),(0,i.Z)(c),(0,o.Z)(c),(0,s.Z)(c));a.useRtl,a.withRtl},42928:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(64316),i=n(32829),o=n(11178),s=n(71904),c=n(82590),u=n(45492),a=n(99788),l=n(99196),p=n.n(l);function f(t){var e={numberFormat:t.numberFormat.bind(t),translate:t.translate.bind(t)};return function(n){var l,f,m=n.displayName||n.name||"";return f=l=function(l){(0,c.Z)(m,l);var f=(0,u.Z)(m);function m(){var t;(0,i.Z)(this,m);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=f.call.apply(f,[this].concat(n)),(0,a.Z)((0,s.Z)(t),"boundForceUpdate",t.forceUpdate.bind((0,s.Z)(t))),t}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){t.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){t.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var i=(0,r.Z)({locale:t.getLocaleSlug()},this.props,{},e);return p().createElement(n,i)}}]),m}(p().Component),(0,a.Z)(l,"displayName","Localized("+m+")"),f}}},92846:function(t,e,n){"use strict";function r(t,e,n,r){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+t)?+t:0,o=isFinite(+e)?Math.abs(e):0,s=void 0===r?",":r,c=void 0===n?".":n,u="";return u=(o?function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."),u[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(u[1]||"").length<o&&(u[1]=u[1]||"",u[1]+=new Array(o-u[1].length+1).join("0")),u.join(c)}n.d(e,{Z:function(){return r}})},24531:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(95332),i=n(99196),o=n.n(i),s=n(20036),c=n(94333);function u(t){var e={getCurrentValue:function(){return t.isRtl()},subscribe:function(e){return t.on("change",e),function(){return t.off("change",e)}}};function n(){return(0,s.useSubscription)(e)}var u=(0,c.createHigherOrderComponent)((function(t){return(0,i.forwardRef)((function(e,i){var s=n();return o().createElement(t,(0,r.Z)({},e,{isRtl:s,ref:i}))}))}),"WithRTL");return{useRtl:n,withRtl:u}}},80975:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(11710),i=n(99196),o=n.n(i);function s(t){function e(){var e=t.translate.bind(t);return Object.defineProperty(e,"localeSlug",{get:t.getLocaleSlug.bind(t)}),e}return function(){var n=o().useState(e),i=(0,r.Z)(n,2),s=i[0],c=i[1];return o().useEffect((function(){var n=function(){return c(e)};return t.on("change",n),function(){return t.off("change",n)}}),[]),s}}},59503:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},75565:function(t,e,n){var r=n(2571),i=n(59503);function o(t){if(!(this instanceof o))return new o(t);"number"==typeof t&&(t={max:t}),t||(t={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=t.max||1e3,this.maxAge=t.maxAge||0}t.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];return delete this.cache[t],this._unlink(t,e.prev,e.next),e.value}},o.prototype._unlink=function(t,e,n){this.length--,0===this.length?this.head=this.tail=null:this.head===t?(this.head=e,this.cache[this.head].next=null):this.tail===t?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[e].next=n,this.cache[n].prev=e)},o.prototype.peek=function(t){if(this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return e.value}},o.prototype.set=function(t,e){var n;if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){if((n=this.cache[t]).value=e,this.maxAge&&(n.modified=Date.now()),t===this.head)return e;this._unlink(t,n.prev,n.next)}else n={value:e,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[t]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=t),this.head=t,this.tail||(this.tail=t),e},o.prototype._checkAge=function(t,e){return!(this.maxAge&&Date.now()-e.modified>this.maxAge)||(this.remove(t),this.emit("evict",{key:t,value:e.value}),!1)},o.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},o.prototype.evict=function(){if(this.tail){var t=this.tail,e=this.remove(this.tail);this.emit("evict",{key:t,value:e})}}},48282:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},32002:function(t){var e=1e3,n=60*e,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,u){u=u||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===a&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return c(t,o,i,"day");if(o>=r)return c(t,o,r,"hour");if(o>=n)return c(t,o,n,"minute");if(o>=e)return c(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1625:function(t){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var s,c,u=i(t),a=1;a<arguments.length;a++){for(var l in s=Object(arguments[a]))n.call(s,l)&&(u[l]=s[l]);if(e){c=e(s);for(var p=0;p<c.length;p++)r.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u}},88090:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(7478),i={contextDelimiter:"",onMissingKey:null};function o(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},i)this.options[n]=void 0!==e&&n in e?e[n]:i[n]}o.prototype.getPluralForm=function(t,e){var n,i,o,s=this.pluralForms[t];return s||("function"!=typeof(o=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(i)),s=this.pluralForms[t]=o),s(e)},o.prototype.dcnpgettext=function(t,e,n,r,i){var o,s,c;return o=void 0===i?0:this.getPluralForm(t,i),s=n,e&&(s=e+this.options.contextDelimiter+n),(c=this.data[t][s])&&c[o]?c[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)}},48701:function(t,e,n){"use strict";n.d(e,{hj:function(){return s},Vm:function(){return c}});var r=n(72670),i=n(92819);const o={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};Object.keys(o).map((t=>{const{symbol:e}=(0,r.X)(t);return{value:t,label:e===t?t:`${t} ${(0,i.trimEnd)(e,".")}`}}));function s(t){return o[t]}function c(t,e){return t?"number"==typeof t?t:(t=parseFloat(t.replace(new RegExp("\\"+r.M[e].grouping,"g"),"").replace(new RegExp("\\"+r.M[e].decimal,"g"),".")),isNaN(t)?null:t):null}},15894:function(t,e,n){"use strict";function r(t){if("https://subscribe.wordpress.com"===t.origin&&t.data){const e=JSON.parse(t.data);e&&"close"===e.action&&(window.removeEventListener("message",r),tb_remove())}}n.d(e,{f:function(){return i}});const i=t=>{Array.prototype.slice.call(document.querySelectorAll(t)).forEach((t=>{if("true"!==t.getAttribute("data-jetpack-memberships-button-initialized")){try{!function(t){t.addEventListener("click",(e=>{e.preventDefault();const n=t.getAttribute("href");window.scrollTo(0,0),tb_show(null,n+"&display=alternate&TB_iframe=true",null),window.addEventListener("message",r,!1),document.querySelector("#TB_window").classList.add("jetpack-memberships-modal"),window.scrollTo(0,0)}))}(t)}catch(t){console.error("Problem setting up Thickbox",t)}t.setAttribute("data-jetpack-memberships-button-initialized","true")}}))}},84178:function(t,e,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},72670:function(t,e,n){"use strict";n.d(e,{M:function(){return r},X:function(){return i}});var r={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 i(t){return r[t]||{symbol:"$",grouping:",",decimal:".",precision:2}}},43626:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var r=n(92086),i=n(63807),o=n(72670);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,o.X)(e);if(!s||isNaN(t))return null;var c=(0,r.Z)({},s,n),u=c.decimal,a=c.grouping,l=c.precision,p=c.symbol,f=t<0?"-":"",m=(0,i.Y4)(Math.abs(t),{decimals:l,thousandsSep:a,decPoint:u});return"".concat(f).concat(p).concat(m)}},28457:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(99196),i=n(10089);function o(t,e){let n,i,s=[];for(let r=0;r<t.length;r++){const o=t[r];if("string"!==o.type){if(void 0===e[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof e[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=e[o.value],i=r;break}s.push(e[o.value])}else s.push(o.value)}if(n){const c=function(t,e){const n=e[t];let r=0;for(let i=t+1;i<e.length;i++){const t=e[i];if(t.value===n.value){if("componentOpen"===t.type){r++;continue}if("componentClose"===t.type){if(0===r)return i;r--}}}throw new Error("Missing closing component token `"+n.value+"`")}(i,t),u=o(t.slice(i+1,c),e),a=(0,r.cloneElement)(n,{},u);if(s.push(a),c<t.length-1){const n=o(t.slice(c+1),e);s=s.concat(n)}}return s=s.filter(Boolean),0===s.length?null:1===s.length?s[0]:(0,r.createElement)(r.Fragment,null,...s)}function s(t){const{mixedString:e,components:n,throwErrors:r}=t;if(!n)return e;if("object"!=typeof n){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because components is not an object`);return e}const s=(0,i.Z)(e);try{return o(s,n)}catch(t){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because of error \`${t.message}\``);return e}}},10089:function(t,e,n){"use strict";function r(t){return t.startsWith("{{/")?{type:"componentClose",value:t.replace(/\W/g,"")}:t.endsWith("/}}")?{type:"componentSelfClosing",value:t.replace(/\W/g,"")}:t.startsWith("{{")?{type:"componentOpen",value:t.replace(/\W/g,"")}:{type:"string",value:t}}function i(t){return t.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}n.d(e,{Z:function(){return i}})},64473:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.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.log=console.debug||console.log||(()=>{}),t.exports=n(5434)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5434:function(t,e,n){t.exports=function(t){function e(t){let n,i,o,s=null;function c(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!c.enabled)return;const o=c,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";a++;const i=e.formatters[n];if("function"==typeof i){const e=r[a];t=i.call(o,e),r.splice(a,1),a--}return t})),e.formatArgs.call(o,r);const l=o.log||e.log;l.apply(o,r)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=r,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(c),c}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(32002),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},11043:function(t,e,n){"use strict";var r=n(1625),i=n(99196);e.useSubscription=function(t){var e=t.getCurrentValue,n=t.subscribe,o=i.useState((function(){return{getCurrentValue:e,subscribe:n,value:e()}}));t=o[0];var s=o[1];return o=t.value,t.getCurrentValue===e&&t.subscribe===n||(o=e(),s({getCurrentValue:e,subscribe:n,value:o})),i.useDebugValue(o),i.useEffect((function(){function t(){if(!i){var t=e();s((function(i){return i.getCurrentValue!==e||i.subscribe!==n||i.value===t?i:r({},i,{value:t})}))}}var i=!1,o=n(t);return t(),function(){i=!0,o()}}),[e,n]),o}},20036:function(t,e,n){"use strict";t.exports=n(11043)},99196:function(t){"use strict";t.exports=window.React},92819:function(t){"use strict";t.exports=window.lodash},94333:function(t){"use strict";t.exports=window.wp.compose},47701:function(t){"use strict";t.exports=window.wp.domReady},39630:function(t){"use strict";t.exports=window.wp.keycodes},96483:function(t){"use strict";t.exports=window.wp.url},26714:function(t,e,n){"use strict";function r(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}n.d(e,{Z:function(){return r}})},68406:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{Z:function(){return r}})},18010:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(26714);function i(t){if(Array.isArray(t))return(0,r.Z)(t)}},71904:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:function(){return r}})},32829:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},11178:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:function(){return i}})},45492:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(82912),i=n(29706),o=n(77246);function s(t){var e=(0,i.Z)();return function(){var n,i=(0,r.Z)(t);if(e){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return(0,o.Z)(this,n)}}},99788:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},95332:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:function(){return r}})},82912:function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{Z:function(){return r}})},82590:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(70301);function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,r.Z)(t,e)}},29706:function(t,e,n){"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}n.d(e,{Z:function(){return r}})},25958:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{Z:function(){return r}})},41273:function(t,e,n){"use strict";function r(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(t);!(_n=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{_n||null==n.return||n.return()}finally{if(s)throw i}}return o}}n.d(e,{Z:function(){return r}})},79860:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},14803:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},92086:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(99788);function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?Object(arguments[e]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach((function(e){(0,r.Z)(t,e,n[e])}))}return t}},64316:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(99788);function i(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}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},77246:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(82427),i=n(71904);function o(t,e){if(e&&("object"===(0,r.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},70301:function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:function(){return r}})},11710:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(68406),i=n(41273),o=n(74598),s=n(79860);function c(t,e){return(0,r.Z)(t)||(0,i.Z)(t,e)||(0,o.Z)(t,e)||(0,s.Z)()}},92450:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(18010),i=n(25958),o=n(74598),s=n(14803);function c(t){return(0,r.Z)(t)||(0,i.Z)(t)||(0,o.Z)(t)||(0,s.Z)()}},82427:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{Z:function(){return r}})},74598:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(26714);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(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(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"}(),function(){"use strict";n(84178)}(),function(){"use strict";var t=n(43626),e=n(47701),r=n.n(e),i=n(39630),o=n(96483),s=n(48701),c=n(15894);class u{constructor(t){this.block=t,this.amount=null,this.isCustomAmount=!1,this.interval="one-time",this.initNavigation(),this.handleCustomAmount(),this.handleChosenAmount(),this.block.querySelector(".donations__container").classList.add("loaded")}getNavItem(t){return this.block.querySelector(`.donations__nav-item[data-interval="${t}"]`)}resetSelectedAmount(){const t=this.block.querySelector(".donations__amount.is-selected");t&&t.classList.remove("is-selected")}getDonateButton(){return this.block.querySelector(`.donations__donate-button.${{"one-time":"donations__one-time-item","1 month":"donations__monthly-item","1 year":"donations__annual-item"}[this.interval]}`)}toggleDonateButton(t){const e=this.getDonateButton();t?e.classList.remove("is-disabled"):e.classList.add("is-disabled")}updateUrl(){const t=this.getDonateButton(),e=t.getAttribute("href");this.amount?t.setAttribute("href",(0,o.addQueryArgs)(e,{amount:this.amount,...this.isCustomAmount&&{customAmount:!0}})):t.setAttribute("href",(0,o.removeQueryArgs)(e,"amount","customAmount"))}updateAmountFromCustomAmountInput(){const t=this.block.querySelector(".donations__custom-amount .donations__amount-value"),e=this.block.querySelector(".donations__custom-amount"),n=t.innerHTML;if(!n)return this.amount=null,void this.toggleDonateButton(!1);const r=t.dataset.currency,i=(0,s.Vm)(n,r);i&&i>=(0,s.hj)(r)?(e.classList.remove("has-error"),this.amount=i,this.toggleDonateButton(!0)):(e.classList.add("has-error"),this.amount=null,this.toggleDonateButton(!1)),this.updateUrl()}initNavigation(){const t=this.block.querySelectorAll(".donations__nav-item"),e=this.block.querySelector(".donations__tab"),n={"one-time":"is-one-time","1 month":"is-monthly","1 year":"is-annual"},r=t=>{const r=this.interval,i=t.target.dataset.interval;this.interval=i;const o=this.getNavItem(r);o&&o.classList.remove("is-active");const s=this.getNavItem(i);s&&s.classList.add("is-active"),e.classList.remove(n[r]),e.classList.add(n[i]),this.amount=null,this.isCustomAmount=!1,this.resetSelectedAmount(),this.updateUrl(),this.toggleDonateButton(!1)};t.forEach((t=>{t.addEventListener("click",r),t.addEventListener("keydown",r)}));const i=this.getNavItem(this.interval);i&&i.classList.add("is-active"),e.classList.add(n[this.interval])}handleCustomAmount(){const e=this.block.querySelector(".donations__custom-amount .donations__amount-value");if(!e)return;const n=this.block.querySelector(".donations__custom-amount");e.setAttribute("contenteditable",""),e.addEventListener("keydown",(t=>{t.keyCode===i.ENTER&&t.preventDefault()})),e.addEventListener("focus",(()=>{this.resetSelectedAmount(),n.classList.add("is-selected"),this.isCustomAmount||(this.isCustomAmount=!0,this.updateAmountFromCustomAmountInput())})),e.addEventListener("blur",(()=>{this.isCustomAmount&&this.amount&&(e.innerHTML=(0,t.ZP)(this.amount,e.dataset.currency,{symbol:""}))})),e.addEventListener("input",(()=>this.updateAmountFromCustomAmountInput()))}handleChosenAmount(){this.block.querySelectorAll(".donations__amount:not( .donations__custom-amount )").forEach((t=>{t.addEventListener("click",(t=>{this.resetSelectedAmount(),t.target.classList.add("is-selected"),this.amount=t.target.dataset.amount,this.isCustomAmount=!1;const e=this.block.querySelector(".donations__custom-amount");e&&e.classList.remove("has-error"),this.updateUrl();this.getDonateButton().classList.remove("is-disabled")}))})),this.block.querySelectorAll(".donations__donate-button").forEach((t=>t.classList.add("is-disabled")))}}r()((()=>{document.querySelectorAll(".wp-block-jetpack-donations").forEach((t=>new u(t))),(0,c.f)(".donations__donate-button")}))}()}();
1
  /*! For license information please see view.js.LICENSE.txt */
2
+ !function(){var t={8172:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(31354),i=n(64803);function o(t){var e=(0,r.Z)(t);return function(t){return(0,i.Z)(e,t)}}},64803:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function i(t,e){var n,i,o,s,c,u,a=[];for(n=0;n<t.length;n++){if(c=t[n],s=r[c]){for(i=s.length,o=Array(i);i--;)o[i]=a.pop();try{u=s.apply(null,o)}catch(t){return t}}else u=e.hasOwnProperty(c)?e[c]:+c;a.push(u)}return a[0]}},7478:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(8172);function i(t){var e=(0,r.Z)(t);return function(t){return+e({n:t})}}},31354:function(t,e,n){"use strict";var r,i,o,s;function c(t){for(var e,n,c,u,a=[],l=[];e=t.match(s);){for(n=e[0],(c=t.substr(0,e.index).trim())&&a.push(c);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]<r[n]){l.push(u);break}a.push(u)}o[n]||l.push(n),t=t.substr(e.index+n.length)}return(t=t.trim())&&a.push(t),a.concat(l.reverse())}n.d(e,{Z:function(){return c}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function i(t,e){var n;if(!Array.isArray(e))for(e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n=1,t.replace(r,(function(){var t,r,i,o,s;return t=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=e[n-1],n++),void 0!==r?e[0]&&"object"==typeof e[0]&&e[0].hasOwnProperty(r)&&(s=e[0][r]):(void 0===t&&(t=n),n++,s=e[t-1]),"f"===o?s=parseFloat(s)||0:"d"===o&&(s=parseInt(s)||0),void 0!==i&&("f"===o?s=s.toFixed(i):"s"===o&&(s=s.substr(0,i))),null!=s?s:"")}))}},2571:function(t){"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){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 p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.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},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var a=u.length,l=d(u,a);for(n=0;n<a;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return a(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return a(this,t,e,!0)},o.prototype.once=function(t,e){return c(e),this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},95949:function(t,e,n){"use strict";var r=n(53566),i=n(48282);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},69016:function(t,e,n){"use strict";var r=n(53566),i=n(95949),o=n(47574),s=r.rotl32,c=r.sum32,u=r.sum32_5,a=o.ft_1,l=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=u(s(i,5),a(d,o,l,f),m,n[r],p[d]);m=f,f=l,l=s(o,30),o=i,i=g}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],l),this.h[3]=c(this.h[3],f),this.h[4]=c(this.h[4],m)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(t,e,n){"use strict";var r=n(53566).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},53566:function(t,e,n){"use strict";var r=n(48282),i=n(59503);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function c(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=c(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=c,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),c=0,u=e;c<s.length;c++,u+=4){var a;a="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[c]=a>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,c){var u=0,a=e;return u+=(a=a+r>>>0)<e?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,c){return e+r+o+c>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,c,u,a){var l=0,p=e;return l+=(p=p+r>>>0)<e?1:0,l+=(p=p+o>>>0)<o?1:0,l+=(p=p+c>>>0)<c?1:0,t+n+i+s+u+(l+=(p=p+a>>>0)<a?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,c,u,a){return e+r+o+c+a>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},88617:function(t,e,n){"use strict";var r=n(57810),i=n(61285),o=n(64473),s=n.n(o),c=n(28457),u=n(88090),a=n(75565),l=n.n(a),p=n(69016),f=n.n(p),m=n(2571),d=n(702),g=n(92846),h=s()("i18n-calypso"),y="number_format_decimals",b="number_format_thousands_sep",v="messages",w=[function(t){return t}],C={};function _(){L.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function S(t){return Array.prototype.slice.call(t)}function F(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&_("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",S(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&_("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",S(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function O(t,e){return t.dcnpgettext(v,e.context,e.original,e.plural,e.count)}function A(t,e){for(var n=w.length-1;n>=0;n--){var r=w[n](Object.assign({},e)),i=r.context?r.context+""+r.original:r.original;if(t.state.locale[i])return O(t.state.tannin,r)}return null}function L(){if(!(this instanceof L))return new L;this.defaultLocaleSlug="en",this.defaultPluralForms=function(t){return 1===t?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:l()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}L.throwErrors=!1,L.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},L.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},L.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},L.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,g.Z)(t,n,r,i)},L.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},L.prototype.setLocale=function(t){var e,n,r;if(t&&t[""]&&t[""]["key-hash"]){var o=t[""]["key-hash"],s=function(t,e){var n=!1===e?"":String(e);if(void 0!==C[n+t])return C[n+t];var r=f()().update(t).digest("hex");return C[n+t]=e?r.substr(0,e):r},c=function(t){return function(e){return e.context?(e.original=s(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=s(e.original,t),e}};if("sha1"===o.substr(0,4))if(4===o.length)w.push(c(!1));else{var a=o.substr(5).indexOf("-");if(a<0){var l=Number(o.substr(5));w.push(c(l))}else for(var p=Number(o.substr(5,a)),m=Number(o.substr(6+a)),d=p;d<=m;d++)w.push(c(d))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(e=this.state.locale["text directionltr"])||void 0===e?void 0:e[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.Z((0,i.Z)({},v,this.state.locale)),this.state.numberFormatSettings.decimal_point=O(this.state.tannin,F([y])),this.state.numberFormatSettings.thousands_sep=O(this.state.tannin,F([b])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===b&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},L.prototype.getLocale=function(){return this.state.locale},L.prototype.getLocaleSlug=function(){return this.state.localeSlug},L.prototype.isRtl=function(){return"rtl"===this.state.textDirection},L.prototype.addTranslations=function(t){for(var e in t)""!==e&&(this.state.tannin.data.messages[e]=t[e]);this.stateObserver.emit("change")},L.prototype.hasTranslation=function(){return!!A(this,F(arguments))},L.prototype.translate=function(){var t=F(arguments),e=A(this,t);if(e||(e=O(this.state.tannin,t)),t.args){var n=Array.isArray(t.args)?t.args.slice(0):[t.args];n.unshift(e);try{e=d.Z.apply(void 0,(0,r.Z)(n))}catch(t){if(!window||!window.console)return;var i=this.throwErrors?"error":"warn";"string"!=typeof t?window.console[i](t):window.console[i]("i18n sprintf error:",n)}}return t.components&&(e=(0,c.Z)({mixedString:e,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){e=n(e,t)})),e},L.prototype.reRenderTranslations=function(){h("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},L.prototype.registerComponentUpdateHook=function(t){this.componentUpdateHooks.push(t)},L.prototype.registerTranslateHook=function(t){this.translateHooks.push(t)},e.Z=L},63807:function(t,e,n){"use strict";n.d(e,{Y4:function(){return u}});var r=n(88617),i=n(42928),o=n(80975),s=n(24531),c=new r.Z,u=c.numberFormat.bind(c),a=(c.translate.bind(c),c.configure.bind(c),c.setLocale.bind(c),c.getLocale.bind(c),c.getLocaleSlug.bind(c),c.addTranslations.bind(c),c.reRenderTranslations.bind(c),c.registerComponentUpdateHook.bind(c),c.registerTranslateHook.bind(c),c.state,c.stateObserver,c.on.bind(c),c.off.bind(c),c.emit.bind(c),(0,i.Z)(c),(0,o.Z)(c),(0,s.Z)(c));a.useRtl,a.withRtl},42928:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(20623),i=n(6438),o=n(68384),s=n(75808),c=n(80601),u=n(31615),a=n(61285),l=n(99196),p=n.n(l);function f(t){var e={numberFormat:t.numberFormat.bind(t),translate:t.translate.bind(t)};return function(n){var l,f,m=n.displayName||n.name||"";return f=l=function(l){(0,c.Z)(m,l);var f=(0,u.Z)(m);function m(){var t;(0,i.Z)(this,m);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=f.call.apply(f,[this].concat(n)),(0,a.Z)((0,s.Z)(t),"boundForceUpdate",t.forceUpdate.bind((0,s.Z)(t))),t}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){t.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){t.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var i=(0,r.Z)({locale:t.getLocaleSlug()},this.props,{},e);return p().createElement(n,i)}}]),m}(p().Component),(0,a.Z)(l,"displayName","Localized("+m+")"),f}}},92846:function(t,e,n){"use strict";function r(t,e,n,r){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+t)?+t:0,o=isFinite(+e)?Math.abs(e):0,s=void 0===r?",":r,c=void 0===n?".":n,u="";return u=(o?function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."),u[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(u[1]||"").length<o&&(u[1]=u[1]||"",u[1]+=new Array(o-u[1].length+1).join("0")),u.join(c)}n.d(e,{Z:function(){return r}})},24531:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(4291),i=n(99196),o=n.n(i),s=n(20036),c=n(94333);function u(t){var e={getCurrentValue:function(){return t.isRtl()},subscribe:function(e){return t.on("change",e),function(){return t.off("change",e)}}};function n(){return(0,s.useSubscription)(e)}var u=(0,c.createHigherOrderComponent)((function(t){return(0,i.forwardRef)((function(e,i){var s=n();return o().createElement(t,(0,r.Z)({},e,{isRtl:s,ref:i}))}))}),"WithRTL");return{useRtl:n,withRtl:u}}},80975:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(2037),i=n(99196),o=n.n(i);function s(t){function e(){var e=t.translate.bind(t);return Object.defineProperty(e,"localeSlug",{get:t.getLocaleSlug.bind(t)}),e}return function(){var n=o().useState(e),i=(0,r.Z)(n,2),s=i[0],c=i[1];return o().useEffect((function(){var n=function(){return c(e)};return t.on("change",n),function(){return t.off("change",n)}}),[]),s}}},59503:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},75565:function(t,e,n){var r=n(2571),i=n(59503);function o(t){if(!(this instanceof o))return new o(t);"number"==typeof t&&(t={max:t}),t||(t={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=t.max||1e3,this.maxAge=t.maxAge||0}t.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];return delete this.cache[t],this._unlink(t,e.prev,e.next),e.value}},o.prototype._unlink=function(t,e,n){this.length--,0===this.length?this.head=this.tail=null:this.head===t?(this.head=e,this.cache[this.head].next=null):this.tail===t?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[e].next=n,this.cache[n].prev=e)},o.prototype.peek=function(t){if(this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return e.value}},o.prototype.set=function(t,e){var n;if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){if((n=this.cache[t]).value=e,this.maxAge&&(n.modified=Date.now()),t===this.head)return e;this._unlink(t,n.prev,n.next)}else n={value:e,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[t]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=t),this.head=t,this.tail||(this.tail=t),e},o.prototype._checkAge=function(t,e){return!(this.maxAge&&Date.now()-e.modified>this.maxAge)||(this.remove(t),this.emit("evict",{key:t,value:e.value}),!1)},o.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},o.prototype.evict=function(){if(this.tail){var t=this.tail,e=this.remove(this.tail);this.emit("evict",{key:t,value:e})}}},48282:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},32002:function(t){var e=1e3,n=60*e,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,u){u=u||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===a&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return c(t,o,i,"day");if(o>=r)return c(t,o,r,"hour");if(o>=n)return c(t,o,n,"minute");if(o>=e)return c(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1625:function(t){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var s,c,u=i(t),a=1;a<arguments.length;a++){for(var l in s=Object(arguments[a]))n.call(s,l)&&(u[l]=s[l]);if(e){c=e(s);for(var p=0;p<c.length;p++)r.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u}},88090:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(7478),i={contextDelimiter:"",onMissingKey:null};function o(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},i)this.options[n]=void 0!==e&&n in e?e[n]:i[n]}o.prototype.getPluralForm=function(t,e){var n,i,o,s=this.pluralForms[t];return s||("function"!=typeof(o=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(i)),s=this.pluralForms[t]=o),s(e)},o.prototype.dcnpgettext=function(t,e,n,r,i){var o,s,c;return o=void 0===i?0:this.getPluralForm(t,i),s=n,e&&(s=e+this.options.contextDelimiter+n),(c=this.data[t][s])&&c[o]?c[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)}},48701:function(t,e,n){"use strict";n.d(e,{hj:function(){return s},Vm:function(){return c}});var r=n(72670),i=n(92819);const o={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};Object.keys(o).map((t=>{const{symbol:e}=(0,r.X)(t);return{value:t,label:e===t?t:`${t} ${(0,i.trimEnd)(e,".")}`}}));function s(t){return o[t]}function c(t,e){return t?"number"==typeof t?t:(t=parseFloat(t.replace(new RegExp("\\"+r.M[e].grouping,"g"),"").replace(new RegExp("\\"+r.M[e].decimal,"g"),".")),isNaN(t)?null:t):null}},15894:function(t,e,n){"use strict";function r(t){if("https://subscribe.wordpress.com"===t.origin&&t.data){const e=JSON.parse(t.data);e&&"close"===e.action&&(window.removeEventListener("message",r),tb_remove())}}n.d(e,{f:function(){return i}});const i=t=>{Array.prototype.slice.call(document.querySelectorAll(t)).forEach((t=>{if("true"!==t.getAttribute("data-jetpack-memberships-button-initialized")){try{!function(t){t.addEventListener("click",(e=>{e.preventDefault();const n=t.getAttribute("href");window.scrollTo(0,0),tb_show(null,n+"&display=alternate&TB_iframe=true",null),window.addEventListener("message",r,!1),document.querySelector("#TB_window").classList.add("jetpack-memberships-modal"),window.scrollTo(0,0)}))}(t)}catch(t){console.error("Problem setting up Thickbox",t)}t.setAttribute("data-jetpack-memberships-button-initialized","true")}}))}},84178:function(t,e,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},72670:function(t,e,n){"use strict";n.d(e,{M:function(){return r},X:function(){return i}});var r={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 i(t){return r[t]||{symbol:"$",grouping:",",decimal:".",precision:2}}},43626:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var r=n(92086),i=n(63807),o=n(72670);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,o.X)(e);if(!s||isNaN(t))return null;var c=(0,r.Z)({},s,n),u=c.decimal,a=c.grouping,l=c.precision,p=c.symbol,f=t<0?"-":"",m=(0,i.Y4)(Math.abs(t),{decimals:l,thousandsSep:a,decPoint:u});return"".concat(f).concat(p).concat(m)}},28457:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(99196),i=n(10089);function o(t,e){let n,i,s=[];for(let r=0;r<t.length;r++){const o=t[r];if("string"!==o.type){if(void 0===e[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof e[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=e[o.value],i=r;break}s.push(e[o.value])}else s.push(o.value)}if(n){const c=function(t,e){const n=e[t];let r=0;for(let i=t+1;i<e.length;i++){const t=e[i];if(t.value===n.value){if("componentOpen"===t.type){r++;continue}if("componentClose"===t.type){if(0===r)return i;r--}}}throw new Error("Missing closing component token `"+n.value+"`")}(i,t),u=o(t.slice(i+1,c),e),a=(0,r.cloneElement)(n,{},u);if(s.push(a),c<t.length-1){const n=o(t.slice(c+1),e);s=s.concat(n)}}return s=s.filter(Boolean),0===s.length?null:1===s.length?s[0]:(0,r.createElement)(r.Fragment,null,...s)}function s(t){const{mixedString:e,components:n,throwErrors:r}=t;if(!n)return e;if("object"!=typeof n){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because components is not an object`);return e}const s=(0,i.Z)(e);try{return o(s,n)}catch(t){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because of error \`${t.message}\``);return e}}},10089:function(t,e,n){"use strict";function r(t){return t.startsWith("{{/")?{type:"componentClose",value:t.replace(/\W/g,"")}:t.endsWith("/}}")?{type:"componentSelfClosing",value:t.replace(/\W/g,"")}:t.startsWith("{{")?{type:"componentOpen",value:t.replace(/\W/g,"")}:{type:"string",value:t}}function i(t){return t.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}n.d(e,{Z:function(){return i}})},64473:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.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.log=console.debug||console.log||(()=>{}),t.exports=n(5434)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5434:function(t,e,n){t.exports=function(t){function e(t){let n,i,o,s=null;function c(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!c.enabled)return;const o=c,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";a++;const i=e.formatters[n];if("function"==typeof i){const e=r[a];t=i.call(o,e),r.splice(a,1),a--}return t})),e.formatArgs.call(o,r);const l=o.log||e.log;l.apply(o,r)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=r,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(c),c}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(32002),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},11043:function(t,e,n){"use strict";var r=n(1625),i=n(99196);e.useSubscription=function(t){var e=t.getCurrentValue,n=t.subscribe,o=i.useState((function(){return{getCurrentValue:e,subscribe:n,value:e()}}));t=o[0];var s=o[1];return o=t.value,t.getCurrentValue===e&&t.subscribe===n||(o=e(),s({getCurrentValue:e,subscribe:n,value:o})),i.useDebugValue(o),i.useEffect((function(){function t(){if(!i){var t=e();s((function(i){return i.getCurrentValue!==e||i.subscribe!==n||i.value===t?i:r({},i,{value:t})}))}}var i=!1,o=n(t);return t(),function(){i=!0,o()}}),[e,n]),o}},20036:function(t,e,n){"use strict";t.exports=n(11043)},99196:function(t){"use strict";t.exports=window.React},92819:function(t){"use strict";t.exports=window.lodash},94333:function(t){"use strict";t.exports=window.wp.compose},47701:function(t){"use strict";t.exports=window.wp.domReady},39630:function(t){"use strict";t.exports=window.wp.keycodes},96483:function(t){"use strict";t.exports=window.wp.url},74234:function(t,e,n){"use strict";function r(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}n.d(e,{Z:function(){return r}})},91873:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{Z:function(){return r}})},46339:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(74234);function i(t){if(Array.isArray(t))return(0,r.Z)(t)}},75808:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:function(){return r}})},6438:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},68384:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:function(){return i}})},31615:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(77557),i=n(90840),o=n(26168);function s(t){var e=(0,i.Z)();return function(){var n,i=(0,r.Z)(t);if(e){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return(0,o.Z)(this,n)}}},61285:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},4291:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:function(){return r}})},77557:function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{Z:function(){return r}})},80601:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(14239);function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,r.Z)(t,e)}},90840:function(t,e,n){"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}n.d(e,{Z:function(){return r}})},22329:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{Z:function(){return r}})},85180:function(t,e,n){"use strict";function r(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(t);!(_n=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{_n||null==n.return||n.return()}finally{if(s)throw i}}return o}}n.d(e,{Z:function(){return r}})},93125:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},19423:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},20623:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(61285);function i(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}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},26168:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(99377),i=n(75808);function o(t,e){if(e&&("object"===(0,r.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},14239:function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:function(){return r}})},2037:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(91873),i=n(85180),o=n(61081),s=n(93125);function c(t,e){return(0,r.Z)(t)||(0,i.Z)(t,e)||(0,o.Z)(t,e)||(0,s.Z)()}},57810:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(46339),i=n(22329),o=n(61081),s=n(19423);function c(t){return(0,r.Z)(t)||(0,i.Z)(t)||(0,o.Z)(t)||(0,s.Z)()}},99377:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{Z:function(){return r}})},61081:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(74234);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(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(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}},99788:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},92086:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(99788);function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?Object(arguments[e]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach((function(e){(0,r.Z)(t,e,n[e])}))}return t}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"}(),function(){"use strict";n(84178)}(),function(){"use strict";var t=n(43626),e=n(47701),r=n.n(e),i=n(39630),o=n(96483),s=n(48701),c=n(15894);class u{constructor(t){this.block=t,this.amount=null,this.isCustomAmount=!1,this.interval="one-time",this.initNavigation(),this.handleCustomAmount(),this.handleChosenAmount(),this.block.querySelector(".donations__container").classList.add("loaded")}getNavItem(t){return this.block.querySelector(`.donations__nav-item[data-interval="${t}"]`)}resetSelectedAmount(){const t=this.block.querySelector(".donations__amount.is-selected");t&&t.classList.remove("is-selected")}getDonateButton(){return this.block.querySelector(`.donations__donate-button.${{"one-time":"donations__one-time-item","1 month":"donations__monthly-item","1 year":"donations__annual-item"}[this.interval]}`)}toggleDonateButton(t){const e=this.getDonateButton();t?e.classList.remove("is-disabled"):e.classList.add("is-disabled")}updateUrl(){const t=this.getDonateButton(),e=t.getAttribute("href");this.amount?t.setAttribute("href",(0,o.addQueryArgs)(e,{amount:this.amount,...this.isCustomAmount&&{customAmount:!0}})):t.setAttribute("href",(0,o.removeQueryArgs)(e,"amount","customAmount"))}updateAmountFromCustomAmountInput(){const t=this.block.querySelector(".donations__custom-amount .donations__amount-value"),e=this.block.querySelector(".donations__custom-amount"),n=t.innerHTML;if(!n)return this.amount=null,void this.toggleDonateButton(!1);const r=t.dataset.currency,i=(0,s.Vm)(n,r);i&&i>=(0,s.hj)(r)?(e.classList.remove("has-error"),this.amount=i,this.toggleDonateButton(!0)):(e.classList.add("has-error"),this.amount=null,this.toggleDonateButton(!1)),this.updateUrl()}initNavigation(){const t=this.block.querySelectorAll(".donations__nav-item"),e=this.block.querySelector(".donations__tab"),n={"one-time":"is-one-time","1 month":"is-monthly","1 year":"is-annual"},r=t=>{const r=this.interval,i=t.target.dataset.interval;this.interval=i;const o=this.getNavItem(r);o&&o.classList.remove("is-active");const s=this.getNavItem(i);s&&s.classList.add("is-active"),e.classList.remove(n[r]),e.classList.add(n[i]),this.amount=null,this.isCustomAmount=!1,this.resetSelectedAmount(),this.updateUrl(),this.toggleDonateButton(!1)};t.forEach((t=>{t.addEventListener("click",r),t.addEventListener("keydown",r)}));const i=this.getNavItem(this.interval);i&&i.classList.add("is-active"),e.classList.add(n[this.interval])}handleCustomAmount(){const e=this.block.querySelector(".donations__custom-amount .donations__amount-value");if(!e)return;const n=this.block.querySelector(".donations__custom-amount");e.setAttribute("contenteditable",""),e.addEventListener("keydown",(t=>{t.keyCode===i.ENTER&&t.preventDefault()})),e.addEventListener("focus",(()=>{this.resetSelectedAmount(),n.classList.add("is-selected"),this.isCustomAmount||(this.isCustomAmount=!0,this.updateAmountFromCustomAmountInput())})),e.addEventListener("blur",(()=>{this.isCustomAmount&&this.amount&&(e.innerHTML=(0,t.ZP)(this.amount,e.dataset.currency,{symbol:""}))})),e.addEventListener("input",(()=>this.updateAmountFromCustomAmountInput()))}handleChosenAmount(){this.block.querySelectorAll(".donations__amount:not( .donations__custom-amount )").forEach((t=>{t.addEventListener("click",(t=>{this.resetSelectedAmount(),t.target.classList.add("is-selected"),this.amount=t.target.dataset.amount,this.isCustomAmount=!1;const e=this.block.querySelector(".donations__custom-amount");e&&e.classList.remove("has-error"),this.updateUrl();this.getDonateButton().classList.remove("is-disabled")}))})),this.block.querySelectorAll(".donations__donate-button").forEach((t=>t.classList.add("is-disabled")))}}r()((()=>{document.querySelectorAll(".wp-block-jetpack-donations").forEach((t=>new u(t))),(0,c.f)(".donations__donate-button")}))}()}();
_inc/blocks/editor-beta.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => 'cb9896b681c69c6339d47d4145b91757');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => 'b364e927bc24aa8b2bc078a6a83b7f02');
_inc/blocks/editor-beta.js CHANGED
@@ -1,5 +1,5 @@
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
- !function(){var e,t,n,r,a,o,i={94502:function(e){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},e.exports.__esModule=!0,e.exports.default=e.exports},80236:function(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":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 a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(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(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},76502:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},79071:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},77104:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=o},59372:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}));t.Z=o},61455:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},57324:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M8 5C8 3.34315 9.34315 2 11 2H13C14.6569 2 16 3.34315 16 5V9H18C19.2624 9 20 9.9804 20 11V19C20 20.0196 19.2624 21 18 21H6C4.73763 21 4 20.0196 4 19V11C4 9.9804 4.73763 9 6 9H8V5ZM9.5 9H14.5V5C14.5 4.17157 13.8284 3.5 13 3.5H11C10.1716 3.5 9.5 4.17157 9.5 5V9Z"}));t.Z=o},61449:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},90449:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},18160:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},64369:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},30483:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):h(a,a.length)}function m(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 h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(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(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.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 a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);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},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},96342:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function a(a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,g=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,p=void 0!==j.locale?j.locale:"",d=j.localeOptions||{},y=void 0!==j.separator?j.separator:"",E=void 0!==j.spacer?j.spacer:k?"":" ",_=j.symbols||{},w=2===i?j.standard||"iec":"jedec",f=j.output||"string",c=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],o=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(a))<0,l=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(l)))<0&&(o=0),o>8&&(S>0&&(S+=8-o),o=8),"exponent"===f)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[w][s?"bits":"bytes"][o];else{P=h/(2===i?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(P*=8)>=l&&o<8&&(P/=l,o++);var T=Math.pow(10,o>0?b:0);x[0]=C(P*T)/T,x[0]===l&&o<8&&void 0===j.exponent&&(x[0]=1,o++),v=x[1]=10===i&&1===o?s?"kbit":"kB":t[w][s?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===p?x[0]=x[0].toLocaleString():p.length>0?x[0]=x[0].toLocaleString(p,d):y.length>0&&(x[0]=x[0].toString().replace(".",y)),g&&!1===Number.isInteger(x[0])&&b>0){var A=y||".",N=x[0].toString().split(A),I=N[1]||"",B=I.length,M=b-B;x[0]="".concat(N[0]).concat(A).concat(I.padEnd(B+M,"0"))}return c&&(x[1]=u[o]?u[o]:n[w][o]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===f?x:"object"===f?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(E)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){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=o,o.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 a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.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 a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.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]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,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}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(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 l(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=a,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),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];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=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}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,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},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,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>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}},88617:function(e,t,n){"use strict";var r=n(92450),a=n(99788),o=n(64473),i=n.n(o),s=n(28457),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(92846),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(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 S(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function j(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return S(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;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:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.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||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.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!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=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)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}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 l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=S(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=S(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!j(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=j(this,e);if(t||(t=S(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},63807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(88617),a=n(42928),o=n(80975),i=n(24531),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},42928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64316),a=n(32829),o=n(11178),i=n(71904),s=n(82590),l=n(45492),c=n(99788),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},92846:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},24531:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(95332),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(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(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},80975:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(11710),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"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}}},35166:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var a,o=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?g(f(e)):f(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var o=e[r],i=e[r+1],l=e[r+2],c=o<<16|i<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==i?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[c(r>>>16),c(r>>>8&255),c(255&r)];return a.length-=[0,0,2,1][n],a.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return w(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:P,toBase64:b,utob:d,encode:b,encodeURI:v,btou:w,decode:P,noConflict:T,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return b(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(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=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.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}},o.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)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.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},o.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)},o.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}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},95319:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(85645),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S=e.lineMax,j=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(j++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,j++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=j>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=j-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((j=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(j++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[d]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,j++;u=j>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=j-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(95319),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x,P,T,A,N,I,B,M=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(M=!0),(P=o(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(A,P-1)),M&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(M&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(B=e.push("ordered_list_open","ol",1),1!==v&&(B.attrs=[["start",v]])):B=e.push("bullet_list_open","ul",1),B.map=f=[t,0],B.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(B=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),B.map=m=[t,0],d&&(B.info=e.src.slice(A,P-1)),j=e.tight,S=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=C,e.tight=j,(B=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){N=!0;break}if(N)break;if(d){if((P=o(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(B=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(j=t.md.options.quotes[2],x=t.md.options.quotes[3]):(j=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,j),p+=x.length-1,h.token===n&&(p+=j.length-1),d=(c=i.content).length,S.length=_;continue e}E?S.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var S="",j=0,x=C.length;j<x;j++)C.charCodeAt(j)>127?S+="x":S+=C[j];if(!S.match(c)){var P=_.slice(0,r),T=_.slice(r+1),A=C.match(u);A&&(P.push(A[1]),T.unshift(A[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=f.indexOf("#");-1!==N&&(this.hash=f.substr(N),f=f.slice(0,N));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},40676:function(){},95593:function(){},8500:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\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(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(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(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(64473),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},52504:function(e,t,n){"use strict";var r=n(62265);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},23698:function(e,t,n){e.exports=n(52504)()},62265:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},31027:function(e,t,n){var r=n(89403);function a(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}a.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=a},50771:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},652:function(e){e.exports={L:1,M:0,Q:3,H:2}},97044:function(e,t,n){var r=n(27280);function a(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}a.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(o)));return new a(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=r.gexp(r.glog(e.get(o))+t);return new a(n,0).mod(e)}},e.exports=a},1596:function(e,t,n){var r=n(31027),a=n(88487),o=n(50771),i=n(83186),s=n(97044);function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=a.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),i.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var a=0;a<this.modules.length;a++)for(var o=1*a,i=0;i<this.modules[a].length;i++){var s=1*i;this.modules[a][i]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=i.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],a=e[n];if(null==this.modules[r][a])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][a+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(e){for(var t=i.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=i.getBCHTypeInfo(n),a=0;a<15;a++){var o=!e&&1==(r>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o}for(a=0;a<15;a++){o=!e&&1==(r>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,a=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>a&1)),i.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--a&&(o++,a=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=a.getRSBlocks(e,t),s=new o,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),i.getLengthInBits(u.mode,e)),u.write(s)}var p=0;for(c=0;c<r.length;c++)p+=r[c].dataCount;if(s.getLengthInBits()>8*p)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*p+")");for(s.getLengthInBits()+4<=8*p&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*p||(s.put(l.PAD0,8),s.getLengthInBits()>=8*p));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,a=0,o=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,p=t[c].totalCount-u;r=Math.max(r,u),a=Math.max(a,p),o[c]=new Array(u);for(var d=0;d<o[c].length;d++)o[c][d]=255&e.buffer[d+n];n+=u;var m=i.getErrorCorrectPolynomial(p),h=new s(o[c],m.getLength()-1).mod(m);l[c]=new Array(m.getLength()-1);for(d=0;d<l[c].length;d++){var f=d+h.getLength()-l[c].length;l[c][d]=f>=0?h.get(f):0}}var g=0;for(d=0;d<t.length;d++)g+=t[d].totalCount;var b=new Array(g),v=0;for(d=0;d<r;d++)for(c=0;c<t.length;c++)d<o[c].length&&(b[v++]=o[c][d]);for(d=0;d<a;d++)for(c=0;c<t.length;c++)d<l[c].length&&(b[v++]=l[c][d]);return b},e.exports=l},88487:function(e,t,n){var r=n(652);function a(e,t){this.totalCount=e,this.dataCount=t}a.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],a.getRSBlocks=function(e,t){var n=a.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,i=0;i<r;i++)for(var s=n[3*i+0],l=n[3*i+1],c=n[3*i+2],u=0;u<s;u++)o.push(new a(l,c));return o},a.getRsBlockTable=function(e,t){switch(t){case r.L:return a.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return a.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return a.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return a.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=a},27280:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},89403:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},83186:function(e,t,n){var r=n(89403),a=n(97044),o=n(27280),i=0,s=1,l=2,c=3,u=4,p=5,d=6,m=7,h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;h.getBCHDigit(t)-h.getBCHDigit(h.G15)>=0;)t^=h.G15<<h.getBCHDigit(t)-h.getBCHDigit(h.G15);return(e<<10|t)^h.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;h.getBCHDigit(t)-h.getBCHDigit(h.G18)>=0;)t^=h.G18<<h.getBCHDigit(t)-h.getBCHDigit(h.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return h.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case i:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case m:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new a([1],0),n=0;n<e;n++)t=t.multiply(new a([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var a=0;a<t;a++){for(var o=0,i=e.isDark(r,a),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)a+l<0||t<=a+l||0==s&&0==l||i==e.isDark(r+s,a+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(a=0;a<t-1;a++){var c=0;e.isDark(r,a)&&c++,e.isDark(r+1,a)&&c++,e.isDark(r,a+1)&&c++,e.isDark(r+1,a+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(a=0;a<t-6;a++)e.isDark(r,a)&&!e.isDark(r,a+1)&&e.isDark(r,a+2)&&e.isDark(r,a+3)&&e.isDark(r,a+4)&&!e.isDark(r,a+5)&&e.isDark(r,a+6)&&(n+=40);for(a=0;a<t;a++)for(r=0;r<t-6;r++)e.isDark(r,a)&&!e.isDark(r+1,a)&&e.isDark(r+2,a)&&e.isDark(r+3,a)&&e.isDark(r+4,a)&&!e.isDark(r+5,a)&&e.isDark(r+6,a)&&(n+=40);var u=0;for(a=0;a<t;a++)for(r=0;r<t;r++)e.isDark(r,a)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=h},93527:function(e,t,n){"use strict";function r(e){return 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},r(e)}var a=["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"],o=["value","size","level","bgColor","fgColor","includeMargin","imageSettings"],i=["renderAs"];function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(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}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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)}}function m(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var a=k(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=n(99196),w=(n(23698),n(1596)),_=n(652);function C(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var S={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var a=null;e.forEach((function(o,i){if(!o&&null!==a)return n.push("M".concat(a+t," ").concat(r+t,"h").concat(i-a,"v1H").concat(a+t,"z")),void(a=null);if(i!==e.length-1)o&&null===a&&(a=i);else{if(!o)return;null===a?n.push("M".concat(i+t,",").concat(r+t," h1v1H").concat(i+t,"z")):n.push("M".concat(a+t,",").concat(r+t," h").concat(i+1-a,"v1H").concat(a+t,"z"))}}))})),n.join("")}function x(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function P(e,t){var n=e.imageSettings,r=e.size,a=e.includeMargin;if(null==n)return null;var o=a?4:0,i=t.length+2*o,s=Math.floor(.1*r),l=i/r,c=(n.width||s)*l,u=(n.height||s)*l,p=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,m=null;if(n.excavate){var h=Math.floor(p),f=Math.floor(d);m={x:h,y:f,w:Math.ceil(c+p-h),h:Math.ceil(u+d-f)}}return{x:p,y:d,h:u,w:c,excavation:m}}var T=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),A=function(e){h(n,e);var t=g(n);function n(){var e;p(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return y(v(e=t.call.apply(t,[this].concat(a))),"_canvas",void 0),y(v(e),"_image",void 0),y(v(e),"state",{imgLoaded:!1}),y(v(e),"handleImageLoad",(function(){e.setState({imgLoaded:!0})})),e}return m(n,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,o=e.fgColor,i=e.includeMargin,s=e.imageSettings,l=new w(-1,_[r]);if(l.addData(C(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var p=l.modules;if(null===p)return;var d=i?4:0,m=p.length+2*d,h=P(this.props,p);null!=s&&null!=h&&null!=h.excavation&&(p=x(p,h.excavation));var f=window.devicePixelRatio||1;c.height=c.width=n*f;var g=n/m*f;u.scale(g,g),u.fillStyle=a,u.fillRect(0,0,m,m),u.fillStyle=o,T?u.fill(new Path2D(j(p,d))):p.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=h&&u.drawImage(this._image,h.x+d,h.y+d,h.w,h.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),o=(t.includeMargin,t.imageSettings),i=u(t,a),l=c({height:n,width:n},r),p=null,d=o&&o.src;return null!=o&&null!=d&&(p=E.createElement("img",{src:d,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),E.createElement(E.Fragment,null,E.createElement("canvas",s({style:l,height:n,width:n,ref:function(t){return e._canvas=t}},i)),p)}}]),n}(E.PureComponent);y(A,"defaultProps",S);var N=function(e){h(n,e);var t=g(n);function n(){return p(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,i=e.fgColor,l=e.includeMargin,c=e.imageSettings,p=u(e,o),d=new w(-1,_[r]);d.addData(C(t)),d.make();var m=d.modules;if(null===m)return null;var h=l?4:0,f=m.length+2*h,g=P(this.props,m),b=null;null!=c&&null!=g&&(null!=g.excavation&&(m=x(m,g.excavation)),b=E.createElement("image",{xlinkHref:c.src,height:g.h,width:g.w,x:g.x+h,y:g.y+h,preserveAspectRatio:"none"}));var v=j(m,h);return E.createElement("svg",s({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},p),E.createElement("path",{fill:a,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),E.createElement("path",{fill:i,d:v}),b)}}]),n}(E.PureComponent);y(N,"defaultProps",S);var I=function(e){var t=e.renderAs,n=u(e,i),r="svg"===t?N:A;return E.createElement(r,n)};I.defaultProps=c({renderAs:"canvas"},S),e.exports=I},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},94131:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=a(o),r=a(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},2723:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),j=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=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),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},85325:function(e,t,n){"use strict";var r=n(64473),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=(0,o.assign)(s,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},85482:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(23698),l=n.n(s),c=n(99196),u=n.n(c),p=n(89105),d=n.n(p),m=n(65736);const __=m.__;class h extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,o=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(c.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}i()(h,"propTypes",{className:l().string,width:l().number,height:l().number,showText:l().bool,logoColor:l().string}),i()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=h},77953:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(99196),a=n.n(r),o=n(93527),i=n.n(o);function s(e){let{value:t="https://jetpack.com",bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c="canvas",size:u=248}=e;return a().createElement(i(),{value:t,size:u,bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c})}},64481:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;var a;"undefined"!=typeof window&&(r=null===(a=window.Initial_State)||void 0===a?void 0:a.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return r}})},19416:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Ug:function(){return o.Ug},aQ:function(){return o.aQ},M6:function(){return o.M6},Wp:function(){return o.Wp},OZ:function(){return i.Z},o_:function(){return s.Z},T:function(){return l.Z},Qq:function(){return c.Qq},X1:function(){return c.X1},_D:function(){return c._D},Rl:function(){return c.Rl},FK:function(){return c.FK},HD:function(){return c.HD},m3:function(){return c.m3}});var r=n(10970),a=n(72934),o=n(99665),i=n(86205),s=n(95044),l=n(22801),c=n(34201)},10970:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},86205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(10970);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},72934:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},34201:function(e,t,n){"use strict";n.d(t,{Qq:function(){return u},X1:function(){return p},_D:function(){return d},Rl:function(){return m},FK:function(){return f},HD:function(){return g},m3:function(){return b}});var r=n(92819),a=n(96483),o=n(65736),i=n(99665),s=n(10970),l=n(86205),c=n(72934);const __=o.__;function u(e){let{planSlug:t,plan:n,postId:o,postType:s}=e;const l=(0,r.startsWith)(t,"jetpack_")?t:(0,r.get)(n,["path_slug"]),u=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/admin.php`,{page:"gutenberg-edit-site",postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,i.Wp)()?(0,a.addQueryArgs)("/"+(0,r.compact)([e,s,(0,c.Z)(),o]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:o,plan_upgraded:1})})();return(0,i.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):l&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${l}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,l.Z)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,l.Z)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function f(){return(0,r.get)((0,s.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,r.map)(h,"name").includes(e),b=e=>(0,r.head)((0,r.filter)(h,(t=>{let{name:n}=t;return n===e})))},95044:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(86205);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99665:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s},aQ:function(){return l}});var r=n(10970);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}function l(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_coming_soon)&&void 0!==e&&e}},22801:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94333);t.Z=e=>(0,o.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},78101:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},63415:function(e,t,n){"use strict";var r=n(78101),a=n(85325);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},26995:function(e,t,n){"use strict";var r=n(44520);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},17495:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},28823:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(46139),p=n(17495);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,S=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{variant:"secondary",type:"submit"},__("Preview","jetpack")))),j=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},j,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,variant:"primary",className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():S)}))},46139:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},12700:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(26995),o=n(28823),i=n(46139),s=n(4597);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},9691:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(4597),s=n(64832);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},24318:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},88584:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},60749:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(24318),g=n(88584),b=n(27313);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},27313:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(60749),s=n(6029),l=n(4597);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},10078:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},49580:function(e,t,n){"use strict";var r=n(44520);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},54043:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(95260);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},47345:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},87487:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},95260:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},58036:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(54043),o=n(47345),i=n(87487);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},14351:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(10078),d=n(58036),m=n(95260),h=n(95506);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),S=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),j={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:S,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:j,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},57234:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},67071:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(49580),o=n(14351),i=n(57234),s=n(16245),l=n(88938);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},16245:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(95260);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),S={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g}))}},95506:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},56494:function(e,t,n){"use strict";var r=n(44520);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},58522:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(89419);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},27967:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(44520);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},3618:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(32232),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(25067),h=n(56494),f=n(56213),g=n(86105),b=n(20145),v=n(95359),k=n(58522);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:P,style:T,url:A}=C,[N,I]=(0,o.useState)(A),[B,M]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{A&&b.lR!==A&&"link"!==T&&(0,v.Z)(A,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(N);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),M(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:N||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:P});return`${A}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),H=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let V=n;return A&&!B&&(V+=` calendly-style-${T}`),(0,o.createElement)("div",{className:V},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:N,isEditingUrl:B,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:M})),A&&!B?"inline"===T?$:H:U)}))},25067:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},20145:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(56494),i=n(27967),s=n(3618),l=n(25067),c=n(48878),u=n(86105),p=n(4597);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},48878:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},86105:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},68328:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},45977:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},73006:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(45977);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{variant:"secondary",onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},57034:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(73006),c=n(84766);const __=s.__,u=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM plugin is installed but has an invalid version.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Please update to the latest version of the Jetpack CRM plugin to integrate your contact form with your CRM.","jetpack")),m=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(i.Button,{variant:"secondary",icon:(0,r.createElement)(i.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},h=e=>{let{installAndActivateCRMPlugin:t,isInstalling:n}=e,a=(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Install Jetpack CRM","jetpack"));return n&&(a=(0,r.createElement)(m,null)),(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("You can save contacts from Jetpack contact forms in Jetpack CRM.","jetpack"),(0,r.createElement)("br",null),a))},f=e=>{let{activateCRMPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("You already have the Jetpack CRM plugin installed, but it’s not activated.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(m,{isActivating:!0}),!n&&(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Activate the Jetpack CRM plugin","jetpack")))},g=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i,onCRMPluginClick:s,isInstalling:l}=e;const m=o().coerce(t.crm_version);if(t.crm_installed&&!m)return(0,r.createElement)(p,null);if(t.crm_installed&&o().lt(m,"4.9.1"))return(0,r.createElement)(d,null);let b=u.NOT_INSTALLED;return t.crm_active?b=u.ACTIVE:t.crm_installed&&(b=u.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},u.ACTIVE===b&&(0,r.createElement)(g,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),u.INSTALLED===b&&(0,r.createElement)(f,{activateCRMPlugin:()=>s(c.bu,"zero-bs-crm/ZeroBSCRM"),isInstalling:l}),u.NOT_INSTALLED===b&&(0,r.createElement)(h,{installAndActivateCRMPlugin:()=>s(c.yX,"zero-bs-crm"),isInstalling:l}))}},75873:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(57034);const __=s.__,c=(e,t,n)=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((n=>{if(n.error)throw n.message;e(!1),t(n)})).catch((()=>e(!0))).finally((()=>n(!1)))},u=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,o]=(0,r.useState)(!0),[s,l]=(0,r.useState)(!1),[p,d]=(0,r.useState)(),[m,h]=(0,r.useState)(!1),f=(0,r.useCallback)(((e,t)=>{h(!0),e(t).catch((()=>{l(!0)})).finally((()=>{h(!1),o(!0),c(l,d,o)}))}),[h,l,o]);return(0,r.useEffect)((()=>{c(l,d,o)}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(u,{isFetchingCRMData:a,hasCRMDataError:s,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n,isInstalling:m,onCRMPluginClick:f})))}},44199:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(1092),c=n(80984);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},73503:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(1092),c=n(37232),u=n(79990);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
  __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},80984:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(6029),l=n(37232),c=n(79990);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},79990:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},1092:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},23702:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(1092),l=n(49946),c=n(80984);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},69653:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(1092),s=n(80984);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},37232:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>t({width:e})},e,"%")))))}},61679:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(80236),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(1092),p=n(80984);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},84626:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},7096:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(92819),i=n(84766),s=n(15576),l=n(78822);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},15576:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},78822:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(19416),o=n(55609),i=n(65736),s=n(84766),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{variant:"secondary",icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},66326:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(84626),s=n(7096);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},49946:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},43156:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(68328);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],u={attributes:{...l.Z},supports:{html:!1},save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)},p={attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)};t.Z=[u,p]},38945:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(19416),g=n(87966),b=n(44365),v=n(75873),k=n(66326);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c,canUser:u}=e("core"),p=i(t.clientId),d=s("author"),m=d&&c(d)&&c(d).email,h=s("title"),f=u("create","plugins");return{blockType:n&&n(t.name),canUserInstallPlugins:f,defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:p,hasInnerBlocks:p.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:h,postAuthorEmail:m}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:S,className:j,blockType:x,variations:P,defaultVariation:T,canUserInstallPlugins:A}=e;const{to:N,subject:I,customThankyou:B,customThankyouHeading:M,customThankyouMessage:R,customThankyouRedirect:L,jetpackCRM:Z}=t,[D,F]=(0,r.useState)(!1),O=i()(j,"jetpack-contact-form"),z=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,z(r))})),U=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,z(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||U(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===I&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,I,o,c,n]);const $=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),H=e=>{if(0===e.target.value.length)return F(!1),void n({to:p});const t=e.target.value.split(",").map($).filter(Boolean);t&&t.length&&F(t)},V=e=>{F(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==I?I:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${S}-email-${D&&D.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:H,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${S}-email-error`},(()=>{if(D){if(1===D.length)return D[0]&&D[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
@@ -14,7 +14,7 @@ _n("There is currently only %s post in your Instagram account.","There are curre
14
  /* translators: placeholder is a number. */
15
  _n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:r,completer:a}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:p=""}=l[i]||{},{className:d}=a,m=l.length>0,h=m?`components-autocomplete-listbox-${r}`:null,f=m?`components-autocomplete-item-${r}-${p}`:null;return(0,o.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,o.createElement)(c.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,o.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,u.map)(l,((e,t)=>(0,o.createElement)(c.Button,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:s()("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,d.compose)([c.withSpokenMessages,d.withInstanceId,c.withFocusOutside])(h)},71341:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(85728);class s extends o.Component{constructor(){super(...arguments),a()(this,"handleClick",(()=>{const{onClick:e}=this.props;e(this)})),a()(this,"getPoint",(()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]}))}componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:a}=this.props,{handleClick:o}=this,s=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,i.bL)(a.current),c=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(s):(c.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(c).setLngLat(s).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+r+'" mask="url(#c)"/></g></svg>'}render(){return null}}s.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=s},53287:function(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:function(){return r}})},43556:function(e,t,n){"use strict";var r=n(69307),a=n(38275),o=n(8909);class i extends r.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:i,points:s,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,o.t)(a.X.styles,n),f=s.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":i,"data-points":JSON.stringify(s),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=i},38275:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});var r=n(69307),a=n(65736),o=n(56932),i=n(45107),s=n(65765),l=n(34140);const __=a.__,_x=a._x,c={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:o,isDefault:!0},{name:"black_and_white",label:__("Black and white","jetpack"),preview:i},{name:"satellite",label:__("Satellite","jetpack"),preview:s},{name:"terrain",label:__("Terrain","jetpack"),preview:l}],validAlignments:["center","wide","full"],markerIcon:(0,r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},24509:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(52175),u=n(94333),p=n(9818),d=n(20085);const __=l.__,m="editor",h="preview";class f extends o.Component{constructor(){super(...arguments),a()(this,"input",null),a()(this,"state",{activePanel:m}),a()(this,"bindInput",(e=>{this.input=e})),a()(this,"updateSource",(e=>this.props.setAttributes({source:e}))),a()(this,"handleKeyDown",(e=>{const{attributes:t,removeBlock:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())})),a()(this,"toggleMode",(e=>()=>this.setState({activePanel:e})))}componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===h&&this.toggleMode(m)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===m&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:r}=this.props,a=s()(r,"components-button components-tab-button",{"is-pressed":n===e});return(0,o.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,o.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:r}=e,{activePanel:a}=this.state;return!n&&this.isEmpty()?(0,o.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,o.createElement)("div",{className:t},(0,o.createElement)(c.BlockControls,null,(0,o.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(m,__("Markdown","jetpack")),this.renderToolbarButton(h,__("Preview","jetpack")))),a!==h&&n?(0,o.createElement)(c.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:r}):(0,o.createElement)(d.Z,{className:`${t}__preview`,source:r}))}}t.Z=(0,u.compose)([(0,p.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,p.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(f)},8173:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(19416),s=n(24509),l=n(15066),c=n(4597),u=n(88938);const __=a.__,_x=a._x,p="markdown",d=__("Try Markdown","jetpack"),m=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,i.Wp)()||(0,i.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",g={title:__("Markdown","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Use regular characters and punctuation to style text, links, and lists.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:h,foreground:(0,c.m)()},category:(0,u.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!0,margin:!0}}},edit:s.Z,save:l.Z,example:{attributes:{source:`## ## ${d}\n\n${m}`}}}},20085:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(29337),i=n.n(o),s=n(52175);const __=a.__,l=new(i()),c=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=null===s.__experimentalGetSpacingClassesAndStyles||void 0===s.__experimentalGetSpacingClassesAndStyles?void 0:(0,s.__experimentalGetSpacingClassesAndStyles)(e);return null!=t&&t.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:a}=e;return(0,r.createElement)(r.RawHTML,{className:t,onClick:c,style:u(a)},n.length?l.render(n):"")}},15066:function(e,t,n){"use strict";var r=n(69307),a=n(20085);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(a.Z,{className:n,source:t.source,attributes:t})}},1686:function(e,t,n){"use strict";n.d(t,{V1:function(){return l},vW:function(){return c},jn:function(){return u},Eo:function(){return p},fL:function(){return d},ez:function(){return f}});var r,a,o,i=n(65736),s=n(92819);const __=i.__,l=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],c=l.map((e=>e.value));const u={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},p=e=>(0,s.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&u]),d=e=>p(e).map((e=>e.name)),m=null!==(r=null===(a=window)||void 0===a||null===(o=a.Jetpack_Editor_Initial_State)||void 0===o?void 0:o.siteLocale)&&void 0!==r?r:"en-US",h=!(0,s.isEmpty)(m)&&c.includes(m)?m:"en-US",f={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:d()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:h,type:"string",validValues:c},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},21531:function(e,t,n){"use strict";var r=n(69307),a=n(1686);t.Z={attributes:a.ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},36875:function(e,t,n){"use strict";var r=n(69307),a=n(1686);t.Z={attributes:a.ez,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},14530:function(e,t,n){"use strict";var r=n(69307),a=(n(86841),n(89105)),o=n.n(a),i=n(92819),s=n(19416),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(64647),m=n(37571),h=n(28112),f=n(1686),g=n(56213),b=n(8909),v=n(49554);const __=u.__;t.Z=(0,c.withNotices)((function(e){let{attributes:t,className:n,clientId:a,isSelected:k,name:y,noticeOperations:E,noticeUI:w,setAttributes:_}=e;const C=(0,p.getBlockDefaultClassName)(y),S=(0,g.S)(f.ez,t);(0,i.isEqual)(S,t)||_(S);const{align:j,rid:x,iframe:P,domain:T,lang:A,newtab:N,negativeMargin:I}=t,B=(0,i.isEmpty)(x),M=(0,b.t)((0,f.Eo)(),t.className),R=(0,b.t)((0,f.Eo)(x),t.className),L=(0,h.Z)(R),Z=(0,i.isEqual)(x,["1"]);(0,r.useEffect)((()=>{if(E.removeAllNotices(),!B&&!Z&&"wide"===R&&"wide"!==j&&"full"!==j){const e=(0,r.createElement)(r.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));E.createNotice({status:"warning",content:e})}}),[Z,j,B,x,R]),(0,r.useEffect)((()=>{"button"===M&&Array.isArray(x)&&x.length>1&&_({className:"",style:""})}),[x,M,_]),(0,r.useEffect)((()=>{k&&(Array.isArray(x)&&x.length>1?(0,p.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,p.registerBlockStyle)("jetpack/opentable",f.jn))}),[k,x]),(0,r.useEffect)((()=>{"wide"===L&&"wide"===j&&_({align:""}),"wide"===R&&L&&R!==L&&_({align:"wide"}),_({style:R})}),[R]);const D=(0,f.fL)(x),F=e=>x.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?_({rid:e,style:e.length>1&&"button"===R?"standard":R}):(e=>{const t=(0,v.CC)(e);t||(E.removeAllNotices(),E.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,g.S)(f.ez,t);_(n),E.removeAllNotices()})(e)},z=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorAdvancedControls,null,(0,r.createElement)(c.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>_({iframe:!P}),className:"is-opentable"}),"button"===R&&(0,r.createElement)(c.ToggleControl,{label:__("Remove button margin","jetpack"),checked:I,onChange:()=>_({negativeMargin:!I})})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(m.Z,{rids:x,onChange:O}),(0,r.createElement)(c.SelectControl,{label:__("Language","jetpack"),value:A,onChange:e=>_({lang:e}),options:f.V1}),(0,r.createElement)(c.ToggleControl,{label:__("Open in a new window","jetpack"),checked:N,onChange:()=>_({newtab:!N})})))),U=(0,s.Wp)()||(0,s.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",$=(0,r.createElement)(c.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:d.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:w},(0,r.createElement)(m.Z,{rids:x,onSubmit:O}),(0,r.createElement)("div",{className:`${C}-placeholder-links`},(0,r.createElement)(c.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(c.ExternalLink,{href:U},__("Learn more","jetpack")))),H=o()(n,{[`is-style-${R}`]:!B&&D.includes(R)&&-1===n.indexOf("is-style"),"is-placeholder":B,"is-multi":"multi"===F(R)[0],[`align${j}`]:j,"has-no-margin":I});return(0,r.createElement)(r.Fragment,null,w,(0,r.createElement)("div",{className:H},!B&&z,B?$:(e=>{const[t,n]=F(e||R);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${C}-overlay`}),(0,r.createElement)("iframe",{title:(0,u.sprintf)(
16
  /* translators: Placeholder is a unique ID. */
17
- __("Open Table Preview %s","jetpack"),a),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,i.join)(x,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${T}&lang=${A&&f.vW.includes(A)?A:"en-US"}&newtab=${N}&disablega=true`}))})()))}))},64647:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},96152:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(4981),i=n(1686),s=n(21531),l=n(36875),c=n(14530),u=n(64647),p=n(49554),d=n(4597);n(38817);const __=a.__,_x=a._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:u.Z,foreground:(0,d.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:c.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.ez,styles:(0,i.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[s.Z,l.Z]}},37571:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(80236),a=n.n(r),o=n(69307),i=n(92819),s=n(55609),l=n(65736),c=n(93274);const __=l.__,_n=l._n;function u(e){const[t,n]=(0,o.useState)(""),r=(0,c.Z)(t,20),[l,u]=(0,o.useState)(e.rids||[]),p=/^(\d+)$|\(\#(\d+)\)$/,d=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),m=(0,o.createElement)(s.FormTokenField,a()({value:l,suggestions:d,saveTransform:e=>c.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:20,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=p.exec(e);return t[1]||t[2]}));u(n),e.onChange&&e.onChange(n)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,i.isEmpty)(l)?t:l)}},m,(0,o.createElement)(s.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):m)}},28112:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},93274:function(e,t,n){"use strict";n.d(t,{$:function(){return o},Z:function(){return i}});var r=n(92819),a=n(69307);const o=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,a.useState)([]),s=(0,a.useCallback)((0,r.throttle)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>i((0,r.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,a.useEffect)((()=>{(0,r.isEmpty)(e)||o.test(e)||s(e)}),[e]),n}},49554:function(e,t,n){"use strict";n.d(t,{tC:function(){return a},pU:function(){return o},CC:function(){return i}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const i=n.get("domain");i&&(o.domain=i);const s=n.get("iframe");s&&(o.iframe=s);const l=n.get("lang");l&&(o.lang=l);const c=n.get("newtab");return c&&(o.newtab=c),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},12604:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(92819),o=n(65736),i=n(4981),s=n(9818),l=n(52175),c=n(93010);const __=o.__;function u(e){let{name:t,clientId:n}=e;const{blockType:o,hasInnerBlocks:u}=(0,s.useSelect)((e=>{var r;const{getBlocks:a}=e(l.store);return{blockType:(0,i.getBlockType)(t),hasInnerBlocks:(null===(r=a(n))||void 0===r?void 0:r.length)>0}})),{replaceBlock:p,selectBlock:d}=(0,s.useDispatch)(l.store),m=e=>{p(n,(0,i.createBlock)(e.name)),d(n)},h=c.Z.filter((e=>(0,i.getBlockType)(e.name)));(0,r.useEffect)((()=>{u||i.registerBlockVariation||m(h[0])}));return!u&&i.registerBlockVariation?(0,r.createElement)(l.__experimentalBlockVariationPicker,{icon:(0,a.get)(o,["icon","src"]),label:(0,a.get)(o,["title"]),instructions:__("Please select which kind of payment you'd like to add.","jetpack"),variations:h,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h[0];m(e)}}):(0,r.createElement)(l.InnerBlocks,null)}},7603:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(59372),s=n(12604),l=n(4597),c=n(79),u=n(55277),p=n(24993);const __=a.__,_x=a._x,d="payments-intro",m={title:__("Payments","jetpack"),description:__("Sell products and services or receive donations on your website","jetpack"),icon:{src:i.Z,foreground:(0,l.m)()},category:"earn",keywords:[...new Set([c.Xd.title,...c.Xd.keywords,u.Xd.title,...u.Xd.keywords,p.X.title,...p.X.keywords,_x("paid","block search term","jetpack"),_x("pay","block search term","jetpack"),_x("money","block search term","jetpack"),_x("checkout","block search term","jetpack")])],supports:{alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:s.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null)}},93010:function(e,t,n){"use strict";var r=n(24993),a=n(79),o=n(55277);const i=[[a.u2,a.Xd],[o.u2,o.Xd],[r.u,r.X]].map((e=>{var t;let[n,r]=e;return{name:n.includes("/")?n:"jetpack/"+n,title:r.title,description:r.description,icon:null!==(t=r.icon.src)&&void 0!==t?t:r.icon}}));t.Z=i},10815:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(62215);const __=a.__,_x=a._x;function s(e){let{className:t,onSubmit:n,noticeUI:a,url:s,setUrl:l}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:a},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:s,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>l(e.target.value)}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))))}},44641:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981);const __=a.__,_x=a._x;function s(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(o.Button,{variant:"link",onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,i.createBlock)("core/paragraph",{content:(0,r.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},24184:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},85474:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},71197:function(e,t,n){"use strict";var r=n(69307),a=n(86247);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:o}=t;return(0,a.t)(o)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},23457:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(52175),i=n(86247),s=n(85474),l=n(24184),c=n(10815),u=n(44641),p=n(66777);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:d,noticeOperations:m,noticeUI:h,setAttributes:f,onReplace:g}=e;const{url:b}=t,{isFetching:v,pinterestUrl:k,testUrl:y,hasTestUrlError:E}=(0,p.Z)(),[w,_]=(0,r.useState)(!1),[C,S]=(0,r.useState)(""),[j,x]=(0,r.useState)(!1),P=(0,r.useCallback)((()=>(0,r.createElement)(u.Z,{fallbackUrl:C,onClick:g})),[E]),T=()=>{v||(y(C),x(!1))},A=()=>{_(!0)};if((0,r.useEffect)((()=>{b&&y(b)}),[]),(0,r.useEffect)((()=>{!n&&w&&_(!1)}),[n,w]),(0,r.useEffect)((()=>{f({url:k}),m.removeAllNotices(),k&&S(k),E&&m.createErrorNotice(P())}),[k,E,f,P]),v)return(0,r.createElement)(l.Z,null);const N=(0,i.t)(b);if(j||!b||b&&!N)return(0,r.createElement)(c.Z,{className:d,onSubmit:T,noticeUI:h,url:C,setUrl:S});const I=`<a data-pin-do='${N}' href='${b}'></a>`;return(0,r.createElement)("div",{className:d},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.C,{setEditingState:x})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:I,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:A}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:A})))}))},66777:function(e,t,n){"use strict";var r=n(69307),a=n(95359),o=n(62215);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==o.a0&&(n(!0),(0,a.Z)(i).then((e=>{n(!1),s(e),c(!1)})).catch((()=>{n(!1),s(i||void 0),c(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:s}}},62215:function(e,t,n){"use strict";n.d(t,{Wh:function(){return p},a0:function(){return d},u2:function(){return m},qv:function(){return f},Xd:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(23457),l=n(23745),c=n(4597),u=n(71197);const __=a.__,_x=a._x,p=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,d="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),g={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:f,foreground:(0,c.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:s.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.test(e.textContent),transform:e=>(0,i.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:d}},deprecated:[u.Z]}},23745:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},86247:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(96483),a=n(62215);function o(e){if(!a.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},90266:function(e,t,n){"use strict";n.d(t,{G:function(){return s},q:function(){return l}});var r=n(61993),a=n(86989),o=n.n(a),i=n(96483);const s=async()=>await o()({path:"/wpcom/v2/podcast-player/track-quantity"}),l=async e=>{let t,n,a,{url:s,guids:l=[],fetchEpisodeOptions:c=!1}=e;try{t=await o()({path:(0,i.addQueryArgs)("/wpcom/v2/podcast-player",{url:s,guids:l,"episode-options":c})})}catch(e){n=e}if(t)return{type:r.u,data:t};try{a=await o()({path:(0,i.addQueryArgs)("/oembed/1.0/proxy",{url:s})})}catch(e){}const u='<a href="'+s+'">'+s+"</a>";if(a&&a.html!==u)return{type:r.b};throw n}},74134:function(e,t,n){"use strict";var r=n(96483),a=n(44520);t.Z={url:{type:"string",validator:r.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},45187:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(88645);const s=(0,r.memo)((e=>{let{playerId:t,title:n,cover:a,link:o,track:i,children:s,showEpisodeTitle:c,showCoverArt:u,showEpisodeDescription:p,colors:d}=e;return u||c||p?(0,r.createElement)("div",{className:"jetpack-podcast-player__header"},(0,r.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,r.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,r.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),c&&!!(n||i&&i.title)&&(0,r.createElement)(l,{playerId:t,title:n,link:o,track:i,colors:d})),!!(p&&i&&i.description)&&(0,r.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},i.description),s):s})),l=(0,r.memo)((e=>{let{playerId:t,title:n,link:a,track:s,colors:l={primary:{name:null,custom:null,classes:""}}}=e;return(0,r.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!s||!s.title)&&(0,r.createElement)("span",{className:o()("jetpack-podcast-player__current-track-title",l.primary.classes),style:{color:l.primary.custom}},s.title,(0,r.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:s.link||s.src,target:"_blank",rel:"noopener noreferrer nofollow"},i.Z)),!!(s&&s.title&&n)&&(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&(0,r.createElement)(c,{title:n,link:a,colors:l}))})),c=(0,r.memo)((e=>{let{title:t,link:n}=e;return(0,r.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})}));t.Z=s},92674:function(e,t,n){"use strict";var r=n(69307),a=n(22890),o=n(11915);const i=(0,r.memo)((e=>{let{playerId:t,tracks:n,selectTrack:i,currentTrack:s,playerState:l,colors:c}=e;return(0,r.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},n.map(((e,t)=>{const n=s===t;return(0,r.createElement)(o.Z,{key:e.id,index:t,track:e,selectTrack:i,isActive:n,isPlaying:n&&l===a.Wp,isError:n&&l===a.Vy,colors:c})})))}));t.Z=i},11696:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(25158),u=n(94333),p=n(9818),d=n(22890),m=n(75791),h=n(92674),f=n(45187),g=n(81338),b=n(14983);const __=l.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{currentTrack:0,hasUserInteraction:!1}),a()(this,"recordUserInteraction",(()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})})),a()(this,"selectTrack",(e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)})),a()(this,"loadTrack",(e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:n,link:r,description:a}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:n,link:r}),(0,c.speak)(
18
  /* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
19
  `${(0,l.sprintf)(__("Loading: %s","jetpack"),n)} ${a}`,"assertive"),!0})),a()(this,"loadAndPlay",(e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)})),a()(this,"getTrack",(e=>this.props.tracks[e])),a()(this,"handleError",(e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,c.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")})),a()(this,"handlePlay",(()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})})),a()(this,"handlePause",(()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.Vy&&this.props.pauseMediaSource(this.props.playerId)})),a()(this,"handleTimeChange",(e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)})),a()(this,"handleJump",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)})),a()(this,"handleSkip",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)})),a()(this,"updateMediaData",(e=>{var t,n;this.props.updateMediaSourceData(this.props.playerId,{duration:null===(t=e.target)||void 0===t?void 0:t.duration,domId:null===(n=e.target)||void 0===n?void 0:n.id})}))}registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>null!=e&&e.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:r,tracks:a,attributes:i,currentTime:c,playerState:u}=this.props,{itemsToShow:p,primaryColor:d,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,T=a.slice(0,p),A=this.getTrack(P),N=(0,g.Aq)({primaryColor:d,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:w,customBackgroundColor:_}),I={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":C},B=s()("jetpack-podcast-player",u,N.secondary.classes,N.background.classes);return(0,o.createElement)("section",{className:B,style:I,"aria-labelledby":t||A&&A.title?`${e}__title`:void 0,"aria-describedby":A&&A.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,o.createElement)(f.Z,{playerId:e,title:t,link:n,cover:r,track:this.getTrack(P),showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x,colors:N},(0,o.createElement)(m.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:u,currentTime:c,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),T.length>1&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(// translators: %s is the track title.
20
  __("Playlist: %s","jetpack"),t)),(0,o.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,o.createElement)(h.Z,{playerId:e,playerState:u,currentTrack:P,tracks:T,selectTrack:this.selectTrack,colors:N})))}}v.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,u.compose)([b.Z,(0,p.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(d.tT);return{currentTime:r(n),playerState:a(n)}})),(0,p.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(d.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(v)},74347:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=(0,r.memo)((e=>{let{link:t,title:n,colors:o}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:o.secondary.classes,style:{color:o.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,a.sprintf)(
@@ -29,7 +29,7 @@ t=__("Playing:","jetpack"));const l=o[n];return l?(0,r.createElement)("span",{cl
29
  /* translators: This needs to be a single word with no spaces. It describes
30
  the current item in the group. A screen reader will announce it as "[title],
31
  current track". */
32
- b=n?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:f,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),u(p))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),u(p))}},(0,r.createElement)(s.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:i}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&i&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:d}))}));t.Z=u},14983:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(94502),a=n.n(r),o=n(69307),i=n(65736);const __=i.__;function s(e){class t extends o.Component{constructor(){super(...arguments),a()(this,"state",{didError:!1,isIE11AudioIssue:!1}),a()(this,"componentDidCatch",((e,t)=>{this.props.onError(e,t)}))}render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,o.createElement)("section",{className:"jetpack-podcast-player"},(0,o.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,o.createElement)(e,this.props)}}return a()(t,"getDerivedStateFromError",(e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}))),t.defaultProps={onError:()=>{}},t}},61993:function(e,t,n){"use strict";n.d(t,{u:function(){return r},b:function(){return a}});const r="podcast-feed",a="embed-block"},9656:function(e,t,n){"use strict";var r=n(96483),a=n(44520);const o={url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},74699:function(e,t,n){"use strict";var r=n(69307),a=n(64473),o=n.n(a),i=n(92819),s=n(19416),l=n(55609),c=n(94333),u=n(65736),p=n(52175),d=n(9818),m=n(4981),h=n(96483),f=n(56213),g=n(822),b=n(74134),v=n(11696),k=n(81338),y=n(90266),E=n(79777),w=n(60001),_=n(61993),C=n(85728);const __=u.__,S=o()("jetpack:podcast-player:edit"),j=(0,s.Wp)()||(0,s.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/";t.Z=(0,c.compose)([(0,d.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,m.createBlock)("core/embed",{url:r.url}))}}})),(0,p.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),l.withNotices,c.withInstanceId,w.K])((e=>{var t,n;let{instanceId:a,className:o,attributes:s,setAttributes:c,noticeOperations:{createErrorNotice:u,removeAllNotices:d},noticeUI:m,primaryColor:w,setPrimaryColor:x,secondaryColor:P,setSecondaryColor:T,fallbackTextColor:A,backgroundColor:N,setBackgroundColor:I,fallbackBackgroundColor:B,isSelected:M,replaceWithEmbedBlock:R}=e;const L=(0,f.S)(b.Z,s),{url:Z,selectedEpisodes:D,itemsToShow:F,showCoverArt:O,showEpisodeTitle:z,showEpisodeDescription:U,exampleFeedData:$}=L,H=`jetpack-podcast-player-block-${a}`,[V,G]=(0,r.useState)(!1),[q,W]=(0,r.useState)(10),K=(0,r.useRef)(),[{selectedGuid:X,checkUrl:J,...Y},Q]=(0,r.useReducer)(E.J,{editedUrl:Z||"",isEditing:!Z&&!$,isLoading:!1,feedData:$||{},isInteractive:!1,selectedGuid:null==D||null===(t=D[0])||void 0===t?void 0:t.guid,checkUrl:Z||""}),ee=(0,r.useMemo)((()=>(0,i.debounce)((e=>{var t;Q({type:E.N.START_FETCH}),null===(t=K.current)||void 0===t||t.cancel(),K.current=(0,k.W4)((0,y.q)({...e,fetchEpisodeOptions:!0})),K.current.promise.then((t=>{if(d(),null!=t&&t.isCanceled)S("Block was unmounted during fetch",t);else switch(null==t?void 0:t.type){case _.u:return c({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Q({type:E.N.FEED_RECEIVED,payload:t.data});case _.b:return R()}}),(e=>{null!=e&&e.isCanceled?S("Block was unmounted during fetch",e):(S("feed error",e),d(),u(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Q({type:E.N.START_EDITING}))}))}),300)),[R,c,u,d]);(0,r.useEffect)((()=>()=>{var e,t;null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}),[]);const te=(0,r.useCallback)((e=>{null===e||V||((0,C.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),G(!0))}),[V]);(0,r.useEffect)((()=>{if(""!==J)return ee({url:J,guids:X?[X]:[]}),()=>{var e,t;return null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}),[ee,J,X]),(0,r.useEffect)((()=>{(0,y.G)().then((e=>{W(e)}))}),[]),(0,r.useEffect)((()=>{X&&1!==F&&c({itemsToShow:1})}),[X,F,c]),(0,r.useEffect)((()=>{!M&&Y.isInteractive&&Q({type:E.N.PREVENT_INTERACTIONS})}),[M,Y.isInteractive]);const ne=e=>{if(e.preventDefault(),""===Y.editedUrl)return;const t=(0,h.prependHTTP)(Y.editedUrl);if((0,h.isURL)(t)){var n;if(t===J)Q({type:E.N.CLEAR_FEED}),ee({url:J,guids:null!==(n=D[0])&&void 0!==n&&n.guid?[D[0].guid]:[]});else Q({type:E.N.CHECK_URL,payload:t});Q({type:E.N.FINISH_EDITING,payload:t})}else u(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(Y.isEditing)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,r.createElement)("form",{onSubmit:ne},m,(0,r.createElement)(l.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:Y.editedUrl,className:"components-placeholder__input",onChange:e=>Q({type:E.N.EDIT_URL,payload:e})}),(0,r.createElement)(l.Button,{variant:"primary",type:"submit"},__("Embed","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(l.ExternalLink,{href:j},__("Learn more about embeds","jetpack"))));if(null===(n=Y.feedData.tracks)||void 0===n||!n.length)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,r.createElement)(l.Spinner,null));const re=(e,t)=>n=>{c({[e]:n}),t(n)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.BlockControls,null,(0,r.createElement)(l.ToolbarGroup,null,(0,r.createElement)(l.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Q({type:E.N.START_EDITING})},__("Replace","jetpack")))),(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(l.PanelBody,{title:__("Podcast settings","jetpack")},(l.ComboboxControl||0===D.length)&&(0,r.createElement)(l.RangeControl,{label:__("Number of items","jetpack"),value:F,onChange:e=>c({itemsToShow:X?1:e}),min:1,max:q,required:!0,disabled:!!X}),l.ComboboxControl&&(0,r.createElement)(l.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:X,onChange:e=>Q({type:E.N.SELECT_EPISODE,payload:e}),options:Y.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:i.noop}),(0,r.createElement)(l.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:O,onChange:e=>c({showCoverArt:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>c({showEpisodeTitle:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:U,onChange:e=>c({showEpisodeDescription:e})})),(0,r.createElement)(p.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:w.color,onChange:re("hexPrimaryColor",x),label:__("Primary Color","jetpack")},{value:P.color,onChange:re("hexSecondaryColor",T),label:__("Secondary Color","jetpack")},{value:N.color,onChange:re("hexBackgroundColor",I),label:__("Background Color","jetpack")}]},(0,r.createElement)(p.ContrastChecker,{isLargeText:!1,textColor:P.color,backgroundColor:N.color,fallbackBackgroundColor:B,fallbackTextColor:A}))),(0,r.createElement)("div",{id:H,className:o,ref:te},(0,r.createElement)(v.Z,{playerId:H,attributes:L,tracks:Y.feedData.tracks,cover:Y.feedData.cover,title:Y.feedData.title,link:Y.feedData.link}),!Y.isInteractive&&!Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Q({type:E.N.MAKE_INTERACTIVE})}),Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,r.createElement)(l.Spinner,null))))}))},822:function(e,t,n){"use strict";n.d(t,{E:function(){return r.Z}});var r=n(3182)},88645:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.Z=o},3182:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,null,(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,null),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,r.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},54951:function(e,t,n){"use strict";n.r(t),n.d(t,{playing:function(){return i},error:function(){return s}});var r=n(69307),a=n(55609);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},i=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),s=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},22755:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(65736),a=n(74134),o=n(9656),i=n(74699),s=n(56388),l=n(822),c=n(4597);const __=r.__,_x=r._x,u="podcast-player",p={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:l.E,foreground:(0,c.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:["wide","full"],spacing:{padding:!0,margin:!0},anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:i.Z,save:s.Z,attributes:a.Z,example:{attributes:{customPrimaryColor:(0,c.m)(),hexPrimaryColor:(0,c.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[o.Z]}},56388:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;if(n&&""!==n)return(0,r.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:n},n)}},79777:function(e,t,n){"use strict";n.d(t,{N:function(){return r},J:function(){return a}});const r={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case r.EDIT_URL:return{...e,editedUrl:t.payload};case r.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case r.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case r.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case r.CLEAR_FEED:return{...e,feedData:{}};case r.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case r.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case r.START_FETCH:return{...e,isLoading:!0};case r.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case r.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},81338:function(e,t,n){"use strict";n.d(t,{Gd:function(){return i},W4:function(){return s},Aq:function(){return l}});var r=n(89105),a=n.n(r),o=n(92819);function i(e,t){if(e&&t)return`has-${t}-${e}`}function s(e){let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const l=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:n,secondaryColor:r,customSecondaryColor:o,backgroundColor:s,customBackgroundColor:l}=e;const c=i("color",t),u=i("color",r),p=i("background-color",s);return{primary:{name:t,custom:n,classes:a()({"has-primary":c||n,[c]:c})},secondary:{name:r,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:s,custom:l,classes:a()({"has-background":p||l,[p]:p})}}}),(e=>Object.values(e).join()))},33241:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"premium-content-wrapper"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},85146:function(e,t,n){"use strict";var r=n(69307);const a={selectedTab:{id:"",className:"",label:(0,r.createElement)(r.Fragment,null)},stripeNudge:null},o=(0,r.createContext)(a);t.Z=o},4816:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.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"}),(0,r.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},95702:function(e,t,n){"use strict";n.d(t,{Wp:function(){return i},H2:function(){return s},ch:function(){return l}});var r=n(9818),a=n(4981),o=n(24993);const i=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(i),s=e=>{const{getBlocksByClientId:t,getBlockParents:n}=(0,r.select)("core/block-editor");return!!t(n(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))};function l(){return(0,r.useSelect)((e=>e(a.store).getBlockTypes()),[]).reduce(((e,t)=>(t.name!==o.u&&e.push(t.name),e)),[])}},57387:function(e,t,n){"use strict";var r=n(69307),a=n(72067),o=n(9818),i=n(65736),s=n(48617),l=n(24993);const __=i.__;function c(){const e=(0,o.select)("core/block-editor").getSelectedBlock();(0,o.dispatch)("core/block-editor").replaceBlock(e.clientId,(0,s.e)(e.innerBlocks))}t.Z=()=>(0,r.createElement)(a.PluginBlockSettingsMenuItem,{allowedBlocks:[l.u],label:__("Remove block and keep content","jetpack"),onClick:c})},48617:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(4981);const a=e=>{const t=e.find((e=>"premium-content/subscriber-view"===e.name));return 1===t.innerBlocks.length&&"core/group"===t.innerBlocks[0].name?t.innerBlocks[0]:(0,r.createBlock)("core/group",{},t.innerBlocks)}},6016:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(55609);function i(e){const{options:t,selectedOption:n,selectAction:i,contractViewport:s,label:l}=e,c=e=>e.id===n.id;return s?(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ToolbarDropdownMenu,{label:l,icon:"arrow-down",text:n.label},(e=>{let{onClose:n}=e;return(0,r.createElement)(o.MenuGroup,null,t.map((e=>{const t=c(e);return(0,r.createElement)(o.MenuItem,{isSelected:t,icon:t?"yes":void 0,onClick:()=>{i(e),n()},key:`jetpack-premium-content-tab-${e.id}`},e.label)})))}))):(0,r.createElement)(a.BlockControls,{group:"other"},t.map((e=>{const t=c(e);return(0,r.createElement)(o.ToolbarButton,{onClick:()=>{i(e)},className:"components-tab-button",isPressed:t,key:`jetpack-premium-content-tab-${e.id}`},(0,r.createElement)("span",null,e.label))})))}},45484:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(94333),i=n(9818),s=n(65736),l=n(92694);const __=s.__,c=["core/button","jetpack/recurring-payments","premium-content/login-button"];t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,i.withDispatch)(((e,t)=>({setSubscribeButtonPlan(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}})))])((function(e){let{context:t,subscribeButton:n,setSubscribeButtonPlan:o}=e;const i=t?t["premium-content/planId"]:null,s=!!t&&t["premium-content/isPreview"],u=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:i},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}]]],["premium-content/login-button"]];(0,r.useEffect)((()=>{i&&n&&n.attributes.planId!==i&&o(i)}),[i,n,o]),(0,r.useEffect)((()=>{n&&(0,l.addFilter)("jetpack.RecurringPayments.showControls","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t!==n.clientId&&e))}),[n]);const d=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,r.createElement)("div",d,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:c,template:s?u:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},68440:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(79071),i=n(52175),s=n(45484),l=n(55891);const __=a.__,c="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:o.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:s.Z,save:l.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-buttons"},(0,r.createElement)(i.InnerBlocks.Content,null))}]}},55891:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},84669:function(e,t,n){"use strict";var r=n(67559);t.Z={isEligible:(e,t)=>{var n;if("premium-content/logged-out-view"===(null==t||null===(n=t[0])||void 0===n?void 0:n.name))return!0},migrate:(e,t)=>[e,[t[1],t[0]]],save:r.Z}},79907:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(80236),a=n.n(r),o=n(69307),i=n(55609),s=n(65736),l=n(94333),c=n(9818),u=n(52175),p=n(33241),d=n(85146),m=n(6016),h=n(39426),f=n(93923),g=n(54554);const __=s.__,b=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Guest View","jetpack")),className:"wp-premium-content-logged-out-view"}];function v(e){const[t,n]=(0,o.useState)(b[1]),{isPreview:r,selectedPlanId:a}=e.attributes,{clientId:s,isSelected:v,className:k,setAttributes:y}=e,{isApiLoading:E,selectedBlock:w}=(0,c.useSelect)((e=>({selectedBlock:e(u.store).getSelectedBlock(),isApiLoading:e(g.h).isApiStateLoading()})));(0,o.useEffect)((()=>{if(v)return;if(!w)return;const e=(0,c.select)(u.store);e.getBlockParents(w.clientId).includes(s)&&("premium-content/logged-out-view"===w.name||e.getBlockParentsByBlockName(w.clientId,"premium-content/logged-out-view").length?n(b[1]):n(b[0]))}),[s,v,w]);const _=(0,l.useViewportMatch)("medium","<");return(0,o.createElement)("div",{className:k},!r&&(0,o.createElement)(o.Fragment,null,E&&(0,o.createElement)(i.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(i.Spinner,null)),(0,o.createElement)(h.Z,{allowCreateOneTimeInterval:!1,blockName:"premium-content",productType:f.DM,selectedProductId:a,setSelectedProductId:e=>y({selectedPlanId:e})}),(0,o.createElement)(m.Z,{options:b,selectedOption:t,selectAction:n,contractViewport:_,label:__("Change view","jetpack")})),!E&&(0,o.createElement)(d.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(p.Z,null)))}function k(e){return(0,o.createElement)(i.Disabled.Consumer,null,(t=>{var n;return(0,o.createElement)(v,a()({},e,{attributes:{...e.attributes,isPreview:t||(null===(n=e.attributes)||void 0===n?void 0:n.isPreview)}}))}))}},24993:function(e,t,n){"use strict";n.d(t,{u:function(){return m},X:function(){return h}});var r=n(65736),a=n(4981),o=n(79907),i=n(67559),s=n(84669),l=n(4816),c=n(95702),u=n(48617);const __=r.__,_x=r._x,p=["core/nextpage","core/spacer","core/separator","core/more","core/loginout","core/post-navigation-link"],d=e=>{if(e.some(c.Wp))return!1;if((0,c.H2)(e[0]))return!1;return!e.every((e=>p.includes(e.name)))},m="premium-content/container",h={title:__("Premium Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:l.Z,category:"grow",keywords:[_x("buy","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("exclusive","block search term","jetpack"),_x("gated","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("paywall","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("repeat","block search term","jetpack"),_x("signin","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("support","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo","stripe","substack"],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:o.Z,save:i.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||d(t)),__experimentalConvert(e){if(!d(e))return;const t=e.map((e=>(0,a.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,a.createBlock)("premium-content/container",{},[(0,a.createBlock)("premium-content/subscriber-view",{},t),(0,a.createBlock)("premium-content/logged-out-view")])}}],to:[{type:"block",blocks:["core/group"],transform:(e,t)=>(0,u.e)(t)}]},deprecated:[s.Z]}},71618:function(e,t,n){"use strict";var r=n(22508),a=n(2559);t.Z=[r.Z,a.Z]},22508:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(52175);t.Z={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:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let n=0;n<t.length;n++)if(t[n].name&&"premium-content/buttons"===t[n].name)return[e,[...t]];const n=(0,a.createBlock)("premium-content/buttons",{},[(0,a.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,a.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,n]]},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,r.createElement)(o.InnerBlocks.Content,null))}},2559:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},84443:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(65736),i=n(85146),s=n(95702);const __=o.__;function l(){const e=(0,s.ch)();return(0,r.createElement)(i.Z.Consumer,null,(t=>{let{selectedTab:n,stripeNudge:o}=t;return(0,r.createElement)("div",{hidden:"premium"===n.id,className:n.className},o,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:e,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}},61428:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(84443),a=n(36195),o=n(71618),i=n(4816),s=n(94333),l=n(9818),c=n(65736),u=n(72629);const __=c.__,p="premium-content/logged-out-view",d={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:i.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:r.Z,save:a.Z,deprecated:o.Z},m=(0,l.subscribe)((()=>{const e=(0,l.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,u.unregisterFormatType)("core/link");const t=(0,s.compose)((0,l.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,s.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==p)))(e.edit);(0,u.registerFormatType)("core/link",{...e,edit:t})}))},36195:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},63487:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},79179:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(9818),s=n(52175);const __=o.__,l="web"===r.Platform.OS;const c=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,c),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function u(e){let{settings:t,clientId:n,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:i}=window,[c,u]=(0,r.useState)(),[p,d]=(0,r.useState)(),m=l?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,r.useEffect)((()=>{if(l&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(n);if(!e)return;d(o(e).color);let t=e,r=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===i.ELEMENT_NODE;)t=t.parentNode,r=o(t).backgroundColor;u(r)})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:m,initialOpen:!1,settings:t},l&&a&&(0,r.createElement)(s.ContrastChecker,{backgroundColor:c,textColor:p})))}t.Z=function(e){var t,n,a;const{attributes:o}=e,{colors:l,gradients:p}=(0,i.useSelect)((e=>e("core/block-editor").getSettings()),[]),d=(0,r.useRef)(o);(0,r.useEffect)((()=>{d.current=o}),[o]);const{style:m,textColor:h,backgroundColor:f,gradient:g}=o;let b;var v;b=g?(0,s.getGradientValueBySlug)(p,g):null==m||null===(v=m.color)||void 0===v?void 0:v.gradient;const k=t=>n=>{var r,a;const o=(0,s.getColorObjectByColorValue)(l,n),i=t+"Color",u={...d.current.style,color:{...null===(r=d.current)||void 0===r||null===(a=r.style)||void 0===a?void 0:a.color,[t]:null!=o&&o.slug?void 0:n}},p=null!=o&&o.slug?o.slug:void 0,m={style:c(u),[i]:p};e.setAttributes(m),d.current={...d.current,...m}};return(0,r.createElement)(u,{enableContrastChecking:!(g||null!=m&&null!==(t=m.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:k("text"),colorValue:(0,s.getColorObjectByAttributeValues)(l,h,null==m||null===(n=m.color)||void 0===n?void 0:n.text).color},{label:__("Background Color","jetpack"),onColorChange:k("background"),colorValue:(0,s.getColorObjectByAttributeValues)(l,f,null==m||null===(a=m.color)||void 0===a?void 0:a.background).color,gradientValue:b,onGradientChange:t=>{const n=(0,s.getGradientSlugByValue)(p,t);let r;if(n){var a,o,i;const e={...null===(a=d.current)||void 0===a?void 0:a.style,color:{...null===(o=d.current)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.color,gradient:void 0}};r={style:c(e),gradient:n}}else{var l,u,m;const e={...null===(l=d.current)||void 0===l?void 0:l.style,color:{...null===(u=d.current)||void 0===u||null===(m=u.style)||void 0===m?void 0:m.color,gradient:t}};r={style:c(e),gradient:void 0}}e.setAttributes(r),d.current={...d.current,...r}}}]})}},12923:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(89105),a=n.n(r),o=n(52175);function i(e){var t,n,r,i,s,l,c,u,p,d;const{backgroundColor:m,textColor:h,gradient:f,style:g}=e,b=(0,o.getColorClassName)("background-color",m),v=(0,o.__experimentalGetGradientClass)(f),k=(0,o.getColorClassName)("color",h),y=a()(k,v,{[b]:!(null!=g&&null!==(t=g.color)&&void 0!==t&&t.gradient||!b),"has-text-color":h||(null==g||null===(n=g.color)||void 0===n?void 0:n.text),"has-background":m||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(i=g.color)||void 0===i?void 0:i.gradient)});return{className:y||void 0,style:null!=g&&null!==(s=g.color)&&void 0!==s&&s.background||null!=g&&null!==(l=g.color)&&void 0!==l&&l.text||null!=g&&null!==(c=g.color)&&void 0!==c&&c.gradient?{background:null!=g&&null!==(u=g.color)&&void 0!==u&&u.gradient?g.color.gradient:void 0,backgroundColor:null!=g&&null!==(p=g.color)&&void 0!==p&&p.background?g.color.background:void 0,color:null!=g&&null!==(d=g.color)&&void 0!==d&&d.text?g.color.text:void 0}:{}}}},12111:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(65736),l=n(12923);const __=s.__;t.Z={attributes:{text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:n,text:a}=t,s=(0,l.Z)(t),c=o()("wp-block-button__link",s.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...s.style};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:c,style:u,value:a}))}}},29405:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(79179),u=n(12923);const __=i.__;function p(e){let{borderRadius:t="",setAttributes:n}=e;const a=(0,r.useCallback)((e=>{n({borderRadius:e})}),[n]);return(0,r.createElement)(s.PanelBody,{title:__("Border settings","jetpack")},(0,r.createElement)(s.RangeControl,{value:t,label:__("Border radius","jetpack"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:a}))}t.Z=function(e){const{attributes:t,setAttributes:n,className:a}=e,{borderRadius:i,text:s}=t,d=(0,u.Z)(t),m=(0,l.useBlockProps)({className:"wp-block-button"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",m,(0,r.createElement)(l.RichText,{placeholder:__("Add text…","jetpack"),value:s,onChange:e=>n({text:e}),withoutInteractiveFormatting:!0,className:o()(a,"wp-block-button__link",d.className,{"no-border-radius":0===i}),style:{borderRadius:i?i+"px":void 0,...d.style}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.Z,e),(0,r.createElement)(p,{borderRadius:i,setAttributes:n})))}},86196:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(79071),a=n(65736),o=n(29405),i=n(30237),s=n(63487),l=n(12111);const __=a.__,c="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:s.Z,icon:r.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:o.Z,save:i.Z,deprecated:[l.Z]}},30237:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(12923);function l(e){let{attributes:t}=e;const{borderRadius:n,text:a,align:l}=t,c=(0,s.Z)(t),u=o()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===l},{aligncenter:"center"===l},{alignright:"right"===l}),p=o()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},m=i.useBlockProps.save({className:u});return(0,r.createElement)("div",m,(0,r.createElement)(i.RichText.Content,{tagName:"a",className:p,style:d,value:a}))}},67559:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-container"},(0,r.createElement)(a.InnerBlocks.Content,null))}},9861:function(e,t,n){"use strict";var r=n(86144);t.Z=[r.Z]},86144:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},27741:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(65736),i=n(9818),s=n(94333),l=n(85146),c=n(95702);const __=o.__;t.Z=(0,s.compose)([(0,i.withSelect)(((e,t)=>({hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length})))])((function(e){let{hasInnerBlocks:t}=e;const n=(0,c.ch)();return(0,r.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:o,stripeNudge:i}=e;return(0,r.createElement)("div",{hidden:"wall"===o.id,className:o.className},i,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:n,renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},74989:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(27741),a=n(93243),o=n(9861),i=n(4816),s=n(65736);const __=s.__,l="premium-content/subscriber-view",c={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:i.Z,category:"grow",attributes:{},edit:r.Z,save:a.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},93243:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},21225:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(55609),l=n(39630);const __=o.__,c=e=>{let{id:t,setRating:n,children:a}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{keyCode:t}=e;return t===l.ENTER?n(o):null}),onClick:(e=>()=>n(e))(t)},a);var o};t.Z=e=>function(t){let{className:n,setAttributes:o,attributes:{align:l,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),o({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(i.AlignmentToolbar,{value:l,onChange:e=>o({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,a.range)(1,d+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>o({maxRating:e}),min:2,max:10}),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>o({color:e}),label:__("Color","jetpack")}]}))))}},5354:function(e,t,n){"use strict";n.d(t,{d:function(){return o},r:function(){return i}});var r=n(69307),a=n(55609);const o=()=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),i=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(a.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},48284:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(65736),a=n(21225),o=n(49611),i=n(5354),s=n(4597);const __=r.__,_x=r._x,l="rating-star",c={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:i.d,foreground:(0,s.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,a.Z)(i.r),save:(0,o.Z)("★")}},49611:function(e,t,n){"use strict";var r=n(69307),a=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:o,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:o}},(0,a.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},21016:function(e,t,n){"use strict";var r=n(92819),a=n(4981);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,r.omit)(e,o),n={text:(i=e).submitButtonText,textColor:i.textButtonColor,customTextColor:i.customTextButtonColor,backgroundColor:i.backgroundButtonColor,customBackgroundColor:i.customBackgroundButtonColor};var i;return[t,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,o),Boolean),save:()=>null}},62334:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(19416),o=n(52175),i=n(55609),s=n(9818),l=n(12238),c=n(92694),u=n(65736),p=n(55277),d=n(39426),m=n(54554);const __=u.__;function h(e){let{attributes:t,clientId:n,context:u,setAttributes:h}=e;const{planId:f}=t,{isPremiumContentChild:g}=u,b=(0,s.useSelect)((e=>{var t,n;return null===(t=e(l.store))||void 0===t||null===(n=t.getCurrentPost())||void 0===n?void 0:n.link}),[]),v=(0,s.useSelect)((e=>e(m.h).getUpgradeUrl())),k=e=>{if(b){const t=new URL(b);return t.searchParams.set("recurring_payments",e),t.toString()}return"#"},y=(0,c.applyFilters)("jetpack.RecurringPayments.showControls",!0,n),E=(0,a.OZ)("recurring-payments"),w=!E.available&&"missing_plan"===E.unavailableReason,_=!!v&&!w&&!g;return(0,r.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},y&&(0,r.createElement)(d.Z,{allowCreateOneTimeInterval:!0,blockName:"recurring-payments",selectedProductId:f,setSelectedProductId:e=>h({planId:e,url:k(e),uniqueId:`recurring-payments-${e}`})}),_&&(0,r.createElement)(i.Placeholder,{icon:p.qv,instructions:__("You'll need to upgrade your plan to use the Payments block.","jetpack"),label:p.TN},(0,r.createElement)(i.Button,{href:v,target:"_blank",variant:"secondary"},__("Upgrade your plan","jetpack")),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(i.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack")))),(0,r.createElement)(o.InnerBlocks,{template:[["jetpack/button",{element:"a",passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]],templateLock:"all",__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},55277:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},TN:function(){return m},qv:function(){return h},Xd:function(){return g}});var r=n(69307),a=n(19416),o=n(52175),i=n(4981),s=n(55609),l=n(65736),c=n(4597),u=n(21016),p=n(62334);n(48701);const __=l.__,_x=l._x,d="recurring-payments",m=__("Payment Button","jetpack"),h=(0,r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(s.G,null,(0,r.createElement)(s.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),f=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",g={title:m,icon:{src:h,foreground:(0,c.m)()},description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Button allowing you to sell products and subscriptions.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:f},__("Support reference","jetpack"))),category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("Donations","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo"],usesContext:["isPremiumContentChild"],attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"}},edit:p.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},supports:{html:!1,__experimentalExposeControlsToChildren:!0},deprecated:[u.Z],transforms:{from:[{type:"block",blocks:["core/buttons"],isMatch:(e,t)=>void 0!==t&&1===t.innerBlocks.length&&"core/button"===t.innerBlocks[0].name,transform:(e,t)=>{var n,r,a,o;const s=t[0],l={element:"a",text:null!==(n=s.attributes.text)&&void 0!==n?n:"",className:null!==(r=s.attributes.className)&&void 0!==r?r:""},c=s.attributes.width;c&&(l.width=c.toString()+"%");const u=null===(a=s.attributes.style)||void 0===a||null===(o=a.border)||void 0===o?void 0:o.radius;u&&(l.borderRadius=parseInt(u.substring(0,u.length-2)));const p=(0,i.createBlock)("jetpack/button",l,[]);return(0,i.createBlock)("jetpack/"+d,{},[p])}}]}}},17060:function(e,t,n){"use strict";n.d(t,{Hj:function(){return i},AP:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{attributes:t,setAttributes:n}=e;const{displayContext:a,displayDate:i,displayThumbnails:s,postsToShow:l}=t;return(0,r.createElement)(o.PanelBody,{title:__("Related Posts Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnails","jetpack"),checked:s,onChange:e=>n({displayThumbnails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:i,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:a,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:l,onChange:e=>n({postsToShow:Math.min(e,6)}),min:1,max:6}))}function s(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid View","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List View","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},15034:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(92819),l=n(9818),c=n(94333),u=n(17060);const __=a.__;function p(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function d(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},e.post.context))}function m(e){const t="jp-related-posts-i2__row";let n=0;const a=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),a&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}class h extends r.Component{render(){const{attributes:e,className:t,posts:n,setAttributes:a,instanceId:i,isInSiteEditor:s}=this.props,{displayContext:l,displayDate:c,displayThumbnails:h,postLayout:f,postsToShow:g}=e,b="jp-relatedposts-i2",v=[];for(let e=0;e<g;e++)n[e]?v.push((0,r.createElement)(d,{id:`related-posts-${i}-post-${e}`,key:b+"-"+e,post:n[e],displayThumbnails:h,displayDate:c,displayContext:l})):v.push((0,r.createElement)(p,{id:`related-posts-${i}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:h,displayDate:c,displayContext:l,isInSiteEditor:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u.Hj,{attributes:e,setAttributes:a})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.AP,{attributes:e,setAttributes:a})),(0,r.createElement)("div",{className:t,id:`related-posts-${i}`},(0,r.createElement)("div",{className:b,"data-layout":f},(0,r.createElement)(m,{posts:v}))))}}t.ZP=(0,c.compose)(c.withInstanceId,(0,l.withSelect)((e=>{const{getCurrentPost:t}=e("core/editor"),n=t();return{posts:(0,s.get)(n,"jetpack-related-posts",[]),isInSiteEditor:(0,s.isEmpty)(n)}})))(h)},34178:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(15034),s=n(4597);const __=a.__,_x=a._x,l="related-posts",c=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(o.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),icon:{src:c,foreground:(0,s.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayDate:{type:"boolean",default:!0},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:i.ZP,save:()=>null,example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}}},17587:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(9818),u=n(89105),p=n.n(u),d=n(12704),m=n(73338);const __=i.__,_n=i._n,h=[{value:d.FV,label:__("Show after threshold","jetpack")},{value:d.Am,label:__("Show before threshold","jetpack")}];class f extends o.Component{constructor(){super(...arguments),a()(this,"state",{isThresholdValid:!0}),a()(this,"setCriteria",(e=>this.props.setAttributes({criteria:e}))),a()(this,"setThreshold",(e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})}))}getNoticeLabel(){return this.props.attributes.criteria===d.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,i.sprintf)(
33
  /* translators: placeholder is a number. */
34
  _n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,i.sprintf)(
35
  /* translators: placeholder is a number. */
@@ -55,7 +55,7 @@ __("Go to slide %d","jetpack"),a+1)),(0,r.createElement)(s.Button,{role:p?"prese
55
  /* translators: %s is the number of subscribers. The \xA0 non-breaking space is to make sure the last two words are on the same line. */
56
  _n("<span>%s reader</span> is subscribed.","<span>%s readers</span> are subscribed.",x,"jetpack"),x),{span:(0,r.createElement)("span",{style:{textDecoration:"underline"}})})),k&&(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:_,gradientValue:p.gradientValue,onGradientChange:p.setGradient,label:__("Button Background","jetpack")},{colorValue:P.color,onColorChange:C,label:__("Button Text","jetpack")},{colorValue:n.color,onColorChange:w,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(i.ContrastChecker,{fontSize:v.size,textColor:P.color,backgroundColor:f.color,fallbackButtonBackgroundColor:g,fallbackTextColor:b})),!k&&(0,r.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:_,label:__("Button Background Color","jetpack")},{value:P.color,onChange:C,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:w,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(i.ContrastChecker,{fontSize:v.size,textColor:P.color,backgroundColor:f.color,fallbackButtonBackgroundColor:g,fallbackTextColor:b})),(0,r.createElement)(o.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(i.FontSizePicker,{withSlider:!0,value:v.size,onChange:e=>{const t=e||u.tm;E({fontSize:t,customFontSize:t})}})),(0,r.createElement)(o.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(o.RangeControl,{value:d,label:__("Border Radius","jetpack"),min:u.G0,max:u.Gp,initialPosition:u.S9,allowReset:!0,onChange:e=>E({borderRadius:e})}),(0,r.createElement)(o.RangeControl,{value:m,label:__("Border Weight","jetpack"),min:u.VF,max:u.K3,initialPosition:u.XJ,allowReset:!0,onChange:e=>E({borderWeight:e})})),(0,r.createElement)(o.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(o.RangeControl,{value:y,label:__("Space Inside","jetpack"),min:u.xV,max:u.bK,initialPosition:u.HE,allowReset:!0,onChange:e=>E({padding:e})}),(0,r.createElement)(o.RangeControl,{value:j,label:__("Space Between","jetpack"),min:u.Tr,max:u.pC,initialPosition:u.FP,allowReset:!0,onChange:e=>E({spacing:e})}),(0,r.createElement)(c.h,{width:T,onChange:e=>E({buttonWidth:e})})),(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(o.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:S,onChange:()=>{E({showSubscribersTotal:!S})},help:()=>{if(!x||x<1)return __("This will remain hidden until there is at least one subscriber.","jetpack")}}),(0,r.createElement)(o.ToggleControl,{label:__("Place button on new line","jetpack"),checked:h,onChange:()=>{E({buttonOnNewLine:!h})}}),!(0,s.Wp)()&&(0,r.createElement)(o.TextareaControl,{value:A,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>E({successMessage:e})})))}},22045:function(e,t,n){"use strict";var r=n(95201),a=n(9984),o=n(43947),i=n(70898),s=n(6175),l=n(13266);t.Z=[l.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},95201:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(92819);const __=a.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,o.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},9984:function(e,t,n){"use strict";var r=n(65736),a=n(89704);const __=r.__;t.Z={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},89704:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{showSubscribersTotal:n,submitButtonClasses:a,customBackgroundButtonColor:o,customTextButtonColor:i,submitButtonText:s}=t;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${o}" custom_text_button_color="${i}" submit_button_text="${s}" submit_button_classes="${a}" show_subscribers_total="${n}" ]`)}},69125:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},71320:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(69125);function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:o,showSubscribersTotal:l,buttonOnNewLine:c,submitButtonText:u,emailFieldBackgroundColor:p,customEmailFieldBackgroundColor:d,emailFieldGradient:m,customEmailFieldGradient:h,buttonBackgroundColor:f,customButtonBackgroundColor:g,buttonGradient:b,customButtonGradient:v,textColor:k,customTextColor:y,fontSize:E,customFontSize:w,borderRadius:_,borderWeight:C,borderColor:S,customBorderColor:j,padding:x,spacing:P}=t,T=!!a.__experimentalGetGradientClass,A=(0,a.getColorClassName)("color",k),N=(0,a.getFontSizeClass)(E),I=(0,a.getColorClassName)("border-color",S),B=(0,a.getColorClassName)("background-color",f),M=T?(0,a.__experimentalGetGradientClass)(b):void 0,R=(0,a.getColorClassName)("background-color",p),L=T?(0,a.__experimentalGetGradientClass)(m):void 0,Z=i()(0===_?"no-border-radius":void 0,N,I),D=i()(Z,k?"has-text-color":void 0,A,f||b?"has-background":void 0,B,M),F=i()(Z,R,L),O=!R&&h?h:d,z=!B&&v?v:g,U=()=>i()(e,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,l?"wp-block-jetpack-subscriptions__show-subs":void 0);let $=o,H=u;return"check-text-defaults"===n&&($=o===s.Z.subscribePlaceholder.default?"Enter your email address":o,H=u===s.Z.submitButtonText.default?"Sign Up":u),(0,r.createElement)("div",{className:U()},(0,r.createElement)(r.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${$}"\n\t\t\t\tshow_subscribers_total="${l}"\n\t\t\t\tbutton_on_newline="${c}"\n\t\t\t\tsubmit_button_text="${H}"\n\t\t\t\tcustom_background_emailfield_color="${O}"\n\t\t\t\tcustom_background_button_color="${z}"\n\t\t\t\tcustom_text_button_color="${y}"\n\t\t\t\tcustom_font_size="${w||16}"\n\t\t\t\tcustom_border_radius="${_||0}"\n\t\t\t\tcustom_border_weight="${C||1}"\n\t\t\t\tcustom_border_color="${j}"\n\t\t\t\tcustom_padding="${x||15}"\n\t\t\t\tcustom_spacing="${P||10}"\n\t\t\t\tsubmit_button_classes="${D}"\n\t\t\t\temail_field_classes="${F}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},43947:function(e,t,n){"use strict";var r=n(69125),a=n(71320);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n)}}},70898:function(e,t,n){"use strict";var r=n(69125),a=n(71320);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n,"check-text-defaults")}}},6175:function(e,t,n){"use strict";var r=n(69125),a=n(96779);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:a.ZP}},96779:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(69125);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:S,borderColor:j,customBorderColor:x,padding:P,spacing:T}=n,A=!!a.__experimentalGetGradientClass,N=(0,a.getColorClassName)("color",y),I=(0,a.getFontSizeClass)(w),B=(0,a.getColorClassName)("border-color",j),M=(0,a.getColorClassName)("background-color",g),R=A?(0,a.__experimentalGetGradientClass)(v):void 0,L=(0,a.getColorClassName)("background-color",d),Z=A?(0,a.__experimentalGetGradientClass)(h):void 0,D=i()(0===C?"no-border-radius":void 0,I,B),F=i()(D,y?"has-text-color":void 0,N,g||v?"has-background":void 0,M,R),O=i()(D,L,Z),z=!L&&f?f:m,U=!M&&k?k:b,$={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:z,custom_background_button_color:U,custom_text_button_color:E,custom_font_size:_||16,custom_border_radius:C||0,custom_border_weight:S||1,custom_border_color:x,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:F,email_field_classes:O,show_only_email_and_button:!0},H=(0,s.reduce)($,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${H}]`))}},79785:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},13266:function(e,t,n){"use strict";var r=n(79785),a=n(45659);t.Z={attributes:r.Z,save:a.Z}},45659:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(79785);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:S,borderColor:j,customBorderColor:x,padding:P,spacing:T,buttonWidth:A}=n,N=!!a.__experimentalGetGradientClass,I=(0,a.getColorClassName)("color",y),B=(0,a.getFontSizeClass)(w),M=(0,a.getColorClassName)("border-color",j),R=(0,a.getColorClassName)("background-color",g),L=N?(0,a.__experimentalGetGradientClass)(v):void 0,Z=(0,a.getColorClassName)("background-color",d),D=N?(0,a.__experimentalGetGradientClass)(h):void 0,F=i()(0===C?"no-border-radius":void 0,B,M),O=i()(F,y?"has-text-color":void 0,I,g||v?"has-background":void 0,R,L),z=i()(F,Z,D),U=!Z&&f?f:m,$=!R&&k?k:b,H=A||void 0,V={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:U,custom_background_button_color:$,custom_text_button_color:E,custom_font_size:_||"16px",custom_border_radius:C||0,custom_border_weight:S||1,custom_border_color:x,custom_button_width:H,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:O,email_field_classes:z,show_only_email_and_button:!0},G=(0,s.reduce)(V,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${G}]`))}},80245:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(65736),l=n(55609),c=n(52175),u=n(94333),p=n(91768),d=n(79993),m=n(56213),h=n(74323),f=n(60602);const __=s.__,_n=s._n,{getComputedStyle:g}=window,b=!!c.__experimentalUseGradient,v=(0,l.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:n,textColor:r}=t,a=n&&n.color,o=r&&r.color,i=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:i&&g(i).backgroundColor,fallbackTextColor:o||!e?void 0:i&&g(i).color}}));t.Z=(0,u.compose)([(0,c.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,c.withFontSizes)("fontSize"),v])((function(e){const{className:t,attributes:n,setAttributes:a,emailFieldBackgroundColor:g,buttonBackgroundColor:v,setButtonBackgroundColor:k,fallbackButtonBackgroundColor:y,textColor:E,fallbackTextColor:w,setTextColor:_,borderColor:C,setBorderColor:S,fontSize:j}=e,x=(0,m.S)(d.Z,n);(0,i.isEqual)(x,n)||a(x);const{borderRadius:P,borderWeight:T,buttonWidth:A,padding:N,spacing:I,submitButtonText:B,subscribePlaceholder:M,showSubscribersTotal:R,buttonOnNewLine:L,successMessage:Z}=x,[D,F]=(0,r.useState)(""),[O,z]=(0,r.useState)(""),U=b?(0,c.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},$=b?(0,c.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},H={"no-border-radius":0===P,[j.class]:j.class,"has-text-color":E.color,[E.class]:E.class},V={...H,"has-background":g.color||U.gradientValue,[g.class]:!U.gradientValue&&g.class,[U.gradientClass]:U.gradientClass},G={...H,"has-background":v.color||$.gradientValue,[v.class]:!$.gradientValue&&v.class,[$.gradientClass]:$.gradientClass},q=e=>e||h.FP,W={color:E.color,borderColor:C.color,borderRadius:P?P+"px":h.S9+"px",borderWidth:T?T+"px":h.XJ+"px",fontSize:j.size?j.size:h.tm,padding:(e=>{const t=e||h.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(N)},K={...W,...!g.color&&U.gradientValue?{background:U.gradientValue}:{backgroundColor:g.color}},X={...W,...!v.color&&$.gradientValue?{background:$.gradientValue}:{backgroundColor:v.color},...L?{marginTop:q(I)+"px"}:{marginLeft:q(I)+"px"},width:A};(0,r.useEffect)((()=>{(0,p.z)((e=>{F((0,s.sprintf)(
57
  /* translators: Placeholder is a number of subscribers. */
58
- _n("Join %s other subscriber","Join %s other subscribers",e,"jetpack"),e)),z(e)}),(()=>{F(__("Subscriber count unavailable","jetpack")),z(0)}))}),[]);const J=(0,u.usePrevious)(v);return(0,r.useEffect)((()=>{(null==J?void 0:J.color)===(null==C?void 0:C.color)&&(null==C?void 0:C.color)!==(null==v?void 0:v.color)&&S(v.color)}),[v,J,C,S]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(f.Z,{buttonBackgroundColor:v,borderColor:C,buttonGradient:$,borderRadius:P,borderWeight:T,buttonOnNewLine:L,emailFieldBackgroundColor:g,fallbackButtonBackgroundColor:y,fallbackTextColor:w,fontSize:j,isGradientAvailable:b,padding:N,setAttributes:a,setBorderColor:S,setButtonBackgroundColor:k,setTextColor:_,showSubscribersTotal:R,spacing:I,subscriberCount:O,textColor:E,buttonWidth:A,successMessage:Z})),(0,r.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",L?"wp-block-jetpack-subscriptions__use-newline":void 0,R?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)(l.TextControl,{placeholder:M,disabled:!0,className:o()(V,"wp-block-jetpack-subscriptions__textfield"),style:K}),(0,r.createElement)(c.RichText,{className:o()(G,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:X,value:B,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),R&&(0,r.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},D)))}))},77768:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return f},eC:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(79993),l=n(22045),c=n(80245),u=n(53098),p=n(37182),d=n(4597);const __=a.__,_x=a._x,m="subscriptions",h=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M20.9997 6.96749L21 7V17C21 18.1046 20.1046 19 19 19H5C3.89543 19 3 18.1046 3 17V7L3.00026 6.96747L3 6.96092C3 5.87793 3.87793 5 4.96092 5H19.0391C20.1221 5 21 5.87793 21 6.96092L20.9997 6.96749ZM19.3044 17.3967L13.9142 12.9048L13.2804 13.433C12.5387 14.0511 11.4613 14.0511 10.7196 13.433L10.0858 12.9048L4.69555 17.3967C4.77987 17.4615 4.88543 17.5 5 17.5H19C19.1146 17.5 19.2201 17.4615 19.3044 17.3967ZM19.5 15.6071V8.25L15.0858 11.9285L19.5 15.6071ZM4.5 8.25V15.6071L8.91424 11.9285L4.5 8.25ZM4.79543 6.54363C4.85788 6.51559 4.92712 6.5 5 6.5H19C19.0729 6.5 19.1421 6.51559 19.2046 6.54363L12.3201 12.2807C12.1347 12.4352 11.8653 12.4352 11.6799 12.2807L4.79543 6.54363Z",fill:(0,d.m)(),fillRule:"evenodd",clipRule:"evenodd"})),f={title:__("Subscribe","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Allow readers to receive a newsletter with future posts in their inbox.","jetpack")),(0,r.createElement)("p",null,(0,r.createInterpolateElement)(__("Subscribers can get notifications through email or <ExternalLink>the Reader app</ExternalLink>.","jetpack"),{ExternalLink:(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/read"})}))),icon:{src:h,foreground:(0,d.m)()},category:"grow",keywords:[_x("newsletter","block search term","jetpack"),_x("email","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:s.Z,edit:c.Z,save:u.Z,styles:[{name:"compact",label:__("Compact","jetpack"),isDefault:!0},{name:"split",label:__("Split","jetpack")}],transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,i.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},supports:{spacing:{margin:!0,padding:!0},align:["wide","full"]},deprecated:l.Z},g={render:p.Z}},37182:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(69307),a=n(72067),o=n(9818),i=n(12238),s=n(65736),l=n(19416),c=n(91768),u=n(80011);const __=s.__,_n=s._n;function p(){const[e,t]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.z)((e=>t(e)))}),[]);return"post"!==(0,o.useSelect)((e=>e(i.store).getCurrentPostType()),[])||(0,l.M6)()||(0,l.aQ)()||!Number.isFinite(e)||e<=0?null:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PluginPrePublishPanel,{className:"jetpack-subscribe-pre-publish-panel",initialOpen:!0,title:__("Subscribers","jetpack")},(0,r.createElement)(u.Z,null,(0,r.createInterpolateElement)((0,s.sprintf)(
59
  /* translators: %s is the number of subscribers */
60
  _n("This post will be sent to <span>%s reader</span>","This post will be sent to <span>%s readers</span>",e,"jetpack"),e),{span:(0,r.createElement)("span",{className:"jetpack-subscribe-reader-count"})}))),(0,r.createElement)(a.PluginPostPublishPanel,{className:"jetpack-subscribe-post-publish-panel",initialOpen:!0},(0,r.createElement)(u.Z,null,(0,r.createInterpolateElement)((0,s.sprintf)(
61
  /* translators: %s is the number of subscribers */
@@ -67,7 +67,7 @@ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,
67
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
68
  __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(s.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:c,onMoveBackward:l?void 0:d(t),onMoveForward:l?void 0:m(t),onRemove:l?void 0:h(t),onSelect:l?void 0:f(t),origUrl:e.url,setAttributes:l?void 0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:s,roundedCorners:d,onResize:m,isSave:h,columnWidths:f}=this.props,g=(0,u.v)(s)?c.Z:l.Z,b=this.props.images.map(this.renderImage,this),v=s!==p.xJ?Math.min(d,p.Z5):0;return(0,r.createElement)("div",{className:i()(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(g,{align:e,columns:a,columnWidths:h?f:void 0,images:o,layoutStyle:s,renderedImages:b,onResize:h?void 0:m}),t)}}},32:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(94502),a=n.n(r),o=n(69307),i=n(82889),s=n(71470),l=n(44536),c=n(2258);class u extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a,columnWidths:u}=this.props,p=(0,c.h9)(n),d="columns"===r?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)});let m=0;return(0,o.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,o.createElement)(l.Z,{key:t},e.map(((e,n)=>{var r;const s=a.slice(m,m+e);return m+=e,(0,o.createElement)(i.Z,{key:n,width:null==u||null===(r=u[t])||void 0===r?void 0:r[n]},s)}))))))}}},2258:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return S}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([A,A,N,A,A]),c=T([A,A,A,N,A,A,A]),u=P([3,1,3],5),p=T([N,A,A,N]),d=P([1,2,1],5),m=T([N,A,A,A]),h=P([1,3],3),f=T([A,A,A,N]),g=P([3,1],3),b=T([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:j(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function j(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function A(e){return e>=1&&e<2}function N(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},44536:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},39219:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(44536),i=n(82889),s=n(71470),l=n(29586);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},46953:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(15344),o=n(8909),i=n(29586);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(a.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(i.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},34224:function(e,t,n){"use strict";n.d(t,{v:function(){return l},z:function(){return c}});var r=n(40278),a=n(82827),o=n(11313),i=n(92819),s=n(29586);function l(e){return["circle","square"].includes(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:c}=e,{layoutStyle:m}=t,h=p(n)||!0===u()?d:r.Z;let f;if(l(m)&&c&&a){const e=Math.min(s.GP,c,a);f=h(n,{resize:`${e},${e}`})}else f=h(n);const g=300,b=600;let v;if(l(m)){const e=Math.min(b,c,a),t=Math.min(s.GP,c,a);v=(0,i.range)(e,t,g).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(b,c),t=Math.min(s.GP,c);v=(0,i.range)(e,t,g).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},v&&{srcSet:v})}function u(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function p(e){const{host:t}=(0,a.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:o,port:i,query:s,search:l,...c}=(0,a.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,a.WU)(c)}},20707:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(49288),d=n(98734),m=n(39066),h=n(8909),f=n(15418),g=n(92956);const __=i.__,b=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")}];function v(e){return Math.min(3,e.images.length)}const k=e=>{const t=(0,s.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,s.get)(e,["sizes","large","url"])||(0,s.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class y extends o.Component{constructor(){var e;super(...arguments),a()(this,"state",{selectedImage:null,changed:void 0===this.props.attributes.columnWidths||0===(null===(e=this.props.attributes.columnWidths)||void 0===e?void 0:e.length)}),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],{noticeOperations:n}=this.props;(0,c.mediaUpload)({allowedTypes:m.RA,filesList:e,onFileChange:e=>{const n=e.map((e=>k(e)));this.setAttributes({images:t.concat(n)})},onError:n.createErrorNotice}),this.setState({changed:!0})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,s.filter)(this.props.attributes.images,((t,n)=>e!==n)),{columns:n}=this.props.attributes;this.setState({selectedImage:null,changed:!0}),this.setAttributes({images:t,columns:n?Math.min(t.length,n):n})})),a()(this,"onSelectImage",(e=>()=>{this.state.selectedImage!==e&&this.setState({selectedImage:e})})),a()(this,"onSelectImages",(e=>{const{columns:t}=this.props.attributes;this.setAttributes({columns:t?Math.min(e.length,t):t,images:e.map((e=>k(e)))}),this.setState({changed:!0})})),a()(this,"onMove",((e,t)=>{const n=[...this.props.attributes.images];n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t,changed:!0}),this.setAttributes({images:n})})),a()(this,"onMoveForward",(e=>()=>{e!==this.props.attributes.images.length-1&&this.onMove(e,e+1)})),a()(this,"onMoveBackward",(e=>()=>{0!==e&&this.onMove(e,e-1)})),a()(this,"onResize",(e=>{this.state.changed&&this.setAttributes({columnWidths:e})})),a()(this,"setColumnsNumber",(e=>this.setAttributes({columns:e}))),a()(this,"setRoundedCorners",(e=>this.setAttributes({roundedCorners:e}))),a()(this,"setImageAttributes",(e=>t=>{const{attributes:{images:n}}=this.props;n[e]&&this.setAttributes({images:[...n.slice(0,e),{...n[e],...t},...n.slice(e+1)]})})),a()(this,"setLinkTo",(e=>this.setAttributes({linkTo:e}))),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files)))}static getDerivedStateFromProps(e,t){return e.isSelected||null===t.selectedImage?null:{selectedImage:null}}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}render(){const{selectedImage:e}=this.state,{attributes:t,isSelected:n,className:r,noticeOperations:a,noticeUI:i,setAttributes:s}=this.props,{align:c,columns:k=v(t),imageFilter:y,images:E,linkTo:w,roundedCorners:_}=t,C=(0,o.createElement)(u.DropZone,{onFilesDrop:this.addFiles}),S=(0,o.createElement)(l.BlockControls,null,!!E.length&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.ToolbarGroup,null,(0,o.createElement)(u.ToolbarItem,null,(()=>(0,o.createElement)(l.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:m.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,o.createElement)(g.Z,{label:__("Edit Gallery","jetpack"),onClick:t})}})))),(0,o.createElement)(p.Z,{value:y,onChange:e=>{s({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===E.length)return(0,o.createElement)(o.Fragment,null,S,(0,o.createElement)(l.MediaPlaceholder,{icon:f.qv,className:r,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:m.RA,multiple:!0,notices:i,onError:a.createErrorNotice}));const j=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,S,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(j)&&E.length>1&&(0,o.createElement)(u.RangeControl,{label:__("Columns","jetpack"),value:k,onChange:this.setColumnsNumber,min:1,max:Math.min(m.hI,E.length)}),j!==m.xJ&&(0,o.createElement)(u.RangeControl,{label:__("Rounded corners","jetpack"),value:_,onChange:this.setRoundedCorners,min:0,max:m.Z5}),(0,o.createElement)(u.SelectControl,{label:__("Link To","jetpack"),value:w,onChange:this.setLinkTo,options:b}))),i,(0,o.createElement)(d.Z,{align:c,className:r,columns:k,imageFilter:y,images:E,layoutStyle:j,linkTo:w,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:_,selectedImage:n?e:null,setImageAttributes:this.setImageAttributes},C,n&&(0,o.createElement)("div",{className:"tiled-gallery__add-item"},(0,o.createElement)(u.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}t.ZP=(0,u.withNotices)(y)},49288:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,_x=a._x,i=[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:_x("Gingham","image style","jetpack"),value:"gingham"}],s=__("Pick an image filter","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:s,tooltip:s,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},i.map((e=>{let{icon:i,title:s,value:l}=e;return(0,r.createElement)(o.MenuItem,{className:t===l?"is-active":void 0,icon:i,isSelected:t===l,key:l||"original",onClick:(c=l,()=>{n(t===c?void 0:c),a()}),role:"menuitemcheckbox"},s);var c})))}})}},28632:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(39630),u=n(55609),p=n(11313),d=n(9818),m=n(21711);const __=l.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"img",(0,o.createRef)()),a()(this,"onImageClick",(()=>{this.props.isSelected||this.props.onSelect()})),a()(this,"onImageKeyDown",(e=>{this.img.current===document.activeElement&&this.props.isSelected&&[c.BACKSPACE,c.DELETE].includes(e.keyCode)&&this.props.onRemove()}))}componentDidUpdate(){const{alt:e,height:t,image:n,link:r,url:a,width:o}=this.props;if(n){const i={};!e&&n.alt_text&&(i.alt=n.alt_text),!t&&n.media_details&&n.media_details.height&&(i.height=+n.media_details.height),!r&&n.link&&(i.link=n.link),!a&&n.source_url&&(i.url=n.source_url),!o&&n.media_details&&n.media_details.width&&(i.width=+n.media_details.width),Object.keys(i).length&&this.props.setAttributes(i)}}render(){const{"aria-label":e,alt:t,columns:n,height:r,id:a,imageFilter:i,isFirstItem:l,isLastItem:c,isSelected:d,link:h,linkTo:f,onMoveBackward:g,onMoveForward:b,onRemove:v,origUrl:k,showMovers:y,srcSet:E,url:w,width:_}=this.props;let C;switch(f){case"media":C=w;break;case"attachment":C=h}const S=(0,p.isBlobURL)(k),j=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("img",{alt:t,"aria-label":e,"data-height":r,"data-id":a,"data-link":h,"data-url":k,"data-width":_,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:S?void 0:w,srcSet:S?void 0:E,tabIndex:"0",style:S?{backgroundImage:`url(${k})`}:void 0}),S&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":S,[`filter__${i}`]:!!i})},y&&(0,o.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,o.createElement)(u.Button,{icon:1===n?m.WO:m.KT,onClick:l?void 0:g,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":l,disabled:!d}),(0,o.createElement)(u.Button,{icon:1===n?m.xf:m.zz,onClick:c?void 0:b,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":c,disabled:!d})),(0,o.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,o.createElement)(u.Button,{icon:m.xv,onClick:v,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!d})),C?(0,o.createElement)("a",null,j):j)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},62176:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(11313);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,i.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:o()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},21711:function(e,t,n){"use strict";n.d(t,{KT:function(){return o},zz:function(){return i},xf:function(){return s},WO:function(){return l},xv:function(){return c}});var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),i=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),s=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),l=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),c=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},15418:function(e,t,n){"use strict";n.d(t,{u2:function(){return j},qv:function(){return x},Xd:function(){return P}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(19416),c=n(20707),u=n(65758),p=n(39066),d=n(4597),m=n(88938),h=n(95492),f=n(96606),g=n(85472),b=n(79009),v=n(10742),k=n(52642),y=n(41145);const __=a.__,_x=a._x,E={[p.EU]:_x("Tiled mosaic","Tiled gallery layout","jetpack"),[p.xJ]:_x("Circles","Tiled gallery layout","jetpack"),[p.sw]:_x("Tiled columns","Tiled gallery layout","jetpack"),[p.yw]:_x("Square tiles","Tiled gallery layout","jetpack")},w=p.P0.map((e=>({...e,label:E[e.name]})));function _(e){return(0,i.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const C={align:{default:"center",type:"string"},className:{default:`is-style-${p.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},S={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:f,width:160,height:95},{alt:"",link:"",url:g,width:160,height:107},{alt:"",link:"",url:b,width:304,height:203},{alt:"",link:"",url:v,width:312,height:207},{alt:"",link:"",url:k,width:152,height:101},{alt:"",link:"",url:y,width:152,height:105}],linkTo:"none"},j="tiled-gallery",x=(0,r.createElement)(s.SVG,{viewBox:"0 0 24 24",width:24,height:24},(0,r.createElement)(s.Path,{d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),P={attributes:C,category:(0,m.Z)("media","layout"),description:__("Display multiple images in an elegantly organized tiled layout.","jetpack")+((0,l.Wp)()?"":" "+__("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:x,foreground:(0,d.m)()},keywords:[_x("columns","block search term","jetpack"),_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("square","block search term","jetpack"),_x("circle","block search term","jetpack"),_x("mosaic","block search term","jetpack")],styles:w,supports:{align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0},title:__("Tiled Gallery","jetpack"),transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>_(e).length>0,transform:e=>{const t=_(e);return(0,o.createBlock)(`jetpack/${j}`,{images:t.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const n=_(t);return n.length>0?(0,o.createBlock)(`jetpack/${j}`,{images:n.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,o.createBlock)(`jetpack/${j}`)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n,columns:r,linkTo:a}=e;return(0,o.createBlock)("core/gallery",{images:t,ids:n,columns:r,imageCrop:!0,linkTo:a})}},{type:"block",blocks:["core/image"],transform:e=>{let{align:t,images:n}=e;return n.length>0?n.map((e=>{let{id:n,url:r,alt:a}=e;return(0,o.createBlock)("core/image",{align:t,id:n,url:r,alt:a})})):(0,o.createBlock)("core/image")}}]},edit:c.ZP,save:u.Z,providesContext:{imageCrop:"imageCrop"},deprecated:h.Z,example:{attributes:S}}},51092:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,width:n}=e;const a=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},13582:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},98734:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(89105),i=n.n(o),s=n(28632),l=n(62176),c=n(83147),u=n(46374),p=n(89033),d=n(39066);const __=a.__;class m extends r.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:c,linkTo:u,layoutStyle:d,onMoveBackward:m,onMoveForward:h,onRemoveImage:f,onSelectImage:g,selectedImage:b,setImageAttributes:v}=this.props,k=(0,a.sprintf)(
69
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
70
- __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),y=c?l.Z:s.Z,{src:E,srcSet:w}=(0,p.z)(e,{layoutStyle:d});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:b===t,key:t,link:e.link,linkTo:u,onMoveBackward:c?void 0:m(t),onMoveForward:c?void 0:h(t),onRemove:c?void 0:f(t),onSelect:c?void 0:g(t),origUrl:e.url,setAttributes:c?void 0:v(t),showMovers:i.length>1,srcSet:w,url:E,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:s,roundedCorners:l,onResize:m,style:h,isSave:f,columnWidths:g}=this.props,b=(0,p.v)(s)?u.Z:c.Z,v=this.props.images.map(this.renderImage,this),k=s!==d.xJ?Math.min(l,d.Z5):0;return(0,r.createElement)("div",{style:h,className:i()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:f?g:void 0,images:o,layoutStyle:s,renderedImages:v,onResize:f?void 0:m}),t)}}},83147:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(94502),a=n.n(r),o=n(69307),i=n(54166),s=n(51092),l=n(13582),c=n(1199),u=n(60511),p=n(1253);class d extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a}=this.props,i=(0,p.h9)(n),u="columns"===r?(0,p.sv)(i,t):(0,p.T9)(i,{isWide:["full","wide"].includes(e)}),d=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(u,a,1e3)})();let m=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},u.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,n)=>{var r;const i=a.slice(m,m+e);return m+=e,(0,o.createElement)(s.Z,{key:n,width:null==d||null===(r=d[t])||void 0===r?void 0:r[n]},i)}))))))}}},1253:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return S}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([A,A,N,A,A]),c=T([A,A,A,N,A,A,A]),u=P([3,1,3],5),p=T([N,A,A,N]),d=P([1,2,1],5),m=T([N,A,A,A]),h=P([1,3],3),f=T([A,A,A,N]),g=P([3,1],3),b=T([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:j(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function j(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function A(e){return e>=1&&e<2}function N(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},60511:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(39066);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){return function(e,t,n){let[o,i]=t;const p=1/o*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=a(p,o);i.forEach(((e,t)=>{const o=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=a(l(e).map((e=>o/u(e))),n);Array.from(e.children).forEach(((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:o})}));return d.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){return s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[0,0])}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},1199:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},46374:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(1199),i=n(51092),s=n(13582),l=n(39066);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},65758:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(98734),o=n(20707),i=n(8909),s=n(39066);function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=(0,o.F)(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(a.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,i.t)(s.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},89033:function(e,t,n){"use strict";n.d(t,{v:function(){return u},z:function(){return p}});var r=n(40278),a=n(82827),o=n(11313),i=n(92819),s=n(19416),l=n(39066),c=n(88514);function u(e){return["circle","square"].includes(e)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,c.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,s.Ug)()&&(0,s.M6)())return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:p}=e,{layoutStyle:f}=t,g=m(n)||!0===d()?h:r.Z;let b;if(u(f)&&p&&a){const e=Math.min(l.GP,p,a);b=g(n,{resize:`${e},${e}`})}else b=g(n);const v=300,k=600;let y;if(u(f)){const e=Math.min(k,p,a),t=Math.min(l.GP,p,a);y=(0,i.range)(e,t,v).map((e=>{const t=g(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(k,p),t=Math.min(l.GP,p);y=(0,i.range)(e,t,v).map((e=>{const t=g(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:b},y&&{srcSet:y})}function d(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function m(e){const{host:t}=(0,a.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:o,port:i,query:s,search:l,...c}=(0,a.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,a.WU)(c)}},47923:function(e,t,n){"use strict";n.d(t,{H:function(){return a},Z:function(){return o}});var r=n(69307);const a=(0,r.createContext)(),o=e=>{let{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o},children:i})}},61434:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});const r=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}]},62396:function(e,t,n){"use strict";var r=n(40899);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:r.Z,isDeprecation:!0}},40899:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{caption:n,guid:o}=t;if(!o)return null;const i=`https://videopress.com/v/${o}`;return(0,r.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${i}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},80979:function(e,t,n){"use strict";var r=n(85993),a=n(87057);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:e=>{let{videoPressClassNames:t,guid:n}=e;return n&&void 0===t},migrate:e=>{const{className:t,videoPressClassNames:n}=e;return{...e,...(0,a.a)(t,n)}},save:r.Z,isDeprecation:!0}},85993:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(59210);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:s,loop:l,muted:c,poster:u,preload:p,videoPressClassNames:d}={}}=e;if(!s)return null;const m=(0,o.p)(s,{autoplay:t,controls:i,loop:l,muted:c,poster:u,preload:p});return(0,r.createElement)("figure",{className:d},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},59210:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,poster:s,preload:l}=t;if(!e)return null;const c={...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{posterUrl:s},..."none"!==l&&{preloadContent:l}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,c)}},87057:function(e,t,n){"use strict";n.d(t,{a:function(){return l}});var r=n(81326),a=n.n(r),o=n(29512),i=n.n(o);const s=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],l=(e,t)=>{const n=s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1}),r=a()(e,{...n,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),o=new(i())(r);let l=a()(e,t);return o.forEach((e=>{l=l.replace(e,"")})),{className:r,videoPressClassNames:l.trim()}}},24729:function(e,t,n){"use strict";var r=n(33637);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:r.Z,isDeprecation:!0}},33637:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(24727);function l(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=a.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),E=(0,s.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});return(0,r.createElement)("figure",y,(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${E}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},24727:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},97532:function(e,t,n){"use strict";var r=n(8564);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:r.Z,isDeprecation:!0}},8564:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(21329);function l(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,E=a.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),w=(0,s.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,r.createElement)("figure",E,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${w}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},21329:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},58667:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(11313),p=n(55609),d=n(94333),m=n(9818),h=n(52175),f=n(65736),g=n(76502),b=n(90449),v=n(89105),k=n.n(v),y=n(92819),E=n(65293),w=n(64850),_=n(61788),C=n(69913),S=n(36815),j=n(941),x=n(47923);const __=f.__,_x=f._x,P=["image"],T=e=>{const{html:t,scripts:n,interactive:r,caption:a,isSelected:o,hideOverlay:i,attributes:l,setAttributes:c}=e,{align:u,className:d,videoPressClassNames:m,maxWidth:f}=l,g=(0,h.useBlockProps)({className:k()("wp-block-video",d,m,{[`align${u}`]:u})});return(0,s.createElement)("figure",g,(0,s.createElement)("div",{className:"wp-block-embed__wrapper"},(0,s.createElement)(p.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:f},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}c({maxWidth:r})}},(0,s.createElement)(p.SandBox,{html:t,scripts:n,type:m}))),!r&&(0,s.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:i}),(!h.RichText.isEmpty(a)||o)&&(0,s.createElement)(h.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:a,onChange:e=>c({caption:e}),inlineToolbar:!0}))};t.Z=(0,d.createHigherOrderComponent)((0,d.compose)([(0,m.withSelect)(((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:a,guid:o,loop:i,muted:s,playsinline:l,poster:c,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,src:f,useAverageColor:g}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,w.p)(o,{autoplay:n,controls:r,loop:i,muted:s,playsinline:l,poster:c,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:g}),y=!!k&&b(k),E=!!k&&v(k),_=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:a,isFetchingPreview:E,isUploading:!_&&(0,u.isBlobURL)(f),preview:y,resumableUploadEnabled:_,url:k}})),(0,m.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),d.withInstanceId,e=>class extends s.Component{constructor(e){super(...arguments),i()(this,"hideOverlay",(()=>{this.setState({interactive:!0})})),i()(this,"setRatingAndAllowDownload",(async()=>{const e=(0,y.get)(this.props,"attributes.id"),t=await this.requestMedia(e);let n=(0,y.get)(t,"jetpack_videopress.rating");const r=(0,y.get)(t,"jetpack_videopress.allow_download");n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r})})),i()(this,"schedulePreviewCacheReload",(()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout((()=>{e(t),this.previewCacheReloadTimer=null}),2e3*this.previewFailuresCount))})),i()(this,"fallbackToCore",(()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})})),i()(this,"setGuid",(async()=>{const{attributes:e,setAttributes:t}=this.props,{id:n}=e;if(n)try{const e=await this.requestMedia(n);if(null===e)return;const r=(0,y.get)(e,"jetpack_videopress.guid");r?(t({guid:r}),this.setTracks(r)):this.fallbackToCore()}catch(e){this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})})),i()(this,"requestMedia",(async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await c()({path:`/wp/v2/media/${e}`}).catch((()=>(this.setState({fallback:!0}),null))).finally((()=>{this.setState({isFetchingMedia:!1})})),{id:n}=this.props.attributes;return e!==n?null:(this.setState({media:t,lastRequestedMediaId:e}),t)})),i()(this,"setTracks",(e=>{const{setAttributes:t}=this.props;e&&c()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then((e=>{const n=[];Object.keys(e.tracks).forEach((t=>{for(const r in e.tracks[t]){const a=e.tracks[t][r];n.push({src:a.src,kind:t,srcLang:r,label:a.label})}})),t({videoPressTracks:n})}))})),i()(this,"switchToEditing",(()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),i()(this,"onSelectPoster",(e=>{const{setAttributes:t}=this.props;t({poster:e.url})})),i()(this,"onRemovePoster",(()=>{const{setAttributes:e}=this.props;e({poster:""}),this.posterImageButton.current.focus()})),i()(this,"toggleAttribute",(e=>t=>{this.props.setAttributes({[e]:t})})),i()(this,"getAutoplayHelp",(e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null)),i()(this,"onChangeRating",(e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==(0,y.indexOf)(["G","PG-13","R-17"],e)&&this.updateMetaApiCall({rating:e},(()=>this.setState({isUpdatingRating:!0,rating:e})),(()=>this.setState({rating:t})),(()=>this.setState({isUpdatingRating:!1})))})),i()(this,"onChangeAllowDownload",(e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},(()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e})),(()=>this.setState({allowDownload:t})),(()=>this.setState({isUpdatingAllowDownload:!1})))})),i()(this,"updateMetaApiCall",((e,t,n,r)=>{const{invalidateCachedEmbedPreview:a,url:o}=this.props,{id:i}=this.props.attributes;if(!i)return;t();const s={id:i};Object.assign(s,e),c()({path:"/wpcom/v2/videopress/meta",method:"POST",data:s}).then((e=>{status in e&&200!==e.status&&n()})).catch((()=>n())).finally((()=>{r(),a(o)}))})),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload},this.posterImageButton=(0,s.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:a,url:o,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let s=!1;if(o&&o!==e.url&&(n(o),s=!0),r){const e=(0,_.f)(r.html,k()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,a({videoPressClassNames:e})}else i||s||!this.props.attributes.guid||this.schedulePreviewCacheReload()}getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}renderControlLabelWithTooltip(e,t){return(0,s.createElement)(p.Tooltip,{text:t,position:"top"},(0,s.createElement)("span",null,e))}render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:o,preview:i,resumableUploadEnabled:l,setAttributes:c}=this.props,{fallback:u,fileForUpload:d,isFetchingMedia:m,isUpdatingRating:v,interactive:k,rating:y,allowDownload:w,isUpdatingAllowDownload:_}=this.state,{autoplay:A,caption:N,controls:I,guid:B,loop:M,muted:R,playsinline:L,poster:Z,preload:D,useAverageColor:F,videoPressTracks:O,isVideoPressExample:z,src:U}=t;if(z&&U)return(0,s.createElement)("img",{src:U,alt:N});const $=`video-block__poster-image-description-${n}`,H=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:O,onChange:e=>{c({videoPressTracks:e})},guid:B})),(0,s.createElement)(h.BlockControls,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-icon-button components-toolbar__control",label:__("Edit video","jetpack"),onClick:this.switchToEditing,icon:(0,s.createElement)(g.Z,{icon:b.Z})}))),(0,s.createElement)(h.InspectorControls,null,(0,s.createElement)(p.PanelBody,{title:__("Video Settings","jetpack")},(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),
71
  /* translators: Tooltip describing the "autoplay" option for the VideoPress player */
72
  __("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:A,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
@@ -83,7 +83,7 @@ __("The current poster image url is %s","jetpack"),Z):__("There is no poster ima
83
  /* translators: Tooltip describing the "allow download" option for the VideoPress player */
84
  __("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:w,disabled:m||_})))),V=e=>{this.setState({fileForUpload:e[0]})},G=e=>{var t,n;e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:(null===(t=e.image)||void 0===t?void 0:t.src)!==e.icon?null===(n=e.image)||void 0===n?void 0:n.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):c({src:void 0,id:void 0,poster:void 0})},q=e=>{let{mediaId:t,guid:n,src:r}=e;this.setState({fileForUpload:null}),t&&n&&r&&c({id:t,guid:n,src:r})};if(null!==d&&d instanceof File)return(0,s.createElement)(x.Z,{onUploadFinished:q},(0,s.createElement)(s.Fragment,null,H,(0,s.createElement)(C.Z,a()({file:d},this.props))));const W=m||r,K=u||o||!B,X=K&&!o&&!W,J=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:o||W?"":"videopress-block-hide"},(0,s.createElement)(E.Z,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,s.createElement)("div",{className:X?"":"videopress-block-hide"},(0,s.createElement)(e,this.props)));if(K)return l?(0,s.createElement)(x.Z,{onFilesSelected:V,onMediaItemSelected:G},J):(0,s.createElement)(s.Fragment,null,J);const{html:Y,scripts:Q}=i||{html:null,scripts:null},ee=W||!i;return(0,s.createElement)(s.Fragment,null,H,ee&&(0,s.createElement)(E.Z,{text:__("Generating preview…","jetpack")}),!ee&&(0,s.createElement)(T,a()({},this.props,{hideOverlay:this.hideOverlay,html:Y,scripts:Q,interactive:k,caption:N})))}}]),"withVideoPressEdit")},65293:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{text:t}=e;return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(a.Spinner,null),(0,r.createElement)("p",null,t))}},69913:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(96342),o=n.n(a),i=n(65736),s=n(81975),l=n(53217),c=n(55609),u=n(52175),p=n(86955),d=n(47923);const __=i.__;function m(e){let{file:t}=e;const[n,a]=(0,r.useState)(0),[m,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),{onUploadFinished:k}=(0,r.useContext)(d.H),y=(0,r.useRef)(null);y.current=f;const E=(0,u.useBlockProps)({className:"resumable-upload"}),w=(0,r.useCallback)((()=>{const e=(0,l.J)({onError:e=>{v(e)},onProgress:(e,t)=>{a(e/t*100)},onSuccess:e=>{k(e)}});(0,l.v)().then((n=>{const r=e(t,n);g(r)})).catch((e=>{v(e)}))}),[t,k]);(0,r.useEffect)((()=>(w(),()=>{null!==y.current&&y.current.abort()})),[]);const _=Math.round(n),C={width:`${_}%`},S=(0,s.escapeHTML)(t.name),j=(0,r.createInterpolateElement)((0,i.sprintf)(
85
  /* translators: Placeholder is a video file name. */
86
- __("Uploading <strong>%s</strong>","jetpack"),S),{strong:(0,r.createElement)("strong",null)}),x=o()(t.size);return(0,r.createElement)("div",E,(0,r.createElement)("div",{className:"resumable-upload__logo"},(0,r.createElement)(c.Icon,{icon:p.ll}),(0,r.createElement)("div",{className:"resumable-upload__logo-text"},__("VideoPress","jetpack"))),null!==b?(0,r.createElement)("div",{className:"resumable-upload__error"},(0,r.createElement)("div",{className:"resumable-upload__error-text"},__("An error was encountered during the upload. Check your network connection.","jetpack")),(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>(v(null),void w())},__("Try again","jetpack")),(0,r.createElement)(c.Button,{variant:"secondary",onClick:()=>k(),className:"resumable-upload__error-cancel"},__("Cancel","jetpack"))):(0,r.createElement)("div",{className:"resumable-upload__status"},(0,r.createElement)("div",{className:"resumable-upload__file-info"},(0,r.createElement)("div",{className:"resumable-upload__file-name"},j)," — ",(0,r.createElement)("div",{className:"resumable-upload__file-size"},x)),(0,r.createElement)("div",{className:"resumable-upload__progress"},(0,r.createElement)("div",{className:"resumable-upload__progress-loaded",style:C})),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)("div",{className:"videopress-upload__percent-complete"},`${_}%`),(0,r.createElement)(c.Button,{variant:"link",onClick:()=>{f&&(m?f.start():f.abort(),h(!m))}},m?"Resume":"Pause"))))}},53217:function(e,t,n){"use strict";n.d(t,{v:function(){return a},J:function(){return i}});var r=n(96731);const a=function(e){return new Promise((function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){n(e)}))}))},o={},i=e=>{let{onError:t,onProgress:n,onSuccess:i}=e;return(e,s)=>{const l=new r.gq(e,{onError:t,onProgress:n,endpoint:s.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:5e5,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,t){if(t.getStatus()>=400)return;const n=t.getHeader("x-videopress-upload-guid"),r=t.getHeader("x-videopress-upload-media-id"),a=t.getHeader("x-videopress-upload-src-url");if(n&&r&&a)return void(i&&i({mediaId:Number(r),guid:n,src:a}));const s={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},l={};Object.keys(s).forEach((function(e){const n=t.getHeader(e);n&&(l[s[e]]=n)})),l.key&&l.token&&(o[l.key]=l.token)},onBeforeRequest:function(e){const t=e._method;if(["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0),Object.keys(e._headers).map((function(t){e.setHeader(t,e._headers[t])})),"POST"===t){if(!!!s.token)throw"should never happen";e.setHeader("x-videopress-upload-token",s.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(o[r])e.setHeader("x-videopress-upload-token",o[r]);else if("HEAD"===t)return a(r).then((t=>(o[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return l.findPreviousUploads().then((function(e){e.length&&l.resumeFromPreviousUpload(e[0]),l.start()})),l}}},7223:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(89105),s=n.n(i),l=n(64850);t.Z=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:a,controls:i,guid:c,loop:u,muted:p,playsinline:d,poster:m,preload:h,videoPressClassNames:f,className:g,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E,maxWidth:w}={}}=t,_=o.useBlockProps.save({className:s()("wp-block-video",g,f,{[`align${b}`]:b})});if(!c)return e(t);const C=(0,l.p)(c,{autoplay:n,controls:i,loop:u,muted:p,playsinline:d,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E});let S={};return w&&w.length>0&&"100%"!==w&&(S={maxWidth:w,margin:"auto"}),(0,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:S},`\n${C}\n`),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))}),"withVideoPressSave")},36815:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=(n(99196),n(55609)),s=n(52175),l=n(65736);const __=l.__;class c extends o.Component{constructor(){super(...arguments),a()(this,"handleChangeSeekbarColor",(e=>{this.setState({seekbarColor:e})})),a()(this,"handleChangeSeekbarLoadingColor",(e=>{this.setState({seekbarLoadingColor:e})})),a()(this,"handleChangeSeekbarPlayedColor",(e=>{this.setState({seekbarPlayedColor:e})})),a()(this,"saveColors",(()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})}));const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.state,{toggleAttribute:r,useAverageColor:a}=this.props,l=!0;return(0,o.createElement)(i.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,o.createElement)(i.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:r("useAverageColor"),checked:a}),(0,o.createElement)(s.PanelColorSettings,{opened:!a,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:l},{value:n,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:l},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:l}]},(0,o.createElement)(i.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}t.Z=c},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(69307),a=n(86989),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(64369),u=n(9818);const __=i.__,p="subtitles",d=".vtt,text/vtt",m=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],h=(0,r.createElement)(s.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,r.createElement)(s.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(s.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,r.createElement)(s.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})),f=()=>"videoPressUploadTrack"in window;function g(e){let{tracks:t,onChange:n,guid:a}=e;const[l=-1,c]=(0,r.useState)(),u=e=>{const r=t[e];c(e),((e,t)=>{if(f())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const n={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return o()(n)})(r,a).finally((()=>{n(t.filter(((t,n)=>n!==e))),c(-1)}))};let p;return p=0===t.length?(0,r.createElement)("p",{className:"videopress-block-tracks-editor__tracks-informative-message"},__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")):t.map(((e,t)=>(0,r.createElement)("div",{key:t,className:"videopress-block-tracks-editor__track-list-track"},(0,r.createElement)("span",null,e.label),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,r.createElement)(s.Button,{variant:"link",isDestructive:!0,onClick:()=>{u(t)},"aria-label":(0,i.sprintf)(
87
  /* translators: %s: Label of the video text track e.g: "French subtitles" */
88
  __("Delete %s","jetpack"),e.label),disabled:l===t},l===t?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(s.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},p)}function b(e){let{track:t,guid:n,onChange:a,onClose:c,onCancel:h,trackExists:g}=e;const[b,v]=(0,r.useState)(),[k=!1,y]=(0,r.useState)(),{label:E="",srcLang:w="",kind:_=p}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,u.useSelect)((e=>e(l.store).getSettings().mediaUpload),[]))return null;return(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==C&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,C)),(0,r.createElement)(l.MediaUploadCheck,null,(0,r.createElement)(s.FormFileUpload,{onChange:e=>{const n=e.target.files;!n.length>0||(t.tmpFile=n[0],a(t))},accept:d,render:e=>{let{openFileDialog:t}=e;return(0,r.createElement)(s.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},
89
  /* translators: %s: The allowed file types to be uploaded as a video text track." */
@@ -91,15 +91,15 @@ __("Delete %s","jetpack"),e.label),disabled:l===t},l===t?__("Deleting","jetpack"
91
  /* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
92
  __("Kind","jetpack"),onChange:e=>{a({...t,kind:e})},disabled:k}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,r.createElement)(s.Spinner,null):(0,r.createElement)(s.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{v(null),""===E&&(t.label=__("English","jetpack")),""===w&&(t.srcLang="en"),void 0===t.kind&&(t.kind=p),g(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),((e,t)=>{if(f())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const n={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return o()(n)})(t,n).then((()=>{a(t),v(null),c()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:h},__("Close","jetpack"))),b&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},
93
  /* translators: %s: An error message returned after a failed video track file upload." */
94
- (0,i.sprintf)(__("Error: %s","jetpack"),b))))}function v(e){let{tracks:t=[],onChange:n,guid:a}=e;const[o,i]=(0,r.useState)(null);return(0,r.createElement)(s.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(s.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:n,icon:h})},renderContent:()=>null!==o?(0,r.createElement)(b,{track:t[o],guid:a,onChange:e=>{const r=[...t];r[o]=e,n(r)},onClose:()=>i(null),onCancel:()=>{n(t.filter(((e,t)=>t!==o))),i(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==o)).findIndex((t=>t.kind===e.kind&&t.srcLang===e.srcLang))}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)(g,{tracks:t,onChange:n,guid:a}),(0,r.createElement)(s.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(s.MenuItem,{icon:c.Z,onClick:()=>{(()=>{const e=t.length,r=[...t];r[e]||(r[e]={}),r[e]={...t[e]},n(r),i(e)})()}},__("Upload track","jetpack")))))})}},64850:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d},...m&&{useAverageColor:!0}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},61788:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(61434),a=n(89105),o=n.n(a);const i=e=>{const t=r.s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return o()(e,t)};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return i(t);const a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;const s=a.body.querySelector("iframe");if(s&&s.height&&s.width){const e=(s.width/s.height).toFixed(2);for(let n=0;n<r.s.length;n++){const a=r.s[n];if(e>=a.ratio)return o()(i(t),a.className,"wp-has-aspect-ratio")}}return t}},75872:function(e,t,n){"use strict";n.d(t,{U:function(){return i},m:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,i="mrec",s=[{height:250,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:__("Rectangle 300x250","jetpack"),tag:i,width:300,editorPadding:30},{height:90,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,r.createElement)(o.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},11655:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(41755);const __=i.__,l=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(o.PanelBody,{title:__("Visibility","jetpack")},(0,r.createElement)(o.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:n}))};t.Z=e=>{let{attributes:{format:t,hideMobile:n},setAttributes:o}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(s.Z,{value:t,onChange:e=>o({format:e})})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(l,{value:n,onChange:e=>o({hideMobile:!!e})})))}},72514:function(e,t,n){"use strict";var r=n(69307),a=n(11655),o=n(75872),i=n(72473),s=n(52203),l=n(38511),c=n(80405);t.Z=e=>{let{attributes:t,setAttributes:n}=e;const{format:u}=t,p=o.m.find((e=>{let{tag:t}=e;return t===u}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Z,{attributes:t,setAttributes:n}),(0,r.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${u}`},(0,r.createElement)("div",{className:"jetpack-wordads__ad",style:{width:p.width,height:p.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return s;case"mobile_leaderboard":return l;case"wideskyscraper":return c;default:return i}})(u)} )`,backgroundSize:"cover"}})))}},41755:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(75872);const s=(0,a.__)("Pick an ad format","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{position:"bottom right",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.ToolbarGroup,{controls:[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})),title:s,onClick:t,extraProps:{"aria-expanded":n},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},i.m.map((e=>{let{tag:i,name:s,icon:l}=e;return(0,r.createElement)(o.MenuItem,{className:i===t?"is-active":void 0,icon:l,isSelected:i===t,key:i,onClick:()=>{n(i),a()},role:"menuitemcheckbox"},s)})))}})}},74677:function(e,t,n){"use strict";n.d(t,{u2:function(){return c},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(72514),s=n(75872),l=n(4597);const __=a.__,_x=a._x,c="wordads",u=__("Ad","jetpack"),p=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),d={title:u,description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Earn income by adding high quality ads to your post","jetpack")),(0,r.createElement)(o.ExternalLink,{href:"https://wordads.co/"},__("Learn all about WordAds","jetpack"))),icon:{src:p,foreground:(0,l.m)()},attributes:{align:{type:"string",default:"center"},format:{type:"string",default:s.U},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:"earn",keywords:[_x("ads","block search term","jetpack"),"WordAds",_x("advertisement","block search term","jetpack")],supports:{align:["left","center","right"],alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:i.Z,save:()=>null}},5488:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"descript",title:"Descript",icon:o.h,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},697:function(e,t,n){"use strict";var r=n(92694),a=n(65736),o=n(4597);const __=a.__,_x=a._x,i={name:"facebook",title:"Facebook",icon:{src:"facebook",foreground:(0,o.m)()},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;const n=e.variations.filter((e=>e.name!==i.name));return e.variations=[...n,i],e}))},11382:function(e,t,n){"use strict";n(697),n(47855),n(4446),n(21242),n(5488)},47855:function(e,t,n){"use strict";var r=n(92694),a=n(65736),o=n(4597),i=n(91978);const __=a.__,_x=a._x,s={name:"instagram",title:"Instagram",icon:{src:"instagram",foreground:(0,o.m)()},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!(0,i.Z)())return e;const n=e.variations.filter((e=>e.name!==s.name));return e.variations=[...n,s],e}))},4446:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"loom",title:"Loom",icon:o.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},21242:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"smartframe",title:"SmartFrame",icon:o.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},82786:function(e,t,n){"use strict";var r=n(92694),a=n(4981),o=n(26863);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"jetpack_widget_social_icons"===t},transform:e=>{let{instance:t}=e,n=[];return t.raw.icons.forEach((e=>{const t=new URL(e.url.includes(":")?e.url:"https://"+e.url),r=t.hostname?t.hostname:t.protocol,i=o.Z.find((e=>r.includes(e.url)||e.url.includes(r))),s=(0,a.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});n=[...n,s]})),(0,a.createBlock)("core/social-links",{},n)}}]};(0,r.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=i),e}))},26863:function(e,t){"use strict";t.Z=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"pocket",url:["getpocket.com"]},{name:"reddit",url:["reddit.com"]},{name:"skype",url:["skype.com","skype:"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},96088:function(e,t,n){"use strict";n.d(t,{x:function(){return a},L:function(){return o}});var r=n(69307);const a=(0,r.createContext)(),o=e=>{let{onBannerVisibilityChange:t,onChildBannerVisibilityChange:n,hasParentBanner:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onBannerVisibilityChange:t,onChildBannerVisibilityChange:n,hasParentBanner:o},children:i})}},21559:function(e,t,n){"use strict";var r=n(92819),a=n(19416),o=n(47701),i=n.n(o),s=n(92694),l=n(65736),c=n(55149),u=n(39376),p=n(88058),d=n(73657);const __=l.__,m=[];(0,s.addFilter)("blocks.registerBlockType","jetpack/paid-block",((e,t)=>((0,a.X1)(t)&&(m.includes(t)||m.push(t),e.keywords=(0,r.uniq)([...e.keywords,"premium",__("premium","jetpack")]),(0,a.HD)(t)||(e.icon=(0,u.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0})),e))),(0,s.addFilter)("editor.BlockListBlock","jetpack/paid-block-with-warning",c.Z),(0,s.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",p.Z),(0,s.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",d.Z),i()((function(){(0,a.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},88058:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(52175),s=n(94333),l=n(19416),c=n(34168),u=n(96088);t.Z=(0,s.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,i.useBlockEditContext)(),r=(0,l.m3)(n);if(null==r||!r.mediaPlaceholder||!(0,l.X1)(n))return(0,o.createElement)(e,t);const{fileType:s}=r,{onError:p}=t,{onBannerVisibilityChange:d}=(0,o.useContext)(u.x),m=(0,o.useCallback)((e=>d((null==e?void 0:e.length)&&(0,c.Qu)(e[0],s))),[s,d]),h=(0,o.useCallback)((e=>{var t,n;const r=null==e||null===(t=e[0])||void 0===t||null===(n=t.props)||void 0===n?void 0:n.children;return(0,c.Qu)(r,s)?m([r]):p(e)}),[m,s,p]);return(0,o.createElement)("div",{className:"paid-block-media-placeholder"},(0,o.createElement)(e,a()({},t,{onFilesPreUpload:m,onError:h})))}),"withMediaPlaceholderUpgradable")},73657:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(19416),s=n(52175),l=n(94333),c=n(34168),u=n(96088);t.Z=(0,l.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n),l=(0,o.useRef)();if(null==r||!r.mediaReplaceFlow||!(0,i.X1)(n))return(0,o.createElement)(e,t);const{fileType:p}=r,{onBannerVisibilityChange:d}=(0,o.useContext)(u.x);return(0,o.createElement)(e,a()({},t,{onFilesUpload:e=>{l.current=null!=e&&e.length?e[0]:null,d((null==e?void 0:e.length)&&(0,c.Qu)(e[0],p))},createNotice:(e,n,r)=>{if((0,c.Qu)(l.current,p))return l.current=null,null;t.createNotice(e,n,r)}}))}),"withMediaReplaceFlowUpgradable")},90113:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{cx:t=23,cy:n=3,r:o=4,fill:i="#e34c84",stroke:s="#ffffff",strokeWidth:l="2"}=e;return(0,r.createElement)(a.Circle,{className:"jetpack-paid-block-symbol",cx:t,cy:n,r:o,fill:i,stroke:s,strokeWidth:l})}},39376:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(69307),a=n(19416),o=n(90113);const i=e=>{var t,n,a;return null!==(t=e)&&void 0!==t&&t.src?e={...e,src:(0,r.cloneElement)(e.src,{children:[e.src.props.children,(0,r.createElement)(o.Z,{key:"paid-symbol"})]})}:null!==(n=e)&&void 0!==n&&null!==(a=n.props)&&void 0!==a&&a.children&&(e=(0,r.cloneElement)(e,{children:[e.props.children,(0,r.createElement)(o.Z,{key:"paid-symbol"})]})),e};function s(e,t){return(0,a.X1)(e)?i(t):t}t.Z=i},28237:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(9818),i=n(28413),s=n(33347);const __=a.__,l=__("Premium Block","jetpack"),
95
  /** translators: %s: name of the plan. */
96
- c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),__("Upgrade","jetpack"));t.ZP=e=>{let{onRedirect:t,align:n,className:p,title:d=l,description:m=null,buttonText:h=u,visible:f=!0,requiredPlan:g,context:b}=e;const[v,k,y]=(0,i.Z)(g,t),E=(0,o.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,a.sprintf)(c,n.product_name_short):null}),[m]);return E&&(0,r.createElement)(s.p,{align:n,buttonText:h,checkoutUrl:v,className:p,context:b,description:E,goToCheckoutPage:k,isRedirecting:y,title:d,visible:f})}},10710:function(e,t,n){"use strict";n.d(t,{v:function(){return a},W:function(){return o}});var r=n(63415);const a=e=>{let{plan:t,blockName:n,context:a}=e;r.Z.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:a})},o=e=>{let{plan:t,blockName:n,context:a}=e;r.Z.tracks.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:a})}},55149:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(19416),c=n(94333),u=n(9818),p=n(28237),d=n(96088),m=n(10710);t.Z=(0,c.createHigherOrderComponent)((e=>t=>{var n;const{name:r,className:i,clientId:c,isSelected:h,attributes:f,setAttributes:g}=t||{},{onChildBannerVisibilityChange:b,hasParentBanner:v}=(0,o.useContext)(d.x)||{},k=(0,l.Rl)(r);if(!k)return(0,o.createElement)(e,t);const y=(0,l.HD)(r),E=(0,l.m3)(r),[w,_]=(0,o.useState)(!y),[C,S]=(0,o.useState)(!1),[j,x]=(0,o.useState)(!1),P="editor-canvas",T=(0,u.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(c,!0)),[]),A=(h||T)&&w&&!j,N=(0,o.useMemo)((()=>({plan:k,blockName:r,context:P})),[k,r,P]);(0,o.useEffect)((()=>{A&&S(!0)}),[A,S]),(0,o.useEffect)((()=>{!C&&A&&(0,m.W)(N)}),[C,N,A]),(0,o.useEffect)((()=>_(!y)),[f,_,y]),(0,o.useEffect)((()=>{g({shouldDisplayFrontendBanner:!v})}),[g,v]),(0,o.useEffect)((()=>{b&&b(A||j)}),[A,j,b]);const I=s()(i,{"is-upgradable":A});return(0,o.createElement)(d.L,{onBannerVisibilityChange:_,onChildBannerVisibilityChange:x,hasParentBanner:!0},(0,o.createElement)(p.ZP,{className:`is-${t.name.replace(/\//,"-")}-paid-block`,title:null,align:null==t||null===(n=t.attributes)||void 0===n?void 0:n.align,visible:A,description:null==E?void 0:E.description,requiredPlan:k,context:P,onRedirect:()=>(0,m.v)(N)}),(0,o.createElement)(e,a()({},t,{className:I})))}),"withUpgradeBanner")},76847:function(e,t,n){"use strict";n.d(t,{u:function(){return d},X:function(){return m}});var r=n(69307),a=n(64481),o=n(55609),i=n(72067),s=n(9818),l=n(12238),c=n(59372),u=n(65736),p=n(63415);const __=u.__,d="payments",m={render:()=>{const e=(0,a.Z)("wpcom-payments-donations");return"page"!==(0,s.useSelect)((e=>e(l.store).getCurrentPostType()),[])?null:(0,r.createElement)(i.PluginPostPublishPanel,{className:"jetpack-payments-post-publish-panel",title:__("Start accepting payments","jetpack"),initialOpen:!0,icon:c.Z},(0,r.createElement)("p",null,__("Insert the Payment Button or the Donations Form — no plugin required.","jetpack")),(0,r.createElement)("p",null,(0,r.createElement)(o.ExternalLink,{href:e,onClick:()=>{p.Z.tracks.recordEvent("jetpack_editor_payments_post_publish_click")}},__("Learn more about these blocks","jetpack"))))}}},73310:function(e,t,n){"use strict";n.d(t,{D:function(){return m}});var r=n(69307),a=n(9818),o=n(12238),i=n(55609),s=n(65736),l=n(77953),c=n(2205),u=n(3779),p=n(86955);const __=s.__;function d(){const e=(0,r.useRef)(),[t,n]=(0,r.useState)();(0,r.useEffect)((()=>{if(null==e||!e.current)return;const t=e.current.querySelector("svg");if(!t)return;const r=(new XMLSerializer).serializeToString(t);n(`data:image/svg+xml;base64,${window.btoa(r)}`)}),[e]);const i=(0,a.useSelect)((e=>e(o.store).getPermalink()),[]),{dataUrl:s}=(0,c.Z)({generateDataUrl:!0}),u=s||t;return(0,r.createElement)("div",{ref:e},(0,r.createElement)(l.Z,{value:i,size:300,imageSettings:u&&{src:u,width:64,height:64},renderAs:"canvas",level:"H"}),(0,r.createElement)(p.IM,{className:"qr-post-jetpack-logo",size:48,border:2}))}function m(){const e=(0,r.useRef)(),t=(0,a.useSelect)((e=>e(o.store).getEditedPostSlug()),[]),[n,s]=(0,r.useState)(!1),l=()=>s(!1);return(0,r.createElement)("div",{className:"qr-post-button"},(0,r.createElement)(i.Button,{isSecondary:!0,onClick:()=>s((e=>!e))},__("Get QR code","jetpack")),n&&(0,r.createElement)(i.Modal,{title:__("QR Post code","jetpack"),onRequestClose:l,className:"qr-post-modal"},(0,r.createElement)("div",{className:"qr-post-modal__qr-code",ref:e},(0,r.createElement)(d,null)),(0,r.createElement)("div",{className:"qr-post-modal__actions_buttons"},(0,r.createElement)(i.Button,{isSecondary:!0,onClick:()=>(0,u.N)(t,e)},__("Download","jetpack")),(0,r.createElement)(i.Button,{isSecondary:!0,onClick:l},__("Close","jetpack")))))}},2205:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(69307),o=n(37798),i=n(92694);function s(){let{generateDataUrl:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(),{id:s,mediaItemData:l}=(0,r.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:r}=e(o.store),a=r("root","site"),i=n("root","__unstableBase"),s=null==a?void 0:a.site_logo,l=null==i?void 0:i.site_logo,c=t("update","settings")?s:l,u=c&&e(o.store).getMedia(c,{context:"view"});return{id:c,mediaItemData:u&&{mediaId:u.id,url:u.source_url,alt:u.alt_text}}}),[]);if(!s||null==l||!l.url)return{};if(!e)return{id:s,...l};const c=new Image,u=(0,i.applyFilters)("media.crossOrigin",void 0,l.url);return"string"==typeof u&&(c.crossOrigin=u),c.onload=function(){const e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.fillStyle="white",t.lineJoin="round",t.fillRect(0,0,e.width,e.height);const r=.08*e.width;t.drawImage(this,r,r,e.width-2*r,e.height-2*r);try{n(e.toDataURL("image/png"))}catch(e){console.warn("Error generating QR code extensions post-publish-qr-post-panel: ",e),console.warn("In case it's a cross-origin issue, take a look at https://developer.wordpress.org/block-editor/reference-guides/filters/editor-filters/#media-crossorigin"),n(null)}},c.src=l.url,{id:s,...l,dataUrl:t}}},70104:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(69307),a=n(55609),o=n(72067),i=n(65736),s=n(9818),l=n(12238),c=n(3093),u=n(73310);const __=i.__,p="post-publish-qr-post-panel",d={render:function(){const e={name:"post-publish-qr-post-panel",title:__("QR Code","jetpack"),className:"post-publish-qr-post-panel",icon:null,initialOpen:!0},t=(0,s.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);function n(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("p",null,__("Take advantage of the QR code to open the post from different devices.","jetpack"))),(0,r.createElement)(u.D,null))}return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PluginPostPublishPanel,e,(0,r.createElement)(n,null)),t&&(0,r.createElement)(c.Z,null,(0,r.createElement)(a.PanelBody,e,(0,r.createElement)(n,null))))}}},3779:function(e,t,n){"use strict";function r(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return;if(null==t||!t.current)return;const r=t.current.querySelector("canvas");r&&r.toBlob((t=>{const r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.setAttribute(n?"download":"target",`qr-post-${e}.png`),a.click()}))}n.d(t,{N:function(){return r}})},74184:function(e,t,n){"use strict";var r=n(69307),a=n(11268),o=n.n(a),i=n(86955);const s=e=>{const{id:t,serviceName:n,label:a,profilePicture:o}=e;return(0,r.createElement)("label",{htmlFor:t,className:"jetpack-publicize-connection-label"},(0,r.createElement)("div",{className:o?"components-connection-icon__picture":""},o&&(0,r.createElement)("img",{src:o,alt:a}),(0,r.createElement)(i.av,{serviceName:n,className:"jetpack-publicize-gutenberg-social-icon"})),(0,r.createElement)("span",{className:"jetpack-publicize-connection-label-copy"},a))};s.propTypes={id:o().string.isRequired,serviceName:o().string,label:o().string,profilePicture:o().string},t.Z=s},75817:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(11268),s=n.n(i),l=n(55609),c=n(74184);const u=e=>{const{className:t,checked:n,id:a,disabled:i,onChange:s,serviceName:u,label:p,profilePicture:d}=e,m=o()("components-connection-toggle",{"is-not-checked":!n,"is-disabled":i});return(0,r.createElement)("div",{className:m},(0,r.createElement)(c.Z,{id:a,serviceName:u,label:p,profilePicture:d}),(0,r.createElement)(l.FormToggle,{id:a,className:t,checked:n,onChange:s,disabled:i}))};u.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string},t.Z=u},84533:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(94333),c=n(9818);const __=i.__;class u extends o.Component{constructor(){super(...arguments),a()(this,"refreshConnectionClick",(e=>{const{href:t,title:n}=e.target;e.preventDefault();const r=window.open(t,n,""),a=window.setInterval((()=>{!1!==r.closed&&(window.clearInterval(a),this.props.refreshConnections())}),500)}))}componentDidMount(){this.props.refreshConnections()}renderRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>e.can_refresh));return t.length?(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,__("Before you hit Publish, please refresh the following connection(s) to make sure we can Publicize your post:","jetpack")),t.map((e=>(0,o.createElement)(s.Button,{href:e.refresh_url,isSmall:!0,key:e.id,onClick:this.refreshConnectionClick,title:e.refresh_text},e.refresh_text)))):null}renderNonRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>!e.can_refresh));return t.length?t.map((e=>(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,e.test_message)))):null}render(){return(0,o.createElement)(o.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}t.Z=(0,l.compose)([(0,c.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections()}))),(0,c.withDispatch)((e=>({refreshConnections:e("jetpack/publicize").refreshConnectionTestResults})))])(u)},82578:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(9818),c=n(92819),u=n(19416),p=n(75817);const __=i.__;class d extends o.Component{constructor(){super(...arguments),a()(this,"maybeDisplayLinkedInNotice",(()=>this.connectionNeedsReauth()&&(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,__("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),(0,o.createElement)(s.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,u.lQ)()}`},__("Go to Sharing settings","jetpack"))))),a()(this,"connectionNeedsReauth",(()=>(0,c.includes)(this.props.mustReauthConnections,this.props.name))),a()(this,"onConnectionChange",(()=>{const{id:e}=this.props;this.props.toggleConnection(e)}))}connectionIsFailing(){const{failedConnections:e,name:t}=this.props;return e.some((e=>e.service_name===t))}render(){const{disabled:e,enabled:t,id:n,label:r,name:a,profilePicture:i}=this.props,l="connection-"+a+"-"+n,c=a.replace("_","-");let u=(0,o.createElement)(p.Z,{id:l,className:"jetpack-publicize-connection-toggle",checked:t,onChange:this.onConnectionChange,disabled:e,serviceName:c,label:r,profilePicture:i});return(e||this.connectionIsFailing()||this.connectionNeedsReauth())&&(u=(0,o.createElement)(s.Disabled,null,u)),(0,o.createElement)("li",null,this.maybeDisplayLinkedInNotice(),(0,o.createElement)("div",{className:"publicize-jetpack-connection-container"},u))}}t.Z=(0,l.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()})))(d)},87322:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(82578),i=n(43112),s=n(71042),l=n(81647),c=n(78402);function u(e){let{isPublicizeEnabled:t,isRePublicizeFeatureEnabled:n,isPublicizeDisabledBySitePlan:u}=e;const{connections:p,toggleById:d,hasConnections:m}=(0,l.Z)(),{message:h,updateMessage:f,maxLength:g}=(0,c.Z)();const b=u?a.Disabled:r.Fragment;return(0,r.createElement)(b,null,m&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("ul",{className:"jetpack-publicize__connections-list"},p.map((e=>{let{display_name:a,enabled:i,id:s,service_name:l,toggleable:c,profile_picture:p}=e;return(0,r.createElement)(o.Z,{disabled:n?!t:!c,enabled:i&&!u,key:s,id:s,label:a,name:l,toggleConnection:d,profilePicture:p})})))),!u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,null),p.some((e=>e.enabled))&&(0,r.createElement)(s.Z,{disabled:!n&&p.every((e=>!e.toggleable)),maxLength:g,onChange:f,message:h})))}},71042:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,_n=a._n;function i(e){let{message:t="",onChange:n,disabled:i,maxLength:s}=e;const l=s-t.length;return(0,r.createElement)(o.TextareaControl,{value:t,onChange:n,disabled:i,maxLength:s,placeholder:__("Write a message for your audience here.","jetpack"),rows:4,help:(0,a.sprintf)(
97
  /* translators: placeholder is a number. */
98
- _n("%d character remaining","%d characters remaining",l,"jetpack"),l)})}},11514:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(12238),s=n(9818),l=n(84533),c=n(87322),u=n(39290),p=n(81647),d=n(67785),m=n(73542),h=n(87052),f=n(25042);const __=a.__;t.Z=e=>{let{prePublish:t}=e;const{refresh:n,hasConnections:a,hasEnabledConnections:g}=(0,p.Z)(),b=(0,s.useSelect)((e=>e(i.store).isCurrentPostPublished()),[]),{isRePublicizeFeatureEnabled:v,isPublicizeEnabled:k,togglePublicizeFeature:y,isPublicizeDisabledBySitePlan:E,hideRePublicizeFeature:w}=(0,m.Z)(),_=k&&!E;(0,d.M)((function(){g&&n()}),[g,n]);const C=E?o.Disabled:o.PanelRow,S=t?r.Fragment:o.PanelBody,j=t?{}:{title:__("Share this post","jetpack"),className:E?"jetpack-publicize-disabled":""};return(0,r.createElement)(S,j,(0,r.createElement)(f.Z,{isPostPublished:b}),!w&&(0,r.createElement)(r.Fragment,null,v&&!b&&(0,r.createElement)(C,null,(0,r.createElement)(o.ToggleControl,{className:"jetpack-publicize-toggle",label:_&&!E?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:y,checked:_,disabled:!a})),(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,{isPublicizeEnabled:_,isRePublicizeFeatureEnabled:v,isPublicizeDisabledBySitePlan:E}),!E&&(0,r.createElement)(u.Z,{prePublish:t}),(0,r.createElement)(h.o,null)))}},43112:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(92819),o=n(75031),i=n(19416),s=n(65736),l=n(55609),c=n(81647);const __=s.__;function u(){const{refresh:e}=(0,c.Z)(),t=(0,i.lQ)(),n=(0,a.debounce)((function(t){t&&e()}),2e3),s=t?`https://wordpress.com/marketing/connections/${t}`:"options-general.php?page=sharing&publicize_popup=true";return(0,r.createElement)(o.Z,{onChange:n},(0,r.createElement)("div",{className:"jetpack-publicize-add-connection-wrapper"},(0,r.createElement)(l.ExternalLink,{href:s,target:"_blank"},__("Connect an account","jetpack"))))}},87052:function(e,t,n){"use strict";n.d(t,{o:function(){return h}});var r=n(69307),a=n(65736),o=n(55609),i=n(9818),s=n(53961),l=n(12238),c=n(52618),u=n(81647),p=n(73542);const __=a.__;function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Unable to share the Post","jetpack");const{createErrorNotice:t}=(0,i.dispatch)(s.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,u.Z)(),{isPublicizeEnabled:t}=(0,p.Z)(),{isFetching:n,isError:a,isSuccess:m,doPublicize:h}=(0,c.Z)(),f=(0,i.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);(0,r.useEffect)((()=>{if(!n)return a?d():void(m&&function(){const{createSuccessNotice:e}=(0,i.dispatch)(s.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,a,m]);const g=!t||!e||!f||n;return(0,r.createElement)(o.Button,{variant:"secondary",onClick:function(){if(!f)return d(__("You must publish your post before you can share it.","jetpack"));(0,i.dispatch)(s.store).removeNotice("publicize-post-share-message"),h()},disabled:g,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeFeatureEnabled:e,isRePublicizeUpgradableViaUpsell:t}=(0,p.Z)(),n=(0,i.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);return e&&n?t?null:(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(m,null)):null}},76370:function(e,t,n){"use strict";n.d(t,{nE:function(){return l},H8:function(){return c}});var r=n(69307),a=n(94333),o=n(9818),i=n(92694),s=n(86395);const l={"core/gallery":{contentAttributes:["images"]},"core/heading":{contentAttributes:["content"]},"core/image":{contentAttributes:["alt","url"]},"core/list":{contentAttributes:["values"]},"core/paragraph":{contentAttributes:["content"]},"core/quote":{contentAttributes:["value","citation"]},"core/separator":{contentAttributes:[]},"core/spacer":{contentAttributes:[]},"core/verse":{contentAttributes:["content"]},"core/video":{contentAttributes:["src"]},"core/embed":{contentAttributes:["url"]},"jetpack/gif":{contentAttributes:["giphyUrl"]}},c=["core/column","core/columns","core/group"];(0,i.addFilter)("blocks.registerBlockType","jetpack/publishing-tweetstorms",(e=>{const{edit:t}=e;return{...e,edit:e=>(0,r.createElement)(s.Z,{ChildEdit:t,childProps:e})}}));t.ZP=(0,a.compose)([(0,o.withSelect)((e=>({isTweetStorm:e("jetpack/publicize").isTweetStorm(),isTyping:e("core/block-editor").isTyping()})))])((e=>{let{isTweetStorm:t,isTyping:n}=e;return t?document.body.classList.add("jetpack-tweetstorm"):document.body.classList.remove("jetpack-tweetstorm"),t&&n?document.body.classList.add("jetpack-tweetstorm-is-typing"):document.body.classList.remove("jetpack-tweetstorm-is-typing"),null}))},39290:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(9818);n(42998);const __=a.__;t.Z=(0,i.compose)([(0,s.withSelect)((e=>{const{isTweetStorm:t,getTweetStorm:n}=e("jetpack/publicize");return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),isTweetStorm:t(),tweetStormLength:n().length}})),(0,s.withDispatch)((e=>({setTweetstorm:t=>{e("core/editor").editPost({meta:{jetpack_is_tweetstorm:t}}),t?e("jetpack/publicize").refreshTweets():(e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm"),e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm-line-break"))}})))])((e=>{let{connections:t,isTweetStorm:n,tweetStormLength:a,setTweetstorm:i,prePublish:s}=e;if(null==t||!t.some((e=>"twitter"===e.service_name&&e.enabled)))return null;const l=(e,t)=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,e),(0,r.createElement)("br",null),t),c=[];return a>=102?c.push({id:"jetpack-publicize-twitter-tweetstorm-too-long",status:"error",content:__("Only the first 100 tweets of this post will be published in the Twitter thread.","jetpack"),isDismissible:!1}):a>=22?c.push({id:"jetpack-publicize-twitter-tweetstorm-a-bit-long",status:"warning",content:__("This post will create a Twitter thread more than 20 tweets long.","jetpack"),isDismissible:!1}):s&&a<=2&&c.push({id:"jetpack-publicize-twitter-tweetstorm-too-short",status:"warning",content:__("None of the content in this post could be transformed into tweets, it may be better to share as a single tweet.","jetpack"),isDismissible:!1}),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.RadioControl,{label:__("Twitter settings","jetpack"),selected:n?"tweetstorm":"single",options:[{label:l(__("Single Tweet","jetpack"),__("Share a link to this post to Twitter.","jetpack")),value:"single"},{label:l(__("Twitter Thread","jetpack"),__("Share the content of this post as a Twitter thread.","jetpack")),value:"tweetstorm"}],onChange:e=>{i("tweetstorm"===e)}}),n&&(0,r.createElement)(o.NoticeList,{className:"jetpack-publicize-twitter-options__notices",notices:c}))}))},86395:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(55609),i=n(94333),s=n(9818),l=(n(42998),n(86955));class c extends r.Component{componentDidMount(){const{isTweetStorm:e,updateTweets:t}=this.props;e&&t()}componentDidUpdate(e){const{boundaries:t,childProps:n,currentAnnotations:r,isTweetStorm:o,updateAnnotations:i,updateTweets:s,supportedBlockType:l,contentAttributesChanged:c}=this.props;o&&l&&(c(e.childProps,n)&&s(),r.length===t.filter((e=>["normal","line-break"].includes(e.type))).length&&(0,a.isEqual)(e.boundaries,t)||i())}render(){const{ChildEdit:e,childProps:t,isTweetStorm:n,isSelectedTweetBoundary:a,boundaryStylesSelectors:i,popoverWarnings:s}=this.props;return n?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),a&&(0,r.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider"},(0,r.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider-icon"},(0,r.createElement)(l.av,{serviceName:"twitter"})),s.length>0&&(0,r.createElement)(o.Popover,{className:"jetpack-publicize-twitter__tweet-divider-popover",focusOnMount:!1,position:"bottom center"},(0,r.createElement)("ol",null,s.map(((e,t)=>(0,r.createElement)("li",{key:`jetpack-publicize-twitter__tweet-divider-popover-warning-${t}`},e)))))),i&&(0,r.createElement)("style",{type:"text/css"},i.map((e=>`${e}::after {\n\t\t\t\t\t\t\t\tcontent: "";\n\t\t\t\t\t\t\t\tbackground: #0009;\n\t\t\t\t\t\t\t\twidth: 3px;\n\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\tmargin: 0 1px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.is-dark-theme ${e}::after {\n\t\t\t\t\t\t\t\tbackground: #fff9;\n\t\t\t\t\t\t\t}`)))):(0,r.createElement)(e,t)}}t.Z=(0,i.compose)([(0,s.withSelect)(((e,t)=>{let{childProps:n}=t;const{isTweetStorm:r,getPopoverWarnings:a,getBoundariesForBlock:o,getBoundaryStyleSelectors:i,isSelectedTweetBoundary:s,getSupportedBlockType:l,contentAttributesChanged:c}=e("jetpack/publicize"),u=e("core/annotations").__experimentalGetAllAnnotationsForBlock(n.clientId);return{isTweetStorm:r(),isSelectedTweetBoundary:s(n),boundaries:o(n.clientId),boundaryStylesSelectors:i(n.clientId),popoverWarnings:a(n),currentAnnotations:u,supportedBlockType:l(n.name),contentAttributesChanged:c}})),(0,s.withDispatch)(((e,t,n)=>{let{childProps:r}=t,{select:a}=n;return{updateTweets:()=>e("jetpack/publicize").refreshTweets(),updateAnnotations:()=>{const{contentAttributesChanged:t,getTweetsForBlock:n}=a("jetpack/publicize"),o=n(r.clientId);if(!o||0===o.length)return;if(t(o.reduce(((e,t)=>e||t.blocks.find((e=>e.clientId===r.clientId))),!1),r))return;a("core/annotations").__experimentalGetAllAnnotationsForBlock(r.clientId).forEach((t=>{["jetpack-tweetstorm","jetpack-tweetstorm-line-break"].includes(t.source)&&e("core/annotations").__experimentalRemoveAnnotation(t.id)}));o.filter((e=>e.boundary)).map((e=>e.boundary)).forEach((t=>{const{container:n,type:a,start:o,end:i}=t;"normal"===a?e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm",richTextIdentifier:n,range:{start:o,end:i}}):"line-break"===a&&e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm-line-break",richTextIdentifier:n,range:{start:o,end:i}})}))}}}))])(c)},25042:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(19416),s=n(65736),l=n(55609),c=n(61455),u=n(28413),p=n(73542),d=n(81647);const __=s.__;function m(e){let{isPostPublished:t}=e;const{isRePublicizeFeatureEnabled:n,isRePublicizeUpgradableViaUpsell:a,isRePublicizeFeatureAvailable:m,isPublicizeEnabled:h}=(0,p.Z)(),f=(0,i.Rl)("republicize"),[g,b,v,k]=(0,u.Z)(f),{hasConnections:y,hasEnabledConnections:E}=(0,d.Z)(),w=h&&!(a&&n);if(!t||!n||t&&m)return(0,r.createElement)("div",null,function(e,t,n,r,a){const o=__("Start sharing your posts by connecting your social media accounts.","jetpack"),i=__("This post will be shared on all your enabled social media accounts the moment you publish the post.","jetpack");return t?r?n&&a?n&&a&&!e?i:__("Share this post on all your enabled social media accounts by clicking on the share post button.","jetpack"):__("Use this tool to share your post on all your social media accounts.","jetpack"):o:e?o:i}(t,n,w,y,E));const _=(null==k?void 0:k.product_name)||__("paid","jetpack"),C=!(0,i.Ug)()&&!(0,i.Wp)(),S=C?__("Re-sharing your content","jetpack"):__("Share Your Content Again","jetpack",0),j=C?"https://jetpack.com/support/publicize/#re-sharing-your-content":"https://wordpress.com/support/publicize/#share-your-content-again",x=__("Upgrade now","jetpack");return m||a?(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("div",{className:"jetpack-publicize__upsell-description"},(0,s.sprintf)(
99
  /* translators: placeholder is the product name of the plan. */
100
  __("To re-share a post, you need to upgrade to the %s plan","jetpack"),_)),(0,r.createElement)(l.Button,{href:v?null:g,onClick:b,target:"_top",icon:c.Z,className:o()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!g}),isBusy:v},v?__("Redirecting…","jetpack"):x)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,S),(0,r.createElement)("br",null),(0,s.sprintf)(
101
  /* translators: placeholder is the product name of the plan. */
102
- __("This feature is for sites with a %s plan.","jetpack"),_),(0,r.createElement)("br",null),(0,r.createElement)(l.ExternalLink,{href:j},__("More information.","jetpack")))}},73542:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(12238),o=n(19416);const i="republicize";function s(){var e,t;const{togglePublicizeFeature:n}=(0,r.useDispatch)("jetpack/publicize"),{available:s}=(0,o.OZ)(i),l=(0,r.useSelect)((e=>e(a.store).isCurrentPostPublished()),[]),c=(0,r.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),u=!(null===(e=window)||void 0===e||null===(t=e.Jetpack_Editor_Initial_State.jetpack)||void 0===t||!t.republicize_enabled),p=(0,o.X1)(i);return{isPublicizeEnabledMeta:c,isRePublicizeFeatureEnabled:u,isPublicizeEnabled:l&&!(p&&u)||c,togglePublicizeFeature:n,isPublicizeDisabledBySitePlan:u&&l&&p,isRePublicizeFeatureAvailable:s,isRePublicizeUpgradableViaUpsell:p,hideRePublicizeFeature:l&&!s&&!p&&u}}},67785:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(94333),a=n(12238),o=n(9818),i=n(69307);function s(e,t){const n=(0,o.useSelect)((e=>e(a.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{s&&!n&&e()}),[n,s,e,t])}},52618:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(86989),a=n.n(r),o=n(9818),i=n(12238),s=n(69307),l=n(65736),c=n(78402),u=n(81647);const __=l.__;function p(e){var t;const n=null==e?void 0:e.code,r=null==e||null===(t=e.errors)||void 0===t?void 0:t.length;if(!n&&!r)return!1;let a="";return n&&(a=__("Unable to share the Post","jetpack")),r&&(a=__("Unable to share the Post","jetpack")),{message:a,result:e}}function d(e){const{message:t}=(0,c.Z)(),{skippedConnections:n}=(0,u.Z)(),r=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||r;const[l,d]=(0,s.useState)({data:[],error:{}}),m=(0,s.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!l.isFetching)return d({...r,isFetching:!0}),a()({path:`/wpcom/v2/posts/${e}/publicize`,method:"POST",data:{message:t,skipped_connections:n}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return d((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));d((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:null==e?void 0:e.results,error:{}})))})).catch((e=>{d((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){d(r)}}),[e,t,n,l.isFetching]);return{...l,doPublicize:m}}},81647:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)("jetpack/publicize"),n=(0,r.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=n.filter((e=>!e.enabled)).map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:n&&n.some((e=>e.enabled)),skippedConnections:a,toggleById:t,refresh:e}}},78402:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818),a=n(12238);function o(){const{editPost:e}=(0,r.useDispatch)(a.store),{message:t,maxLength:n}=(0,r.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:n,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},60419:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(72067),i=n(12238),s=(n(95552),n(76370)),l=n(3093),c=n(11514);const __=a.__,u="publicize",p={render:()=>(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(s.ZP,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(c.Z,null)),(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack"))},(0,r.createElement)(c.Z,{prePublish:!0})))}},54525:function(e,t,n){"use strict";n.r(t),n.d(t,{refreshConnectionTestResults:function(){return a},toggleConnectionById:function(){return o},togglePublicizeFeature:function(){return i},fetchFromAPI:function(){return s},refreshTweets:function(){return l},setTweets:function(){return c},getTwitterCards:function(){return u},setTwitterCards:function(){return p}});var r=n(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function i(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function s(e){return{type:"FETCH_FROM_API",path:e}}function l(){return{type:"REFRESH_TWEETS"}}function c(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,r.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function p(e){return{type:"SET_TWITTER_CARDS",cards:e}}},70555:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},14297:function(e,t,n){"use strict";var r=n(92819),a=n(86989),o=n.n(a),i=n(4981),s=n(9818),l=n(12238),c=n(76370);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,s.select)("jetpack/publicize");return(0,r.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:c.H8.includes(e.name)?u(e.innerBlocks):[]}))};const p=(0,r.throttle)((async function(){const e=(0,s.select)("core/editor").getBlocks(),t=u(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,i.serialize)(e),clientId:e.clientId})))},method:"POST"}),n=(0,r.flatMap)(e,(e=>e.urls));return(0,s.dispatch)("jetpack/publicize").getTwitterCards(n),(0,s.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0});t.ZP={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{const e=await o()({path:"/wpcom/v2/publicize/connection-test-results"}),t=(0,s.select)("jetpack/publicize").getConnections(),n=e,r=[],a={done:!1,enabled:!0,toggleable:!0};for(const e of n){const n=t.find((t=>t.id===e.id)),{done:o,enabled:i,toggleable:s}=null!=n?n:a,l={display_name:e.display_name,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:o,enabled:i,toggleable:s};r.push(l)}return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:r})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const n=(0,s.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:e.id===t?!e.enabled:e.enabled})));return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:n})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,s.select)("jetpack/publicize").getFeatureEnableState();return(0,s.dispatch)(l.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:p,GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,s.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,s.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},95552:function(e,t,n){"use strict";var r=n(9818),a=n(54525),o=n(91247),i=n(79948),s=n(70555),l=n(52486);const c=(0,r.registerStore)("jetpack/publicize",{actions:a,controls:s.Z,reducer:l.Z,selectors:o});(0,i.Z)(c)},79948:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(14297);function s(e){const t=[a()(i.ZP)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},52486:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const n={};return t.urls.forEach((e=>n[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...n}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},91247:function(e,t,n){"use strict";n.r(t),n.d(t,{getFailedConnections:function(){return u},getMustReauthConnections:function(){return p},getTweetTemplate:function(){return d},getTweetStorm:function(){return m},getFirstTweet:function(){return h},getLastTweet:function(){return f},getSupportedBlockType:function(){return g},getTweetsForBlock:function(){return b},getTwitterCardForURLs:function(){return v},twitterCardIsCached:function(){return k},getShareMessage:function(){return y},getShareMessageMaxLength:function(){return E},isTweetStorm:function(){return w},getBoundariesForBlock:function(){return _},getBoundaryStyleSelectors:function(){return S},checkForTagsInContentAttributes:function(){return j},getPopoverWarnings:function(){return x},isSelectedTweetBoundary:function(){return P},contentAttributesChanged:function(){return T},getConnections:function(){return A},getFeatureEnableState:function(){return N}});var r=n(92819),a=n(19551),o=n(9818),i=n(65736),s=n(12238),l=n(76370);const __=i.__,c="\n\n"+__("A thread ⬇️","jetpack");function u(){return A().filter((e=>!1===e.test_success))}function p(){return A().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function d(e){const t=e.connections||A(),n=null==t?void 0:t.find((e=>"twitter"===e.service_name));return{date:Date.now(),name:(null==n?void 0:n.profile_display_name)||__("Account Name","jetpack"),profileImage:(null==n?void 0:n.profile_picture)||"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:(null==n?void 0:n.display_name)||""}}function m(e){const t=d(e),n=[h(e),...e.tweets.slice(0,100).map((n=>({...t,text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,card:v(e,n.urls)})))];return n.length>1&&n.push(f(e)),n}function h(e){var t,n,r,a;if(!(0,o.select)("core"))return;const i=d(e),{getMedia:s}=(0,o.select)("core"),{getEditedPostAttribute:l}=(0,o.select)("core/editor"),c=l("featured_media"),u=l("link"),p=c&&s(c),m=(null==p||null===(t=p.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||(null==p?void 0:p.source_url);return{...i,text:y()+` ${u}`,urls:[u],card:{title:l("title"),description:(null===(a=l("meta"))||void 0===a?void 0:a.advanced_seo_description)||l("excerpt")||l("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:u,image:m,type:m?"summary_large_image":"summary"}}}function f(e){if(!(0,o.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,o.select)("core/editor"),n=t("link"),r=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...h(e),text:`${r} ${n}`}}function g(e,t){if(l.nE[t])return l.nE[t]}const b=(0,a.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function v(e,t){if(t)return t.reduce(((t,n)=>t||(e.twitterCards[n]&&!e.twitterCards[n].error?{url:n,...e.twitterCards[n]}:void 0)),void 0)}function k(e,t){return!!e.twitterCards[t]}function y(){const{getEditedPostAttribute:e}=(0,o.select)("core/editor"),t=e("meta"),n=e("title"),a=(0,r.get)(t,["jetpack_publicize_message"],"");return a?a.substr(0,E()):w()&&n?n.substr(0,E())+c:""}function E(){return w()?255-c.length:255}function w(){var e;return!(null===(e=(0,o.select)("core/editor").getEditedPostAttribute("meta"))||void 0===e||!e.jetpack_is_tweetstorm)}const _=(0,a.Z)(((e,t)=>{if(!w())return[];const n=b(e,t);return n&&0!==n.length?n.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function C(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const n=e.parentNode,r=Array.prototype.indexOf.call(n.children,e);return C(n,t)+` > :nth-child( ${r+1} )`}const S=(0,a.Z)(((e,t)=>{const n=_(e,t),r=document.getElementById(`block-${t}`);return n.filter((e=>"end-of-line"===e.type)).map((e=>{if(!r)return!1;const n=r.getElementsByTagName("li").item(e.line);return!!n&&C(n,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function j(e,t,n){var r;if(0===n.length)return!1;if(null===(r=g(0,t.name))||void 0===r||!r.contentAttributes)return!1;const a=new RegExp(`<(${n.join("|")})( |>|/>)`,"gi");return g(0,t.name).contentAttributes.reduce(((e,n)=>!!e||a.test(t.attributes[n])),!1)}const x=(0,a.Z)(((e,t)=>{const{isTyping:n,isDraggingBlocks:r,isMultiSelecting:a,hasMultiSelection:i,isCaretWithinFormattedText:s}=(0,o.select)("core/block-editor");if(!w())return[];if(n()||r()||a()||i()||s())return[];const c=[];return g(0,t.name)||l.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&c.push(__("Twitter displays the first four images.","jetpack")),j(0,t,["strong","bold","em","i","sup","sub","span","s"])&&c.push(__("Twitter removes all text formatting.","jetpack")),j(0,t,["a"])&&c.push(__("Links will be posted seperately.","jetpack"))):c.push(__("This block is not exportable to Twitter","jetpack")),c}),(e=>[e.tweets]));function P(e,t){const{isBlockSelected:n}=(0,o.select)("core/block-editor");if(!w())return!1;const r=g(0,t.name),a=b(e,t.clientId);if(!a||0===a.length)return!1;const i=a[a.length-1];return n(t.clientId)&&!r||i.blocks[i.blocks.length-1].clientId===t.clientId&&a.some((e=>e.blocks.some((e=>n(e.clientId)))))}function T(e,t,n){const a=g(0,n.name);if(!a)return!1;const o=a.contentAttributes;return!(0,r.isEqual)(o.map((e=>({attribute:e,content:t.attributes[e]}))),o.map((e=>({attribute:e,content:n.attributes[e]}))))}function A(){return(0,o.select)(s.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function N(){const{getEditedPostAttribute:e}=(0,o.select)(s.store),t=e("meta");return(0,r.get)(t,["jetpack_publicize_feature_enabled"],!0)}},47370:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(65736),i=n(12238),s=n(9818),l=n(31060);const __=o.__;function c(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(a.CheckboxControl,{label:__("Show sharing buttons.","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}function u(){const e=(0,s.useSelect)((e=>e(i.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,s.useDispatch)(i.store);return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,(0,r.createElement)(c,{checked:e,onChange:t})))}},88189:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(47370);const a="sharing",o={render:r.Z}},60001:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},38817:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(19416),s=n(86955);const __=o.__;(0,i.Wp)()||(0,i.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},85728:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}function o(e){try{var t;return!(null==e||null===(t=e.parent)||void 0===t||!t.location.href)}catch(e){return!1}}function i(e,t){var n;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=[];if(!t||!e&&!e.length||!a(t))return s;const{currentDoc:l,currentWindow:c}=r(t);if(!o(c))return s;const u=null==c||null===(n=c.parent)||void 0===n?void 0:n.document;return l&&u?(s=e.filter((e=>{const t=u.querySelector(e),n=!!l.querySelector(e);return!(!t||n)&&(l.head.appendChild(t.cloneNode()),i&&t.remove(),!0)})),s):void 0}function s(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return s();const l=o.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${n}-${e.version}.${r}`,l.onload=s,i.appendChild(l)}}))}function l(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{bL:function(){return r},DT:function(){return i},Pp:function(){return s},Dz:function(){return l}})},4597:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(19416);const a=n(27655).O["Jetpack Green 40"];function o(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},8909:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),a=n.n(r),o=n(92819);function i(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,o.find)(e,{name:t});if(r)return r}return(0,o.find)(e,"isDefault")}(e,t);return n?n.name:null}},71343:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609);const __=i.__,_x=i._x;class l extends o.Component{constructor(){super(...arguments),a()(this,"state",{hasCopied:!1}),a()(this,"onCopy",(()=>this.setState({hasCopied:!0}))),a()(this,"onFinishCopy",(()=>this.setState({hasCopied:!1}))),a()(this,"onFocus",(e=>e.target.select()))}render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,o.createElement)("div",{className:"jetpack-clipboard-input"},(0,o.createElement)(s.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,o.createElement)(s.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=l},44520:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},75791:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(25158),s=n(22890);const __=o.__,l="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function c(e,t,n){const r=document.createElement("div");r.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}t.Z=function(e){let{trackSource:t,onPlay:n,onPause:o,onError:u,onTimeChange:p,onSkipForward:d,onJumpBack:m,currentTime:h,playStatus:f=s._5,onMetadataLoaded:g,loadWhenReady:b=!1,preload:v="metadata"}=e;const k=(0,r.useRef)(),y=()=>{k.current.play().catch((()=>{}))},E=()=>{k.current.pause(),(0,i.speak)(__("Paused","jetpack"),"assertive")};return(0,r.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,r.useEffect)((()=>{const e=k.current;e.preload=v;const t=new MediaElementPlayer(e,{...l,success:()=>b&&(null==e?void 0:e.load())});if(m||d){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(m){const n=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(c(n,__("Jump Back","jetpack"),m),"jumpBackwardButton")}if(d){const n=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(c(n,__("Skip Forward","jetpack"),d),"skipForwardButton")}}return n&&e.addEventListener("play",n),o&&e.addEventListener("pause",o),u&&e.addEventListener("error",u),g&&e.addEventListener("loadedmetadata",g),()=>{t.remove(),n&&e.removeEventListener("play",n),o&&e.removeEventListener("pause",o),u&&e.removeEventListener("error",u),g&&e.removeEventListener("loadedmetadata",g)}}),[n,o,u,m,d,g,b,v]),(0,r.useEffect)((()=>{var e;const[t,n]=!1===(null===(e=k.current)||void 0===e?void 0:e.paused)?[s.Wp,E]:[s._5,y],r=(0,a.debounce)(n,100);return s.Vy!==f&&t!==f&&r(),()=>{r.cancel()}}),[k,f,t]),(0,r.useEffect)((()=>{if(!p)return;const e=k.current,t=(0,a.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),n=e=>t(e.target.currentTime);return p&&(null==e||e.addEventListener("timeupdate",n)),()=>{t.cancel(),null==e||e.removeEventListener("timeupdate",n)}}),[k,p]),(0,r.useEffect)((()=>{const e=k.current;h&&e&&Math.abs(Math.floor(h-e.currentTime))>1&&(e.currentTime=h)}),[k,h]),(0,r.createElement)("div",{className:"jetpack-audio-player"},(0,r.createElement)("audio",{src:t,ref:k}))}},52932:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(52175),l=n(78965);function c(e){let{blockName:t,buttonLabel:n,href:a,icon:c,onClick:u,subtitle:p,title:d,className:m}=e;const{autosaveAndRedirect:h}=(0,l.Z)(a);return(0,r.createElement)(s.Warning,{actions:a&&[(0,r.createElement)(i.Button,{href:a,onClick:e=>{e.preventDefault(),u(t),h(e)},target:"_top",variant:"secondary"},n)],className:o()(m,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},c,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},d),p&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},p))))}},89419:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(4981),l=n(52175),c=n(55609),u=n(9818),p=n(39630),d=n(65736);const __=d.__,m=e=>{let{attributes:t,styleOption:n,viewportWidth:a,blockName:o}=e;const i=(0,s.getBlockType)(o);return(0,r.createElement)(l.BlockPreview,{viewportWidth:a,blocks:(c=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:n.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},h=r.memo?(0,r.memo)(m,((e,t)=>(0,i.isEqual)(e,t))):m;function f(e){let t,{attributes:n,clientId:a,styleOptions:i,onSelectStyle:s,activeStyle:d,viewportWidth:m,title:f}=e;return u.useSelect&&(t=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:i.map((e=>({title:e.label,isActive:e.value===d,onClick:()=>s({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:f||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},i.map((e=>{const a={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:o()("block-editor-block-styles__item",{"is-active":e.value===d}),onClick:()=>{s({style:e.value})},onKeyDown:t=>{p.ENTER!==t.keyCode&&p.SPACE!==t.keyCode||(t.preventDefault(),s({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:u.useSelect&&t&&(0,r.createElement)(h,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},80011:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(85482);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"jetpack-inspector-notice"},(0,r.createElement)("span",null,t),(0,r.createElement)(a.Z,{height:16,logoColor:"#1a1a1a",showText:!1}))}},4369:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(9818),l=n(65736),c=n(86955),u=n(22890),p=n(20781);const __=l.__;function d(e){let{skipForwardTime:t=5,jumpBackTime:n=5,playIcon:a="controls-play",pauseIcon:l="controls-pause",jumpBackIcon:d=c.Qv,skipForwardIcon:m=c._z,currenTimeDisplay:h=!0,onTimestampClick:f}=e;const{playerState:g,mediaCurrentTime:b,defaultMediaSource:v,mediaDomReference:k}=(0,s.useSelect)((e=>{const{getMediaSourceCurrentTime:t,getMediaPlayerState:n,getDefaultMediaSource:r,getMediaSourceDuration:a,getMediaSourceDomReference:o}=e(u.tT);return{playerState:n(),mediaCurrentTime:t(),mediaDuration:a(),defaultMediaSource:r(),mediaDomReference:o()}}),[]),y=(0,p.H)(b),E=!v,{toggleMediaSource:w,setMediaSourceCurrentTime:_}=(0,s.useDispatch)(u.tT);function C(e){!function(e){k&&(k.currentTime=e),_(v.id,e)}(e),k&&(k.currentTime=e)}return(0,r.createElement)(r.Fragment,null,!1!==n&&(0,r.createElement)(i.ToolbarButton,{icon:d,isDisabled:E,onClick:()=>C(b-n),label:__("Jump back","jetpack")}),(0,r.createElement)(i.ToolbarButton,{icon:g===u._5?a:l,isDisabled:E,onClick:function(){w(v.id)},label:__("Play","jetpack")}),t&&(0,r.createElement)(i.ToolbarButton,{icon:m,isDisabled:E,onClick:()=>C(b+t),label:__("Skip forward","jetpack")}),h&&(0,r.createElement)(i.ToolbarButton,{className:o()("media-player-control__current-time",{"is-disabled":E}),label:__("Set timestamp","jetpack"),onClick:()=>f(b)},y))}function m(e){return(0,r.createElement)(i.ToolbarGroup,{className:"media-player-control__toolbar"},(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(d,e))))}},20781:function(e,t,n){"use strict";n.d(t,{H:function(){return r},i:function(){return a}});const r=mejs.Utils.secondsToTimeCode,a=mejs.Utils.timeCodeToSeconds},64897:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,o.createElement)(i.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.Z=s},93923:function(e,t,n){"use strict";n.d(t,{mj:function(){return r},DW:function(){return a},Bn:function(){return o},DM:function(){return i}});const r=0,a=1,o="payment-plan",i="subscription"},39426:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(52175),o=n(9818),i=n(93923),s=n(34165),l=n(56635),c=n(54799),u=n(91332),p=n(54554);function d(e){let{allowCreateOneTimeInterval:t=!0,blockName:n,productType:d=i.Bn,selectedProductId:m=0,setSelectedProductId:h=(()=>{})}=e;const f=(0,o.useSelect)((e=>e(p.h).getProducts(d,m,h)),[]),{connectUrl:g,isApiConnected:b,isSelectedProductInvalid:v,shouldUpgrade:k}=(0,o.useSelect)((e=>{const{getConnectUrl:t,getShouldUpgrade:n,isApiStateConnected:r,isInvalidProduct:a}=e(p.h);return{connectUrl:t(),isApiConnected:r(),isSelectedProductInvalid:a(m),shouldUpgrade:n()}}));return k?null:(0,r.createElement)(r.Fragment,null,!b&&!!g&&(0,r.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(u.Z,{blockName:n,connectUrl:g})),b&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,{allowCreateOneTimeInterval:t,productType:d,setSelectedProductId:h}),(0,r.createElement)(l.Z,{products:f,productType:d,selectedProductId:m,setSelectedProductId:h})),b&&v&&(0,r.createElement)(c.Z,null))}},34165:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(52175),o=n(55609),i=n(9818),s=n(65736),l=n(57324),c=n(93923),u=n(86086),p=n(48701),d=n(54554);const __=s.__;function m(e){let{allowCreateOneTimeInterval:t,productType:n,setSelectedProductId:s}=e;const m=(0,i.useSelect)((e=>e(d.h).getSiteSlug())),{saveProduct:h}=(0,i.useDispatch)(d.h),[f,g]=(0,r.useState)(c.mj),[b,v]=(0,r.useState)((0,u.l)("default new product title",n)),[k,y]=(0,r.useState)("USD"),[E,w]=(0,r.useState)(5),[_,C]=(0,r.useState)("1 month"),S=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"}];t&&S.push({label:__("One-Time Payment","jetpack"),value:"one-time"});return(0,r.createElement)(a.InspectorControls,null,m&&(0,r.createElement)(o.PanelBody,null,(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${m}`},(0,u.l)("manage your products",n))),(0,r.createElement)(o.PanelBody,{title:(0,u.l)("add a new product",n),initialOpen:!0,className:"product-management-control-inspector__add-plan"},f===c.DW&&(0,r.createElement)(o.Placeholder,{icon:l.Z,label:(0,u.l)("saving product",n)},(0,r.createElement)(o.Spinner,null)),f===c.mj&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,r.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>v(e),value:b})),(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,r.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>y(e),options:p.Xy,value:k}),(0,r.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>w(e),type:"number",value:E})),(0,r.createElement)(o.PanelRow,{className:"plan-interval"},(0,r.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>C(e),options:S,value:_})),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{onClick:e=>{e.preventDefault(),g(c.DW),h({title:b,currency:k,price:E,interval:_},n,s,(e=>{g(c.mj),e&&(w(5),v(""))}))},variant:"secondary"},(0,u.l)("add product",n))))))}},54799:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(65736),i=n(76502),s=n(30483);const __=o.__;function l(){return(0,r.createElement)(a.Warning,{className:"product-management-control-nudge"},(0,r.createElement)("span",{className:"product-management-control-nudge__info"},(0,r.createElement)(i.Z,{icon:s.Z}),(0,r.createElement)("span",{className:"product-management-control-nudge__text-container"},(0,r.createElement)("span",{className:"product-management-control-nudge__title"},__("Invalid subscription configured for this block.","jetpack")),(0,r.createElement)("span",{className:"product-management-control-nudge__message"},__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")))))}},56635:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(69307),a=n(43626),o=n(52175),i=n(55609),s=n(9818),l=n(65736),c=n(77104),u=n(18160),p=n(30483),d=n(49385),m=n(86086),h=n(54554);const __=l.__;function f(e){const{currency:t,interval:n,price:r}=e,o=(0,a.ZP)(parseFloat(r),t);switch(n){case"1 month":return(0,l.sprintf)(// translators: %s: amount
103
  __("%s / month","jetpack"),o);case"1 year":return(0,l.sprintf)(// translators: %s: amount
104
  __("%s / year","jetpack"),o);case"one-time":return o}return(0,l.sprintf)(// translators: %s: amount, plan interval
105
  __("%1$s / %2$s","jetpack"),o,n)}function g(e){let{onClose:t,product:n,selectedProductId:a,setSelectedProductId:o}=e;const{id:s,title:l}=n,u=a&&a===s,p=u?c.Z:void 0,d=n?" "+f(n):null;return(0,r.createElement)(i.MenuItem,{icon:p,onClick:e=>{e.preventDefault(),o(s),t()},selected:u,value:s},l," : ",d)}function b(e){let{onClose:t,productType:n}=e;const a=(0,d.Z)();return(0,r.createElement)(i.MenuItem,{onClick:e=>{e.preventDefault(),a(),setTimeout((()=>{const e=document.getElementById("new-product-title");null!==e&&e.focus()}),100),t()}},(0,m.l)("add a new product",n))}function v(e){let{products:t,productType:n,selectedProductId:a,setSelectedProductId:l}=e;const c=(0,s.useSelect)((e=>e(h.h).getProduct(a)));let d=null,v=u.Z;return c&&(d=f(c)),a&&!c&&(d=(0,m.l)("product not found",n),v=p.Z),(0,r.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(i.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:v,label:(0,m.l)("select a product",n),text:d},(e=>{let{onClose:o}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.MenuGroup,null,t.map((e=>(0,r.createElement)(g,{key:e.id,onClose:o,product:e,selectedProductId:a,setSelectedProductId:l})))),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(b,{onClose:o,productType:n})))})))}},49385:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{enableComplementaryArea:e}=(0,r.useDispatch)("core/interface"),t=!!(0,r.select)("core/edit-site"),n=!!(0,r.select)("core/edit-widgets");return()=>{t?e("core/edit-site","edit-site/block-inspector"):n?e("core/edit-widgets","edit-widgets/block-inspector"):e("core/edit-post","edit-post/block")}}},86086:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(65736),a=n(93923);const __=r.__,o={"add a new product":{[a.Bn]:__("Add a new payment plan","jetpack"),[a.DM]:__("Add a new subscription","jetpack")},"product not found":{[a.Bn]:__("Payment plan not found","jetpack"),[a.DM]:__("Subscription not found","jetpack")},"select a product":{[a.Bn]:__("Select a payment plan","jetpack"),[a.DM]:__("Select a subscription","jetpack")},"default new product title":{[a.Bn]:__("Monthly Subscription","jetpack"),[a.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[a.Bn]:__("Manage your payment plans.","jetpack"),[a.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[a.Bn]:__("Saving payment plan…","jetpack"),[a.DM]:__("Saving subscription…","jetpack")},"add product":{[a.Bn]:__("Add payment plan","jetpack"),[a.DM]:__("Add subscription","jetpack")},"product requires a name":{[a.Bn]:__("Payment plan requires a name","jetpack"),[a.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a.Bn]:__("Payment plan requires a valid price","jetpack"),[a.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a.Bn]:__("Successfully created payment plan","jetpack"),[a.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a.Bn]:__("There was an error when adding the payment plan.","jetpack"),[a.DM]:__("There was an error when adding the subscription.","jetpack")}};function i(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Bn;return(null==o||null===(t=o[e])||void 0===t?void 0:t[n])||null}},91332:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(55609),o=n(65736),i=n(86955),s=n(78965),l=n(63415);const __=o.__;function c(e){let{blockName:t,connectUrl:n}=e;const{autosaveAndRedirect:o}=(0,s.Z)(n);return(0,r.createElement)(a.ToolbarButton,{className:"connect-stripe components-tab-button",icon:i.Pw,onClick:e=>{e.preventDefault(),l.Z.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),o(e)}},__("Connect Stripe","jetpack"))}},25478:function(e,t,n){"use strict";var r=n(69307),a=n(53224),o=n.n(a),i=n(65736),s=n(63415),l=n(52932),c=n(23922);const __=i.__,u=e=>{let{blockName:t,url:n}=e;return(0,r.createElement)(l.Z,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,r.createElement)(o(),{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,onClick:()=>{s.Z.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t})},title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})};t.Z=e=>{let{blockName:t,postId:n,stripeConnectUrl:a}=e;const o=(0,c.Z)(n,a);return o?(0,r.createElement)(u,{blockName:t,url:o}):null}},33347:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=e=>{let{align:t,className:n,title:a,description:s,buttonText:l,visible:c=!0,context:u,checkoutUrl:p,goToCheckoutPage:d,isRedirecting:m=!1}=e;const h=o()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!c}),f=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:h,"data-align":t},(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},a&&(0,r.createElement)("strong",{className:o()("banner-title",{[`${n}__title`]:n})},a),s&&(0,r.createElement)("span",{className:`${n}__description banner-description`},s),(0,r.createElement)(i.Button,{href:m?null:p,onClick:d,target:"_top",className:o()("is-primary",{"jetpack-upgrade-plan__hidden":!p}),isBusy:m},m?f:l)))}},75324:function(e,t,n){"use strict";var r=n(9818);const a={setPlans:e=>({type:"SET_PLANS",plans:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",url:e})};(0,r.registerStore)("wordpress-com/plans",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_PLANS"===t.type?t.plans:e},actions:a,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield a.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return a.setPlans(e)}}})},64832:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4981);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return void 0!==r.createBlocksFromInnerBlocksTemplate?(0,r.createBlocksFromInnerBlocksTemplate)(e):e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[n,o,i=[]]=t;return(0,r.createBlock)(n,o,a(i))}))}},48701:function(e,t,n){"use strict";n.d(t,{ck:function(){return o},Xy:function(){return i},hj:function(){return s},vs:function(){return l},Vm:function(){return c}});var r=n(72670),a=n(92819);const o={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},i=Object.keys(o).map((e=>{const{symbol:t}=(0,r.X)(e);return{value:e,label:t===e?e:`${e} ${(0,a.trimEnd)(t,".")}`}}));function s(e){return o[e]}function l(e,t){return!isNaN(t)&&t>=s(e)}function c(e,t){return e?"number"==typeof e?e:(e=parseFloat(e.replace(new RegExp("\\"+r.M[t].grouping,"g"),"").replace(new RegExp("\\"+r.M[t].decimal,"g"),".")),isNaN(e)?null:e):null}},92956:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{label:t,onClick:n}=e;return(0,r.createElement)(a.Button,{className:"components-toolbar__control",label:t,icon:"edit",onClick:n})}},115:function(e,t,n){"use strict";n.d(t,{iT:function(){return i},Eh:function(){return s},wk:function(){return l},oI:function(){return c},Tu:function(){return u},OG:function(){return p},tY:function(){return d},h9:function(){return m},CY:function(){return h},Wm:function(){return f},Qh:function(){return g},Bb:function(){return b},En:function(){return v},yD:function(){return k},QU:function(){return y},zs:function(){return E},l5:function(){return w}});var r=n(65736),a=n(69771),o=n(92819);const __=r.__,i="google_photos",s="openverse",l="pexels",c="recent",u="/",p=[{value:c,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],d=[{value:"",
@@ -144,7 +144,7 @@ label:__("Sport","jetpack")},{value:"travel",
144
  /* translators: category of images */
145
  label:__("Travel","jetpack")},{value:"weddings",
146
  /* translators: category of images */
147
- label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",f="LAST_7_DAYS",g="LAST_30_DAYS",b="LAST_6_MONTHS",v="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:f,label:__("Last 7 days","jetpack")},{value:g,label:__("Last 30 days","jetpack")},{value:b,label:__("Last 6 months","jetpack")},{value:v,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],E=(new Date).getFullYear(),w=[{label:__("Any Month","jetpack"),value:-1},...(0,o.map)((0,o.range)(0,12),(e=>({label:(0,a.dateI18n)("F",new Date(0,e)),value:e})))]},40974:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(92694),s=n(52175),l=n(86941),c=n(4896),u=n(58696);if((0,l.Z)()&&"function"==typeof s.useBlockEditContext){const e=e=>e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1,t=(e,t)=>["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/story","jetpack/tiled-gallery"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks");(0,i.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(n=>r=>{const{name:i}=(0,s.useBlockEditContext)();let{render:l}=r;if(t(i,l)||e(r)){const{allowedTypes:e,gallery:t=!1,value:n=[]}=r;e.indexOf("image")>-1&&!(t&&n.length>0)&&(l=e=>(0,o.createElement)(c.Z,a()({},e,{mediaProps:r})))}return(0,o.createElement)(n,a()({},r,{render:l}))}),100),(0,i.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:{...e,keywords:[...e.keywords,...u.Dv.map((e=>e.keyword))]}}))}},74228:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(55609),l=n(65736),c=n(39630),u=n(60212),p=n(33814);const __=l.__,d=(0,r.memo)((()=>(0,r.createElement)("div",{className:"jetpack-external-media-browser__empty"},(0,r.createElement)("p",null,__("Sorry, but nothing matched your search criteria.","jetpack")))));t.Z=function(e){const{media:t,isCopying:n,isLoading:a,pageHandle:l,className:m,multiple:h,setPath:f,nextPage:g,onCopy:b}=e,[v,k]=(0,r.useState)([]),[y,E]=(0,r.useState)(-1),w=(0,r.useRef)(-1),_=(0,r.useRef)(null),C=(0,r.useCallback)((e=>{let t=[e];"folder"===e.type?f(e.ID):h?(t=v.slice(0,9).concat(e),v.find((t=>e.ID===t.ID))&&(t=v.filter((t=>t.ID!==e.ID)))):1===v.length&&e.ID===v[0].ID&&(t=[]),k(t)}),[v,h,f]),S=(0,r.useCallback)((()=>{b(v)}),[v,b]),j=t.filter((e=>"folder"!==e.type)).length>0,x=o()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":a}),P=o()({"jetpack-external-media-browser":!0,[m]:!0}),T=()=>{let e=1;const t=_.current.children;if(t.length>0){const n=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===n;)++e}w.current=e},A=(0,i.debounce)(T,400);(0,r.useEffect)((()=>(window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)})),[]),(0,r.useEffect)((()=>{t.length&&-1===w.current&&T()}),[t]);const N=(e,t)=>{let{item:n}=t;C(n)},I=(e,n)=>{let{item:r,index:a}=n;[c.LEFT,c.RIGHT,c.UP,c.DOWN].includes(e.keyCode)?((e,n)=>{switch(e){case c.LEFT:n>=1&&E(n-1);break;case c.RIGHT:n<t.length&&E(n+1);break;case c.UP:n>=w.current&&E(n-w.current);break;case c.DOWN:n<t.length-w.current&&E(n+w.current)}})(e.keyCode,a):c.SPACE===e.keyCode?(C(r),e.preventDefault()):c.ENTER===e.keyCode&&C(r),[c.LEFT,c.RIGHT,c.UP,c.DOWN,c.SPACE,c.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,r.createElement)("div",{className:P},(0,r.createElement)("ul",{ref:_,className:x},t.map(((e,t)=>(0,r.createElement)(p.Z,{item:e,index:t,key:e.ID,onClick:N,onKeyDown:I,focus:t===y,isSelected:v.find((t=>t.ID===e.ID)),isCopying:n}))),0===t.length&&!a&&(0,r.createElement)(d,null),a&&(0,r.createElement)(u.Z,null),l&&!a&&(0,r.createElement)(s.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:a||n,onClick:()=>{t.length&&E(t.length),g()}},__("Load More","jetpack"))),j&&(0,r.createElement)((()=>{const e=0===v.length||n,t=n?__("Inserting…","jetpack"):__("Select","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},(0,r.createElement)(s.Button,{variant:"primary",isBusy:n,disabled:e,onClick:S},t))}),null))}},33814:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__;t.Z=function(e){const{item:t,focus:n,isSelected:a,isCopying:s=!1}=e,{thumbnails:l,caption:c,name:u,title:p,type:d,children:m=0}=t,{medium:h=null,fmt_hd:f=null,thumbnail:g=null}=l,b=p||c||u,v=o()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":a,"jetpack-external-media-browser__media__folder":"folder"===d,"is-transient":s}),k=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n&&k.current.focus()}),[n]),(0,r.createElement)("li",{ref:k,className:v,onClick:s?void 0:t=>{const{item:n,index:r}=e;e.onClick&&e.onClick(t,{item:n,index:r})},onKeyDown:s?void 0:t=>{const{item:n,index:r}=e;e.onKeyDown&&e.onKeyDown(t,{item:n,index:r})},role:"checkbox",tabIndex:"0","aria-checked":!!a,"aria-disabled":!!s},a&&s&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},__("Inserting Image…","jetpack"))),(0,r.createElement)("img",{src:h||f||g,alt:b}),"folder"===d&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__info"},(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__name"},u),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__count"},m)))}},60212:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.memo)((function(){const e="jetpack-external-media-browser__media__item jetpack-external-media-browser__media__placeholder";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}))}))},4896:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(58696),s=n(82551);const l=e=>e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image"),c=e=>void 0===e.multiple&&!l(e);t.Z=function(e){const{mediaProps:t}=e,[n,r]=(0,o.useState)(null),u=(0,i.ZR)(n);return(0,o.createElement)("div",{onClick:e=>e.stopPropagation()},(0,o.createElement)(s.Z,a()({},e,{setSelectedSource:r,isReplace:c(t),isFeatured:l(t),hasImage:t.value>0})),u&&(0,o.createElement)(u,a()({},t,{onClose:e=>{var n;e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||(r(null),null===(n=t.onClose)||void 0===n||n.call(t))}})))}},82551:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(61449),s=n(47442);const __=o.__;t.Z=function(e){const{mediaProps:t,open:n,setSelectedSource:o,isFeatured:l,isReplace:c,hasImage:u}=e,p=t.render;let d="tertiary";if(c)return(0,r.createElement)(s.Z,{originalButton:p,open:n,setSource:o});let m=__("Select Image","jetpack");return t.multiple&&(m=__("Select Images","jetpack")),t.allowedTypes.length>1&&(m=__("Select Media","jetpack")),l&&(m=__("Replace Image","jetpack"),d="secondary"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Dropdown,{position:"bottom right",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;const o=p&&p({open:n});return l&&u||o&&"string"!=typeof o.props.children?o:(0,r.createElement)(a.Button,{variant:d,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":t,onClick:n},m)},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(a.NavigableMenu,{"aria-label":m},(0,r.createElement)(a.MenuGroup,null,(0,r.createElement)(a.MenuItem,{icon:i.Z,onClick:()=>{t(),n()}},__("Media Library","jetpack")),(0,r.createElement)(s.Z,{open:n,setSource:o,onClick:t})))}}))}},47442:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(58696);t.Z=function(e){let{originalButton:t=null,onClick:n=(()=>{}),open:i,setSource:s}=e;return(0,r.createElement)(r.Fragment,null,t&&t({open:i}),o.Dv.map((e=>{let{icon:t,id:o,label:i}=e;return(0,r.createElement)(a.MenuItem,{icon:t,key:o,onClick:()=>{n(),s(o)}},i)})))}},59895:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(96483);const a={list:"/wpcom/v2/external-media/list/",copy:(0,n(19416).Wp)()?"/rest/v1.1/external-media-upload?service=":"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a[e]?(0,r.addQueryArgs)(a[e]+t,n):null}},43088:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(86955);const __=a.__;t.Z=(0,r.memo)((function(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.JO,null),(0,r.createElement)("p",null,__("To get started, connect your site to your Google Photos library.","jetpack")),(0,r.createElement)("p",null,__("You can remove the connection in either of these places:","jetpack")),(0,r.createElement)("ul",null,(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://myaccount.google.com/security"},__("Google Security page","jetpack"))),(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.com/marketing/connections/"},__("WordPress.com Connections","jetpack")))))}))},52471:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__;t.Z=(0,r.memo)((function(){return(0,r.createElement)("p",null,__("Awaiting authorization","jetpack"))}))},55412:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(115);const __=a.__;t.Z=(0,r.memo)((function(e){let{path:t,setPath:n}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Button,{variant:"tertiary",onClick:()=>n(i.Tu)},__("Albums","jetpack")),"→   ",t.name)}))},41363:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(92819),s=n(115),l=n(64897);const __=a.__;function c(e){let{value:t,updateFilter:n}=e;return(0,r.createElement)(o.SelectControl,{label:__("Category","jetpack"),value:t,options:s.tY,onChange:n})}function u(e){let{value:t,updateFilter:n}=e;const a=(null==t?void 0:t.range)||s.CY,[i,c]=(0,r.useState)(-1),[u,p]=(0,r.useState)(s.zs);return(0,r.createElement)("div",{className:"jetpack-external-media-date-filter"},(0,r.createElement)(o.SelectControl,{label:__("Filter by time period","jetpack"),value:a,options:s.QU,onChange:e=>n({range:e})}),a===s.yD&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Month","jetpack"),value:i,options:s.l5,onChange:c}),(0,r.createElement)(l.Z,{className:"components-base-control",label:__("Year","jetpack"),value:u,min:1970,onChange:p}),(0,r.createElement)(o.Button,{variant:"secondary",disabled:(null==t?void 0:t.month)===i&&(null==t?void 0:t.year)===u,onClick:()=>{n({range:a,month:i,year:u})}},__("Apply","jetpack"))))}function p(){return(0,r.createElement)("span",null,__("Favorites","jetpack"))}function d(e){let{value:t,updateFilter:n}=e;const a=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,r.createElement)(o.SelectControl,{label:__("Type","jetpack"),value:t,options:a,onChange:n})}function m(e){let{children:t,removeFilter:n,isRemovable:a=!1}=e;return(0,r.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!a&&(0,r.createElement)(o.Button,{onClick:n,isSmall:!0},__("Remove Filter","jetpack")))}t.Z=function(e){let{filters:t,setFilters:n,canChangeMedia:a}=e;const o=Object.keys(t).filter((e=>a||"mediaType"!==e)).map((e=>{return(0,r.createElement)(m,{key:e,removeFilter:()=>n((0,i.omit)(t,e))},(a=e,o=t[e],s=r=>n(function(e,t,n){const r={...e,[t]:n};return"mediaType"===t&&"video"===n?delete r.category:"category"===t&&"video"===r.mediaType&&delete r.mediaType,r}(t,e,r)),"category"===a?(0,r.createElement)(c,{value:o,updateFilter:s}):"date"===a?(0,r.createElement)(u,{value:o,updateFilter:s}):"favorite"===a?(0,r.createElement)(p,{value:o}):"mediaType"===a?(0,r.createElement)(d,{value:o,updateFilter:s}):null));var a,o,s}));return 0===o.length?null:o}},84814:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(76292),a=n.n(r),o=n(115);const i=a()();function s(e){const{mediaType:t,category:n,favorite:r,date:s}=e,l=[];if(t&&l.push("mediaType="+t),n&&"video"!==t&&l.push("categoryInclude="+n),void 0!==r&&l.push("feature=favorite"),s){let e=null,t=null;switch(s.range){case o.Wm:e=a()(i).subtract(7,"days"),t=i;break;case o.Qh:e=a()(i).subtract(30,"days"),t=i;break;case o.Bb:e=a()(i).subtract(6,"months"),t=i;break;case o.En:e=a()(i).subtract(1,"year"),t=i;break;case o.yD:const n=parseInt(s.month),r=parseInt(s.year);isNaN(n)||isNaN(r)||(-1===n?(e=a()([r,0]),t=a()(e).endOf("year")):(e=a()([r,n]),t=a()(e).endOf("month")))}const n=e?e.format("YYYY-MM-DD"):"0000-00-00",r=t?t.format("YYYY-MM-DD"):"0000-00-00";l.push(`dateRange=${n}:${r}`)}return l.length>0?l:null}},34724:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__,i=[{label:__("Category","jetpack"),value:"category"},{label:__("Date","jetpack"),value:"date"},{label:__("Favorites","jetpack"),value:"favorite"},{label:__("Media Type","jetpack"),value:"mediaType"}];function s(e){return i.filter((t=>void 0===e[t.value]))}function l(e){const t=s(e);return t.length>0?t[0].value:""}t.Z=function(e){const[t,n]=(0,r.useState)(l([])),{isLoading:a,isCopying:i,filters:c,canChangeMedia:u}=e,p=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(s(c),u);return 0===p.length?null:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:a||i,options:p,onChange:n}),(0,r.createElement)(o.Button,{disabled:a||i,variant:"secondary",isSmall:!0,onClick:()=>{const r=(a=c,o=t,{...a,[o]:"favorite"===o||""});var a,o;e.setFilters(r),n(l(r))}},__("Add Filter","jetpack")))}},64032:function(e,t,n){"use strict";var r=n(69307),a=n(62066);t.Z=e=>{let{account:t,setAuthenticated:n}=e;const{image:o,name:i}=t||{};return(0,r.createElement)("div",{className:"jetpack-external-media-header__account"},(0,r.createElement)("div",{className:"jetpack-external-media-header__account-info"},o&&(0,r.createElement)("img",{className:"jetpack-external-media-header__account-image",src:o,alt:"",height:"18",width:"18"}),i&&(0,r.createElement)("div",{className:"jetpack-external-media-header__account-name"},i)),(0,r.createElement)(a.Z,{setAuthenticated:n}))}},86183:function(e,t,n){"use strict";var r=n(69307),a=n(85976),o=n(86989),i=n.n(o),s=n(65736),l=n(55609),c=n(115),u=n(59895),p=n(43088),d=n(52471);const __=s.__;t.Z=function(e){const{setAuthenticated:t}=e,[n,o]=(0,r.useState)(!1),s=(0,r.useCallback)((()=>{o(!0),i()({path:(0,u.k)("connection",c.iT)}).then((e=>{if(e.error)throw e.message;(0,a.Z)(e.connect_URL,(()=>{o(!1),t(!0)}))})).catch((()=>{o(!1)}))}),[t]);return(0,r.createElement)("div",{className:"jetpack-external-media-auth"},n?(0,r.createElement)(d.Z,null):(0,r.createElement)(p.Z,null),(0,r.createElement)(l.Button,{variant:"primary",disabled:n,onClick:s},__("Connect to Google Photos","jetpack")))}},62066:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(59895),c=n(115);const __=s.__;t.Z=e=>{let{setAuthenticated:t}=e;const[n,a]=(0,r.useState)(!1),s=(0,r.useCallback)((()=>{a(!0),o()({method:"DELETE",path:(0,l.k)("connection",c.iT)}).then((()=>t(!1))).catch((()=>a(!1)))}),[t]);return(0,r.createElement)(i.Button,{variant:"secondary",className:"jetpack-external-media-browser__disconnect",onClick:s,disabled:n,isBusy:n},__("Disconnect from Google Photos","jetpack"))}},9e4:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(115),s=n(74228),l=n(59895),c=n(41363),u=n(34724),p=n(64032),d=n(55412),m=n(84814);const __=a.__;t.Z=function(e){const{account:t,allowedTypes:n,copyMedia:a,getMedia:h,isCopying:f,isLoading:g,media:b,multiple:v,onChangePath:k,pageHandle:y,path:E,setAuthenticated:w,showAdditionalFilters:_=!1}=e,C=(S=n)&&1===S.length&&"image"===S[0];var S;const[j,x]=(0,r.useState)(C?{mediaType:"photo",date:{range:i.CY}}:{date:{range:i.CY}}),P=(0,r.useRef)(""),T=(0,r.useRef)(""),A=E.ID===i.oI?(0,m.Z)(j):null,N={number:20,path:E.ID};A&&(N.filter=A);const I=(0,l.k)("list",i.iT,N),B=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(I,t)}),[h,I]),M=(0,r.useCallback)((e=>{const t=b.find((t=>t.ID===e));T.current=E,k(t||{ID:e})}),[b,k,T,E]),R=(0,r.useCallback)((e=>{a(e,(0,l.k)("copy",i.iT),i.iT)}),[a]);return(0,r.useEffect)((()=>{P!==I&&(P.current=I,B({},E!==T.current))}),[P,I,B,E]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__google"},(0,r.createElement)("div",{className:"jetpack-external-media-header__view"},(0,r.createElement)(o.SelectControl,{className:"jetpack-external-media-header__select",label:__("View","jetpack"),value:E.ID!==i.oI?i.Tu:i.oI,disabled:g||f,options:i.OG,onChange:M}),_&&E.ID===i.oI&&(0,r.createElement)(u.Z,{filters:j,isLoading:g,setFilters:x,canChangeMedia:!C}),(0,r.createElement)("div",{className:"jetpack-external-media-header__filter"},E.ID===i.oI&&(0,r.createElement)(c.Z,{filters:j,isLoading:g,setFilters:x,canChangeMedia:!C}),E.ID!==i.oI&&E.ID!==i.Tu&&(0,r.createElement)(d.Z,{path:E,setPath:M})),(!g||b.length>0)&&(0,r.createElement)(p.Z,{account:t,setAuthenticated:w})),(0,r.createElement)(s.Z,{className:"jetpack-external-media-browser__google",key:I,media:b,isCopying:f,isLoading:g,nextPage:B,onCopy:R,pageHandle:y,multiple:v,setPath:M}))}},17925:function(e,t,n){"use strict";var r=n(69307),a=n(30528),o=n(86183),i=n(9e4);t.Z=(0,a.Z)()((function(e){return e.isAuthenticated?(0,r.createElement)(i.Z,e):(0,r.createElement)(o.Z,e)}))},58696:function(e,t,n){"use strict";n.d(t,{Dv:function(){return u},ZR:function(){return p}});var r=n(69307),a=n(65736),o=n(86955),i=n(17925),s=n(61242),l=n(88898),c=n(115);const __=a.__,u=[{id:c.iT,label:__("Google Photos","jetpack"),icon:(0,r.createElement)(o.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:c.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,r.createElement)(o.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:c.Eh,label:__("Openverse","jetpack"),icon:(0,r.createElement)(o.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"}];function p(e){return e===c.wk?l.Z:e===c.iT?i.Z:e===c.Eh?s.Z:null}},61242:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(92819),s=n(115),l=n(30528),c=n(74228),u=n(59895);const __=a.__;t.Z=(0,l.Z)()((function(e){const{media:t,isCopying:n,isLoading:a,pageHandle:l,multiple:p,copyMedia:d,getMedia:m}=e,[h,f]=(0,r.useState)((0,i.sample)(s.h9)),[g,b]=(0,r.useState)(""),v=(0,r.useCallback)((e=>{d(e,(0,u.k)("copy",s.Eh),s.Eh)}),[d]),k=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h&&m((0,u.k)("list",s.Eh,{number:20,search:h}),t)}),[m,h]),y=(0,r.useRef)(),E=(0,r.useCallback)((e=>{e.preventDefault(),b(h),k(e,!0),y.current=h}),[k,h]);(0,r.useEffect)(k,[]);const w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null==w||!w.current)return;const e=w.current.querySelector("input[type='search']");e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__openverse"},(0,r.createElement)("form",{ref:w,className:"jetpack-external-media-header__openverse",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:h,onChange:f,disabled:!!n}),(0,r.createElement)(o.Button,{isPrimary:!0,onClick:E,type:"submit",disabled:!h.length||h===y.current||n},__("Search","jetpack"))),(0,r.createElement)(c.Z,{key:g,className:"jetpack-external-media-browser__openverse",media:t,isCopying:n,isLoading:a,nextPage:k,onCopy:v,pageHandle:l,multiple:p}))}))},88898:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(92819),s=n(115),l=n(30528),c=n(74228),u=n(59895);const __=a.__;t.Z=(0,l.Z)()((function(e){const{media:t,isCopying:n,isLoading:a,pageHandle:l,multiple:p,copyMedia:d,getMedia:m}=e,[h,f]=(0,r.useState)((0,i.sample)(s.h9)),[g,b]=(0,r.useState)(""),v=(0,r.useCallback)((e=>{d(e,(0,u.k)("copy",s.wk),s.wk)}),[d]),k=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h&&m((0,u.k)("list",s.wk,{number:20,path:"recent",search:h}),t)}),[m,h]),y=(0,r.useRef)(),E=(0,r.useCallback)((e=>{e.preventDefault(),b(h),k(e,!0),y.current=h}),[k,h]);(0,r.useEffect)(k,[]);const w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(!w.current)return;const e=Array.from(w.current.elements).find((e=>"search"===e.type));e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__pexels"},(0,r.createElement)("form",{ref:w,className:"jetpack-external-media-header__pexels",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:h,onChange:f,disabled:!!n}),(0,r.createElement)(o.Button,{variant:"primary",onClick:E,type:"submit",disabled:!h.length||h===y.current||n},__("Search","jetpack"))),(0,r.createElement)(c.Z,{key:g,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:a,nextPage:k,onCopy:v,pageHandle:l,multiple:p}))}))},30528:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(94502),a=n.n(r),o=n(69307),i=n(92819),s=n(89105),l=n.n(s),c=n(86989),u=n.n(c),p=n(94333),d=n(55609),m=n(65736),h=n(39630),f=n(9818),g=n(115);const __=m.__;function b(){return(0,p.createHigherOrderComponent)((e=>{class t extends o.Component{constructor(e){var t;super(e),t=this,a()(this,"contentRef",(e=>{e?(this.contentElement=e,this.modalElement=e.closest(".jetpack-external-media-browser"),this.modalElement&&this.modalElement.addEventListener("keydown",this.stopArrowKeysPropagation)):this.modalElement&&(this.modalElement.removeEventListener("keydown",this.stopArrowKeysPropagation),this.modalElement=null,this.contentElement=null)})),a()(this,"stopArrowKeysPropagation",(e=>{[h.UP,h.DOWN,h.LEFT,h.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()})),a()(this,"setAuthenticated",(e=>this.setState({isAuthenticated:e}))),a()(this,"getMedia",(function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.state.isLoading||(n&&t.props.noticeOperations.removeAllNotices(),t.setState({account:n?t.defaultAccount:t.state.account,isLoading:!0,media:n?[]:t.state.media,nextHandle:!n&&t.state.nextHandle},(()=>t.getMediaRequest(e))))})),a()(this,"handleApiError",(e=>{var t;if("authorization_required"===e.code)return void this.setState({isAuthenticated:!1,isLoading:!1,isCopying:!1});null!==(t=e.errors)&&void 0!==t&&t.length&&(e={code:e.errors[0].error,message:e.errors[0].message});const{noticeOperations:n}=this.props;n.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),this.setState({isLoading:!1,isCopying:!1})})),a()(this,"getMediaRequest",(e=>{const{nextHandle:t,media:n}=this.state;if(!1===t&&n.length>0)return void this.setState({isLoading:!1});const r=this.getRequestUrl(e);this.setAuthenticated(!0),u()({path:r,method:"GET",parse:void 0===window.wpcomFetch}).then((e=>{this.setState({account:e.meta.account,media:this.mergeMedia(n,e.media),nextHandle:e.meta.next_page,isLoading:!1})})).catch(this.handleApiError)})),a()(this,"copyMedia",((e,t,n)=>{var r;this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus(),u()({path:t,method:"POST",data:{external_ids:e.map((e=>e.guid)),media:e.map((e=>({guid:e.guid,caption:e.caption,title:e.title}))),service:n,post_id:null!==(r=this.props.postId)&&void 0!==r?r:0}}).then((e=>{e.media&&(e=e.media.map((e=>({alt:e.alt,caption:e.caption,id:e.ID,type:"image",url:e.URL}))));const{value:t,addToGallery:n,multiple:r}=this.props,a=r?e:e[0],o=e.find((e=>e.errors));if(o){const{errors:e}=o,t=Object.keys(e)[0];this.handleApiError({code:t,message:e[t]})}else this.props.onClose(),this.props.onSelect(n?t.concat(e):a)})).catch(this.handleApiError)})),a()(this,"onChangePath",((e,t)=>{this.setState({path:e},t)})),this.defaultAccount={image:"",name:""},this.state={account:this.defaultAccount,media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:g.oI}}}mergeMedia(e,t){return(0,i.uniqBy)(e.concat(t),"ID")}getRequestUrl(e){const{nextHandle:t}=this.state;return t?e+"&page_handle="+encodeURIComponent(t):e}render(){const{account:t,isAuthenticated:n,isCopying:r,isLoading:a,media:i,nextHandle:s,path:c}=this.state,{allowedTypes:u,multiple:p=!1,noticeUI:m,onClose:h}=this.props,f=r?__("Inserting media","jetpack"):__("Select media","jetpack",0),g=r?__("When the media is finished copying and inserting, you will be returned to the editor.","jetpack"):__("Select the media you would like to insert into the editor.","jetpack",0),b="jetpack-external-media-browser__description",v=l()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":r});return(0,o.createElement)(d.Modal,{onRequestClose:h,title:f,aria:{describedby:b},className:v},(0,o.createElement)("div",{ref:this.contentRef},m,(0,o.createElement)("p",{id:b,className:"jetpack-external-media-browser--visually-hidden"},g),(0,o.createElement)(e,{account:t,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:r,isLoading:a,media:i,pageHandle:s,allowedTypes:u,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:p,path:c,onChangePath:this.onChangePath})))}}return(0,f.withSelect)((e=>({postId:e("core/editor").getCurrentPostId()})))((0,d.withNotices)(t))}))}},34168:function(e,t,n){"use strict";n.d(t,{Qu:function(){return i}});var r=n(19416),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["allowedMimeTypes"],[])}function i(e,t){if(!e||!t)return!1;if(!o())return!1;const n=(r=t)?(0,a.pickBy)(o(),(e=>(0,a.startsWith)(e,`${r}/`))):{};var r;const i=(s=n)?(0,a.flatten)((0,a.map)((0,a.keys)(s),(e=>e.split("|")))):[];var s;if("string"==typeof e){const t=e.split(".").pop();return t&&i.includes(t)}return"object"==typeof e&&(e.type&&(0,a.values)(n).includes(e.type))}},88938:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4981);function a(){const e=(0,r.getCategories)();for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];for(const t of n)if(e.some((e=>{let{slug:n}=e;return n===t})))return t;throw new Error(`Could not find a category from the provided list: ${n.join(",")}`)}},23922:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(96483);function a(e,t){if(!(0,r.isURL)(t))return null;let n=t;try{const a=(0,r.getQueryArg)(t,"state"),o=JSON.parse(atob(a));if(e)o.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);o.from_site_editor_post_id=e.get("postId"),o.from_site_editor_post_type=e.get("postType")}n=(0,r.addQueryArgs)(t,{state:btoa(JSON.stringify(o))})}catch(e){0}return n}},56213:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(92819);const a=(e,t)=>(0,r.reduce)(t,((t,n,r)=>{if(void 0===e[r])return t;const{type:a,validator:o,validValues:i,default:s}=e[r];return t[r]="boolean"===a?"false"!==n&&!!n:o?o(n)?n:s:i?i.includes(n)?n:s:n,t}),{})},87966:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(91896),c=n.n(l);t.Z=e=>{let{children:t=null,isError:n=!1,...r}=e;const i=s()("help-message",{"help-message-is-error":n});return t&&(0,o.createElement)("div",a()({className:i},r),n&&(0,o.createElement)(c(),{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,o.createElement)("span",null,t))}},86955:function(e,t,n){"use strict";n.d(t,{He:function(){return d},FG:function(){return m},yk:function(){return h},JO:function(){return f},IM:function(){return g},zf:function(){return w},Ae:function(){return _},h:function(){return C},K9:function(){return S},Xu:function(){return j},VV:function(){return x},_z:function(){return P},Qv:function(){return T},av:function(){return A},Pw:function(){return N},ll:function(){return I}});var r=n(80236),a=n.n(r),o=n(69307),i=n(55609),s=n(89105),l=n.n(s),c=n(27655),u=n(4597);const p=c.O["Jetpack Green 40"],d=e=>(0,o.createElement)(i.SVG,a()({height:"24",width:"24",viewBox:"1.2 10.8 169.6 169.6",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(i.Path,{d:"m43.6 49.4c23.4 0 42.4 19 42.4 42.4v3.9h-80.9c-2.1 0-3.8-1.7-3.9-3.9 0-23.4 19-42.4 42.4-42.4z",fill:"#f6bc04"}),(0,o.createElement)(i.Path,{d:"m132.2 53.2c0 23.4-19 42.4-42.4 42.4h-3.8v-80.9c0-2.1 1.7-3.9 3.8-3.9 23.5 0 42.4 19 42.4 42.4z",fill:"#ea4335"}),(0,o.createElement)(i.Path,{d:"m128.4 141.9c-23.4 0-42.4-19-42.4-42.4v-3.9h80.9c2.1 0 3.9 1.7 3.9 3.8 0 23.5-19 42.5-42.4 42.5z",fill:"#4285f4"}),(0,o.createElement)(i.Path,{d:"m39.8 138c0-23.4 19-42.4 42.4-42.4h3.8v80.9c0 2.1-1.7 3.8-3.9 3.9-23.4 0-42.3-19-42.3-42.4z",fill:"#34a853"})),m=e=>(0,o.createElement)(i.SVG,a()({style:{fill:"#30272e",background:"#ffe033",padding:"3px",width:"22px",height:"24px"},width:"46",height:"42",viewBox:"0 0 46 42",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M0 9.3975C0 14.5687 4.1722 18.795 9.3353 18.795V0C4.1722 0 0 4.2 0 9.3975Z"}),(0,o.createElement)(i.Path,{d:"M13.6118 9.3975C13.6118 14.5687 17.784 18.795 22.9471 18.795V0C17.8101 0 13.6118 4.2 13.6118 9.3975Z"}),(0,o.createElement)(i.Path,{d:"M36.5589 18.795C41.7147 18.795 45.8942 14.5876 45.8942 9.3975C45.8942 4.2074 41.7147 0 36.5589 0C31.4032 0 27.2236 4.2074 27.2236 9.3975C27.2236 14.5876 31.4032 18.795 36.5589 18.795Z"}),(0,o.createElement)(i.Path,{d:"M0 32.6025C0 37.8 4.1722 42 9.3353 42V23.2312C4.1722 23.2312 0 27.4312 0 32.6025Z"}),(0,o.createElement)(i.Path,{d:"M13.6118 32.5238C13.6118 37.695 17.784 41.9213 22.9471 41.9213V23.1525C17.8101 23.1525 13.6118 27.3525 13.6118 32.5238Z"}),(0,o.createElement)(i.Path,{d:"M36.5589 41.9212C41.7147 41.9212 45.8942 37.7138 45.8942 32.5238C45.8942 27.3337 41.7147 23.1263 36.5589 23.1263C31.4032 23.1263 27.2236 27.3337 27.2236 32.5238C27.2236 37.7138 31.4032 41.9212 36.5589 41.9212Z"}))),h=e=>(0,o.createElement)(i.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,o.createElement)(i.Path,{d:"M14 7H9v10h3.9v-3.8H14c1.7 0 3.1-1.4 3.1-3.1C17.2 8.4 15.8 7 14 7z"}),(0,o.createElement)(i.Path,{d:"M20.5 2h-17C2.7 2 2 2.7 2 3.5v17c0 .8.7 1.5 1.5 1.5h17c.8 0 1.5-.7 1.5-1.5v-17c0-.8-.7-1.5-1.5-1.5zm-5.6 13.2V19H7V5h7c2.8 0 5.1 2.3 5.1 5.1.1 2.5-1.8 4.7-4.2 5.1z"})),f=()=>{const e="#757575";return(0,o.createElement)(i.SVG,{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/SVG",x:"0px",y:"0px",viewBox:"0 0 1292 448",style:{enableBackground:"new 0 0 1292 448"}},(0,o.createElement)(i.G,{id:"Icon"},(0,o.createElement)(i.Path,{class:"st0",fill:"#F6B704",d:"M171.6,177.4c23.4,0,42.4,19,42.4,42.4v3.9h-80.9c-2.1,0-3.8-1.7-3.9-3.9C129.2,196.4,148.2,177.4,171.6,177.4 C171.6,177.4,171.6,177.4,171.6,177.4z"}),(0,o.createElement)(i.Path,{class:"st1",fill:"#E54335",d:"M260.2,181.2c0,23.4-19,42.4-42.4,42.4H214v-80.9c0-2.1,1.7-3.9,3.8-3.9h0 C241.3,138.8,260.2,157.8,260.2,181.2C260.2,181.2,260.2,181.2,260.2,181.2z"}),(0,o.createElement)(i.Path,{class:"st2",fill:"#4280EF",d:"M256.4,269.9c-23.4,0-42.4-19-42.4-42.4v-3.9h80.9c2.1,0,3.9,1.7,3.9,3.8v0 C298.8,250.9,279.8,269.9,256.4,269.9C256.4,269.9,256.4,269.9,256.4,269.9z"}),(0,o.createElement)(i.Path,{class:"st3",fill:"#34A353",d:"M167.8,266c0-23.4,19-42.4,42.4-42.4c0,0,0,0,0,0h3.9v80.9c0,2.1-1.7,3.8-3.9,3.9 C186.7,308.4,167.8,289.4,167.8,266z"})),(0,o.createElement)(i.G,{id:"Photos"},(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M796,272v-91.6h31.2c15.2,0,28.7,11.3,28.7,27.3s-13.4,27.3-28.7,27.3h-19.4V272H796z M827.5,223.6 c8.8,0,16-7.2,16-16s-7.2-16-16-16h-19.7v32H827.5z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M875.8,209.3l-0.5,8.7h0.5c3.3-5.8,11.3-10.8,19.8-10.8c16,0,23.9,10.9,23.9,26.4V272h-11.8v-36.6 c0-13-6.5-17.4-15.5-17.4c-10.2,0-16.5,9.7-16.5,19.3V272H864v-91.6h11.8V209.3z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M993.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4S993.8,221.6,993.8,240.6z M982,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S982,255,982,240.6L982,240.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1008,252.9V220h-11v-10.7h11v-19.2h11.8v19.2h15.3V220h-15.3v32c0,7,2.9,10.2,8.4,10.2c1.8,0.1,3.7-0.3,5.4-1 l4.1,10.1c-3,1.2-6.2,1.8-9.5,1.7C1015,273,1008,265.7,1008,252.9z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1105.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4 S1105.8,221.6,1105.8,240.6z M1094,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S1094,255,1094,240.6 L1094,240.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1111,256.1l10.5-4.4c3.3,7.9,9.5,11.8,17,11.8c7.3,0,12.5-3.6,12.5-8.8c0-3.2-1.9-6.6-8.6-8.3l-12.7-3.1 c-5.8-1.4-16.8-6.4-16.8-17.4c0-11.4,11.8-18.7,24.8-18.7c10.9,0,20.3,5,24.2,14.6l-10.2,4.2c-2.4-5.9-8.2-8.3-14.3-8.3 c-6.7,0-12.4,3-12.4,8.1c0,4,3.3,6.1,8.3,7.3l12.4,2.9c12.4,2.9,17.3,10.6,17.3,18.3c0,11.1-10,19.7-24.7,19.7 C1123.2,274,1114.7,265.1,1111,256.1z"})),(0,o.createElement)(i.G,{id:"Google"},(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M348.7,221.6c0-28.9,24.3-52.5,53.2-52.5c13.5-0.2,26.4,5,36,14.5l-10.1,10.1c-6.9-6.7-16.2-10.4-25.9-10.2 c-21.1,0-37.6,17-37.6,38.2s16.5,38.1,37.6,38.1c13.7,0,21.5-5.5,26.5-10.5c4.1-4.1,6.8-10,7.8-18H402v-14.4h48.3 c0.5,3,0.8,6,0.8,9c0,10.8-2.9,24.1-12.4,33.5c-9.2,9.6-21,14.7-36.6,14.7C373,274,348.7,250.5,348.7,221.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M490,206.5c-18.7,0-33.9,14.2-33.9,33.8S471.3,274,490,274s33.9-14.3,33.9-33.8S508.7,206.5,490,206.5z M490,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S500.2,260.7,490,260.7z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M564,206.5c-18.7,0-33.9,14.2-33.9,33.8S545.3,274,564,274s33.9-14.3,33.9-33.8S582.7,206.5,564,206.5z M564,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S574.2,260.7,564,260.7z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M654.8,208.5v5.5h-0.5c-3.3-4-9.7-7.6-17.8-7.6c-16.9,0-32.4,14.9-32.4,33.9s15.5,33.7,32.4,33.7 c8.1,0,14.5-3.6,17.8-7.7h0.5v4.9c0,12.9-6.9,19.8-18,19.8c-9.1,0-14.7-6.5-17-12l-12.9,5.4c5,12.1,16.8,20.1,30,20 c17.4,0,32.1-10.2,32.1-35.2v-60.7H654.8z M637.8,260.7c-10.2,0-18.8-8.6-18.8-20.4s8.6-20.6,18.8-20.6s18,8.7,18,20.6 S647.9,260.7,637.8,260.7L637.8,260.7z"}),(0,o.createElement)(i.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M734.7,260.7c-7.6,0-12.9-3.5-16.4-10.2l45.2-18.7L762,228c-2.8-7.6-11.4-21.5-28.9-21.5s-31.9,13.7-31.9,33.8 c0,19,14.3,33.8,33.5,33.8c11.3,0.1,21.9-5.6,28.2-15l-11.5-7.7C747.5,257,742.3,260.7,734.7,260.7z M733.6,219.5 c5.9,0,10.9,2.9,12.5,7.2l-30.2,12.5C715.5,226.2,726,219.5,733.6,219.5L733.6,219.5z"})))},g=e=>{let{size:t=24,border:n=0,className:r,color:a=p}=e;const s=n?-n/t*32:0;return(0,o.createElement)(i.SVG,{className:l()("jetpack-logo",r),width:t,height:t,viewBox:`${s} ${s} ${32-2*s} ${32-2*s}`},(0,o.createElement)(i.Path,{className:"jetpack-logo__icon-circle",fill:a,stroke:n?"#fff":"transparent",strokeWidth:n,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,o.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*s},19 15,${3-s}`}),(0,o.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+s} 17,13 ${25+.5*s},13`}))},b=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M12,2C6.5,2,2,6.5,2,12c0,5,3.7,9.1,8.4,9.9v-7H7.9V12h2.5V9.8c0-2.5,1.5-3.9,3.8-3.9c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3 c-1.2,0-1.6,0.8-1.6,1.6V12h2.8l-0.4,2.9h-2.3v7C18.3,21.1,22,17,22,12C22,6.5,17.5,2,12,2z"}))),v=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M19,3H5C3.895,3,3,3.895,3,5v14c0,1.105,0.895,2,2,2h14c1.105,0,2-0.895,2-2V5C21,3.895,20.105,3,19,3z M16.466,9.71 c0.004,0.099,0.007,0.198,0.007,0.298c0,3.045-2.318,6.556-6.556,6.556c-1.301,0-2.512-0.381-3.532-1.035 c0.18,0.021,0.364,0.032,0.55,0.032c1.079,0,2.073-0.368,2.862-0.986c-1.008-0.019-1.859-0.685-2.152-1.6 c0.141,0.027,0.285,0.041,0.433,0.041c0.21,0,0.414-0.028,0.607-0.081c-1.054-0.212-1.848-1.143-1.848-2.259 c0-0.01,0-0.019,0-0.029c0.311,0.173,0.666,0.276,1.044,0.288c-0.618-0.413-1.025-1.118-1.025-1.918 c0-0.422,0.114-0.818,0.312-1.158c1.136,1.394,2.834,2.311,4.749,2.407c-0.039-0.169-0.06-0.344-0.06-0.525 c0-1.272,1.032-2.304,2.304-2.304c0.663,0,1.261,0.28,1.682,0.728c0.525-0.103,1.018-0.295,1.463-0.559 c-0.172,0.538-0.537,0.99-1.013,1.275c0.466-0.056,0.91-0.18,1.323-0.363C17.306,8.979,16.916,9.385,16.466,9.71z"}))),k=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M19.7 3H4.3C3.582 3 3 3.582 3 4.3v15.4c0 .718.582 1.3 1.3 1.3h15.4c.718 0 1.3-.582 1.3-1.3V4.3c0-.718-.582-1.3-1.3-1.3zM8.34 18.338H5.666v-8.59H8.34v8.59zM7.003 8.574c-.857 0-1.55-.694-1.55-1.548 0-.855.692-1.548 1.55-1.548.854 0 1.547.694 1.547 1.548 0 .855-.692 1.548-1.546 1.548zm11.335 9.764h-2.67V14.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.6 1.086-1.6 2.206v4.248h-2.668v-8.59h2.56v1.174h.036c.357-.675 1.228-1.387 2.527-1.387 2.703 0 3.203 1.78 3.203 4.092v4.71z"}))),y=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))),E=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z"}))),w={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 100 100"},(0,o.createElement)(i.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"}))},_={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,o.createElement)(i.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"}))},C={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,o.createElement)(i.Path,{transform:"translate(-25)",fillRule:"evenodd",d:"M37 31.908c0 1.376.893 2.268 2.27 2.268H45.9c3.956 0 7.192-1.337 9.392-3.68H37v1.412zM45.901 9H39.27C37.893 9 37 9.893 37 11.269v1.411h18.294C53.093 10.338 49.857 9 45.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H58.4a13.644 13.644 0 00-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H37v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H37v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zM83.667 21.209c.296-1.437",clipRule:"evenodd"}))},S={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})))},j=((0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M15.9216 2H2.98533C2.43803 2 1.99023 2.45 1.99023 3V17L5.97062 13H15.9216C16.4689 13 16.9167 12.55 16.9167 12V3C16.9167 2.45 16.4689 2 15.9216 2ZM14.9265 4V11H5.14469L3.98043 12.17V4H14.9265ZM18.9069 6H20.8971C21.4444 6 21.8922 6.45 21.8922 7V22L17.9118 18H6.96572C6.41842 18 5.97062 17.55 5.97062 17V15H18.9069V6Z"}))),(0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M3.98042 2H19.9019C20.9965 2 21.8921 2.9 21.8921 4V16C21.8921 17.1 20.9965 18 19.9019 18H5.97061L1.99023 22V4C1.99023 2.9 2.88582 2 3.98042 2ZM5.97061 16H19.9019V4H3.98042V18L5.97061 16Z"}))),{foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,o.createElement)(i.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,o.createElement)(i.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()})))}),x={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,o.createElement)(i.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,o.createElement)(i.Path,{d:"M4 18.5H13V20H4V18.5Z"})))},P=((0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M2.5 7.5V4.5H15.5V7.5H10.5V19.5H7.5V7.5H2.5ZM12.5 9.5H21.5V12.5H18.5V19.5H15.5V12.5H12.5V9.5Z"})),(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M12.7049 2V6C8.30658 6 4.74414 9.58 4.74414 14C4.74414 18.42 8.30658 22 12.7049 22C17.1032 22 20.6656 18.42 20.6656 14H18.6755C18.6755 17.31 15.9987 20 12.7049 20C9.41113 20 6.73433 17.31 6.73433 14C6.73433 10.69 9.41113 8 12.7049 8V12L17.6804 7L12.7049 2ZM11.6501 12.73L11.4013 14.9L12.068 15.06C12.0753 15.0526 12.0827 15.0447 12.0901 15.0366C12.1131 15.0116 12.1375 14.9851 12.1675 14.97C12.1874 14.96 12.2073 14.9475 12.2272 14.935C12.2471 14.9225 12.2671 14.91 12.287 14.9C12.3268 14.88 12.3865 14.86 12.4362 14.85C12.486 14.84 12.5556 14.83 12.6352 14.83C12.7447 14.83 12.8542 14.85 12.9338 14.88C13.0134 14.91 13.083 14.96 13.1427 15.03C13.2024 15.1 13.2422 15.17 13.2721 15.27C13.302 15.37 13.3119 15.47 13.3119 15.58V15.58C13.3119 15.69 13.3119 15.79 13.2821 15.89C13.2522 15.99 13.2124 16.07 13.1726 16.14C13.1328 16.21 13.0631 16.27 12.9935 16.31C12.9238 16.35 12.8343 16.37 12.7248 16.37C12.5556 16.37 12.4163 16.31 12.3069 16.22C12.1974 16.13 12.1377 15.99 12.1178 15.81H11.2819C11.2819 16.01 11.3317 16.19 11.4113 16.34C11.4909 16.49 11.5904 16.63 11.7297 16.73C11.869 16.83 12.0183 16.92 12.1874 16.97C12.3566 17.02 12.5357 17.05 12.7148 17.05C12.9636 17.05 13.1726 17 13.3517 16.93C13.5308 16.86 13.6801 16.75 13.7995 16.62C13.9189 16.49 14.0085 16.34 14.0682 16.17C14.1279 16 14.1577 15.82 14.1577 15.63C14.1577 15.41 14.1179 15.21 14.0682 15.03C14.0184 14.85 13.9289 14.7 13.8194 14.58C13.7099 14.46 13.5706 14.37 13.4114 14.3C13.2522 14.23 13.0731 14.2 12.8641 14.2C12.7945 14.2 12.7248 14.21 12.6651 14.22C12.6352 14.225 12.6054 14.2325 12.5755 14.24C12.5457 14.2475 12.5158 14.255 12.486 14.26C12.4263 14.27 12.3765 14.29 12.3367 14.31C12.3201 14.3183 12.3035 14.325 12.2876 14.3313C12.2654 14.3401 12.2446 14.3483 12.2272 14.36L12.3367 13.44H14.0284V12.73H11.6501Z"}))),T=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M11.9412 2V6C16.3395 6 19.902 9.58 19.902 14C19.902 18.42 16.3395 22 11.9412 22C7.54291 22 3.98047 18.42 3.98047 14H5.97066C5.97066 17.31 8.64746 20 11.9412 20C15.235 20 17.9118 17.31 17.9118 14C17.9118 10.69 15.235 8 11.9412 8V12L6.96575 7L11.9412 2ZM10.8864 12.73L10.6376 14.9L11.3044 15.06C11.3117 15.0526 11.319 15.0447 11.3264 15.0366C11.3494 15.0116 11.3738 14.9851 11.4039 14.97C11.4238 14.96 11.4437 14.9475 11.4636 14.935C11.4835 14.9225 11.5034 14.91 11.5233 14.9C11.5631 14.88 11.6228 14.86 11.6725 14.85C11.7223 14.84 11.792 14.83 11.8716 14.83C11.981 14.83 12.0905 14.85 12.1701 14.88C12.2497 14.91 12.3194 14.96 12.3791 15.03C12.4388 15.1 12.4786 15.17 12.5084 15.27C12.5383 15.37 12.5482 15.47 12.5482 15.58V15.58C12.5482 15.69 12.5482 15.79 12.5184 15.89C12.4885 15.99 12.4487 16.07 12.4089 16.14C12.3691 16.21 12.2995 16.27 12.2298 16.31C12.1601 16.35 12.0706 16.37 11.9611 16.37C11.792 16.37 11.6526 16.31 11.5432 16.22C11.4337 16.13 11.374 15.99 11.3541 15.81H10.5182C10.5182 16.01 10.568 16.19 10.6476 16.34C10.7272 16.49 10.8267 16.63 10.966 16.73C11.1053 16.83 11.2546 16.92 11.4238 16.97C11.5929 17.02 11.7721 17.05 11.9512 17.05C12.1999 17.05 12.4089 17 12.588 16.93C12.7672 16.86 12.9164 16.75 13.0358 16.62C13.1552 16.49 13.2448 16.34 13.3045 16.17C13.3642 16 13.3941 15.82 13.3941 15.63C13.3941 15.41 13.3543 15.21 13.3045 15.03C13.2547 14.85 13.1652 14.7 13.0557 14.58C12.9463 14.46 12.807 14.37 12.6477 14.3C12.4885 14.23 12.3094 14.2 12.1004 14.2C12.0308 14.2 11.9611 14.21 11.9014 14.22C11.8716 14.225 11.8417 14.2325 11.8119 14.24C11.782 14.2475 11.7522 14.255 11.7223 14.26C11.6626 14.27 11.6128 14.29 11.573 14.31C11.5564 14.3183 11.5398 14.325 11.5239 14.3313C11.5017 14.3401 11.481 14.3483 11.4636 14.36L11.573 13.44H13.2647V12.73H10.8864Z"})),A=e=>{let{serviceName:t,className:n}=e;const r={className:l()("jetpack-gutenberg-social-icon",`is-${t}`,n),size:24};switch(t){case"facebook":return(0,o.createElement)(i.Icon,a()({icon:b},r));case"twitter":return(0,o.createElement)(i.Icon,a()({icon:v},r));case"linkedin":return(0,o.createElement)(i.Icon,a()({icon:k},r));case"tumblr":return(0,o.createElement)(i.Icon,a()({icon:y},r));case"google":return(0,o.createElement)(i.Icon,a()({icon:E},r))}return null},N=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,o.createElement)(i.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})),I=(0,o.createElement)(i.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"}))},91978:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19416),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["jetpack","is_active"],!1)}},86941:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19416),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["jetpack","is_current_user_connected"],!1)}},88514:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19416),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["jetpack","is_offline_mode"],!1)}},31060:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(98817),s=n(3093);const __=a.__,{Fill:l,Slot:c}=(0,o.createSlotFill)("JetpackLikesAndSharingPanel");(0,i.registerPlugin)("jetpack-likes-and-sharing-panel",{render:()=>(0,r.createElement)(c,null,(e=>e.length?(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("Likes and Sharing","jetpack")},e)):null))})},3093:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(55609),o=n(72067),i=n(98817),s=n(9818),l=n(96483),c=n(47701),u=n.n(c),p=n(86955);const{Fill:d,Slot:m}=(0,a.createSlotFill)("JetpackPluginSidebar");u()((function(){"true"===(0,l.getQueryArg)(window.location.search,"jetpackSidebarIsOpen")&&(0,s.dispatch)("core/interface").enableComplementaryArea("core/edit-post","jetpack-sidebar/jetpack")})),(0,i.registerPlugin)("jetpack-sidebar",{render:()=>(0,r.createElement)(m,null,(e=>e.length?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PluginSidebarMoreMenuItem,{target:"jetpack",icon:(0,r.createElement)(p.IM,null)},"Jetpack"),(0,r.createElement)(o.PluginSidebar,{name:"jetpack",title:"Jetpack",icon:(0,r.createElement)(p.IM,null)},e)):null))})},62963:function(e,t,n){"use strict";var r=n(86989
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
+ !function(){var e,t,n,r,a,o,i={94502:function(e){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},e.exports.__esModule=!0,e.exports.default=e.exports},80236:function(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":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 a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(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(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},71430:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},87373:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},6162:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=o},72142:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}));t.Z=o},49169:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},12270:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));t.Z=o},61773:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},40707:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},36442:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},51789:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},21345:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):h(a,a.length)}function m(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 h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(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(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.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 a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);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},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},96342:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function a(a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,g=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,p=void 0!==j.locale?j.locale:"",d=j.localeOptions||{},y=void 0!==j.separator?j.separator:"",E=void 0!==j.spacer?j.spacer:k?"":" ",_=j.symbols||{},w=2===i?j.standard||"iec":"jedec",f=j.output||"string",c=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],o=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(a))<0,l=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(l)))<0&&(o=0),o>8&&(S>0&&(S+=8-o),o=8),"exponent"===f)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[w][s?"bits":"bytes"][o];else{P=h/(2===i?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(P*=8)>=l&&o<8&&(P/=l,o++);var T=Math.pow(10,o>0?b:0);x[0]=C(P*T)/T,x[0]===l&&o<8&&void 0===j.exponent&&(x[0]=1,o++),v=x[1]=10===i&&1===o?s?"kbit":"kB":t[w][s?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===p?x[0]=x[0].toLocaleString():p.length>0?x[0]=x[0].toLocaleString(p,d):y.length>0&&(x[0]=x[0].toString().replace(".",y)),g&&!1===Number.isInteger(x[0])&&b>0){var A=y||".",N=x[0].toString().split(A),I=N[1]||"",B=I.length,M=b-B;x[0]="".concat(N[0]).concat(A).concat(I.padEnd(B+M,"0"))}return c&&(x[1]=u[o]?u[o]:n[w][o]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===f?x:"object"===f?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(E)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){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=o,o.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 a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.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 a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.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]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,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}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(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 l(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=a,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),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];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=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}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,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},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,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>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}},88617:function(e,t,n){"use strict";var r=n(57810),a=n(61285),o=n(64473),i=n.n(o),s=n(28457),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(92846),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(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 S(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function j(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return S(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;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:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.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||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.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!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=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)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}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 l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=S(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=S(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!j(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=j(this,e);if(t||(t=S(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},63807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(88617),a=n(42928),o=n(80975),i=n(24531),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},42928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(20623),a=n(6438),o=n(68384),i=n(75808),s=n(80601),l=n(31615),c=n(61285),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},92846:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},24531:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(4291),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(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(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},80975:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2037),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"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}}},35166:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var a,o=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?g(f(e)):f(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var o=e[r],i=e[r+1],l=e[r+2],c=o<<16|i<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==i?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[c(r>>>16),c(r>>>8&255),c(255&r)];return a.length-=[0,0,2,1][n],a.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return w(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:P,toBase64:b,utob:d,encode:b,encodeURI:v,btou:w,decode:P,noConflict:T,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return b(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(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=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.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}},o.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)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.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},o.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)},o.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}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},95319:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(85645),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S=e.lineMax,j=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(j++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,j++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=j>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=j-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((j=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(j++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[d]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,j++;u=j>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=j-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(95319),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x,P,T,A,N,I,B,M=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(M=!0),(P=o(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(A,P-1)),M&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(M&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(B=e.push("ordered_list_open","ol",1),1!==v&&(B.attrs=[["start",v]])):B=e.push("bullet_list_open","ul",1),B.map=f=[t,0],B.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(B=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),B.map=m=[t,0],d&&(B.info=e.src.slice(A,P-1)),j=e.tight,S=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=C,e.tight=j,(B=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){N=!0;break}if(N)break;if(d){if((P=o(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(B=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(j=t.md.options.quotes[2],x=t.md.options.quotes[3]):(j=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,j),p+=x.length-1,h.token===n&&(p+=j.length-1),d=(c=i.content).length,S.length=_;continue e}E?S.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var S="",j=0,x=C.length;j<x;j++)C.charCodeAt(j)>127?S+="x":S+=C[j];if(!S.match(c)){var P=_.slice(0,r),T=_.slice(r+1),A=C.match(u);A&&(P.push(A[1]),T.unshift(A[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=f.indexOf("#");-1!==N&&(this.hash=f.substr(N),f=f.slice(0,N));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},40676:function(){},95593:function(){},8500:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\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(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(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(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(64473),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},52504:function(e,t,n){"use strict";var r=n(62265);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},23698:function(e,t,n){e.exports=n(52504)()},62265:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},31027:function(e,t,n){var r=n(89403);function a(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}a.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=a},50771:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},652:function(e){e.exports={L:1,M:0,Q:3,H:2}},97044:function(e,t,n){var r=n(27280);function a(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}a.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(o)));return new a(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=r.gexp(r.glog(e.get(o))+t);return new a(n,0).mod(e)}},e.exports=a},1596:function(e,t,n){var r=n(31027),a=n(88487),o=n(50771),i=n(83186),s=n(97044);function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=a.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),i.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var a=0;a<this.modules.length;a++)for(var o=1*a,i=0;i<this.modules[a].length;i++){var s=1*i;this.modules[a][i]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=i.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],a=e[n];if(null==this.modules[r][a])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][a+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(e){for(var t=i.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=i.getBCHTypeInfo(n),a=0;a<15;a++){var o=!e&&1==(r>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o}for(a=0;a<15;a++){o=!e&&1==(r>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,a=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>a&1)),i.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--a&&(o++,a=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=a.getRSBlocks(e,t),s=new o,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),i.getLengthInBits(u.mode,e)),u.write(s)}var p=0;for(c=0;c<r.length;c++)p+=r[c].dataCount;if(s.getLengthInBits()>8*p)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*p+")");for(s.getLengthInBits()+4<=8*p&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*p||(s.put(l.PAD0,8),s.getLengthInBits()>=8*p));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,a=0,o=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,p=t[c].totalCount-u;r=Math.max(r,u),a=Math.max(a,p),o[c]=new Array(u);for(var d=0;d<o[c].length;d++)o[c][d]=255&e.buffer[d+n];n+=u;var m=i.getErrorCorrectPolynomial(p),h=new s(o[c],m.getLength()-1).mod(m);l[c]=new Array(m.getLength()-1);for(d=0;d<l[c].length;d++){var f=d+h.getLength()-l[c].length;l[c][d]=f>=0?h.get(f):0}}var g=0;for(d=0;d<t.length;d++)g+=t[d].totalCount;var b=new Array(g),v=0;for(d=0;d<r;d++)for(c=0;c<t.length;c++)d<o[c].length&&(b[v++]=o[c][d]);for(d=0;d<a;d++)for(c=0;c<t.length;c++)d<l[c].length&&(b[v++]=l[c][d]);return b},e.exports=l},88487:function(e,t,n){var r=n(652);function a(e,t){this.totalCount=e,this.dataCount=t}a.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],a.getRSBlocks=function(e,t){var n=a.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,i=0;i<r;i++)for(var s=n[3*i+0],l=n[3*i+1],c=n[3*i+2],u=0;u<s;u++)o.push(new a(l,c));return o},a.getRsBlockTable=function(e,t){switch(t){case r.L:return a.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return a.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return a.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return a.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=a},27280:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},89403:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},83186:function(e,t,n){var r=n(89403),a=n(97044),o=n(27280),i=0,s=1,l=2,c=3,u=4,p=5,d=6,m=7,h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;h.getBCHDigit(t)-h.getBCHDigit(h.G15)>=0;)t^=h.G15<<h.getBCHDigit(t)-h.getBCHDigit(h.G15);return(e<<10|t)^h.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;h.getBCHDigit(t)-h.getBCHDigit(h.G18)>=0;)t^=h.G18<<h.getBCHDigit(t)-h.getBCHDigit(h.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return h.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case i:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case m:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new a([1],0),n=0;n<e;n++)t=t.multiply(new a([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var a=0;a<t;a++){for(var o=0,i=e.isDark(r,a),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)a+l<0||t<=a+l||0==s&&0==l||i==e.isDark(r+s,a+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(a=0;a<t-1;a++){var c=0;e.isDark(r,a)&&c++,e.isDark(r+1,a)&&c++,e.isDark(r,a+1)&&c++,e.isDark(r+1,a+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(a=0;a<t-6;a++)e.isDark(r,a)&&!e.isDark(r,a+1)&&e.isDark(r,a+2)&&e.isDark(r,a+3)&&e.isDark(r,a+4)&&!e.isDark(r,a+5)&&e.isDark(r,a+6)&&(n+=40);for(a=0;a<t;a++)for(r=0;r<t-6;r++)e.isDark(r,a)&&!e.isDark(r+1,a)&&e.isDark(r+2,a)&&e.isDark(r+3,a)&&e.isDark(r+4,a)&&!e.isDark(r+5,a)&&e.isDark(r+6,a)&&(n+=40);var u=0;for(a=0;a<t;a++)for(r=0;r<t;r++)e.isDark(r,a)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=h},93527:function(e,t,n){"use strict";function r(e){return 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},r(e)}var a=["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"],o=["value","size","level","bgColor","fgColor","includeMargin","imageSettings"],i=["renderAs"];function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(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}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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)}}function m(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var a=k(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=n(99196),w=(n(23698),n(1596)),_=n(652);function C(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var S={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var a=null;e.forEach((function(o,i){if(!o&&null!==a)return n.push("M".concat(a+t," ").concat(r+t,"h").concat(i-a,"v1H").concat(a+t,"z")),void(a=null);if(i!==e.length-1)o&&null===a&&(a=i);else{if(!o)return;null===a?n.push("M".concat(i+t,",").concat(r+t," h1v1H").concat(i+t,"z")):n.push("M".concat(a+t,",").concat(r+t," h").concat(i+1-a,"v1H").concat(a+t,"z"))}}))})),n.join("")}function x(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function P(e,t){var n=e.imageSettings,r=e.size,a=e.includeMargin;if(null==n)return null;var o=a?4:0,i=t.length+2*o,s=Math.floor(.1*r),l=i/r,c=(n.width||s)*l,u=(n.height||s)*l,p=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,m=null;if(n.excavate){var h=Math.floor(p),f=Math.floor(d);m={x:h,y:f,w:Math.ceil(c+p-h),h:Math.ceil(u+d-f)}}return{x:p,y:d,h:u,w:c,excavation:m}}var T=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),A=function(e){h(n,e);var t=g(n);function n(){var e;p(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return y(v(e=t.call.apply(t,[this].concat(a))),"_canvas",void 0),y(v(e),"_image",void 0),y(v(e),"state",{imgLoaded:!1}),y(v(e),"handleImageLoad",(function(){e.setState({imgLoaded:!0})})),e}return m(n,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,o=e.fgColor,i=e.includeMargin,s=e.imageSettings,l=new w(-1,_[r]);if(l.addData(C(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var p=l.modules;if(null===p)return;var d=i?4:0,m=p.length+2*d,h=P(this.props,p);null!=s&&null!=h&&null!=h.excavation&&(p=x(p,h.excavation));var f=window.devicePixelRatio||1;c.height=c.width=n*f;var g=n/m*f;u.scale(g,g),u.fillStyle=a,u.fillRect(0,0,m,m),u.fillStyle=o,T?u.fill(new Path2D(j(p,d))):p.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=h&&u.drawImage(this._image,h.x+d,h.y+d,h.w,h.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),o=(t.includeMargin,t.imageSettings),i=u(t,a),l=c({height:n,width:n},r),p=null,d=o&&o.src;return null!=o&&null!=d&&(p=E.createElement("img",{src:d,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),E.createElement(E.Fragment,null,E.createElement("canvas",s({style:l,height:n,width:n,ref:function(t){return e._canvas=t}},i)),p)}}]),n}(E.PureComponent);y(A,"defaultProps",S);var N=function(e){h(n,e);var t=g(n);function n(){return p(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,i=e.fgColor,l=e.includeMargin,c=e.imageSettings,p=u(e,o),d=new w(-1,_[r]);d.addData(C(t)),d.make();var m=d.modules;if(null===m)return null;var h=l?4:0,f=m.length+2*h,g=P(this.props,m),b=null;null!=c&&null!=g&&(null!=g.excavation&&(m=x(m,g.excavation)),b=E.createElement("image",{xlinkHref:c.src,height:g.h,width:g.w,x:g.x+h,y:g.y+h,preserveAspectRatio:"none"}));var v=j(m,h);return E.createElement("svg",s({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},p),E.createElement("path",{fill:a,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),E.createElement("path",{fill:i,d:v}),b)}}]),n}(E.PureComponent);y(N,"defaultProps",S);var I=function(e){var t=e.renderAs,n=u(e,i),r="svg"===t?N:A;return E.createElement(r,n)};I.defaultProps=c({renderAs:"canvas"},S),e.exports=I},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},94131:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=a(o),r=a(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},2723:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),j=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=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),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},85325:function(e,t,n){"use strict";var r=n(64473),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=(0,o.assign)(s,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},85482:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(23698),l=n.n(s),c=n(99196),u=n.n(c),p=n(89105),d=n.n(p),m=n(65736);const __=m.__;class h extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,o=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(c.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}i()(h,"propTypes",{className:l().string,width:l().number,height:l().number,showText:l().bool,logoColor:l().string}),i()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=h},77953:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(99196),a=n.n(r),o=n(93527),i=n.n(o);function s(e){let{value:t="https://jetpack.com",bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c="canvas",size:u=248}=e;return a().createElement(i(),{value:t,size:u,bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c})}},64481:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;var a;"undefined"!=typeof window&&(r=null===(a=window.Initial_State)||void 0===a?void 0:a.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return r}})},19416:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Ug:function(){return o.Ug},aQ:function(){return o.aQ},M6:function(){return o.M6},Wp:function(){return o.Wp},OZ:function(){return i.Z},o_:function(){return s.Z},T:function(){return l.Z},Qq:function(){return c.Qq},X1:function(){return c.X1},_D:function(){return c._D},Rl:function(){return c.Rl},FK:function(){return c.FK},HD:function(){return c.HD},m3:function(){return c.m3}});var r=n(10970),a=n(72934),o=n(99665),i=n(86205),s=n(95044),l=n(22801),c=n(34201)},10970:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},86205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(10970);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},72934:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},34201:function(e,t,n){"use strict";n.d(t,{Qq:function(){return u},X1:function(){return p},_D:function(){return d},Rl:function(){return m},FK:function(){return f},HD:function(){return g},m3:function(){return b}});var r=n(92819),a=n(96483),o=n(65736),i=n(99665),s=n(10970),l=n(86205),c=n(72934);const __=o.__;function u(e){let{planSlug:t,plan:n,postId:o,postType:s}=e;const l=(0,r.startsWith)(t,"jetpack_")?t:(0,r.get)(n,["path_slug"]),u=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/admin.php`,{page:"gutenberg-edit-site",postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,i.Wp)()?(0,a.addQueryArgs)("/"+(0,r.compact)([e,s,(0,c.Z)(),o]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:o,plan_upgraded:1})})();return(0,i.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):l&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${l}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,l.Z)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,l.Z)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function f(){return(0,r.get)((0,s.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,r.map)(h,"name").includes(e),b=e=>(0,r.head)((0,r.filter)(h,(t=>{let{name:n}=t;return n===e})))},95044:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(86205);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99665:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s},aQ:function(){return l}});var r=n(10970);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}function l(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_coming_soon)&&void 0!==e&&e}},22801:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94333);t.Z=e=>(0,o.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},78101:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},63415:function(e,t,n){"use strict";var r=n(78101),a=n(85325);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},26995:function(e,t,n){"use strict";var r=n(44520);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},17495:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},28823:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(46139),p=n(17495);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,S=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{variant:"secondary",type:"submit"},__("Preview","jetpack")))),j=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},j,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,variant:"primary",className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():S)}))},46139:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},12700:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(26995),o=n(28823),i=n(46139),s=n(4597);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},9691:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(4597),s=n(64832);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},24318:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},88584:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},60749:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(24318),g=n(88584),b=n(27313);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},27313:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(60749),s=n(6029),l=n(4597);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},10078:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},49580:function(e,t,n){"use strict";var r=n(44520);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},54043:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(95260);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},47345:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},87487:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},95260:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},58036:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(54043),o=n(47345),i=n(87487);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},14351:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(10078),d=n(58036),m=n(95260),h=n(95506);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),S=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),j={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:S,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:j,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},57234:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},67071:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(49580),o=n(14351),i=n(57234),s=n(16245),l=n(88938);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},16245:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(95260);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),S={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g}))}},95506:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},56494:function(e,t,n){"use strict";var r=n(44520);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},58522:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(89419);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},27967:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(44520);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},3618:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(32232),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(25067),h=n(56494),f=n(56213),g=n(86105),b=n(20145),v=n(95359),k=n(58522);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:P,style:T,url:A}=C,[N,I]=(0,o.useState)(A),[B,M]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{A&&b.lR!==A&&"link"!==T&&(0,v.Z)(A,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(N);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),M(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:N||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:P});return`${A}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),H=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let V=n;return A&&!B&&(V+=` calendly-style-${T}`),(0,o.createElement)("div",{className:V},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:N,isEditingUrl:B,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:M})),A&&!B?"inline"===T?$:H:U)}))},25067:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},20145:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(56494),i=n(27967),s=n(3618),l=n(25067),c=n(48878),u=n(86105),p=n(4597);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},48878:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},86105:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},68328:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},45977:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},73006:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(45977);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{variant:"secondary",onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},57034:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(73006),c=n(84766);const __=s.__,u=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM plugin is installed but has an invalid version.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Please update to the latest version of the Jetpack CRM plugin to integrate your contact form with your CRM.","jetpack")),m=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(i.Button,{variant:"secondary",icon:(0,r.createElement)(i.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},h=e=>{let{installAndActivateCRMPlugin:t,isInstalling:n}=e,a=(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Install Jetpack CRM","jetpack"));return n&&(a=(0,r.createElement)(m,null)),(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("You can save contacts from Jetpack contact forms in Jetpack CRM.","jetpack"),(0,r.createElement)("br",null),a))},f=e=>{let{activateCRMPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("You already have the Jetpack CRM plugin installed, but it’s not activated.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(m,{isActivating:!0}),!n&&(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Activate the Jetpack CRM plugin","jetpack")))},g=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i,onCRMPluginClick:s,isInstalling:l}=e;const m=o().coerce(t.crm_version);if(t.crm_installed&&!m)return(0,r.createElement)(p,null);if(t.crm_installed&&o().lt(m,"4.9.1"))return(0,r.createElement)(d,null);let b=u.NOT_INSTALLED;return t.crm_active?b=u.ACTIVE:t.crm_installed&&(b=u.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},u.ACTIVE===b&&(0,r.createElement)(g,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),u.INSTALLED===b&&(0,r.createElement)(f,{activateCRMPlugin:()=>s(c.bu,"zero-bs-crm/ZeroBSCRM"),isInstalling:l}),u.NOT_INSTALLED===b&&(0,r.createElement)(h,{installAndActivateCRMPlugin:()=>s(c.yX,"zero-bs-crm"),isInstalling:l}))}},75873:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(57034);const __=s.__,c=(e,t,n)=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((n=>{if(n.error)throw n.message;e(!1),t(n)})).catch((()=>e(!0))).finally((()=>n(!1)))},u=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,o]=(0,r.useState)(!0),[s,l]=(0,r.useState)(!1),[p,d]=(0,r.useState)(),[m,h]=(0,r.useState)(!1),f=(0,r.useCallback)(((e,t)=>{h(!0),e(t).catch((()=>{l(!0)})).finally((()=>{h(!1),o(!0),c(l,d,o)}))}),[h,l,o]);return(0,r.useEffect)((()=>{c(l,d,o)}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(u,{isFetchingCRMData:a,hasCRMDataError:s,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n,isInstalling:m,onCRMPluginClick:f})))}},44199:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(1092),c=n(80984);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},73503:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(1092),c=n(37232),u=n(79990);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
  __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},80984:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(6029),l=n(37232),c=n(79990);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},79990:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},1092:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},23702:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(1092),l=n(49946),c=n(80984);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},69653:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(1092),s=n(80984);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},37232:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>t({width:e})},e,"%")))))}},61679:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(80236),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(1092),p=n(80984);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},84626:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},7096:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(92819),i=n(84766),s=n(15576),l=n(78822);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},15576:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},78822:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(19416),o=n(55609),i=n(65736),s=n(84766),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{variant:"secondary",icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},66326:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(84626),s=n(7096);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},49946:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},43156:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(68328);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],u={attributes:{...l.Z},supports:{html:!1},save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)},p={attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)};t.Z=[u,p]},38945:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(19416),g=n(87966),b=n(44365),v=n(75873),k=n(66326);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c,canUser:u}=e("core"),p=i(t.clientId),d=s("author"),m=d&&c(d)&&c(d).email,h=s("title"),f=u("create","plugins");return{blockType:n&&n(t.name),canUserInstallPlugins:f,defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:p,hasInnerBlocks:p.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:h,postAuthorEmail:m}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:S,className:j,blockType:x,variations:P,defaultVariation:T,canUserInstallPlugins:A}=e;const{to:N,subject:I,customThankyou:B,customThankyouHeading:M,customThankyouMessage:R,customThankyouRedirect:L,jetpackCRM:Z}=t,[D,F]=(0,r.useState)(!1),O=i()(j,"jetpack-contact-form"),z=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,z(r))})),U=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,z(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||U(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===I&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,I,o,c,n]);const $=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),H=e=>{if(0===e.target.value.length)return F(!1),void n({to:p});const t=e.target.value.split(",").map($).filter(Boolean);t&&t.length&&F(t)},V=e=>{F(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==I?I:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${S}-email-${D&&D.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:H,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${S}-email-error`},(()=>{if(D){if(1===D.length)return D[0]&&D[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
14
  /* translators: placeholder is a number. */
15
  _n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:r,completer:a}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:p=""}=l[i]||{},{className:d}=a,m=l.length>0,h=m?`components-autocomplete-listbox-${r}`:null,f=m?`components-autocomplete-item-${r}-${p}`:null;return(0,o.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,o.createElement)(c.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,o.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,u.map)(l,((e,t)=>(0,o.createElement)(c.Button,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:s()("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,d.compose)([c.withSpokenMessages,d.withInstanceId,c.withFocusOutside])(h)},71341:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(85728);class s extends o.Component{constructor(){super(...arguments),a()(this,"handleClick",(()=>{const{onClick:e}=this.props;e(this)})),a()(this,"getPoint",(()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]}))}componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:a}=this.props,{handleClick:o}=this,s=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,i.bL)(a.current),c=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(s):(c.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(c).setLngLat(s).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+r+'" mask="url(#c)"/></g></svg>'}render(){return null}}s.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=s},53287:function(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:function(){return r}})},43556:function(e,t,n){"use strict";var r=n(69307),a=n(38275),o=n(8909);class i extends r.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:i,points:s,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,o.t)(a.X.styles,n),f=s.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":i,"data-points":JSON.stringify(s),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=i},38275:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});var r=n(69307),a=n(65736),o=n(56932),i=n(45107),s=n(65765),l=n(34140);const __=a.__,_x=a._x,c={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:o,isDefault:!0},{name:"black_and_white",label:__("Black and white","jetpack"),preview:i},{name:"satellite",label:__("Satellite","jetpack"),preview:s},{name:"terrain",label:__("Terrain","jetpack"),preview:l}],validAlignments:["center","wide","full"],markerIcon:(0,r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},24509:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(52175),u=n(94333),p=n(9818),d=n(20085);const __=l.__,m="editor",h="preview";class f extends o.Component{constructor(){super(...arguments),a()(this,"input",null),a()(this,"state",{activePanel:m}),a()(this,"bindInput",(e=>{this.input=e})),a()(this,"updateSource",(e=>this.props.setAttributes({source:e}))),a()(this,"handleKeyDown",(e=>{const{attributes:t,removeBlock:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())})),a()(this,"toggleMode",(e=>()=>this.setState({activePanel:e})))}componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===h&&this.toggleMode(m)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===m&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:r}=this.props,a=s()(r,"components-button components-tab-button",{"is-pressed":n===e});return(0,o.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,o.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:r}=e,{activePanel:a}=this.state;return!n&&this.isEmpty()?(0,o.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,o.createElement)("div",{className:t},(0,o.createElement)(c.BlockControls,null,(0,o.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(m,__("Markdown","jetpack")),this.renderToolbarButton(h,__("Preview","jetpack")))),a!==h&&n?(0,o.createElement)(c.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:r}):(0,o.createElement)(d.Z,{className:`${t}__preview`,source:r}))}}t.Z=(0,u.compose)([(0,p.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,p.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(f)},8173:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(19416),s=n(24509),l=n(15066),c=n(4597),u=n(88938);const __=a.__,_x=a._x,p="markdown",d=__("Try Markdown","jetpack"),m=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,i.Wp)()||(0,i.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",g={title:__("Markdown","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Use regular characters and punctuation to style text, links, and lists.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:h,foreground:(0,c.m)()},category:(0,u.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!0,margin:!0}}},edit:s.Z,save:l.Z,example:{attributes:{source:`## ## ${d}\n\n${m}`}}}},20085:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(29337),i=n.n(o),s=n(52175);const __=a.__,l=new(i()),c=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=null===s.__experimentalGetSpacingClassesAndStyles||void 0===s.__experimentalGetSpacingClassesAndStyles?void 0:(0,s.__experimentalGetSpacingClassesAndStyles)(e);return null!=t&&t.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:a}=e;return(0,r.createElement)(r.RawHTML,{className:t,onClick:c,style:u(a)},n.length?l.render(n):"")}},15066:function(e,t,n){"use strict";var r=n(69307),a=n(20085);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(a.Z,{className:n,source:t.source,attributes:t})}},1686:function(e,t,n){"use strict";n.d(t,{V1:function(){return l},vW:function(){return c},jn:function(){return u},Eo:function(){return p},fL:function(){return d},ez:function(){return f}});var r,a,o,i=n(65736),s=n(92819);const __=i.__,l=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],c=l.map((e=>e.value));const u={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},p=e=>(0,s.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&u]),d=e=>p(e).map((e=>e.name)),m=null!==(r=null===(a=window)||void 0===a||null===(o=a.Jetpack_Editor_Initial_State)||void 0===o?void 0:o.siteLocale)&&void 0!==r?r:"en-US",h=!(0,s.isEmpty)(m)&&c.includes(m)?m:"en-US",f={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:d()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:h,type:"string",validValues:c},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},21531:function(e,t,n){"use strict";var r=n(69307),a=n(1686);t.Z={attributes:a.ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},36875:function(e,t,n){"use strict";var r=n(69307),a=n(1686);t.Z={attributes:a.ez,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},14530:function(e,t,n){"use strict";var r=n(69307),a=(n(86841),n(89105)),o=n.n(a),i=n(92819),s=n(19416),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(64647),m=n(37571),h=n(28112),f=n(1686),g=n(56213),b=n(8909),v=n(49554);const __=u.__;t.Z=(0,c.withNotices)((function(e){let{attributes:t,className:n,clientId:a,isSelected:k,name:y,noticeOperations:E,noticeUI:w,setAttributes:_}=e;const C=(0,p.getBlockDefaultClassName)(y),S=(0,g.S)(f.ez,t);(0,i.isEqual)(S,t)||_(S);const{align:j,rid:x,iframe:P,domain:T,lang:A,newtab:N,negativeMargin:I}=t,B=(0,i.isEmpty)(x),M=(0,b.t)((0,f.Eo)(),t.className),R=(0,b.t)((0,f.Eo)(x),t.className),L=(0,h.Z)(R),Z=(0,i.isEqual)(x,["1"]);(0,r.useEffect)((()=>{if(E.removeAllNotices(),!B&&!Z&&"wide"===R&&"wide"!==j&&"full"!==j){const e=(0,r.createElement)(r.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));E.createNotice({status:"warning",content:e})}}),[Z,j,B,x,R]),(0,r.useEffect)((()=>{"button"===M&&Array.isArray(x)&&x.length>1&&_({className:"",style:""})}),[x,M,_]),(0,r.useEffect)((()=>{k&&(Array.isArray(x)&&x.length>1?(0,p.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,p.registerBlockStyle)("jetpack/opentable",f.jn))}),[k,x]),(0,r.useEffect)((()=>{"wide"===L&&"wide"===j&&_({align:""}),"wide"===R&&L&&R!==L&&_({align:"wide"}),_({style:R})}),[R]);const D=(0,f.fL)(x),F=e=>x.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?_({rid:e,style:e.length>1&&"button"===R?"standard":R}):(e=>{const t=(0,v.CC)(e);t||(E.removeAllNotices(),E.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,g.S)(f.ez,t);_(n),E.removeAllNotices()})(e)},z=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorAdvancedControls,null,(0,r.createElement)(c.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>_({iframe:!P}),className:"is-opentable"}),"button"===R&&(0,r.createElement)(c.ToggleControl,{label:__("Remove button margin","jetpack"),checked:I,onChange:()=>_({negativeMargin:!I})})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(m.Z,{rids:x,onChange:O}),(0,r.createElement)(c.SelectControl,{label:__("Language","jetpack"),value:A,onChange:e=>_({lang:e}),options:f.V1}),(0,r.createElement)(c.ToggleControl,{label:__("Open in a new window","jetpack"),checked:N,onChange:()=>_({newtab:!N})})))),U=(0,s.Wp)()||(0,s.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",$=(0,r.createElement)(c.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:d.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:w},(0,r.createElement)(m.Z,{rids:x,onSubmit:O}),(0,r.createElement)("div",{className:`${C}-placeholder-links`},(0,r.createElement)(c.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(c.ExternalLink,{href:U},__("Learn more","jetpack")))),H=o()(n,{[`is-style-${R}`]:!B&&D.includes(R)&&-1===n.indexOf("is-style"),"is-placeholder":B,"is-multi":"multi"===F(R)[0],[`align${j}`]:j,"has-no-margin":I});return(0,r.createElement)(r.Fragment,null,w,(0,r.createElement)("div",{className:H},!B&&z,B?$:(e=>{const[t,n]=F(e||R);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${C}-overlay`}),(0,r.createElement)("iframe",{title:(0,u.sprintf)(
16
  /* translators: Placeholder is a unique ID. */
17
+ __("Open Table Preview %s","jetpack"),a),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,i.join)(x,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${T}&lang=${A&&f.vW.includes(A)?A:"en-US"}&newtab=${N}&disablega=true`}))})()))}))},64647:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},96152:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(4981),i=n(1686),s=n(21531),l=n(36875),c=n(14530),u=n(64647),p=n(49554),d=n(4597);n(38817);const __=a.__,_x=a._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:u.Z,foreground:(0,d.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:c.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.ez,styles:(0,i.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[s.Z,l.Z]}},37571:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(80236),a=n.n(r),o=n(69307),i=n(92819),s=n(55609),l=n(65736),c=n(93274);const __=l.__,_n=l._n;function u(e){const[t,n]=(0,o.useState)(""),r=(0,c.Z)(t,20),[l,u]=(0,o.useState)(e.rids||[]),p=/^(\d+)$|\(\#(\d+)\)$/,d=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),m=(0,o.createElement)(s.FormTokenField,a()({value:l,suggestions:d,saveTransform:e=>c.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:20,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=p.exec(e);return t[1]||t[2]}));u(n),e.onChange&&e.onChange(n)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,i.isEmpty)(l)?t:l)}},m,(0,o.createElement)(s.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):m)}},28112:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},93274:function(e,t,n){"use strict";n.d(t,{$:function(){return o},Z:function(){return i}});var r=n(92819),a=n(69307);const o=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,a.useState)([]),s=(0,a.useCallback)((0,r.throttle)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>i((0,r.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,a.useEffect)((()=>{(0,r.isEmpty)(e)||o.test(e)||s(e)}),[e]),n}},49554:function(e,t,n){"use strict";n.d(t,{tC:function(){return a},pU:function(){return o},CC:function(){return i}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const i=n.get("domain");i&&(o.domain=i);const s=n.get("iframe");s&&(o.iframe=s);const l=n.get("lang");l&&(o.lang=l);const c=n.get("newtab");return c&&(o.newtab=c),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},12604:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(92819),o=n(65736),i=n(4981),s=n(9818),l=n(52175),c=n(93010);const __=o.__;function u(e){let{name:t,clientId:n}=e;const{blockType:o,hasInnerBlocks:u}=(0,s.useSelect)((e=>{var r;const{getBlocks:a}=e(l.store);return{blockType:(0,i.getBlockType)(t),hasInnerBlocks:(null===(r=a(n))||void 0===r?void 0:r.length)>0}})),{replaceBlock:p,selectBlock:d}=(0,s.useDispatch)(l.store),m=e=>{p(n,(0,i.createBlock)(e.name)),d(n)},h=c.Z.filter((e=>(0,i.getBlockType)(e.name)));(0,r.useEffect)((()=>{u||i.registerBlockVariation||m(h[0])}));return!u&&i.registerBlockVariation?(0,r.createElement)(l.__experimentalBlockVariationPicker,{icon:(0,a.get)(o,["icon","src"]),label:(0,a.get)(o,["title"]),instructions:__("Please select which kind of payment you'd like to add.","jetpack"),variations:h,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h[0];m(e)}}):(0,r.createElement)(l.InnerBlocks,null)}},7603:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(72142),s=n(12604),l=n(4597),c=n(79),u=n(55277),p=n(24993);const __=a.__,_x=a._x,d="payments-intro",m={title:__("Payments","jetpack"),description:__("Sell products and services or receive donations on your website","jetpack"),icon:{src:i.Z,foreground:(0,l.m)()},category:"earn",keywords:[...new Set([c.Xd.title,...c.Xd.keywords,u.Xd.title,...u.Xd.keywords,p.X.title,...p.X.keywords,_x("paid","block search term","jetpack"),_x("pay","block search term","jetpack"),_x("money","block search term","jetpack"),_x("checkout","block search term","jetpack")])],supports:{alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:s.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null)}},93010:function(e,t,n){"use strict";var r=n(24993),a=n(79),o=n(55277);const i=[[a.u2,a.Xd],[o.u2,o.Xd],[r.u,r.X]].map((e=>{var t;let[n,r]=e;return{name:n.includes("/")?n:"jetpack/"+n,title:r.title,description:r.description,icon:null!==(t=r.icon.src)&&void 0!==t?t:r.icon}}));t.Z=i},10815:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(62215);const __=a.__,_x=a._x;function s(e){let{className:t,onSubmit:n,noticeUI:a,url:s,setUrl:l}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:a},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:s,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>l(e.target.value)}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))))}},44641:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981);const __=a.__,_x=a._x;function s(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(o.Button,{variant:"link",onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,i.createBlock)("core/paragraph",{content:(0,r.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},24184:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},85474:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},71197:function(e,t,n){"use strict";var r=n(69307),a=n(86247);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:o}=t;return(0,a.t)(o)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},23457:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(52175),i=n(86247),s=n(85474),l=n(24184),c=n(10815),u=n(44641),p=n(66777);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:d,noticeOperations:m,noticeUI:h,setAttributes:f,onReplace:g}=e;const{url:b}=t,{isFetching:v,pinterestUrl:k,testUrl:y,hasTestUrlError:E}=(0,p.Z)(),[w,_]=(0,r.useState)(!1),[C,S]=(0,r.useState)(""),[j,x]=(0,r.useState)(!1),P=(0,r.useCallback)((()=>(0,r.createElement)(u.Z,{fallbackUrl:C,onClick:g})),[E]),T=()=>{v||(y(C),x(!1))},A=()=>{_(!0)};if((0,r.useEffect)((()=>{b&&y(b)}),[]),(0,r.useEffect)((()=>{!n&&w&&_(!1)}),[n,w]),(0,r.useEffect)((()=>{f({url:k}),m.removeAllNotices(),k&&S(k),E&&m.createErrorNotice(P())}),[k,E,f,P]),v)return(0,r.createElement)(l.Z,null);const N=(0,i.t)(b);if(j||!b||b&&!N)return(0,r.createElement)(c.Z,{className:d,onSubmit:T,noticeUI:h,url:C,setUrl:S});const I=`<a data-pin-do='${N}' href='${b}'></a>`;return(0,r.createElement)("div",{className:d},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.C,{setEditingState:x})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:I,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:A}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:A})))}))},66777:function(e,t,n){"use strict";var r=n(69307),a=n(95359),o=n(62215);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==o.a0&&(n(!0),(0,a.Z)(i).then((e=>{n(!1),s(e),c(!1)})).catch((()=>{n(!1),s(i||void 0),c(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:s}}},62215:function(e,t,n){"use strict";n.d(t,{Wh:function(){return p},a0:function(){return d},u2:function(){return m},qv:function(){return f},Xd:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(23457),l=n(23745),c=n(4597),u=n(71197);const __=a.__,_x=a._x,p=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,d="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),g={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:f,foreground:(0,c.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:s.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.test(e.textContent),transform:e=>(0,i.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:d}},deprecated:[u.Z]}},23745:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},86247:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(96483),a=n(62215);function o(e){if(!a.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},90266:function(e,t,n){"use strict";n.d(t,{G:function(){return s},q:function(){return l}});var r=n(61993),a=n(86989),o=n.n(a),i=n(96483);const s=async()=>await o()({path:"/wpcom/v2/podcast-player/track-quantity"}),l=async e=>{let t,n,a,{url:s,guids:l=[],fetchEpisodeOptions:c=!1}=e;try{t=await o()({path:(0,i.addQueryArgs)("/wpcom/v2/podcast-player",{url:s,guids:l,"episode-options":c})})}catch(e){n=e}if(t)return{type:r.u,data:t};try{a=await o()({path:(0,i.addQueryArgs)("/oembed/1.0/proxy",{url:s})})}catch(e){}const u='<a href="'+s+'">'+s+"</a>";if(a&&a.html!==u)return{type:r.b};throw n}},74134:function(e,t,n){"use strict";var r=n(96483),a=n(44520);t.Z={url:{type:"string",validator:r.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},45187:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(88645);const s=(0,r.memo)((e=>{let{playerId:t,title:n,cover:a,link:o,track:i,children:s,showEpisodeTitle:c,showCoverArt:u,showEpisodeDescription:p,colors:d}=e;return u||c||p?(0,r.createElement)("div",{className:"jetpack-podcast-player__header"},(0,r.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,r.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,r.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),c&&!!(n||i&&i.title)&&(0,r.createElement)(l,{playerId:t,title:n,link:o,track:i,colors:d})),!!(p&&i&&i.description)&&(0,r.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},i.description),s):s})),l=(0,r.memo)((e=>{let{playerId:t,title:n,link:a,track:s,colors:l={primary:{name:null,custom:null,classes:""}}}=e;return(0,r.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!s||!s.title)&&(0,r.createElement)("span",{className:o()("jetpack-podcast-player__current-track-title",l.primary.classes),style:{color:l.primary.custom}},s.title,(0,r.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:s.link||s.src,target:"_blank",rel:"noopener noreferrer nofollow"},i.Z)),!!(s&&s.title&&n)&&(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&(0,r.createElement)(c,{title:n,link:a,colors:l}))})),c=(0,r.memo)((e=>{let{title:t,link:n}=e;return(0,r.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})}));t.Z=s},92674:function(e,t,n){"use strict";var r=n(69307),a=n(22890),o=n(11915);const i=(0,r.memo)((e=>{let{playerId:t,tracks:n,selectTrack:i,currentTrack:s,playerState:l,colors:c}=e;return(0,r.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},n.map(((e,t)=>{const n=s===t;return(0,r.createElement)(o.Z,{key:e.id,index:t,track:e,selectTrack:i,isActive:n,isPlaying:n&&l===a.Wp,isError:n&&l===a.Vy,colors:c})})))}));t.Z=i},11696:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(25158),u=n(94333),p=n(9818),d=n(22890),m=n(75791),h=n(92674),f=n(45187),g=n(81338),b=n(14983);const __=l.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{currentTrack:0,hasUserInteraction:!1}),a()(this,"recordUserInteraction",(()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})})),a()(this,"selectTrack",(e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)})),a()(this,"loadTrack",(e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:n,link:r,description:a}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:n,link:r}),(0,c.speak)(
18
  /* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
19
  `${(0,l.sprintf)(__("Loading: %s","jetpack"),n)} ${a}`,"assertive"),!0})),a()(this,"loadAndPlay",(e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)})),a()(this,"getTrack",(e=>this.props.tracks[e])),a()(this,"handleError",(e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,c.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")})),a()(this,"handlePlay",(()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})})),a()(this,"handlePause",(()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.Vy&&this.props.pauseMediaSource(this.props.playerId)})),a()(this,"handleTimeChange",(e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)})),a()(this,"handleJump",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)})),a()(this,"handleSkip",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)})),a()(this,"updateMediaData",(e=>{var t,n;this.props.updateMediaSourceData(this.props.playerId,{duration:null===(t=e.target)||void 0===t?void 0:t.duration,domId:null===(n=e.target)||void 0===n?void 0:n.id})}))}registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>null!=e&&e.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:r,tracks:a,attributes:i,currentTime:c,playerState:u}=this.props,{itemsToShow:p,primaryColor:d,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,T=a.slice(0,p),A=this.getTrack(P),N=(0,g.Aq)({primaryColor:d,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:w,customBackgroundColor:_}),I={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":C},B=s()("jetpack-podcast-player",u,N.secondary.classes,N.background.classes);return(0,o.createElement)("section",{className:B,style:I,"aria-labelledby":t||A&&A.title?`${e}__title`:void 0,"aria-describedby":A&&A.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,o.createElement)(f.Z,{playerId:e,title:t,link:n,cover:r,track:this.getTrack(P),showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x,colors:N},(0,o.createElement)(m.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:u,currentTime:c,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),T.length>1&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(// translators: %s is the track title.
20
  __("Playlist: %s","jetpack"),t)),(0,o.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,o.createElement)(h.Z,{playerId:e,playerState:u,currentTrack:P,tracks:T,selectTrack:this.selectTrack,colors:N})))}}v.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,u.compose)([b.Z,(0,p.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(d.tT);return{currentTime:r(n),playerState:a(n)}})),(0,p.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(d.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(v)},74347:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=(0,r.memo)((e=>{let{link:t,title:n,colors:o}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:o.secondary.classes,style:{color:o.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,a.sprintf)(
29
  /* translators: This needs to be a single word with no spaces. It describes
30
  the current item in the group. A screen reader will announce it as "[title],
31
  current track". */
32
+ b=n?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:f,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),u(p))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),u(p))}},(0,r.createElement)(s.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:i}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&i&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:d}))}));t.Z=u},14983:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(94502),a=n.n(r),o=n(69307),i=n(65736);const __=i.__;function s(e){class t extends o.Component{constructor(){super(...arguments),a()(this,"state",{didError:!1,isIE11AudioIssue:!1}),a()(this,"componentDidCatch",((e,t)=>{this.props.onError(e,t)}))}render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,o.createElement)("section",{className:"jetpack-podcast-player"},(0,o.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,o.createElement)(e,this.props)}}return a()(t,"getDerivedStateFromError",(e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}))),t.defaultProps={onError:()=>{}},t}},61993:function(e,t,n){"use strict";n.d(t,{u:function(){return r},b:function(){return a}});const r="podcast-feed",a="embed-block"},9656:function(e,t,n){"use strict";var r=n(96483),a=n(44520);const o={url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},74699:function(e,t,n){"use strict";var r=n(69307),a=n(64473),o=n.n(a),i=n(92819),s=n(19416),l=n(55609),c=n(94333),u=n(65736),p=n(52175),d=n(9818),m=n(4981),h=n(96483),f=n(56213),g=n(822),b=n(74134),v=n(11696),k=n(81338),y=n(90266),E=n(79777),w=n(60001),_=n(61993),C=n(85728);const __=u.__,S=o()("jetpack:podcast-player:edit"),j=(0,s.Wp)()||(0,s.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/";t.Z=(0,c.compose)([(0,d.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,m.createBlock)("core/embed",{url:r.url}))}}})),(0,p.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),l.withNotices,c.withInstanceId,w.K])((e=>{var t,n;let{instanceId:a,className:o,attributes:s,setAttributes:c,noticeOperations:{createErrorNotice:u,removeAllNotices:d},noticeUI:m,primaryColor:w,setPrimaryColor:x,secondaryColor:P,setSecondaryColor:T,fallbackTextColor:A,backgroundColor:N,setBackgroundColor:I,fallbackBackgroundColor:B,isSelected:M,replaceWithEmbedBlock:R}=e;const L=(0,f.S)(b.Z,s),{url:Z,selectedEpisodes:D,itemsToShow:F,showCoverArt:O,showEpisodeTitle:z,showEpisodeDescription:U,exampleFeedData:$}=L,H=`jetpack-podcast-player-block-${a}`,[V,G]=(0,r.useState)(!1),[q,W]=(0,r.useState)(10),K=(0,r.useRef)(),[{selectedGuid:X,checkUrl:J,...Y},Q]=(0,r.useReducer)(E.J,{editedUrl:Z||"",isEditing:!Z&&!$,isLoading:!1,feedData:$||{},isInteractive:!1,selectedGuid:null==D||null===(t=D[0])||void 0===t?void 0:t.guid,checkUrl:Z||""}),ee=(0,r.useMemo)((()=>(0,i.debounce)((e=>{var t;Q({type:E.N.START_FETCH}),null===(t=K.current)||void 0===t||t.cancel(),K.current=(0,k.W4)((0,y.q)({...e,fetchEpisodeOptions:!0})),K.current.promise.then((t=>{if(d(),null!=t&&t.isCanceled)S("Block was unmounted during fetch",t);else switch(null==t?void 0:t.type){case _.u:return c({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Q({type:E.N.FEED_RECEIVED,payload:t.data});case _.b:return R()}}),(e=>{null!=e&&e.isCanceled?S("Block was unmounted during fetch",e):(S("feed error",e),d(),u(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Q({type:E.N.START_EDITING}))}))}),300)),[R,c,u,d]);(0,r.useEffect)((()=>()=>{var e,t;null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}),[]);const te=(0,r.useCallback)((e=>{null===e||V||((0,C.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),G(!0))}),[V]);(0,r.useEffect)((()=>{if(""!==J)return ee({url:J,guids:X?[X]:[]}),()=>{var e,t;return null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}),[ee,J,X]),(0,r.useEffect)((()=>{(0,y.G)().then((e=>{W(e)}))}),[]),(0,r.useEffect)((()=>{X&&1!==F&&c({itemsToShow:1})}),[X,F,c]),(0,r.useEffect)((()=>{!M&&Y.isInteractive&&Q({type:E.N.PREVENT_INTERACTIONS})}),[M,Y.isInteractive]);const ne=e=>{if(e.preventDefault(),""===Y.editedUrl)return;const t=(0,h.prependHTTP)(Y.editedUrl);if((0,h.isURL)(t)){var n;if(t===J)Q({type:E.N.CLEAR_FEED}),ee({url:J,guids:null!==(n=D[0])&&void 0!==n&&n.guid?[D[0].guid]:[]});else Q({type:E.N.CHECK_URL,payload:t});Q({type:E.N.FINISH_EDITING,payload:t})}else u(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(Y.isEditing)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,r.createElement)("form",{onSubmit:ne},m,(0,r.createElement)(l.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:Y.editedUrl,className:"components-placeholder__input",onChange:e=>Q({type:E.N.EDIT_URL,payload:e})}),(0,r.createElement)(l.Button,{variant:"primary",type:"submit"},__("Embed","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(l.ExternalLink,{href:j},__("Learn more about embeds","jetpack"))));if(null===(n=Y.feedData.tracks)||void 0===n||!n.length)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,r.createElement)(l.Spinner,null));const re=(e,t)=>n=>{c({[e]:n}),t(n)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.BlockControls,null,(0,r.createElement)(l.ToolbarGroup,null,(0,r.createElement)(l.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Q({type:E.N.START_EDITING})},__("Replace","jetpack")))),(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(l.PanelBody,{title:__("Podcast settings","jetpack")},(l.ComboboxControl||0===D.length)&&(0,r.createElement)(l.RangeControl,{label:__("Number of items","jetpack"),value:F,onChange:e=>c({itemsToShow:X?1:e}),min:1,max:q,required:!0,disabled:!!X}),l.ComboboxControl&&(0,r.createElement)(l.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:X,onChange:e=>Q({type:E.N.SELECT_EPISODE,payload:e}),options:Y.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:i.noop}),(0,r.createElement)(l.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:O,onChange:e=>c({showCoverArt:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>c({showEpisodeTitle:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:U,onChange:e=>c({showEpisodeDescription:e})})),(0,r.createElement)(p.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:w.color,onChange:re("hexPrimaryColor",x),label:__("Primary Color","jetpack")},{value:P.color,onChange:re("hexSecondaryColor",T),label:__("Secondary Color","jetpack")},{value:N.color,onChange:re("hexBackgroundColor",I),label:__("Background Color","jetpack")}]},(0,r.createElement)(p.ContrastChecker,{isLargeText:!1,textColor:P.color,backgroundColor:N.color,fallbackBackgroundColor:B,fallbackTextColor:A}))),(0,r.createElement)("div",{id:H,className:o,ref:te},(0,r.createElement)(v.Z,{playerId:H,attributes:L,tracks:Y.feedData.tracks,cover:Y.feedData.cover,title:Y.feedData.title,link:Y.feedData.link}),!Y.isInteractive&&!Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Q({type:E.N.MAKE_INTERACTIVE})}),Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,r.createElement)(l.Spinner,null))))}))},822:function(e,t,n){"use strict";n.d(t,{E:function(){return r.Z}});var r=n(3182)},88645:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.Z=o},3182:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,null,(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,null),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,r.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},54951:function(e,t,n){"use strict";n.r(t),n.d(t,{playing:function(){return i},error:function(){return s}});var r=n(69307),a=n(55609);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},i=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),s=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},22755:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(65736),a=n(74134),o=n(9656),i=n(74699),s=n(56388),l=n(822),c=n(4597);const __=r.__,_x=r._x,u="podcast-player",p={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:l.E,foreground:(0,c.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:["wide","full"],spacing:{padding:!0,margin:!0},anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:i.Z,save:s.Z,attributes:a.Z,example:{attributes:{customPrimaryColor:(0,c.m)(),hexPrimaryColor:(0,c.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[o.Z]}},56388:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;if(n&&""!==n)return(0,r.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:n},n)}},79777:function(e,t,n){"use strict";n.d(t,{N:function(){return r},J:function(){return a}});const r={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case r.EDIT_URL:return{...e,editedUrl:t.payload};case r.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case r.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case r.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case r.CLEAR_FEED:return{...e,feedData:{}};case r.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case r.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case r.START_FETCH:return{...e,isLoading:!0};case r.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case r.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},81338:function(e,t,n){"use strict";n.d(t,{Gd:function(){return i},W4:function(){return s},Aq:function(){return l}});var r=n(89105),a=n.n(r),o=n(92819);function i(e,t){if(e&&t)return`has-${t}-${e}`}function s(e){let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const l=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:n,secondaryColor:r,customSecondaryColor:o,backgroundColor:s,customBackgroundColor:l}=e;const c=i("color",t),u=i("color",r),p=i("background-color",s);return{primary:{name:t,custom:n,classes:a()({"has-primary":c||n,[c]:c})},secondary:{name:r,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:s,custom:l,classes:a()({"has-background":p||l,[p]:p})}}}),(e=>Object.values(e).join()))},33241:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"premium-content-wrapper"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},85146:function(e,t,n){"use strict";var r=n(69307);const a={selectedTab:{id:"",className:"",label:(0,r.createElement)(r.Fragment,null)},stripeNudge:null},o=(0,r.createContext)(a);t.Z=o},4816:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.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"}),(0,r.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},95702:function(e,t,n){"use strict";n.d(t,{Wp:function(){return i},H2:function(){return s},ch:function(){return l}});var r=n(9818),a=n(4981),o=n(24993);const i=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(i),s=e=>{const{getBlocksByClientId:t,getBlockParents:n}=(0,r.select)("core/block-editor");return!!t(n(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))};function l(){return(0,r.useSelect)((e=>e(a.store).getBlockTypes()),[]).reduce(((e,t)=>(t.name!==o.u&&e.push(t.name),e)),[])}},57387:function(e,t,n){"use strict";var r=n(69307),a=n(72067),o=n(9818),i=n(65736),s=n(48617),l=n(24993);const __=i.__;function c(){const e=(0,o.select)("core/block-editor").getSelectedBlock();(0,o.dispatch)("core/block-editor").replaceBlock(e.clientId,(0,s.e)(e.innerBlocks))}t.Z=()=>(0,r.createElement)(a.PluginBlockSettingsMenuItem,{allowedBlocks:[l.u],label:__("Remove block and keep content","jetpack"),onClick:c})},48617:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(4981);const a=e=>{const t=e.find((e=>"premium-content/subscriber-view"===e.name));return 1===t.innerBlocks.length&&"core/group"===t.innerBlocks[0].name?t.innerBlocks[0]:(0,r.createBlock)("core/group",{},t.innerBlocks)}},6016:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(55609);function i(e){const{options:t,selectedOption:n,selectAction:i,contractViewport:s,label:l}=e,c=e=>e.id===n.id;return s?(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ToolbarDropdownMenu,{label:l,icon:"arrow-down",text:n.label},(e=>{let{onClose:n}=e;return(0,r.createElement)(o.MenuGroup,null,t.map((e=>{const t=c(e);return(0,r.createElement)(o.MenuItem,{isSelected:t,icon:t?"yes":void 0,onClick:()=>{i(e),n()},key:`jetpack-premium-content-tab-${e.id}`},e.label)})))}))):(0,r.createElement)(a.BlockControls,{group:"other"},t.map((e=>{const t=c(e);return(0,r.createElement)(o.ToolbarButton,{onClick:()=>{i(e)},className:"components-tab-button",isPressed:t,key:`jetpack-premium-content-tab-${e.id}`},(0,r.createElement)("span",null,e.label))})))}},45484:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(94333),i=n(9818),s=n(65736),l=n(92694);const __=s.__,c=["core/button","jetpack/recurring-payments","premium-content/login-button"];t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,i.withDispatch)(((e,t)=>({setSubscribeButtonPlan(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}})))])((function(e){let{context:t,subscribeButton:n,setSubscribeButtonPlan:o}=e;const i=t?t["premium-content/planId"]:null,s=!!t&&t["premium-content/isPreview"],u=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:i},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}]]],["premium-content/login-button"]];(0,r.useEffect)((()=>{i&&n&&n.attributes.planId!==i&&o(i)}),[i,n,o]),(0,r.useEffect)((()=>{n&&(0,l.addFilter)("jetpack.RecurringPayments.showControls","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t!==n.clientId&&e))}),[n]);const d=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,r.createElement)("div",d,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:c,template:s?u:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},68440:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(87373),i=n(52175),s=n(45484),l=n(55891);const __=a.__,c="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:o.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:s.Z,save:l.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-buttons"},(0,r.createElement)(i.InnerBlocks.Content,null))}]}},55891:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},84669:function(e,t,n){"use strict";var r=n(67559);t.Z={isEligible:(e,t)=>{var n;if("premium-content/logged-out-view"===(null==t||null===(n=t[0])||void 0===n?void 0:n.name))return!0},migrate:(e,t)=>[e,[t[1],t[0]]],save:r.Z}},79907:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(80236),a=n.n(r),o=n(69307),i=n(55609),s=n(65736),l=n(94333),c=n(9818),u=n(52175),p=n(33241),d=n(85146),m=n(6016),h=n(39426),f=n(93923),g=n(54554);const __=s.__,b=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Guest View","jetpack")),className:"wp-premium-content-logged-out-view"}];function v(e){const[t,n]=(0,o.useState)(b[1]),{isPreview:r,selectedPlanId:a}=e.attributes,{clientId:s,isSelected:v,className:k,setAttributes:y}=e,{isApiLoading:E,selectedBlock:w}=(0,c.useSelect)((e=>({selectedBlock:e(u.store).getSelectedBlock(),isApiLoading:e(g.h).isApiStateLoading()})));(0,o.useEffect)((()=>{if(v)return;if(!w)return;const e=(0,c.select)(u.store);e.getBlockParents(w.clientId).includes(s)&&("premium-content/logged-out-view"===w.name||e.getBlockParentsByBlockName(w.clientId,"premium-content/logged-out-view").length?n(b[1]):n(b[0]))}),[s,v,w]);const _=(0,l.useViewportMatch)("medium","<");return(0,o.createElement)("div",{className:k},!r&&(0,o.createElement)(o.Fragment,null,E&&(0,o.createElement)(i.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(i.Spinner,null)),(0,o.createElement)(h.Z,{allowCreateOneTimeInterval:!1,blockName:"premium-content",productType:f.DM,selectedProductId:a,setSelectedProductId:e=>y({selectedPlanId:e})}),(0,o.createElement)(m.Z,{options:b,selectedOption:t,selectAction:n,contractViewport:_,label:__("Change view","jetpack")})),!E&&(0,o.createElement)(d.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(p.Z,null)))}function k(e){return(0,o.createElement)(i.Disabled.Consumer,null,(t=>{var n;return(0,o.createElement)(v,a()({},e,{attributes:{...e.attributes,isPreview:t||(null===(n=e.attributes)||void 0===n?void 0:n.isPreview)}}))}))}},24993:function(e,t,n){"use strict";n.d(t,{u:function(){return m},X:function(){return h}});var r=n(65736),a=n(4981),o=n(79907),i=n(67559),s=n(84669),l=n(4816),c=n(95702),u=n(48617);const __=r.__,_x=r._x,p=["core/nextpage","core/spacer","core/separator","core/more","core/loginout","core/post-navigation-link"],d=e=>{if(e.some(c.Wp))return!1;if((0,c.H2)(e[0]))return!1;return!e.every((e=>p.includes(e.name)))},m="premium-content/container",h={title:__("Premium Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:l.Z,category:"grow",keywords:[_x("buy","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("exclusive","block search term","jetpack"),_x("gated","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("paywall","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("repeat","block search term","jetpack"),_x("signin","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("support","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo","stripe","substack"],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:o.Z,save:i.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||d(t)),__experimentalConvert(e){if(!d(e))return;const t=e.map((e=>(0,a.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,a.createBlock)("premium-content/container",{},[(0,a.createBlock)("premium-content/subscriber-view",{},t),(0,a.createBlock)("premium-content/logged-out-view")])}}],to:[{type:"block",blocks:["core/group"],transform:(e,t)=>(0,u.e)(t)}]},deprecated:[s.Z]}},71618:function(e,t,n){"use strict";var r=n(22508),a=n(2559);t.Z=[r.Z,a.Z]},22508:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(52175);t.Z={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:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let n=0;n<t.length;n++)if(t[n].name&&"premium-content/buttons"===t[n].name)return[e,[...t]];const n=(0,a.createBlock)("premium-content/buttons",{},[(0,a.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,a.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,n]]},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,r.createElement)(o.InnerBlocks.Content,null))}},2559:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},84443:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(65736),i=n(85146),s=n(95702);const __=o.__;function l(){const e=(0,s.ch)();return(0,r.createElement)(i.Z.Consumer,null,(t=>{let{selectedTab:n,stripeNudge:o}=t;return(0,r.createElement)("div",{hidden:"premium"===n.id,className:n.className},o,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:e,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}},61428:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(84443),a=n(36195),o=n(71618),i=n(4816),s=n(94333),l=n(9818),c=n(65736),u=n(72629);const __=c.__,p="premium-content/logged-out-view",d={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:i.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:r.Z,save:a.Z,deprecated:o.Z},m=(0,l.subscribe)((()=>{const e=(0,l.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,u.unregisterFormatType)("core/link");const t=(0,s.compose)((0,l.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,s.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==p)))(e.edit);(0,u.registerFormatType)("core/link",{...e,edit:t})}))},36195:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},63487:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},79179:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(9818),s=n(52175);const __=o.__,l="web"===r.Platform.OS;const c=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,c),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function u(e){let{settings:t,clientId:n,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:i}=window,[c,u]=(0,r.useState)(),[p,d]=(0,r.useState)(),m=l?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,r.useEffect)((()=>{if(l&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(n);if(!e)return;d(o(e).color);let t=e,r=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===i.ELEMENT_NODE;)t=t.parentNode,r=o(t).backgroundColor;u(r)})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:m,initialOpen:!1,settings:t},l&&a&&(0,r.createElement)(s.ContrastChecker,{backgroundColor:c,textColor:p})))}t.Z=function(e){var t,n,a;const{attributes:o}=e,{colors:l,gradients:p}=(0,i.useSelect)((e=>e("core/block-editor").getSettings()),[]),d=(0,r.useRef)(o);(0,r.useEffect)((()=>{d.current=o}),[o]);const{style:m,textColor:h,backgroundColor:f,gradient:g}=o;let b;var v;b=g?(0,s.getGradientValueBySlug)(p,g):null==m||null===(v=m.color)||void 0===v?void 0:v.gradient;const k=t=>n=>{var r,a;const o=(0,s.getColorObjectByColorValue)(l,n),i=t+"Color",u={...d.current.style,color:{...null===(r=d.current)||void 0===r||null===(a=r.style)||void 0===a?void 0:a.color,[t]:null!=o&&o.slug?void 0:n}},p=null!=o&&o.slug?o.slug:void 0,m={style:c(u),[i]:p};e.setAttributes(m),d.current={...d.current,...m}};return(0,r.createElement)(u,{enableContrastChecking:!(g||null!=m&&null!==(t=m.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:k("text"),colorValue:(0,s.getColorObjectByAttributeValues)(l,h,null==m||null===(n=m.color)||void 0===n?void 0:n.text).color},{label:__("Background Color","jetpack"),onColorChange:k("background"),colorValue:(0,s.getColorObjectByAttributeValues)(l,f,null==m||null===(a=m.color)||void 0===a?void 0:a.background).color,gradientValue:b,onGradientChange:t=>{const n=(0,s.getGradientSlugByValue)(p,t);let r;if(n){var a,o,i;const e={...null===(a=d.current)||void 0===a?void 0:a.style,color:{...null===(o=d.current)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.color,gradient:void 0}};r={style:c(e),gradient:n}}else{var l,u,m;const e={...null===(l=d.current)||void 0===l?void 0:l.style,color:{...null===(u=d.current)||void 0===u||null===(m=u.style)||void 0===m?void 0:m.color,gradient:t}};r={style:c(e),gradient:void 0}}e.setAttributes(r),d.current={...d.current,...r}}}]})}},12923:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(89105),a=n.n(r),o=n(52175);function i(e){var t,n,r,i,s,l,c,u,p,d;const{backgroundColor:m,textColor:h,gradient:f,style:g}=e,b=(0,o.getColorClassName)("background-color",m),v=(0,o.__experimentalGetGradientClass)(f),k=(0,o.getColorClassName)("color",h),y=a()(k,v,{[b]:!(null!=g&&null!==(t=g.color)&&void 0!==t&&t.gradient||!b),"has-text-color":h||(null==g||null===(n=g.color)||void 0===n?void 0:n.text),"has-background":m||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(i=g.color)||void 0===i?void 0:i.gradient)});return{className:y||void 0,style:null!=g&&null!==(s=g.color)&&void 0!==s&&s.background||null!=g&&null!==(l=g.color)&&void 0!==l&&l.text||null!=g&&null!==(c=g.color)&&void 0!==c&&c.gradient?{background:null!=g&&null!==(u=g.color)&&void 0!==u&&u.gradient?g.color.gradient:void 0,backgroundColor:null!=g&&null!==(p=g.color)&&void 0!==p&&p.background?g.color.background:void 0,color:null!=g&&null!==(d=g.color)&&void 0!==d&&d.text?g.color.text:void 0}:{}}}},12111:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(65736),l=n(12923);const __=s.__;t.Z={attributes:{text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:n,text:a}=t,s=(0,l.Z)(t),c=o()("wp-block-button__link",s.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...s.style};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:c,style:u,value:a}))}}},29405:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(79179),u=n(12923);const __=i.__;function p(e){let{borderRadius:t="",setAttributes:n}=e;const a=(0,r.useCallback)((e=>{n({borderRadius:e})}),[n]);return(0,r.createElement)(s.PanelBody,{title:__("Border settings","jetpack")},(0,r.createElement)(s.RangeControl,{value:t,label:__("Border radius","jetpack"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:a}))}t.Z=function(e){const{attributes:t,setAttributes:n,className:a}=e,{borderRadius:i,text:s}=t,d=(0,u.Z)(t),m=(0,l.useBlockProps)({className:"wp-block-button"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",m,(0,r.createElement)(l.RichText,{placeholder:__("Add text…","jetpack"),value:s,onChange:e=>n({text:e}),withoutInteractiveFormatting:!0,className:o()(a,"wp-block-button__link",d.className,{"no-border-radius":0===i}),style:{borderRadius:i?i+"px":void 0,...d.style}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.Z,e),(0,r.createElement)(p,{borderRadius:i,setAttributes:n})))}},86196:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(87373),a=n(65736),o=n(29405),i=n(30237),s=n(63487),l=n(12111);const __=a.__,c="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:s.Z,icon:r.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:o.Z,save:i.Z,deprecated:[l.Z]}},30237:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(12923);function l(e){let{attributes:t}=e;const{borderRadius:n,text:a,align:l}=t,c=(0,s.Z)(t),u=o()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===l},{aligncenter:"center"===l},{alignright:"right"===l}),p=o()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},m=i.useBlockProps.save({className:u});return(0,r.createElement)("div",m,(0,r.createElement)(i.RichText.Content,{tagName:"a",className:p,style:d,value:a}))}},67559:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-container"},(0,r.createElement)(a.InnerBlocks.Content,null))}},9861:function(e,t,n){"use strict";var r=n(86144);t.Z=[r.Z]},86144:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},27741:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(65736),i=n(9818),s=n(94333),l=n(85146),c=n(95702);const __=o.__;t.Z=(0,s.compose)([(0,i.withSelect)(((e,t)=>({hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length})))])((function(e){let{hasInnerBlocks:t}=e;const n=(0,c.ch)();return(0,r.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:o,stripeNudge:i}=e;return(0,r.createElement)("div",{hidden:"wall"===o.id,className:o.className},i,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:n,renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},74989:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(27741),a=n(93243),o=n(9861),i=n(4816),s=n(65736);const __=s.__,l="premium-content/subscriber-view",c={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:i.Z,category:"grow",attributes:{},edit:r.Z,save:a.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},93243:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},21225:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(55609),l=n(39630);const __=o.__,c=e=>{let{id:t,setRating:n,children:a}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{keyCode:t}=e;return t===l.ENTER?n(o):null}),onClick:(e=>()=>n(e))(t)},a);var o};t.Z=e=>function(t){let{className:n,setAttributes:o,attributes:{align:l,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),o({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(i.AlignmentToolbar,{value:l,onChange:e=>o({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,a.range)(1,d+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>o({maxRating:e}),min:2,max:10}),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>o({color:e}),label:__("Color","jetpack")}]}))))}},5354:function(e,t,n){"use strict";n.d(t,{d:function(){return o},r:function(){return i}});var r=n(69307),a=n(55609);const o=()=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),i=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(a.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},48284:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(65736),a=n(21225),o=n(49611),i=n(5354),s=n(4597);const __=r.__,_x=r._x,l="rating-star",c={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:i.d,foreground:(0,s.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,a.Z)(i.r),save:(0,o.Z)("★")}},49611:function(e,t,n){"use strict";var r=n(69307),a=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:o,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:o}},(0,a.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},21016:function(e,t,n){"use strict";var r=n(92819),a=n(4981);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,r.omit)(e,o),n={text:(i=e).submitButtonText,textColor:i.textButtonColor,customTextColor:i.customTextButtonColor,backgroundColor:i.backgroundButtonColor,customBackgroundColor:i.customBackgroundButtonColor};var i;return[t,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,o),Boolean),save:()=>null}},62334:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(19416),o=n(52175),i=n(55609),s=n(9818),l=n(12238),c=n(92694),u=n(65736),p=n(55277),d=n(39426),m=n(54554);const __=u.__;function h(e){let{attributes:t,clientId:n,context:u,setAttributes:h}=e;const{planId:f}=t,{isPremiumContentChild:g}=u,b=(0,s.useSelect)((e=>{var t,n;return null===(t=e(l.store))||void 0===t||null===(n=t.getCurrentPost())||void 0===n?void 0:n.link}),[]),v=(0,s.useSelect)((e=>e(m.h).getUpgradeUrl())),k=e=>{if(b){const t=new URL(b);return t.searchParams.set("recurring_payments",e),t.toString()}return"#"},y=(0,c.applyFilters)("jetpack.RecurringPayments.showControls",!0,n),E=(0,a.OZ)("recurring-payments"),w=!E.available&&"missing_plan"===E.unavailableReason,_=!!v&&!w&&!g;return(0,r.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},y&&(0,r.createElement)(d.Z,{allowCreateOneTimeInterval:!0,blockName:"recurring-payments",selectedProductId:f,setSelectedProductId:e=>h({planId:e,url:k(e),uniqueId:`recurring-payments-${e}`})}),_&&(0,r.createElement)(i.Placeholder,{icon:p.qv,instructions:__("You'll need to upgrade your plan to use the Payments block.","jetpack"),label:p.TN},(0,r.createElement)(i.Button,{href:v,target:"_blank",variant:"secondary"},__("Upgrade your plan","jetpack")),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(i.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack")))),(0,r.createElement)(o.InnerBlocks,{template:[["jetpack/button",{element:"a",passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]],templateLock:"all",__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},55277:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},TN:function(){return m},qv:function(){return h},Xd:function(){return g}});var r=n(69307),a=n(19416),o=n(52175),i=n(4981),s=n(55609),l=n(65736),c=n(4597),u=n(21016),p=n(62334);n(48701);const __=l.__,_x=l._x,d="recurring-payments",m=__("Payment Button","jetpack"),h=(0,r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(s.G,null,(0,r.createElement)(s.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),f=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",g={title:m,icon:{src:h,foreground:(0,c.m)()},description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Button allowing you to sell products and subscriptions.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:f},__("Support reference","jetpack"))),category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("Donations","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo"],usesContext:["isPremiumContentChild"],attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"}},edit:p.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},supports:{html:!1,__experimentalExposeControlsToChildren:!0},deprecated:[u.Z],transforms:{from:[{type:"block",blocks:["core/buttons"],isMatch:(e,t)=>void 0!==t&&1===t.innerBlocks.length&&"core/button"===t.innerBlocks[0].name,transform:(e,t)=>{var n,r,a,o;const s=t[0],l={element:"a",text:null!==(n=s.attributes.text)&&void 0!==n?n:"",className:null!==(r=s.attributes.className)&&void 0!==r?r:""},c=s.attributes.width;c&&(l.width=c.toString()+"%");const u=null===(a=s.attributes.style)||void 0===a||null===(o=a.border)||void 0===o?void 0:o.radius;u&&(l.borderRadius=parseInt(u.substring(0,u.length-2)));const p=(0,i.createBlock)("jetpack/button",l,[]);return(0,i.createBlock)("jetpack/"+d,{},[p])}}]}}},17060:function(e,t,n){"use strict";n.d(t,{Hj:function(){return i},AP:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{attributes:t,setAttributes:n}=e;const{displayContext:a,displayDate:i,displayThumbnails:s,postsToShow:l}=t;return(0,r.createElement)(o.PanelBody,{title:__("Related Posts Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnails","jetpack"),checked:s,onChange:e=>n({displayThumbnails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:i,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:a,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:l,onChange:e=>n({postsToShow:Math.min(e,6)}),min:1,max:6}))}function s(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid View","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List View","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},15034:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(92819),l=n(9818),c=n(94333),u=n(17060);const __=a.__;function p(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function d(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},e.post.context))}function m(e){const t="jp-related-posts-i2__row";let n=0;const a=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),a&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}class h extends r.Component{render(){const{attributes:e,className:t,posts:n,setAttributes:a,instanceId:i,isInSiteEditor:s}=this.props,{displayContext:l,displayDate:c,displayThumbnails:h,postLayout:f,postsToShow:g}=e,b="jp-relatedposts-i2",v=[];for(let e=0;e<g;e++)n[e]?v.push((0,r.createElement)(d,{id:`related-posts-${i}-post-${e}`,key:b+"-"+e,post:n[e],displayThumbnails:h,displayDate:c,displayContext:l})):v.push((0,r.createElement)(p,{id:`related-posts-${i}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:h,displayDate:c,displayContext:l,isInSiteEditor:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u.Hj,{attributes:e,setAttributes:a})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.AP,{attributes:e,setAttributes:a})),(0,r.createElement)("div",{className:t,id:`related-posts-${i}`},(0,r.createElement)("div",{className:b,"data-layout":f},(0,r.createElement)(m,{posts:v}))))}}t.ZP=(0,c.compose)(c.withInstanceId,(0,l.withSelect)((e=>{const{getCurrentPost:t}=e("core/editor"),n=t();return{posts:(0,s.get)(n,"jetpack-related-posts",[]),isInSiteEditor:(0,s.isEmpty)(n)}})))(h)},34178:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(15034),s=n(4597);const __=a.__,_x=a._x,l="related-posts",c=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(o.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),icon:{src:c,foreground:(0,s.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayDate:{type:"boolean",default:!0},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:i.ZP,save:()=>null,example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}}},17587:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(9818),u=n(89105),p=n.n(u),d=n(12704),m=n(73338);const __=i.__,_n=i._n,h=[{value:d.FV,label:__("Show after threshold","jetpack")},{value:d.Am,label:__("Show before threshold","jetpack")}];class f extends o.Component{constructor(){super(...arguments),a()(this,"state",{isThresholdValid:!0}),a()(this,"setCriteria",(e=>this.props.setAttributes({criteria:e}))),a()(this,"setThreshold",(e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})}))}getNoticeLabel(){return this.props.attributes.criteria===d.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,i.sprintf)(
33
  /* translators: placeholder is a number. */
34
  _n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,i.sprintf)(
35
  /* translators: placeholder is a number. */
55
  /* translators: %s is the number of subscribers. The \xA0 non-breaking space is to make sure the last two words are on the same line. */
56
  _n("<span>%s reader</span> is subscribed.","<span>%s readers</span> are subscribed.",x,"jetpack"),x),{span:(0,r.createElement)("span",{style:{textDecoration:"underline"}})})),k&&(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:_,gradientValue:p.gradientValue,onGradientChange:p.setGradient,label:__("Button Background","jetpack")},{colorValue:P.color,onColorChange:C,label:__("Button Text","jetpack")},{colorValue:n.color,onColorChange:w,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(i.ContrastChecker,{fontSize:v.size,textColor:P.color,backgroundColor:f.color,fallbackButtonBackgroundColor:g,fallbackTextColor:b})),!k&&(0,r.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:_,label:__("Button Background Color","jetpack")},{value:P.color,onChange:C,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:w,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(i.ContrastChecker,{fontSize:v.size,textColor:P.color,backgroundColor:f.color,fallbackButtonBackgroundColor:g,fallbackTextColor:b})),(0,r.createElement)(o.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(i.FontSizePicker,{withSlider:!0,value:v.size,onChange:e=>{const t=e||u.tm;E({fontSize:t,customFontSize:t})}})),(0,r.createElement)(o.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(o.RangeControl,{value:d,label:__("Border Radius","jetpack"),min:u.G0,max:u.Gp,initialPosition:u.S9,allowReset:!0,onChange:e=>E({borderRadius:e})}),(0,r.createElement)(o.RangeControl,{value:m,label:__("Border Weight","jetpack"),min:u.VF,max:u.K3,initialPosition:u.XJ,allowReset:!0,onChange:e=>E({borderWeight:e})})),(0,r.createElement)(o.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(o.RangeControl,{value:y,label:__("Space Inside","jetpack"),min:u.xV,max:u.bK,initialPosition:u.HE,allowReset:!0,onChange:e=>E({padding:e})}),(0,r.createElement)(o.RangeControl,{value:j,label:__("Space Between","jetpack"),min:u.Tr,max:u.pC,initialPosition:u.FP,allowReset:!0,onChange:e=>E({spacing:e})}),(0,r.createElement)(c.h,{width:T,onChange:e=>E({buttonWidth:e})})),(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(o.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:S,onChange:()=>{E({showSubscribersTotal:!S})},help:()=>{if(!x||x<1)return __("This will remain hidden until there is at least one subscriber.","jetpack")}}),(0,r.createElement)(o.ToggleControl,{label:__("Place button on new line","jetpack"),checked:h,onChange:()=>{E({buttonOnNewLine:!h})}}),!(0,s.Wp)()&&(0,r.createElement)(o.TextareaControl,{value:A,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>E({successMessage:e})})))}},22045:function(e,t,n){"use strict";var r=n(95201),a=n(9984),o=n(43947),i=n(70898),s=n(6175),l=n(13266);t.Z=[l.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},95201:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(92819);const __=a.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,o.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},9984:function(e,t,n){"use strict";var r=n(65736),a=n(89704);const __=r.__;t.Z={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},89704:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{showSubscribersTotal:n,submitButtonClasses:a,customBackgroundButtonColor:o,customTextButtonColor:i,submitButtonText:s}=t;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${o}" custom_text_button_color="${i}" submit_button_text="${s}" submit_button_classes="${a}" show_subscribers_total="${n}" ]`)}},69125:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},71320:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(69125);function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:o,showSubscribersTotal:l,buttonOnNewLine:c,submitButtonText:u,emailFieldBackgroundColor:p,customEmailFieldBackgroundColor:d,emailFieldGradient:m,customEmailFieldGradient:h,buttonBackgroundColor:f,customButtonBackgroundColor:g,buttonGradient:b,customButtonGradient:v,textColor:k,customTextColor:y,fontSize:E,customFontSize:w,borderRadius:_,borderWeight:C,borderColor:S,customBorderColor:j,padding:x,spacing:P}=t,T=!!a.__experimentalGetGradientClass,A=(0,a.getColorClassName)("color",k),N=(0,a.getFontSizeClass)(E),I=(0,a.getColorClassName)("border-color",S),B=(0,a.getColorClassName)("background-color",f),M=T?(0,a.__experimentalGetGradientClass)(b):void 0,R=(0,a.getColorClassName)("background-color",p),L=T?(0,a.__experimentalGetGradientClass)(m):void 0,Z=i()(0===_?"no-border-radius":void 0,N,I),D=i()(Z,k?"has-text-color":void 0,A,f||b?"has-background":void 0,B,M),F=i()(Z,R,L),O=!R&&h?h:d,z=!B&&v?v:g,U=()=>i()(e,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,l?"wp-block-jetpack-subscriptions__show-subs":void 0);let $=o,H=u;return"check-text-defaults"===n&&($=o===s.Z.subscribePlaceholder.default?"Enter your email address":o,H=u===s.Z.submitButtonText.default?"Sign Up":u),(0,r.createElement)("div",{className:U()},(0,r.createElement)(r.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${$}"\n\t\t\t\tshow_subscribers_total="${l}"\n\t\t\t\tbutton_on_newline="${c}"\n\t\t\t\tsubmit_button_text="${H}"\n\t\t\t\tcustom_background_emailfield_color="${O}"\n\t\t\t\tcustom_background_button_color="${z}"\n\t\t\t\tcustom_text_button_color="${y}"\n\t\t\t\tcustom_font_size="${w||16}"\n\t\t\t\tcustom_border_radius="${_||0}"\n\t\t\t\tcustom_border_weight="${C||1}"\n\t\t\t\tcustom_border_color="${j}"\n\t\t\t\tcustom_padding="${x||15}"\n\t\t\t\tcustom_spacing="${P||10}"\n\t\t\t\tsubmit_button_classes="${D}"\n\t\t\t\temail_field_classes="${F}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},43947:function(e,t,n){"use strict";var r=n(69125),a=n(71320);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n)}}},70898:function(e,t,n){"use strict";var r=n(69125),a=n(71320);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n,"check-text-defaults")}}},6175:function(e,t,n){"use strict";var r=n(69125),a=n(96779);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:a.ZP}},96779:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(69125);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:S,borderColor:j,customBorderColor:x,padding:P,spacing:T}=n,A=!!a.__experimentalGetGradientClass,N=(0,a.getColorClassName)("color",y),I=(0,a.getFontSizeClass)(w),B=(0,a.getColorClassName)("border-color",j),M=(0,a.getColorClassName)("background-color",g),R=A?(0,a.__experimentalGetGradientClass)(v):void 0,L=(0,a.getColorClassName)("background-color",d),Z=A?(0,a.__experimentalGetGradientClass)(h):void 0,D=i()(0===C?"no-border-radius":void 0,I,B),F=i()(D,y?"has-text-color":void 0,N,g||v?"has-background":void 0,M,R),O=i()(D,L,Z),z=!L&&f?f:m,U=!M&&k?k:b,$={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:z,custom_background_button_color:U,custom_text_button_color:E,custom_font_size:_||16,custom_border_radius:C||0,custom_border_weight:S||1,custom_border_color:x,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:F,email_field_classes:O,show_only_email_and_button:!0},H=(0,s.reduce)($,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${H}]`))}},79785:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},13266:function(e,t,n){"use strict";var r=n(79785),a=n(45659);t.Z={attributes:r.Z,save:a.Z}},45659:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(79785);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:S,borderColor:j,customBorderColor:x,padding:P,spacing:T,buttonWidth:A}=n,N=!!a.__experimentalGetGradientClass,I=(0,a.getColorClassName)("color",y),B=(0,a.getFontSizeClass)(w),M=(0,a.getColorClassName)("border-color",j),R=(0,a.getColorClassName)("background-color",g),L=N?(0,a.__experimentalGetGradientClass)(v):void 0,Z=(0,a.getColorClassName)("background-color",d),D=N?(0,a.__experimentalGetGradientClass)(h):void 0,F=i()(0===C?"no-border-radius":void 0,B,M),O=i()(F,y?"has-text-color":void 0,I,g||v?"has-background":void 0,R,L),z=i()(F,Z,D),U=!Z&&f?f:m,$=!R&&k?k:b,H=A||void 0,V={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:U,custom_background_button_color:$,custom_text_button_color:E,custom_font_size:_||"16px",custom_border_radius:C||0,custom_border_weight:S||1,custom_border_color:x,custom_button_width:H,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:O,email_field_classes:z,show_only_email_and_button:!0},G=(0,s.reduce)(V,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${G}]`))}},80245:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(65736),l=n(55609),c=n(52175),u=n(94333),p=n(91768),d=n(79993),m=n(56213),h=n(74323),f=n(60602);const __=s.__,_n=s._n,{getComputedStyle:g}=window,b=!!c.__experimentalUseGradient,v=(0,l.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:n,textColor:r}=t,a=n&&n.color,o=r&&r.color,i=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:i&&g(i).backgroundColor,fallbackTextColor:o||!e?void 0:i&&g(i).color}}));t.Z=(0,u.compose)([(0,c.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,c.withFontSizes)("fontSize"),v])((function(e){const{className:t,attributes:n,setAttributes:a,emailFieldBackgroundColor:g,buttonBackgroundColor:v,setButtonBackgroundColor:k,fallbackButtonBackgroundColor:y,textColor:E,fallbackTextColor:w,setTextColor:_,borderColor:C,setBorderColor:S,fontSize:j}=e,x=(0,m.S)(d.Z,n);(0,i.isEqual)(x,n)||a(x);const{borderRadius:P,borderWeight:T,buttonWidth:A,padding:N,spacing:I,submitButtonText:B,subscribePlaceholder:M,showSubscribersTotal:R,buttonOnNewLine:L,successMessage:Z}=x,[D,F]=(0,r.useState)(""),[O,z]=(0,r.useState)(""),U=b?(0,c.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},$=b?(0,c.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},H={"no-border-radius":0===P,[j.class]:j.class,"has-text-color":E.color,[E.class]:E.class},V={...H,"has-background":g.color||U.gradientValue,[g.class]:!U.gradientValue&&g.class,[U.gradientClass]:U.gradientClass},G={...H,"has-background":v.color||$.gradientValue,[v.class]:!$.gradientValue&&v.class,[$.gradientClass]:$.gradientClass},q=e=>e||h.FP,W={color:E.color,borderColor:C.color,borderRadius:P?P+"px":h.S9+"px",borderWidth:T?T+"px":h.XJ+"px",fontSize:j.size?j.size:h.tm,padding:(e=>{const t=e||h.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(N)},K={...W,...!g.color&&U.gradientValue?{background:U.gradientValue}:{backgroundColor:g.color}},X={...W,...!v.color&&$.gradientValue?{background:$.gradientValue}:{backgroundColor:v.color},...L?{marginTop:q(I)+"px"}:{marginLeft:q(I)+"px"},width:A};(0,r.useEffect)((()=>{(0,p.z)((e=>{F((0,s.sprintf)(
57
  /* translators: Placeholder is a number of subscribers. */
58
+ _n("Join %s other subscriber","Join %s other subscribers",e,"jetpack"),e)),z(e)}),(()=>{F(__("Subscriber count unavailable","jetpack")),z(0)}))}),[]);const J=(0,u.usePrevious)(v);return(0,r.useEffect)((()=>{(null==J?void 0:J.color)===(null==C?void 0:C.color)&&(null==C?void 0:C.color)!==(null==v?void 0:v.color)&&S(v.color)}),[v,J,C,S]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(f.Z,{buttonBackgroundColor:v,borderColor:C,buttonGradient:$,borderRadius:P,borderWeight:T,buttonOnNewLine:L,emailFieldBackgroundColor:g,fallbackButtonBackgroundColor:y,fallbackTextColor:w,fontSize:j,isGradientAvailable:b,padding:N,setAttributes:a,setBorderColor:S,setButtonBackgroundColor:k,setTextColor:_,showSubscribersTotal:R,spacing:I,subscriberCount:O,textColor:E,buttonWidth:A,successMessage:Z})),(0,r.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",L?"wp-block-jetpack-subscriptions__use-newline":void 0,R?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)(l.TextControl,{placeholder:M,disabled:!0,className:o()(V,"wp-block-jetpack-subscriptions__textfield"),style:K}),(0,r.createElement)(c.RichText,{className:o()(G,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:X,value:B,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),R&&(0,r.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},D)))}))},77768:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return f},eC:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(79993),l=n(22045),c=n(80245),u=n(53098),p=n(37182),d=n(4597);const __=a.__,_x=a._x,m="subscriptions",h=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M20.9997 6.96749L21 7V17C21 18.1046 20.1046 19 19 19H5C3.89543 19 3 18.1046 3 17V7L3.00026 6.96747L3 6.96092C3 5.87793 3.87793 5 4.96092 5H19.0391C20.1221 5 21 5.87793 21 6.96092L20.9997 6.96749ZM19.3044 17.3967L13.9142 12.9048L13.2804 13.433C12.5387 14.0511 11.4613 14.0511 10.7196 13.433L10.0858 12.9048L4.69555 17.3967C4.77987 17.4615 4.88543 17.5 5 17.5H19C19.1146 17.5 19.2201 17.4615 19.3044 17.3967ZM19.5 15.6071V8.25L15.0858 11.9285L19.5 15.6071ZM4.5 8.25V15.6071L8.91424 11.9285L4.5 8.25ZM4.79543 6.54363C4.85788 6.51559 4.92712 6.5 5 6.5H19C19.0729 6.5 19.1421 6.51559 19.2046 6.54363L12.3201 12.2807C12.1347 12.4352 11.8653 12.4352 11.6799 12.2807L4.79543 6.54363Z",fill:(0,d.m)(),fillRule:"evenodd",clipRule:"evenodd"})),f={title:__("Subscribe","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Allow readers to receive a newsletter with future posts in their inbox.","jetpack")),(0,r.createElement)("p",null,(0,r.createInterpolateElement)(__("Subscribers can get notifications through email or <ExternalLink>the Reader app</ExternalLink>.","jetpack"),{ExternalLink:(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/read"})}))),icon:{src:h,foreground:(0,d.m)()},category:"grow",keywords:[_x("newsletter","block search term","jetpack"),_x("email","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:s.Z,edit:c.Z,save:u.Z,styles:[{name:"compact",label:__("Compact","jetpack")},{name:"split",label:__("Split","jetpack"),isDefault:!0}],transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,i.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},supports:{spacing:{margin:!0,padding:!0},align:["wide","full"]},deprecated:l.Z},g={render:p.Z}},37182:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(69307),a=n(72067),o=n(9818),i=n(12238),s=n(65736),l=n(19416),c=n(91768),u=n(80011);const __=s.__,_n=s._n;function p(){const[e,t]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.z)((e=>t(e)))}),[]);return"post"!==(0,o.useSelect)((e=>e(i.store).getCurrentPostType()),[])||(0,l.M6)()||(0,l.aQ)()||!Number.isFinite(e)||e<=0?null:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PluginPrePublishPanel,{className:"jetpack-subscribe-pre-publish-panel",initialOpen:!0,title:__("Subscribers","jetpack")},(0,r.createElement)(u.Z,null,(0,r.createInterpolateElement)((0,s.sprintf)(
59
  /* translators: %s is the number of subscribers */
60
  _n("This post will be sent to <span>%s reader</span>","This post will be sent to <span>%s readers</span>",e,"jetpack"),e),{span:(0,r.createElement)("span",{className:"jetpack-subscribe-reader-count"})}))),(0,r.createElement)(a.PluginPostPublishPanel,{className:"jetpack-subscribe-post-publish-panel",initialOpen:!0},(0,r.createElement)(u.Z,null,(0,r.createInterpolateElement)((0,s.sprintf)(
61
  /* translators: %s is the number of subscribers */
67
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
68
  __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(s.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:c,onMoveBackward:l?void 0:d(t),onMoveForward:l?void 0:m(t),onRemove:l?void 0:h(t),onSelect:l?void 0:f(t),origUrl:e.url,setAttributes:l?void 0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:s,roundedCorners:d,onResize:m,isSave:h,columnWidths:f}=this.props,g=(0,u.v)(s)?c.Z:l.Z,b=this.props.images.map(this.renderImage,this),v=s!==p.xJ?Math.min(d,p.Z5):0;return(0,r.createElement)("div",{className:i()(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(g,{align:e,columns:a,columnWidths:h?f:void 0,images:o,layoutStyle:s,renderedImages:b,onResize:h?void 0:m}),t)}}},32:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(94502),a=n.n(r),o=n(69307),i=n(82889),s=n(71470),l=n(44536),c=n(2258);class u extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a,columnWidths:u}=this.props,p=(0,c.h9)(n),d="columns"===r?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)});let m=0;return(0,o.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,o.createElement)(l.Z,{key:t},e.map(((e,n)=>{var r;const s=a.slice(m,m+e);return m+=e,(0,o.createElement)(i.Z,{key:n,width:null==u||null===(r=u[t])||void 0===r?void 0:r[n]},s)}))))))}}},2258:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return S}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([A,A,N,A,A]),c=T([A,A,A,N,A,A,A]),u=P([3,1,3],5),p=T([N,A,A,N]),d=P([1,2,1],5),m=T([N,A,A,A]),h=P([1,3],3),f=T([A,A,A,N]),g=P([3,1],3),b=T([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:j(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function j(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function A(e){return e>=1&&e<2}function N(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},44536:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},39219:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(44536),i=n(82889),s=n(71470),l=n(29586);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},46953:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(15344),o=n(8909),i=n(29586);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(a.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(i.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},34224:function(e,t,n){"use strict";n.d(t,{v:function(){return l},z:function(){return c}});var r=n(40278),a=n(82827),o=n(11313),i=n(92819),s=n(29586);function l(e){return["circle","square"].includes(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:c}=e,{layoutStyle:m}=t,h=p(n)||!0===u()?d:r.Z;let f;if(l(m)&&c&&a){const e=Math.min(s.GP,c,a);f=h(n,{resize:`${e},${e}`})}else f=h(n);const g=300,b=600;let v;if(l(m)){const e=Math.min(b,c,a),t=Math.min(s.GP,c,a);v=(0,i.range)(e,t,g).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(b,c),t=Math.min(s.GP,c);v=(0,i.range)(e,t,g).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},v&&{srcSet:v})}function u(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function p(e){const{host:t}=(0,a.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:o,port:i,query:s,search:l,...c}=(0,a.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,a.WU)(c)}},20707:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(49288),d=n(98734),m=n(39066),h=n(8909),f=n(15418),g=n(92956);const __=i.__,b=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")}];function v(e){return Math.min(3,e.images.length)}const k=e=>{const t=(0,s.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,s.get)(e,["sizes","large","url"])||(0,s.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class y extends o.Component{constructor(){var e;super(...arguments),a()(this,"state",{selectedImage:null,changed:void 0===this.props.attributes.columnWidths||0===(null===(e=this.props.attributes.columnWidths)||void 0===e?void 0:e.length)}),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],{noticeOperations:n}=this.props;(0,c.mediaUpload)({allowedTypes:m.RA,filesList:e,onFileChange:e=>{const n=e.map((e=>k(e)));this.setAttributes({images:t.concat(n)})},onError:n.createErrorNotice}),this.setState({changed:!0})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,s.filter)(this.props.attributes.images,((t,n)=>e!==n)),{columns:n}=this.props.attributes;this.setState({selectedImage:null,changed:!0}),this.setAttributes({images:t,columns:n?Math.min(t.length,n):n})})),a()(this,"onSelectImage",(e=>()=>{this.state.selectedImage!==e&&this.setState({selectedImage:e})})),a()(this,"onSelectImages",(e=>{const{columns:t}=this.props.attributes;this.setAttributes({columns:t?Math.min(e.length,t):t,images:e.map((e=>k(e)))}),this.setState({changed:!0})})),a()(this,"onMove",((e,t)=>{const n=[...this.props.attributes.images];n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t,changed:!0}),this.setAttributes({images:n})})),a()(this,"onMoveForward",(e=>()=>{e!==this.props.attributes.images.length-1&&this.onMove(e,e+1)})),a()(this,"onMoveBackward",(e=>()=>{0!==e&&this.onMove(e,e-1)})),a()(this,"onResize",(e=>{this.state.changed&&this.setAttributes({columnWidths:e})})),a()(this,"setColumnsNumber",(e=>this.setAttributes({columns:e}))),a()(this,"setRoundedCorners",(e=>this.setAttributes({roundedCorners:e}))),a()(this,"setImageAttributes",(e=>t=>{const{attributes:{images:n}}=this.props;n[e]&&this.setAttributes({images:[...n.slice(0,e),{...n[e],...t},...n.slice(e+1)]})})),a()(this,"setLinkTo",(e=>this.setAttributes({linkTo:e}))),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files)))}static getDerivedStateFromProps(e,t){return e.isSelected||null===t.selectedImage?null:{selectedImage:null}}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}render(){const{selectedImage:e}=this.state,{attributes:t,isSelected:n,className:r,noticeOperations:a,noticeUI:i,setAttributes:s}=this.props,{align:c,columns:k=v(t),imageFilter:y,images:E,linkTo:w,roundedCorners:_}=t,C=(0,o.createElement)(u.DropZone,{onFilesDrop:this.addFiles}),S=(0,o.createElement)(l.BlockControls,null,!!E.length&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.ToolbarGroup,null,(0,o.createElement)(u.ToolbarItem,null,(()=>(0,o.createElement)(l.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:m.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,o.createElement)(g.Z,{label:__("Edit Gallery","jetpack"),onClick:t})}})))),(0,o.createElement)(p.Z,{value:y,onChange:e=>{s({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===E.length)return(0,o.createElement)(o.Fragment,null,S,(0,o.createElement)(l.MediaPlaceholder,{icon:f.qv,className:r,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:m.RA,multiple:!0,notices:i,onError:a.createErrorNotice}));const j=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,S,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(j)&&E.length>1&&(0,o.createElement)(u.RangeControl,{label:__("Columns","jetpack"),value:k,onChange:this.setColumnsNumber,min:1,max:Math.min(m.hI,E.length)}),j!==m.xJ&&(0,o.createElement)(u.RangeControl,{label:__("Rounded corners","jetpack"),value:_,onChange:this.setRoundedCorners,min:0,max:m.Z5}),(0,o.createElement)(u.SelectControl,{label:__("Link To","jetpack"),value:w,onChange:this.setLinkTo,options:b}))),i,(0,o.createElement)(d.Z,{align:c,className:r,columns:k,imageFilter:y,images:E,layoutStyle:j,linkTo:w,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:_,selectedImage:n?e:null,setImageAttributes:this.setImageAttributes},C,n&&(0,o.createElement)("div",{className:"tiled-gallery__add-item"},(0,o.createElement)(u.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}t.ZP=(0,u.withNotices)(y)},49288:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,_x=a._x,i=[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:_x("Gingham","image style","jetpack"),value:"gingham"}],s=__("Pick an image filter","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:s,tooltip:s,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},i.map((e=>{let{icon:i,title:s,value:l}=e;return(0,r.createElement)(o.MenuItem,{className:t===l?"is-active":void 0,icon:i,isSelected:t===l,key:l||"original",onClick:(c=l,()=>{n(t===c?void 0:c),a()}),role:"menuitemcheckbox"},s);var c})))}})}},28632:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(39630),u=n(55609),p=n(11313),d=n(9818),m=n(21711);const __=l.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"img",(0,o.createRef)()),a()(this,"onImageClick",(()=>{this.props.isSelected||this.props.onSelect()})),a()(this,"onImageKeyDown",(e=>{this.img.current===document.activeElement&&this.props.isSelected&&[c.BACKSPACE,c.DELETE].includes(e.keyCode)&&this.props.onRemove()}))}componentDidUpdate(){const{alt:e,height:t,image:n,link:r,url:a,width:o}=this.props;if(n){const i={};!e&&n.alt_text&&(i.alt=n.alt_text),!t&&n.media_details&&n.media_details.height&&(i.height=+n.media_details.height),!r&&n.link&&(i.link=n.link),!a&&n.source_url&&(i.url=n.source_url),!o&&n.media_details&&n.media_details.width&&(i.width=+n.media_details.width),Object.keys(i).length&&this.props.setAttributes(i)}}render(){const{"aria-label":e,alt:t,columns:n,height:r,id:a,imageFilter:i,isFirstItem:l,isLastItem:c,isSelected:d,link:h,linkTo:f,onMoveBackward:g,onMoveForward:b,onRemove:v,origUrl:k,showMovers:y,srcSet:E,url:w,width:_}=this.props;let C;switch(f){case"media":C=w;break;case"attachment":C=h}const S=(0,p.isBlobURL)(k),j=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("img",{alt:t,"aria-label":e,"data-height":r,"data-id":a,"data-link":h,"data-url":k,"data-width":_,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:S?void 0:w,srcSet:S?void 0:E,tabIndex:"0",style:S?{backgroundImage:`url(${k})`}:void 0}),S&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":S,[`filter__${i}`]:!!i})},y&&(0,o.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,o.createElement)(u.Button,{icon:1===n?m.WO:m.KT,onClick:l?void 0:g,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":l,disabled:!d}),(0,o.createElement)(u.Button,{icon:1===n?m.xf:m.zz,onClick:c?void 0:b,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":c,disabled:!d})),(0,o.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,o.createElement)(u.Button,{icon:m.xv,onClick:v,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!d})),C?(0,o.createElement)("a",null,j):j)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},62176:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(11313);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,i.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:o()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},21711:function(e,t,n){"use strict";n.d(t,{KT:function(){return o},zz:function(){return i},xf:function(){return s},WO:function(){return l},xv:function(){return c}});var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),i=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),s=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),l=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),c=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},15418:function(e,t,n){"use strict";n.d(t,{u2:function(){return j},qv:function(){return x},Xd:function(){return P}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(19416),c=n(20707),u=n(65758),p=n(39066),d=n(4597),m=n(88938),h=n(95492),f=n(96606),g=n(85472),b=n(79009),v=n(10742),k=n(52642),y=n(41145);const __=a.__,_x=a._x,E={[p.EU]:_x("Tiled mosaic","Tiled gallery layout","jetpack"),[p.xJ]:_x("Circles","Tiled gallery layout","jetpack"),[p.sw]:_x("Tiled columns","Tiled gallery layout","jetpack"),[p.yw]:_x("Square tiles","Tiled gallery layout","jetpack")},w=p.P0.map((e=>({...e,label:E[e.name]})));function _(e){return(0,i.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const C={align:{default:"center",type:"string"},className:{default:`is-style-${p.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},S={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:f,width:160,height:95},{alt:"",link:"",url:g,width:160,height:107},{alt:"",link:"",url:b,width:304,height:203},{alt:"",link:"",url:v,width:312,height:207},{alt:"",link:"",url:k,width:152,height:101},{alt:"",link:"",url:y,width:152,height:105}],linkTo:"none"},j="tiled-gallery",x=(0,r.createElement)(s.SVG,{viewBox:"0 0 24 24",width:24,height:24},(0,r.createElement)(s.Path,{d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),P={attributes:C,category:(0,m.Z)("media","layout"),description:__("Display multiple images in an elegantly organized tiled layout.","jetpack")+((0,l.Wp)()?"":" "+__("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:x,foreground:(0,d.m)()},keywords:[_x("columns","block search term","jetpack"),_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("square","block search term","jetpack"),_x("circle","block search term","jetpack"),_x("mosaic","block search term","jetpack")],styles:w,supports:{align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0},title:__("Tiled Gallery","jetpack"),transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>_(e).length>0,transform:e=>{const t=_(e);return(0,o.createBlock)(`jetpack/${j}`,{images:t.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const n=_(t);return n.length>0?(0,o.createBlock)(`jetpack/${j}`,{images:n.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,o.createBlock)(`jetpack/${j}`)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n,columns:r,linkTo:a}=e;return(0,o.createBlock)("core/gallery",{images:t,ids:n,columns:r,imageCrop:!0,linkTo:a})}},{type:"block",blocks:["core/image"],transform:e=>{let{align:t,images:n}=e;return n.length>0?n.map((e=>{let{id:n,url:r,alt:a}=e;return(0,o.createBlock)("core/image",{align:t,id:n,url:r,alt:a})})):(0,o.createBlock)("core/image")}}]},edit:c.ZP,save:u.Z,providesContext:{imageCrop:"imageCrop"},deprecated:h.Z,example:{attributes:S}}},51092:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,width:n}=e;const a=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},13582:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},98734:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(89105),i=n.n(o),s=n(28632),l=n(62176),c=n(83147),u=n(46374),p=n(89033),d=n(39066);const __=a.__;class m extends r.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:c,linkTo:u,layoutStyle:d,onMoveBackward:m,onMoveForward:h,onRemoveImage:f,onSelectImage:g,selectedImage:b,setImageAttributes:v}=this.props,k=(0,a.sprintf)(
69
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
70
+ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),y=c?l.Z:s.Z,{src:E,srcSet:w}=(0,p.z)(e,{layoutStyle:d});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:b===t,key:t,link:e.link,linkTo:u,onMoveBackward:c?void 0:m(t),onMoveForward:c?void 0:h(t),onRemove:c?void 0:f(t),onSelect:c?void 0:g(t),origUrl:e.url,setAttributes:c?void 0:v(t),showMovers:i.length>1,srcSet:w,url:E,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:s,roundedCorners:l,onResize:m,style:h,isSave:f,columnWidths:g}=this.props,b=(0,p.v)(s)?u.Z:c.Z,v=this.props.images.map(this.renderImage,this),k=s!==d.xJ?Math.min(l,d.Z5):0;return(0,r.createElement)("div",{style:h,className:i()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:f?g:void 0,images:o,layoutStyle:s,renderedImages:v,onResize:f?void 0:m}),t)}}},83147:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(94502),a=n.n(r),o=n(69307),i=n(54166),s=n(51092),l=n(13582),c=n(1199),u=n(60511),p=n(1253);class d extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a}=this.props,i=(0,p.h9)(n),u="columns"===r?(0,p.sv)(i,t):(0,p.T9)(i,{isWide:["full","wide"].includes(e)}),d=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(u,a,1e3)})();let m=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},u.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,n)=>{var r;const i=a.slice(m,m+e);return m+=e,(0,o.createElement)(s.Z,{key:n,width:null==d||null===(r=d[t])||void 0===r?void 0:r[n]},i)}))))))}}},1253:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return S}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([A,A,N,A,A]),c=T([A,A,A,N,A,A,A]),u=P([3,1,3],5),p=T([N,A,A,N]),d=P([1,2,1],5),m=T([N,A,A,A]),h=P([1,3],3),f=T([A,A,A,N]),g=P([3,1],3),b=T([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:j(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function j(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function A(e){return e>=1&&e<2}function N(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},60511:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(39066);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){return function(e,t,n){let[o,i]=t;const p=1/o*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=a(p,o);i.forEach(((e,t)=>{const o=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=a(l(e).map((e=>o/u(e))),n);Array.from(e.children).forEach(((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:o})}));return d.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){return s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[0,0])}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},1199:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},46374:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(1199),i=n(51092),s=n(13582),l=n(39066);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},65758:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(98734),o=n(20707),i=n(8909),s=n(39066);function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=(0,o.F)(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(a.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,i.t)(s.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},89033:function(e,t,n){"use strict";n.d(t,{v:function(){return u},z:function(){return p}});var r=n(40278),a=n(82827),o=n(11313),i=n(92819),s=n(19416),l=n(39066),c=n(88514);function u(e){return["circle","square"].includes(e)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,c.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,s.Ug)()&&(0,s.M6)())return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:p}=e,{layoutStyle:f}=t,g=m(n)||!0===d()?h:r.Z;let b;if(u(f)&&p&&a){const e=Math.min(l.GP,p,a);b=g(n,{resize:`${e},${e}`})}else b=g(n);const v=300,k=600;let y;if(u(f)){const e=Math.min(k,p,a),t=Math.min(l.GP,p,a);y=(0,i.range)(e,t,v).map((e=>{const t=g(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(k,p),t=Math.min(l.GP,p);y=(0,i.range)(e,t,v).map((e=>{const t=g(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:b},y&&{srcSet:y})}function d(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function m(e){const{host:t}=(0,a.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:o,port:i,query:s,search:l,...c}=(0,a.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,a.WU)(c)}},47923:function(e,t,n){"use strict";n.d(t,{H:function(){return a},Z:function(){return o}});var r=n(69307);const a=(0,r.createContext)(),o=e=>{let{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o},children:i})}},61434:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});const r=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}]},62396:function(e,t,n){"use strict";var r=n(40899);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:r.Z,isDeprecation:!0}},40899:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{caption:n,guid:o}=t;if(!o)return null;const i=`https://videopress.com/v/${o}`;return(0,r.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${i}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},80979:function(e,t,n){"use strict";var r=n(85993),a=n(87057);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:e=>{let{videoPressClassNames:t,guid:n}=e;return n&&void 0===t},migrate:e=>{const{className:t,videoPressClassNames:n}=e;return{...e,...(0,a.a)(t,n)}},save:r.Z,isDeprecation:!0}},85993:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(59210);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:s,loop:l,muted:c,poster:u,preload:p,videoPressClassNames:d}={}}=e;if(!s)return null;const m=(0,o.p)(s,{autoplay:t,controls:i,loop:l,muted:c,poster:u,preload:p});return(0,r.createElement)("figure",{className:d},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},59210:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,poster:s,preload:l}=t;if(!e)return null;const c={...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{posterUrl:s},..."none"!==l&&{preloadContent:l}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,c)}},87057:function(e,t,n){"use strict";n.d(t,{a:function(){return l}});var r=n(81326),a=n.n(r),o=n(29512),i=n.n(o);const s=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],l=(e,t)=>{const n=s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1}),r=a()(e,{...n,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),o=new(i())(r);let l=a()(e,t);return o.forEach((e=>{l=l.replace(e,"")})),{className:r,videoPressClassNames:l.trim()}}},24729:function(e,t,n){"use strict";var r=n(33637);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:r.Z,isDeprecation:!0}},33637:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(24727);function l(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=a.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),E=(0,s.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});return(0,r.createElement)("figure",y,(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${E}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},24727:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},97532:function(e,t,n){"use strict";var r=n(8564);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:r.Z,isDeprecation:!0}},8564:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(21329);function l(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,E=a.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),w=(0,s.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,r.createElement)("figure",E,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${w}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},21329:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},58667:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(94502),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(11313),p=n(55609),d=n(94333),m=n(9818),h=n(52175),f=n(65736),g=n(71430),b=n(40707),v=n(89105),k=n.n(v),y=n(92819),E=n(65293),w=n(64850),_=n(61788),C=n(69913),S=n(36815),j=n(941),x=n(47923);const __=f.__,_x=f._x,P=["image"],T=e=>{const{html:t,scripts:n,interactive:r,caption:a,isSelected:o,hideOverlay:i,attributes:l,setAttributes:c}=e,{align:u,className:d,videoPressClassNames:m,maxWidth:f}=l,g=(0,h.useBlockProps)({className:k()("wp-block-video",d,m,{[`align${u}`]:u})});return(0,s.createElement)("figure",g,(0,s.createElement)("div",{className:"wp-block-embed__wrapper"},(0,s.createElement)(p.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:f},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}c({maxWidth:r})}},(0,s.createElement)(p.SandBox,{html:t,scripts:n,type:m}))),!r&&(0,s.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:i}),(!h.RichText.isEmpty(a)||o)&&(0,s.createElement)(h.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:a,onChange:e=>c({caption:e}),inlineToolbar:!0}))};t.Z=(0,d.createHigherOrderComponent)((0,d.compose)([(0,m.withSelect)(((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:a,guid:o,loop:i,muted:s,playsinline:l,poster:c,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,src:f,useAverageColor:g}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,w.p)(o,{autoplay:n,controls:r,loop:i,muted:s,playsinline:l,poster:c,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:g}),y=!!k&&b(k),E=!!k&&v(k),_=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:a,isFetchingPreview:E,isUploading:!_&&(0,u.isBlobURL)(f),preview:y,resumableUploadEnabled:_,url:k}})),(0,m.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),d.withInstanceId,e=>class extends s.Component{constructor(e){super(...arguments),i()(this,"hideOverlay",(()=>{this.setState({interactive:!0})})),i()(this,"setRatingAndAllowDownload",(async()=>{const e=(0,y.get)(this.props,"attributes.id"),t=await this.requestMedia(e);let n=(0,y.get)(t,"jetpack_videopress.rating");const r=(0,y.get)(t,"jetpack_videopress.allow_download");n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r})})),i()(this,"schedulePreviewCacheReload",(()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout((()=>{e(t),this.previewCacheReloadTimer=null}),2e3*this.previewFailuresCount))})),i()(this,"fallbackToCore",(()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})})),i()(this,"setGuid",(async()=>{const{attributes:e,setAttributes:t}=this.props,{id:n}=e;if(n)try{const e=await this.requestMedia(n);if(null===e)return;const r=(0,y.get)(e,"jetpack_videopress.guid");r?(t({guid:r}),this.setTracks(r)):this.fallbackToCore()}catch(e){this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})})),i()(this,"requestMedia",(async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await c()({path:`/wp/v2/media/${e}`}).catch((()=>(this.setState({fallback:!0}),null))).finally((()=>{this.setState({isFetchingMedia:!1})})),{id:n}=this.props.attributes;return e!==n?null:(this.setState({media:t,lastRequestedMediaId:e}),t)})),i()(this,"setTracks",(e=>{const{setAttributes:t}=this.props;e&&c()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then((e=>{const n=[];Object.keys(e.tracks).forEach((t=>{for(const r in e.tracks[t]){const a=e.tracks[t][r];n.push({src:a.src,kind:t,srcLang:r,label:a.label})}})),t({videoPressTracks:n})}))})),i()(this,"switchToEditing",(()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),i()(this,"onSelectPoster",(e=>{const{setAttributes:t}=this.props;t({poster:e.url})})),i()(this,"onRemovePoster",(()=>{const{setAttributes:e}=this.props;e({poster:""}),this.posterImageButton.current.focus()})),i()(this,"toggleAttribute",(e=>t=>{this.props.setAttributes({[e]:t})})),i()(this,"getAutoplayHelp",(e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null)),i()(this,"onChangeRating",(e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==(0,y.indexOf)(["G","PG-13","R-17"],e)&&this.updateMetaApiCall({rating:e},(()=>this.setState({isUpdatingRating:!0,rating:e})),(()=>this.setState({rating:t})),(()=>this.setState({isUpdatingRating:!1})))})),i()(this,"onChangeAllowDownload",(e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},(()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e})),(()=>this.setState({allowDownload:t})),(()=>this.setState({isUpdatingAllowDownload:!1})))})),i()(this,"updateMetaApiCall",((e,t,n,r)=>{const{invalidateCachedEmbedPreview:a,url:o}=this.props,{id:i}=this.props.attributes;if(!i)return;t();const s={id:i};Object.assign(s,e),c()({path:"/wpcom/v2/videopress/meta",method:"POST",data:s}).then((e=>{status in e&&200!==e.status&&n()})).catch((()=>n())).finally((()=>{r(),a(o)}))})),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload},this.posterImageButton=(0,s.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:a,url:o,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let s=!1;if(o&&o!==e.url&&(n(o),s=!0),r){const e=(0,_.f)(r.html,k()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,a({videoPressClassNames:e})}else i||s||!this.props.attributes.guid||this.schedulePreviewCacheReload()}getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}renderControlLabelWithTooltip(e,t){return(0,s.createElement)(p.Tooltip,{text:t,position:"top"},(0,s.createElement)("span",null,e))}render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:o,preview:i,resumableUploadEnabled:l,setAttributes:c}=this.props,{fallback:u,fileForUpload:d,isFetchingMedia:m,isUpdatingRating:v,interactive:k,rating:y,allowDownload:w,isUpdatingAllowDownload:_}=this.state,{autoplay:A,caption:N,controls:I,guid:B,loop:M,muted:R,playsinline:L,poster:Z,preload:D,useAverageColor:F,videoPressTracks:O,isVideoPressExample:z,src:U}=t;if(z&&U)return(0,s.createElement)("img",{src:U,alt:N});const $=`video-block__poster-image-description-${n}`,H=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:O,onChange:e=>{c({videoPressTracks:e})},guid:B})),(0,s.createElement)(h.BlockControls,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-icon-button components-toolbar__control",label:__("Edit video","jetpack"),onClick:this.switchToEditing,icon:(0,s.createElement)(g.Z,{icon:b.Z})}))),(0,s.createElement)(h.InspectorControls,null,(0,s.createElement)(p.PanelBody,{title:__("Video Settings","jetpack")},(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),
71
  /* translators: Tooltip describing the "autoplay" option for the VideoPress player */
72
  __("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:A,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
83
  /* translators: Tooltip describing the "allow download" option for the VideoPress player */
84
  __("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:w,disabled:m||_})))),V=e=>{this.setState({fileForUpload:e[0]})},G=e=>{var t,n;e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:(null===(t=e.image)||void 0===t?void 0:t.src)!==e.icon?null===(n=e.image)||void 0===n?void 0:n.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):c({src:void 0,id:void 0,poster:void 0})},q=e=>{let{mediaId:t,guid:n,src:r}=e;this.setState({fileForUpload:null}),t&&n&&r&&c({id:t,guid:n,src:r})};if(null!==d&&d instanceof File)return(0,s.createElement)(x.Z,{onUploadFinished:q},(0,s.createElement)(s.Fragment,null,H,(0,s.createElement)(C.Z,a()({file:d},this.props))));const W=m||r,K=u||o||!B,X=K&&!o&&!W,J=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:o||W?"":"videopress-block-hide"},(0,s.createElement)(E.Z,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,s.createElement)("div",{className:X?"":"videopress-block-hide"},(0,s.createElement)(e,this.props)));if(K)return l?(0,s.createElement)(x.Z,{onFilesSelected:V,onMediaItemSelected:G},J):(0,s.createElement)(s.Fragment,null,J);const{html:Y,scripts:Q}=i||{html:null,scripts:null},ee=W||!i;return(0,s.createElement)(s.Fragment,null,H,ee&&(0,s.createElement)(E.Z,{text:__("Generating preview…","jetpack")}),!ee&&(0,s.createElement)(T,a()({},this.props,{hideOverlay:this.hideOverlay,html:Y,scripts:Q,interactive:k,caption:N})))}}]),"withVideoPressEdit")},65293:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{text:t}=e;return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(a.Spinner,null),(0,r.createElement)("p",null,t))}},69913:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(96342),o=n.n(a),i=n(65736),s=n(81975),l=n(53217),c=n(55609),u=n(52175),p=n(86955),d=n(47923);const __=i.__;function m(e){let{file:t}=e;const[n,a]=(0,r.useState)(0),[m,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),{onUploadFinished:k}=(0,r.useContext)(d.H),y=(0,r.useRef)(null);y.current=f;const E=(0,u.useBlockProps)({className:"resumable-upload"}),w=(0,r.useCallback)((()=>{const e=(0,l.J)({onError:e=>{v(e)},onProgress:(e,t)=>{a(e/t*100)},onSuccess:e=>{k(e)}});(0,l.v)().then((n=>{const r=e(t,n);g(r)})).catch((e=>{v(e)}))}),[t,k]);(0,r.useEffect)((()=>(w(),()=>{null!==y.current&&y.current.abort()})),[]);const _=Math.round(n),C={width:`${_}%`},S=(0,s.escapeHTML)(t.name),j=(0,r.createInterpolateElement)((0,i.sprintf)(
85
  /* translators: Placeholder is a video file name. */
86
+ __("Uploading <strong>%s</strong>","jetpack"),S),{strong:(0,r.createElement)("strong",null)}),x=o()(t.size);return(0,r.createElement)("div",E,(0,r.createElement)("div",{className:"resumable-upload__logo"},(0,r.createElement)(c.Icon,{icon:p.ll}),(0,r.createElement)("div",{className:"resumable-upload__logo-text"},__("VideoPress","jetpack"))),null!==b?(0,r.createElement)("div",{className:"resumable-upload__error"},(0,r.createElement)("div",{className:"resumable-upload__error-text"},__("An error was encountered during the upload. Check your network connection.","jetpack")),(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>(v(null),void w())},__("Try again","jetpack")),(0,r.createElement)(c.Button,{variant:"secondary",onClick:()=>k(),className:"resumable-upload__error-cancel"},__("Cancel","jetpack"))):(0,r.createElement)("div",{className:"resumable-upload__status"},(0,r.createElement)("div",{className:"resumable-upload__file-info"},(0,r.createElement)("div",{className:"resumable-upload__file-name"},j)," — ",(0,r.createElement)("div",{className:"resumable-upload__file-size"},x)),(0,r.createElement)("div",{className:"resumable-upload__progress"},(0,r.createElement)("div",{className:"resumable-upload__progress-loaded",style:C})),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)("div",{className:"videopress-upload__percent-complete"},`${_}%`),(0,r.createElement)(c.Button,{variant:"link",onClick:()=>{f&&(m?f.start():f.abort(),h(!m))}},m?"Resume":"Pause"))))}},53217:function(e,t,n){"use strict";n.d(t,{v:function(){return a},J:function(){return i}});var r=n(96731);const a=function(e){return new Promise((function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){n(e)}))}))},o={},i=e=>{let{onError:t,onProgress:n,onSuccess:i}=e;return(e,s)=>{const l=new r.gq(e,{onError:t,onProgress:n,endpoint:s.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:5e5,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,t){if(t.getStatus()>=400)return;const n=t.getHeader("x-videopress-upload-guid"),r=t.getHeader("x-videopress-upload-media-id"),a=t.getHeader("x-videopress-upload-src-url");if(n&&r&&a)return void(i&&i({mediaId:Number(r),guid:n,src:a}));const s={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},l={};Object.keys(s).forEach((function(e){const n=t.getHeader(e);n&&(l[s[e]]=n)})),l.key&&l.token&&(o[l.key]=l.token)},onBeforeRequest:function(e){const t=e._method;if(["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0),Object.keys(e._headers).map((function(t){e.setHeader(t,e._headers[t])})),"POST"===t){if(!!!s.token)throw"should never happen";e.setHeader("x-videopress-upload-token",s.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(o[r])e.setHeader("x-videopress-upload-token",o[r]);else if("HEAD"===t)return a(r).then((t=>(o[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return l.findPreviousUploads().then((function(e){e.length&&l.resumeFromPreviousUpload(e[0]),l.start()})),l}}},7223:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(89105),s=n.n(i),l=n(64850);t.Z=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:a,controls:i,guid:c,loop:u,muted:p,playsinline:d,poster:m,preload:h,videoPressClassNames:f,className:g,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E,maxWidth:w}={}}=t,_=o.useBlockProps.save({className:s()("wp-block-video",g,f,{[`align${b}`]:b})});if(!c)return e(t);const C=(0,l.p)(c,{autoplay:n,controls:i,loop:u,muted:p,playsinline:d,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E});let S={};return w&&w.length>0&&"100%"!==w&&(S={maxWidth:w,margin:"auto"}),(0,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:S},`\n${C}\n`),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))}),"withVideoPressSave")},36815:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=(n(99196),n(55609)),s=n(52175),l=n(65736);const __=l.__;class c extends o.Component{constructor(){super(...arguments),a()(this,"handleChangeSeekbarColor",(e=>{this.setState({seekbarColor:e})})),a()(this,"handleChangeSeekbarLoadingColor",(e=>{this.setState({seekbarLoadingColor:e})})),a()(this,"handleChangeSeekbarPlayedColor",(e=>{this.setState({seekbarPlayedColor:e})})),a()(this,"saveColors",(()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})}));const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.state,{toggleAttribute:r,useAverageColor:a}=this.props,l=!0;return(0,o.createElement)(i.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,o.createElement)(i.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:r("useAverageColor"),checked:a}),(0,o.createElement)(s.PanelColorSettings,{opened:!a,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:l},{value:n,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:l},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:l}]},(0,o.createElement)(i.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}t.Z=c},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(69307),a=n(86989),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(51789),u=n(9818);const __=i.__,p="subtitles",d=".vtt,text/vtt",m=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],h=(0,r.createElement)(s.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,r.createElement)(s.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(s.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,r.createElement)(s.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})),f=()=>"videoPressUploadTrack"in window;function g(e){let{tracks:t,onChange:n,guid:a}=e;const[l=-1,c]=(0,r.useState)(),u=e=>{const r=t[e];c(e),((e,t)=>{if(f())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const n={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return o()(n)})(r,a).finally((()=>{n(t.filter(((t,n)=>n!==e))),c(-1)}))};let p;return p=0===t.length?(0,r.createElement)("p",{className:"videopress-block-tracks-editor__tracks-informative-message"},__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")):t.map(((e,t)=>(0,r.createElement)("div",{key:t,className:"videopress-block-tracks-editor__track-list-track"},(0,r.createElement)("span",null,e.label),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,r.createElement)(s.Button,{variant:"link",isDestructive:!0,onClick:()=>{u(t)},"aria-label":(0,i.sprintf)(
87
  /* translators: %s: Label of the video text track e.g: "French subtitles" */
88
  __("Delete %s","jetpack"),e.label),disabled:l===t},l===t?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(s.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},p)}function b(e){let{track:t,guid:n,onChange:a,onClose:c,onCancel:h,trackExists:g}=e;const[b,v]=(0,r.useState)(),[k=!1,y]=(0,r.useState)(),{label:E="",srcLang:w="",kind:_=p}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,u.useSelect)((e=>e(l.store).getSettings().mediaUpload),[]))return null;return(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==C&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,C)),(0,r.createElement)(l.MediaUploadCheck,null,(0,r.createElement)(s.FormFileUpload,{onChange:e=>{const n=e.target.files;!n.length>0||(t.tmpFile=n[0],a(t))},accept:d,render:e=>{let{openFileDialog:t}=e;return(0,r.createElement)(s.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},
89
  /* translators: %s: The allowed file types to be uploaded as a video text track." */
91
  /* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
92
  __("Kind","jetpack"),onChange:e=>{a({...t,kind:e})},disabled:k}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,r.createElement)(s.Spinner,null):(0,r.createElement)(s.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{v(null),""===E&&(t.label=__("English","jetpack")),""===w&&(t.srcLang="en"),void 0===t.kind&&(t.kind=p),g(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),((e,t)=>{if(f())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const n={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return o()(n)})(t,n).then((()=>{a(t),v(null),c()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:h},__("Close","jetpack"))),b&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},
93
  /* translators: %s: An error message returned after a failed video track file upload." */
94
+ (0,i.sprintf)(__("Error: %s","jetpack"),b))))}function v(e){let{tracks:t=[],onChange:n,guid:a}=e;const[o,i]=(0,r.useState)(null);return(0,r.createElement)(s.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(s.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:n,icon:h})},renderContent:()=>null!==o?(0,r.createElement)(b,{track:t[o],guid:a,onChange:e=>{const r=[...t];r[o]=e,n(r)},onClose:()=>i(null),onCancel:()=>{n(t.filter(((e,t)=>t!==o))),i(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==o)).findIndex((t=>t.kind===e.kind&&t.srcLang===e.srcLang))}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)(g,{tracks:t,onChange:n,guid:a}),(0,r.createElement)(s.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(s.MenuItem,{icon:c.Z,onClick:()=>{(()=>{const e=t.length,r=[...t];r[e]||(r[e]={}),r[e]={...t[e]},n(r),i(e)})()}},__("Upload track","jetpack")))))})}},64850:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d},...m&&{useAverageColor:!0}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},61788:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(61434),a=n(89105),o=n.n(a);const i=e=>{const t=r.s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return o()(e,t)};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return i(t);const a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;const s=a.body.querySelector("iframe");if(s&&s.height&&s.width){const e=(s.width/s.height).toFixed(2);for(let n=0;n<r.s.length;n++){const a=r.s[n];if(e>=a.ratio)return o()(i(t),a.className,"wp-has-aspect-ratio")}}return t}},75872:function(e,t,n){"use strict";n.d(t,{U:function(){return i},m:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,i="mrec",s=[{height:250,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:__("Rectangle 300x250","jetpack"),tag:i,width:300,editorPadding:30},{height:90,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,r.createElement)(o.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},11655:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(41755);const __=i.__,l=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(o.PanelBody,{title:__("Visibility","jetpack")},(0,r.createElement)(o.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:n}))};t.Z=e=>{let{attributes:{format:t,hideMobile:n},setAttributes:o}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(s.Z,{value:t,onChange:e=>o({format:e})})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(l,{value:n,onChange:e=>o({hideMobile:!!e})})))}},72514:function(e,t,n){"use strict";var r=n(69307),a=n(11655),o=n(75872),i=n(72473),s=n(52203),l=n(38511),c=n(80405);t.Z=e=>{let{attributes:t,setAttributes:n}=e;const{format:u}=t,p=o.m.find((e=>{let{tag:t}=e;return t===u}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Z,{attributes:t,setAttributes:n}),(0,r.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${u}`},(0,r.createElement)("div",{className:"jetpack-wordads__ad",style:{width:p.width,height:p.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return s;case"mobile_leaderboard":return l;case"wideskyscraper":return c;default:return i}})(u)} )`,backgroundSize:"cover"}})))}},41755:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(75872);const s=(0,a.__)("Pick an ad format","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{position:"bottom right",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.ToolbarGroup,{controls:[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})),title:s,onClick:t,extraProps:{"aria-expanded":n},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},i.m.map((e=>{let{tag:i,name:s,icon:l}=e;return(0,r.createElement)(o.MenuItem,{className:i===t?"is-active":void 0,icon:l,isSelected:i===t,key:i,onClick:()=>{n(i),a()},role:"menuitemcheckbox"},s)})))}})}},74677:function(e,t,n){"use strict";n.d(t,{u2:function(){return c},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(72514),s=n(75872),l=n(4597);const __=a.__,_x=a._x,c="wordads",u=__("Ad","jetpack"),p=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),d={title:u,description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Earn income by adding high quality ads to your post","jetpack")),(0,r.createElement)(o.ExternalLink,{href:"https://wordads.co/"},__("Learn all about WordAds","jetpack"))),icon:{src:p,foreground:(0,l.m)()},attributes:{align:{type:"string",default:"center"},format:{type:"string",default:s.U},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:"earn",keywords:[_x("ads","block search term","jetpack"),"WordAds",_x("advertisement","block search term","jetpack")],supports:{align:["left","center","right"],alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:i.Z,save:()=>null}},5488:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"descript",title:"Descript",icon:o.h,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},697:function(e,t,n){"use strict";var r=n(92694),a=n(65736),o=n(4597);const __=a.__,_x=a._x,i={name:"facebook",title:"Facebook",icon:{src:"facebook",foreground:(0,o.m)()},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;const n=e.variations.filter((e=>e.name!==i.name));return e.variations=[...n,i],e}))},11382:function(e,t,n){"use strict";n(697),n(47855),n(4446),n(21242),n(5488),n(21021)},47855:function(e,t,n){"use strict";var r=n(92694),a=n(65736),o=n(4597),i=n(91978);const __=a.__,_x=a._x,s={name:"instagram",title:"Instagram",icon:{src:"instagram",foreground:(0,o.m)()},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!(0,i.Z)())return e;const n=e.variations.filter((e=>e.name!==s.name));return e.variations=[...n,s],e}))},4446:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"loom",title:"Loom",icon:o.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},21021:function(e,t,n){"use strict";var r,a,o=n(4981),i=n(65736),s=n(86955);const __=i.__,l={name:"pocketcasts",title:"Pocket Casts",icon:s.y$,keywords:[__("pocketcasts","jetpack"),__("podcast","jetpack")],description:__("Embed a Pocket Casts Player.","jetpack"),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocketcasts",responsive:!0}};!(null===(r=window)||void 0===r||null===(a=r.Jetpack_Editor_Initial_State.jetpack)||void 0===a||!a.pocket_casts_enabled)&&(0,o.registerBlockVariation)("core/embed",l)},21242:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(86955);const __=a.__,i={name:"smartframe",title:"SmartFrame",icon:o.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},82786:function(e,t,n){"use strict";var r=n(92694),a=n(4981),o=n(26863);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"jetpack_widget_social_icons"===t},transform:e=>{let{instance:t}=e,n=[];return t.raw.icons.forEach((e=>{const t=new URL(e.url.includes(":")?e.url:"https://"+e.url),r=t.hostname?t.hostname:t.protocol,i=o.Z.find((e=>r.includes(e.url)||e.url.includes(r))),s=(0,a.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});n=[...n,s]})),(0,a.createBlock)("core/social-links",{},n)}}]};(0,r.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=i),e}))},26863:function(e,t){"use strict";t.Z=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"pocket",url:["getpocket.com"]},{name:"reddit",url:["reddit.com"]},{name:"skype",url:["skype.com","skype:"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},96088:function(e,t,n){"use strict";n.d(t,{x:function(){return a},L:function(){return o}});var r=n(69307);const a=(0,r.createContext)(),o=e=>{let{onBannerVisibilityChange:t,onChildBannerVisibilityChange:n,hasParentBanner:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onBannerVisibilityChange:t,onChildBannerVisibilityChange:n,hasParentBanner:o},children:i})}},21559:function(e,t,n){"use strict";var r=n(92819),a=n(19416),o=n(47701),i=n.n(o),s=n(92694),l=n(65736),c=n(55149),u=n(39376),p=n(88058),d=n(73657);const __=l.__,m=[];(0,s.addFilter)("blocks.registerBlockType","jetpack/paid-block",((e,t)=>((0,a.X1)(t)&&(m.includes(t)||m.push(t),e.keywords=(0,r.uniq)([...e.keywords,"premium",__("premium","jetpack")]),(0,a.HD)(t)||(e.icon=(0,u.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0})),e))),(0,s.addFilter)("editor.BlockListBlock","jetpack/paid-block-with-warning",c.Z),(0,s.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",p.Z),(0,s.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",d.Z),i()((function(){(0,a.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},88058:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(52175),s=n(94333),l=n(19416),c=n(34168),u=n(96088);t.Z=(0,s.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,i.useBlockEditContext)(),r=(0,l.m3)(n);if(null==r||!r.mediaPlaceholder||!(0,l.X1)(n))return(0,o.createElement)(e,t);const{fileType:s}=r,{onError:p}=t,{onBannerVisibilityChange:d}=(0,o.useContext)(u.x),m=(0,o.useCallback)((e=>d((null==e?void 0:e.length)&&(0,c.Qu)(e[0],s))),[s,d]),h=(0,o.useCallback)((e=>{var t,n;const r=null==e||null===(t=e[0])||void 0===t||null===(n=t.props)||void 0===n?void 0:n.children;return(0,c.Qu)(r,s)?m([r]):p(e)}),[m,s,p]);return(0,o.createElement)("div",{className:"paid-block-media-placeholder"},(0,o.createElement)(e,a()({},t,{onFilesPreUpload:m,onError:h})))}),"withMediaPlaceholderUpgradable")},73657:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(19416),s=n(52175),l=n(94333),c=n(34168),u=n(96088);t.Z=(0,l.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n),l=(0,o.useRef)();if(null==r||!r.mediaReplaceFlow||!(0,i.X1)(n))return(0,o.createElement)(e,t);const{fileType:p}=r,{onBannerVisibilityChange:d}=(0,o.useContext)(u.x);return(0,o.createElement)(e,a()({},t,{onFilesUpload:e=>{l.current=null!=e&&e.length?e[0]:null,d((null==e?void 0:e.length)&&(0,c.Qu)(e[0],p))},createNotice:(e,n,r)=>{if((0,c.Qu)(l.current,p))return l.current=null,null;t.createNotice(e,n,r)}}))}),"withMediaReplaceFlowUpgradable")},90113:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{cx:t=23,cy:n=3,r:o=4,fill:i="#e34c84",stroke:s="#ffffff",strokeWidth:l="2"}=e;return(0,r.createElement)(a.Circle,{className:"jetpack-paid-block-symbol",cx:t,cy:n,r:o,fill:i,stroke:s,strokeWidth:l})}},39376:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(69307),a=n(19416),o=n(90113);const i=e=>{var t,n,a;return null!==(t=e)&&void 0!==t&&t.src?e={...e,src:(0,r.cloneElement)(e.src,{children:[e.src.props.children,(0,r.createElement)(o.Z,{key:"paid-symbol"})]})}:null!==(n=e)&&void 0!==n&&null!==(a=n.props)&&void 0!==a&&a.children&&(e=(0,r.cloneElement)(e,{children:[e.props.children,(0,r.createElement)(o.Z,{key:"paid-symbol"})]})),e};function s(e,t){return(0,a.X1)(e)?i(t):t}t.Z=i},28237:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(9818),i=n(28413),s=n(33347);const __=a.__,l=__("Premium Block","jetpack"),
95
  /** translators: %s: name of the plan. */
96
+ c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),__("Upgrade","jetpack"));t.ZP=e=>{let{onRedirect:t,align:n,className:p,title:d=l,description:m=null,buttonText:h=u,visible:f=!0,requiredPlan:g,context:b}=e;const[v,k,y]=(0,i.Z)(g,t),E=(0,o.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,a.sprintf)(c,n.product_name_short):null}),[m]);return E&&(0,r.createElement)(s.p,{align:n,buttonText:h,checkoutUrl:v,className:p,context:b,description:E,goToCheckoutPage:k,isRedirecting:y,title:d,visible:f})}},10710:function(e,t,n){"use strict";n.d(t,{v:function(){return a},W:function(){return o}});var r=n(63415);const a=e=>{let{plan:t,blockName:n,context:a}=e;r.Z.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:a})},o=e=>{let{plan:t,blockName:n,context:a}=e;r.Z.tracks.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:a})}},55149:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(19416),c=n(94333),u=n(9818),p=n(28237),d=n(96088),m=n(10710);t.Z=(0,c.createHigherOrderComponent)((e=>t=>{var n;const{name:r,className:i,clientId:c,isSelected:h,attributes:f,setAttributes:g}=t||{},{onChildBannerVisibilityChange:b,hasParentBanner:v}=(0,o.useContext)(d.x)||{},k=(0,l.Rl)(r);if(!k)return(0,o.createElement)(e,t);const y=(0,l.HD)(r),E=(0,l.m3)(r),[w,_]=(0,o.useState)(!y),[C,S]=(0,o.useState)(!1),[j,x]=(0,o.useState)(!1),P="editor-canvas",T=(0,u.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(c,!0)),[]),A=(h||T)&&w&&!j,N=(0,o.useMemo)((()=>({plan:k,blockName:r,context:P})),[k,r,P]);(0,o.useEffect)((()=>{A&&S(!0)}),[A,S]),(0,o.useEffect)((()=>{!C&&A&&(0,m.W)(N)}),[C,N,A]),(0,o.useEffect)((()=>_(!y)),[f,_,y]),(0,o.useEffect)((()=>{g({shouldDisplayFrontendBanner:!v})}),[g,v]),(0,o.useEffect)((()=>{b&&b(A||j)}),[A,j,b]);const I=s()(i,{"is-upgradable":A});return(0,o.createElement)(d.L,{onBannerVisibilityChange:_,onChildBannerVisibilityChange:x,hasParentBanner:!0},(0,o.createElement)(p.ZP,{className:`is-${t.name.replace(/\//,"-")}-paid-block`,title:null,align:null==t||null===(n=t.attributes)||void 0===n?void 0:n.align,visible:A,description:null==E?void 0:E.description,requiredPlan:k,context:P,onRedirect:()=>(0,m.v)(N)}),(0,o.createElement)(e,a()({},t,{className:I})))}),"withUpgradeBanner")},76847:function(e,t,n){"use strict";n.d(t,{u:function(){return d},X:function(){return m}});var r=n(69307),a=n(64481),o=n(55609),i=n(72067),s=n(9818),l=n(12238),c=n(72142),u=n(65736),p=n(63415);const __=u.__,d="payments",m={render:()=>{const e=(0,a.Z)("wpcom-payments-donations");return"page"!==(0,s.useSelect)((e=>e(l.store).getCurrentPostType()),[])?null:(0,r.createElement)(i.PluginPostPublishPanel,{className:"jetpack-payments-post-publish-panel",title:__("Start accepting payments","jetpack"),initialOpen:!0,icon:c.Z},(0,r.createElement)("p",null,__("Insert the Payment Button or the Donations Form — no plugin required.","jetpack")),(0,r.createElement)("p",null,(0,r.createElement)(o.ExternalLink,{href:e,onClick:()=>{p.Z.tracks.recordEvent("jetpack_editor_payments_post_publish_click")}},__("Learn more about these blocks","jetpack"))))}}},73310:function(e,t,n){"use strict";n.d(t,{D:function(){return m}});var r=n(69307),a=n(9818),o=n(12238),i=n(55609),s=n(65736),l=n(77953),c=n(2205),u=n(3779),p=n(86955);const __=s.__;function d(){const e=(0,r.useRef)(),[t,n]=(0,r.useState)();(0,r.useEffect)((()=>{if(null==e||!e.current)return;const t=e.current.querySelector("svg");if(!t)return;const r=(new XMLSerializer).serializeToString(t);n(`data:image/svg+xml;base64,${window.btoa(r)}`)}),[e]);const i=(0,a.useSelect)((e=>e(o.store).getPermalink()),[]),{dataUrl:s}=(0,c.Z)({generateDataUrl:!0}),u=s||t;return(0,r.createElement)("div",{ref:e},(0,r.createElement)(l.Z,{value:i,size:300,imageSettings:u&&{src:u,width:64,height:64},renderAs:"canvas",level:"H"}),(0,r.createElement)(p.IM,{className:"qr-post-jetpack-logo",size:48,border:2}))}function m(){const e=(0,r.useRef)(),t=(0,a.useSelect)((e=>e(o.store).getEditedPostSlug()),[]),[n,s]=(0,r.useState)(!1),l=()=>s(!1);return(0,r.createElement)("div",{className:"qr-post-button"},(0,r.createElement)(i.Button,{isSecondary:!0,onClick:()=>s((e=>!e))},__("Get QR code","jetpack")),n&&(0,r.createElement)(i.Modal,{title:__("QR Post code","jetpack"),onRequestClose:l,className:"qr-post-modal"},(0,r.createElement)("div",{className:"qr-post-modal__qr-code",ref:e},(0,r.createElement)(d,null)),(0,r.createElement)("div",{className:"qr-post-modal__actions_buttons"},(0,r.createElement)(i.Button,{isSecondary:!0,onClick:()=>(0,u.N)(t,e)},__("Download","jetpack")),(0,r.createElement)(i.Button,{isSecondary:!0,onClick:l},__("Close","jetpack")))))}},2205:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(69307),o=n(37798),i=n(92694);function s(){let{generateDataUrl:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(),{id:s,mediaItemData:l}=(0,r.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:r}=e(o.store),a=r("root","site"),i=n("root","__unstableBase"),s=null==a?void 0:a.site_logo,l=null==i?void 0:i.site_logo,c=t("update","settings")?s:l,u=c&&e(o.store).getMedia(c,{context:"view"});return{id:c,mediaItemData:u&&{mediaId:u.id,url:u.source_url,alt:u.alt_text}}}),[]);if(!s||null==l||!l.url)return{};if(!e)return{id:s,...l};const c=new Image,u=(0,i.applyFilters)("media.crossOrigin",void 0,l.url);return"string"==typeof u&&(c.crossOrigin=u),c.onload=function(){const e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.fillStyle="white",t.lineJoin="round",t.fillRect(0,0,e.width,e.height);const r=.08*e.width;t.drawImage(this,r,r,e.width-2*r,e.height-2*r);try{n(e.toDataURL("image/png"))}catch(e){console.warn("Error generating QR code extensions post-publish-qr-post-panel: ",e),console.warn("In case it's a cross-origin issue, take a look at https://developer.wordpress.org/block-editor/reference-guides/filters/editor-filters/#media-crossorigin"),n(null)}},c.src=l.url,{id:s,...l,dataUrl:t}}},70104:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(69307),a=n(55609),o=n(72067),i=n(65736),s=n(9818),l=n(12238),c=n(3093),u=n(73310);const __=i.__,p="post-publish-qr-post-panel",d={render:function(){const e={name:"post-publish-qr-post-panel",title:__("QR Code","jetpack"),className:"post-publish-qr-post-panel",icon:null,initialOpen:!0},t=(0,s.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);function n(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("p",null,__("Take advantage of the QR code to open the post from different devices.","jetpack"))),(0,r.createElement)(u.D,null))}return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PluginPostPublishPanel,e,(0,r.createElement)(n,null)),t&&(0,r.createElement)(c.Z,null,(0,r.createElement)(a.PanelBody,e,(0,r.createElement)(n,null))))}}},3779:function(e,t,n){"use strict";function r(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return;if(null==t||!t.current)return;const r=t.current.querySelector("canvas");r&&r.toBlob((t=>{const r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.setAttribute(n?"download":"target",`qr-post-${e}.png`),a.click()}))}n.d(t,{N:function(){return r}})},74184:function(e,t,n){"use strict";var r=n(69307),a=n(11268),o=n.n(a),i=n(86955);const s=e=>{const{id:t,serviceName:n,label:a,profilePicture:o}=e;return(0,r.createElement)("label",{htmlFor:t,className:"jetpack-publicize-connection-label"},(0,r.createElement)("div",{className:o?"components-connection-icon__picture":""},o&&(0,r.createElement)("img",{src:o,alt:a}),(0,r.createElement)(i.av,{serviceName:n,className:"jetpack-publicize-gutenberg-social-icon"})),(0,r.createElement)("span",{className:"jetpack-publicize-connection-label-copy"},a))};s.propTypes={id:o().string.isRequired,serviceName:o().string,label:o().string,profilePicture:o().string},t.Z=s},75817:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(11268),s=n.n(i),l=n(55609),c=n(74184);const u=e=>{const{className:t,checked:n,id:a,disabled:i,onChange:s,serviceName:u,label:p,profilePicture:d}=e,m=o()("components-connection-toggle",{"is-not-checked":!n,"is-disabled":i});return(0,r.createElement)("div",{className:m},(0,r.createElement)(c.Z,{id:a,serviceName:u,label:p,profilePicture:d}),(0,r.createElement)(l.FormToggle,{id:a,className:t,checked:n,onChange:s,disabled:i}))};u.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string},t.Z=u},84533:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(94333),c=n(9818);const __=i.__;class u extends o.Component{constructor(){super(...arguments),a()(this,"refreshConnectionClick",(e=>{const{href:t,title:n}=e.target;e.preventDefault();const r=window.open(t,n,""),a=window.setInterval((()=>{!1!==r.closed&&(window.clearInterval(a),this.props.refreshConnections())}),500)}))}componentDidMount(){this.props.refreshConnections()}renderRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>e.can_refresh));return t.length?(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,__("Before you hit Publish, please refresh the following connection(s) to make sure we can Publicize your post:","jetpack")),t.map((e=>(0,o.createElement)(s.Button,{href:e.refresh_url,isSmall:!0,key:e.id,onClick:this.refreshConnectionClick,title:e.refresh_text},e.refresh_text)))):null}renderNonRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>!e.can_refresh));return t.length?t.map((e=>(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,e.test_message)))):null}render(){return(0,o.createElement)(o.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}t.Z=(0,l.compose)([(0,c.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections()}))),(0,c.withDispatch)((e=>({refreshConnections:e("jetpack/publicize").refreshConnectionTestResults})))])(u)},82578:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(9818),c=n(92819),u=n(19416),p=n(75817);const __=i.__;class d extends o.Component{constructor(){super(...arguments),a()(this,"maybeDisplayLinkedInNotice",(()=>this.connectionNeedsReauth()&&(0,o.createElement)(s.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},(0,o.createElement)("p",null,__("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),(0,o.createElement)(s.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,u.lQ)()}`},__("Go to Sharing settings","jetpack"))))),a()(this,"connectionNeedsReauth",(()=>(0,c.includes)(this.props.mustReauthConnections,this.props.name))),a()(this,"onConnectionChange",(()=>{const{id:e}=this.props;this.props.toggleConnection(e)}))}connectionIsFailing(){const{failedConnections:e,name:t}=this.props;return e.some((e=>e.service_name===t))}render(){const{disabled:e,enabled:t,id:n,label:r,name:a,profilePicture:i}=this.props,l="connection-"+a+"-"+n,c=a.replace("_","-");let u=(0,o.createElement)(p.Z,{id:l,className:"jetpack-publicize-connection-toggle",checked:t,onChange:this.onConnectionChange,disabled:e,serviceName:c,label:r,profilePicture:i});return(e||this.connectionIsFailing()||this.connectionNeedsReauth())&&(u=(0,o.createElement)(s.Disabled,null,u)),(0,o.createElement)("li",null,this.maybeDisplayLinkedInNotice(),(0,o.createElement)("div",{className:"publicize-jetpack-connection-container"},u))}}t.Z=(0,l.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()})))(d)},87322:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(82578),i=n(43112),s=n(71042),l=n(81647),c=n(78402);function u(e){let{isPublicizeEnabled:t,isRePublicizeFeatureEnabled:n,isPublicizeDisabledBySitePlan:u}=e;const{connections:p,toggleById:d,hasConnections:m}=(0,l.Z)(),{message:h,updateMessage:f,maxLength:g}=(0,c.Z)();const b=u?a.Disabled:r.Fragment;return(0,r.createElement)(b,null,m&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("ul",{className:"jetpack-publicize__connections-list"},p.map((e=>{let{display_name:a,enabled:i,id:s,service_name:l,toggleable:c,profile_picture:p}=e;return(0,r.createElement)(o.Z,{disabled:n?!t:!c,enabled:i&&!u,key:s,id:s,label:a,name:l,toggleConnection:d,profilePicture:p})})))),!u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,null),p.some((e=>e.enabled))&&(0,r.createElement)(s.Z,{disabled:!n&&p.every((e=>!e.toggleable)),maxLength:g,onChange:f,message:h})))}},71042:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__,_n=a._n;function i(e){let{message:t="",onChange:n,disabled:i,maxLength:s}=e;const l=s-t.length;return(0,r.createElement)(o.TextareaControl,{value:t,onChange:n,disabled:i,maxLength:s,placeholder:__("Write a message for your audience here.","jetpack"),rows:4,help:(0,a.sprintf)(
97
  /* translators: placeholder is a number. */
98
+ _n("%d character remaining","%d characters remaining",l,"jetpack"),l)})}},11514:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(12238),s=n(9818),l=n(84533),c=n(87322),u=n(39290),p=n(81647),d=n(67785),m=n(73542),h=n(87052),f=n(25042);const __=a.__;t.Z=e=>{let{prePublish:t}=e;const{refresh:n,hasConnections:a,hasEnabledConnections:g}=(0,p.Z)(),b=(0,s.useSelect)((e=>e(i.store).isCurrentPostPublished()),[]),{isRePublicizeFeatureEnabled:v,isPublicizeEnabled:k,togglePublicizeFeature:y,isPublicizeDisabledBySitePlan:E,hideRePublicizeFeature:w}=(0,m.Z)(),_=k&&!E;(0,d.M)((function(){g&&n()}),[g,n]);const C=E?o.Disabled:o.PanelRow,S=t?r.Fragment:o.PanelBody,j=t?{}:{title:__("Share this post","jetpack"),className:E?"jetpack-publicize-disabled":""};return(0,r.createElement)(S,j,(0,r.createElement)(f.Z,{isPostPublished:b}),!w&&(0,r.createElement)(r.Fragment,null,v&&!b&&(0,r.createElement)(C,null,(0,r.createElement)(o.ToggleControl,{className:"jetpack-publicize-toggle",label:_&&!E?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:y,checked:_,disabled:!a})),(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,{isPublicizeEnabled:_,isRePublicizeFeatureEnabled:v,isPublicizeDisabledBySitePlan:E}),!E&&(0,r.createElement)(u.Z,{prePublish:t}),(0,r.createElement)(h.o,null)))}},43112:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(92819),o=n(75031),i=n(19416),s=n(65736),l=n(55609),c=n(81647);const __=s.__;function u(){const{refresh:e}=(0,c.Z)(),t=(0,i.lQ)(),n=(0,a.debounce)((function(t){t&&e()}),2e3),s=t?`https://wordpress.com/marketing/connections/${t}`:"options-general.php?page=sharing&publicize_popup=true";return(0,r.createElement)(o.Z,{onChange:n},(0,r.createElement)("div",{className:"jetpack-publicize-add-connection-wrapper"},(0,r.createElement)(l.ExternalLink,{href:s,target:"_blank"},__("Connect an account","jetpack"))))}},87052:function(e,t,n){"use strict";n.d(t,{o:function(){return h}});var r=n(69307),a=n(65736),o=n(55609),i=n(9818),s=n(53961),l=n(12238),c=n(52618),u=n(81647),p=n(73542);const __=a.__;function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Unable to share the Post","jetpack");const{createErrorNotice:t}=(0,i.dispatch)(s.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,u.Z)(),{isPublicizeEnabled:t}=(0,p.Z)(),{isFetching:n,isError:a,isSuccess:m,doPublicize:h}=(0,c.Z)(),f=(0,i.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);(0,r.useEffect)((()=>{if(!n)return a?d():void(m&&function(){const{createSuccessNotice:e}=(0,i.dispatch)(s.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,a,m]);const g=!t||!e||!f||n;return(0,r.createElement)(o.Button,{variant:"secondary",onClick:function(){if(!f)return d(__("You must publish your post before you can share it.","jetpack"));(0,i.dispatch)(s.store).removeNotice("publicize-post-share-message"),h()},disabled:g,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeFeatureEnabled:e,isRePublicizeUpgradableViaUpsell:t}=(0,p.Z)(),n=(0,i.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);return e&&n?t?null:(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(m,null)):null}},76370:function(e,t,n){"use strict";n.d(t,{nE:function(){return l},H8:function(){return c}});var r=n(69307),a=n(94333),o=n(9818),i=n(92694),s=n(86395);const l={"core/gallery":{contentAttributes:["images"]},"core/heading":{contentAttributes:["content"]},"core/image":{contentAttributes:["alt","url"]},"core/list":{contentAttributes:["values"]},"core/paragraph":{contentAttributes:["content"]},"core/quote":{contentAttributes:["value","citation"]},"core/separator":{contentAttributes:[]},"core/spacer":{contentAttributes:[]},"core/verse":{contentAttributes:["content"]},"core/video":{contentAttributes:["src"]},"core/embed":{contentAttributes:["url"]},"jetpack/gif":{contentAttributes:["giphyUrl"]}},c=["core/column","core/columns","core/group"];(0,i.addFilter)("blocks.registerBlockType","jetpack/publishing-tweetstorms",(e=>{const{edit:t}=e;return{...e,edit:e=>(0,r.createElement)(s.Z,{ChildEdit:t,childProps:e})}}));t.ZP=(0,a.compose)([(0,o.withSelect)((e=>({isTweetStorm:e("jetpack/publicize").isTweetStorm(),isTyping:e("core/block-editor").isTyping()})))])((e=>{let{isTweetStorm:t,isTyping:n}=e;return t?document.body.classList.add("jetpack-tweetstorm"):document.body.classList.remove("jetpack-tweetstorm"),t&&n?document.body.classList.add("jetpack-tweetstorm-is-typing"):document.body.classList.remove("jetpack-tweetstorm-is-typing"),null}))},39290:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(9818);n(42998);const __=a.__;t.Z=(0,i.compose)([(0,s.withSelect)((e=>{const{isTweetStorm:t,getTweetStorm:n}=e("jetpack/publicize");return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),isTweetStorm:t(),tweetStormLength:n().length}})),(0,s.withDispatch)((e=>({setTweetstorm:t=>{e("core/editor").editPost({meta:{jetpack_is_tweetstorm:t}}),t?e("jetpack/publicize").refreshTweets():(e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm"),e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm-line-break"))}})))])((e=>{let{connections:t,isTweetStorm:n,tweetStormLength:a,setTweetstorm:i,prePublish:s}=e;if(null==t||!t.some((e=>"twitter"===e.service_name&&e.enabled)))return null;const l=(e,t)=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,e),(0,r.createElement)("br",null),t),c=[];return a>=102?c.push({id:"jetpack-publicize-twitter-tweetstorm-too-long",status:"error",content:__("Only the first 100 tweets of this post will be published in the Twitter thread.","jetpack"),isDismissible:!1}):a>=22?c.push({id:"jetpack-publicize-twitter-tweetstorm-a-bit-long",status:"warning",content:__("This post will create a Twitter thread more than 20 tweets long.","jetpack"),isDismissible:!1}):s&&a<=2&&c.push({id:"jetpack-publicize-twitter-tweetstorm-too-short",status:"warning",content:__("None of the content in this post could be transformed into tweets, it may be better to share as a single tweet.","jetpack"),isDismissible:!1}),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.RadioControl,{label:__("Twitter settings","jetpack"),selected:n?"tweetstorm":"single",options:[{label:l(__("Single Tweet","jetpack"),__("Share a link to this post to Twitter.","jetpack")),value:"single"},{label:l(__("Twitter Thread","jetpack"),__("Share the content of this post as a Twitter thread.","jetpack")),value:"tweetstorm"}],onChange:e=>{i("tweetstorm"===e)}}),n&&(0,r.createElement)(o.NoticeList,{className:"jetpack-publicize-twitter-options__notices",notices:c}))}))},86395:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(55609),i=n(94333),s=n(9818),l=(n(42998),n(86955));class c extends r.Component{componentDidMount(){const{isTweetStorm:e,updateTweets:t}=this.props;e&&t()}componentDidUpdate(e){const{boundaries:t,childProps:n,currentAnnotations:r,isTweetStorm:o,updateAnnotations:i,updateTweets:s,supportedBlockType:l,contentAttributesChanged:c}=this.props;o&&l&&(c(e.childProps,n)&&s(),r.length===t.filter((e=>["normal","line-break"].includes(e.type))).length&&(0,a.isEqual)(e.boundaries,t)||i())}render(){const{ChildEdit:e,childProps:t,isTweetStorm:n,isSelectedTweetBoundary:a,boundaryStylesSelectors:i,popoverWarnings:s}=this.props;return n?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),a&&(0,r.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider"},(0,r.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider-icon"},(0,r.createElement)(l.av,{serviceName:"twitter"})),s.length>0&&(0,r.createElement)(o.Popover,{className:"jetpack-publicize-twitter__tweet-divider-popover",focusOnMount:!1,position:"bottom center"},(0,r.createElement)("ol",null,s.map(((e,t)=>(0,r.createElement)("li",{key:`jetpack-publicize-twitter__tweet-divider-popover-warning-${t}`},e)))))),i&&(0,r.createElement)("style",{type:"text/css"},i.map((e=>`${e}::after {\n\t\t\t\t\t\t\t\tcontent: "";\n\t\t\t\t\t\t\t\tbackground: #0009;\n\t\t\t\t\t\t\t\twidth: 3px;\n\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\tmargin: 0 1px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.is-dark-theme ${e}::after {\n\t\t\t\t\t\t\t\tbackground: #fff9;\n\t\t\t\t\t\t\t}`)))):(0,r.createElement)(e,t)}}t.Z=(0,i.compose)([(0,s.withSelect)(((e,t)=>{let{childProps:n}=t;const{isTweetStorm:r,getPopoverWarnings:a,getBoundariesForBlock:o,getBoundaryStyleSelectors:i,isSelectedTweetBoundary:s,getSupportedBlockType:l,contentAttributesChanged:c}=e("jetpack/publicize"),u=e("core/annotations").__experimentalGetAllAnnotationsForBlock(n.clientId);return{isTweetStorm:r(),isSelectedTweetBoundary:s(n),boundaries:o(n.clientId),boundaryStylesSelectors:i(n.clientId),popoverWarnings:a(n),currentAnnotations:u,supportedBlockType:l(n.name),contentAttributesChanged:c}})),(0,s.withDispatch)(((e,t,n)=>{let{childProps:r}=t,{select:a}=n;return{updateTweets:()=>e("jetpack/publicize").refreshTweets(),updateAnnotations:()=>{const{contentAttributesChanged:t,getTweetsForBlock:n}=a("jetpack/publicize"),o=n(r.clientId);if(!o||0===o.length)return;if(t(o.reduce(((e,t)=>e||t.blocks.find((e=>e.clientId===r.clientId))),!1),r))return;a("core/annotations").__experimentalGetAllAnnotationsForBlock(r.clientId).forEach((t=>{["jetpack-tweetstorm","jetpack-tweetstorm-line-break"].includes(t.source)&&e("core/annotations").__experimentalRemoveAnnotation(t.id)}));o.filter((e=>e.boundary)).map((e=>e.boundary)).forEach((t=>{const{container:n,type:a,start:o,end:i}=t;"normal"===a?e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm",richTextIdentifier:n,range:{start:o,end:i}}):"line-break"===a&&e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm-line-break",richTextIdentifier:n,range:{start:o,end:i}})}))}}}))])(c)},25042:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(19416),s=n(65736),l=n(55609),c=n(49169),u=n(28413),p=n(73542),d=n(81647);const __=s.__;function m(e){let{isPostPublished:t}=e;const{isRePublicizeFeatureEnabled:n,isRePublicizeUpgradableViaUpsell:a,isRePublicizeFeatureAvailable:m,isPublicizeEnabled:h}=(0,p.Z)(),f=(0,i.Rl)("republicize"),[g,b,v,k]=(0,u.Z)(f),{hasConnections:y,hasEnabledConnections:E}=(0,d.Z)(),w=h&&!(a&&n);if(!t||!n||t&&m)return(0,r.createElement)("div",null,function(e,t,n,r,a){const o=__("Start sharing your posts by connecting your social media accounts.","jetpack"),i=__("This post will be shared on all your enabled social media accounts the moment you publish the post.","jetpack");return t?r?n&&a?n&&a&&!e?i:__("Share this post on all your enabled social media accounts by clicking on the share post button.","jetpack"):__("Use this tool to share your post on all your social media accounts.","jetpack"):o:e?o:i}(t,n,w,y,E));const _=(null==k?void 0:k.product_name)||__("paid","jetpack"),C=!(0,i.Ug)()&&!(0,i.Wp)(),S=C?__("Re-sharing your content","jetpack"):__("Share Your Content Again","jetpack",0),j=C?"https://jetpack.com/support/publicize/#re-sharing-your-content":"https://wordpress.com/support/publicize/#share-your-content-again",x=__("Upgrade now","jetpack");return m||a?(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("div",{className:"jetpack-publicize__upsell-description"},(0,s.sprintf)(
99
  /* translators: placeholder is the product name of the plan. */
100
  __("To re-share a post, you need to upgrade to the %s plan","jetpack"),_)),(0,r.createElement)(l.Button,{href:v?null:g,onClick:b,target:"_top",icon:c.Z,className:o()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!g}),isBusy:v},v?__("Redirecting…","jetpack"):x)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,S),(0,r.createElement)("br",null),(0,s.sprintf)(
101
  /* translators: placeholder is the product name of the plan. */
102
+ __("This feature is for sites with a %s plan.","jetpack"),_),(0,r.createElement)("br",null),(0,r.createElement)(l.ExternalLink,{href:j},__("More information.","jetpack")))}},73542:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(12238),o=n(19416);const i="republicize";function s(){var e,t;const{togglePublicizeFeature:n}=(0,r.useDispatch)("jetpack/publicize"),{available:s}=(0,o.OZ)(i),l=(0,r.useSelect)((e=>e(a.store).isCurrentPostPublished()),[]),c=(0,r.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),u=!(null===(e=window)||void 0===e||null===(t=e.Jetpack_Editor_Initial_State.jetpack)||void 0===t||!t.republicize_enabled),p=(0,o.X1)(i);return{isPublicizeEnabledMeta:c,isRePublicizeFeatureEnabled:u,isPublicizeEnabled:l&&!(p&&u)||c,togglePublicizeFeature:n,isPublicizeDisabledBySitePlan:u&&l&&p,isRePublicizeFeatureAvailable:s,isRePublicizeUpgradableViaUpsell:p,hideRePublicizeFeature:l&&!s&&!p&&u}}},67785:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(94333),a=n(12238),o=n(9818),i=n(69307);function s(e,t){const n=(0,o.useSelect)((e=>e(a.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{s&&!n&&e()}),[n,s,e,t])}},52618:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(86989),a=n.n(r),o=n(9818),i=n(12238),s=n(69307),l=n(65736),c=n(78402),u=n(81647);const __=l.__;function p(e){var t;const n=null==e?void 0:e.code,r=null==e||null===(t=e.errors)||void 0===t?void 0:t.length;if(!n&&!r)return!1;let a="";return n&&(a=__("Unable to share the Post","jetpack")),r&&(a=__("Unable to share the Post","jetpack")),{message:a,result:e}}function d(e){const{message:t}=(0,c.Z)(),{skippedConnections:n}=(0,u.Z)(),r=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||r;const[l,d]=(0,s.useState)({data:[],error:{}}),m=(0,s.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!l.isFetching)return d({...r,isFetching:!0}),a()({path:`/wpcom/v2/posts/${e}/publicize`,method:"POST",data:{message:t,skipped_connections:n}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return d((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));d((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:null==e?void 0:e.results,error:{}})))})).catch((e=>{d((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){d(r)}}),[e,t,n,l.isFetching]);return{...l,doPublicize:m}}},81647:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)("jetpack/publicize"),n=(0,r.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=n.filter((e=>!e.enabled)).map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:n&&n.some((e=>e.enabled)),skippedConnections:a,toggleById:t,refresh:e}}},78402:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818),a=n(12238);function o(){const{editPost:e}=(0,r.useDispatch)(a.store),{message:t,maxLength:n}=(0,r.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:n,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},60419:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(72067),i=n(12238),s=(n(95552),n(76370)),l=n(3093),c=n(11514);const __=a.__,u="publicize",p={render:()=>(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(s.ZP,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(c.Z,null)),(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack"))},(0,r.createElement)(c.Z,{prePublish:!0})))}},54525:function(e,t,n){"use strict";n.r(t),n.d(t,{refreshConnectionTestResults:function(){return a},toggleConnectionById:function(){return o},togglePublicizeFeature:function(){return i},fetchFromAPI:function(){return s},refreshTweets:function(){return l},setTweets:function(){return c},getTwitterCards:function(){return u},setTwitterCards:function(){return p}});var r=n(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function i(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function s(e){return{type:"FETCH_FROM_API",path:e}}function l(){return{type:"REFRESH_TWEETS"}}function c(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,r.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function p(e){return{type:"SET_TWITTER_CARDS",cards:e}}},70555:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},14297:function(e,t,n){"use strict";var r=n(92819),a=n(86989),o=n.n(a),i=n(4981),s=n(9818),l=n(12238),c=n(76370);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,s.select)("jetpack/publicize");return(0,r.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:c.H8.includes(e.name)?u(e.innerBlocks):[]}))};const p=(0,r.throttle)((async function(){const e=(0,s.select)("core/editor").getBlocks(),t=u(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,i.serialize)(e),clientId:e.clientId})))},method:"POST"}),n=(0,r.flatMap)(e,(e=>e.urls));return(0,s.dispatch)("jetpack/publicize").getTwitterCards(n),(0,s.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0});t.ZP={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{const e=await o()({path:"/wpcom/v2/publicize/connection-test-results"}),t=(0,s.select)("jetpack/publicize").getConnections(),n=e,r=[],a={done:!1,enabled:!0,toggleable:!0};for(const e of n){const n=t.find((t=>t.id===e.id)),{done:o,enabled:i,toggleable:s}=null!=n?n:a,l={display_name:e.display_name,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:o,enabled:i,toggleable:s};r.push(l)}return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:r})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const n=(0,s.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:e.id===t?!e.enabled:e.enabled})));return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:n})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,s.select)("jetpack/publicize").getFeatureEnableState();return(0,s.dispatch)(l.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:p,GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,s.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,s.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},95552:function(e,t,n){"use strict";var r=n(9818),a=n(54525),o=n(91247),i=n(79948),s=n(70555),l=n(52486);const c=(0,r.registerStore)("jetpack/publicize",{actions:a,controls:s.Z,reducer:l.Z,selectors:o});(0,i.Z)(c)},79948:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(14297);function s(e){const t=[a()(i.ZP)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},52486:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const n={};return t.urls.forEach((e=>n[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...n}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},91247:function(e,t,n){"use strict";n.r(t),n.d(t,{getFailedConnections:function(){return u},getMustReauthConnections:function(){return p},getTweetTemplate:function(){return d},getTweetStorm:function(){return m},getFirstTweet:function(){return h},getLastTweet:function(){return f},getSupportedBlockType:function(){return g},getTweetsForBlock:function(){return b},getTwitterCardForURLs:function(){return v},twitterCardIsCached:function(){return k},getShareMessage:function(){return y},getShareMessageMaxLength:function(){return E},isTweetStorm:function(){return w},getBoundariesForBlock:function(){return _},getBoundaryStyleSelectors:function(){return S},checkForTagsInContentAttributes:function(){return j},getPopoverWarnings:function(){return x},isSelectedTweetBoundary:function(){return P},contentAttributesChanged:function(){return T},getConnections:function(){return A},getFeatureEnableState:function(){return N}});var r=n(92819),a=n(19551),o=n(9818),i=n(65736),s=n(12238),l=n(76370);const __=i.__,c="\n\n"+__("A thread ⬇️","jetpack");function u(){return A().filter((e=>!1===e.test_success))}function p(){return A().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function d(e){const t=e.connections||A(),n=null==t?void 0:t.find((e=>"twitter"===e.service_name));return{date:Date.now(),name:(null==n?void 0:n.profile_display_name)||__("Account Name","jetpack"),profileImage:(null==n?void 0:n.profile_picture)||"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:(null==n?void 0:n.display_name)||""}}function m(e){const t=d(e),n=[h(e),...e.tweets.slice(0,100).map((n=>({...t,text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,card:v(e,n.urls)})))];return n.length>1&&n.push(f(e)),n}function h(e){var t,n,r,a;if(!(0,o.select)("core"))return;const i=d(e),{getMedia:s}=(0,o.select)("core"),{getEditedPostAttribute:l}=(0,o.select)("core/editor"),c=l("featured_media"),u=l("link"),p=c&&s(c),m=(null==p||null===(t=p.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||(null==p?void 0:p.source_url);return{...i,text:y()+` ${u}`,urls:[u],card:{title:l("title"),description:(null===(a=l("meta"))||void 0===a?void 0:a.advanced_seo_description)||l("excerpt")||l("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:u,image:m,type:m?"summary_large_image":"summary"}}}function f(e){if(!(0,o.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,o.select)("core/editor"),n=t("link"),r=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...h(e),text:`${r} ${n}`}}function g(e,t){if(l.nE[t])return l.nE[t]}const b=(0,a.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function v(e,t){if(t)return t.reduce(((t,n)=>t||(e.twitterCards[n]&&!e.twitterCards[n].error?{url:n,...e.twitterCards[n]}:void 0)),void 0)}function k(e,t){return!!e.twitterCards[t]}function y(){const{getEditedPostAttribute:e}=(0,o.select)("core/editor"),t=e("meta"),n=e("title"),a=(0,r.get)(t,["jetpack_publicize_message"],"");return a?a.substr(0,E()):w()&&n?n.substr(0,E())+c:""}function E(){return w()?255-c.length:255}function w(){var e;return!(null===(e=(0,o.select)("core/editor").getEditedPostAttribute("meta"))||void 0===e||!e.jetpack_is_tweetstorm)}const _=(0,a.Z)(((e,t)=>{if(!w())return[];const n=b(e,t);return n&&0!==n.length?n.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function C(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const n=e.parentNode,r=Array.prototype.indexOf.call(n.children,e);return C(n,t)+` > :nth-child( ${r+1} )`}const S=(0,a.Z)(((e,t)=>{const n=_(e,t),r=document.getElementById(`block-${t}`);return n.filter((e=>"end-of-line"===e.type)).map((e=>{if(!r)return!1;const n=r.getElementsByTagName("li").item(e.line);return!!n&&C(n,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function j(e,t,n){var r;if(0===n.length)return!1;if(null===(r=g(0,t.name))||void 0===r||!r.contentAttributes)return!1;const a=new RegExp(`<(${n.join("|")})( |>|/>)`,"gi");return g(0,t.name).contentAttributes.reduce(((e,n)=>!!e||a.test(t.attributes[n])),!1)}const x=(0,a.Z)(((e,t)=>{const{isTyping:n,isDraggingBlocks:r,isMultiSelecting:a,hasMultiSelection:i,isCaretWithinFormattedText:s}=(0,o.select)("core/block-editor");if(!w())return[];if(n()||r()||a()||i()||s())return[];const c=[];return g(0,t.name)||l.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&c.push(__("Twitter displays the first four images.","jetpack")),j(0,t,["strong","bold","em","i","sup","sub","span","s"])&&c.push(__("Twitter removes all text formatting.","jetpack")),j(0,t,["a"])&&c.push(__("Links will be posted seperately.","jetpack"))):c.push(__("This block is not exportable to Twitter","jetpack")),c}),(e=>[e.tweets]));function P(e,t){const{isBlockSelected:n}=(0,o.select)("core/block-editor");if(!w())return!1;const r=g(0,t.name),a=b(e,t.clientId);if(!a||0===a.length)return!1;const i=a[a.length-1];return n(t.clientId)&&!r||i.blocks[i.blocks.length-1].clientId===t.clientId&&a.some((e=>e.blocks.some((e=>n(e.clientId)))))}function T(e,t,n){const a=g(0,n.name);if(!a)return!1;const o=a.contentAttributes;return!(0,r.isEqual)(o.map((e=>({attribute:e,content:t.attributes[e]}))),o.map((e=>({attribute:e,content:n.attributes[e]}))))}function A(){return(0,o.select)(s.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function N(){const{getEditedPostAttribute:e}=(0,o.select)(s.store),t=e("meta");return(0,r.get)(t,["jetpack_publicize_feature_enabled"],!0)}},47370:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(65736),i=n(12238),s=n(9818),l=n(31060);const __=o.__;function c(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(a.CheckboxControl,{label:__("Show sharing buttons.","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}function u(){const e=(0,s.useSelect)((e=>e(i.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,s.useDispatch)(i.store);return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,(0,r.createElement)(c,{checked:e,onChange:t})))}},88189:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(47370);const a="sharing",o={render:r.Z}},60001:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},38817:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(19416),s=n(86955);const __=o.__;(0,i.Wp)()||(0,i.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},85728:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}function o(e){try{var t;return!(null==e||null===(t=e.parent)||void 0===t||!t.location.href)}catch(e){return!1}}function i(e,t){var n;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=[];if(!t||!e&&!e.length||!a(t))return s;const{currentDoc:l,currentWindow:c}=r(t);if(!o(c))return s;const u=null==c||null===(n=c.parent)||void 0===n?void 0:n.document;return l&&u?(s=e.filter((e=>{const t=u.querySelector(e),n=!!l.querySelector(e);return!(!t||n)&&(l.head.appendChild(t.cloneNode()),i&&t.remove(),!0)})),s):void 0}function s(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return s();const l=o.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${n}-${e.version}.${r}`,l.onload=s,i.appendChild(l)}}))}function l(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{bL:function(){return r},DT:function(){return i},Pp:function(){return s},Dz:function(){return l}})},4597:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(19416);const a=n(27655).O["Jetpack Green 40"];function o(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},8909:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),a=n.n(r),o=n(92819);function i(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,o.find)(e,{name:t});if(r)return r}return(0,o.find)(e,"isDefault")}(e,t);return n?n.name:null}},71343:function(e,t,n){"use strict";var r=n(94502),a=n.n(r),o=n(69307),i=n(65736),s=n(55609);const __=i.__,_x=i._x;class l extends o.Component{constructor(){super(...arguments),a()(this,"state",{hasCopied:!1}),a()(this,"onCopy",(()=>this.setState({hasCopied:!0}))),a()(this,"onFinishCopy",(()=>this.setState({hasCopied:!1}))),a()(this,"onFocus",(e=>e.target.select()))}render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,o.createElement)("div",{className:"jetpack-clipboard-input"},(0,o.createElement)(s.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,o.createElement)(s.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=l},44520:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},75791:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(25158),s=n(22890);const __=o.__,l="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function c(e,t,n){const r=document.createElement("div");r.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}t.Z=function(e){let{trackSource:t,onPlay:n,onPause:o,onError:u,onTimeChange:p,onSkipForward:d,onJumpBack:m,currentTime:h,playStatus:f=s._5,onMetadataLoaded:g,loadWhenReady:b=!1,preload:v="metadata"}=e;const k=(0,r.useRef)(),y=()=>{k.current.play().catch((()=>{}))},E=()=>{k.current.pause(),(0,i.speak)(__("Paused","jetpack"),"assertive")};return(0,r.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,r.useEffect)((()=>{const e=k.current;e.preload=v;const t=new MediaElementPlayer(e,{...l,success:()=>b&&(null==e?void 0:e.load())});if(m||d){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(m){const n=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(c(n,__("Jump Back","jetpack"),m),"jumpBackwardButton")}if(d){const n=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(c(n,__("Skip Forward","jetpack"),d),"skipForwardButton")}}return n&&e.addEventListener("play",n),o&&e.addEventListener("pause",o),u&&e.addEventListener("error",u),g&&e.addEventListener("loadedmetadata",g),()=>{t.remove(),n&&e.removeEventListener("play",n),o&&e.removeEventListener("pause",o),u&&e.removeEventListener("error",u),g&&e.removeEventListener("loadedmetadata",g)}}),[n,o,u,m,d,g,b,v]),(0,r.useEffect)((()=>{var e;const[t,n]=!1===(null===(e=k.current)||void 0===e?void 0:e.paused)?[s.Wp,E]:[s._5,y],r=(0,a.debounce)(n,100);return s.Vy!==f&&t!==f&&r(),()=>{r.cancel()}}),[k,f,t]),(0,r.useEffect)((()=>{if(!p)return;const e=k.current,t=(0,a.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),n=e=>t(e.target.currentTime);return p&&(null==e||e.addEventListener("timeupdate",n)),()=>{t.cancel(),null==e||e.removeEventListener("timeupdate",n)}}),[k,p]),(0,r.useEffect)((()=>{const e=k.current;h&&e&&Math.abs(Math.floor(h-e.currentTime))>1&&(e.currentTime=h)}),[k,h]),(0,r.createElement)("div",{className:"jetpack-audio-player"},(0,r.createElement)("audio",{src:t,ref:k}))}},52932:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(52175),l=n(78965);function c(e){let{blockName:t,buttonLabel:n,href:a,icon:c,onClick:u,subtitle:p,title:d,className:m}=e;const{autosaveAndRedirect:h}=(0,l.Z)(a);return(0,r.createElement)(s.Warning,{actions:a&&[(0,r.createElement)(i.Button,{href:a,onClick:e=>{e.preventDefault(),u(t),h(e)},target:"_top",variant:"secondary"},n)],className:o()(m,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},c,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},d),p&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},p))))}},89419:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(4981),l=n(52175),c=n(55609),u=n(9818),p=n(39630),d=n(65736);const __=d.__,m=e=>{let{attributes:t,styleOption:n,viewportWidth:a,blockName:o}=e;const i=(0,s.getBlockType)(o);return(0,r.createElement)(l.BlockPreview,{viewportWidth:a,blocks:(c=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:n.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},h=r.memo?(0,r.memo)(m,((e,t)=>(0,i.isEqual)(e,t))):m;function f(e){let t,{attributes:n,clientId:a,styleOptions:i,onSelectStyle:s,activeStyle:d,viewportWidth:m,title:f}=e;return u.useSelect&&(t=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:i.map((e=>({title:e.label,isActive:e.value===d,onClick:()=>s({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:f||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},i.map((e=>{const a={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:o()("block-editor-block-styles__item",{"is-active":e.value===d}),onClick:()=>{s({style:e.value})},onKeyDown:t=>{p.ENTER!==t.keyCode&&p.SPACE!==t.keyCode||(t.preventDefault(),s({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:u.useSelect&&t&&(0,r.createElement)(h,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},80011:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(85482);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"jetpack-inspector-notice"},(0,r.createElement)("span",null,t),(0,r.createElement)(a.Z,{height:16,logoColor:"#1a1a1a",showText:!1}))}},4369:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(9818),l=n(65736),c=n(86955),u=n(22890),p=n(20781);const __=l.__;function d(e){let{skipForwardTime:t=5,jumpBackTime:n=5,playIcon:a="controls-play",pauseIcon:l="controls-pause",jumpBackIcon:d=c.Qv,skipForwardIcon:m=c._z,currenTimeDisplay:h=!0,onTimestampClick:f}=e;const{playerState:g,mediaCurrentTime:b,defaultMediaSource:v,mediaDomReference:k}=(0,s.useSelect)((e=>{const{getMediaSourceCurrentTime:t,getMediaPlayerState:n,getDefaultMediaSource:r,getMediaSourceDuration:a,getMediaSourceDomReference:o}=e(u.tT);return{playerState:n(),mediaCurrentTime:t(),mediaDuration:a(),defaultMediaSource:r(),mediaDomReference:o()}}),[]),y=(0,p.H)(b),E=!v,{toggleMediaSource:w,setMediaSourceCurrentTime:_}=(0,s.useDispatch)(u.tT);function C(e){!function(e){k&&(k.currentTime=e),_(v.id,e)}(e),k&&(k.currentTime=e)}return(0,r.createElement)(r.Fragment,null,!1!==n&&(0,r.createElement)(i.ToolbarButton,{icon:d,isDisabled:E,onClick:()=>C(b-n),label:__("Jump back","jetpack")}),(0,r.createElement)(i.ToolbarButton,{icon:g===u._5?a:l,isDisabled:E,onClick:function(){w(v.id)},label:__("Play","jetpack")}),t&&(0,r.createElement)(i.ToolbarButton,{icon:m,isDisabled:E,onClick:()=>C(b+t),label:__("Skip forward","jetpack")}),h&&(0,r.createElement)(i.ToolbarButton,{className:o()("media-player-control__current-time",{"is-disabled":E}),label:__("Set timestamp","jetpack"),onClick:()=>f(b)},y))}function m(e){return(0,r.createElement)(i.ToolbarGroup,{className:"media-player-control__toolbar"},(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(d,e))))}},20781:function(e,t,n){"use strict";n.d(t,{H:function(){return r},i:function(){return a}});const r=mejs.Utils.secondsToTimeCode,a=mejs.Utils.timeCodeToSeconds},64897:function(e,t,n){"use strict";var r=n(80236),a=n.n(r),o=n(69307),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,o.createElement)(i.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.Z=s},93923:function(e,t,n){"use strict";n.d(t,{mj:function(){return r},DW:function(){return a},Bn:function(){return o},DM:function(){return i}});const r=0,a=1,o="payment-plan",i="subscription"},39426:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(52175),o=n(9818),i=n(93923),s=n(34165),l=n(56635),c=n(54799),u=n(91332),p=n(54554);function d(e){let{allowCreateOneTimeInterval:t=!0,blockName:n,productType:d=i.Bn,selectedProductId:m=0,setSelectedProductId:h=(()=>{})}=e;const f=(0,o.useSelect)((e=>e(p.h).getProducts(d,m,h)),[]),{connectUrl:g,isApiConnected:b,isSelectedProductInvalid:v,shouldUpgrade:k}=(0,o.useSelect)((e=>{const{getConnectUrl:t,getShouldUpgrade:n,isApiStateConnected:r,isInvalidProduct:a}=e(p.h);return{connectUrl:t(),isApiConnected:r(),isSelectedProductInvalid:a(m),shouldUpgrade:n()}}));return k?null:(0,r.createElement)(r.Fragment,null,!b&&!!g&&(0,r.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(u.Z,{blockName:n,connectUrl:g})),b&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,{allowCreateOneTimeInterval:t,productType:d,setSelectedProductId:h}),(0,r.createElement)(l.Z,{products:f,productType:d,selectedProductId:m,setSelectedProductId:h})),b&&v&&(0,r.createElement)(c.Z,null))}},34165:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(52175),o=n(55609),i=n(9818),s=n(65736),l=n(12270),c=n(93923),u=n(86086),p=n(48701),d=n(54554);const __=s.__;function m(e){let{allowCreateOneTimeInterval:t,productType:n,setSelectedProductId:s}=e;const m=(0,i.useSelect)((e=>e(d.h).getSiteSlug())),{saveProduct:h}=(0,i.useDispatch)(d.h),[f,g]=(0,r.useState)(c.mj),[b,v]=(0,r.useState)((0,u.l)("default new product title",n)),[k,y]=(0,r.useState)("USD"),[E,w]=(0,r.useState)(5),[_,C]=(0,r.useState)("1 month"),S=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"}];t&&S.push({label:__("One-Time Payment","jetpack"),value:"one-time"});return(0,r.createElement)(a.InspectorControls,null,m&&(0,r.createElement)(o.PanelBody,null,(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${m}`},(0,u.l)("manage your products",n))),(0,r.createElement)(o.PanelBody,{title:(0,u.l)("add a new product",n),initialOpen:!0,className:"product-management-control-inspector__add-plan"},f===c.DW&&(0,r.createElement)(o.Placeholder,{icon:l.Z,label:(0,u.l)("saving product",n)},(0,r.createElement)(o.Spinner,null)),f===c.mj&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,r.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>v(e),value:b})),(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,r.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>y(e),options:p.Xy,value:k}),(0,r.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>w(e),type:"number",value:E})),(0,r.createElement)(o.PanelRow,{className:"plan-interval"},(0,r.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>C(e),options:S,value:_})),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{onClick:e=>{e.preventDefault(),g(c.DW),h({title:b,currency:k,price:E,interval:_},n,s,(e=>{g(c.mj),e&&(w(5),v(""))}))},variant:"secondary"},(0,u.l)("add product",n))))))}},54799:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(52175),o=n(65736),i=n(71430),s=n(21345);const __=o.__;function l(){return(0,r.createElement)(a.Warning,{className:"product-management-control-nudge"},(0,r.createElement)("span",{className:"product-management-control-nudge__info"},(0,r.createElement)(i.Z,{icon:s.Z}),(0,r.createElement)("span",{className:"product-management-control-nudge__text-container"},(0,r.createElement)("span",{className:"product-management-control-nudge__title"},__("Invalid subscription configured for this block.","jetpack")),(0,r.createElement)("span",{className:"product-management-control-nudge__message"},__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")))))}},56635:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(69307),a=n(43626),o=n(52175),i=n(55609),s=n(9818),l=n(65736),c=n(6162),u=n(36442),p=n(21345),d=n(49385),m=n(86086),h=n(54554);const __=l.__;function f(e){const{currency:t,interval:n,price:r}=e,o=(0,a.ZP)(parseFloat(r),t);switch(n){case"1 month":return(0,l.sprintf)(// translators: %s: amount
103
  __("%s / month","jetpack"),o);case"1 year":return(0,l.sprintf)(// translators: %s: amount
104
  __("%s / year","jetpack"),o);case"one-time":return o}return(0,l.sprintf)(// translators: %s: amount, plan interval
105
  __("%1$s / %2$s","jetpack"),o,n)}function g(e){let{onClose:t,product:n,selectedProductId:a,setSelectedProductId:o}=e;const{id:s,title:l}=n,u=a&&a===s,p=u?c.Z:void 0,d=n?" "+f(n):null;return(0,r.createElement)(i.MenuItem,{icon:p,onClick:e=>{e.preventDefault(),o(s),t()},selected:u,value:s},l," : ",d)}function b(e){let{onClose:t,productType:n}=e;const a=(0,d.Z)();return(0,r.createElement)(i.MenuItem,{onClick:e=>{e.preventDefault(),a(),setTimeout((()=>{const e=document.getElementById("new-product-title");null!==e&&e.focus()}),100),t()}},(0,m.l)("add a new product",n))}function v(e){let{products:t,productType:n,selectedProductId:a,setSelectedProductId:l}=e;const c=(0,s.useSelect)((e=>e(h.h).getProduct(a)));let d=null,v=u.Z;return c&&(d=f(c)),a&&!c&&(d=(0,m.l)("product not found",n),v=p.Z),(0,r.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(i.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:v,label:(0,m.l)("select a product",n),text:d},(e=>{let{onClose:o}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.MenuGroup,null,t.map((e=>(0,r.createElement)(g,{key:e.id,onClose:o,product:e,selectedProductId:a,setSelectedProductId:l})))),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(b,{onClose:o,productType:n})))})))}},49385:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{enableComplementaryArea:e}=(0,r.useDispatch)("core/interface"),t=!!(0,r.select)("core/edit-site"),n=!!(0,r.select)("core/edit-widgets");return()=>{t?e("core/edit-site","edit-site/block-inspector"):n?e("core/edit-widgets","edit-widgets/block-inspector"):e("core/edit-post","edit-post/block")}}},86086:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(65736),a=n(93923);const __=r.__,o={"add a new product":{[a.Bn]:__("Add a new payment plan","jetpack"),[a.DM]:__("Add a new subscription","jetpack")},"product not found":{[a.Bn]:__("Payment plan not found","jetpack"),[a.DM]:__("Subscription not found","jetpack")},"select a product":{[a.Bn]:__("Select a payment plan","jetpack"),[a.DM]:__("Select a subscription","jetpack")},"default new product title":{[a.Bn]:__("Monthly Subscription","jetpack"),[a.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[a.Bn]:__("Manage your payment plans.","jetpack"),[a.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[a.Bn]:__("Saving payment plan…","jetpack"),[a.DM]:__("Saving subscription…","jetpack")},"add product":{[a.Bn]:__("Add payment plan","jetpack"),[a.DM]:__("Add subscription","jetpack")},"product requires a name":{[a.Bn]:__("Payment plan requires a name","jetpack"),[a.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a.Bn]:__("Payment plan requires a valid price","jetpack"),[a.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a.Bn]:__("Successfully created payment plan","jetpack"),[a.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a.Bn]:__("There was an error when adding the payment plan.","jetpack"),[a.DM]:__("There was an error when adding the subscription.","jetpack")}};function i(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Bn;return(null==o||null===(t=o[e])||void 0===t?void 0:t[n])||null}},91332:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(55609),o=n(65736),i=n(86955),s=n(78965),l=n(63415);const __=o.__;function c(e){let{blockName:t,connectUrl:n}=e;const{autosaveAndRedirect:o}=(0,s.Z)(n);return(0,r.createElement)(a.ToolbarButton,{className:"connect-stripe components-tab-button",icon:i.Pw,onClick:e=>{e.preventDefault(),l.Z.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),o(e)}},__("Connect Stripe","jetpack"))}},25478:function(e,t,n){"use strict";var r=n(69307),a=n(53224),o=n.n(a),i=n(65736),s=n(63415),l=n(52932),c=n(23922);const __=i.__,u=e=>{let{blockName:t,url:n}=e;return(0,r.createElement)(l.Z,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,r.createElement)(o(),{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,onClick:()=>{s.Z.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t})},title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})};t.Z=e=>{let{blockName:t,postId:n,stripeConnectUrl:a}=e;const o=(0,c.Z)(n,a);return o?(0,r.createElement)(u,{blockName:t,url:o}):null}},33347:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=e=>{let{align:t,className:n,title:a,description:s,buttonText:l,visible:c=!0,context:u,checkoutUrl:p,goToCheckoutPage:d,isRedirecting:m=!1}=e;const h=o()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!c}),f=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:h,"data-align":t},(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},a&&(0,r.createElement)("strong",{className:o()("banner-title",{[`${n}__title`]:n})},a),s&&(0,r.createElement)("span",{className:`${n}__description banner-description`},s),(0,r.createElement)(i.Button,{href:m?null:p,onClick:d,target:"_top",className:o()("is-primary",{"jetpack-upgrade-plan__hidden":!p}),isBusy:m},m?f:l)))}},75324:function(e,t,n){"use strict";var r=n(9818);const a={setPlans:e=>({type:"SET_PLANS",plans:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",url:e})};(0,r.registerStore)("wordpress-com/plans",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_PLANS"===t.type?t.plans:e},actions:a,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield a.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return a.setPlans(e)}}})},64832:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4981);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return void 0!==r.createBlocksFromInnerBlocksTemplate?(0,r.createBlocksFromInnerBlocksTemplate)(e):e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[n,o,i=[]]=t;return(0,r.createBlock)(n,o,a(i))}))}},48701:function(e,t,n){"use strict";n.d(t,{ck:function(){return o},Xy:function(){return i},hj:function(){return s},vs:function(){return l},Vm:function(){return c}});var r=n(72670),a=n(92819);const o={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},i=Object.keys(o).map((e=>{const{symbol:t}=(0,r.X)(e);return{value:e,label:t===e?e:`${e} ${(0,a.trimEnd)(t,".")}`}}));function s(e){return o[e]}function l(e,t){return!isNaN(t)&&t>=s(e)}function c(e,t){return e?"number"==typeof e?e:(e=parseFloat(e.replace(new RegExp("\\"+r.M[t].grouping,"g"),"").replace(new RegExp("\\"+r.M[t].decimal,"g"),".")),isNaN(e)?null:e):null}},92956:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=e=>{let{label:t,onClick:n}=e;return(0,r.createElement)(a.Button,{className:"components-toolbar__control",label:t,icon:"edit",onClick:n})}},115:function(e,t,n){"use strict";n.d(t,{iT:function(){return i},Eh:function(){return s},wk:function(){return l},oI:function(){return c},Tu:function(){return u},OG:function(){return p},tY:function(){return d},h9:function(){return m},CY:function(){return h},Wm:function(){return f},Qh:function(){return g},Bb:function(){return b},En:function(){return v},yD:function(){return k},QU:function(){return y},zs:function(){return E},l5:function(){return w}});var r=n(65736),a=n(69771),o=n(92819);const __=r.__,i="google_photos",s="openverse",l="pexels",c="recent",u="/",p=[{value:c,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],d=[{value:"",
144
  /* translators: category of images */
145
  label:__("Travel","jetpack")},{value:"weddings",
146
  /* translators: category of images */