Jetpack by WordPress.com - Version 10.9

Version Description

Download this release

Release Info

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

Code changes from version 10.9-beta2 to 10.9

CHANGELOG.md CHANGED
@@ -2,11 +2,7 @@
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
5
- ## 11.0-a.0 - unreleased
6
-
7
- This is an alpha version! The changes listed here are not final.
8
-
9
- ## 10.9-beta - 2022-04-26
10
  ### Enhancements
11
  - Dashboard: update the recommendation flow to include recommendations for VideoPress as well as discounts.
12
  - Google Fonts: update the Google Fonts module to be compatible with the most recent version of the WP_Webfonts API.
@@ -15,27 +11,29 @@ This is an alpha version! The changes listed here are not final.
15
  - VideoPress: improve upload spreed, by increasing chunk size to 10Mb for resumable uploads.
16
 
17
  ### Bug fixes
 
18
  - Payments Block: change the sidebar display when clicking 'add new subscription', as well as using an external link in the Customizer.
19
  - Payments Block: remove the dropdown icon from the product management control subscription selector.
20
 
21
  ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
 
22
  - Added analytics events for enabling condtional recommendations and viewing conditional recommendations.
23
  - Converted BackupUpgrade and BarChart to TypeScript.
24
  - E2E tests: add extra checks in connection tests.
25
  - E2E tests: improve connection tests.
 
26
  - Init 10.9-a.8
 
27
  - Move RecordMeterBar to js-packages.
 
28
  - Nav-unification: Update nudge to support Pro plan.
 
 
29
  - Remove code in native files that was causing the rnmobile build to fail.
 
30
  - Updated package dependencies.
31
  - Update package.json metadata.
32
  - Updating changelog and readme for 10.9-a.7
33
- - Add checks to eliminate warnings in php log.
34
- - Fix failing tests because of an editor type mismatch caused by imported packages side-effects.
35
- - Load block editor styles inline for iframed editors on WoA sites.
36
- - My Jetpack: Updated to require licensing package when licensing UI enabled.
37
- - Payments Block: Display the product manager on free plan sites connected to Stripe.
38
- - Premium Content blocks: subscription button from emails and notifications opens the checkout dialog (WordPress.com specific).
39
  - VideoPress: Fixing issue in apiFetch middleware where request bodies were assumed to always be objects with a "file" property; this is only true for requests to the media endpoint.
40
 
41
  ## 10.9-a.7 - 2022-04-19
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
5
+ ## 10.9 - 2022-05-03
 
 
 
 
6
  ### Enhancements
7
  - Dashboard: update the recommendation flow to include recommendations for VideoPress as well as discounts.
8
  - Google Fonts: update the Google Fonts module to be compatible with the most recent version of the WP_Webfonts API.
11
  - VideoPress: improve upload spreed, by increasing chunk size to 10Mb for resumable uploads.
12
 
13
  ### Bug fixes
14
+ - Assistant: style and CTA changes plus introductory offer fixes.
15
  - Payments Block: change the sidebar display when clicking 'add new subscription', as well as using an external link in the Customizer.
16
  - Payments Block: remove the dropdown icon from the product management control subscription selector.
17
 
18
  ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
19
+ - Add checks to eliminate warnings in PHP log.
20
  - Added analytics events for enabling condtional recommendations and viewing conditional recommendations.
21
  - Converted BackupUpgrade and BarChart to TypeScript.
22
  - E2E tests: add extra checks in connection tests.
23
  - E2E tests: improve connection tests.
24
+ - Fix failing tests because of an editor type mismatch caused by imported packages side-effects.
25
  - Init 10.9-a.8
26
+ - Load block editor styles inline for iframed editors on WoA sites.
27
  - Move RecordMeterBar to js-packages.
28
+ - My Jetpack: Updated to require licensing package when licensing UI enabled.
29
  - Nav-unification: Update nudge to support Pro plan.
30
+ - Payments Block: Display the product manager on free plan sites connected to Stripe.
31
+ - Premium Content blocks: subscription button from emails and notifications opens the checkout dialog (WordPress.com specific).
32
  - Remove code in native files that was causing the rnmobile build to fail.
33
+ - Revert Jetpack not hard disconnecting on deactivation
34
  - Updated package dependencies.
35
  - Update package.json metadata.
36
  - Updating changelog and readme for 10.9-a.7
 
 
 
 
 
 
37
  - VideoPress: Fixing issue in apiFetch middleware where request bodies were assumed to always be objects with a "file" property; this is only true for requests to the media endpoint.
38
 
39
  ## 10.9-a.7 - 2022-04-19
_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', 'wp-widgets'), 'version' => '3bba0a3b8f50108afde55047856c02e7');
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', 'wp-widgets'), 'version' => '52d719768bebd46031abbcbee037adeb');
_inc/blocks/editor-beta.js CHANGED
@@ -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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025: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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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)},95350: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)}},60629: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"}))},19403: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(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287: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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),S=n(67085),j=n(64037),x=n(29323),P=n(61677);const __=f.__,_x=f._x,T=["image"],N=e=>{let{scripts:t}=e;const{html: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})});"object"!=typeof t&&(t=[]);const b=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});return t.push(URL.createObjectURL(b),window.videopressAjax.bridgeUrl),(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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",P.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:P.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:B,caption:M,controls:R,guid:L,loop:D,muted:Z,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:H,src:V}=t;if(H&&V)return(0,s.createElement)("img",{src:V,alt:M});const G=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:B,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025: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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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)},95350: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)}},60629: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"}))},19403: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(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287: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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),S=n(67085),j=n(64037),x=n(29323),P=n(61677);const __=f.__,_x=f._x,T=["image"],N=e=>{let{scripts:t}=e;const{html: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})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",P.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:P.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:B,caption:M,controls:R,guid:L,loop:D,muted:Z,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:H,src:V}=t;if(H&&V)return(0,s.createElement)("img",{src:V,alt:M});const G=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:B,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
_inc/blocks/editor-experimental.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', 'wp-widgets'), 'version' => '9b7477d75fe79a6e18b63f9adae6980d');
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', 'wp-widgets'), 'version' => '17967767b445dd42f39e4ae7bc391256');
_inc/blocks/editor-experimental.js CHANGED
@@ -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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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=T([2,1,2],5),l=P([N,N,A,N,N]),c=P([N,N,N,A,N,N,N]),u=T([3,1,3],5),p=P([A,N,N,A]),d=T([1,2,1],5),m=P([A,N,N,N]),h=T([1,3],3),f=P([N,N,N,A]),g=T([3,1],3),b=P([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=T([1,2],3),k=T([1,1,1,1,1],1),y=T([1,1,1,1],1),E=T([1,1,1],3),w=P([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=T([2,1],3),C=P([function(e){return e>=2}]);function j(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]:S(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 S(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 T(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),j=(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,j,(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 S=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,j,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(S)&&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)}),S!==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:S,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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 j=(0,p.isBlobURL)(k),S=(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:j?void 0:w,srcSet:j?void 0:E,tabIndex:"0",style:j?{backgroundImage:`url(${k})`}:void 0}),j&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":j,[`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,S):S)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return S},qv:function(){return x},Xd:function(){return T}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},j={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"},S="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"})),T={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/${S}`,{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/${S}`,{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/${S}`)}}],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:j}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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=T([2,1,2],5),l=P([N,N,A,N,N]),c=P([N,N,N,A,N,N,N]),u=T([3,1,3],5),p=P([A,N,N,A]),d=T([1,2,1],5),m=P([A,N,N,N]),h=T([1,3],3),f=P([N,N,N,A]),g=T([3,1],3),b=P([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=T([1,2],3),k=T([1,1,1,1,1],1),y=T([1,1,1,1],1),E=T([1,1,1],3),w=P([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=T([2,1],3),C=P([function(e){return e>=2}]);function j(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]:S(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 S(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 T(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),j=n(67085),S=n(64037),x=n(29323),T=n(61677);const __=f.__,_x=f._x,P=["image"],N=e=>{let{scripts:t}=e;const{html: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})});"object"!=typeof t&&(t=[]);const b=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});return t.push(URL.createObjectURL(b),window.videopressAjax.bridgeUrl),(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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",T.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:T.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:B,caption:M,controls:R,guid:L,loop:Z,muted:D,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:V,src:G}=t;if(V&&G)return(0,s.createElement)("img",{src:G,alt:M});const H=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(S.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:B,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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=T([2,1,2],5),l=P([N,N,A,N,N]),c=P([N,N,N,A,N,N,N]),u=T([3,1,3],5),p=P([A,N,N,A]),d=T([1,2,1],5),m=P([A,N,N,N]),h=T([1,3],3),f=P([N,N,N,A]),g=T([3,1],3),b=P([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=T([1,2],3),k=T([1,1,1,1,1],1),y=T([1,1,1,1],1),E=T([1,1,1],3),w=P([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=T([2,1],3),C=P([function(e){return e>=2}]);function j(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]:S(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 S(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 T(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),j=(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,j,(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 S=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,j,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(S)&&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)}),S!==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:S,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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 j=(0,p.isBlobURL)(k),S=(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:j?void 0:w,srcSet:j?void 0:E,tabIndex:"0",style:j?{backgroundImage:`url(${k})`}:void 0}),j&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":j,[`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,S):S)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return S},qv:function(){return x},Xd:function(){return T}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},j={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"},S="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"})),T={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/${S}`,{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/${S}`,{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/${S}`)}}],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:j}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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=T([2,1,2],5),l=P([N,N,A,N,N]),c=P([N,N,N,A,N,N,N]),u=T([3,1,3],5),p=P([A,N,N,A]),d=T([1,2,1],5),m=P([A,N,N,N]),h=T([1,3],3),f=P([N,N,N,A]),g=T([3,1],3),b=P([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=T([1,2],3),k=T([1,1,1,1,1],1),y=T([1,1,1,1],1),E=T([1,1,1],3),w=P([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=T([2,1],3),C=P([function(e){return e>=2}]);function j(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]:S(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 S(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 T(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),j=n(67085),S=n(64037),x=n(29323),T=n(61677);const __=f.__,_x=f._x,P=["image"],N=e=>{let{scripts:t}=e;const{html: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})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",T.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:T.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:B,caption:M,controls:R,guid:L,loop:Z,muted:D,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:V,src:G}=t;if(V&&G)return(0,s.createElement)("img",{src:G,alt:M});const H=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(S.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:B,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
_inc/blocks/editor-no-post-editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '7116f5b65069789ca363ae9e239e1454');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '23e23dc191612dd868997dbc63ce21d0');
_inc/blocks/editor-no-post-editor.js CHANGED
@@ -38,7 +38,7 @@ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,
38
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
39
  __("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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return x}});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=A([2,1,2],5),l=P([N,N,T,N,N]),c=P([N,N,N,T,N,N,N]),u=A([3,1,3],5),p=P([T,N,N,T]),d=A([1,2,1],5),m=P([T,N,N,N]),h=A([1,3],3),f=P([N,N,N,T]),g=A([3,1],3),b=P([M(1.6),(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),E=A([1,1,1],3),w=P([(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2)),M(1.6)]),_=A([2,1],3),C=P([function(e){return e>=2}]);function x(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]:S(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 S(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 A(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function T(e){return e<1}function R(e){return t=>t>=e}function M(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),x=(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,x,(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,x,(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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 x=(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:x?void 0:w,srcSet:x?void 0:E,tabIndex:"0",style:x?{backgroundImage:`url(${k})`}:void 0}),x&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":x,[`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)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return j},qv:function(){return S},Xd:function(){return A}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},x={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",S=(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"})),A={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:S,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:x}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)(
40
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
41
- __("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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return x}});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=A([2,1,2],5),l=P([N,N,T,N,N]),c=P([N,N,N,T,N,N,N]),u=A([3,1,3],5),p=P([T,N,N,T]),d=A([1,2,1],5),m=P([T,N,N,N]),h=A([1,3],3),f=P([N,N,N,T]),g=A([3,1],3),b=P([M(1.6),(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),E=A([1,1,1],3),w=P([(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2)),M(1.6)]),_=A([2,1],3),C=P([function(e){return e>=2}]);function x(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]:S(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 S(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 A(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function T(e){return e<1}function R(e){return t=>t>=e}function M(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),x=n(67085),j=n(64037),S=n(29323),A=n(61677);const __=f.__,_x=f._x,P=["image"],N=e=>{let{scripts:t}=e;const{html: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})});"object"!=typeof t&&(t=[]);const b=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});return t.push(URL.createObjectURL(b),window.videopressAjax.bridgeUrl),(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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",A.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:A.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:T,isUpdatingPrivacySetting:R}=this.state,{autoplay:M,caption:I,controls:L,guid:D,loop:F,muted:B,playsinline:Z,poster:O,preload:U,useAverageColor:z,videoPressTracks:$,isVideoPressExample:q,src:V}=t;if(q&&V)return(0,s.createElement)("img",{src:V,alt:I});const H=`video-block__poster-image-description-${n}`,G=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:D})),(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"),
42
  /* translators: Tooltip describing the "autoplay" option for the VideoPress player */
43
  __("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:M,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
44
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
38
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
39
  __("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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return x}});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=A([2,1,2],5),l=P([N,N,T,N,N]),c=P([N,N,N,T,N,N,N]),u=A([3,1,3],5),p=P([T,N,N,T]),d=A([1,2,1],5),m=P([T,N,N,N]),h=A([1,3],3),f=P([N,N,N,T]),g=A([3,1],3),b=P([M(1.6),(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),E=A([1,1,1],3),w=P([(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2)),M(1.6)]),_=A([2,1],3),C=P([function(e){return e>=2}]);function x(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]:S(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 S(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 A(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function T(e){return e<1}function R(e){return t=>t>=e}function M(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),x=(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,x,(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,x,(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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 x=(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:x?void 0:w,srcSet:x?void 0:E,tabIndex:"0",style:x?{backgroundImage:`url(${k})`}:void 0}),x&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":x,[`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)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return j},qv:function(){return S},Xd:function(){return A}});var r=n(69307),a=n(65736),o=n(4981),i=n(92819),s=n(55609),l=n(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},x={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",S=(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"})),A={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:S,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:x}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)(
40
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
41
+ __("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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return x}});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=A([2,1,2],5),l=P([N,N,T,N,N]),c=P([N,N,N,T,N,N,N]),u=A([3,1,3],5),p=P([T,N,N,T]),d=A([1,2,1],5),m=P([T,N,N,N]),h=A([1,3],3),f=P([N,N,N,T]),g=A([3,1],3),b=P([M(1.6),(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),E=A([1,1,1],3),w=P([(0,r.overEvery)(R(.9),M(2)),(0,r.overEvery)(R(.9),M(2)),M(1.6)]),_=A([2,1],3),C=P([function(e){return e>=2}]);function x(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]:S(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 S(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 A(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function P(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function T(e){return e<1}function R(e){return t=>t>=e}function M(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),x=n(67085),j=n(64037),S=n(29323),A=n(61677);const __=f.__,_x=f._x,P=["image"],N=e=>{let{scripts:t}=e;const{html: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})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",A.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:A.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:T,isUpdatingPrivacySetting:R}=this.state,{autoplay:M,caption:I,controls:L,guid:D,loop:F,muted:B,playsinline:Z,poster:O,preload:U,useAverageColor:z,videoPressTracks:$,isVideoPressExample:q,src:V}=t;if(q&&V)return(0,s.createElement)("img",{src:V,alt:I});const H=`video-block__poster-image-description-${n}`,G=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:D})),(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"),
42
  /* translators: Tooltip describing the "autoplay" option for the VideoPress player */
43
  __("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:M,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
44
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
_inc/blocks/editor.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-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '7e7a52e02712c6d9f15d821e1b301147');
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-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'cec1dbbfe815b71b4f869102fb3588f2');
_inc/blocks/editor.js CHANGED
@@ -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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(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),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(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]:S(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 S(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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),j=(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,j,(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 S=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,j,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(S)&&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)}),S!==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:S,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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 j=(0,p.isBlobURL)(k),S=(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:j?void 0:w,srcSet:j?void 0:E,tabIndex:"0",style:j?{backgroundImage:`url(${k})`}:void 0}),j&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":j,[`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,S):S)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return S},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(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},j={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"},S="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/${S}`,{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/${S}`,{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/${S}`)}}],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:j}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(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),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(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]:S(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 S(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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),j=n(67085),S=n(64037),x=n(29323),P=n(61677);const __=f.__,_x=f._x,T=["image"],N=e=>{let{scripts:t}=e;const{html: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})});"object"!=typeof t&&(t=[]);const b=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});return t.push(URL.createObjectURL(b),window.videopressAjax.bridgeUrl),(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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",P.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:P.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:M,caption:R,controls:B,guid:L,loop:D,muted:Z,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:V,src:G}=t;if(V&&G)return(0,s.createElement)("img",{src:G,alt:R});const H=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(S.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:M,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
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)}}},34412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(64140),a=n.n(r),o=n(69307),i=n(987),s=n(32696),l=n(51546),c=n(65025);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)}))))))}}},65025:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(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),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(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]:S(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 S(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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},51546: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)}},87766:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(51546),i=n(987),s=n(32696),l=n(88559);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)))))))}},77485:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(23562),o=n(18187),i=n(88559);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})}},26: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(88559);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)}},62125:function(e,t,n){"use strict";n.d(t,{F:function(){return v}});var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(52175),c=n(12238),u=n(55609),p=n(81964),d=n(34980),m=n(67929),h=n(18187),f=n(19403),g=n(89284);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}),j=(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,j,(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 S=(0,h.t)(m.P0,t.className);return(0,o.createElement)(o.Fragment,null,j,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(S)&&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)}),S!==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:S,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)},81964: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})))}})}},98120:function(e,t,n){"use strict";var r=n(64140),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(60629);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 j=(0,p.isBlobURL)(k),S=(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:j?void 0:w,srcSet:j?void 0:E,tabIndex:"0",style:j?{backgroundImage:`url(${k})`}:void 0}),j&&(0,o.createElement)(u.Spinner,null));return(0,o.createElement)("figure",{className:s()("tiled-gallery__item",{"is-selected":d,"is-transient":j,[`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,S):S)}}t.Z=(0,d.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(h)},95350: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)}},60629: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"}))},19403:function(e,t,n){"use strict";n.d(t,{u2:function(){return S},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(62369),c=n(62125),u=n(10001),p=n(67929),d=n(35338),m=n(61365),h=n(88519),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}},j={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"},S="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/${S}`,{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/${S}`,{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/${S}`)}}],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:j}}},45138: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)}},8625: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)}},34980: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(98120),l=n(95350),c=n(63341),u=n(7960),p=n(852),d=n(67929);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)}}},63341:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(64140),a=n.n(r),o=n(69307),i=n(54166),s=n(45138),l=n(8625),c=n(33538),u=n(32787),p=n(76287);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)}))))))}}},76287:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});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([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(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),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(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]:S(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 S(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 N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},32787:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(67929);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}},33538: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)}},7960:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(33538),i=n(45138),s=n(8625),l=n(67929);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)))))))}},10001:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(34980),o=n(62125),i=n(18187),s=n(67929);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})}},852: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(62369),l=n(67929),c=n(83206);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)}},29323: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})}},61677:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},58662:function(e,t,n){"use strict";var r=n(10144);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}},10144: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}))}},8389:function(e,t,n){"use strict";var r=n(11106),a=n(69590);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}},11106:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(961);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}))}},961: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)}},69590: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()}}},95615:function(e,t,n){"use strict";var r=n(21566);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}},21566: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(96362);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}))}},96362: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)}},27157:function(e,t,n){"use strict";var r=n(81976);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}},81976: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(70971);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}))}},70971: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)}},83426:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),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(77423),b=n(50128),v=n(89105),k=n.n(v),y=n(92819),E=n(76345),w=n(83159),_=n(96047),C=n(50583),j=n(67085),S=n(64037),x=n(29323),P=n(61677);const __=f.__,_x=f._x,T=["image"],N=e=>{let{scripts:t}=e;const{html: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})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = { ajaxUrl: '${window.videopressAjax.ajaxUrl}' };`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}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:n,scripts:t,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"),a=(0,y.get)(t,"jetpack_videopress.privacy_setting",P.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==a&&this.setState({privacySetting:a})})),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,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!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,privacySetting:P.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1},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,privacySetting:_,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:I}=this.state,{autoplay:M,caption:R,controls:B,guid:L,loop:D,muted:Z,playsinline:F,poster:O,preload:z,useAverageColor:U,videoPressTracks:$,isVideoPressExample:V,src:G}=t;if(V&&G)return(0,s.createElement)("img",{src:G,alt:R});const H=`video-block__poster-image-description-${n}`,q=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.BlockControls,{group:"block"},(0,s.createElement)(S.Z,{tracks:$,onChange:e=>{c({videoPressTracks:e})},guid:L})),(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:M,help:this.getAutoplayHelp}),(0,s.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),
73
  /* translators: Tooltip describing the "loop" option for the VideoPress player */
_inc/build/admin.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '85f37a398be98425f22d0fce25e8f569');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7ade99eef591ae2bdae5b7683dba3649');
_inc/build/admin.js CHANGED
@@ -1,5 +1,5 @@
1
  /*! For license information please see admin.js.LICENSE.txt */
2
- !function(){var e={64140: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},3779: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},77423:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...i}=e;return(0,r.cloneElement)(t,{width:n,height:n,...i})}},25957:function(e,t,n){"use strict";var r=n(69307),i=n(70444);const s=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(i.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=s},8277:function(e,t,n){"use strict";const r=t;r.bignum=n(30910),r.define=n(99875).define,r.base=n(73034),r.constants=n(68344),r.decoders=n(55439),r.encoders=n(95411)},99875:function(e,t,n){"use strict";const r=n(95411),i=n(55439),s=n(59503);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return s(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},27027:function(e,t,n){"use strict";const r=n(59503),i=n(72173).b,s=n(82923).Buffer;function o(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(o,i),t.C=o,o.isDecoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&s.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){const t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new o(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=a,a.isEncoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=s.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},73034:function(e,t,n){"use strict";const r=t;r.Reporter=n(72173).b,r.DecoderBuffer=n(27027).C,r.EncoderBuffer=n(27027).R,r.Node=n(24873)},24873:function(e,t,n){"use strict";const r=n(72173).b,i=n(27027).R,s=n(27027).C,o=n(48282),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function l(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=l;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},l.prototype._wrap=function(){const e=this._baseState;c.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},l.prototype._init=function(e){const t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(o(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){l.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(n),this}})),l.prototype.use=function(e){o(e);const t=this._baseState;return o(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){const t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){const t=this._baseState;return o(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){const t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){const t=this._baseState;return o(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,o=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(o=this._peekTag(e,r,n.any),e.isError(o))return o}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(r)}}if(n.obj&&o&&(r=e.enterObject()),o){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new s(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&o&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,i),i},l.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),o(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},l.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(s){const o=e.save(),a=n.choice[s];try{const n=a._decode(e,t);if(e.isError(n))return!1;r={type:s,value:n},i=!0}catch(t){return e.restore(o),!1}return!0}),this),i?r:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},l.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},l.prototype._encodeValue=function(e,t,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);let s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let o=null,a=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,n)._encode(e,t),a=!0;else if(i.children)o=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==i.use?s=this._getUse(i.use,n)._encode(e,t):(o=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(s=this._encodeComposite(e,a,n,o))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,"context",s)),s},l.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},72173:function(e,t,n){"use strict";const r=n(59503);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof s;if(t=r?e:new s(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},5598:function(e,t){"use strict";function n(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},68344:function(e,t,n){"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(5598)},75761:function(e,t,n){"use strict";const r=n(59503),i=n(30910),s=n(27027).C,o=n(24873),a=n(5598);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.call(this,"der",e)}function u(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=a.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:a.tag[n]}}function p(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=c,c.prototype.decode=function(e,t){return s.isDecoderBuffer(e)||(e=new s(e,t)),this.tree._decode(e,t)},r(l,o),l.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=u(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},l.prototype._decodeTag=function(e,t,n){const r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=p(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const s=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(i=e.offset-s.offset,e.restore(s),e.skip(i,'Failed to match body of: "'+t+'"'))},l.prototype._skipUntilEnd=function(e,t){for(;;){const n=u(e,t);if(e.isError(n))return n;const r=p(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},l.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const s=n.decode(e,"der",r);if(e.isError(s)&&t)break;i.push(s)}return i},l.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},l.prototype._decodeObjid=function(e,t,n){let r;const i=[];let s=0,o=0;for(;!e.isEmpty();)o=e.readUInt8(),s<<=7,s|=127&o,0==(128&o)&&(i.push(s),s=0);128&o&&i.push(s);const a=i[0]/40|0,c=i[0]%40;if(r=n?i:[a,c].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},l.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,s,o,a,c;if("gentime"===t)r=0|n.slice(0,4),i=0|n.slice(4,6),s=0|n.slice(6,8),o=0|n.slice(8,10),a=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),s=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),c=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,s,o,a,c,0)},l.prototype._decodeNull=function(){return null},l.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},l.prototype._decodeInt=function(e,t){const n=e.raw();let r=new i(n);return t&&(r=t[r.toString(10)]||r),r},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},55439:function(e,t,n){"use strict";const r=t;r.der=n(75761),r.pem=n(33672)},33672:function(e,t,n){"use strict";const r=n(59503),i=n(82923).Buffer,s=n(75761);function o(e){s.call(this,e),this.enc="pem"}r(o,s),e.exports=o,o.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,c=-1;for(let e=0;e<n.length;e++){const t=n[e].match(o);if(null!==t&&t[2]===r){if(-1!==a){if("END"!==t[1])break;c=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===c)throw new Error("PEM section not found for: "+r);const l=n.slice(a+1,c).join("");l.replace(/[^a-z0-9+/=]+/gi,"");const u=i.from(l,"base64");return s.prototype.decode.call(this,u,t)}},18248:function(e,t,n){"use strict";const r=n(59503),i=n(82923).Buffer,s=n(24873),o=n(5598);function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(c,s),c.prototype._encodeComposite=function(e,t,n,r){const s=function(e,t,n,r){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=o.tagClassByName[n||"universal"]<<6,i}(e,t,n,this.reporter);if(r.length<128){const e=i.alloc(2);return e[0]=s,e[1]=r.length,this._createEncoderBuffer([e,r])}let a=1;for(let e=r.length;e>=256;e>>=8)a++;const c=i.alloc(2+a);c[0]=s,c[1]=128|a;for(let e=1+a,t=r.length;t>0;e--,t>>=8)c[e]=255&t;return this._createEncoderBuffer([c,r])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t<e.length;t++){let n=e[t];for(r++;n>=128;n>>=7)r++}const s=i.alloc(r);let o=s.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(s[o--]=127&n;(n>>=7)>0;)s[o--]=128|127&n}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[l(r.getUTCFullYear()),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[l(r.getUTCFullYear()%100),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=i.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const r=new Array(n);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const s=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),s.length!==r.defaultBuffer.length)return!1;for(i=0;i<s.length;i++)if(s[i]!==r.defaultBuffer[i])return!1;return!0}},95411:function(e,t,n){"use strict";const r=t;r.der=n(18248),r.pem=n(51027)},51027:function(e,t,n){"use strict";const r=n(59503),i=n(18248);function s(e){i.call(this,e),this.enc="pem"}r(s,i),e.exports=s,s.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},90605:function(e,t,n){"use strict";var r=n(5806),i=n(55246);function s(e){return s="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},s(e)}var o,a,c=n(27452).codes,l=c.ERR_AMBIGUOUS_ARGUMENT,u=c.ERR_INVALID_ARG_TYPE,p=c.ERR_INVALID_ARG_VALUE,d=c.ERR_INVALID_RETURN_VALUE,h=c.ERR_MISSING_ARGS,f=n(71228),m=n(23333).inspect,g=n(23333).types,v=g.isPromise,b=g.isRegExp,y=Object.assign?Object.assign:n(45685).assign,k=Object.is?Object.is:n(88706);new Map;function w(){var e=n(81562);o=e.isDeepEqual,a=e.isDeepStrictEqual}var _=!1,E=e.exports=M,C={};function j(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function S(e,t,n,r){if(!n){var i=!1;if(0===t)i=!0,r="No value argument passed to `assert.ok()`";else if(r instanceof Error)throw r;var s=new f({actual:n,expected:!0,message:r,operator:"==",stackStartFn:e});throw s.generatedMessage=i,s}}function M(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S.apply(void 0,[M,t.length].concat(t))}E.fail=function e(t,n,s,o,a){var c,l=arguments.length;if(0===l)c="Failed";else if(1===l)s=t,t=void 0;else{if(!1===_){_=!0;var u=r.emitWarning?r.emitWarning:i.warn.bind(i);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===l&&(o="!=")}if(s instanceof Error)throw s;var p={actual:t,expected:n,operator:void 0===o?"fail":o,stackStartFn:a||e};void 0!==s&&(p.message=s);var d=new f(p);throw c&&(d.message=c,d.generatedMessage=!0),d},E.AssertionError=f,E.ok=M,E.equal=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");t!=n&&j({actual:t,expected:n,message:r,operator:"==",stackStartFn:e})},E.notEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");t==n&&j({actual:t,expected:n,message:r,operator:"!=",stackStartFn:e})},E.deepEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),o(t,n)||j({actual:t,expected:n,message:r,operator:"deepEqual",stackStartFn:e})},E.notDeepEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),o(t,n)&&j({actual:t,expected:n,message:r,operator:"notDeepEqual",stackStartFn:e})},E.deepStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),a(t,n)||j({actual:t,expected:n,message:r,operator:"deepStrictEqual",stackStartFn:e})},E.notDeepStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w();a(t,n)&&j({actual:t,expected:n,message:r,operator:"notDeepStrictEqual",stackStartFn:e})},E.strictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");k(t,n)||j({actual:t,expected:n,message:r,operator:"strictEqual",stackStartFn:e})},E.notStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");k(t,n)&&j({actual:t,expected:n,message:r,operator:"notStrictEqual",stackStartFn:e})};var N=function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n.forEach((function(e){e in t&&(void 0!==r&&"string"==typeof r[e]&&b(t[e])&&t[e].test(r[e])?i[e]=r[e]:i[e]=t[e])}))};function x(e,t,n,r,i,s){if(!(n in e)||!a(e[n],t[n])){if(!r){var o=new N(e,i),c=new N(t,i,e),l=new f({actual:o,expected:c,operator:"deepStrictEqual",stackStartFn:s});throw l.actual=e,l.expected=t,l.operator=s.name,l}j({actual:e,expected:t,message:r,operator:s.name,stackStartFn:s})}}function A(e,t,n,r){if("function"!=typeof t){if(b(t))return t.test(e);if(2===arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==s(e)||null===e){var i=new f({actual:e,expected:t,message:n,operator:"deepStrictEqual",stackStartFn:r});throw i.operator=r.name,i}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new p("error",t,"may not be an empty object");return void 0===o&&w(),a.forEach((function(i){"string"==typeof e[i]&&b(t[i])&&t[i].test(e[i])||x(e,t,i,n,a,r)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function O(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return C}function T(e){return v(e)||null!==e&&"object"===s(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function P(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!T(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!T(e))throw new u("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return C})).catch((function(e){return e}))}))}function I(e,t,n,r){if("string"==typeof n){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],n);if("object"===s(t)&&null!==t){if(t.message===n)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===n)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));r=n,n=void 0}else if(null!=n&&"object"!==s(n)&&"function"!=typeof n)throw new u("error",["Object","Error","Function","RegExp"],n);if(t===C){var i="";n&&n.name&&(i+=" (".concat(n.name,")")),i+=r?": ".concat(r):".";var o="rejects"===e.name?"rejection":"exception";j({actual:void 0,expected:n,operator:e.name,message:"Missing expected ".concat(o).concat(i),stackStartFn:e})}if(n&&!A(t,n,r,e))throw t}function R(e,t,n,r){if(t!==C){if("string"==typeof n&&(r=n,n=void 0),!n||A(t,n)){var i=r?": ".concat(r):".",s="doesNotReject"===e.name?"rejection":"exception";j({actual:t,expected:n,operator:e.name,message:"Got unwanted ".concat(s).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S.apply(void 0,[U,t.length].concat(t))}E.throws=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];I.apply(void 0,[e,O(t)].concat(r))},E.rejects=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return P(t).then((function(t){return I.apply(void 0,[e,t].concat(r))}))},E.doesNotThrow=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];R.apply(void 0,[e,O(t)].concat(r))},E.doesNotReject=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return P(t).then((function(t){return R.apply(void 0,[e,t].concat(r))}))},E.ifError=function e(t){if(null!=t){var n="ifError got unwanted exception: ";"object"===s(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?n+=t.constructor.name:n+=t.message:n+=m(t);var r=new f({actual:t,expected:null,operator:"ifError",message:n,stackStartFn:e}),i=t.stack;if("string"==typeof i){var o=i.split("\n");o.shift();for(var a=r.stack.split("\n"),c=0;c<o.length;c++){var l=a.indexOf(o[c]);if(-1!==l){a=a.slice(0,l);break}}r.stack="".concat(a.join("\n"),"\n").concat(o.join("\n"))}throw r}},E.strict=y(U,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},71228:function(e,t,n){"use strict";var r=n(5806);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(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 o(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)},c(e)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&p(i,n.prototype),i},u.apply(null,arguments)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e){return h="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},h(e)}var f=n(23333).inspect,m=n(27452).codes.ERR_INVALID_ARG_TYPE;function g(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}var v="",b="",y="",k="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function E(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function C(e,t,n){var i="",s="",o=0,a="",c=!1,l=E(e),u=l.split("\n"),p=E(t).split("\n"),d=0,f="";if("strictEqual"===n&&"object"===h(e)&&"object"===h(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===p.length&&u[0]!==p[0]){var m=u[0].length+p[0].length;if(m<=10){if(!("object"===h(e)&&null!==e||"object"===h(t)&&null!==t||0===e&&0===t))return"".concat(w[n],"\n\n")+"".concat(u[0]," !== ").concat(p[0],"\n")}else if("strictEqualObject"!==n){if(m<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][d]===p[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",d),"^"),d=0)}}}for(var _=u[u.length-1],C=p[p.length-1];_===C&&(d++<2?a="\n ".concat(_).concat(a):i=_,u.pop(),p.pop(),0!==u.length&&0!==p.length);)_=u[u.length-1],C=p[p.length-1];var j=Math.max(u.length,p.length);if(0===j){var S=l.split("\n");if(S.length>30)for(S[26]="".concat(v,"...").concat(k);S.length>27;)S.pop();return"".concat(w.notIdentical,"\n\n").concat(S.join("\n"),"\n")}d>3&&(a="\n".concat(v,"...").concat(k).concat(a),c=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var M=0,N=w[n]+"\n".concat(b,"+ actual").concat(k," ").concat(y,"- expected").concat(k),x=" ".concat(v,"...").concat(k," Lines skipped");for(d=0;d<j;d++){var A=d-o;if(u.length<d+1)A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(p[d-2]),M++),s+="\n ".concat(p[d-1]),M++),o=d,i+="\n".concat(y,"-").concat(k," ").concat(p[d]),M++;else if(p.length<d+1)A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(u[d-2]),M++),s+="\n ".concat(u[d-1]),M++),o=d,s+="\n".concat(b,"+").concat(k," ").concat(u[d]),M++;else{var O=p[d],T=u[d],P=T!==O&&(!g(T,",")||T.slice(0,-1)!==O);P&&g(O,",")&&O.slice(0,-1)===T&&(P=!1,T+=","),P?(A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(u[d-2]),M++),s+="\n ".concat(u[d-1]),M++),o=d,s+="\n".concat(b,"+").concat(k," ").concat(T),i+="\n".concat(y,"-").concat(k," ").concat(O),M+=2):(s+=i,i="",1!==A&&0!==d||(s+="\n ".concat(T),M++))}if(M>20&&d<j-2)return"".concat(N).concat(x,"\n").concat(s,"\n").concat(v,"...").concat(k).concat(i,"\n")+"".concat(v,"...").concat(k)}return"".concat(N).concat(c?x:"","\n").concat(s).concat(i).concat(a).concat(f)}var j=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==h(e)||null===e)throw new m("options","Object",e);var i=e.message,s=e.operator,c=e.stackStartFn,l=e.actual,u=e.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)n=o(this,d(t).call(this,String(i)));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(v="[34m",b="[32m",k="[39m",y="[31m"):(v="",b="",k="",y="")),"object"===h(l)&&null!==l&&"object"===h(u)&&null!==u&&"stack"in l&&l instanceof Error&&"stack"in u&&u instanceof Error&&(l=_(l),u=_(u)),"deepStrictEqual"===s||"strictEqual"===s)n=o(this,d(t).call(this,C(l,u,s)));else if("notDeepStrictEqual"===s||"notStrictEqual"===s){var f=w[s],g=E(l).split("\n");if("notStrictEqual"===s&&"object"===h(l)&&null!==l&&(f=w.notStrictEqualObject),g.length>30)for(g[26]="".concat(v,"...").concat(k);g.length>27;)g.pop();n=1===g.length?o(this,d(t).call(this,"".concat(f," ").concat(g[0]))):o(this,d(t).call(this,"".concat(f,"\n\n").concat(g.join("\n"),"\n")))}else{var j=E(l),S="",M=w[s];"notDeepEqual"===s||"notEqual"===s?(j="".concat(w[s],"\n\n").concat(j)).length>1024&&(j="".concat(j.slice(0,1021),"...")):(S="".concat(E(u)),j.length>512&&(j="".concat(j.slice(0,509),"...")),S.length>512&&(S="".concat(S.slice(0,509),"...")),"deepEqual"===s||"equal"===s?j="".concat(M,"\n\n").concat(j,"\n\nshould equal\n\n"):S=" ".concat(s," ").concat(S)),n=o(this,d(t).call(this,"".concat(j).concat(S)))}return Error.stackTraceLimit=p,n.generatedMessage=!i,Object.defineProperty(a(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=l,n.expected=u,n.operator=s,Error.captureStackTrace&&Error.captureStackTrace(a(n),c),n.stack,n.name="AssertionError",o(n)}var n,c,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,e),n=t,c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(e,t){return f(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],c&&s(n.prototype,c),l&&s(n,l),t}(c(Error));e.exports=j},27452: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)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var a,c,l={};function u(e,t,n){n||(n=Error);var r=function(n){function r(n,o,a){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),c=i(this,s(r).call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,o,a))),c.code=e,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(r,n),r}(n);l[e]=r}function p(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(e,t,i){var s,o,c,l;if(void 0===a&&(a=n(90605)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(o="not ",t.substr(!c||c<0?0:+c,o.length)===o)?(s="must not be",t=t.replace(/^not /,"")):s="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(s," ").concat(p(t,"type"));else{var u=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(s," ").concat(p(t,"type"))}return l+=". Received type ".concat(r(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=n(23333));var i=c.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];void 0===a&&(a=n(90605)),a(t.length>0,"At least one arg needs to be specified");var i="The ",s=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),s){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,s-1).join(", "),i+=", and ".concat(t[s-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=l},81562:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],_n=!0,r=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(_n=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,i=e}finally{try{_n||null==o.return||o.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="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},i(e)}var s=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},c=Object.is?Object.is:n(88706),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:n(17614);function p(e){return e.call.bind(e)}var d=p(Object.prototype.hasOwnProperty),h=p(Object.prototype.propertyIsEnumerable),f=p(Object.prototype.toString),m=n(23333).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,y=m.isMap,k=m.isRegExp,w=m.isSet,_=m.isNativeError,E=m.isBoxedPrimitive,C=m.isNumberObject,j=m.isStringObject,S=m.isBooleanObject,M=m.isBigIntObject,N=m.isSymbolObject,x=m.isFloat32Array,A=m.isFloat64Array;function O(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<48||n>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function T(e){return Object.keys(e).filter(O).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function P(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function I(e,t,n,r){if(e===t)return 0!==e||(!n||c(e,t));if(n){if("object"!==i(e))return"number"==typeof e&&u(e)&&u(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,a,l,p,d=f(e);if(d!==f(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=T(e),m=T(t);return h.length===m.length&&U(e,t,n,r,1,h)}if("[object Object]"===d&&(!y(e)&&y(t)||!w(e)&&w(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(k(e)){if(!k(t)||(l=e,p=t,!(s?l.source===p.source&&l.flags===p.flags:RegExp.prototype.toString.call(l)===RegExp.prototype.toString.call(p))))return!1}else if(_(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(n||!x(e)&&!A(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===P(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}(e,t))return!1;var O=T(e),I=T(t);return O.length===I.length&&U(e,t,n,r,0,O)}if(w(e))return!(!w(t)||e.size!==t.size)&&U(e,t,n,r,2);if(y(e))return!(!y(t)||e.size!==t.size)&&U(e,t,n,r,3);if(g(e)){if(a=t,(o=e).byteLength!==a.byteLength||0!==P(new Uint8Array(o),new Uint8Array(a)))return!1}else if(E(e)&&!function(e,t){return C(e)?C(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):j(e)?j(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):S(e)?S(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):M(e)?M(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):N(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return U(e,t,n,r,0)}function R(e,t){return t.filter((function(t){return h(e,t)}))}function U(e,t,n,r,i,s){if(5===arguments.length){s=Object.keys(e);var o=Object.keys(t);if(s.length!==o.length)return!1}for(var a=0;a<s.length;a++)if(!d(t,s[a]))return!1;if(n&&5===arguments.length){var c=l(e);if(0!==c.length){var u=0;for(a=0;a<c.length;a++){var p=c[a];if(h(e,p)){if(!h(t,p))return!1;s.push(p),u++}else if(h(t,p))return!1}var f=l(t);if(c.length!==f.length&&R(t,f).length!==u)return!1}else{var m=l(t);if(0!==m.length&&0!==R(t,m).length)return!1}}if(0===s.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===r)r={val1:new Map,val2:new Map,position:0};else{var g=r.val1.get(e);if(void 0!==g){var v=r.val2.get(t);if(void 0!==v)return g===v}r.position++}r.val1.set(e,r.position),r.val2.set(t,r.position);var b=F(e,t,n,s,r,i);return r.val1.delete(e),r.val2.delete(t),b}function D(e,t,n,r){for(var i=o(e),s=0;s<i.length;s++){var a=i[s];if(I(t,a,n,r))return e.delete(a),!0}return!1}function Z(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(u(e))return!1}return!0}function L(e,t,n){var r=Z(n);return null!=r?r:t.has(r)&&!e.has(r)}function z(e,t,n,r,i){var s=Z(n);if(null!=s)return s;var o=t.get(s);return!(void 0===o&&!t.has(s)||!I(r,o,!1,i))&&(!e.has(s)&&I(r,o,!1,i))}function B(e,t,n,r,i,s){for(var a=o(e),c=0;c<a.length;c++){var l=a[c];if(I(n,l,i,s)&&I(r,t.get(l),i,s))return e.delete(l),!0}return!1}function F(e,t,n,s,c,l){var u=0;if(2===l){if(!function(e,t,n,r){for(var s=null,a=o(e),c=0;c<a.length;c++){var l=a[c];if("object"===i(l)&&null!==l)null===s&&(s=new Set),s.add(l);else if(!t.has(l)){if(n)return!1;if(!L(e,t,l))return!1;null===s&&(s=new Set),s.add(l)}}if(null!==s){for(var u=o(t),p=0;p<u.length;p++){var d=u[p];if("object"===i(d)&&null!==d){if(!D(s,d,n,r))return!1}else if(!n&&!e.has(d)&&!D(s,d,n,r))return!1}return 0===s.size}return!0}(e,t,n,c))return!1}else if(3===l){if(!function(e,t,n,s){for(var o=null,c=a(e),l=0;l<c.length;l++){var u=r(c[l],2),p=u[0],d=u[1];if("object"===i(p)&&null!==p)null===o&&(o=new Set),o.add(p);else{var h=t.get(p);if(void 0===h&&!t.has(p)||!I(d,h,n,s)){if(n)return!1;if(!z(e,t,p,d,s))return!1;null===o&&(o=new Set),o.add(p)}}}if(null!==o){for(var f=a(t),m=0;m<f.length;m++){var g=r(f[m],2),v=(p=g[0],g[1]);if("object"===i(p)&&null!==p){if(!B(o,e,p,v,n,s))return!1}else if(!(n||e.has(p)&&I(e.get(p),v,!1,s)||B(o,e,p,v,!1,s)))return!1}return 0===o.size}return!0}(e,t,n,c))return!1}else if(1===l)for(;u<e.length;u++){if(!d(e,u)){if(d(t,u))return!1;for(var p=Object.keys(e);u<p.length;u++){var h=p[u];if(!d(t,h)||!I(e[h],t[h],n,c))return!1}return p.length===Object.keys(t).length}if(!d(t,u)||!I(e[u],t[u],n,c))return!1}for(u=0;u<s.length;u++){var f=s[u];if(!I(e[f],t[f],n,c))return!1}return!0}e.exports={isDeepEqual:function(e,t){return I(e,t,false)},isDeepStrictEqual:function(e,t){return I(e,t,true)}}},62803:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=c(e),o=s[0],a=s[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),u=0,p=a>0?o-4:o;for(n=0;n<p;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,c=r-i;a<c;a+=o)s.push(l(e,a,a+o>c?c:a+o));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,s,o=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},30910:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(56095).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,u=n;u<a;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var p=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)p*=t;this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,p=67108863&c,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var f=l-h|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[h])+p)/67108864|0,p=67108863&o}n.words[l]=0|p,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=p[e],h=d[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);n=(f=f.idivn(h)).isZero()?m+n:u[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,c="le"===t,l=new e(s),u=this.clone();if(c){for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),l[a]=o;for(;a<s;a++)l[a]=0}else{for(a=0;a<s-i;a++)l[a]=0;for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),l[s-a-1]=o}return l},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,l=0,u=0|o[0],p=8191&u,d=u>>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],k=8191&y,w=y>>>13,_=0|o[4],E=8191&_,C=_>>>13,j=0|o[5],S=8191&j,M=j>>>13,N=0|o[6],x=8191&N,A=N>>>13,O=0|o[7],T=8191&O,P=O>>>13,I=0|o[8],R=8191&I,U=I>>>13,D=0|o[9],Z=8191&D,L=D>>>13,z=0|a[0],B=8191&z,F=z>>>13,V=0|a[1],q=8191&V,H=V>>>13,W=0|a[2],J=8191&W,$=W>>>13,K=0|a[3],G=8191&K,Y=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],pe=8191&ue,de=ue>>>13,he=0|a[9],fe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;l=((s=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,B),i=(i=Math.imul(f,F))+Math.imul(m,B)|0,s=Math.imul(m,F);var ve=(l+(r=r+Math.imul(p,q)|0)|0)+((8191&(i=(i=i+Math.imul(p,H)|0)+Math.imul(d,q)|0))<<13)|0;l=((s=s+Math.imul(d,H)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,B),i=(i=Math.imul(v,F))+Math.imul(b,B)|0,s=Math.imul(b,F),r=r+Math.imul(f,q)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,H)|0;var be=(l+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,$)|0)+Math.imul(d,J)|0))<<13)|0;l=((s=s+Math.imul(d,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(w,B)|0,s=Math.imul(w,F),r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,H)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,$)|0;var ye=(l+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,G)|0))<<13)|0;l=((s=s+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,B),i=(i=Math.imul(E,F))+Math.imul(C,B)|0,s=Math.imul(C,F),r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(w,q)|0,s=s+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,$)|0,r=r+Math.imul(f,G)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,G)|0,s=s+Math.imul(m,Y)|0;var ke=(l+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;l=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(S,B),i=(i=Math.imul(S,F))+Math.imul(M,B)|0,s=Math.imul(M,F),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(C,q)|0,s=s+Math.imul(C,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,$)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var we=(l+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;l=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,B),i=(i=Math.imul(x,F))+Math.imul(A,B)|0,s=Math.imul(A,F),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,$)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(w,G)|0,s=s+Math.imul(w,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(l+(r=r+Math.imul(p,se)|0)|0)+((8191&(i=(i=i+Math.imul(p,oe)|0)+Math.imul(d,se)|0))<<13)|0;l=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(P,B)|0,s=Math.imul(P,F),r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,H)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,$)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,G)|0,s=s+Math.imul(C,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(l+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((s=s+Math.imul(d,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,F))+Math.imul(U,B)|0,s=Math.imul(U,F),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,$)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,Q)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,le)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;l=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(Z,B),i=(i=Math.imul(Z,F))+Math.imul(L,B)|0,s=Math.imul(L,F),r=r+Math.imul(R,q)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(U,q)|0,s=s+Math.imul(U,H)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,$)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,G)|0,s=s+Math.imul(A,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,le)|0,r=r+Math.imul(f,pe)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(m,pe)|0,s=s+Math.imul(m,de)|0;var je=(l+(r=r+Math.imul(p,fe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,fe)|0))<<13)|0;l=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(Z,q),i=(i=Math.imul(Z,H))+Math.imul(L,q)|0,s=Math.imul(L,H),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,$)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,oe)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,le)|0,r=r+Math.imul(v,pe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(b,pe)|0,s=s+Math.imul(b,de)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;l=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(Z,J),i=(i=Math.imul(Z,$))+Math.imul(L,J)|0,s=Math.imul(L,$),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(U,G)|0,s=s+Math.imul(U,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(C,ce)|0,s=s+Math.imul(C,le)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(w,pe)|0,s=s+Math.imul(w,de)|0;var Me=(l+(r=r+Math.imul(v,fe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,fe)|0))<<13)|0;l=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(Z,G),i=(i=Math.imul(Z,Y))+Math.imul(L,G)|0,s=Math.imul(L,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(U,Q)|0,s=s+Math.imul(U,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,oe)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,le)|0,r=r+Math.imul(E,pe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(C,pe)|0,s=s+Math.imul(C,de)|0;var Ne=(l+(r=r+Math.imul(k,fe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(w,fe)|0))<<13)|0;l=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(Z,Q),i=(i=Math.imul(Z,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(U,ne)|0,s=s+Math.imul(U,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,le)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(M,pe)|0,s=s+Math.imul(M,de)|0;var xe=(l+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,fe)|0))<<13)|0;l=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(Z,ne),i=(i=Math.imul(Z,re))+Math.imul(L,ne)|0,s=Math.imul(L,re),r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(U,se)|0,s=s+Math.imul(U,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,le)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,pe)|0,s=s+Math.imul(A,de)|0;var Ae=(l+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(M,fe)|0))<<13)|0;l=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(Z,se),i=(i=Math.imul(Z,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(U,ce)|0,s=s+Math.imul(U,le)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(P,pe)|0,s=s+Math.imul(P,de)|0;var Oe=(l+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,fe)|0))<<13)|0;l=((s=s+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(Z,ce),i=(i=Math.imul(Z,le))+Math.imul(L,ce)|0,s=Math.imul(L,le),r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(U,pe)|0,s=s+Math.imul(U,de)|0;var Te=(l+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(P,fe)|0))<<13)|0;l=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(Z,pe),i=(i=Math.imul(Z,de))+Math.imul(L,pe)|0,s=Math.imul(L,de);var Pe=(l+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(U,fe)|0))<<13)|0;l=((s=s+Math.imul(U,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(l+(r=Math.imul(Z,fe))|0)+((8191&(i=(i=Math.imul(Z,me))+Math.imul(L,fe)|0))<<13)|0;return l=((s=Math.imul(L,me))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=ke,c[5]=we,c[6]=_e,c[7]=Ee,c[8]=Ce,c[9]=je,c[10]=Se,c[11]=Me,c[12]=Ne,c[13]=xe,c[14]=Ae,c[15]=Oe,c[16]=Te,c[17]=Pe,c[18]=Ie,0!==l&&(c[19]=l,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),s.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),l=Math.max(0,s-e.length+1);l<=c;l++){var u=s-l,p=(0|e.words[u])*(0|t.words[l]),d=67108863&p;a=67108863&(d=d+a|0),i+=(o=(o=o+(p/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var p=c,d=l,h=0;h<o;h++){var f=n[u+h],m=r[u+h],g=n[u+h+o],v=r[u+h+o],b=p*g-d*v;v=p*v+d*g,g=b,n[u+h]=f+g,r[u+h]=m+v,n[u+h+o]=f-g,r[u+h+o]=m-v,h!==a&&(b=c*p-l*d,d=c*d+l*p,p=b)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),c=new Array(r),l=new Array(r),u=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,s,a,c,r,i),this.transform(l,s,u,p,r,i);for(var h=0;h<r;h++){var f=a[h]*u[h]-c[h]*p[h];c[h]=a[h]*p[h]+c[h]*u[h],a[h]=f}return this.conjugate(a,c,r),this.transform(a,c,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<n;this.words[t]=c|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=n;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var p=0|this.words[l];this.words[l]=u<<26-s|p>>>s,u=p&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[i.length+p])+(0|r.words[i.length+p-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,p),r.isZero()||(r.negative^=1);a&&(a.words[p]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),c=new s(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),p=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(p)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(c)):(n.isub(t),a.isub(i),c.isub(o))}return{a:a,b:c,gcd:n.iushln(l)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var p=0,d=1;0==(n.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(n.iushrn(p);p-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(y,b),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(k,b),i(w,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new k;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var p=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=o;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var v=this.pow(p,new s(1).iushln(f-g-1));d=d.redMul(v),p=v.redSqr(),h=h.redMul(p),f=g}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var p=l>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new C(e)},i(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},53380:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(14864).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function l(e,t,n,i){for(var s=0,o=0,a=Math.min(e.length,n),c=t;c<a;c++){var l=e.charCodeAt(c)-48;s*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&o<i,"Invalid character"),s+=o}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,u=n;u<a;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var p=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)p*=t;this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){u(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch(e){s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?d[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(u).toString(e);n=(p=p.idivn(u)).isZero()?m+n:d[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,p=67108863&c,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var f=l-h|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[h])+p)/67108864|0,p=67108863&o}n.words[l]=0|p,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n++]=255&o,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),6===s?(n<e.length&&(e[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n--]=255&o,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),6===s?(n>=0&&(e[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,l=0,u=0|o[0],p=8191&u,d=u>>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],k=8191&y,w=y>>>13,_=0|o[4],E=8191&_,C=_>>>13,j=0|o[5],S=8191&j,M=j>>>13,N=0|o[6],x=8191&N,A=N>>>13,O=0|o[7],T=8191&O,P=O>>>13,I=0|o[8],R=8191&I,U=I>>>13,D=0|o[9],Z=8191&D,L=D>>>13,z=0|a[0],B=8191&z,F=z>>>13,V=0|a[1],q=8191&V,H=V>>>13,W=0|a[2],J=8191&W,$=W>>>13,K=0|a[3],G=8191&K,Y=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],pe=8191&ue,de=ue>>>13,he=0|a[9],fe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;l=((s=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,B),i=(i=Math.imul(f,F))+Math.imul(m,B)|0,s=Math.imul(m,F);var ve=(l+(r=r+Math.imul(p,q)|0)|0)+((8191&(i=(i=i+Math.imul(p,H)|0)+Math.imul(d,q)|0))<<13)|0;l=((s=s+Math.imul(d,H)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,B),i=(i=Math.imul(v,F))+Math.imul(b,B)|0,s=Math.imul(b,F),r=r+Math.imul(f,q)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,H)|0;var be=(l+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,$)|0)+Math.imul(d,J)|0))<<13)|0;l=((s=s+Math.imul(d,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(w,B)|0,s=Math.imul(w,F),r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,H)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,$)|0;var ye=(l+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,G)|0))<<13)|0;l=((s=s+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,B),i=(i=Math.imul(E,F))+Math.imul(C,B)|0,s=Math.imul(C,F),r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(w,q)|0,s=s+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,$)|0,r=r+Math.imul(f,G)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,G)|0,s=s+Math.imul(m,Y)|0;var ke=(l+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;l=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(S,B),i=(i=Math.imul(S,F))+Math.imul(M,B)|0,s=Math.imul(M,F),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(C,q)|0,s=s+Math.imul(C,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,$)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var we=(l+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;l=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,B),i=(i=Math.imul(x,F))+Math.imul(A,B)|0,s=Math.imul(A,F),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,$)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(w,G)|0,s=s+Math.imul(w,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(l+(r=r+Math.imul(p,se)|0)|0)+((8191&(i=(i=i+Math.imul(p,oe)|0)+Math.imul(d,se)|0))<<13)|0;l=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(P,B)|0,s=Math.imul(P,F),r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,H)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,$)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,G)|0,s=s+Math.imul(C,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(l+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((s=s+Math.imul(d,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,F))+Math.imul(U,B)|0,s=Math.imul(U,F),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,$)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,Q)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,le)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;l=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(Z,B),i=(i=Math.imul(Z,F))+Math.imul(L,B)|0,s=Math.imul(L,F),r=r+Math.imul(R,q)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(U,q)|0,s=s+Math.imul(U,H)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,$)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,G)|0,s=s+Math.imul(A,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,le)|0,r=r+Math.imul(f,pe)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(m,pe)|0,s=s+Math.imul(m,de)|0;var je=(l+(r=r+Math.imul(p,fe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,fe)|0))<<13)|0;l=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(Z,q),i=(i=Math.imul(Z,H))+Math.imul(L,q)|0,s=Math.imul(L,H),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,$)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,oe)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,le)|0,r=r+Math.imul(v,pe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(b,pe)|0,s=s+Math.imul(b,de)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;l=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(Z,J),i=(i=Math.imul(Z,$))+Math.imul(L,J)|0,s=Math.imul(L,$),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(U,G)|0,s=s+Math.imul(U,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(C,ce)|0,s=s+Math.imul(C,le)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(w,pe)|0,s=s+Math.imul(w,de)|0;var Me=(l+(r=r+Math.imul(v,fe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,fe)|0))<<13)|0;l=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(Z,G),i=(i=Math.imul(Z,Y))+Math.imul(L,G)|0,s=Math.imul(L,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(U,Q)|0,s=s+Math.imul(U,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,oe)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,le)|0,r=r+Math.imul(E,pe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(C,pe)|0,s=s+Math.imul(C,de)|0;var Ne=(l+(r=r+Math.imul(k,fe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(w,fe)|0))<<13)|0;l=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(Z,Q),i=(i=Math.imul(Z,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(U,ne)|0,s=s+Math.imul(U,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,le)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(M,pe)|0,s=s+Math.imul(M,de)|0;var xe=(l+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,fe)|0))<<13)|0;l=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(Z,ne),i=(i=Math.imul(Z,re))+Math.imul(L,ne)|0,s=Math.imul(L,re),r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(U,se)|0,s=s+Math.imul(U,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,le)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,pe)|0,s=s+Math.imul(A,de)|0;var Ae=(l+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(M,fe)|0))<<13)|0;l=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(Z,se),i=(i=Math.imul(Z,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(U,ce)|0,s=s+Math.imul(U,le)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(P,pe)|0,s=s+Math.imul(P,de)|0;var Oe=(l+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,fe)|0))<<13)|0;l=((s=s+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(Z,ce),i=(i=Math.imul(Z,le))+Math.imul(L,ce)|0,s=Math.imul(L,le),r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(U,pe)|0,s=s+Math.imul(U,de)|0;var Te=(l+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(P,fe)|0))<<13)|0;l=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(Z,pe),i=(i=Math.imul(Z,de))+Math.imul(L,pe)|0,s=Math.imul(L,de);var Pe=(l+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(U,fe)|0))<<13)|0;l=((s=s+Math.imul(U,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(l+(r=Math.imul(Z,fe))|0)+((8191&(i=(i=Math.imul(Z,me))+Math.imul(L,fe)|0))<<13)|0;return l=((s=Math.imul(L,me))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=ke,c[5]=we,c[6]=_e,c[7]=Ee,c[8]=Ce,c[9]=je,c[10]=Se,c[11]=Me,c[12]=Ne,c[13]=xe,c[14]=Ae,c[15]=Oe,c[16]=Te,c[17]=Pe,c[18]=Ie,0!==l&&(c[19]=l,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),l=Math.max(0,s-e.length+1);l<=c;l++){var u=s-l,p=(0|e.words[u])*(0|t.words[l]),d=67108863&p;a=67108863&(d=d+a|0),i+=(o=(o=o+(p/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return v(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},y.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var p=c,d=l,h=0;h<o;h++){var f=n[u+h],m=r[u+h],g=n[u+h+o],v=r[u+h+o],b=p*g-d*v;v=p*v+d*g,g=b,n[u+h]=f+g,r[u+h]=m+v,n[u+h+o]=f-g,r[u+h+o]=m-v,h!==a&&(b=c*p-l*d,d=c*d+l*p,p=b)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),c=new Array(r),l=new Array(r),u=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,s,a,c,r,i),this.transform(l,s,u,p,r,i);for(var h=0;h<r;h++){var f=a[h]*u[h]-c[h]*p[h];c[h]=a[h]*p[h]+c[h]*u[h],a[h]=f}return this.conjugate(a,c,r),this.transform(a,c,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),b(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<n;this.words[t]=c|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=n;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var p=0|this.words[l];this.words[l]=u<<26-s|p>>>s,u=p&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[i.length+p])+(0|r.words[i.length+p-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,p),r.isZero()||(r.negative^=1);a&&(a.words[p]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),c=new s(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),p=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(p)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(c)):(n.isub(t),a.isub(i),c.isub(o))}return{a:a,b:c,gcd:n.iushln(l)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var p=0,d=1;0==(n.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(n.iushrn(p);p-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new S(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var k={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(C,w),i(j,w),j.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(k[e])return k[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new j}return k[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var p=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=o;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var v=this.pow(p,new s(1).iushln(f-g-1));d=d.redMul(v),p=v.redSqr(),h=h.redMul(p),f=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var p=l>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}c=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new M(e)},i(M,S),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},98707:function(e,t,n){var r=n(52221);e.exports=function(e){var t=null,n=r(e);if(3===e.nodeType){var i=n.createRange();i.selectNodeContents(e),e=i}if("function"==typeof e.getBoundingClientRect&&(t=e.getBoundingClientRect(),e.startContainer&&0===t.left&&0===t.top)){var s=n.createElement("span");s.appendChild(n.createTextNode("​")),e.insertNode(s),t=s.getBoundingClientRect();var o=s.parentNode;o.removeChild(s),o.normalize()}return t}},71876:function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=n(69627);if("function"!=typeof s.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return s.randomBytes(e)}}catch(e){}},9111:function(e,t,n){var r=n(37225).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function s(e){for(;0<e.length;e++)e[0]=0}function o(e,t,n,r,i){for(var s,o,a,c,l=n[0],u=n[1],p=n[2],d=n[3],h=e[0]^t[0],f=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,b=1;b<i;b++)s=l[h>>>24]^u[f>>>16&255]^p[m>>>8&255]^d[255&g]^t[v++],o=l[f>>>24]^u[m>>>16&255]^p[g>>>8&255]^d[255&h]^t[v++],a=l[m>>>24]^u[g>>>16&255]^p[h>>>8&255]^d[255&f]^t[v++],c=l[g>>>24]^u[h>>>16&255]^p[f>>>8&255]^d[255&m]^t[v++],h=s,f=o,m=a,g=c;return s=(r[h>>>24]<<24|r[f>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],o=(r[f>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[v++],a=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&f])^t[v++],c=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[f>>>8&255]<<8|r[255&m])^t[v++],[s>>>=0,o>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,c=0;c<256;++c){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,n[o]=l,r[l]=o;var u=e[o],p=e[u],d=e[p],h=257*e[l]^16843008*l;i[0][o]=h<<24|h>>>8,i[1][o]=h<<16|h>>>16,i[2][o]=h<<8|h>>>24,i[3][o]=h,h=16843009*d^65537*p^257*u^16843008*o,s[0][l]=h<<24|h>>>8,s[1][l]=h<<16|h>>>16,s[2][l]=h<<8|h>>>24,s[3][l]=h,0===o?o=a=1:(o=u^e[e[e[d^u]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:s}}();function l(e){this._key=i(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],s=0;s<t;s++)i[s]=e[s];for(s=t;s<r;s++){var o=i[s-1];s%t==0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=a[s/t|0]<<24):t>6&&s%t==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),i[s]=i[s-t]^o}for(var l=[],u=0;u<r;u++){var p=r-u,d=i[p-(u%4?0:4)];l[u]=u<4||p<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return o(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=o(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),s=r.allocUnsafe(16);return s.writeUInt32BE(n[0],0),s.writeUInt32BE(n[3],4),s.writeUInt32BE(n[2],8),s.writeUInt32BE(n[1],12),s},l.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},e.exports.AES=l},43667:function(e,t,n){var r=n(9111),i=n(37225).Buffer,s=n(69239),o=n(59503),a=n(83579),c=n(35375),l=n(35127);function u(e,t,n,o){s.call(this);var c=i.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(c);this._ghash=new a(u),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new a(n),s=t.length,o=s%16;r.update(t),o&&(o=16-o,r.update(i.alloc(o,0))),r.update(i.alloc(8,0));var c=8*s,u=i.alloc(8);u.writeUIntBE(c,0,8),r.update(u),e._finID=r.state;var p=i.from(e._finID);return l(p),p}(this,n,u),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,s),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=u},6123:function(e,t,n){var r=n(37180),i=n(68161),s=n(4317);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(s)}},68161:function(e,t,n){var r=n(43667),i=n(37225).Buffer,s=n(54354),o=n(76085),a=n(69239),c=n(9111),l=n(51105);function u(e,t,n){a.call(this),this._cache=new p,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function p(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new u(a.module,t,n)}n(59503)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=i.concat([this.cache,e])},p.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},p.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=l(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},37180:function(e,t,n){var r=n(54354),i=n(43667),s=n(37225).Buffer,o=n(76085),a=n(69239),c=n(9111),l=n(51105);function u(e,t,n){a.call(this),this._cache=new d,this._cipher=new c.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}n(59503)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return s.concat(r)};var p=s.alloc(16,16);function d(){this.cache=s.allocUnsafe(0)}function h(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=s.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new o(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new u(a.module,t,n)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=s.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return s.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return h(e,i.key,i.iv)}},83579:function(e,t,n){var r=n(37225).Buffer,i=r.alloc(16,0);function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=o},35127:function(e){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},62113:function(e,t,n){var r=n(35375);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},1634:function(e,t,n){var r=n(37225).Buffer,i=n(35375);function s(e,t,n){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=r.concat([e._prev,n?t:o]),o}t.encrypt=function(e,t,n){for(var i,o=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){o=r.concat([o,s(e,t,n)]);break}i=e._cache.length,o=r.concat([o,s(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},34422:function(e,t,n){var r=n(37225).Buffer;function i(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=s(e._prev,n?r:i);return a}function s(e,t){var n=e.length,i=-1,s=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)s[i]=e[i]<<1|e[i+1]>>7;return s}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},46750:function(e,t,n){var r=n(37225).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},92204:function(e,t,n){var r=n(35375),i=n(37225).Buffer,s=n(35127);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),s=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var c=o(e),l=s+16*a;e._cache.writeUInt32BE(c[0],l+0),e._cache.writeUInt32BE(c[1],l+4),e._cache.writeUInt32BE(c[2],l+8),e._cache.writeUInt32BE(c[3],l+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,u)}},59252:function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},54354:function(e,t,n){var r={ECB:n(59252),CBC:n(62113),CFB:n(1634),CFB8:n(46750),CFB1:n(34422),OFB:n(985),CTR:n(92204),GCM:n(92204)},i=n(4317);for(var s in i)i[s].module=r[i[s].mode];e.exports=i},985:function(e,t,n){var r=n(90778).Buffer,i=n(35375);function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=r.concat([e._cache,s(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,n)}},76085:function(e,t,n){var r=n(9111),i=n(37225).Buffer,s=n(69239);function o(e,t,n,o){s.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=e}n(59503)(o,s),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},83936:function(e,t,n){var r=n(63079),i=n(6123),s=n(54354),o=n(52324),a=n(51105);function c(e,t,n){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function l(e,t,n){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return l(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},63079:function(e,t,n){var r=n(69239),i=n(98625),s=n(59503),o=n(37225).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){r.call(this);var t,n=e.mode.toLowerCase(),i=a[n];t=e.decrypt?"decrypt":"encrypt";var s=e.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=o.concat([s,s.slice(0,8)]));var c=e.iv;o.isBuffer(c)||(c=o.from(c)),this._des=i.create({key:s,iv:c,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=c,s(c,r),c.prototype._update=function(e){return o.from(this._des.update(e))},c.prototype._final=function(){return o.from(this._des.final())}},52324:function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},8568:function(e,t,n){var r=n(90778).Buffer,i=n(53380),s=n(35175);function o(e){var t,n=e.modulus.byteLength();do{t=new i(s(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var n=function(e){var t=o(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),s=t.modulus.byteLength(),a=new i(e).mul(n.blinder).umod(t.modulus),c=a.toRed(i.mont(t.prime1)),l=a.toRed(i.mont(t.prime2)),u=t.coefficient,p=t.prime1,d=t.prime2,h=c.redPow(t.exponent1).fromRed(),f=l.redPow(t.exponent2).fromRed(),m=h.isub(f).imul(u).umod(p).imul(d);return f.iadd(m).imul(n.unblinder).umod(t.modulus).toArrayLike(r,"be",s)}a.getr=o,e.exports=a},60451:function(e,t,n){e.exports=n(1877)},29908:function(e,t,n){var r=n(37225).Buffer,i=n(77439),s=n(7130),o=n(59503),a=n(75043),c=n(53075),l=n(1877);function u(e){s.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function p(e){s.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new u(e)}function h(e){return new p(e)}Object.keys(l).forEach((function(e){l[e].id=r.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),o(u,s.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(p,s.Writable),p.prototype._write=function(e,t,n){this._hash.update(e),n()},p.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},p.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return c(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},75043:function(e,t,n){var r=n(37225).Buffer,i=n(40445),s=n(8568),o=n(73931).ec,a=n(53380),c=n(87758),l=n(72968);function u(e,t,n,s){if((e=r.from(e.toArray())).length<t.byteLength()){var o=r.alloc(t.byteLength()-e.length);e=r.concat([o,e])}var a=n.length,c=function(e,t){e=(e=p(e,t)).mod(t);var n=r.from(e.toArray());if(n.length<t.byteLength()){var i=r.alloc(t.byteLength()-n.length);n=r.concat([i,n])}return n}(n,t),l=r.alloc(a);l.fill(1);var u=r.alloc(a);return u=i(s,u).update(l).update(r.from([0])).update(e).update(c).digest(),l=i(s,u).update(l).digest(),{k:u=i(s,u).update(l).update(r.from([1])).update(e).update(c).digest(),v:l=i(s,u).update(l).digest()}}function p(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function d(e,t,n){var s,o;do{for(s=r.alloc(0);8*s.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),s=r.concat([s,t.v]);o=p(s,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function h(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,n,i,f){var m=c(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var n=l[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var i=new o(n).keyFromPrivate(t.privateKey).sign(e);return r.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,n){var i,s=t.params.priv_key,o=t.params.p,c=t.params.q,l=t.params.g,f=new a(0),m=p(e,c).mod(c),g=!1,v=u(s,c,e,n);for(;!1===g;)f=h(l,i=d(c,v,n),o,c),0===(g=i.invm(c).imul(m.add(s.mul(f))).mod(c)).cmpn(0)&&(g=!1,f=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var n=[48,e.length+t.length+4,2,e.length];return n=n.concat(e,[2,t.length],t),r.from(n)}(f,g)}(e,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([f,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return s(v,m)},e.exports.getKey=u,e.exports.makeKey=d},53075:function(e,t,n){var r=n(37225).Buffer,i=n(53380),s=n(73931).ec,o=n(87758),a=n(72968);function c(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,l,u){var p=o(n);if("ec"===p.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),o=n.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,p)}if("dsa"===p.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,s=n.data.q,a=n.data.g,l=n.data.pub_key,u=o.signature.decode(e,"der"),p=u.s,d=u.r;c(p,s),c(d,s);var h=i.mont(r),f=p.invm(s);return 0===a.toRed(h).redPow(new i(t).mul(f).mod(s)).fromRed().mul(l.toRed(h).redPow(d.mul(f).mod(s)).fromRed()).mod(r).mod(s).cmp(d)}(e,t,p)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=r.concat([u,t]);for(var d=p.modulus.byteLength(),h=[1],f=0;t.length+h.length+2<d;)h.push(255),f++;h.push(0);for(var m=-1;++m<t.length;)h.push(t[m]);h=r.from(h);var g=i.mont(p.modulus);e=(e=new i(e).toRed(g)).redPow(new i(p.publicExponent)),e=r.from(e.fromRed().toArray());var v=f<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(v=1),m=-1;++m<d;)v|=e[m]^h[m];return 0===v}},35375:function(e,t,n){var r=n(90778).Buffer;e.exports=function(e,t){for(var n=Math.min(e.length,t.length),i=new r(n),s=0;s<n;++s)i[s]=e[s]^t[s];return i}},90778:function(e,t,n){"use strict";var r=n(55246);const i=n(62803),s=n(23644),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function c(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=c(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|m(e.length),n=c(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?c(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return p(e),c(e<0?0:0|m(e))}function h(e){const t=e.length<0?0:0|m(e.length),n=c(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function m(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:k(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):k(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function k(e,t,n,r,i){let s,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(s=n;s<a;s++)if(l(e,s)===l(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===c)return r*o}else-1!==r&&(s-=s-r),r=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){let n=!0;for(let r=0;r<c;r++)if(l(e,s+r)!==l(t,r)){n=!1;break}if(n)return s}return-1}function w(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let o;for(r>s/2&&(r=s/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(Y(r))return o;e[n+o]=r}return o}function _(e,t,n,r){return K(J(t,e.length-n),e,n,r)}function E(e,t,n,r){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return K($(t),e,n,r)}function j(e,t,n,r){return K(function(e,t){let n,r,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,a,c;switch(o){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(s=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=o}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=N));return n}(r)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||void 0===r||"function"!=typeof r.error||r.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return p(e),e<=0?c(e):void 0!==t?"string"==typeof n?c(e).fill(t,n):c(e).fill(t):c(e)}(e,t,n)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(G(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?M(this,0,e):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<a;++e)if(c[e]!==u[e]){s=c[e],o=u[e];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function x(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function A(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=X[e[r]];return i}function T(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function D(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Z(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,4),s.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,8),s.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=0,s=1,o=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=n-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return Z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return Z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=l.isBuffer(e)?e:l.from(e,r),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%o]}return this};const z={};function B(e,t,n){z[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,s)}function q(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=F(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function J(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function $(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},16422:function(e,t,n){"use strict";var r=n(25165),i=n(43120),s=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&s(e,".prototype.")>-1?i(n):n}},43120:function(e,t,n){"use strict";var r=n(75433),i=n(25165),s=i("%Function.prototype.apply%"),o=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(o,s),c=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=a(r,o,arguments);if(c&&l){var n=c(t,"length");n.configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var p=function(){return a(r,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},69239:function(e,t,n){var r=n(37225).Buffer,i=n(81717).Transform,s=n(3247).s;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(59503)(o,i),o.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=o},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},31439:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var s=0,o=r.length;s<o;s++)r[s].fn!==t&&r[s].fn._!==t&&i.push(r[s]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var r=n(3),i=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return i(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var r=n(5);function i(e,t,n,r,i){var o=s.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function s(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}e.exports=function(e,t,n,r,s){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,n,r,s)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=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}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return o(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=i()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=i()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":s(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=a,l=n(1),u=n.n(l),p=n(2),d=n.n(p),h="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},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=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));return r.resolveOptions(n),r.listenClick(e),r}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),f(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=d()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(u.a);function g(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=m}]).default},e.exports=t()},97236:function(e,t,n){function r(e){var t,n;for(t=[],n=0;n<e.length;n++)t.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"[e[n]%64]);return t.join("")}e.exports=function(e){if("undefined"!=typeof window){if(void 0!==window.crypto)return r(window.crypto.getRandomValues(new Uint8Array(e)));for(var t=new Array(e),i=0;i<e;i++)t[i]=Math.floor(256*Math.random());return r(t)}var s=n(50142);try{return r(s.randomBytes(e))}catch(t){return r(s.pseudoRandomBytes(e))}}},55246:function(e,t,n){var r=n(23333),i=n(90605);function s(){return(new Date).getTime()}var o,a=Array.prototype.slice,c={};o="undefined"!=typeof window&&window.console||"undefined"!=typeof window&&window.console?window.console:{};for(var l=[[function(){},"log"],[function(){o.log.apply(o,arguments)},"info"],[function(){o.log.apply(o,arguments)},"warn"],[function(){o.warn.apply(o,arguments)},"error"],[function(e){c[e]=s()},"time"],[function(e){var t=c[e];if(!t)throw new Error("No such label: "+e);delete c[e];var n=s()-t;o.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),o.error(e.stack)},"trace"],[function(e){o.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=a.call(arguments,1);i.ok(!1,r.format.apply(null,t))}},"assert"]],u=0;u<l.length;u++){var p=l[u],d=p[0],h=p[1];o[h]||(o[h]=d)}e.exports=o},73888:function(e,t,n){var r=n(90778).Buffer,i=n(73931),s=n(30910);e.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function c(e,t,n){Array.isArray(e)||(e=e.toArray());var i=new r(e);if(n&&i.length<n){var s=new r(n-i.length);s.fill(0),i=r.concat([s,i])}return t?i.toString(t):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,n){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),c(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),c(n,e)},a.prototype.getPrivateKey=function(e){return c(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var n=new s(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}},77439:function(e,t,n){"use strict";var r=n(59503),i=n(53956),s=n(50601),o=n(25636),a=n(69239);function c(e){a.call(this,"digest"),this._hash=e}r(c,a),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new s:new c(o(e))}},51345:function(e,t,n){var r=n(53956);e.exports=function(e){return(new r).update(e).digest()}},40445:function(e,t,n){"use strict";var r=n(59503),i=n(98919),s=n(69239),o=n(37225).Buffer,a=n(51345),c=n(50601),l=n(25636),u=o.alloc(128);function p(e,t){s.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new c:l(e)).update(t).digest():t.length<n&&(t=o.concat([t,u],n));for(var r=this._ipad=o.allocUnsafe(n),i=this._opad=o.allocUnsafe(n),a=0;a<n;a++)r[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new c:l(e),this._hash.update(r)}r(p,s),p.prototype._update=function(e){this._hash.update(e)},p.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new c:l(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new p("rmd160",t):"md5"===e?new i(a,t):new p(e,t)}},98919:function(e,t,n){"use strict";var r=n(59503),i=n(37225).Buffer,s=n(69239),o=i.alloc(128),a=64;function c(e,t){s.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=i.concat([t,o],a));for(var n=this._ipad=i.allocUnsafe(a),r=this._opad=i.allocUnsafe(a),c=0;c<a;c++)n[c]=54^t[c],r[c]=92^t[c];this._hash=[n]}r(c,s),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=c},23936:function(e,t,n){"use strict";var r=n(1625),i={};function s(e,t,n,r,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,s,o,a],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}var o="mixins";e.exports=function(e,t,n){var a=[],c={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},u={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)d(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=f(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(s(!(n in u),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return s("DEFINE_MANY_MERGED"===(l.hasOwnProperty(n)?l[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=f(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function p(e,t){var n=c.hasOwnProperty(t)?c[t]:null;y.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function d(e,n){if(n){s("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;for(var a in n.hasOwnProperty(o)&&u.mixins(e,n.mixins),n)if(n.hasOwnProperty(a)&&a!==o){var l=n[a],d=r.hasOwnProperty(a);if(p(d,a),u.hasOwnProperty(a))u[a](e,l);else{var h=c.hasOwnProperty(a);if("function"==typeof l&&!h&&!d&&!1!==n.autobind)i.push(a,l),r[a]=l;else if(d){var g=c[a];s(h&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,a),"DEFINE_MANY_MERGED"===g?r[a]=f(r[a],l):"DEFINE_MANY"===g&&(r[a]=m(r[a],l))}else r[a]=l}}}else;}function h(e,t){for(var n in s(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function f(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return h(i,n),h(i,r),i}}function m(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function g(e,t){return t.bind(e)}var v={componentDidMount:function(){this.__isMounted=!0}},b={componentWillUnmount:function(){this.__isMounted=!1}},y={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},k=function(){};return r(k.prototype,e.prototype,y),function(e){var t=function(e,r,o){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=g(e,i)}}(this),this.props=e,this.context=r,this.refs=i,this.updater=o||n,this.state=null;var a=this.getInitialState?this.getInitialState():null;s("object"==typeof a&&!Array.isArray(a),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=a};for(var r in t.prototype=new k,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],a.forEach(d.bind(null,t)),d(t,v),d(t,e),d(t,b),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),s(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),c)t.prototype[r]||(t.prototype[r]=null);return t}}},7767:function(e,t,n){"use strict";var r=n(99196),i=n(23936);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var s=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,s)},50142:function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(35175),t.createHash=t.Hash=n(77439),t.createHmac=t.Hmac=n(40445);var r=n(60451),i=Object.keys(r),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return s};var o=n(80231);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var a=n(83936);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var c=n(63298);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var l=n(29908);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=n(73888);var u=n(51296);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var p=n(70460);t.randomFill=p.randomFill,t.randomFillSync=p.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},13185:function(e,t,n){"use strict";var r=n(98517),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),s=Object.prototype.toString,o=Array.prototype.concat,a=Object.defineProperty,c=a&&function(){var e={};try{for(var t in a(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),l=function(e,t,n,r){var i;(!(t in e)||"function"==typeof(i=r)&&"[object Function]"===s.call(i)&&r())&&(c?a(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},s=r(t);i&&(s=o.call(s,Object.getOwnPropertySymbols(t)));for(var a=0;a<s.length;a+=1)l(e,s[a],t[s[a]],n[s[a]])};u.supportsDescriptors=!!c,e.exports=u},98625:function(e,t,n){"use strict";t.utils=n(87990),t.Cipher=n(90746),t.DES=n(48738),t.CBC=n(94369),t.EDE=n(96413)},94369:function(e,t,n){"use strict";var r=n(48282),i=n(59503),s={};function o(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var o=n[r];t.prototype[o]=s[o]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var i=this._cbcState,s=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)o[a]^=e[t+a];s._update.call(this,o,0,n,r);for(a=0;a<this.blockSize;a++)o[a]=n[r+a]}else{s._update.call(this,e,t,n,r);for(a=0;a<this.blockSize;a++)n[r+a]^=o[a];for(a=0;a<this.blockSize;a++)o[a]=e[t+a]}}},90746:function(e,t,n){"use strict";var r=n(48282);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var s=e.length-(e.length-t)%this.blockSize;t<s;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},48738:function(e,t,n){"use strict";var r=n(48282),i=n(59503),s=n(87990),o=n(90746);function a(){this.tmp=new Array(2),this.keys=null}function c(e){o.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}i(c,o),e.exports=c,c.create=function(e){return new c(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=s.readUInt32BE(t,0),i=s.readUInt32BE(t,4);s.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var a=l[o>>>1];n=s.r28shl(n,a),i=s.r28shl(i,a),s.pc2(n,i,e.keys,o)}},c.prototype._update=function(e,t,n,r){var i=this._desState,o=s.readUInt32BE(e,t),a=s.readUInt32BE(e,t+4);s.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],s.writeUInt32BE(n,o,r),s.writeUInt32BE(n,a,r+4)},c.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},c.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},c.prototype._encrypt=function(e,t,n,r,i){for(var o=t,a=n,c=0;c<e.keys.length;c+=2){var l=e.keys[c],u=e.keys[c+1];s.expand(a,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var p=s.substitute(l,u),d=a;a=(o^s.permute(p))>>>0,o=d}s.rip(a,o,r,i)},c.prototype._decrypt=function(e,t,n,r,i){for(var o=n,a=t,c=e.keys.length-2;c>=0;c-=2){var l=e.keys[c],u=e.keys[c+1];s.expand(o,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var p=s.substitute(l,u),d=o;o=(a^s.permute(p))>>>0,a=d}s.rip(o,a,r,i)}},96413:function(e,t,n){"use strict";var r=n(48282),i=n(59503),s=n(90746),o=n(48738);function a(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:n}),o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:s})]:[o.create({type:"decrypt",key:s}),o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:n})]}function c(e){s.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(c,s),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},c.prototype._pad=o.prototype._pad,c.prototype._unpad=o.prototype._unpad},87990:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,s=0,o=6;o>=0;o-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+o&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+o&1}for(o=6;o>=0;o-=2){for(a=1;a<=25;a+=8)s<<=1,s|=t>>>a+o&1;for(a=1;a<=25;a+=8)s<<=1,s|=e>>>a+o&1}n[r+0]=i>>>0,n[r+1]=s>>>0},t.rip=function(e,t,n,r){for(var i=0,s=0,o=0;o<4;o++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+o&1,i<<=1,i|=e>>>a+o&1;for(o=4;o<8;o++)for(a=24;a>=0;a-=8)s<<=1,s|=t>>>a+o&1,s<<=1,s|=e>>>a+o&1;n[r+0]=i>>>0,n[r+1]=s>>>0},t.pc1=function(e,t,n,r){for(var i=0,s=0,o=7;o>=5;o--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+o&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+o&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+o&1;for(o=1;o<=3;o++){for(a=0;a<=24;a+=8)s<<=1,s|=t>>a+o&1;for(a=0;a<=24;a+=8)s<<=1,s|=e>>a+o&1}for(a=0;a<=24;a+=8)s<<=1,s|=e>>a+o&1;n[r+0]=i>>>0,n[r+1]=s>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var s=0,o=0,a=n.length>>>1,c=0;c<a;c++)s<<=1,s|=e>>>n[c]&1;for(c=a;c<n.length;c++)o<<=1,o|=t>>>n[c]&1;r[i+0]=s>>>0,r[i+1]=o>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var s=23;s>=15;s-=4)r<<=6,r|=e>>>s&63;for(s=11;s>=3;s-=4)i|=e>>>s&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,i=0;i<4;i++){n<<=4,n|=r[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){n<<=4,n|=r[256+64*i+(t>>>18-6*i&63)]}return n>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<i.length;n++)t<<=1,t|=e>>>i[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],s=0;s<t;s+=n)i.push(r.slice(s,s+n));return i.join(" ")}},63298:function(e,t,n){var r=n(90778).Buffer,i=n(76156),s=n(27046),o=n(92716);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new r(s[e].prime,"hex"),n=new r(s[e].gen,"hex");return new o(t,n)},t.createDiffieHellman=t.DiffieHellman=function e(t,n,s,c){return r.isBuffer(n)||void 0===a[n]?e(t,"binary",n,s):(n=n||"binary",c=c||"binary",s=s||new r([2]),r.isBuffer(s)||(s=new r(s,c)),"number"==typeof t?new o(i(t,s),s,!0):(r.isBuffer(t)||(t=new r(t,n)),new o(t,s,!0)))}},92716:function(e,t,n){var r=n(90778).Buffer,i=n(30910),s=new(n(16616)),o=new i(24),a=new i(11),c=new i(10),l=new i(3),u=new i(7),p=n(76156),d=n(35175);function h(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._pub=new i(e),this}function f(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._priv=new i(e),this}e.exports=g;var m={};function g(e,t,n){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=h,this.setPrivateKey=f):this._primeCode=8}function v(e,t){var n=new r(e.toArray());return t?n.toString(t):n}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in m)return m[r];var i,d=0;if(e.isEven()||!p.simpleSieve||!p.fermatTest(e)||!s.test(e))return d+=1,d+="02"===n||"05"===n?8:4,m[r]=d,d;switch(s.test(e.shrn(1))||(d+=2),n){case"02":e.mod(o).cmp(a)&&(d+=8);break;case"05":(i=e.mod(c)).cmp(l)&&i.cmp(u)&&(d+=8);break;default:d+=4}return m[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new r(t.toArray()),s=this.getPrime();if(n.length<s.length){var o=new r(s.length-n.length);o.fill(0),n=r.concat([o,n])}return n},g.prototype.getPublicKey=function(e){return v(this._pub,e)},g.prototype.getPrivateKey=function(e){return v(this._priv,e)},g.prototype.getPrime=function(e){return v(this.__prime,e)},g.prototype.getGenerator=function(e){return v(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.__gen=e,this._gen=new i(e),this}},76156:function(e,t,n){var r=n(35175);e.exports=b,b.simpleSieve=g,b.fermatTest=v;var i=n(30910),s=new i(24),o=new(n(16616)),a=new i(1),c=new i(2),l=new i(5),u=(new i(16),new i(8),new i(10)),p=new i(3),d=(new i(7),new i(11)),h=new i(4),f=(new i(12),null);function m(){if(null!==f)return f;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return f=e,e}function g(e){for(var t=m(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function v(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,f;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(c),t.cmp(c)){if(!t.cmp(l))for(;n.mod(u).cmp(p);)n.iadd(h)}else for(;n.mod(s).cmp(d);)n.iadd(h);if(g(f=n.shrn(1))&&g(n)&&v(f)&&v(n)&&o.test(f)&&o.test(n))return n}}},73931:function(e,t,n){"use strict";var r=t;r.version=n(80906).i8,r.utils=n(12097),r.rand=n(71876),r.curve=n(46244),r.curves=n(65583),r.ec=n(72553),r.eddsa=n(66281)},48432:function(e,t,n){"use strict";var r=n(30910),i=n(12097),s=i.getNAF,o=i.getJSF,a=i.assert;function c(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){a(e.precomputed);var n=e._getDoubles(),r=s(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var o,c,l=[];for(o=0;o<r.length;o+=n.step){c=0;for(var u=o+n.step-1;u>=o;u--)c=(c<<1)+r[u];l.push(c)}for(var p=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<l.length;o++)(c=l[o])===h?d=d.mixedAdd(n.points[o]):c===-h&&(d=d.mixedAdd(n.points[o].neg()));p=p.add(d)}return p.toP()},c.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=s(t,n,this._bitLength),c=this.jpoint(null,null,null),l=o.length-1;l>=0;l--){for(var u=0;l>=0&&0===o[l];l--)u++;if(l>=0&&u++,c=c.dblp(u),l<0)break;var p=o[l];a(0!==p),c="affine"===e.type?p>0?c.mixedAdd(i[p-1>>1]):c.mixedAdd(i[-p-1>>1].neg()):p>0?c.add(i[p-1>>1]):c.add(i[-p-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,r,i){var a,c,l,u=this._wnafT1,p=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a<r;a++){var f=(l=t[a])._getNAFPoints(e);u[a]=f.wnd,p[a]=f.points}for(a=r-1;a>=1;a-=2){var m=a-1,g=a;if(1===u[m]&&1===u[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=o(n[m],n[g]);for(h=Math.max(y[0].length,h),d[m]=new Array(h),d[g]=new Array(h),c=0;c<h;c++){var k=0|y[0][c],w=0|y[1][c];d[m][c]=b[3*(k+1)+(w+1)],d[g][c]=0,p[m]=v}}else d[m]=s(n[m],u[m],this._bitLength),d[g]=s(n[g],u[g],this._bitLength),h=Math.max(d[m].length,h),h=Math.max(d[g].length,h)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(a=h;a>=0;a--){for(var C=0;a>=0;){var j=!0;for(c=0;c<r;c++)E[c]=0|d[c][a],0!==E[c]&&(j=!1);if(!j)break;C++,a--}if(a>=0&&C++,_=_.dblp(C),a<0)break;for(c=0;c<r;c++){var S=E[c];0!==S&&(S>0?l=p[c][S-1>>1]:S<0&&(l=p[c][-S-1>>1].neg()),_="affine"===l.type?_.mixedAdd(l):_.add(l))}}for(a=0;a<r;a++)p[a]=null;return i?_:_.toP()},c.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(e){return this.encode(e,!0)},l.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},l.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},l.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},l.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)r=r.dbl();n.push(r)}return{step:e,points:n}},l.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},27978:function(e,t,n){"use strict";var r=n(12097),i=n(30910),s=n(59503),o=n(48432),a=r.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function l(e,t,n,r,s){o.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=s&&new i(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(c,o),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(s.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var c=a.fromRed().isOdd();return(t&&!c||!t&&c)&&(a=a.redNeg()),this.point(e,a)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(s.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},s(l,o.BasePoint),c.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},c.prototype.point=function(e,t,n,r){return new l(this,e,t,n,r)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),o=s.redSub(n),a=r.redSub(t),c=i.redMul(o),l=s.redMul(a),u=i.redMul(a),p=o.redMul(s);return this.curve.point(c,l,p,u)},l.prototype._projDbl=function(){var e,t,n,r,i,s,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var l=(r=this.curve._mulA(a)).redAdd(c);this.zOne?(e=o.redSub(a).redSub(c).redMul(l.redSub(this.curve.two)),t=l.redMul(r.redSub(c)),n=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),s=l.redSub(i).redISub(i),e=o.redSub(a).redISub(c).redMul(s),t=l.redMul(r.redSub(c)),n=l.redMul(s))}else r=a.redAdd(c),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(a.redISub(c)),n=r.redMul(s);return this.curve.point(e,t,n)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),o=i.redSub(r),a=i.redAdd(r),c=n.redAdd(t),l=s.redMul(o),u=a.redMul(c),p=s.redMul(c),d=o.redMul(a);return this.curve.point(l,u,d,p)},l.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(s).redMul(o),c=i.redSub(a),l=i.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(o),p=r.redMul(c).redMul(u);return this.curve.twisted?(t=r.redMul(l).redMul(o.redSub(this.curve._mulA(s))),n=c.redMul(l)):(t=r.redMul(l).redMul(o.redSub(s)),n=this.curve._mulC(c).redMul(l)),this.curve.point(p,t,n)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},l.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},46244:function(e,t,n){"use strict";var r=t;r.base=n(48432),r.short=n(42567),r.mont=n(2493),r.edwards=n(27978)},2493:function(e,t,n){"use strict";var r=n(30910),i=n(59503),s=n(48432),o=n(12097);function a(e){s.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,s),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(c,s.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new c(this,e,t)},a.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),o=i.redMul(r),a=t.z.redMul(s.redAdd(o).redSqr()),c=t.x.redMul(s.redISub(o).redSqr());return this.curve.point(a,c)},c.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},42567:function(e,t,n){"use strict";var r=n(12097),i=n(30910),s=n(59503),o=n(48432),a=r.assert;function c(e){o.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,n,r){o.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,n,r){o.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(c,o),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?n=s[0]:(n=s[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(s).fromRed(),r.redSub(s).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,n,r,s,o,a,c,l,u,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),f=new i(1),m=new i(0),g=new i(0),v=new i(1),b=0;0!==d.cmpn(0);){var y=h.div(d);l=h.sub(y.mul(d)),u=g.sub(y.mul(f));var k=v.sub(y.mul(m));if(!r&&l.cmp(p)<0)t=c.neg(),n=f,r=l.neg(),s=u;else if(r&&2==++b)break;c=l,h=d,d=l,g=f,f=u,v=m,m=k}o=l.neg(),a=u;var w=r.sqr().add(s.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=n),r.negative&&(r=r.neg(),s=s.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:s},{a:o,b:a}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),a=s.mul(r.a),c=i.mul(n.b),l=s.mul(r.b);return{k1:e.sub(o).sub(a),k2:c.add(l).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var s=r.fromRed().isOdd();return(t&&!s||!t&&s)&&(r=r.redNeg()),this.point(e,r)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var o=this._endoSplit(t[s]),a=e[s],c=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*s]=a,r[2*s+1]=c,i[2*s]=o.k1,i[2*s+1]=o.k2}for(var l=this._wnafMulAdd(1,r,i,2*s,n),u=0;u<2*s;u++)r[u]=null,i[u]=null;return l},s(l,o.BasePoint),c.prototype.point=function(e,t,n){return new l(this,e,t,n)},c.prototype.pointFromJSON=function(e,t){return l.fromJSON(this,e,t)},l.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},l.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},l.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(u,o.BasePoint),c.prototype.jpoint=function(e,t,n){return new u(this,e,t,n)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),c=s.redSub(o);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),p=r.redMul(l),d=c.redSqr().redIAdd(u).redISub(p).redISub(p),h=c.redMul(p.redISub(d)).redISub(s.redMul(u)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,f)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),u=n.redMul(c),p=a.redSqr().redIAdd(l).redISub(u).redISub(u),d=a.redMul(u.redISub(p)).redISub(i.redMul(l)),h=this.z.redMul(o);return this.curve.jpoint(p,d,h)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,c=a.redSqr().redSqr(),l=o.redAdd(o);for(t=0;t<e;t++){var u=s.redSqr(),p=l.redSqr(),d=p.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),f=s.redMul(p),m=h.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),v=h.redMul(g);v=v.redIAdd(v).redISub(d);var b=l.redMul(a);t+1<e&&(c=c.redMul(d)),s=m,a=b,l=v}return this.curve.jpoint(s,l.redMul(i),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r),c=a.redSqr().redISub(o).redISub(o),l=s.redIAdd(s);l=(l=l.redIAdd(l)).redIAdd(l),e=c,t=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),h=this.x.redAdd(p).redSqr().redISub(u).redISub(d);h=h.redIAdd(h);var f=u.redAdd(u).redIAdd(u),m=f.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=f.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},u.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=a.redSqr().redISub(o).redISub(o);e=c;var l=s.redIAdd(s);l=(l=l.redIAdd(l)).redIAdd(l),t=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),p=this.y.redSqr(),d=this.x.redMul(p),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var f=d.redIAdd(d),m=(f=f.redIAdd(f)).redAdd(f);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(u);var g=p.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),o=n.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),c=t.redAdd(t),l=(c=c.redIAdd(c)).redMul(o),u=a.redSqr().redISub(l.redAdd(l)),p=l.redISub(u),d=o.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=a.redMul(p).redISub(d),f=n.redAdd(n).redMul(r);return this.curve.jpoint(u,h,f)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(s)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var l=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(c),u=t.redMul(l);u=(u=u.redIAdd(u)).redIAdd(u);var p=this.x.redMul(a).redISub(u);p=(p=p.redIAdd(p)).redIAdd(p);var d=this.y.redMul(l.redMul(c.redISub(l)).redISub(o.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(o).redSqr().redISub(n).redISub(a);return this.curve.jpoint(p,d,h)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},65583:function(e,t,n){"use strict";var r,i=t,s=n(91138),o=n(46244),a=n(12097).assert;function c(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=c,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(4703)}catch(e){r=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},72553:function(e,t,n){"use strict";var r=n(30910),i=n(53674),s=n(12097),o=n(65583),a=n(71876),c=s.assert,l=n(26167),u=n(96376);function p(e){if(!(this instanceof p))return new p(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=p,p.prototype.keyPair=function(e){return new l(this,e)},p.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},p.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},p.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new r(2));;){var o=new r(t.generate(n));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},p.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},p.prototype.sign=function(e,t,n,s){"object"==typeof n&&(s=n,n=null),s||(s={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),c=e.toArray("be",o),l=new i({hash:this.hash,entropy:a,nonce:c,pers:s.pers,persEnc:s.persEnc||"utf8"}),p=this.n.sub(new r(1)),d=0;;d++){var h=s.k?s.k(d):new r(l.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(p)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var m=f.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(f.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return s.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new u({r:g,s:v,recoveryParam:b})}}}}}},p.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var s=(t=new u(t,"hex")).r,o=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,c=o.invm(this.n),l=c.mul(e).umod(this.n),p=c.mul(s).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(l,n.getPublic(),p)).isInfinity()&&a.eqXToP(s):!(a=this.g.mulAdd(l,n.getPublic(),p)).isInfinity()&&0===a.getX().umod(this.n).cmp(s)},p.prototype.recoverPubKey=function(e,t,n,i){c((3&n)===n,"The recovery param is more than two bits"),t=new u(t,i);var s=this.n,o=new r(e),a=t.r,l=t.s,p=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),p):this.curve.pointFromX(a,p);var h=t.r.invm(s),f=s.sub(o).mul(h).umod(s),m=l.mul(h).umod(s);return this.g.mulAdd(f,a,m)},p.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new u(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},26167:function(e,t,n){"use strict";var r=n(30910),i=n(12097).assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function(e,t,n){return t instanceof s?t:new s(e,{pub:t,pubEnc:n})},s.fromPrivate=function(e,t,n){return t instanceof s?t:new s(e,{priv:t,privEnc:n})},s.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},96376:function(e,t,n){"use strict";var r=n(30910),i=n(12097),s=i.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function c(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,s=0,o=t.place;s<r;s++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function l(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;var s=c(e,n);if(!1===s)return!1;if(s+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=c(e,n);if(!1===o)return!1;var l=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var u=c(e,n);if(!1===u)return!1;if(e.length!==u+n.place)return!1;var p=e.slice(n.place,u+n.place);if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}if(0===p[0]){if(!(128&p[1]))return!1;p=p.slice(1)}return this.r=new r(l),this.s=new r(p),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=l(t),n=l(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,n.length);var s=r.concat(n),o=[48];return u(o,s.length),o=o.concat(s),i.encode(o,e)}},66281:function(e,t,n){"use strict";var r=n(91138),i=n(65583),s=n(12097),o=s.assert,a=s.parseBytes,c=n(8325),l=n(49945);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=u,u.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),s=this.encodePoint(i),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:s})},u.prototype.verify=function(e,t,n){e=a(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(s)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof l?e:new l(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=s.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=s.intFromLE(n);return this.curve.pointFromY(i,r)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return s.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},8325:function(e,t,n){"use strict";var r=n(12097),i=r.assert,s=r.parseBytes,o=r.cachedProperty;function a(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},o(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),o(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},a.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=a},49945:function(e,t,n){"use strict";var r=n(30910),i=n(12097),s=i.assert,o=i.cachedProperty,a=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},4703:function(e){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},12097:function(e,t,n){"use strict";var r=t,i=n(30910),s=n(48282),o=n(90458);r.assert=s,r.toArray=o.toArray,r.zero2=o.zero2,r.toHex=o.toHex,r.encode=o.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,s=e.clone(),o=0;o<r.length;o++){var a,c=s.andln(i-1);s.isOdd()?(a=c>(i>>1)-1?(i>>1)-c:c,s.isubn(a)):a=0,r[o]=a,s.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var o,a,c=e.andln(3)+i&3,l=t.andln(3)+s&3;3===c&&(c=-1),3===l&&(l=-1),o=0==(1&c)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==l?c:-c,n[0].push(o),a=0==(1&l)?0:3!==(r=t.andln(7)+s&7)&&5!==r||2!==c?l:-l,n[1].push(a),2*i===o+1&&(i=1-i),2*s===a+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},45685:function(e){"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var s=Object.keys(Object(i)),o=0,a=s.length;o<a;o++){var c=s[o],l=Object.getOwnPropertyDescriptor(i,c);void 0!==l&&l.enumerable&&(n[c]=i[c])}}return n}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},2571:function(e,t,n){"use strict";var r,i=n(55246),s="object"==typeof Reflect?Reflect:null,o=s&&"function"==typeof s.apply?s.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=s&&"function"==typeof s.ownKeys?s.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 c(){c.init.call(this)}e.exports=c,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}b(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&b(e,"error",t,n)}(e,i,{once:!0})}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function p(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var s,o,a;if(u(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),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(s=p(e))>0&&a.length>s&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,function(e){i&&i.warn&&i.warn(e)}(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function m(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]: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}(i):v(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function b(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 i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return l},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+".");l=e}}),c.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},c.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},c.prototype.getMaxListeners=function(){return p(this)},c.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=v(c,l);for(n=0;n<l;++n)o(u[n],this,t)}return!0},c.prototype.addListener=function(e,t){return d(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return d(this,e,t,!0)},c.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,s,o;if(u(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(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},c.prototype.off=c.prototype.removeListener,c.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 i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);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},c.prototype.listeners=function(e){return m(this,e,!0)},c.prototype.rawListeners=function(e){return m(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},c.prototype.listenerCount=g,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},51105:function(e,t,n){var r=n(37225).Buffer,i=n(53956);e.exports=function(e,t,n,s){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=n/8,a=r.alloc(o),c=r.alloc(s||0),l=r.alloc(0);o>0||s>0;){var u=new i;u.update(l),u.update(e),t&&u.update(t),l=u.digest();var p=0;if(o>0){var d=a.length-o;p=Math.min(o,l.length),l.copy(a,d,0,p),o-=p}if(p<l.length&&s>0){var h=c.length-s,f=Math.min(s,l.length-p);l.copy(c,h,p,p+f),s-=f}}return l.fill(0),{key:a,iv:c}}},18282:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var r,i=n(90136);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var a,c=(a=[],{activateTrap:function(e){if(a.length>0){var t=a[a.length-1];t!==e&&t.pause()}var n=a.indexOf(e);-1===n||a.splice(n,1),a.push(e)},deactivateTrap:function(e){var t=a.indexOf(e);-1!==t&&a.splice(t,1),a.length>0&&a[a.length-1].unpause()}}),l=function(e){return setTimeout(e,0)},u=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},d=function(e,t){var n,a=document,d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),h={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f=function(e){return h.containers.some((function(t){return t.contains(e)}))},m=function(e){var t=d[e];if(!t)return null;var n=t;if("string"==typeof t&&!(n=a.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(n=t()))throw new Error("`".concat(e,"` did not return a node"));return n},g=function(){var e;if(null!==m("initialFocus"))e=m("initialFocus");else if(f(a.activeElement))e=a.activeElement;else{var t=h.tabbableGroups[0];e=t&&t.firstTabbableNode||m("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},v=function(){if(h.tabbableGroups=h.containers.map((function(e){var t=(0,i.ht)(e);if(t.length>0)return{container:e,firstTabbableNode:t[0],lastTabbableNode:t[t.length-1]}})).filter((function(e){return!!e})),h.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},b=function e(t){t!==a.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!d.preventScroll}),h.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(g()))},y=function(e){f(e.target)||(p(d.clickOutsideDeactivates,e)?n.deactivate({returnFocus:d.returnFocusOnDeactivate&&!(0,i.EB)(e.target)}):p(d.allowOutsideClick,e)||e.preventDefault())},k=function(e){var t=f(e.target);t||e.target instanceof Document?t&&(h.mostRecentlyFocusedNode=e.target):(e.stopImmediatePropagation(),b(h.mostRecentlyFocusedNode||g()))},w=function(e){if(!1!==d.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){v();var t=null;if(h.tabbableGroups.length>0)if(u(h.tabbableGroups,(function(t){return t.container.contains(e.target)}))<0)t=e.shiftKey?h.tabbableGroups[h.tabbableGroups.length-1].lastTabbableNode:h.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var n=u(h.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e.target===n}));if(n>=0){var r=0===n?h.tabbableGroups.length-1:n-1;t=h.tabbableGroups[r].lastTabbableNode}}else{var i=u(h.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e.target===n}));if(i>=0){var s=i===h.tabbableGroups.length-1?0:i+1;t=h.tabbableGroups[s].firstTabbableNode}}else t=m("fallbackFocus");t&&(e.preventDefault(),b(t))}(e)},_=function(e){p(d.clickOutsideDeactivates,e)||f(e.target)||p(d.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},E=function(){if(h.active)return c.activateTrap(n),r=d.delayInitialFocus?l((function(){b(g())})):b(g()),a.addEventListener("focusin",k,!0),a.addEventListener("mousedown",y,{capture:!0,passive:!1}),a.addEventListener("touchstart",y,{capture:!0,passive:!1}),a.addEventListener("click",_,{capture:!0,passive:!1}),a.addEventListener("keydown",w,{capture:!0,passive:!1}),n},C=function(){if(h.active)return a.removeEventListener("focusin",k,!0),a.removeEventListener("mousedown",y,!0),a.removeEventListener("touchstart",y,!0),a.removeEventListener("click",_,!0),a.removeEventListener("keydown",w,!0),n};return(n={activate:function(e){if(h.active)return this;v(),h.active=!0,h.paused=!1,h.nodeFocusedBeforeActivation=a.activeElement;var t=e&&e.onActivate?e.onActivate:d.onActivate;return t&&t(),E(),this},deactivate:function(e){if(!h.active)return this;clearTimeout(r),C(),h.active=!1,h.paused=!1,c.deactivateTrap(n);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:d.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:d.returnFocusOnDeactivate)&&l((function(){var e;b((e=h.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),this},pause:function(){return h.paused||!h.active||(h.paused=!0,C()),this},unpause:function(){return h.paused&&h.active?(h.paused=!1,v(),E(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return h.containers=t.map((function(e){return"string"==typeof e?a.querySelector(e):e})),h.active&&v(),this}}).updateContainerElements(e),n}},49478:function(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;e.exports=function(e,r,i){if("[object Function]"!==n.call(r))throw new TypeError("iterator must be a function");var s=e.length;if(s===+s)for(var o=0;o<s;o++)r.call(i,e[o],o,e);else for(var a in e)t.call(e,a)&&r.call(i,e[a],a,e)}},44033:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,i="[object Function]";e.exports=function(e){var s=this;if("function"!=typeof s||r.call(s)!==i)throw new TypeError(t+s);for(var o,a=n.call(arguments,1),c=function(){if(this instanceof o){var t=s.apply(this,a.concat(n.call(arguments)));return Object(t)===t?t:this}return s.apply(e,a.concat(n.call(arguments)))},l=Math.max(0,s.length-a.length),u=[],p=0;p<l;p++)u.push("$"+p);if(o=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),s.prototype){var d=function(){};d.prototype=s.prototype,o.prototype=new d,d.prototype=null}return o}},75433:function(e,t,n){"use strict";var r=n(44033);e.exports=Function.prototype.bind||r},52221:function(e){e.exports=function e(n){if(t(n))return n;if(t(n.ownerDocument))return n.ownerDocument;if(t(n.document))return n.document;if(n.parentNode)return e(n.parentNode);if(n.commonAncestorContainer)return e(n.commonAncestorContainer);if(n.startContainer)return e(n.startContainer);if(n.anchorNode)return e(n.anchorNode)};function t(e){return e&&9===e.nodeType}},25165:function(e,t,n){"use strict";var r,i=SyntaxError,s=Function,o=TypeError,a=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new o},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,p=n(91508)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},f="undefined"==typeof Uint8Array?r:d(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?d((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?d(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=d(i.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(75433),y=n(99569),k=b.call(Function.call,Array.prototype.concat),w=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),E=b.call(Function.call,String.prototype.slice),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,S=function(e){var t=E(e,0,1),n=E(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return _(e,C,(function(e,t,n,i){r[r.length]=n?_(i,j,"$1"):t||e})),r},M=function(e,t){var n,r=e;if(y(v,r)&&(r="%"+(n=v[r])[0]+"%"),y(m,r)){var s=m[r];if(s===h&&(s=g(r)),void 0===s&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:s}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=S(e),r=n.length>0?n[0]:"",s=M("%"+r+"%",t),a=s.name,l=s.value,u=!1,p=s.alias;p&&(r=p[0],w(n,k([0,1],p)));for(var d=1,h=!0;d<n.length;d+=1){var f=n[d],g=E(f,0,1),v=E(f,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new i("property names with quotes must have matching quotes");if("constructor"!==f&&h||(u=!0),y(m,a="%"+(r+="."+f)+"%"))l=m[a];else if(null!=l){if(!(f in l)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&d+1>=n.length){var b=c(l,f);l=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[f]}else h=y(l,f),l=l[f];h&&!u&&(m[a]=l)}}return l}},91508:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(32552);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},32552:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},77828:function(e,t,n){"use strict";var r=n(32552);e.exports=function(){return r()&&!!Symbol.toStringTag}},99569:function(e,t,n){"use strict";var r=n(75433);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},39302:function(e,t,n){"use strict";var r=n(37225).Buffer,i=n(7130).Transform;function s(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(59503)(s,i),s.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},s.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},s.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)n[s++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var o=0,a=8*e.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},s.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=s},91138:function(e,t,n){var r=t;r.utils=n(53566),r.common=n(95949),r.sha=n(75894),r.ripemd=n(94877),r.hmac=n(9942),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},95949:function(e,t,n){"use strict";var r=n(53566),i=n(48282);function s(){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=s,s.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 i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},s.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 i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r}},9942:function(e,t,n){"use strict";var r=n(53566),i=n(48282);function s(e,t,n){if(!(this instanceof s))return new s(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s.prototype.update=function(e,t){return this.inner.update(e,t),this},s.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},94877:function(e,t,n){"use strict";var r=n(53566),i=n(95949),s=r.rotl32,o=r.sum32,a=r.sum32_3,c=r.sum32_4,l=i.BlockHash;function u(){if(!(this instanceof u))return new u;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function p(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(u,l),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],l=this.h[3],u=this.h[4],b=n,y=r,k=i,w=l,_=u,E=0;E<80;E++){var C=o(s(c(n,p(E,r,i,l),e[f[E]+t],d(E)),g[E]),u);n=u,u=l,l=s(i,10),i=r,r=C,C=o(s(c(b,p(79-E,y,k,w),e[m[E]+t],h(E)),v[E]),_),b=_,_=w,w=s(k,10),k=y,y=C}C=a(this.h[1],i,w),this.h[1]=a(this.h[2],l,_),this.h[2]=a(this.h[3],u,b),this.h[3]=a(this.h[4],n,y),this.h[4]=a(this.h[0],r,k),this.h[0]=C},u.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},75894:function(e,t,n){"use strict";t.sha1=n(69016),t.sha224=n(92055),t.sha256=n(23347),t.sha384=n(57544),t.sha512=n(31766)},69016:function(e,t,n){"use strict";var r=n(53566),i=n(95949),s=n(47574),o=r.rotl32,a=r.sum32,c=r.sum32_5,l=s.ft_1,u=i.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]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],s=this.h[1],u=this.h[2],d=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var f=~~(r/20),m=c(o(i,5),l(f,s,u,d),h,n[r],p[f]);h=d,d=u,u=o(s,30),s=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],s),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},92055:function(e,t,n){"use strict";var r=n(53566),i=n(23347);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},23347:function(e,t,n){"use strict";var r=n(53566),i=n(95949),s=n(47574),o=n(48282),a=r.sum32,c=r.sum32_4,l=r.sum32_5,u=s.ch32,p=s.maj32,d=s.s0_256,h=s.s1_256,f=s.g0_256,m=s.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],f(n[r-15]),n[r-16]);var i=this.h[0],s=this.h[1],g=this.h[2],v=this.h[3],b=this.h[4],y=this.h[5],k=this.h[6],w=this.h[7];for(o(this.k.length===n.length),r=0;r<n.length;r++){var _=l(w,h(b),u(b,y,k),this.k[r],n[r]),E=a(d(i),p(i,s,g));w=k,k=y,y=b,b=a(v,_),v=g,g=s,s=i,i=a(_,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],s),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],y),this.h[6]=a(this.h[6],k),this.h[7]=a(this.h[7],w)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},57544:function(e,t,n){"use strict";var r=n(53566),i=n(31766);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},31766:function(e,t,n){"use strict";var r=n(53566),i=n(95949),s=n(48282),o=r.rotr64_hi,a=r.rotr64_lo,c=r.shr64_hi,l=r.shr64_lo,u=r.sum64,p=r.sum64_hi,d=r.sum64_lo,h=r.sum64_4_hi,f=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,v=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function k(e,t,n,r,i){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function w(e,t,n,r,i,s){var o=t&r^~t&s;return o<0&&(o+=4294967296),o}function _(e,t,n,r,i){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function E(e,t,n,r,i,s){var o=t&r^t&s^r&s;return o<0&&(o+=4294967296),o}function C(e,t){var n=o(e,t,28)^o(t,e,2)^o(t,e,7);return n<0&&(n+=4294967296),n}function j(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function S(e,t){var n=o(e,t,14)^o(e,t,18)^o(t,e,9);return n<0&&(n+=4294967296),n}function M(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function N(e,t){var n=o(e,t,1)^o(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=a(e,t,1)^a(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=o(e,t,19)^o(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=a(e,t,19)^a(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(y,v),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=A(n[r-4],n[r-3]),s=O(n[r-4],n[r-3]),o=n[r-14],a=n[r-13],c=N(n[r-30],n[r-29]),l=x(n[r-30],n[r-29]),u=n[r-32],p=n[r-31];n[r]=h(i,s,o,a,c,l,u,p),n[r+1]=f(i,s,o,a,c,l,u,p)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],h=this.h[6],f=this.h[7],v=this.h[8],b=this.h[9],y=this.h[10],N=this.h[11],x=this.h[12],A=this.h[13],O=this.h[14],T=this.h[15];s(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var I=O,R=T,U=S(v,b),D=M(v,b),Z=k(v,b,y,N,x),L=w(v,b,y,N,x,A),z=this.k[P],B=this.k[P+1],F=n[P],V=n[P+1],q=m(I,R,U,D,Z,L,z,B,F,V),H=g(I,R,U,D,Z,L,z,B,F,V);I=C(r,i),R=j(r,i),U=_(r,i,o,a,c),D=E(r,i,o,a,c,l);var W=p(I,R,U,D),J=d(I,R,U,D);O=x,T=A,x=y,A=N,y=v,N=b,v=p(h,f,q,H),b=d(f,f,q,H),h=c,f=l,c=o,l=a,o=r,a=i,r=p(q,H,W,J),i=d(q,H,W,J)}u(this.h,0,r,i),u(this.h,2,o,a),u(this.h,4,c,l),u(this.h,6,h,f),u(this.h,8,v,b),u(this.h,10,y,N),u(this.h,12,x,A),u(this.h,14,O,T)},y.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 i(e,t,n){return e&t^~e&n}function s(e,t,n){return e&t^e&n^t&n}function o(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?o(t,n,r):2===e?s(t,n,r):void 0},t.ch32=i,t.maj32=s,t.p32=o,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),i=n(59503);function s(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(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=i,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),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):s(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=o,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=c(i.toString(16))}return n},t.zero2=a,t.zero8=c,t.join32=function(e,t,n,i){var s=n-t;r(s%4==0);for(var o=new Array(s/4),a=0,c=t;a<o.length;a++,c+=4){var l;l="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],o[a]=l>>>0}return o},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}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,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=s},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,i,s,o,a){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,e+n+i+o+(c+=(l=l+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},t.sum64_5_hi=function(e,t,n,r,i,s,o,a,c,l){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+s>>>0)<s?1:0,u+=(p=p+a>>>0)<a?1:0,e+n+i+o+c+(u+=(p=p+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,s,o,a,c,l){return t+r+s+a+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},33451:function(e,t,n){"use strict";n.d(t,{lX:function(){return k},q_:function(){return S},PP:function(){return N},ob:function(){return d},Hp:function(){return h},Ep:function(){return p}});var r=n(37665),i=n(59149),s=n(21976),o=n(34770);function a(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function l(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function u(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function d(e,t,n,s){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var s=t.indexOf("?");return-1!==s&&(n=t.substr(s),t=t.substr(0,s)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),s?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,i.Z)(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,s.Z)(e.state,t.state)}function f(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var s="function"==typeof e?e(t,n):e;"string"==typeof s?"function"==typeof r?r(s,i):i(!0):i(!1!==s)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var m=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var v="popstate",b="hashchange";function y(){try{return window.history.state||{}}catch(e){return{}}}function k(e){void 0===e&&(e={}),m||(0,o.Z)(!1);var t,n=window.history,i=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,s=!(-1===window.navigator.userAgent.indexOf("Trident")),c=e,h=c.forceRefresh,k=void 0!==h&&h,w=c.getUserConfirmation,_=void 0===w?g:w,E=c.keyLength,C=void 0===E?6:E,j=e.basename?u(a(e.basename)):"";function S(e){var t=e||{},n=t.key,r=t.state,i=window.location,s=i.pathname+i.search+i.hash;return j&&(s=l(s,j)),d(s,r,n)}function M(){return Math.random().toString(36).substr(2,C)}var N=f();function x(e){(0,r.Z)(B,e),B.length=n.length,N.notifyListeners(B.location,B.action)}function A(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||P(S(e.state))}function O(){P(S(y()))}var T=!1;function P(e){if(T)T=!1,x();else{N.confirmTransitionTo(e,"POP",_,(function(t){t?x({action:"POP",location:e}):function(e){var t=B.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(T=!0,D(i))}(e)}))}}var I=S(y()),R=[I.key];function U(e){return j+p(e)}function D(e){n.go(e)}var Z=0;function L(e){1===(Z+=e)&&1===e?(window.addEventListener(v,A),s&&window.addEventListener(b,O)):0===Z&&(window.removeEventListener(v,A),s&&window.removeEventListener(b,O))}var z=!1;var B={length:n.length,action:"POP",location:I,createHref:U,push:function(e,t){var r="PUSH",s=d(e,t,M(),B.location);N.confirmTransitionTo(s,r,_,(function(e){if(e){var t=U(s),o=s.key,a=s.state;if(i)if(n.pushState({key:o,state:a},null,t),k)window.location.href=t;else{var c=R.indexOf(B.location.key),l=R.slice(0,c+1);l.push(s.key),R=l,x({action:r,location:s})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",s=d(e,t,M(),B.location);N.confirmTransitionTo(s,r,_,(function(e){if(e){var t=U(s),o=s.key,a=s.state;if(i)if(n.replaceState({key:o,state:a},null,t),k)window.location.replace(t);else{var c=R.indexOf(B.location.key);-1!==c&&(R[c]=s.key),x({action:r,location:s})}else window.location.replace(t)}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=N.setPrompt(e);return z||(L(1),z=!0),function(){return z&&(z=!1,L(-1)),t()}},listen:function(e){var t=N.appendListener(e);return L(1),function(){L(-1),t()}}};return B}var w="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+c(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c,decodePath:a},slash:{encodePath:a,decodePath:a}};function E(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function C(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function j(e){window.location.replace(E(window.location.href)+"#"+e)}function S(e){void 0===e&&(e={}),m||(0,o.Z)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,s=void 0===i?g:i,c=n.hashType,h=void 0===c?"slash":c,v=e.basename?u(a(e.basename)):"",b=_[h],y=b.encodePath,k=b.decodePath;function S(){var e=k(C());return v&&(e=l(e,v)),d(e)}var M=f();function N(e){(0,r.Z)(z,e),z.length=t.length,M.notifyListeners(z.location,z.action)}var x=!1,A=null;function O(){var e,t,n=C(),r=y(n);if(n!==r)j(r);else{var i=S(),o=z.location;if(!x&&(t=i,(e=o).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(A===p(i))return;A=null,function(e){if(x)x=!1,N();else{var t="POP";M.confirmTransitionTo(e,t,s,(function(n){n?N({action:t,location:e}):function(e){var t=z.location,n=R.lastIndexOf(p(t));-1===n&&(n=0);var r=R.lastIndexOf(p(e));-1===r&&(r=0);var i=n-r;i&&(x=!0,U(i))}(e)}))}}(i)}}var T=C(),P=y(T);T!==P&&j(P);var I=S(),R=[p(I)];function U(e){t.go(e)}var D=0;function Z(e){1===(D+=e)&&1===e?window.addEventListener(w,O):0===D&&window.removeEventListener(w,O)}var L=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=E(window.location.href)),n+"#"+y(v+p(e))},push:function(e,t){var n="PUSH",r=d(e,void 0,void 0,z.location);M.confirmTransitionTo(r,n,s,(function(e){if(e){var t=p(r),i=y(v+t);if(C()!==i){A=t,function(e){window.location.hash=e}(i);var s=R.lastIndexOf(p(z.location)),o=R.slice(0,s+1);o.push(t),R=o,N({action:n,location:r})}else N()}}))},replace:function(e,t){var n="REPLACE",r=d(e,void 0,void 0,z.location);M.confirmTransitionTo(r,n,s,(function(e){if(e){var t=p(r),i=y(v+t);C()!==i&&(A=t,j(i));var s=R.indexOf(p(z.location));-1!==s&&(R[s]=t),N({action:n,location:r})}}))},go:U,goBack:function(){U(-1)},goForward:function(){U(1)},block:function(e){void 0===e&&(e=!1);var t=M.setPrompt(e);return L||(Z(1),L=!0),function(){return L&&(L=!1,Z(-1)),t()}},listen:function(e){var t=M.appendListener(e);return Z(1),function(){Z(-1),t()}}};return z}function M(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,s=void 0===i?["/"]:i,o=t.initialIndex,a=void 0===o?0:o,c=t.keyLength,l=void 0===c?6:c,u=f();function h(e){(0,r.Z)(k,e),k.length=k.entries.length,u.notifyListeners(k.location,k.action)}function m(){return Math.random().toString(36).substr(2,l)}var g=M(a,0,s.length-1),v=s.map((function(e){return d(e,void 0,"string"==typeof e?m():e.key||m())})),b=p;function y(e){var t=M(k.index+e,0,k.entries.length-1),r=k.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?h({action:"POP",location:r,index:t}):h()}))}var k={length:v.length,action:"POP",location:v[g],index:g,entries:v,createHref:b,push:function(e,t){var r="PUSH",i=d(e,t,m(),k.location);u.confirmTransitionTo(i,r,n,(function(e){if(e){var t=k.index+1,n=k.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),h({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=d(e,t,m(),k.location);u.confirmTransitionTo(i,r,n,(function(e){e&&(k.entries[k.index]=i,h({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=k.index+e;return t>=0&&t<k.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return k}},53674:function(e,t,n){"use strict";var r=n(91138),i=n(90458),s=n(48282);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=o,o.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},o.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var o=s.slice(0,e);return this._update(n),this._reseed++,i.encode(o,t)}},13266:function(e,t,n){"use strict";var r=n(80364),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return r.isMemo(e)?o:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=h(n);i&&i!==f&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var a=c(t),m=c(n),g=0;g<o.length;++g){var v=o[g];if(!(s[v]||r&&r[v]||m&&m[v]||a&&a[v])){var b=d(n,v);try{l(t,v,b)}catch(e){}}}}return t}},23644:function(e,t){t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,c=(1<<a)-1,l=c>>1,u=-7,p=n?i-1:0,d=n?-1:1,h=e[t+p];for(p+=d,s=h&(1<<-u)-1,h>>=-u,u+=a;u>0;s=256*s+e[t+p],p+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===s)s=1-l;else{if(s===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),s-=l}return(h?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,c,l=8*s-i-1,u=(1<<l)-1,p=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:s-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(o++,c/=2),o+p>=u?(a=0,o=u):o+p>=1?(a=(t*c-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&a,h+=f,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;e[n+h]=255&o,h+=f,o/=256,l-=8);e[n+h-f]|=128*m}},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}}},24546:function(e){"use strict";e.exports=function(e,t,n,r,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,s,o,a],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},98304:function(e,t,n){"use strict";var r=n(77828)(),i=n(16422)("Object.prototype.toString"),s=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},o=function(e){return!!s(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return s(arguments)}();s.isLegacyArguments=o,e.exports=a?s:o},57372:function(e,t,n){"use strict";var r,i=Object.prototype.toString,s=Function.prototype.toString,o=/^\s*(?:function)?\*/,a=n(77828)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(s.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(e);if(!c)return!1;if(void 0===r){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();r=!!t&&c(t)}return c(e)===r}},46618:function(e){"use strict";e.exports=function(e){return e!=e}},17614:function(e,t,n){"use strict";var r=n(43120),i=n(13185),s=n(46618),o=n(42775),a=n(49582),c=r(o(),Number);i(c,{getPolyfill:o,implementation:s,shim:a}),e.exports=c},42775:function(e,t,n){"use strict";var r=n(46618);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},49582:function(e,t,n){"use strict";var r=n(13185),i=n(42775);e.exports=function(){var e=i();return r(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},8639:function(e,t,n){"use strict";var r=n(49478),i=n(87331),s=n(16422),o=s("Object.prototype.toString"),a=n(77828)(),c="undefined"==typeof globalThis?window:globalThis,l=i(),u=s("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},p=s("String.prototype.slice"),d={},h=n(44489),f=Object.getPrototypeOf;a&&h&&f&&r(l,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var n=f(t),r=h(n,Symbol.toStringTag);if(!r){var i=f(n);r=h(i,Symbol.toStringTag)}d[e]=r.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=p(o(e),8,-1);return u(l,t)>-1}return!!h&&function(e){var t=!1;return r(d,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}},16169:function(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},53956:function(e,t,n){"use strict";var r=n(59503),i=n(39302),s=n(37225).Buffer,o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<<t|e>>>32-t}function l(e,t,n,r,i,s,o){return c(e+(t&n|~t&r)+i+s|0,o)+t|0}function u(e,t,n,r,i,s,o){return c(e+(t&r|n&~r)+i+s|0,o)+t|0}function p(e,t,n,r,i,s,o){return c(e+(t^n^r)+i+s|0,o)+t|0}function d(e,t,n,r,i,s,o){return c(e+(n^(t|~r))+i+s|0,o)+t|0}r(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,s=this._d;n=l(n,r,i,s,e[0],3614090360,7),s=l(s,n,r,i,e[1],3905402710,12),i=l(i,s,n,r,e[2],606105819,17),r=l(r,i,s,n,e[3],3250441966,22),n=l(n,r,i,s,e[4],4118548399,7),s=l(s,n,r,i,e[5],1200080426,12),i=l(i,s,n,r,e[6],2821735955,17),r=l(r,i,s,n,e[7],4249261313,22),n=l(n,r,i,s,e[8],1770035416,7),s=l(s,n,r,i,e[9],2336552879,12),i=l(i,s,n,r,e[10],4294925233,17),r=l(r,i,s,n,e[11],2304563134,22),n=l(n,r,i,s,e[12],1804603682,7),s=l(s,n,r,i,e[13],4254626195,12),i=l(i,s,n,r,e[14],2792965006,17),n=u(n,r=l(r,i,s,n,e[15],1236535329,22),i,s,e[1],4129170786,5),s=u(s,n,r,i,e[6],3225465664,9),i=u(i,s,n,r,e[11],643717713,14),r=u(r,i,s,n,e[0],3921069994,20),n=u(n,r,i,s,e[5],3593408605,5),s=u(s,n,r,i,e[10],38016083,9),i=u(i,s,n,r,e[15],3634488961,14),r=u(r,i,s,n,e[4],3889429448,20),n=u(n,r,i,s,e[9],568446438,5),s=u(s,n,r,i,e[14],3275163606,9),i=u(i,s,n,r,e[3],4107603335,14),r=u(r,i,s,n,e[8],1163531501,20),n=u(n,r,i,s,e[13],2850285829,5),s=u(s,n,r,i,e[2],4243563512,9),i=u(i,s,n,r,e[7],1735328473,14),n=p(n,r=u(r,i,s,n,e[12],2368359562,20),i,s,e[5],4294588738,4),s=p(s,n,r,i,e[8],2272392833,11),i=p(i,s,n,r,e[11],1839030562,16),r=p(r,i,s,n,e[14],4259657740,23),n=p(n,r,i,s,e[1],2763975236,4),s=p(s,n,r,i,e[4],1272893353,11),i=p(i,s,n,r,e[7],4139469664,16),r=p(r,i,s,n,e[10],3200236656,23),n=p(n,r,i,s,e[13],681279174,4),s=p(s,n,r,i,e[0],3936430074,11),i=p(i,s,n,r,e[3],3572445317,16),r=p(r,i,s,n,e[6],76029189,23),n=p(n,r,i,s,e[9],3654602809,4),s=p(s,n,r,i,e[12],3873151461,11),i=p(i,s,n,r,e[15],530742520,16),n=d(n,r=p(r,i,s,n,e[2],3299628645,23),i,s,e[0],4096336452,6),s=d(s,n,r,i,e[7],1126891415,10),i=d(i,s,n,r,e[14],2878612391,15),r=d(r,i,s,n,e[5],4237533241,21),n=d(n,r,i,s,e[12],1700485571,6),s=d(s,n,r,i,e[3],2399980690,10),i=d(i,s,n,r,e[10],4293915773,15),r=d(r,i,s,n,e[1],2240044497,21),n=d(n,r,i,s,e[8],1873313359,6),s=d(s,n,r,i,e[15],4264355552,10),i=d(i,s,n,r,e[6],2734768916,15),r=d(r,i,s,n,e[13],1309151649,21),n=d(n,r,i,s,e[4],4149444226,6),s=d(s,n,r,i,e[11],3174756917,10),i=d(i,s,n,r,e[2],718787259,15),r=d(r,i,s,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+s|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=s.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},16616:function(e,t,n){var r=n(30910),i=n(71876);function s(e){this.rand=e||new i.Rand}e.exports=s,s.create=function(e){return new s(e)},s.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},s.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},s.prototype.test=function(e,t,n){var i=e.bitLength(),s=r.mont(e),o=new r(1).toRed(s);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),c=0;!a.testn(c);c++);for(var l=e.shrn(c),u=a.toRed(s);t>0;t--){var p=this._randrange(new r(2),a);n&&n(p);var d=p.toRed(s).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h<c;h++){if(0===(d=d.redSqr()).cmp(o))return!1;if(0===d.cmp(u))break}if(h===c)return!1}}return!0},s.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),s=new r(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),a=0;!o.testn(a);a++);for(var c=e.shrn(a),l=o.toRed(i);t>0;t--){var u=this._randrange(new r(2),o),p=e.gcd(u);if(0!==p.cmpn(1))return p;var d=u.toRed(i).redPow(c);if(0!==d.cmp(s)&&0!==d.cmp(l)){for(var h=1;h<a;h++){if(0===(d=d.redSqr()).cmp(s))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(l))break}if(h===a)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},66118:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(4144),o=n(11268),a=n.n(o),c=1073741823,l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window||"undefined"!=typeof window?window:{};function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var p=i().createContext||function(e,t){var n,i,o,p="__create-react-context-"+((l[o="__global_unique_id__"]=(l[o]||0)+1)+"__"),d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=u(t.props.value),t}(0,s.Z)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[p]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((s=r)===(o=i)?0!==s||1/s==1/o:s!=s&&o!=o)?n=0:(n="function"==typeof t?t(r,i):c,0!==(n|=0)&&this.emitter.set(e.value,n))}var s,o},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[p]=a().object.isRequired,n);var h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}(0,s.Z)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?c:t},r.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?c:e},r.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},r.getValue=function(){return this.context[p]?this.context[p].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[p]=a().object,i),{Provider:d,Consumer:h}};t.Z=p},11174:function(){},85501:function(){},97329:function(){},15451:function(){},46688:function(){},78413:function(){},31993:function(){},8724:function(){},90307:function(){},54339:function(){},57090:function(){},51446:function(){},88599:function(){},70453:function(){},47637: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)}},90458:function(e,t){"use strict";var n=t;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),s=i>>8,o=255&i;s?n.push(s,o):n.push(o)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}},32002:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,s=7*i,o=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\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(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var s=Math.abs(e);if(s>=i)return a(e,s,i,"day");if(s>=r)return a(e,s,r,"hour");if(s>=n)return a(e,s,n,"minute");if(s>=t)return a(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=i)return Math.round(e/i)+"d";if(s>=r)return Math.round(e/r)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=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 i(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,s){for(var o,a,c=i(e),l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]))n.call(o,u)&&(c[u]=o[u]);if(t){a=t(o);for(var p=0;p<a.length;p++)r.call(o,a[p])&&(c[a[p]]=o[a[p]])}}return c}},72335:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},88706:function(e,t,n){"use strict";var r=n(13185),i=n(43120),s=n(72335),o=n(75432),a=n(95894),c=i(o(),Object);r(c,{getPolyfill:o,implementation:s,shim:a}),e.exports=c},75432:function(e,t,n){"use strict";var r=n(72335);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},95894:function(e,t,n){"use strict";var r=n(75432),i=n(13185);e.exports=function(){var e=r();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},96128:function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=n(56133),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),l=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===s.call(e),r=o(e),a=t&&"[object String]"===s.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var f=l&&n;if(a&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)d.push(String(g));else for(var v in e)f&&"prototype"===v||!i.call(e,v)||d.push(String(v));if(c)for(var b=function(e){if("undefined"==typeof window||!h)return p(e);try{return p(e)}catch(e){return!1}}(e),y=0;y<u.length;++y)b&&"constructor"===u[y]||!i.call(e,u[y])||d.push(u[y]);return d}}e.exports=r},98517:function(e,t,n){"use strict";var r=Array.prototype.slice,i=n(56133),s=Object.keys,o=s?function(e){return s(e)}:n(96128),a=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(r.call(e)):a(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},56133:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},82581:function(e,t,n){"use strict";var r=n(8277);t.certificate=n(42103);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var s=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=s;var o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var l=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=l;var u=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=u,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var p=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=p;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},42103:function(e,t,n){"use strict";var r=n(8277),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),s=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),c=r.define("RelativeDistinguishedName",(function(){this.setof(s)})),l=r.define("RDNSequence",(function(){this.seqof(c)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),p=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(p),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),f=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=f},89987:function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=n(51105),a=n(6123),c=n(37225).Buffer;e.exports=function(e,t){var n,l=e.toString(),u=l.match(r);if(u){var p="aes"+u[1],d=c.from(u[2],"hex"),h=c.from(u[3].replace(/[\r\n]/g,""),"base64"),f=o(t,d.slice(0,8),parseInt(u[1],10)).key,m=[],g=a.createDecipheriv(p,f,d);m.push(g.update(h)),m.push(g.final()),n=c.concat(m)}else{var v=l.match(s);n=c.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:l.match(i)[1],data:n}}},87758:function(e,t,n){var r=n(82581),i=n(93611),s=n(89987),o=n(6123),a=n(80231),c=n(37225).Buffer;function l(e){var t;"object"!=typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var n,l,u=s(e,t),p=u.tag,d=u.data;switch(p){case"CERTIFICATE":l=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=r.PublicKey.decode(d,"der")),n=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=r.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),s=i[e.algorithm.decrypt.cipher.algo.join(".")],l=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,p=parseInt(s.split("-")[1],10)/8,d=a.pbkdf2Sync(t,n,r,p,"sha1"),h=o.createDecipheriv(s,d,l),f=[];return f.push(h.update(u)),f.push(h.final()),c.concat(f)}(d=r.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(l=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:r.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=r.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+p)}}e.exports=l,l.signature=r.signature},760:function(e,t,n){var r=n(16169);e.exports=h,e.exports.parse=s,e.exports.compile=function(e,t){return a(s(e,t),t)},e.exports.tokensToFunction=a,e.exports.tokensToRegExp=d;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function s(e,t){for(var n,r=[],s=0,o=0,a="",u=t&&t.delimiter||"/";null!=(n=i.exec(e));){var p=n[0],d=n[1],h=n.index;if(a+=e.slice(o,h),o=h+p.length,d)a+=d[1];else{var f=e[o],m=n[2],g=n[3],v=n[4],b=n[5],y=n[6],k=n[7];a&&(r.push(a),a="");var w=null!=m&&null!=f&&f!==m,_="+"===y||"*"===y,E="?"===y||"*"===y,C=n[2]||u,j=v||b;r.push({name:g||s++,prefix:m||"",delimiter:C,optional:E,repeat:_,partial:w,asterisk:!!k,pattern:j?l(j):k?".*":"[^"+c(C)+"]+?"})}}return o<e.length&&(a+=e.substr(o)),a&&r.push(a),r}function o(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function a(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"==typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",p(t)));return function(t,i){for(var s="",a=t||{},c=(i||{}).pretty?o:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var p,d=a[u.name];if(null==d){if(u.optional){u.partial&&(s+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(d)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var h=0;h<d.length;h++){if(p=c(d[h]),!n[l].test(p))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(p)+"`");s+=(0===h?u.prefix:u.delimiter)+p}}else{if(p=u.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):c(d),!n[l].test(p))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+p+'"');s+=u.prefix+p}}else s+=u}return s}}function c(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,s=!1!==n.end,o="",a=0;a<e.length;a++){var l=e[a];if("string"==typeof l)o+=c(l);else{var d=c(l.prefix),h="(?:"+l.pattern+")";t.push(l),l.repeat&&(h+="(?:"+d+h+")*"),o+=h=l.optional?l.partial?d+"("+h+")?":"(?:"+d+"("+h+"))?":d+"("+h+")"}}var f=c(n.delimiter||"/"),m=o.slice(-f.length)===f;return i||(o=(m?o.slice(0,-f.length):o)+"(?:"+f+"(?=$))?"),o+=s?"$":i&&m?"":"(?="+f+"|$)",u(new RegExp("^"+o,p(n)),t)}function h(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(h(e[i],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",p(n)),t)}(e,t,n):function(e,t,n){return d(s(e,n),t,n)}(e,t,n)}},80231:function(e,t,n){t.pbkdf2=n(86443),t.pbkdf2Sync=n(1452)},86443:function(e,t,n){var r,i,s=n(37225).Buffer,o=n(95672),a=n(32042),c=n(1452),l=n(68200),u=window.crypto&&window.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(){return i||(i=window.process&&window.process.nextTick?window.process.nextTick:window.queueMicrotask?window.queueMicrotask:window.setImmediate?window.setImmediate:window.setTimeout)}function f(e,t,n,r,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return s.from(e)}))}e.exports=function(e,t,n,i,m,g){"function"==typeof m&&(g=m,m=void 0);var v=p[(m=m||"sha1").toLowerCase()];if(v&&"function"==typeof window.Promise){if(o(n,i),e=l(e,a,"Password"),t=l(t,a,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(window.process&&!window.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=f(r=r||s.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(v).then((function(r){return r?f(e,t,n,i,v):c(e,t,n,i,m)})),g)}else h()((function(){var r;try{r=c(e,t,n,i,m)}catch(e){return g(e)}g(null,r)}))}},32042:function(e,t,n){var r,i=n(5806);if(window.process&&window.process.browser)r="utf-8";else if(window.process&&window.process.version){r=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r},95672:function(e){var t=Math.pow(2,30)-1;e.exports=function(e,n){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>t||n!=n)throw new TypeError("Bad key length")}},1452:function(e,t,n){var r=n(51345),i=n(50601),s=n(25636),o=n(37225).Buffer,a=n(95672),c=n(32042),l=n(68200),u=o.alloc(128),p={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var a=function(e){function t(t){return s(e).update(t).digest()}function n(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=a(t):t.length<c&&(t=o.concat([t,u],c));for(var l=o.allocUnsafe(c+p[e]),d=o.allocUnsafe(c+p[e]),h=0;h<c;h++)l[h]=54^t[h],d[h]=92^t[h];var f=o.allocUnsafe(c+n+4);l.copy(f,0,0,c),this.ipad1=f,this.ipad2=l,this.opad=d,this.alg=e,this.blocksize=c,this.hash=a,this.size=p[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,i){a(n,r);var s=new d(i=i||"sha1",e=l(e,c,"Password"),(t=l(t,c,"Salt")).length),u=o.allocUnsafe(r),h=o.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var f=0,m=p[i],g=Math.ceil(r/m),v=1;v<=g;v++){h.writeUInt32BE(v,t.length);for(var b=s.run(h,s.ipad1),y=b,k=1;k<n;k++){y=s.run(y,s.ipad2);for(var w=0;w<m;w++)b[w]^=y[w]}b.copy(u,f),f+=m}return u}},68200:function(e,t,n){var r=n(37225).Buffer;e.exports=function(e,t,n){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},5806:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var a,c=[],l=!1,u=-1;function p(){l&&a&&(l=!1,a.length?c=a.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=o(p);l=!0;for(var t=c.length;t;){for(a=c,c=[];++u<t;)a&&a[u].run();u=-1,t=c.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||o(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9587:function(e,t,n){"use strict";var r=n(45843);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,o){if(o!==r){var a=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 a.name="Invariant Violation",a}}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:s,resetWarningCache:i};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 i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,o){if(o!==r){var a=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 a.name="Invariant Violation",a}}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:s,resetWarningCache:i};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"},51296:function(e,t,n){t.publicEncrypt=n(75496),t.privateDecrypt=n(42882),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},46598:function(e,t,n){var r=n(77439),i=n(37225).Buffer;function s(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,o=i.alloc(0),a=0;o.length<t;)n=s(a++),o=i.concat([o,r("sha1").update(e).update(n).digest()]);return o.slice(0,t)}},42882:function(e,t,n){var r=n(87758),i=n(46598),s=n(76245),o=n(30910),a=n(8568),c=n(77439),l=n(65505),u=n(37225).Buffer;e.exports=function(e,t,n){var p;p=e.padding?e.padding:n?1:4;var d,h=r(e),f=h.modulus.byteLength();if(t.length>f||new o(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=n?l(new o(t),h):a(t,h);var m=u.alloc(f-d.length);if(d=u.concat([m,d],f),4===p)return function(e,t){var n=e.modulus.byteLength(),r=c("sha1").update(u.alloc(0)).digest(),o=r.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,o+1),l=t.slice(o+1),p=s(a,i(l,o)),d=s(l,i(p,n-o-1));if(function(e,t){e=u.from(e),t=u.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,o)))throw new Error("decryption error");var h=o;for(;0===d[h];)h++;if(1!==d[h++])throw new Error("decryption error");return d.slice(h)}(h,d);if(1===p)return function(e,t,n){var r=t.slice(0,2),i=2,s=0;for(;0!==t[i++];)if(i>=t.length){s++;break}var o=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&s++;o.length<8&&s++;if(s)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===p)return d;throw new Error("unknown padding")}},75496:function(e,t,n){var r=n(87758),i=n(35175),s=n(77439),o=n(46598),a=n(76245),c=n(30910),l=n(65505),u=n(8568),p=n(37225).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var h,f=r(e);if(4===d)h=function(e,t){var n=e.modulus.byteLength(),r=t.length,l=s("sha1").update(p.alloc(0)).digest(),u=l.length,d=2*u;if(r>n-d-2)throw new Error("message too long");var h=p.alloc(n-r-d-2),f=n-u-1,m=i(u),g=a(p.concat([l,h,p.alloc(1,1),t],f),o(m,f)),v=a(m,o(g,u));return new c(p.concat([p.alloc(1),v,g],n))}(f,t);else if(1===d)h=function(e,t,n){var r,s=t.length,o=e.modulus.byteLength();if(s>o-11)throw new Error("message too long");r=n?p.alloc(o-s-3,255):function(e){var t,n=p.allocUnsafe(e),r=0,s=i(2*e),o=0;for(;r<e;)o===s.length&&(s=i(2*e),o=0),(t=s[o++])&&(n[r++]=t);return n}(o-s-3);return new c(p.concat([p.from([0,n?1:2]),r,p.alloc(1),t],o))}(f,t,n);else{if(3!==d)throw new Error("unknown padding");if((h=new c(t)).cmp(f.modulus)>=0)throw new Error("data too long for modulus")}return n?u(h,f):l(h,f)}},65505:function(e,t,n){var r=n(30910),i=n(37225).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},76245:function(e){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},35175:function(e,t,n){"use strict";var r=n(5806),i=65536,s=4294967295;var o=n(37225).Buffer,a=window.crypto||window.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>s)throw new RangeError("requested too many random bytes");var n=o.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c<e;c+=i)a.getRandomValues(n.slice(c,c+i));else a.getRandomValues(n);if("function"==typeof t)return r.nextTick((function(){t(null,n)}));return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},70460:function(e,t,n){"use strict";var r=n(5806);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var s=n(37225),o=n(35175),a=s.Buffer,c=s.kMaxLength,l=window.crypto||window.msCrypto,u=Math.pow(2,32)-1;function p(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>c)throw new RangeError("buffer too small")}function h(e,t,n,i){if(r.browser){var s=e.buffer,a=new Uint8Array(s,t,n);return l.getRandomValues(a),i?void r.nextTick((function(){i(null,e)})):e}if(!i)return o(n).copy(e,t),e;o(n,(function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)}))}l&&l.getRandomValues||!r.browser?(t.randomFill=function(e,t,n,r){if(!(a.isBuffer(e)||e instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)r=t,t=0,n=e.length;else if("function"==typeof n)r=n,n=e.length-t;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return p(t,e.length),d(n,t,e.length),h(e,t,n,r)},t.randomFillSync=function(e,t,n){void 0===t&&(t=0);if(!(a.isBuffer(e)||e instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');p(t,e.length),void 0===n&&(n=e.length-t);return d(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},66462:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,k=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case s:case a:case o:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case g:case m:case c:return e;default:return t}}case i:return t}}}function _(e){return w(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=o,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===a||e===o||e===h||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===y||e.$$typeof===k||e.$$typeof===v)},t.typeOf=w},80364:function(e,t,n){"use strict";e.exports=n(66462)},33244:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return!(0,s.default)(this.props,e)||!(0,s.default)(this.state,t)};var r,i=n(60360),s=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},21425:function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(33244),s=(r=i)&&r.__esModule?r:{default:r};t.default={shouldComponentUpdate:s.default},e.exports=t.default},60360:function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),s=0;s<n.length;s++)if(!i(n[s])||e[n[s]]!==t[n[s]])return!1;return!0},e.exports=t.default},1992:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var r=n(99196),i=n.n(r)().createContext(null)},32054:function(e,t,n){"use strict";var r=n(4144),i=n(99196),s=n.n(i),o=n(11268),a=n.n(o),c=n(1992),l=function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.store;return n.state={storeState:r.getState(),store:r},n}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this.subscribe()},n.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this._isMounted=!1},n.componentDidUpdate=function(e){this.props.store!==e.store&&(this.unsubscribe&&this.unsubscribe(),this.subscribe())},n.subscribe=function(){var e=this,t=this.props.store;this.unsubscribe=t.subscribe((function(){var n=t.getState();e._isMounted&&e.setState((function(e){return e.storeState===n?null:{storeState:n}}))}));var n=t.getState();n!==this.state.storeState&&this.setState({storeState:n})},n.render=function(){var e=this.props.context||c.E;return s().createElement(e.Provider,{value:this.state},this.props.children)},t}(i.Component);l.propTypes={store:a().shape({subscribe:a().func.isRequired,dispatch:a().func.isRequired,getState:a().func.isRequired}),context:a().object,children:a().any},t.Z=l},4193:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(31551),i=n(4144),s=n(37665),o=n(30116),a=n(13266),c=n.n(a),l=n(24546),u=n.n(l),p=n(99196),d=n.n(p),h=n(80364),f=n(1992);function m(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,l=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,m=n.methodName,g=void 0===m?"connectAdvanced":m,v=n.renderCountProp,b=void 0===v?void 0:v,y=n.shouldHandleStateChanges,k=void 0===y||y,w=n.storeKey,_=void 0===w?"store":w,E=n.withRef,C=void 0!==E&&E,j=n.forwardRef,S=void 0!==j&&j,M=n.context,N=void 0===M?f.E:M,x=(0,o.Z)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);u()(void 0===b,"renderCountProp is removed. render counting is built into the latest React dev tools profiling extension"),u()(!C,"withRef is removed. To access the wrapped instance, use a ref on the connected component");var A="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";u()("store"===_,"storeKey has been removed and does not do anything. "+A);var O=N;return function(t){var n=t.displayName||t.name||"Component",o=l(n),a=(0,s.Z)({},x,{getDisplayName:l,methodName:g,renderCountProp:b,shouldHandleStateChanges:k,storeKey:_,displayName:o,wrappedComponentName:n,WrappedComponent:t}),f=x.pure,m=p.Component;f&&(m=p.PureComponent);var v=function(n){function c(t){var i,o,a,c,l,p,h,m,g,v,b;return i=n.call(this,t)||this,u()(S?!t.wrapperProps[_]:!t[_],"Passing redux store in props has been removed and does not do anything. "+A),i.selectDerivedProps=function(t,n,r,i){if(f&&o===n&&a===t)return c;r===l&&p===i||(l=r,p=i,h=e(r.dispatch,i)),o=n,a=t;var s=h(t,n);return c=s},i.selectChildElement=function(e,t,n){return t===m&&n===g&&b===e||(m=t,g=n,b=e,v=d().createElement(e,(0,s.Z)({},t,{ref:n}))),v},i.indirectRenderWrappedComponent=i.indirectRenderWrappedComponent.bind((0,r.Z)(i)),i}(0,i.Z)(c,n);var l=c.prototype;return l.indirectRenderWrappedComponent=function(e){return this.renderWrappedComponent(e)},l.renderWrappedComponent=function(e){u()(e,'Could not find "store" in the context of "'+o+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+o+" in connect options.");var n,r=e.storeState,i=e.store,s=this.props;S&&(s=this.props.wrapperProps,n=this.props.forwardedRef);var c=this.selectDerivedProps(r,s,i,a);return this.selectChildElement(t,c,n)},l.render=function(){var e=this.props.context&&this.props.context.Consumer&&(0,h.isContextConsumer)(d().createElement(this.props.context.Consumer,null))?this.props.context:O;return d().createElement(e.Consumer,null,this.indirectRenderWrappedComponent)},c}(m);if(v.WrappedComponent=t,v.displayName=o,S){var y=d().forwardRef((function(e,t){return d().createElement(v,{wrapperProps:e,forwardedRef:t})}));return y.displayName=o,y.WrappedComponent=t,c()(y,t)}return c()(v,t)}}},28274:function(e,t,n){"use strict";var r,i,s,o,a,c,l,u,p,d,h,f,m=n(37665),g=n(30116),v=n(4193),b=n(37110),y=n(80214),k=n(26150),w=n(94262),_=n(27189);function E(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function C(e,t){return e===t}t.Z=(s=(i=void 0===r?{}:r).connectHOC,o=void 0===s?v.Z:s,a=i.mapStateToPropsFactories,c=void 0===a?k.ZP:a,l=i.mapDispatchToPropsFactories,u=void 0===l?y.ZP:l,p=i.mergePropsFactories,d=void 0===p?w.ZP:p,h=i.selectorFactory,f=void 0===h?_.ZP:h,function(e,t,n,r){void 0===r&&(r={});var i=r,s=i.pure,a=void 0===s||s,l=i.areStatesEqual,p=void 0===l?C:l,h=i.areOwnPropsEqual,v=void 0===h?b.Z:h,y=i.areStatePropsEqual,k=void 0===y?b.Z:y,w=i.areMergedPropsEqual,_=void 0===w?b.Z:w,j=(0,g.Z)(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=E(e,c,"mapStateToProps"),M=E(t,u,"mapDispatchToProps"),N=E(n,d,"mergeProps");return o(f,(0,m.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:S,initMapDispatchToProps:M,initMergeProps:N,pure:a,areStatesEqual:p,areOwnPropsEqual:v,areStatePropsEqual:k,areMergedPropsEqual:_},j))})},80214:function(e,t,n){"use strict";var r=n(74978),i=n(68821);t.ZP=[function(e){return"function"==typeof e?(0,i.xv)(e,"mapDispatchToProps"):void 0},function(e){return e?void 0:(0,i.dX)((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?(0,i.dX)((function(t){return(0,r.DE)(e,t)})):void 0}]},26150:function(e,t,n){"use strict";var r=n(68821);t.ZP=[function(e){return"function"==typeof e?(0,r.xv)(e,"mapStateToProps"):void 0},function(e){return e?void 0:(0,r.dX)((function(){return{}}))}]},94262:function(e,t,n){"use strict";var r=n(37665);n(80450);function i(e,t,n){return(0,r.Z)({},n,e,t)}t.ZP=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,s=n.areMergedPropsEqual,o=!1;return function(t,n,a){var c=e(t,n,a);return o?i&&s(c,r)||(r=c):(o=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return i}}]},27189:function(e,t,n){"use strict";n.d(t,{ZP:function(){return o}});var r=n(30116);n(51617);function i(e,t,n,r){return function(i,s){return n(e(i,s),t(r,s),s)}}function s(e,t,n,r,i){var s,o,a,c,l,u=i.areStatesEqual,p=i.areOwnPropsEqual,d=i.areStatePropsEqual,h=!1;function f(i,h){var f,m,g=!p(h,o),v=!u(i,s);return s=i,o=h,g&&v?(a=e(s,o),t.dependsOnOwnProps&&(c=t(r,o)),l=n(a,c,o)):g?(e.dependsOnOwnProps&&(a=e(s,o)),t.dependsOnOwnProps&&(c=t(r,o)),l=n(a,c,o)):v?(f=e(s,o),m=!d(f,a),a=f,m&&(l=n(a,c,o)),l):l}return function(i,u){return h?f(i,u):(a=e(s=i,o=u),c=t(r,o),l=n(a,c,o),h=!0,l)}}function o(e,t){var n=t.initMapStateToProps,o=t.initMapDispatchToProps,a=t.initMergeProps,c=(0,r.Z)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),l=n(e,c),u=o(e,c),p=a(e,c);return(c.pure?s:i)(l,u,p,e,c)}},51617:function(e,t,n){"use strict";n(28477)},68821:function(e,t,n){"use strict";n.d(t,{dX:function(){return r},xv:function(){return s}});n(80450);function r(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function i(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function s(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=i(e);var s=r(t,n);return"function"==typeof s&&(r.mapToProps=s,r.dependsOnOwnProps=i(s),s=r(t,n)),s},r}}},2620:function(e,t,n){"use strict";n.d(t,{zt:function(){return r.Z},$j:function(){return i.Z}});var r=n(32054),i=(n(4193),n(1992),n(28274))},37110:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=Object.prototype.hasOwnProperty;function i(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function s(e,t){if(i(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var o=0;o<n.length;o++)if(!r.call(t,n[o])||!i(e[n[o]],t[n[o]]))return!1;return!0}},80450:function(e,t,n){"use strict";n(28477)},28477:function(e,t,n){"use strict";n(55246)},1336:function(e,t,n){"use strict";n.d(t,{UT:function(){return p}});var r=n(12901),i=n(4144),s=n(99196),o=n.n(s),a=n(33451),c=(n(11268),n(37665)),l=n(30116),u=n(34770);o().Component;var p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,a.q_)(t.props),t}return(0,i.Z)(t,e),t.prototype.render=function(){return o().createElement(r.F0,{history:this.history,children:this.props.children})},t}(o().Component);var d=function(e,t){return"function"==typeof e?e(t):e},h=function(e,t){return"string"==typeof e?(0,a.ob)(e,null,null,t):e},f=function(e){return e},m=o().forwardRef;void 0===m&&(m=f);var g=m((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,s=(0,l.Z)(e,["innerRef","navigate","onClick"]),a=s.target,u=(0,c.Z)({},s,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==m&&t||n,o().createElement("a",u)}));var v=m((function(e,t){var n=e.component,i=void 0===n?g:n,s=e.replace,a=e.to,p=e.innerRef,v=(0,l.Z)(e,["component","replace","to","innerRef"]);return o().createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=e.history,r=h(d(a,e.location),e.location),l=r?n.createHref(r):"",g=(0,c.Z)({},v,{href:l,navigate:function(){var t=d(a,e.location);(s?n.replace:n.push)(t)}});return f!==m?g.ref=t||p:g.innerRef=p,o().createElement(i,g)}))})),b=function(e){return e},y=o().forwardRef;void 0===y&&(y=b);y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,s=e.activeClassName,a=void 0===s?"active":s,p=e.activeStyle,f=e.className,m=e.exact,g=e.isActive,k=e.location,w=e.sensitive,_=e.strict,E=e.style,C=e.to,j=e.innerRef,S=(0,l.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o().createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=k||e.location,s=h(d(C,n),n),l=s.pathname,M=l&&l.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),N=M?(0,r.LX)(n.pathname,{path:M,exact:m,sensitive:w,strict:_}):null,x=!!(g?g(N,n):N),A=x?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(f,a):f,O=x?(0,c.Z)({},E,{},p):E,T=(0,c.Z)({"aria-current":x&&i||null,className:A,style:O,to:s},S);return b!==y?T.ref=t||j:T.innerRef=j,o().createElement(v,T)}))}))},12901:function(e,t,n){"use strict";n.d(t,{NL:function(){return w},l_:function(){return j},AW:function(){return x},F0:function(){return y},rs:function(){return R},s6:function(){return b},LX:function(){return N},EN:function(){return U}});var r=n(4144),i=n(99196),s=n.n(i),o=(n(11268),n(33451)),a=n(66118),c=n(34770),l=n(37665),u=n(760),p=n.n(u),d=(n(80364),n(30116)),h=n(13266),f=n.n(h),m=function(e){var t=(0,a.Z)();return t.displayName=e,t},g=m("Router-History"),v=function(e){var t=(0,a.Z)();return t.displayName=e,t},b=v("Router"),y=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}(0,r.Z)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return s().createElement(b.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},s().createElement(g.Provider,{children:this.props.children||null,value:this.props.history}))},t}(s().Component);s().Component;var k=function(e){function t(){return e.apply(this,arguments)||this}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(s().Component);function w(e){var t=e.message,n=e.when,r=void 0===n||n;return s().createElement(b.Consumer,null,(function(e){if(e||(0,c.Z)(!1),!r||e.staticContext)return null;var n=e.history.block;return s().createElement(k,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var _={},E=0;function C(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(_[e])return _[e];var t=p().compile(e);return E<1e4&&(_[e]=t,E++),t}(e)(t,{pretty:!0})}function j(e){var t=e.computedMatch,n=e.to,r=e.push,i=void 0!==r&&r;return s().createElement(b.Consumer,null,(function(e){e||(0,c.Z)(!1);var r=e.history,a=e.staticContext,u=i?r.push:r.replace,p=(0,o.ob)(t?"string"==typeof n?C(n,t.params):(0,l.Z)({},n,{pathname:C(n.pathname,t.params)}):n);return a?(u(p),null):s().createElement(k,{onMount:function(){u(p)},onUpdate:function(e,t){var n=(0,o.ob)(t.to);(0,o.Hp)(n,(0,l.Z)({},p,{key:n.key}))||u(p)},to:n})}))}var S={},M=0;function N(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,s=void 0!==i&&i,o=n.strict,a=void 0!==o&&o,c=n.sensitive,l=void 0!==c&&c;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=S[n]||(S[n]={});if(r[e])return r[e];var i=[],s={regexp:p()(e,i,t),keys:i};return M<1e4&&(r[e]=s,M++),s}(n,{end:s,strict:a,sensitive:l}),i=r.regexp,o=r.keys,c=i.exec(e);if(!c)return null;var u=c[0],d=c.slice(1),h=e===u;return s&&!h?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:h,params:o.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var x=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return s().createElement(b.Consumer,null,(function(t){t||(0,c.Z)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?N(n.pathname,e.props):t.match,i=(0,l.Z)({},t,{location:n,match:r}),o=e.props,a=o.children,u=o.component,p=o.render;return Array.isArray(a)&&0===a.length&&(a=null),s().createElement(b.Provider,{value:i},i.match?a?"function"==typeof a?a(i):a:u?s().createElement(u,i):p?p(i):null:"function"==typeof a?a(i):null)}))},t}(s().Component);function A(e){return"/"===e.charAt(0)?e:"/"+e}function O(e,t){if(!e)return t;var n=A(e);return 0!==t.pathname.indexOf(n)?t:(0,l.Z)({},t,{pathname:t.pathname.substr(n.length)})}function T(e){return"string"==typeof e?e:(0,o.Ep)(e)}function P(e){return function(){(0,c.Z)(!1)}}function I(){}s().Component;var R=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return s().createElement(b.Consumer,null,(function(t){t||(0,c.Z)(!1);var n,r,i=e.props.location||t.location;return s().Children.forEach(e.props.children,(function(e){if(null==r&&s().isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?N(i.pathname,(0,l.Z)({},e.props,{path:o})):t.match}})),r?s().cloneElement(n,{location:i,computedMatch:r}):null}))},t}(s().Component);function U(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,d.Z)(t,["wrappedComponentRef"]);return s().createElement(b.Consumer,null,(function(t){return t||(0,c.Z)(!1),s().createElement(e,(0,l.Z)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,f()(n,e)}s().useContext},30997:function(e){"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,s,o,a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var c=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(r(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},95507:function(e,t,n){"use strict";var r=n(5806),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var s=n(20465),o=n(48607);n(59503)(u,s);for(var a=i(o.prototype),c=0;c<a.length;c++){var l=a[c];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},15385:function(e,t,n){"use strict";e.exports=i;var r=n(1866);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(59503)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},20465:function(e,t,n){"use strict";var r,i=n(5806);e.exports=j,j.ReadableState=C;n(2571).EventEmitter;var s=function(e,t){return e.listeners(t).length},o=n(74756),a=n(90778).Buffer,c=window.Uint8Array||function(){};var l,u=n(80677);l=u&&u.debuglog?u.debuglog("stream"):function(){};var p,d,h,f=n(41500),m=n(13537),g=n(71199).getHighWaterMark,v=n(30997).q,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,k=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(59503)(j,o);var _=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function C(e,t,i){r=r||n(95507),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(3247).s),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function j(e){if(r=r||n(95507),!(this instanceof j))return new j(e);var t=this instanceof r;this._readableState=new C(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function S(e,t,n,r,i){l("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,o);else if(i||(s=function(e,t){var n;r=t,a.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(o,t)),s)_(e,s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),r)o.endEmitted?_(e,new w):M(e,o,t,!0);else if(o.ended)_(e,new y);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?M(e,o,t,!1):T(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,T(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function M(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),T(e,t)}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),j.prototype.destroy=m.destroy,j.prototype._undestroy=m.undestroy,j.prototype._destroy=function(e,t){t(e)},j.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=a.from(e,t),t=""),n=!0),S(this,e,t,!1,n)},j.prototype.unshift=function(e){return S(this,e,null,!0,!1)},j.prototype.isPaused=function(){return!1===this._readableState.flowing},j.prototype.setEncoding=function(e){p||(p=n(3247).s);var t=new p(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var N=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(O,e))}function O(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function T(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(l("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){l("readable nexttick read 0"),e.read(0)}function U(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function Z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function L(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function B(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}j.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):A(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?Z(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){_(this,new k("_read()"))},j.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,l("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?c:g;function a(t,i){l("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,l("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",d),p=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){l("onend"),e.end()}r.endEmitted?i.nextTick(o):n.once("end",o),e.on("unpipe",a);var u=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",u);var p=!1;function d(t){l("ondata");var i=e.write(t);l("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==B(r.pipes,e))&&!p&&(l("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){l("onerror",t),g(),e.removeListener("error",h),0===s(e,"error")&&_(e,t)}function f(){e.removeListener("finish",m),g()}function m(){l("onfinish"),e.removeListener("close",f),g()}function g(){l("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",f),e.once("finish",m),e.emit("pipe",n),r.flowing||(l("pipe resume"),n.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=B(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},j.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,l("on readable",r.length,r.reading),r.length?A(this):r.reading||i.nextTick(R,this))),n},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(I,this),n},j.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(I,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(U,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){l("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(j.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(87906)),d(this)}),Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),j._fromList=Z,Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(j.from=function(e,t){return void 0===h&&(h=n(67841)),h(j,e,t)})},1866:function(e,t,n){"use strict";e.exports=u;var r=n(30997).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(95507);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new s);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",p)}function p(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}n(59503)(u,c),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},48607:function(e,t,n){"use strict";var r,i=n(5806);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=j,j.WritableState=C;var o={deprecate:n(49231)},a=n(74756),c=n(90778).Buffer,l=window.Uint8Array||function(){};var u,p=n(13537),d=n(71199).getHighWaterMark,h=n(30997).q,f=h.ERR_INVALID_ARG_TYPE,m=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,v=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,y=h.ERR_STREAM_NULL_VALUES,k=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,_=p.errorOrDestroy;function E(){}function C(e,t,o){r=r||n(95507),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,s=n.writecb;if("function"!=typeof s)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,s){--t.pendingcb,n?(i.nextTick(s,r),i.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,r)):(s(r),e._writableState.errorEmitted=!0,_(e,r),O(e,t))}(e,n,r,t,s);else{var o=x(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||N(e,n),r?i.nextTick(M,e,n,o,s):M(e,n,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function j(e){var t=this instanceof(r=r||n(95507));if(!t&&!u.call(j,this))return new j(e);this._writableState=new C(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function S(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function M(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function N(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)i[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;i.allBuffers=c,S(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,p=n.callback;if(S(e,t,!1,t.objectMode?1:l.length,l,u,p),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(n){t.pendingcb--,n&&_(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=x(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(A,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(59503)(j,a),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===j&&(e&&e._writableState instanceof C)}})):u=function(e){return e instanceof this},j.prototype.pipe=function(){_(this,new v)},j.prototype.write=function(e,t,n){var r,s=this._writableState,o=!1,a=!s.objectMode&&(r=e,c.isBuffer(r)||r instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=E),s.ending?function(e,t){var n=new k;_(e,n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var s;return null===n?s=new y:"string"==typeof n||t.objectMode||(s=new f("chunk",["string","Buffer"],n)),!s||(_(e,s),i.nextTick(r,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var a=t.objectMode?1:r.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,a,r,i,s);return l}(this,s,a,e,t,n)),o},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||N(this,e))},j.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,n){n(new m("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=p.destroy,j.prototype._undestroy=p.undestroy,j.prototype._destroy=function(e,t){t(e)}},87906:function(e,t,n){"use strict";var r,i=n(5806);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(87288),a=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),p=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function f(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var n=e[h].read();null!==n&&(e[p]=null,e[a]=null,e[c]=null,t(f(n,!1)))}}function g(e){i.nextTick(m,e)}var v=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((s(r={get stream(){return this[h]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){i.nextTick((function(){e[l]?n(e[l]):t(f(void 0,!0))}))}));var n,r=this[p];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[d](n,r)}),r)}}(r,this));else{var s=this[h].read();if(null!==s)return Promise.resolve(f(s,!1));n=new Promise(this[d])}return this[p]=n,n}},Symbol.asyncIterator,(function(){return this})),s(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),v);e.exports=function(e){var t,n=Object.create(b,(s(t={},h,{value:e,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,l,{value:null,writable:!0}),s(t,u,{value:e._readableState.endEmitted,writable:!0}),s(t,d,{value:function(e,t){var r=n[h].read();r?(n[p]=null,n[a]=null,n[c]=null,e(f(r,!1))):(n[a]=e,n[c]=t)},writable:!0}),t));return n[p]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[c];return null!==t&&(n[p]=null,n[a]=null,n[c]=null,t(e)),void(n[l]=e)}var r=n[a];null!==r&&(n[p]=null,n[a]=null,n[c]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",g.bind(null,n)),n}},41500:function(e,t,n){"use strict";function r(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(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)}}var o=n(90778).Buffer,a=n(23833).inspect,c=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,l;return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],n&&s(t.prototype,n),l&&s(t,l),e}()},13537:function(e,t,n){"use strict";var r=n(5806);function i(e,t){o(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(o,this,e)):r.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(s,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t?(r.nextTick(s,n),t(e)):r.nextTick(s,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},87288:function(e,t,n){"use strict";var r=n(30997).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,s){if("function"==typeof n)return e(t,null,n);n||(n={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(s||i);var o=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||u()},l=t._writableState&&t._writableState.finished,u=function(){a=!1,l=!0,o||s.call(t)},p=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,p=!0,a||s.call(t)},h=function(e){s.call(t,e)},f=function(){var e;return o&&!p?(t._readableState&&t._readableState.ended||(e=new r),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new r),s.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",u),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",u),!1!==n.error&&t.on("error",h),t.on("close",f),function(){t.removeListener("complete",u),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",f)}}},67841:function(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},60519:function(e,t,n){"use strict";var r;var i=n(30997).q,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(87288)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var c=!1;return function(t){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}function l(e){e()}function u(e,t){return e.pipe(t)}function p(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=p(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1;return c(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(l),s||(o.forEach(l),i(r))}))}));return t.reduce(u)}},71199:function(e,t,n){"use strict";var r=n(30997).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var s=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?n:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},74756:function(e,t,n){e.exports=n(2571).EventEmitter},7130:function(e,t,n){(t=e.exports=n(20465)).Stream=t,t.Readable=t,t.Writable=n(48607),t.Duplex=n(95507),t.Transform=n(1866),t.PassThrough=n(15385),t.finished=n(87288),t.pipeline=n(60519)},53126:function(e,t){"use strict";function n(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var r=n();r.withExtraArgument=n,t.Z=r},74978:function(e,t,n){"use strict";n.d(t,{md:function(){return g},DE:function(){return p},UY:function(){return l},qC:function(){return m},MT:function(){return a}});var r=n(13488),i=(n(55246),function(){return Math.random().toString(36).substring(7).split("").join(".")}),s={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function a(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(a)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,l=t,u=[],p=u,d=!1;function h(){p===u&&(p=u.slice())}function f(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return h(),p.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,h();var n=p.indexOf(e);p.splice(n,1),u=null}}}function g(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,l=c(l,e)}finally{d=!1}for(var t=u=p,n=0;n<t.length;n++){(0,t[n])()}return e}function v(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=e,g({type:s.REPLACE})}function b(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[r.Z]=function(){return this},e}return g({type:s.INIT}),(i={dispatch:g,subscribe:m,getState:f,replaceReducer:v})[r.Z]=b,i}function c(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function l(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:s.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+s.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<a.length;s++){var l=a[s],u=n[l],p=e[l],d=u(p,t);if(void 0===d){var h=c(l,t);throw new Error(h)}i[l]=d,r=r||d!==p}return(r=r||a.length!==Object.keys(e).length)?i:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=u(i,t))}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(n,!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return f({},n,{dispatch:r=m.apply(void 0,s)(n.dispatch)})}}}},59149:function(e,t){"use strict";function n(e){return"/"===e.charAt(0)}function r(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}t.Z=function(e,t){void 0===t&&(t="");var i,s=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&n(e),c=t&&n(t),l=a||c;if(e&&n(e)?o=s:s.length&&(o.pop(),o=o.concat(s)),!o.length)return"/";if(o.length){var u=o[o.length-1];i="."===u||".."===u||""===u}else i=!1;for(var p=0,d=o.length;d>=0;d--){var h=o[d];"."===h?r(o,d):".."===h?(r(o,d),p++):p&&(r(o,d),p--)}if(!l)for(;p--;p)o.unshift("..");!l||""===o[0]||o[0]&&n(o[0])||o.unshift("");var f=o.join("/");return i&&"/"!==f.substr(-1)&&(f+="/"),f}},50601:function(e,t,n){"use strict";var r=n(90778).Buffer,i=n(59503),s=n(39302),o=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function f(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,i,s,o,a){return f(e+(t^n^r)+s+o|0,a)+i|0}function g(e,t,n,r,i,s,o,a){return f(e+(t&n|~t&r)+s+o|0,a)+i|0}function v(e,t,n,r,i,s,o,a){return f(e+((t|~n)^r)+s+o|0,a)+i|0}function b(e,t,n,r,i,s,o,a){return f(e+(t&r|n&~r)+s+o|0,a)+i|0}function y(e,t,n,r,i,s,o,a){return f(e+(t^(n|~r))+s+o|0,a)+i|0}i(h,s),h.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,s=0|this._d,h=0|this._e,k=0|this._a,w=0|this._b,_=0|this._c,E=0|this._d,C=0|this._e,j=0;j<80;j+=1){var S,M;j<16?(S=m(n,r,i,s,h,e[a[j]],p[0],l[j]),M=y(k,w,_,E,C,e[c[j]],d[0],u[j])):j<32?(S=g(n,r,i,s,h,e[a[j]],p[1],l[j]),M=b(k,w,_,E,C,e[c[j]],d[1],u[j])):j<48?(S=v(n,r,i,s,h,e[a[j]],p[2],l[j]),M=v(k,w,_,E,C,e[c[j]],d[2],u[j])):j<64?(S=b(n,r,i,s,h,e[a[j]],p[3],l[j]),M=g(k,w,_,E,C,e[c[j]],d[3],u[j])):(S=y(n,r,i,s,h,e[a[j]],p[4],l[j]),M=m(k,w,_,E,C,e[c[j]],d[4],u[j])),n=h,h=s,s=f(i,10),i=r,r=S,k=C,C=E,E=f(_,10),_=w,w=M}var N=this._b+i+E|0;this._b=this._c+s+C|0,this._c=this._d+h+k|0,this._d=this._e+n+w|0,this._e=this._a+r+_|0,this._a=N},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},37225:function(e,t,n){var r=n(90778),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},82923:function(e,t,n){"use strict";var r,i=n(5806),s=n(90778),o=s.Buffer,a={};for(r in s)s.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=s[r]);var c=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(c[r]=o[r]);if(a.Buffer.prototype=o.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),c.alloc||(c.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a},12023:function(e,t,n){var r=n(37225).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,s=e.length,o=this._len,a=0;a<s;){for(var c=o%i,l=Math.min(s-a,i-c),u=0;u<l;u++)n[c+u]=e[a+u];a+=l,(o+=l)%i==0&&this._update(n)}return this._len+=s,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var s=this._hash();return e?s.toString(e):s},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},25636:function(e,t,n){var r=e.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=n(83443),r.sha1=n(32798),r.sha224=n(47803),r.sha256=n(91772),r.sha384=n(43030),r.sha512=n(90566)},83443:function(e,t,n){var r=n(59503),i=n(12023),s=n(37225).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,p=0;p<16;++p)n[p]=e.readInt32BE(4*p);for(;p<80;++p)n[p]=n[p-3]^n[p-8]^n[p-14]^n[p-16];for(var d=0;d<80;++d){var h=~~(d/20),f=0|((t=r)<<5|t>>>27)+u(h,i,s,a)+c+n[d]+o[h];c=a,a=s,s=l(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},32798:function(e,t,n){var r=n(59503),i=n(12023),s=n(37225).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function p(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var f=~~(h/20),m=l(r)+p(f,i,s,a)+c+n[h]+o[f]|0;c=a,a=s,s=u(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},47803:function(e,t,n){var r=n(59503),i=n(91772),s=n(12023),o=n(37225).Buffer,a=new Array(64);function c(){this.init(),this._w=a,s.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},91772:function(e,t,n){var r=n(59503),i=n(12023),s=n(37225).Buffer,o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function p(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,f=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+h(n[v-15])+n[v-16];for(var b=0;b<64;++b){var y=g+d(c)+l(c,f,m)+o[b]+n[b]|0,k=p(r)+u(r,i,s)|0;g=m,m=f,f=c,c=a+y|0,a=s,s=i,i=r,r=y+k|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=f+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=s.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},43030:function(e,t,n){var r=n(59503),i=n(90566),s=n(12023),o=n(37225).Buffer,a=new Array(160);function c(){this.init(),this._w=a,s.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},90566:function(e,t,n){var r=n(59503),i=n(12023),s=n(37225).Buffer,o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function p(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,c=0|this._fh,b=0|this._gh,y=0|this._hh,k=0|this._al,w=0|this._bl,_=0|this._cl,E=0|this._dl,C=0|this._el,j=0|this._fl,S=0|this._gl,M=0|this._hl,N=0;N<32;N+=2)t[N]=e.readInt32BE(4*N),t[N+1]=e.readInt32BE(4*N+4);for(;N<160;N+=2){var x=t[N-30],A=t[N-30+1],O=h(x,A),T=f(A,x),P=m(x=t[N-4],A=t[N-4+1]),I=g(A,x),R=t[N-14],U=t[N-14+1],D=t[N-32],Z=t[N-32+1],L=T+U|0,z=O+R+v(L,T)|0;z=(z=z+P+v(L=L+I|0,I)|0)+D+v(L=L+Z|0,Z)|0,t[N]=z,t[N+1]=L}for(var B=0;B<160;B+=2){z=t[B],L=t[B+1];var F=u(n,r,i),V=u(k,w,_),q=p(n,k),H=p(k,n),W=d(a,C),J=d(C,a),$=o[B],K=o[B+1],G=l(a,c,b),Y=l(C,j,S),X=M+J|0,Q=y+W+v(X,M)|0;Q=(Q=(Q=Q+G+v(X=X+Y|0,Y)|0)+$+v(X=X+K|0,K)|0)+z+v(X=X+L|0,L)|0;var ee=H+V|0,te=q+F+v(ee,H)|0;y=b,M=S,b=c,S=j,c=a,j=C,a=s+Q+v(C=E+X|0,E)|0,s=i,E=_,i=r,_=w,r=n,w=k,n=Q+te+v(k=X+ee|0,X)|0}this._al=this._al+k|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+C|0,this._fl=this._fl+j|0,this._gl=this._gl+S|0,this._hl=this._hl+M|0,this._ah=this._ah+n+v(this._al,k)|0,this._bh=this._bh+r+v(this._bl,w)|0,this._ch=this._ch+i+v(this._cl,_)|0,this._dh=this._dh+s+v(this._dl,E)|0,this._eh=this._eh+a+v(this._el,C)|0,this._fh=this._fh+c+v(this._fl,j)|0,this._gh=this._gh+b+v(this._gl,S)|0,this._hh=this._hh+y+v(this._hl,M)|0},c.prototype._hash=function(){var e=s.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},62470: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)}t.Z=void 0;var i,s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,t&&t.set(e,n),n}(n(99196)),o=(i=n(11268))&&i.__esModule?i:{default:i};function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function c(){return c=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){function t(){return u(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,e);var n=h(t);return function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(t,[{key:"render",value:function(){var e,t=this.props,n=t.size,r=t.onClick,i=t.icon,o=t.className,a=l(t,["size","onClick","icon","className"]),u=["social-logo","social-logo-"+i,o].filter(Boolean).join(" ");switch(i){default:e=s.default.createElement("svg",c({height:n,width:n},a));break;case"amazon":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M13.582 8.182c-1.648.185-3.802.308-5.344.984-1.781.769-3.03 2.337-3.03 4.644 0 2.953 1.86 4.429 4.253 4.429 2.02 0 3.125-.477 4.685-2.065.516.747.685 1.109 1.629 1.894a.589.589 0 00.672-.066l.006.006c.567-.505 1.599-1.401 2.18-1.888.231-.188.19-.496.009-.754-.52-.718-1.072-1.303-1.072-2.634V8.305c0-1.876.133-3.599-1.249-4.891C15.23 2.369 13.422 2 12.04 2 9.336 2 6.318 3.01 5.686 6.351c-.068.355.191.542.423.594l2.754.298c.258-.013.445-.266.494-.523.236-1.151 1.2-1.706 2.284-1.706.584 0 1.249.215 1.595.738.398.584.346 1.384.346 2.061v.369zm-.533 5.906c-.451.8-1.169 1.291-1.967 1.291-1.09 0-1.728-.83-1.728-2.061 0-2.42 2.171-2.86 4.227-2.86v.615c.001 1.108.027 2.031-.532 3.015zm7.634 5.251C18.329 21.076 14.917 22 11.979 22c-4.118 0-7.826-1.522-10.632-4.057-.22-.199-.024-.471.241-.317 3.027 1.762 6.771 2.823 10.639 2.823 2.608 0 5.476-.541 8.115-1.66.397-.169.73.262.341.55zm.653 1.704c-.194.163-.379.076-.293-.139.284-.71.92-2.298.619-2.684-.301-.386-1.99-.183-2.749-.092-.23.027-.266-.173-.059-.319 1.348-.946 3.555-.673 3.811-.356.26.32-.066 2.533-1.329 3.59z"})));break;case"behance":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M7.799 5.698c.589 0 1.12.051 1.606.156.482.102.894.273 1.241.507.344.235.612.546.804.938.188.387.281.871.281 1.443 0 .619-.141 1.137-.421 1.551-.284.413-.7.751-1.255 1.014.756.218 1.317.601 1.689 1.146.374.549.557 1.205.557 1.975 0 .623-.12 1.161-.359 1.612a3.144 3.144 0 01-.973 1.114c-.408.288-.876.5-1.399.637A6.144 6.144 0 017.963 18H2V5.698h5.799m-.35 4.97c.481 0 .878-.114 1.192-.345.311-.228.463-.603.463-1.119 0-.286-.051-.523-.152-.707a1.123 1.123 0 00-.416-.427 1.733 1.733 0 00-.596-.216 3.616 3.616 0 00-.697-.06H4.709v2.874h2.74zm.151 5.237c.267 0 .521-.024.759-.077.243-.053.457-.137.637-.261.182-.12.332-.283.441-.491.11-.206.163-.474.163-.798 0-.633-.18-1.084-.533-1.357-.356-.27-.83-.404-1.413-.404H4.709v3.388H7.6zm8.562-.041c.367.358.897.538 1.583.538.493 0 .92-.125 1.277-.374.354-.248.571-.514.654-.79h2.155c-.347 1.072-.872 1.838-1.589 2.299-.708.463-1.572.693-2.58.693-.701 0-1.332-.113-1.899-.337a4.041 4.041 0 01-1.439-.958 4.364 4.364 0 01-.904-1.484 5.433 5.433 0 01-.32-1.899c0-.666.11-1.288.329-1.863a4.36 4.36 0 01.933-1.492c.406-.42.885-.751 1.444-.994a4.63 4.63 0 011.857-.363c.754 0 1.414.145 1.98.44a3.941 3.941 0 011.389 1.181 4.82 4.82 0 01.783 1.69c.16.632.217 1.292.171 1.983h-6.428c-.001.706.237 1.372.604 1.73m2.811-4.68c-.291-.321-.783-.496-1.384-.496-.39 0-.714.066-.973.2a1.972 1.972 0 00-.621.491 1.772 1.772 0 00-.328.628 2.695 2.695 0 00-.111.587h3.98c-.058-.625-.271-1.085-.563-1.41zm-3.916-3.446h4.985V6.524h-4.985v1.214z"})));break;case"blogger-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M19.779 9.904h-.981l-.021.001a1.163 1.163 0 01-1.16-1.079l-.001-.013A5.813 5.813 0 0011.803 3H8.871a5.813 5.813 0 00-5.813 5.813v6.375a5.813 5.813 0 005.813 5.813h6.257a5.814 5.814 0 005.813-5.813l.002-4.121a1.164 1.164 0 00-1.164-1.163zM8.726 7.713h3.291a1.117 1.117 0 110 2.234H8.726a1.117 1.117 0 110-2.234zm6.601 8.657H8.72a1.057 1.057 0 110-2.114h6.607a1.057 1.057 0 110 2.114z"})));break;case"blogger":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M14.722 14.019a.654.654 0 01-.654.654H9.977a.654.654 0 010-1.308h4.091c.361 0 .654.293.654.654zm-4.741-3.321h2.038a.692.692 0 000-1.384H9.981a.692.692 0 000 1.384zM21 5v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14a2 2 0 012 2zm-3.456 6.39a.72.72 0 00-.72-.72h-.607l-.013.001a.72.72 0 01-.718-.668l-.001-.008a3.599 3.599 0 00-3.599-3.599H10.07a3.599 3.599 0 00-3.599 3.599v3.947a3.6 3.6 0 003.599 3.599h3.874a3.599 3.599 0 003.599-3.599l.001-2.552z"})));break;case"codepen":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M22.016 8.84l-.007-.037c-.005-.025-.008-.048-.015-.072-.003-.015-.01-.028-.013-.042l-.023-.062-.02-.042a.391.391 0 00-.03-.057.357.357 0 00-.025-.038l-.035-.052-.03-.037c-.015-.017-.028-.032-.043-.045-.01-.012-.022-.023-.035-.035a.442.442 0 00-.048-.04l-.037-.03-.015-.012-9.161-6.096a.864.864 0 00-.955 0L2.359 8.237l-.015.012-.038.028-.048.04a.638.638 0 00-.078.082c-.012.013-.022.023-.03.037-.011.017-.025.035-.035.052a.498.498 0 01-.025.038c-.011.022-.021.039-.03.059a.39.39 0 01-.02.041 1.184 1.184 0 00-.034.106c-.007.023-.011.046-.016.071-.001.014-.005.025-.006.037a.73.73 0 00-.009.114v6.093c0 .037.003.075.008.112l.007.038c.005.023.008.047.015.072a.209.209 0 00.013.04c.007.022.013.042.022.063l.02.04a.4.4 0 00.055.096l.035.052.03.037a.603.603 0 00.042.045l.035.035c.015.013.032.028.048.04l.038.03.013.01 9.163 6.095a.858.858 0 00.959.004l9.163-6.095.015-.01c.013-.01.027-.02.037-.03a.534.534 0 00.048-.04c.013-.012.025-.023.035-.035.017-.015.03-.032.043-.045l.03-.037a.678.678 0 00.035-.052l.025-.038a.4.4 0 00.03-.058l.02-.04.023-.063c.003-.013.01-.027.013-.04.007-.025.01-.048.015-.072l.007-.037c.003-.042.007-.079.007-.117V8.954a.625.625 0 00-.008-.114zm-9.154-4.376l6.751 4.49-3.016 2.013-3.735-2.492V4.464zm-1.724 0v4.009l-3.735 2.494-3.014-2.013 6.749-4.49zm-7.439 6.098L5.853 12l-2.155 1.438v-2.876zm7.439 8.974l-6.749-4.491 3.015-2.011 3.735 2.492v4.01zM12 14.035L8.953 12 12 9.966 15.047 12 12 14.035zm.862 5.501v-4.009l3.735-2.492 3.016 2.011-6.751 4.49zm7.441-6.098L18.147 12l2.156-1.438v2.876z"})));break;case"dribbble":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10zm8.434-8.631c-.292-.092-2.644-.794-5.32-.365 1.117 3.07 1.572 5.57 1.659 6.09a8.56 8.56 0 003.661-5.725zm-5.098 6.507c-.127-.749-.623-3.361-1.822-6.477l-.056.019c-4.818 1.679-6.547 5.02-6.701 5.334A8.5 8.5 0 0012 20.555a8.488 8.488 0 003.336-.679zm-9.682-2.152c.193-.331 2.538-4.213 6.943-5.637.111-.036.224-.07.337-.102a29.017 29.017 0 00-.692-1.45c-4.266 1.277-8.405 1.223-8.778 1.216a8.497 8.497 0 002.19 5.973zm-2.015-7.46c.382.005 3.901.02 7.897-1.041a54.477 54.477 0 00-3.167-4.94 8.572 8.572 0 00-4.73 5.981zm6.359-6.555a45.7 45.7 0 013.187 5c3.037-1.138 4.323-2.867 4.477-3.085a8.508 8.508 0 00-7.664-1.915zm8.614 2.903c-.18.243-1.612 2.078-4.77 3.367a27.028 27.028 0 01.751 1.678c2.842-.357 5.666.215 5.948.275a8.503 8.503 0 00-1.929-5.32z"})));break;case"dropbox":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 6.134L6.069 9.797 2 6.54l5.883-3.843L12 6.134zm-10 6.92l5.883 3.843L12 13.459 6.069 9.797 2 13.054zm10 .405l4.116 3.439L22 13.054l-4.069-3.257L12 13.459zM22 6.54l-5.884-3.843L12 6.134l5.931 3.663L22 6.54zm-9.989 7.66l-4.129 3.426-1.767-1.153v1.291l5.896 3.539 5.897-3.539v-1.291l-1.769 1.153-4.128-3.426z"})));break;case"eventbrite":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M18.041 3.931L5.959 3A2.96 2.96 0 003 5.959v12.083A2.96 2.96 0 005.959 21l12.083-.931C19.699 19.983 21 18.744 21 17.11V6.89c0-1.634-1.259-2.863-2.959-2.959zM16.933 8.17c-.082.215-.192.432-.378.551-.188.122-.489.132-.799.132-1.521 0-3.062-.048-4.607-.048-.152.708-.304 1.416-.451 2.128.932-.004 1.873.005 2.81.005.726 0 1.462-.069 1.586.525.04.189-.001.426-.052.615-.105.38-.258.676-.625.783-.185.054-.408.058-.646.058-1.145 0-2.345.017-3.493.02-.169.772-.328 1.553-.489 2.333 1.57-.005 3.067-.041 4.633-.058.627-.007 1.085.194 1.009.85a2.17 2.17 0 01-.211.725c-.102.208-.248.376-.488.452-.237.075-.541.064-.862.078-.304.014-.614.008-.924.016-.309.009-.619.022-.919.022-1.253 0-2.429.08-3.683.073-.603-.004-1.014-.249-1.124-.757-.059-.273-.018-.58.036-.841a3542.51 3542.51 0 011.629-7.763c.056-.265.114-.511.225-.714a1.24 1.24 0 01.79-.62c.368-.099.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.621 0 1.17.073 1.245.614.039.288-.051.567-.132.783z",fillRule:"evenodd",clipRule:"evenodd"})));break;case"facebook":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("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.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"})));break;case"feed":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M2 8.667V12c5.515 0 10 4.485 10 10h3.333c0-7.363-5.97-13.333-13.333-13.333zM2 2v3.333c9.19 0 16.667 7.477 16.667 16.667H22C22 10.955 13.045 2 2 2zm2.5 15a2.5 2.5 0 100 5 2.5 2.5 0 000-5z"})));break;case"flickr":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})));break;case"foursquare":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M17.573 2H6.905C5.434 2 5 3.107 5 3.805v16.948c0 .785.422 1.077.66 1.172.238.097.892.177 1.285-.275 0 0 5.035-5.843 5.122-5.93.132-.132.132-.132.262-.132h3.26c1.368 0 1.588-.977 1.732-1.552.078-.318.692-3.428 1.225-6.122l.675-3.368C19.56 2.893 19.14 2 17.573 2zm-1.078 5.22c-.053.252-.372.518-.665.518h-4.157c-.467 0-.802.318-.802.787v.508c0 .467.337.798.805.798h3.528c.331 0 .655.362.583.715-.072.353-.407 2.102-.448 2.295-.04.193-.262.523-.655.523h-2.88c-.523 0-.683.068-1.033.503-.35.437-3.505 4.223-3.505 4.223-.032.035-.063.027-.063-.015V4.852c0-.298.26-.648.648-.648h8.562c.315 0 .61.297.528.683l-.446 2.333z"})));break;case"ghost":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M10.203 20.997H3.005v-3.599h7.198v3.599zm10.792-3.599h-7.193v3.599h7.193v-3.599zm.003-7.198H3v3.599h17.998V10.2zm-7.195-7.197H3.005v3.599h10.798V3.003zm7.197 0h-3.599v3.599H21V3.003z"})));break;case"github":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.419 2.865 8.166 6.839 9.489.5.09.682-.218.682-.484 0-.236-.009-.866-.014-1.699-2.782.602-3.369-1.34-3.369-1.34-.455-1.157-1.11-1.465-1.11-1.465-.909-.62.069-.608.069-.608 1.004.071 1.532 1.03 1.532 1.03.891 1.529 2.341 1.089 2.91.833.091-.647.349-1.086.635-1.337-2.22-.251-4.555-1.111-4.555-4.943 0-1.091.39-1.984 1.03-2.682-.103-.254-.447-1.27.097-2.646 0 0 .84-.269 2.75 1.025A9.548 9.548 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.748-1.025 2.748-1.025.546 1.376.202 2.394.1 2.646.64.699 1.026 1.591 1.026 2.682 0 3.841-2.337 4.687-4.565 4.935.359.307.679.917.679 1.852 0 1.335-.012 2.415-.012 2.741 0 .269.18.579.688.481A9.997 9.997 0 0022 12c0-5.523-4.477-10-10-10z"})));break;case"google-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-.05 16c-3.312 0-6-2.688-6-6s2.688-6 6-6c1.62 0 2.976.594 4.014 1.566L14.26 9.222c-.432-.408-1.188-.888-2.31-.888-1.986 0-3.606 1.65-3.606 3.672 0 2.022 1.62 3.672 3.606 3.672 2.298 0 3.144-1.59 3.3-2.532h-3.306v-2.238h5.616c.084.378.15.732.15 1.23 0 3.426-2.298 5.862-5.76 5.862z"})));break;case"google-plus-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M8 11h6.61c.06.35.11.7.11 1.16 0 4-2.68 6.84-6.72 6.84-3.87 0-7-3.13-7-7s3.13-7 7-7c1.89 0 3.47.69 4.69 1.83l-1.9 1.83c-.52-.5-1.43-1.08-2.79-1.08-2.39 0-4.34 1.98-4.34 4.42S5.61 16.42 8 16.42c2.77 0 3.81-1.99 3.97-3.02H8V11zm15 0h-2V9h-2v2h-2v2h2v2h2v-2h2"})));break;case"google-plus":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1.919 14.05a4.051 4.051 0 010-8.1c1.094 0 2.009.401 2.709 1.057l-1.15 1.118a2.229 2.229 0 00-1.559-.599c-1.341 0-2.434 1.114-2.434 2.479s1.094 2.479 2.434 2.479c1.551 0 2.122-1.073 2.227-1.709h-2.232v-1.511h3.791c.057.255.101.494.101.83.001 2.312-1.55 3.956-3.887 3.956zM19 12.75h-1.25V14h-1.5v-1.25H15v-1.5h1.25V10h1.5v1.25H19v1.5z"})));break;case"google":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("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"})));break;case"instagram":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 4.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.671.31.42.163.72.358 1.035.673.315.315.51.615.673 1.035.123.317.27.794.31 1.671.043.949.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671-.163.42-.358.72-.673 1.035-.315.315-.615.51-1.035.673-.317.123-.794.27-1.671.31-.949.043-1.233.052-3.637.052s-2.688-.009-3.637-.052c-.877-.04-1.354-.187-1.671-.31a2.786 2.786 0 01-1.035-.673 2.786 2.786 0 01-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.671.163-.42.358-.72.673-1.035.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.671-.31.949-.043 1.234-.052 3.637-.052M12 3c-2.444 0-2.751.01-3.711.054-.958.044-1.612.196-2.184.418a4.401 4.401 0 00-1.594 1.039c-.5.5-.808 1.002-1.038 1.594-.223.572-.375 1.226-.419 2.184C3.01 9.249 3 9.556 3 12s.01 2.751.054 3.711c.044.958.196 1.612.418 2.185.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.267.054 3.711.054s2.751-.01 3.711-.054c.958-.044 1.612-.196 2.185-.418a4.411 4.411 0 001.594-1.038c.5-.5.808-1.002 1.038-1.594.222-.572.375-1.227.418-2.185.044-.96.054-1.267.054-3.711s-.01-2.751-.054-3.711c-.044-.958-.196-1.612-.418-2.185A4.411 4.411 0 0019.49 4.51c-.5-.5-1.002-.808-1.594-1.038-.572-.222-1.227-.375-2.185-.418C14.751 3.01 14.444 3 12 3zm0 4.378a4.622 4.622 0 100 9.244 4.622 4.622 0 000-9.244zM12 15a3 3 0 110-6 3 3 0 010 6zm4.804-8.884a1.08 1.08 0 10.001 2.161 1.08 1.08 0 00-.001-2.161z"})));break;case"linkedin":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M19.7 3H4.3A1.3 1.3 0 003 4.3v15.4A1.3 1.3 0 004.3 21h15.4a1.3 1.3 0 001.3-1.3V4.3A1.3 1.3 0 0019.7 3zM8.339 18.338H5.667v-8.59h2.672v8.59zM7.004 8.574a1.548 1.548 0 11-.002-3.096 1.548 1.548 0 01.002 3.096zm11.335 9.764H15.67v-4.177c0-.996-.017-2.278-1.387-2.278-1.389 0-1.601 1.086-1.601 2.206v4.249h-2.667v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.779 3.203 4.092v4.711z"})));break;case"mail":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M20 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"medium-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M7.423 6c3.27 0 5.922 2.686 5.922 6s-2.651 6-5.922 6S1.5 15.313 1.5 12s2.652-6 5.923-6zm9.458.351c1.635 0 2.961 2.53 2.961 5.65 0 3.118-1.325 5.648-2.96 5.648-1.636 0-2.962-2.53-2.962-5.649s1.325-5.649 2.96-5.649zm4.577.589c.576 0 1.042 2.265 1.042 5.06 0 2.794-.466 5.06-1.042 5.06-.575 0-1.04-2.265-1.04-5.06 0-2.794.465-5.06 1.04-5.06z",fillRule:"nonzero"})));break;case"medium":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M3 3v18h18V3H3zm15 4.26l-1 .93a.28.28 0 00-.11.27v6.8a.27.27 0 00.11.27l.94.93v.2h-4.75v-.2l1-1c.09-.1.09-.12.09-.27V9.74l-2.71 6.9h-.37L8 9.74v4.62a.67.67 0 00.17.54l1.27 1.54v.2H5.86v-.2l1.27-1.54a.64.64 0 00.17-.54V9a.5.5 0 00-.16-.4L6 7.26v-.2h3.52L12.23 13l2.38-5.94H18v.2z"})));break;case"patreon":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s.default.createElement("g",null,s.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.975 5a5.05 5.05 0 00-5.041 5.046c0 2.774 2.261 5.03 5.04 5.03A5.034 5.034 0 0019 10.047C19 7.264 16.746 5 13.975 5zM5 18.44h2.461V5H5v13.44z"})));break;case"pinterest-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12.289 2C6.617 2 3.606 5.648 3.606 9.622c0 1.846 1.025 4.146 2.666 4.878.25.111.381.063.439-.169.044-.175.267-1.029.365-1.428a.365.365 0 00-.091-.362c-.54-.63-.975-1.791-.975-2.873 0-2.777 2.194-5.464 5.933-5.464 3.23 0 5.49 2.108 5.49 5.122 0 3.407-1.794 5.768-4.13 5.768-1.291 0-2.257-1.021-1.948-2.277.372-1.495 1.089-3.112 1.089-4.191 0-.967-.542-1.775-1.663-1.775-1.319 0-2.379 1.309-2.379 3.059 0 1.115.394 1.869.394 1.869s-1.302 5.279-1.54 6.261c-.405 1.666.053 4.368.094 4.604.021.126.167.169.25.063.129-.165 1.699-2.419 2.142-4.051.158-.59.817-2.995.817-2.995.43.784 1.681 1.446 3.013 1.446 3.963 0 6.822-3.494 6.822-7.833C20.394 5.112 16.849 2 12.289 2"})));break;case"pinterest":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.236 2.636 7.855 6.356 9.312-.087-.791-.166-2.005.035-2.869.182-.78 1.173-4.971 1.173-4.971s-.299-.599-.299-1.484c0-1.39.806-2.429 1.809-2.429.853 0 1.265.641 1.265 1.409 0 .858-.546 2.141-.828 3.329-.236.996.499 1.807 1.481 1.807 1.777 0 3.144-1.874 3.144-4.579 0-2.394-1.72-4.068-4.177-4.068-2.845 0-4.515 2.134-4.515 4.34 0 .859.331 1.781.744 2.282a.297.297 0 01.069.287c-.077.316-.246.995-.279 1.134-.044.183-.145.222-.334.134-1.249-.581-2.03-2.407-2.03-3.874 0-3.154 2.292-6.051 6.607-6.051 3.469 0 6.165 2.472 6.165 5.775 0 3.446-2.173 6.22-5.189 6.22-1.013 0-1.966-.526-2.292-1.148l-.623 2.377c-.226.869-.835 1.957-1.243 2.622.936.289 1.93.445 2.961.445 5.523 0 10-4.477 10-10S17.523 2 12 2z"})));break;case"pocket":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M21.927 4.194A1.82 1.82 0 0020.222 3H3.839a1.823 1.823 0 00-1.813 1.814v6.035l.069 1.2c.29 2.73 1.707 5.115 3.899 6.778l.119.089.025.018a9.897 9.897 0 003.91 1.727 10.06 10.06 0 004.049-.014.261.261 0 00.064-.023 9.906 9.906 0 003.753-1.691l.025-.018c.04-.029.08-.058.119-.089 2.192-1.664 3.609-4.049 3.898-6.778l.069-1.2V4.814a1.792 1.792 0 00-.098-.62zm-4.235 6.287l-4.704 4.512a1.372 1.372 0 01-1.898 0l-4.705-4.512a1.371 1.371 0 111.898-1.979l3.756 3.601 3.755-3.601a1.372 1.372 0 011.898 1.979z"})));break;case"polldaddy":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.487 2 2 6.487 2 12c0 5.514 4.487 10 10 10 5.514 0 10-4.486 10-10 0-5.513-4.486-10-10-10zm.991 1.68c2.361.084 4.657 1.251 6.197 3.136.283.334.541.693.774 1.067a7.775 7.775 0 00-6.094-2.94 7.764 7.764 0 00-5.896 2.703c-.006.003-.01.01-.016.014l-.152.159-.031.032a6.122 6.122 0 00-1.633 4.165 6.15 6.15 0 006.143 6.143c.57 0 1.123-.081 1.649-.227-1.849.839-4.131.747-5.926-.324-1.841-1.089-3.171-3.111-3.433-5.313A7.386 7.386 0 016.69 6.137C8.294 4.5 10.634 3.563 12.991 3.68zm3.373 8.519c-.049-2.024-1.587-3.889-3.544-4.174-1.927-.343-3.917.857-4.451 2.661a3.673 3.673 0 00.2 2.653c.39.8 1.067 1.451 1.894 1.759 1.664.654 3.63-.27 4.173-1.863.593-1.58-.396-3.423-1.94-3.776-1.52-.407-3.161.757-3.204 2.243a2.362 2.362 0 00.753 1.879c.501.476 1.23.667 1.871.529a2.067 2.067 0 001.469-1.134 1.912 1.912 0 00-.087-1.767c-.297-.513-.859-.863-1.429-.881a1.698 1.698 0 00-1.437.679 1.525 1.525 0 00-.18 1.489c.004.011.01.021.016.03.193.634.774 1.1 1.467 1.117a1.618 1.618 0 01-.97-.183c-.466-.244-.809-.747-.893-1.29a1.8 1.8 0 01.499-1.539 2.016 2.016 0 011.58-.606c.593.04 1.159.35 1.517.859.364.496.51 1.156.383 1.773-.116.62-.529 1.174-1.093 1.514a2.515 2.515 0 01-1.914.286c-.65-.161-1.226-.606-1.584-1.206a2.825 2.825 0 01-.341-2.031c.143-.7.573-1.321 1.176-1.753 1.193-.883 3.056-.751 4.106.411 1.106 1.1 1.327 3.027.406 4.371-.877 1.376-2.74 2.086-4.374 1.594-1.639-.449-2.913-2.079-3.031-3.853-.07-.884.13-1.797.583-2.577.445-.777 1.155-1.432 1.972-1.862 1.64-.88 3.816-.743 5.349.424 1.251.924 2.083 2.42 2.236 4.009l.001.03c0 2.9-2.359 5.26-5.26 5.26a5.216 5.216 0 01-1.947-.376 5.01 5.01 0 002.613-.079 4.955 4.955 0 002.514-1.751c.618-.828.95-1.861.901-2.869zM12 21.113c-5.024 0-9.111-4.087-9.111-9.113 0-4.789 3.713-8.723 8.411-9.081a6.548 6.548 0 00-.397.06c-2.644.453-5.017 2.106-6.32 4.409-1.309 2.301-1.391 5.19-.3 7.527 1.056 2.34 3.253 4.156 5.776 4.553 2.497.44 5.133-.483 6.787-2.301 1.719-1.797 2.269-4.529 1.486-6.796-.583-1.81-1.976-3.331-3.7-4.046 3.417.594 6.174 3.221 6.174 6.781 0 1.004-.241 2.02-.657 2.966-1.498 2.984-4.586 5.041-8.149 5.041z"})));break;case"print":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3a2 2 0 01-2 2H7a2 2 0 01-2-2v-3H2V9a2 2 0 012-2h1V5a2 2 0 012-2h10a2 2 0 012 2v2h1a2 2 0 012 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5a1.5 1.5 0 10-3.001.001A1.5 1.5 0 0020 10.5z"})));break;case"reddit":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M22 11.816a2.279 2.279 0 00-2.277-2.277c-.593 0-1.122.24-1.526.614-1.481-.965-3.455-1.594-5.647-1.69l1.171-3.702 3.18.748a1.878 1.878 0 001.876 1.862 1.88 1.88 0 001.877-1.878 1.88 1.88 0 00-1.877-1.877c-.769 0-1.431.466-1.72 1.13l-3.508-.826a.386.386 0 00-.46.261l-1.35 4.268c-2.316.038-4.411.67-5.97 1.671a2.24 2.24 0 00-1.492-.581A2.279 2.279 0 002 11.816c0 .814.433 1.523 1.078 1.925a4.056 4.056 0 00-.061.672c0 3.292 4.011 5.97 8.941 5.97s8.941-2.678 8.941-5.97c0-.214-.02-.424-.053-.632A2.259 2.259 0 0022 11.816zm-3.224-7.422a1.1 1.1 0 11-.001 2.199 1.1 1.1 0 01.001-2.199zM2.777 11.816c0-.827.672-1.5 1.499-1.5.313 0 .598.103.838.269-.851.676-1.477 1.479-1.812 2.36a1.482 1.482 0 01-.525-1.129zm9.182 7.79c-4.501 0-8.164-2.329-8.164-5.193S7.457 9.22 11.959 9.22s8.164 2.329 8.164 5.193-3.663 5.193-8.164 5.193zm8.677-6.605c-.326-.89-.948-1.701-1.797-2.384.248-.186.55-.301.883-.301.827 0 1.5.673 1.5 1.5.001.483-.23.911-.586 1.185zm-11.64 1.703c-.76 0-1.397-.616-1.397-1.376 0-.76.637-1.397 1.397-1.397s1.376.637 1.376 1.397-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.616 1.376-1.376 1.376-.76 0-1.399-.616-1.399-1.376 0-.76.639-1.397 1.399-1.397s1.376.637 1.376 1.397zm-1.172 3.38a.389.389 0 010 .55c-.674.674-1.727 1.002-3.219 1.002l-.011-.002-.011.002c-1.492 0-2.544-.328-3.218-1.002a.389.389 0 11.55-.55c.521.521 1.394.775 2.669.775l.011.002.011-.002c1.275 0 2.148-.253 2.669-.775a.387.387 0 01.549 0z"})));break;case"share":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M18 16c-.788 0-1.499.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118A2.981 2.981 0 0015 19a3 3 0 103-3z"})));break;case"skype":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M10.113 2.699l.1-.02c.033.017.066.033.098.051l-.198-.031zM2.72 10.223l-.017.103c.018.032.033.064.051.095l-.034-.198zm18.555 3.548c.007-.035.011-.071.018-.106-.018-.031-.033-.064-.052-.095l.034.201zm-7.712 7.428c.032.019.065.035.096.053l.105-.017-.201-.036zM22 16.386a5.55 5.55 0 01-1.637 3.953 5.548 5.548 0 01-3.953 1.637 5.575 5.575 0 01-2.75-.725l.105-.017-.202-.035c.032.019.065.035.096.053a9.524 9.524 0 01-1.654.147 9.375 9.375 0 01-3.676-.743 9.38 9.38 0 01-3.002-2.023 9.397 9.397 0 01-2.023-3.002 9.375 9.375 0 01-.743-3.676c0-.546.049-1.093.142-1.628.018.032.033.064.051.095l-.034-.199-.017.103A5.586 5.586 0 012 7.615c0-1.493.582-2.898 1.637-3.953A5.555 5.555 0 017.59 2.024c.915 0 1.818.228 2.622.655l-.1.02.199.031c-.032-.018-.066-.034-.098-.051l.004-.001a9.543 9.543 0 011.788-.169 9.41 9.41 0 016.678 2.766 9.4 9.4 0 012.024 3.002 9.375 9.375 0 01.743 3.676c0 .575-.054 1.15-.157 1.712-.018-.031-.033-.064-.052-.095l.034.201c.007-.035.011-.071.018-.106.461.829.707 1.767.707 2.721zm-5.183-2.248c0-1.331-.613-2.743-3.033-3.282l-2.209-.49c-.84-.192-1.807-.444-1.807-1.237 0-.794.679-1.348 1.903-1.348 2.468 0 2.243 1.696 3.468 1.696.645 0 1.209-.379 1.209-1.031 0-1.521-2.435-2.663-4.5-2.663-2.242 0-4.63.952-4.63 3.488 0 1.221.436 2.521 2.839 3.123l2.984.745c.903.223 1.129.731 1.129 1.189 0 .762-.758 1.507-2.129 1.507-2.679 0-2.307-2.062-3.743-2.062-.645 0-1.113.444-1.113 1.078 0 1.236 1.501 2.886 4.856 2.886 3.195 0 4.776-1.538 4.776-3.599z"})));break;case"spotify":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424a.622.622 0 01-.857.207c-2.348-1.435-5.304-1.76-8.785-.964a.622.622 0 11-.277-1.215c3.809-.871 7.077-.496 9.713 1.115a.623.623 0 01.206.857M17.81 13.7a.78.78 0 01-1.072.257c-2.687-1.652-6.785-2.131-9.965-1.166A.779.779 0 116.32 11.3c3.632-1.102 8.147-.568 11.234 1.328a.78.78 0 01.256 1.072m.105-2.835c-3.223-1.914-8.54-2.09-11.618-1.156a.935.935 0 11-.542-1.79c3.532-1.072 9.404-.865 13.115 1.338a.936.936 0 11-.955 1.608"})));break;case"squarespace":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M20.87 9.271a3.86 3.86 0 00-5.458 0l-6.141 6.141a.964.964 0 101.365 1.364l6.14-6.14a1.929 1.929 0 112.729 2.729l-6.022 6.022a1.929 1.929 0 002.729 0l4.658-4.658a3.86 3.86 0 000-5.458zm-2.047 2.047a.965.965 0 00-1.365 0l-6.14 6.14a1.929 1.929 0 01-2.729 0 .964.964 0 10-1.364 1.364 3.86 3.86 0 005.458 0l6.14-6.14a.966.966 0 000-1.364zm-2.047-6.141a3.858 3.858 0 00-5.458 0l-6.14 6.14a.964.964 0 101.364 1.364l6.141-6.14a1.929 1.929 0 012.729 0 .965.965 0 101.364-1.364zm-2.047 2.047a.964.964 0 00-1.364 0l-6.14 6.141a1.929 1.929 0 11-2.729-2.729l6.022-6.022a1.929 1.929 0 00-2.729 0L3.13 9.271a3.86 3.86 0 005.458 5.458l6.14-6.141a.963.963 0 00.001-1.364z"})));break;case"stumbleupon":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 4.294a4.471 4.471 0 00-4.471 4.471v6.353a1.059 1.059 0 11-2.118 0v-2.824H2v2.941a4.471 4.471 0 008.942 0v-6.47a1.059 1.059 0 112.118 0v1.294l1.412.647 2-.647V8.765A4.473 4.473 0 0012 4.294zm1.059 8.059v2.882a4.471 4.471 0 008.941 0v-2.824h-3.412v2.824a1.059 1.059 0 11-2.118 0v-2.882l-2 .647-1.411-.647z"})));break;case"telegram":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.08 14.757s-.25.625-.936.325l-2.541-1.949-1.63 1.486s-.127.096-.266.036c0 0-.12-.011-.27-.486-.15-.475-.911-2.972-.911-2.972L6 12.349s-.387-.137-.425-.438c-.037-.3.437-.462.437-.462l10.03-3.934s.824-.362.824.238l-1.786 9.004z"})));break;case"tiktok-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s.default.createElement("g",null,s.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 3a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2H5zm9.584 3h-2.052l.019 8.128a1.73 1.73 0 11-1.215-1.65v-2.084h-.533a3.804 3.804 0 103.803 3.803l-.022-4.207c1.268.968 2.85.869 2.85.869V8.82C14.47 8.636 14.584 6 14.584 6z"})));break;case"tiktok":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12.22 2h3.42s-.19 4.394 4.75 4.702v3.396s-2.636.166-4.75-1.448l.037 7.011a6.338 6.338 0 11-6.34-6.338h.89v3.472a2.882 2.882 0 102.024 2.752L12.22 2z"})));break;case"tumblr-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M16.749 17.396c-.357.17-1.041.319-1.551.332-1.539.041-1.837-1.081-1.85-1.896V9.847h3.861v-2.91h-3.847V2.039h-2.817c-.046 0-.127.041-.138.144-.165 1.499-.867 4.13-3.783 5.181v2.484h1.945v6.282c0 2.151 1.587 5.206 5.775 5.135 1.413-.024 2.982-.616 3.329-1.126l-.924-2.743z"})));break;case"tumblr":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.569 14.265c-2.446.042-3.372-1.742-3.372-2.998v-3.668H8.923v-1.45c1.703-.614 2.113-2.15 2.209-3.025.007-.06.054-.084.081-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.131 1.081 1.107.298-.008.697-.094.906-.194l.54 1.601c-.205.296-1.121.641-1.946.656z"})));break;case"twitch":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M16.499 8.089h-1.636v4.91h1.636v-4.91zm-4.499 0h-1.637v4.91H12v-4.91zM4.228 3.178L3 6.451v13.092h4.499V22h2.456l2.454-2.456h3.681L21 14.636V3.178H4.228zm15.136 10.638L16.5 16.681H12l-2.453 2.453V16.68H5.863V4.814h13.501v9.002z"})));break;case"twitter-alt":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M22.23 5.924a8.212 8.212 0 01-2.357.646 4.115 4.115 0 001.804-2.27 8.221 8.221 0 01-2.606.996 4.103 4.103 0 00-6.991 3.742 11.647 11.647 0 01-8.457-4.287 4.087 4.087 0 00-.556 2.063 4.1 4.1 0 001.825 3.415 4.09 4.09 0 01-1.859-.513v.052a4.104 4.104 0 003.292 4.023 4.099 4.099 0 01-1.853.07 4.11 4.11 0 003.833 2.85 8.236 8.236 0 01-5.096 1.756 8.33 8.33 0 01-.979-.057 11.617 11.617 0 006.29 1.843c7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.531a8.298 8.298 0 002.047-2.123z"})));break;case"twitter":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-2.534 6.71c.004.099.007.198.007.298 0 3.045-2.318 6.556-6.556 6.556a6.52 6.52 0 01-3.532-1.035 4.626 4.626 0 003.412-.954 2.307 2.307 0 01-2.152-1.6 2.295 2.295 0 001.04-.04 2.306 2.306 0 01-1.848-2.259v-.029c.311.173.666.276 1.044.288a2.303 2.303 0 01-.713-3.076 6.54 6.54 0 004.749 2.407 2.305 2.305 0 013.926-2.101 4.602 4.602 0 001.463-.559 2.31 2.31 0 01-1.013 1.275c.466-.056.91-.18 1.323-.363-.31.461-.7.867-1.15 1.192z"})));break;case"vimeo":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M22.396 7.164c-.093 2.026-1.507 4.799-4.245 8.32C15.322 19.161 12.928 21 10.97 21c-1.214 0-2.24-1.119-3.079-3.359l-1.68-6.159c-.623-2.239-1.29-3.36-2.005-3.36-.156 0-.701.328-1.634.98l-.978-1.261c1.027-.902 2.04-1.805 3.037-2.708C6.001 3.95 7.03 3.327 7.715 3.264c1.619-.156 2.616.951 2.99 3.321.404 2.557.685 4.147.841 4.769.467 2.121.981 3.181 1.542 3.181.435 0 1.09-.688 1.963-2.065.871-1.376 1.338-2.422 1.401-3.142.125-1.187-.343-1.782-1.401-1.782-.498 0-1.012.115-1.541.341 1.023-3.35 2.977-4.977 5.862-4.884 2.139.063 3.148 1.45 3.024 4.161z"})));break;case"whatsapp":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M2.048 22l1.406-5.136a9.894 9.894 0 01-1.323-4.955C2.133 6.446 6.579 2 12.042 2a9.848 9.848 0 017.011 2.906 9.85 9.85 0 012.9 7.011c-.002 5.464-4.448 9.91-9.91 9.91h-.004a9.913 9.913 0 01-4.736-1.206L2.048 22zm5.497-3.172l.301.179a8.214 8.214 0 004.193 1.148h.003c4.54 0 8.235-3.695 8.237-8.237a8.189 8.189 0 00-2.41-5.828 8.182 8.182 0 00-5.824-2.416c-4.544 0-8.239 3.695-8.241 8.237a8.222 8.222 0 001.259 4.384l.196.312-.832 3.04 3.118-.819zm9.49-4.554c-.062-.103-.227-.165-.475-.289-.248-.124-1.465-.723-1.692-.806-.227-.083-.392-.124-.557.124-.165.248-.64.806-.784.971-.144.165-.289.186-.536.062-.248-.124-1.046-.385-1.991-1.229-.736-.657-1.233-1.468-1.378-1.715-.144-.248-.015-.382.109-.505.111-.111.248-.289.371-.434.124-.145.165-.248.248-.413.083-.165.041-.31-.021-.434s-.557-1.343-.763-1.839c-.202-.483-.407-.417-.559-.425-.144-.007-.31-.009-.475-.009a.91.91 0 00-.66.31c-.226.248-.866.847-.866 2.066 0 1.219.887 2.396 1.011 2.562.124.165 1.746 2.666 4.23 3.739.591.255 1.052.408 1.412.522.593.189 1.133.162 1.56.098.476-.071 1.465-.599 1.671-1.177.206-.58.206-1.075.145-1.179z"})));break;case"woocommerce":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M19 2H5C3.3 2 2 3.3 2 5v11c0 1.7 1.3 3 3 3h4l6 3-1-3h5c1.7 0 3-1.3 3-3V5c0-1.7-1.3-3-3-3zm-1.6 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7s-.3.4-.6.4-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6s0 .4-.1.5z"})));break;case"wordpress":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12.158 12.786L9.46 20.625a8.984 8.984 0 005.526-.144.852.852 0 01-.065-.124l-2.763-7.571zM3.009 12a8.993 8.993 0 005.067 8.092L3.788 8.341A8.952 8.952 0 003.009 12zm15.06-.454c0-1.112-.399-1.881-.741-2.48-.456-.741-.883-1.368-.883-2.109 0-.826.627-1.596 1.51-1.596.04 0 .078.005.116.007A8.963 8.963 0 0012 3.009a8.982 8.982 0 00-7.512 4.052c.211.007.41.011.579.011.94 0 2.396-.114 2.396-.114.484-.028.541.684.057.741 0 0-.487.057-1.029.085l3.274 9.739 1.968-5.901-1.401-3.838c-.484-.028-.943-.085-.943-.085-.485-.029-.428-.769.057-.741 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.485-.028.542.684.057.741 0 0-.488.057-1.029.085l3.249 9.665.897-2.996c.456-1.169.684-2.137.684-2.907zm1.82-3.86c.039.286.06.593.06.924 0 .912-.171 1.938-.684 3.22l-2.746 7.94a8.984 8.984 0 004.47-7.771 8.922 8.922 0 00-1.1-4.313zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})));break;case"xanga":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M9 9h6v6H9V9zM3 9h6V3H3v6zm12 0h6V3h-6v6zm0 12h6v-6h-6v6zM3 21h6v-6H3v6z"})));break;case"youtube":e=s.default.createElement("svg",c({className:u,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M21.8 8.001s-.195-1.378-.795-1.985c-.76-.797-1.613-.801-2.004-.847-2.799-.202-6.997-.202-6.997-.202h-.009s-4.198 0-6.997.202c-.39.047-1.242.051-2.003.847-.6.607-.795 1.985-.795 1.985S2 9.62 2 11.238v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.761.797 1.76.771 2.205.855 1.6.153 6.8.201 6.8.201s4.203-.006 7.001-.209c.391-.047 1.243-.051 2.004-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517c0-1.618-.2-3.237-.2-3.237zM9.935 14.594l-.001-5.62 5.404 2.82-5.403 2.8z"})))}return e}}]),t}(s.PureComponent);t.Z=v,g(v,"defaultProps",{size:24}),g(v,"propTypes",{icon:o.default.string.isRequired,size:o.default.number,onClick:o.default.func,className:o.default.string})},81717:function(e,t,n){e.exports=i;var r=n(2571).EventEmitter;function i(){r.call(this)}n(59503)(i,r),i.Readable=n(20465),i.Writable=n(48607),i.Duplex=n(95507),i.Transform=n(1866),i.PassThrough=n(15385),i.finished=n(87288),i.pipeline=n(60519),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",c));var o=!1;function a(){o||(o=!0,e.end())}function c(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",s),n.removeListener("end",a),n.removeListener("close",c),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},3247:function(e,t,n){"use strict";var r=n(37225).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=p,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},13488:function(e,t,n){"use strict";var r,i=n(32752);e=n.hmd(e),r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:e;var s=(0,i.Z)(r);t.Z=s},32752:function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,{Z:function(){return r}})},90136:function(e,t,n){"use strict";n.d(t,{EB:function(){return g},ht:function(){return f}});var r=n(55246),i=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],s=i.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(s));return t&&o.call(e,s)&&r.unshift(e),r=r.filter(n)},c=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:"AUDIO"!==e.nodeName&&"VIDEO"!==e.nodeName&&"DETAILS"!==e.nodeName||null!==e.getAttribute("tabindex")?e.tabIndex:0:t},l=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},u=function(e){return"INPUT"===e.tagName},p=function(e){return function(e){return u(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||e.ownerDocument,i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return r.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var s=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!s||s===e}(e)},d=function(e,t){return!(t.disabled||function(e){return u(e)&&"hidden"===e.type}(t)||function(e,t){if("hidden"===getComputedStyle(e).visibility)return!0;var n=o.call(e,"details>summary:first-of-type")?e.parentElement:e;if(o.call(n,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var r=e.getBoundingClientRect(),i=r.width,s=r.height;return 0===i&&0===s}}else for(;e;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(t,e.displayCheck)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(u(e)||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||"BUTTON"===e.tagName)for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},h=function(e,t){return!(!d(e,t)||p(t)||c(t)<0)},f=function(e,t){var n=[],r=[];return a(e,(t=t||{}).includeContainer,h.bind(null,t)).forEach((function(e,t){var i=c(e);0===i?n.push(e):r.push({documentOrder:t,tabIndex:i,node:e})})),r.sort(l).map((function(e){return e.node})).concat(n)},m=i.concat("iframe").join(","),g=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,m)&&d(t,e)}},44780:function(e,t,n){"use strict";var r=n(74579),i=n.n(r),s=n(92819);const o=i()("dops:analytics");let a,c;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,t,n){l.setUser(e,t),l.setSuperProps(n),l.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){c={ID:e,username:t}},setSuperProps:function(e){a=e},assignSuperProps:function(e){a=(0,s.assign)(a,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]);o("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);l.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]);o("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Built stat "%s" in group "%s"',t,e);return n}(e,t);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){l.tracks.recordPageView(e),l.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,i,s,o){l.ga.recordPurchase(e,t,n,r,i,s,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(a&&(o("- Super Props: %o",a),t=(0,s.assign)(t,a)),o('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){o("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(c&&(e={userId:"u-"+c.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,t){l.ga.initialize(),o("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){l.ga.initialize();let i="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(i+=" [Option Label: "+n+"]"),void 0!==r&&(i+=" [Option Value: "+r+"]"),o(i),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,i,s,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:i,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){c&&window._tkq.push(["identifyUser",c.ID,c.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=l},94902:function(e,t,n){"use strict";var r=n(92819),i=n(96483),s=n(35513);function o(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const a=o("JsonParseError"),c=o("JsonParseAfterRedirectError"),l=o("Api404Error"),u=o("Api404AfterRedirectError"),p=o("FetchNetworkError");const d=new function(e,t){let n=e,o={"X-WP-Nonce":t},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},o,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setApiNonce(e){o={"X-WP-Nonce":e},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},o,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const r={registration_nonce:e,no_iframe:!0};return(0,s.jetpackConfigHas)("consumer_slug")&&(r.plugin_slug=(0,s.jetpackConfigGet)("consumer_slug")),null!==t&&(r.redirect_uri=t),d(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(r)}).then(h).then(f)},fetchAuthorizationUrl:e=>p((0,i.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),a).then(h).then(f),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,a).then(f),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,a).then(f),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,a).then(h).then(f),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,a).then(f),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,a).then(h).then(f),updateUserTrackingSettings:e=>d(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(h).then(f),disconnectSite:()=>d(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(h).then(f),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,a).then(h).then(f),unlinkUser:()=>d(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(h).then(f),reconnect:()=>d(`${n}jetpack/v4/connection/reconnect`,c).then(h).then(f),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,a).then(h).then(f),setHasSeenWCConnectionModal:()=>d(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(h).then(f),fetchModules:()=>p(`${n}jetpack/v4/module/all`,a).then(h).then(f),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,a).then(h).then(f),activateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(h).then(f),deactivateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>d(`${n}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(h).then(f),updateSettings:e=>d(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(h).then(f),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,a).then(h).then(f),resetOptions:e=>d(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(h).then(f),activateVaultPress:()=>d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(h).then(f),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,a).then(h).then(f),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(r)}).then(h).then(f)},activateAkismet:()=>d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(h).then(f),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,a).then(h).then(f),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,a).then(h).then(f),checkAkismetKeyTyped:e=>d(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(h).then(f),fetchStatsData:e=>p(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),a).then(h).then(f).then(m),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,a).then(h).then(f),getPlans:()=>p(`${n}jetpack/v4/plans`,a).then(h).then(f),fetchSettings:()=>p(`${n}jetpack/v4/settings`,a).then(h).then(f),updateSetting:e=>d(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(h).then(f),fetchSiteData:()=>p(`${n}jetpack/v4/site`,a).then(h).then(f).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,a).then(h).then(f).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,a).then(h).then(f),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,a).then(h).then(f).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,a).then(h).then(f).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,a).then(h).then(f).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,a).then(h).then(f),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,a).then(h).then(f),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,a).then(h).then(f),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,a).then(h).then(f),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,a).then(h).then(f),saveRecommendationsData:e=>d(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(h),fetchProducts:()=>p(`${n}jetpack/v4/products`,a).then(h).then(f),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,a).then(h).then(f).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,a).then(h).then(f).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>d(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(h).then(f),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,a).then(h).then(f),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,a).then(h).then(f),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,a).then(h).then(f),verifySiteGoogle:e=>d(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(h).then(f),sendMobileLoginEmail:()=>d(`${n}jetpack/v4/mobile/send-login-email`,c).then(h).then(f),submitSurvey:e=>d(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(h).then(f),saveSetupQuestionnaire:e=>d(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(h).then(f),updateLicensingError:e=>d(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(h).then(f),updateLicenseKey:e=>d(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(h).then(f),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,a).then(h).then(f),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,a).then(h).then(f),updateLicensingActivationNoticeDismiss:e=>d(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(h).then(f),updateRecommendationsStep:e=>d(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(h),confirmIDCSafeMode:()=>d(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(h),startIDCFresh:e=>d(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(h).then(f),migrateIDC:()=>d(`${n}jetpack/v4/identity-crisis/migrate`,c).then(h),attachLicenses:e=>d(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(h).then(f),fetchSearchPlanInfo:()=>p(`${n}jetpack/v4/search/plan`,a).then(h).then(f),fetchSearchSettings:()=>p(`${n}jetpack/v4/search/settings`,a).then(h).then(f),updateSearchSettings:e=>d(`${n}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(h).then(f),fetchSearchStats:()=>p(`${n}jetpack/v4/search/stats`,a).then(h).then(f),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,a).then(h).then(f),updateWordAdsSettings:e=>d(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${n}jetpack/v4/search/pricing`,a).then(h).then(f)};function p(e,t){return fetch(l(e),t)}function d(e,t,n){return fetch(e,(0,r.assign)({},t,n)).catch(g)}function m(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,r.assign)(this,u)};function h(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new u(e.redirected):new l})):e.json().catch((e=>m(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function f(e){return e.json().catch((t=>m(t,e.redirected,e.url)))}function m(e,t,n){throw t?new c(n):new a}function g(){throw new p}t.ZP=d},24731:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(65736),o=n(55609),a=n(23698),c=n.n(a);n(78413);const __=s.__,l=e=>{const{label:t,onClick:n,isLoading:r,displayError:s,errorMessage:a}=e;return i().createElement("div",{className:"jp-action-button"},i().createElement(o.Button,{className:"jp-action-button--button",label:t,onClick:n,variant:"primary",disabled:r},r?i().createElement(o.Spinner,null):t),s&&i().createElement("p",{className:"jp-action-button__error"},a))};l.propTypes={label:c().string.isRequired,onClick:c().func,isLoading:c().bool,displayError:c().bool,errorMessage:c().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack")},t.Z=l},89348:function(e,t,n){"use strict";var r=n(3779),i=n.n(r),s=n(99196),o=n.n(s),a=n(89105),c=n.n(a),l=n(65736),u=n(23698),p=n.n(u);const __=l.__,d=e=>{const{title:t,height:n,className:r,...s}=e;return o().createElement("svg",i()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:c()("jp-automattic-byline-logo",r)},s),o().createElement("title",{id:"jp-automattic-byline-logo-title"},t),o().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),o().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),o().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};d.defaultProps={title:__("An Automattic Airline","jetpack"),height:7,className:""},d.propTypes={title:p().string,height:p().number,className:p().string},t.Z=d},5446:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s);n(31993);const a=e=>{const{format:t,icon:n,imageUrl:r}=e;return i().createElement("div",{className:"jp-components__decorative-card "+(t?"jp-components__decorative-card--"+t:"")},i().createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:r?`url( ${r} )`:""}}),i().createElement("div",{className:"jp-components__decorative-card__content"},i().createElement("div",{className:"jp-components__decorative-card__lines"})),(()=>{if(n)return i().createElement("div",{className:"jp-components__decorative-card__icon-container"},i().createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+n}))})())};a.propTypes={format:o().oneOf(["horizontal","vertical"]),icon:o().oneOf(["unlink"]),imageUrl:o().string},a.defaultProps={format:"horizontal"},t.Z=a},5884:function(e,t,n){"use strict";var r=n(3779),i=n.n(r),s=n(99196),o=n.n(s),a=n(65736),c=n(89105),l=n.n(c),u=n(23698),p=n.n(u),d=n(89348),h=(n(8724),n(62309));const __=a.__,f=e=>{const{a8cLogoHref:t,moduleName:n,className:r,moduleNameHref:s,...a}=e;return o().createElement("div",i()({className:l()("jp-dashboard-footer",r)},a),o().createElement("div",{className:"jp-dashboard-footer__footer-left"},o().createElement(h.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack")}),o().createElement("span",{className:"jp-dashboard-footer__module-name"},s?o().createElement("a",{href:s,"aria-label":n},n):n)),o().createElement("div",{className:"jp-dashboard-footer__footer-right"},o().createElement("a",{href:t,"aria-label":__("An Automattic Airline","jetpack")},o().createElement(d.Z,null))))};f.defaultProps={a8cLogoHref:"https://automattic.com",moduleName:__("Jetpack","jetpack"),className:"",moduleNameHref:"https://jetpack.com"},f.propTypes={a8cLogoHref:p().string,moduleName:p().string,className:p().string,moduleNameHref:p().string},t.Z=f},62309:function(e,t,n){"use strict";var r=n(3779),i=n.n(r),s=n(64140),o=n.n(s),a=n(23698),c=n.n(a),l=n(99196),u=n.n(l),p=n(89105),d=n.n(p),h=n(65736);const __=h.__;class f extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,s=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",i()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:s,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(l.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"})))}}o()(f,"propTypes",{className:c().string,width:c().number,height:c().number,showText:c().bool,logoColor:c().string}),o()(f,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=f},23962:function(e,t,n){"use strict";var r=n(59692);t.Z=e=>{const t=(0,r.X)();return new Intl.NumberFormat(t).format(e)}},83906:function(e,t,n){"use strict";var r=n(99196),i=n.n(r);n(90307);t.Z=e=>{let{totalCount:t,items:n=[]}=e;const s=(0,r.useMemo)((()=>t||n.reduce(((e,t)=>{let{count:n}=t;return e+n}),0)),[n,t]);return i().createElement("div",{className:"record-meter-bar"},i().createElement("div",{className:"record-meter-bar__items"},n.map((e=>{let{count:t,label:n,backgroundColor:r}=e;const o=(t/s*100).toPrecision(2);return i().createElement("div",{key:n,style:{backgroundColor:r,flexBasis:`${o}%`}})}))),i().createElement("div",{className:"record-meter-bar__legend"},i().createElement("ul",{className:"record-meter-bar__legend--items"},n.map((e=>{let{count:t,label:n,backgroundColor:r}=e;return i().createElement("li",{key:n,className:"record-meter-bar__legend--item"},i().createElement("div",{className:"record-meter-bar__legend--item-circle",style:{backgroundColor:r}}),i().createElement("span",{className:"record-meter-bar__legend--item-count"},t),i().createElement("span",{className:"record-meter-bar__legend--item-label"},n))})))))}},19202:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s);n(54339);const a=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return i().createElement("div",{className:t},i().createElement("div",{className:"jp-components-spinner__outer",style:n},i().createElement("div",{className:"jp-components-spinner__inner",style:r})))};a.propTypes={color:o().string,className:o().string,size:o().number},a.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=a},59692:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var r=n(69771);const i=()=>{var e,t,n,i;const{l10n:{locale:s}}=(0,r.__experimentalGetSettings)();if(s)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(s);return null!==(e=null===(t=window)||void 0===t||null===(n=t.window)||void 0===n||null===(i=n.navigator)||void 0===i?void 0:i.language)&&void 0!==e?e:"en-US"}},52104: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 i;"undefined"!=typeof window&&(r=null===(i=window.Initial_State)||void 0===i?void 0:i.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 s=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+s}n.d(t,{Z:function(){return r}})},35513:function(e,t,n){var r=n(55246);let i={};try{i=n(92787)}catch{r.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),i={missingConfig:!0}}const s=e=>i.hasOwnProperty(e);e.exports={jetpackConfigHas:s,jetpackConfigGet:e=>{if(!s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return i[e]}}},39078:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=n(24731),l=n(83843);const __=a.__,u=e=>{const{apiRoot:t,apiNonce:n,connectLabel:r,registrationNonce:s,redirectUri:o,from:a,autoTrigger:u}=e,{handleRegisterSite:p,isRegistered:d,isUserConnected:h,siteIsRegistering:f,userIsConnecting:m,registrationError:g}=(0,l.Z)({registrationNonce:s,redirectUri:o,apiRoot:t,apiNonce:n,autoTrigger:u,from:a});return i().createElement(i().Fragment,null,(!d||!h)&&i().createElement(c.Z,{label:r,onClick:p,displayError:!!g,isLoading:f||m}))};u.propTypes={connectLabel:o().string,apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,from:o().string,redirectUri:o().string.isRequired,registrationNonce:o().string.isRequired,autoTrigger:o().bool},u.defaultProps={connectLabel:__("Connect","jetpack"),redirectUri:null,autoTrigger:!1},t.Z=u},86756:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=n(93471),l=n(83843);const __=a.__,u=e=>{const{title:t,buttonLabel:n,apiRoot:r,apiNonce:s,registrationNonce:o,from:a,redirectUri:u,images:p,children:d,assetBaseUrl:h,autoTrigger:f,footer:m,skipUserConnection:g}=e,{handleRegisterSite:v,isRegistered:b,isUserConnected:y,siteIsRegistering:k,userIsConnecting:w,registrationError:_}=(0,l.Z)({registrationNonce:o,redirectUri:u,apiRoot:r,apiNonce:s,autoTrigger:f,from:a,skipUserConnection:g}),E=!b||!y,C=Boolean(_),j=k||w;return i().createElement(c.Z,{title:t,images:p,assetBaseUrl:h,showConnectButton:E,buttonLabel:n,handleButtonClick:v,displayButtonError:C,buttonIsLoading:j,footer:m},d)};u.propTypes={title:o().string,buttonLabel:o().string,apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,registrationNonce:o().string.isRequired,from:o().string,redirectUri:o().string.isRequired,autoTrigger:o().bool,images:o().arrayOf(o().string),assetBaseUrl:o().string,skipUserConnection:o().bool},u.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack"),buttonLabel:__("Set up Jetpack","jetpack"),images:[],redirectUri:null,autoTrigger:!1,skipUserConnection:!1},t.Z=u},93471:function(e,t,n){"use strict";n.d(t,{E:function(){return d}});var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=n(52104),l=n(24731),u=n(69307),p=n(29078);n(57090);const __=a.__,d=(0,u.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack"),{tosLink:i().createElement("a",{href:(0,c.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:i().createElement("a",{href:(0,c.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),h=e=>{const{title:t,images:n,children:r,assetBaseUrl:s,isLoading:o,showConnectButton:a,buttonLabel:c,handleButtonClick:u,displayButtonError:h,buttonIsLoading:f,footer:m}=e;return i().createElement(p.Z,{title:t,assetBaseUrl:s,images:n,className:"jp-connection__connect-screen"+(o?" jp-connection__connect-screen__loading":"")},i().createElement("div",{className:"jp-connection__connect-screen__content"},r,a&&i().createElement(i().Fragment,null,i().createElement(l.Z,{label:c,onClick:u,displayError:h,isLoading:f}),i().createElement("div",{className:"jp-connection__connect-screen__tos"},d)),m&&i().createElement("div",{className:"jp-connection__connect-screen__footer"},m)))};h.propTypes={title:o().string,images:o().arrayOf(o().string),assetBaseUrl:o().string,isLoading:o().bool,showConnectButton:o().bool,buttonLabel:o().string.isRequired,handleButtonClick:o().func,displayButtonError:o().bool,buttonIsLoading:o().bool,footer:o().node},h.defaultProps={showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{},footer:null},t.Z=h},80491:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s);const a=e=>{const{images:t,assetBaseUrl:n}=e;if(!t.length)return null;const r=t.map(((e,t)=>i().createElement(i().Fragment,{key:t},i().createElement("img",{src:n+e,alt:""}))));return i().createElement("div",{className:"jp-connection__connect-screen__image-slider"},r)};a.propTypes={images:o().arrayOf(o().string).isRequired,assetBaseUrl:o().string},a.defaultProps={assetBaseUrl:""},t.Z=a},29078:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(62309),c=n(80491);n(51446);const l=e=>{const{title:t,children:n,className:r,assetBaseUrl:s,images:o}=e,l=null==o?void 0:o.length;return i().createElement("div",{className:"jp-connection__connect-screen-layout"+(l?" jp-connection__connect-screen-layout__two-columns":"")+(r?" "+r:"")},i().createElement("div",{className:"jp-connection__connect-screen-layout__left"},i().createElement(a.Z,null),i().createElement("h2",null,t),n),l?i().createElement("div",{className:"jp-connection__connect-screen-layout__right"},i().createElement(c.Z,{images:o,assetBaseUrl:s})):null)};l.propTypes={title:o().string,className:o().string,images:o().arrayOf(o().string),assetBaseUrl:o().string},t.Z=l},75855:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=n(92463);const __=a.__,l=e=>{const{connectedPlugins:t,disconnectingPlugin:n}=e,s=(0,r.useMemo)((()=>{if(t){return Object.keys(t).map((e=>Object.assign({slug:e},t[e]))).filter((e=>n!==e.slug))}return[]}),[t,n]);return t&&s.length>0?i().createElement(i().Fragment,null,i().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack"))),i().createElement("div",{className:"jp-connection__disconnect-card__group"},s.map((e=>i().createElement(c.Z,{title:e.name,key:e.slug}))))):null};l.propTypes={connectedPlugins:o().array,disconnectingPlugin:o().string},t.Z=l},92463:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s);n(88599);const a=e=>{const{title:t,value:n,description:r}=e;return i().createElement("div",{className:"jp-connection__disconnect-card card"},i().createElement("div",{className:"jp-connection__disconnect-card__card-content"},i().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(n||r)&&i().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},i().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},n),i().createElement("div",{className:"jp-connection__disconnect-card__card-description"},r))))};a.propTypes={title:o().string,value:o().oneOfType([o().string,o().number]),description:o().number},t.Z=a},14033:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=n(55609),l=n(94902),u=n(44780),p=n(35513),d=(n(70453),n(9404)),h=n(6638),f=n(95740),m=n(58707);const __=a.__,g=e=>{const[t,n]=(0,r.useState)(!1),[s,o]=(0,r.useState)(!1),[a,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[y,k]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1),{apiRoot:E,apiNonce:C,connectedPlugins:j,title:S,pluginScreenDisconnectCallback:M,onDisconnected:N,onError:x,disconnectStepComponent:A,context:O,connectedUser:T,connectedSiteId:P,isOpen:I,onClose:R}=e;let U="";(0,p.jetpackConfigHas)("consumer_slug")&&(U=(0,p.jetpackConfigGet)("consumer_slug"));const D=(0,r.useMemo)((()=>({context:O,plugin:U})),[O,U]);(0,r.useEffect)((()=>{l.ZP.setApiRoot(E),l.ZP.setApiNonce(C)}),[E,C]),(0,r.useEffect)((()=>{T&&T.ID&&T.login&&u.Z.initialize(T.ID,T.login)}),[T,T.ID,T.login]),(0,r.useEffect)((()=>{I&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",D)}),[I,D]),(0,r.useEffect)((()=>{I&&(s?!s||v||y?v&&!y?u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},D)):y&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},D)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},D)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},D)))}),[I,s,v,y,D]);const Z=(0,r.useCallback)((()=>{l.ZP.disconnectSite().then((()=>{n(!1),o(!0)})).catch((e=>{n(!1),g(e),x&&x(e)}))}),[n,o,g,x]),L=(0,r.useCallback)(((e,t)=>{_(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);u.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),k(!0),_(!1)})).catch((e=>{u.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),k(!0),_(!1)}))}),[_,k]),z=(0,r.useCallback)((e=>{e&&e.preventDefault(),g(!1),n(!0),"plugins"!==O?Z():M&&M(e)}),[g,n,M,O,Z]),B=(0,r.useCallback)((e=>u.Z.tracks.recordEvent(e,D)),[D]),F=(0,r.useCallback)((()=>T.ID&&P),[T,P]),V=(0,r.useCallback)(((e,t,n)=>{if(n&&n.preventDefault(),!F())return void k(!0);const r={site_id:P,user_id:T.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},i=Object.assign({},D,{disconnect_reason:e});L(r,i)}),[L,k,F,P,T,D]),q=(0,r.useCallback)((e=>{e&&e.preventDefault(),N&&N(),R()}),[N,R]),H=(0,r.useCallback)((e=>{e&&e.preventDefault(),b(!0)}),[b]);return i().createElement(i().Fragment,null,I&&i().createElement(c.Modal,{title:"",contentLabel:S,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:R,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(s?" jp-connection__disconnect-dialog__success":"")},s?!s||v||y?v&&!y?i().createElement(f.Z,{isSubmittingFeedback:w,onFeedBackProvided:V,onExit:q}):y?i().createElement(m.Z,{onExit:q}):void 0:i().createElement(h.Z,{canProvideFeedback:F(),onProvideFeedback:H,onExit:q}):i().createElement(d.Z,{title:S,connectedPlugins:j,disconnectStepComponent:A,isDisconnecting:t,closeModal:R,onDisconnect:z,disconnectError:a,context:O,disconnectingPlugin:U,trackModalClick:B})))};g.propTypes={apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,title:o().string,onDisconnected:o().func,onError:o().func,context:o().string,connectedPlugins:o().oneOfType([o().array,o().object]),pluginScreenDisconnectCallback:o().func,disconnectStepComponent:o().element,connectedUser:o().object,connectedSiteId:o().number,isOpen:o().bool,onClose:o().func},g.defaultProps={title:__("Are you sure you want to disconnect?","jetpack"),context:"jetpack-dashboard",connectedUser:{}},t.Z=g},6638:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(69307),c=n(65736),l=n(55609),u=n(5446),p=n(62042);const __=c.__,d=e=>{const{onExit:t,canProvideFeedback:n,onProvideFeedback:r}=e;return i().createElement("div",{className:"jp-connection__disconnect-dialog__content"},i().createElement(u.Z,{icon:"unlink",imageUrl:p}),i().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},i().createElement("h1",null,(0,a.createInterpolateElement)(__("Jetpack has been <br/>successfully disconnected.","jetpack"),{br:i().createElement("br",null)})),n&&i().createElement(i().Fragment,null,i().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack")),i().createElement("p",null,i().createElement(l.Button,{variant:"primary",onClick:r,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack"))),i().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack"))),!n&&i().createElement(i().Fragment,null,i().createElement("p",null,i().createElement(l.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack"))))))};d.propTypes={onExit:o().func,onProvideFeedback:o().func,canProvideFeedback:o().bool},t.Z=d},9404:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(69307),o=n(65736),a=n(52104),c=n(55609),l=n(23698),u=n.n(l),p=n(75855);const __=o.__,d=e=>{const{title:t,isDisconnecting:n,onDisconnect:o,disconnectError:l,disconnectStepComponent:u,connectedPlugins:d,disconnectingPlugin:h,closeModal:f,context:m,trackModalClick:g}=e,v=(0,r.useCallback)((()=>g("jetpack_disconnect_dialog_click_learn_about")),[g]),b=(0,r.useCallback)((()=>g("jetpack_disconnect_dialog_click_support")),[g]),y=(0,r.useCallback)((()=>{g("jetpack_disconnect_dialog_click_stay_connected"),f()}),[g,f]),k=(0,r.useCallback)((e=>{g("jetpack_disconnect_dialog_click_disconnect"),o(e)}),[g,o]);return i().createElement(i().Fragment,null,i().createElement("div",{className:"jp-connection__disconnect-dialog__content"},i().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),i().createElement(p.Z,{connectedPlugins:d,disconnectingPlugin:h}),u,(()=>{if(!(d&&Object.keys(d).filter((e=>e!==h)).length)&&!u)return i().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack"),i().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack")))})()),i().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},i().createElement("div",{className:"jp-row"},i().createElement("div",{className:"lg-col-span-7 md-col-span-8 sm-col-span-4"},i().createElement("p",null,(0,s.createInterpolateElement)(__("<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.","jetpack"),{strong:i().createElement("strong",null),jpConnectionInfoLink:i().createElement("a",{href:(0,a.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:v}),jpSupportLink:i().createElement("a",{href:(0,a.Z)("jetpack-support"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:b})}))),i().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-5 md-col-span-8 sm-col-span-4"},i().createElement(c.Button,{variant:"primary",disabled:n,onClick:y,className:"jp-connection__disconnect-dialog__btn-dismiss"},"plugins"===m?__("Cancel","jetpack"):__("Stay connected","jetpack",0)),(()=>{let e=__("Disconnect","jetpack");return n?e=__("Disconnecting…","jetpack"):"plugins"===m&&(e=__("Deactivate","jetpack")),i().createElement(c.Button,{variant:"primary",disabled:n,onClick:k,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),l&&i().createElement("p",{className:"jp-connection__disconnect-dialog__error"},l)))};d.propTypes={title:u().string,isDisconnecting:u().bool,onDisconnect:u().func,disconnectError:u().bool,disconnectStepComponent:u().elementType,connectedPlugins:u().array,disconnectingPlugin:u().string,closeModal:u().func,context:u().string,trackModalClick:u().func},t.Z=d},95740:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(65736),c=(n(47637),n(37265));const __=a.__,l=e=>{const{onExit:t,onFeedBackProvided:n,isSubmittingFeedback:r}=e;return i().createElement("div",{className:"jp-connection__disconnect-dialog__content"},i().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack")),i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack")),i().createElement(c.Z,{onSubmit:n,isSubmittingFeedback:r}),i().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("Skip for now","jetpack")))};l.PropTypes={onExit:o().func,onFeedBackProvided:o().func,isSubmittingFeedback:o().bool},t.Z=l},58707:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(5446),c=n(65736),l=n(55609),u=n(69307),p=n(90724);const __=c.__,d=e=>{const{onExit:t}=e;return i().createElement("div",{className:"jp-connection__disconnect-dialog__content"},i().createElement(a.Z,{format:"vertical",imageUrl:p}),i().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},i().createElement("h1",null,__("Thank you!","jetpack")),i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,u.createInterpolateElement)(__("Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.","jetpack"),{br:i().createElement("br",null)})),i().createElement(l.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack"))))};d.PropTypes={onExit:o().func,assetBaseUrl:o().string},t.Z=d},37265:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(23698),o=n.n(s),a=n(55609),c=n(65736),l=n(99530);const __=c.__,u=e=>{const{onSubmit:t,isSubmittingFeedback:n}=e,[s,o]=(0,r.useState)(),[c,u]=(0,r.useState)(),p=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack")},{id:"not-working",answerText:__("I can't get it to work.","jetpack")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack")},{id:"buggy",answerText:__("It's buggy.","jetpack")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack")}],d="another-reason",h=(0,r.useCallback)((()=>{t(s,s===d?c:"")}),[t,d,c,s]),f=(0,r.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),u(t)}),[u]),m=e=>e===s?"jp-connect__disconnect-survey-card--selected":"",g=(0,r.useCallback)(((e,t)=>{switch(t.key){case"Enter":case"Space":case"Spacebar":case" ":o(e)}}),[o]);return i().createElement(i().Fragment,null,i().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},p.map((e=>i().createElement(l.Z,{id:e.id,onClick:o,onKeyDown:g,className:"card jp-connect__disconnect-survey-card "+m(e.id)},i().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),i().createElement(l.Z,{id:d,onClick:o,onKeyDown:g,className:"card jp-connect__disconnect-survey-card "+m(d)},i().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack")," ",i().createElement("input",{placeholder:__("share your experience","jetpack"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:c,onChange:f,maxLength:1e3})))),i().createElement("p",null,i().createElement(a.Button,{disabled:!s||n,variant:"primary",onClick:h,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},n?__("Submitting…","jetpack"):__("Submit Feedback","jetpack",0))))};u.PropTypes={onSubmit:o().func,isSubmittingFeedback:o().bool},t.Z=u},99530:function(e,t,n){"use strict";var r=n(99196),i=n.n(r);n(47637);t.Z=e=>{const{id:t,onClick:n,onKeyDown:s,children:o,className:a}=e,c=(0,r.useCallback)((()=>{n(t)}),[t,n]),l=(0,r.useCallback)((e=>{s(t,e)}),[t,s]);return i().createElement("div",{tabIndex:"0",role:"button",onClick:c,onKeyDown:l,className:"card jp-connect__disconnect-survey-card "+a},o)}},83843:function(e,t,n){"use strict";var r,i=n(99196),s=n(9818),o=n(94902),a=n(14965);const c=null!==(r=window)&&void 0!==r&&r.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};t.Z=function(){let{registrationNonce:e=c.registrationNonce,apiRoot:t=c.apiRoot,apiNonce:n=c.apiNonce,redirectUri:r,autoTrigger:l,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:h,refreshConnectedPlugins:f}=(0,s.useDispatch)(a.t),m=(0,s.useSelect)((e=>e(a.t).getRegistrationError())),{siteIsRegistering:g,userIsConnecting:v,userConnectionData:b,connectedPlugins:y,isRegistered:k,isUserConnected:w,hasConnectedOwner:_}=(0,s.useSelect)((e=>({siteIsRegistering:e(a.t).getSiteIsRegistering(),userIsConnecting:e(a.t).getUserIsConnecting(),userConnectionData:e(a.t).getUserConnectionData(),connectedPlugins:e(a.t).getConnectedPlugins(),...e(a.t).getConnectionStatus()}))),E=()=>{p?r&&(window.location=r):h({from:u,redirectUri:r})},C=t=>{t&&t.preventDefault(),k?E():d({registrationNonce:e,redirectUri:r}).then((()=>{E()}))};return(0,i.useEffect)((()=>{o.ZP.setApiRoot(t),o.ZP.setApiNonce(n)}),[t,n]),(0,i.useEffect)((()=>{!l||g||v||C()}),[]),{handleRegisterSite:C,handleConnectUser:E,refreshConnectedPlugins:f,isRegistered:k,isUserConnected:w,siteIsRegistering:g,userIsConnecting:v,registrationError:m,userConnectionData:b,hasConnectedOwner:_,connectedPlugins:y}}},63226:function(e,t,n){"use strict";n.d(t,{i6:function(){return i},LI:function(){return s},r7:function(){return o},N4:function(){return a},qV:function(){return c},T1:function(){return l},TS:function(){return u},wQ:function(){return d},ZP:function(){return k}});var r=n(94902);const i="SET_CONNECTION_STATUS",s="SET_CONNECTION_STATUS_IS_FETCHING",o="SET_SITE_IS_REGISTERING",a="SET_USER_IS_CONNECTING",c="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="CONNECT_USER",d="SET_CONNECTED_PLUGINS",h=e=>({type:i,connectionStatus:e}),f=e=>({type:o,isRegistering:e}),m=e=>({type:a,isConnecting:e}),g=e=>({type:c,registrationError:e}),v=()=>({type:l}),b=e=>({type:u,authorizationUrl:e}),y=e=>({type:d,connectedPlugins:e});const k={setConnectionStatus:h,setConnectionStatusIsFetching:e=>({type:s,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:m,setRegistrationError:g,clearRegistrationError:v,setAuthorizationUrl:b,registerSite:function*(e){let{registrationNonce:t,redirectUri:n}=e;yield v(),yield f(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield h({isRegistered:!0}),yield b(e.authorizeUrl),yield f(!1),Promise.resolve(e)}catch(e){return yield g(e),yield f(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield m(!0),yield{type:p,from:e,redirectFunc:t,redirectUri:n}},setConnectedPlugins:y,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>r.ZP.fetchConnectedPlugins().then((n=>{t(y(n)),e(n)}))))}}},63989:function(e,t,n){"use strict";var r=n(94902),i=n(9818),s=n(14965);const o=(0,i.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((i,o)=>{t(s.t).getAuthorizationUrl(r).then((t=>{const r=n||(e=>window.location.assign(e)),s=new URL(t);e&&s.searchParams.set("from",encodeURIComponent(e));const o=s.toString();r(o),i(o)})).catch((e=>{o(e)}))}))}}));t.Z={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return r.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return r.ZP.registerSite(t,n)},CONNECT_USER:o}},47801:function(e,t,n){"use strict";var r=n(9818),i=n(63226);const s=(0,r.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===i.i6?{...e,...t.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===i.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===i.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===i.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case i.T1:return!1;case i.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===i.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===i.wQ?t.connectedPlugins:e}});t.Z=s},84885:function(e,t,n){"use strict";var r=n(9818),i=n(63226),s=n(14965);const o={getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=(0,r.select)(s.t).hasFinishedResolution("getAuthorizationUrl",i);return t&&!a&&(0,r.dispatch)(s.t).finishResolution("getAuthorizationUrl",i),t},*fulfill(e){const t=yield i.ZP.fetchAuthorizationUrl(e);yield i.ZP.setAuthorizationUrl(t.authorizeUrl)}}};t.Z={...o}},43115:function(e,t){"use strict";const n={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[]};t.Z=n},77538:function(e,t,n){"use strict";var r=n(64140),i=n.n(r),s=n(9818);class o{static mayBeInit(e,t){null===o.store&&(o.store=(0,s.createReduxStore)(e,t),(0,s.register)(o.store))}}i()(o,"store",null),t.Z=o},14965:function(e,t,n){"use strict";n.d(t,{t:function(){return u}});var r=n(47801),i=n(63226),s=n(43115),o=n(84885),a=n(63989),c=n(77538),l=n(55246);const u="jetpack-connection",p=window.JP_CONNECTION_INITIAL_STATE;p||l.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),c.Z.mayBeInit(u,{__experimentalUseThunks:!0,reducer:r.Z,actions:i.ZP,selectors:s.Z,resolvers:o.Z,controls:a.Z,initialState:p||{}})},88485:function(e,t,n){"use strict";var r=n(55609),i=n(69307),s=n(62309),o=n(19202),a=n(65736),c=n(11268),l=n.n(c),u=n(99196),p=n.n(u),d=n(77423),h=n(25957);const __=a.__,f=e=>{const{activateLicense:t,isActivating:n,license:a,licenseError:c,onLicenseChange:l}=e,u=null!=c;return p().createElement("div",{className:"jp-license-activation-screen-controls"},p().createElement("div",{className:"jp-license-activation-screen-controls--content"},p().createElement(s.Z,{showText:!1,height:48}),p().createElement("h1",null,__("Add a license key","jetpack")),p().createElement("p",null,(0,i.createInterpolateElement)(__("<strong>Check your email</strong> for your license key. You should have received it after making your purchase.","jetpack"),{strong:p().createElement("strong",null)})),p().createElement(r.TextControl,{className:u?"jp-license-activation-screen-controls--license-field-with-error":"jp-license-activation-screen-controls--license-field",label:__("License key","jetpack"),value:a,onChange:l,disabled:n}),u&&p().createElement("div",{className:"jp-license-activation-screen-controls--license-field-error"},p().createElement(d.Z,{icon:h.Z}),p().createElement("span",null,c))),p().createElement("div",null,p().createElement(r.Button,{className:"jp-license-activation-screen-controls--button",onClick:t},n?p().createElement(o.Z,null):__("Activate","jetpack"))))};f.propTypes={activateLicense:l().func.isRequired,isActivating:l().bool.isRequired,license:l().string.isRequired,licenseError:l().string,onLicenseChange:l().func.isRequired,siteUrl:l().string.isRequired},t.Z=f},18032:function(e,t,n){"use strict";var r=n(65736),i=n(69307),s=n(52104),o=n(11268),a=n.n(o),c=n(99196),l=n.n(c);const __=r.__,u=e=>{const{imageUrl:t,showSupportLink:n=!1}=e;return l().createElement("div",{className:"jp-license-activation-screen-illustration"},l().createElement("div",{className:"jp-license-activation-screen-illustration--wrapper"},l().createElement("img",{className:"jp-license-activation-screen-illustration--img",src:t,alt:""})),n&&l().createElement("p",{className:"jp-license-activation-screen-illustration--support-link"},(0,i.createInterpolateElement)(__("Do you need help? <a>Contact us.</a>","jetpack"),{a:l().createElement("a",{href:(0,s.Z)("jetpack-support-license-activation")})})))};u.propTypes={imageUrl:a().string.isRequired,showSupportLink:a().bool},t.Z=u},7732:function(e,t,n){"use strict";var r=n(62309),i=n(11268),s=n.n(i),o=n(99196),a=n.n(o),c=n(88483),l=n(79025),u=n(55011);const p=e=>{const{productId:t,siteRawUrl:n,siteAdminUrl:i,currentRecommendationsStep:s}=e;return a().createElement("div",{className:"jp-license-activation-screen-success-info"},a().createElement("div",{className:"jp-license-activation-screen-success-info--content"},a().createElement(r.Z,{showText:!1,height:48})),a().createElement(c.Z,{siteRawUrl:n,productId:t}),a().createElement("div",{className:"jp-license-activation-screen-success-info--buttons"},a().createElement(u.c,{currentRecommendationsStep:s,siteAdminUrl:i}),a().createElement(l.o,{siteRawUrl:n,productId:t})))};p.propTypes={siteRawUrl:s().string,productId:s().number,siteAdminUrl:s().string,currentRecommendationsStep:s().string},t.Z=p},55011:function(e,t,n){"use strict";n.d(t,{c:function(){return l}});var r=n(65736),i=n(55609),s=n(11268),o=n.n(s),a=n(99196),c=n.n(a);const __=r.__,l=e=>{const{currentRecommendationsStep:t,siteAdminUrl:n}=e;return"not-started"===t?c().createElement(i.Button,{className:"jp-license-activation-screen-success-info--button",href:n+"admin.php?page=jetpack#/recommendations"},__("Configure my site","jetpack")):c().createElement(i.Button,{className:"jp-license-activation-screen-success-info--button",href:n+"admin.php?page=jetpack#/my-plan"},__("View my plans","jetpack"))};l.propTypes={siteAdminUrl:o().string.isRequired,currentRecommendationsStep:o().string}},88483:function(e,t,n){"use strict";var r=n(65736),i=n(69307),s=n(11268),o=n.n(s),a=n(99196),c=n.n(a),l=n(17364);const __=r.__,u=e=>{const{productId:t,siteRawUrl:n}=e,r=`https://cloud.jetpack.com/landing/${n}`,s=(0,l.F)(t),o={jetpack_anti_spam:{title:__("Jetpack Anti-spam is active!","jetpack"),text:__("We'll take care of everything from here. Now you can enjoy a spam-free site!","jetpack")},jetpack_backup:{title:__("Jetpack Backup is active!","jetpack"),text:(0,i.createInterpolateElement)(__("You can see your backups and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack"),{a:c().createElement("a",{href:r})})},jetpack_complete:{title:__("Jetpack Complete is active!","jetpack"),text:(0,i.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack"),{a:c().createElement("a",{href:r})})},jetpack_scan:{title:__("Jetpack Scan is active!","jetpack"),text:(0,i.createInterpolateElement)(__("You can see your security scans on <a>cloud.jetpack.com</a>.","jetpack"),{a:c().createElement("a",{href:r})})},jetpack_search:{title:__("Jetpack Search is active!","jetpack"),text:__("Next, we'll help you customize the Search experience for your visitors.","jetpack")},jetpack_security:{title:__("Jetpack Security is active!","jetpack"),text:(0,i.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack"),{a:c().createElement("a",{href:r})})},jetpack_videopress:{title:__("Jetpack VideoPress is active!","jetpack"),text:__("Experience high-quality, ad-free video built specifically for WordPress.","jetpack")},default:{title:__("Your product is active!","jetpack"),text:__("You're all set!","jetpack")}};return c().createElement("div",{className:"jp-license-activation-screen-success-info--product-details"},c().createElement("h1",null,o[s].title," ",String.fromCodePoint(127881)),c().createElement("p",null,o[s].text))};u.propTypes={dashboardUrl:o().string,productId:o().number},t.Z=u},79025:function(e,t,n){"use strict";n.d(t,{o:function(){return p}});var r=n(65736),i=n(55609),s=n(52104),o=n(11268),a=n.n(o),c=n(99196),l=n.n(c),u=n(17364);const __=r.__,p=e=>{const{productId:t,siteRawUrl:n}=e,r={jetpack_backup:{text:__("View latest backup","jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_complete:{text:__("View latest backup","jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_scan:{text:__("View scan results","jetpack"),redirectSource:"jetpack-license-activation-success-scan"},jetpack_search:{text:__("Configure search","jetpack"),redirectSource:"jetpack-license-activation-success-search"},jetpack_security:{text:__("View latest backup","jetpack"),redirectSource:"jetpack-license-activation-success-backup"},default:null}[(0,u.F)(t)];return l().createElement(l().Fragment,null,r&&l().createElement(i.ExternalLink,{className:"jp-license-activation-screen-success-info--external-link",href:(0,s.Z)(r.redirectSource,{site:n})},r.text))};p.propTypes={siteRawUrl:a().string,productId:a().number}},39701:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(11268),o=n.n(s),a=n(94902),c=n(65736),l=n(88485),u=n(18032),p=n(7732),d=n(88702),h=n(21160);const __=c.__,f=e=>{const{onActivationSuccess:t=(()=>null),siteRawUrl:n,startingLicense:s,siteAdminUrl:o,currentRecommendationsStep:c}=e,[f,m]=(0,r.useState)(null!=s?s:""),[g,v]=(0,r.useState)(null),[b,y]=(0,r.useState)(!1),[k,w]=(0,r.useState)(null),_=(0,r.useCallback)((()=>b?Promise.resolve():f.length<1?(v(__("This is not a valid license key. Please try again.","jetpack")),Promise.resolve()):(v(null),y(!0),a.ZP.attachLicenses([f]).then((e=>{const n=(e=>{var t,n;let r=e;for(;Array.isArray(r)&&r.length>0;)r=r[0];if(null!==(t=r)&&void 0!==t&&t.activatedProductId)return r.activatedProductId;if(null!==(n=r)&&void 0!==n&&n.errors)for(const e in r.errors)if(r.errors[e].length>0)throw new Error(r.errors[e][0]);throw new Error(__("An unknown error occurred during license activation. Please try again.","jetpack"))})(e);w(n),t(n)})).catch((e=>{v(e.message)})).finally((()=>{y(!1)})))),[b,f,t]);return null!==k?i().createElement("div",{className:"jp-license-activation-screen"},i().createElement(p.Z,{siteRawUrl:n,productId:k,siteAdminUrl:o,currentRecommendationsStep:c}),i().createElement(u.Z,{imageUrl:h,showSupportLink:!1})):i().createElement("div",{className:"jp-license-activation-screen"},i().createElement(l.Z,{license:f,onLicenseChange:m,activateLicense:_,siteUrl:n,licenseError:g,isActivating:b}),i().createElement(u.Z,{imageUrl:d,showSupportLink:!0}))};f.propTypes={onActivationSuccess:o().func,siteRawUrl:o().string.isRequired,startingLicense:o().string,siteAdminUrl:o().string.isRequired,currentRecommendationsStep:o().string},t.Z=f},17364:function(e,t,n){"use strict";n.d(t,{F:function(){return i}});const r={jetpack_anti_spam:[2110,2111],jetpack_backup:[2100,2101,2102,2103,2112,2113,2114,2115],jetpack_complete:[2014,2015],jetpack_scan:[2106,2107,2108,2109],jetpack_search:[2104,2105],jetpack_security:[2010,2011,2012,2013,2016,2017,2019,2020],jetpack_videopress:[2116,2117]};function i(e){return Object.keys(r).find((t=>r[t].includes(e)))||"default"}},87203:function(e,t,n){"use strict";n.d(t,{I:function(){return r.Z}});var r=n(39701)},153:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(11268),o=n.n(s),a=n(48638),c=n(96694);const l=e=>{const{apiNonce:t,apiRoot:n,connectionStatus:r,partnerCoupon:s,assetBaseUrl:o,registrationNonce:l,siteRawUrl:u,tracksUserData:p,analytics:d}=e;return r.hasConnectedOwner?i().createElement(a.ZP,{assetBaseUrl:o,connectionStatus:r,partnerCoupon:s,siteRawUrl:u,tracksUserData:!!p,analytics:d}):i().createElement(c.Z,{apiNonce:t,registrationNonce:l,apiRoot:n,assetBaseUrl:o,connectionStatus:r,partnerCoupon:s,siteRawUrl:u,tracksUserData:!!p,analytics:d})};l.propTypes={apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,assetBaseUrl:o().string.isRequired,connectionStatus:o().object.isRequired,partnerCoupon:o().object.isRequired,registrationNonce:o().string.isRequired,siteRawUrl:o().string.isRequired,tracksUserData:o().bool.isRequired,analytics:o().object},t.Z=l},48638:function(e,t,n){"use strict";var r=n(99196),i=n.n(r),s=n(11268),o=n.n(s),a=n(62309),c=n(24731),l=n(65736),u=n(56316);const __=l.__,p="jetpackRedeemPartnerCouponDismissedAt";function d(){const e=localStorage.getItem(p);return!(!e||(new Date).getTime()>parseInt(e)+2592e5)}const h=e=>{const{connectionStatus:t,partnerCoupon:n,assetBaseUrl:s,siteRawUrl:o,tracksUserData:h,analytics:f}=e,[m,g]=(0,r.useState)(d()),v=(0,u.i)(n,o,t,h,f),b=(0,r.useCallback)((()=>{localStorage.setItem(p,(new Date).getTime()),g(d())}),[g]);if(m)return null;let y=null;return y=n.partner.logo?i().createElement(i().Fragment,null,i().createElement(a.Z,null),i().createElement("span",null,"+"),i().createElement("img",{src:`${s}${n.partner.logo.src}`,alt:(0,l.sprintf)(
1
  /*! For license information please see admin.js.LICENSE.txt */
2
+ !function(){var e={64140: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},3779: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},77423:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...i}=e;return(0,r.cloneElement)(t,{width:n,height:n,...i})}},25957:function(e,t,n){"use strict";var r=n(69307),i=n(70444);const s=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(i.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=s},8277:function(e,t,n){"use strict";const r=t;r.bignum=n(30910),r.define=n(99875).define,r.base=n(73034),r.constants=n(68344),r.decoders=n(55439),r.encoders=n(95411)},99875:function(e,t,n){"use strict";const r=n(95411),i=n(55439),s=n(59503);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return s(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},27027:function(e,t,n){"use strict";const r=n(59503),i=n(72173).b,s=n(82923).Buffer;function o(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(o,i),t.C=o,o.isDecoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&s.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){const t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new o(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=a,a.isEncoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=s.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},73034:function(e,t,n){"use strict";const r=t;r.Reporter=n(72173).b,r.DecoderBuffer=n(27027).C,r.EncoderBuffer=n(27027).R,r.Node=n(24873)},24873:function(e,t,n){"use strict";const r=n(72173).b,i=n(27027).R,s=n(27027).C,o=n(48282),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function l(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=l;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},l.prototype._wrap=function(){const e=this._baseState;c.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},l.prototype._init=function(e){const t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(o(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){l.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(n),this}})),l.prototype.use=function(e){o(e);const t=this._baseState;return o(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){const t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){const t=this._baseState;return o(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){const t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){const t=this._baseState;return o(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,o=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(o=this._peekTag(e,r,n.any),e.isError(o))return o}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(r)}}if(n.obj&&o&&(r=e.enterObject()),o){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new s(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&o&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,i),i},l.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),o(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},l.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(s){const o=e.save(),a=n.choice[s];try{const n=a._decode(e,t);if(e.isError(n))return!1;r={type:s,value:n},i=!0}catch(t){return e.restore(o),!1}return!0}),this),i?r:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},l.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},l.prototype._encodeValue=function(e,t,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);let s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let o=null,a=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,n)._encode(e,t),a=!0;else if(i.children)o=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==i.use?s=this._getUse(i.use,n)._encode(e,t):(o=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(s=this._encodeComposite(e,a,n,o))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,"context",s)),s},l.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},72173:function(e,t,n){"use strict";const r=n(59503);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof s;if(t=r?e:new s(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},5598:function(e,t){"use strict";function n(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},68344:function(e,t,n){"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(5598)},75761:function(e,t,n){"use strict";const r=n(59503),i=n(30910),s=n(27027).C,o=n(24873),a=n(5598);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.call(this,"der",e)}function u(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=a.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:a.tag[n]}}function p(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=c,c.prototype.decode=function(e,t){return s.isDecoderBuffer(e)||(e=new s(e,t)),this.tree._decode(e,t)},r(l,o),l.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=u(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},l.prototype._decodeTag=function(e,t,n){const r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=p(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const s=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(i=e.offset-s.offset,e.restore(s),e.skip(i,'Failed to match body of: "'+t+'"'))},l.prototype._skipUntilEnd=function(e,t){for(;;){const n=u(e,t);if(e.isError(n))return n;const r=p(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},l.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const s=n.decode(e,"der",r);if(e.isError(s)&&t)break;i.push(s)}return i},l.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},l.prototype._decodeObjid=function(e,t,n){let r;const i=[];let s=0,o=0;for(;!e.isEmpty();)o=e.readUInt8(),s<<=7,s|=127&o,0==(128&o)&&(i.push(s),s=0);128&o&&i.push(s);const a=i[0]/40|0,c=i[0]%40;if(r=n?i:[a,c].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},l.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,s,o,a,c;if("gentime"===t)r=0|n.slice(0,4),i=0|n.slice(4,6),s=0|n.slice(6,8),o=0|n.slice(8,10),a=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),s=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),c=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,s,o,a,c,0)},l.prototype._decodeNull=function(){return null},l.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},l.prototype._decodeInt=function(e,t){const n=e.raw();let r=new i(n);return t&&(r=t[r.toString(10)]||r),r},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},55439:function(e,t,n){"use strict";const r=t;r.der=n(75761),r.pem=n(33672)},33672:function(e,t,n){"use strict";const r=n(59503),i=n(82923).Buffer,s=n(75761);function o(e){s.call(this,e),this.enc="pem"}r(o,s),e.exports=o,o.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,c=-1;for(let e=0;e<n.length;e++){const t=n[e].match(o);if(null!==t&&t[2]===r){if(-1!==a){if("END"!==t[1])break;c=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===c)throw new Error("PEM section not found for: "+r);const l=n.slice(a+1,c).join("");l.replace(/[^a-z0-9+/=]+/gi,"");const u=i.from(l,"base64");return s.prototype.decode.call(this,u,t)}},18248:function(e,t,n){"use strict";const r=n(59503),i=n(82923).Buffer,s=n(24873),o=n(5598);function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(c,s),c.prototype._encodeComposite=function(e,t,n,r){const s=function(e,t,n,r){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=o.tagClassByName[n||"universal"]<<6,i}(e,t,n,this.reporter);if(r.length<128){const e=i.alloc(2);return e[0]=s,e[1]=r.length,this._createEncoderBuffer([e,r])}let a=1;for(let e=r.length;e>=256;e>>=8)a++;const c=i.alloc(2+a);c[0]=s,c[1]=128|a;for(let e=1+a,t=r.length;t>0;e--,t>>=8)c[e]=255&t;return this._createEncoderBuffer([c,r])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t<e.length;t++){let n=e[t];for(r++;n>=128;n>>=7)r++}const s=i.alloc(r);let o=s.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(s[o--]=127&n;(n>>=7)>0;)s[o--]=128|127&n}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[l(r.getUTCFullYear()),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[l(r.getUTCFullYear()%100),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=i.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const r=new Array(n);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const s=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),s.length!==r.defaultBuffer.length)return!1;for(i=0;i<s.length;i++)if(s[i]!==r.defaultBuffer[i])return!1;return!0}},95411:function(e,t,n){"use strict";const r=t;r.der=n(18248),r.pem=n(51027)},51027:function(e,t,n){"use strict";const r=n(59503),i=n(18248);function s(e){i.call(this,e),this.enc="pem"}r(s,i),e.exports=s,s.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},90605:function(e,t,n){"use strict";var r=n(5806),i=n(55246);function s(e){return s="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},s(e)}var o,a,c=n(27452).codes,l=c.ERR_AMBIGUOUS_ARGUMENT,u=c.ERR_INVALID_ARG_TYPE,p=c.ERR_INVALID_ARG_VALUE,d=c.ERR_INVALID_RETURN_VALUE,h=c.ERR_MISSING_ARGS,f=n(71228),m=n(23333).inspect,g=n(23333).types,v=g.isPromise,b=g.isRegExp,y=Object.assign?Object.assign:n(45685).assign,k=Object.is?Object.is:n(88706);new Map;function w(){var e=n(81562);o=e.isDeepEqual,a=e.isDeepStrictEqual}var _=!1,E=e.exports=M,C={};function j(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function S(e,t,n,r){if(!n){var i=!1;if(0===t)i=!0,r="No value argument passed to `assert.ok()`";else if(r instanceof Error)throw r;var s=new f({actual:n,expected:!0,message:r,operator:"==",stackStartFn:e});throw s.generatedMessage=i,s}}function M(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S.apply(void 0,[M,t.length].concat(t))}E.fail=function e(t,n,s,o,a){var c,l=arguments.length;if(0===l)c="Failed";else if(1===l)s=t,t=void 0;else{if(!1===_){_=!0;var u=r.emitWarning?r.emitWarning:i.warn.bind(i);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===l&&(o="!=")}if(s instanceof Error)throw s;var p={actual:t,expected:n,operator:void 0===o?"fail":o,stackStartFn:a||e};void 0!==s&&(p.message=s);var d=new f(p);throw c&&(d.message=c,d.generatedMessage=!0),d},E.AssertionError=f,E.ok=M,E.equal=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");t!=n&&j({actual:t,expected:n,message:r,operator:"==",stackStartFn:e})},E.notEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");t==n&&j({actual:t,expected:n,message:r,operator:"!=",stackStartFn:e})},E.deepEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),o(t,n)||j({actual:t,expected:n,message:r,operator:"deepEqual",stackStartFn:e})},E.notDeepEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),o(t,n)&&j({actual:t,expected:n,message:r,operator:"notDeepEqual",stackStartFn:e})},E.deepStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w(),a(t,n)||j({actual:t,expected:n,message:r,operator:"deepStrictEqual",stackStartFn:e})},E.notDeepStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");void 0===o&&w();a(t,n)&&j({actual:t,expected:n,message:r,operator:"notDeepStrictEqual",stackStartFn:e})},E.strictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");k(t,n)||j({actual:t,expected:n,message:r,operator:"strictEqual",stackStartFn:e})},E.notStrictEqual=function e(t,n,r){if(arguments.length<2)throw new h("actual","expected");k(t,n)&&j({actual:t,expected:n,message:r,operator:"notStrictEqual",stackStartFn:e})};var N=function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n.forEach((function(e){e in t&&(void 0!==r&&"string"==typeof r[e]&&b(t[e])&&t[e].test(r[e])?i[e]=r[e]:i[e]=t[e])}))};function x(e,t,n,r,i,s){if(!(n in e)||!a(e[n],t[n])){if(!r){var o=new N(e,i),c=new N(t,i,e),l=new f({actual:o,expected:c,operator:"deepStrictEqual",stackStartFn:s});throw l.actual=e,l.expected=t,l.operator=s.name,l}j({actual:e,expected:t,message:r,operator:s.name,stackStartFn:s})}}function A(e,t,n,r){if("function"!=typeof t){if(b(t))return t.test(e);if(2===arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==s(e)||null===e){var i=new f({actual:e,expected:t,message:n,operator:"deepStrictEqual",stackStartFn:r});throw i.operator=r.name,i}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new p("error",t,"may not be an empty object");return void 0===o&&w(),a.forEach((function(i){"string"==typeof e[i]&&b(t[i])&&t[i].test(e[i])||x(e,t,i,n,a,r)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function O(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return C}function T(e){return v(e)||null!==e&&"object"===s(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function P(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!T(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!T(e))throw new u("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return C})).catch((function(e){return e}))}))}function I(e,t,n,r){if("string"==typeof n){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],n);if("object"===s(t)&&null!==t){if(t.message===n)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===n)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));r=n,n=void 0}else if(null!=n&&"object"!==s(n)&&"function"!=typeof n)throw new u("error",["Object","Error","Function","RegExp"],n);if(t===C){var i="";n&&n.name&&(i+=" (".concat(n.name,")")),i+=r?": ".concat(r):".";var o="rejects"===e.name?"rejection":"exception";j({actual:void 0,expected:n,operator:e.name,message:"Missing expected ".concat(o).concat(i),stackStartFn:e})}if(n&&!A(t,n,r,e))throw t}function R(e,t,n,r){if(t!==C){if("string"==typeof n&&(r=n,n=void 0),!n||A(t,n)){var i=r?": ".concat(r):".",s="doesNotReject"===e.name?"rejection":"exception";j({actual:t,expected:n,operator:e.name,message:"Got unwanted ".concat(s).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S.apply(void 0,[U,t.length].concat(t))}E.throws=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];I.apply(void 0,[e,O(t)].concat(r))},E.rejects=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return P(t).then((function(t){return I.apply(void 0,[e,t].concat(r))}))},E.doesNotThrow=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];R.apply(void 0,[e,O(t)].concat(r))},E.doesNotReject=function e(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return P(t).then((function(t){return R.apply(void 0,[e,t].concat(r))}))},E.ifError=function e(t){if(null!=t){var n="ifError got unwanted exception: ";"object"===s(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?n+=t.constructor.name:n+=t.message:n+=m(t);var r=new f({actual:t,expected:null,operator:"ifError",message:n,stackStartFn:e}),i=t.stack;if("string"==typeof i){var o=i.split("\n");o.shift();for(var a=r.stack.split("\n"),c=0;c<o.length;c++){var l=a.indexOf(o[c]);if(-1!==l){a=a.slice(0,l);break}}r.stack="".concat(a.join("\n"),"\n").concat(o.join("\n"))}throw r}},E.strict=y(U,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},71228:function(e,t,n){"use strict";var r=n(5806);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(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 o(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)},c(e)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&p(i,n.prototype),i},u.apply(null,arguments)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e){return h="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},h(e)}var f=n(23333).inspect,m=n(27452).codes.ERR_INVALID_ARG_TYPE;function g(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}var v="",b="",y="",k="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function E(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function C(e,t,n){var i="",s="",o=0,a="",c=!1,l=E(e),u=l.split("\n"),p=E(t).split("\n"),d=0,f="";if("strictEqual"===n&&"object"===h(e)&&"object"===h(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===p.length&&u[0]!==p[0]){var m=u[0].length+p[0].length;if(m<=10){if(!("object"===h(e)&&null!==e||"object"===h(t)&&null!==t||0===e&&0===t))return"".concat(w[n],"\n\n")+"".concat(u[0]," !== ").concat(p[0],"\n")}else if("strictEqualObject"!==n){if(m<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][d]===p[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",d),"^"),d=0)}}}for(var _=u[u.length-1],C=p[p.length-1];_===C&&(d++<2?a="\n ".concat(_).concat(a):i=_,u.pop(),p.pop(),0!==u.length&&0!==p.length);)_=u[u.length-1],C=p[p.length-1];var j=Math.max(u.length,p.length);if(0===j){var S=l.split("\n");if(S.length>30)for(S[26]="".concat(v,"...").concat(k);S.length>27;)S.pop();return"".concat(w.notIdentical,"\n\n").concat(S.join("\n"),"\n")}d>3&&(a="\n".concat(v,"...").concat(k).concat(a),c=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var M=0,N=w[n]+"\n".concat(b,"+ actual").concat(k," ").concat(y,"- expected").concat(k),x=" ".concat(v,"...").concat(k," Lines skipped");for(d=0;d<j;d++){var A=d-o;if(u.length<d+1)A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(p[d-2]),M++),s+="\n ".concat(p[d-1]),M++),o=d,i+="\n".concat(y,"-").concat(k," ").concat(p[d]),M++;else if(p.length<d+1)A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(u[d-2]),M++),s+="\n ".concat(u[d-1]),M++),o=d,s+="\n".concat(b,"+").concat(k," ").concat(u[d]),M++;else{var O=p[d],T=u[d],P=T!==O&&(!g(T,",")||T.slice(0,-1)!==O);P&&g(O,",")&&O.slice(0,-1)===T&&(P=!1,T+=","),P?(A>1&&d>2&&(A>4?(s+="\n".concat(v,"...").concat(k),c=!0):A>3&&(s+="\n ".concat(u[d-2]),M++),s+="\n ".concat(u[d-1]),M++),o=d,s+="\n".concat(b,"+").concat(k," ").concat(T),i+="\n".concat(y,"-").concat(k," ").concat(O),M+=2):(s+=i,i="",1!==A&&0!==d||(s+="\n ".concat(T),M++))}if(M>20&&d<j-2)return"".concat(N).concat(x,"\n").concat(s,"\n").concat(v,"...").concat(k).concat(i,"\n")+"".concat(v,"...").concat(k)}return"".concat(N).concat(c?x:"","\n").concat(s).concat(i).concat(a).concat(f)}var j=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==h(e)||null===e)throw new m("options","Object",e);var i=e.message,s=e.operator,c=e.stackStartFn,l=e.actual,u=e.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)n=o(this,d(t).call(this,String(i)));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(v="[34m",b="[32m",k="[39m",y="[31m"):(v="",b="",k="",y="")),"object"===h(l)&&null!==l&&"object"===h(u)&&null!==u&&"stack"in l&&l instanceof Error&&"stack"in u&&u instanceof Error&&(l=_(l),u=_(u)),"deepStrictEqual"===s||"strictEqual"===s)n=o(this,d(t).call(this,C(l,u,s)));else if("notDeepStrictEqual"===s||"notStrictEqual"===s){var f=w[s],g=E(l).split("\n");if("notStrictEqual"===s&&"object"===h(l)&&null!==l&&(f=w.notStrictEqualObject),g.length>30)for(g[26]="".concat(v,"...").concat(k);g.length>27;)g.pop();n=1===g.length?o(this,d(t).call(this,"".concat(f," ").concat(g[0]))):o(this,d(t).call(this,"".concat(f,"\n\n").concat(g.join("\n"),"\n")))}else{var j=E(l),S="",M=w[s];"notDeepEqual"===s||"notEqual"===s?(j="".concat(w[s],"\n\n").concat(j)).length>1024&&(j="".concat(j.slice(0,1021),"...")):(S="".concat(E(u)),j.length>512&&(j="".concat(j.slice(0,509),"...")),S.length>512&&(S="".concat(S.slice(0,509),"...")),"deepEqual"===s||"equal"===s?j="".concat(M,"\n\n").concat(j,"\n\nshould equal\n\n"):S=" ".concat(s," ").concat(S)),n=o(this,d(t).call(this,"".concat(j).concat(S)))}return Error.stackTraceLimit=p,n.generatedMessage=!i,Object.defineProperty(a(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=l,n.expected=u,n.operator=s,Error.captureStackTrace&&Error.captureStackTrace(a(n),c),n.stack,n.name="AssertionError",o(n)}var n,c,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,e),n=t,c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(e,t){return f(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],c&&s(n.prototype,c),l&&s(n,l),t}(c(Error));e.exports=j},27452: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)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var a,c,l={};function u(e,t,n){n||(n=Error);var r=function(n){function r(n,o,a){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),c=i(this,s(r).call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,o,a))),c.code=e,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(r,n),r}(n);l[e]=r}function p(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(e,t,i){var s,o,c,l;if(void 0===a&&(a=n(90605)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(o="not ",t.substr(!c||c<0?0:+c,o.length)===o)?(s="must not be",t=t.replace(/^not /,"")):s="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(s," ").concat(p(t,"type"));else{var u=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(s," ").concat(p(t,"type"))}return l+=". Received type ".concat(r(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=n(23333));var i=c.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];void 0===a&&(a=n(90605)),a(t.length>0,"At least one arg needs to be specified");var i="The ",s=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),s){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,s-1).join(", "),i+=", and ".concat(t[s-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=l},81562:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],_n=!0,r=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(_n=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,i=e}finally{try{_n||null==o.return||o.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="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},i(e)}var s=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},c=Object.is?Object.is:n(88706),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:n(17614);function p(e){return e.call.bind(e)}var d=p(Object.prototype.hasOwnProperty),h=p(Object.prototype.propertyIsEnumerable),f=p(Object.prototype.toString),m=n(23333).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,y=m.isMap,k=m.isRegExp,w=m.isSet,_=m.isNativeError,E=m.isBoxedPrimitive,C=m.isNumberObject,j=m.isStringObject,S=m.isBooleanObject,M=m.isBigIntObject,N=m.isSymbolObject,x=m.isFloat32Array,A=m.isFloat64Array;function O(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<48||n>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function T(e){return Object.keys(e).filter(O).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function P(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function I(e,t,n,r){if(e===t)return 0!==e||(!n||c(e,t));if(n){if("object"!==i(e))return"number"==typeof e&&u(e)&&u(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,a,l,p,d=f(e);if(d!==f(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=T(e),m=T(t);return h.length===m.length&&U(e,t,n,r,1,h)}if("[object Object]"===d&&(!y(e)&&y(t)||!w(e)&&w(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(k(e)){if(!k(t)||(l=e,p=t,!(s?l.source===p.source&&l.flags===p.flags:RegExp.prototype.toString.call(l)===RegExp.prototype.toString.call(p))))return!1}else if(_(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(n||!x(e)&&!A(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===P(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}(e,t))return!1;var O=T(e),I=T(t);return O.length===I.length&&U(e,t,n,r,0,O)}if(w(e))return!(!w(t)||e.size!==t.size)&&U(e,t,n,r,2);if(y(e))return!(!y(t)||e.size!==t.size)&&U(e,t,n,r,3);if(g(e)){if(a=t,(o=e).byteLength!==a.byteLength||0!==P(new Uint8Array(o),new Uint8Array(a)))return!1}else if(E(e)&&!function(e,t){return C(e)?C(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):j(e)?j(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):S(e)?S(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):M(e)?M(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):N(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return U(e,t,n,r,0)}function R(e,t){return t.filter((function(t){return h(e,t)}))}function U(e,t,n,r,i,s){if(5===arguments.length){s=Object.keys(e);var o=Object.keys(t);if(s.length!==o.length)return!1}for(var a=0;a<s.length;a++)if(!d(t,s[a]))return!1;if(n&&5===arguments.length){var c=l(e);if(0!==c.length){var u=0;for(a=0;a<c.length;a++){var p=c[a];if(h(e,p)){if(!h(t,p))return!1;s.push(p),u++}else if(h(t,p))return!1}var f=l(t);if(c.length!==f.length&&R(t,f).length!==u)return!1}else{var m=l(t);if(0!==m.length&&0!==R(t,m).length)return!1}}if(0===s.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===r)r={val1:new Map,val2:new Map,position:0};else{var g=r.val1.get(e);if(void 0!==g){var v=r.val2.get(t);if(void 0!==v)return g===v}r.position++}r.val1.set(e,r.position),r.val2.set(t,r.position);var b=F(e,t,n,s,r,i);return r.val1.delete(e),r.val2.delete(t),b}function D(e,t,n,r){for(var i=o(e),s=0;s<i.length;s++){var a=i[s];if(I(t,a,n,r))return e.delete(a),!0}return!1}function Z(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(u(e))return!1}return!0}function L(e,t,n){var r=Z(n);return null!=r?r:t.has(r)&&!e.has(r)}function z(e,t,n,r,i){var s=Z(n);if(null!=s)return s;var o=t.get(s);return!(void 0===o&&!t.has(s)||!I(r,o,!1,i))&&(!e.has(s)&&I(r,o,!1,i))}function B(e,t,n,r,i,s){for(var a=o(e),c=0;c<a.length;c++){var l=a[c];if(I(n,l,i,s)&&I(r,t.get(l),i,s))return e.delete(l),!0}return!1}function F(e,t,n,s,c,l){var u=0;if(2===l){if(!function(e,t,n,r){for(var s=null,a=o(e),c=0;c<a.length;c++){var l=a[c];if("object"===i(l)&&null!==l)null===s&&(s=new Set),s.add(l);else if(!t.has(l)){if(n)return!1;if(!L(e,t,l))return!1;null===s&&(s=new Set),s.add(l)}}if(null!==s){for(var u=o(t),p=0;p<u.length;p++){var d=u[p];if("object"===i(d)&&null!==d){if(!D(s,d,n,r))return!1}else if(!n&&!e.has(d)&&!D(s,d,n,r))return!1}return 0===s.size}return!0}(e,t,n,c))return!1}else if(3===l){if(!function(e,t,n,s){for(var o=null,c=a(e),l=0;l<c.length;l++){var u=r(c[l],2),p=u[0],d=u[1];if("object"===i(p)&&null!==p)null===o&&(o=new Set),o.add(p);else{var h=t.get(p);if(void 0===h&&!t.has(p)||!I(d,h,n,s)){if(n)return!1;if(!z(e,t,p,d,s))return!1;null===o&&(o=new Set),o.add(p)}}}if(null!==o){for(var f=a(t),m=0;m<f.length;m++){var g=r(f[m],2),v=(p=g[0],g[1]);if("object"===i(p)&&null!==p){if(!B(o,e,p,v,n,s))return!1}else if(!(n||e.has(p)&&I(e.get(p),v,!1,s)||B(o,e,p,v,!1,s)))return!1}return 0===o.size}return!0}(e,t,n,c))return!1}else if(1===l)for(;u<e.length;u++){if(!d(e,u)){if(d(t,u))return!1;for(var p=Object.keys(e);u<p.length;u++){var h=p[u];if(!d(t,h)||!I(e[h],t[h],n,c))return!1}return p.length===Object.keys(t).length}if(!d(t,u)||!I(e[u],t[u],n,c))return!1}for(u=0;u<s.length;u++){var f=s[u];if(!I(e[f],t[f],n,c))return!1}return!0}e.exports={isDeepEqual:function(e,t){return I(e,t,false)},isDeepStrictEqual:function(e,t){return I(e,t,true)}}},62803:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=c(e),o=s[0],a=s[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),u=0,p=a>0?o-4:o;for(n=0;n<p;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,c=r-i;a<c;a+=o)s.push(l(e,a,a+o>c?c:a+o));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,s,o=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},30910:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(56095).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,u=n;u<a;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var p=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)p*=t;this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,p=67108863&c,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var f=l-h|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[h])+p)/67108864|0,p=67108863&o}n.words[l]=0|p,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=p[e],h=d[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);n=(f=f.idivn(h)).isZero()?m+n:u[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,c="le"===t,l=new e(s),u=this.clone();if(c){for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),l[a]=o;for(;a<s;a++)l[a]=0}else{for(a=0;a<s-i;a++)l[a]=0;for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),l[s-a-1]=o}return l},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,l=0,u=0|o[0],p=8191&u,d=u>>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],k=8191&y,w=y>>>13,_=0|o[4],E=8191&_,C=_>>>13,j=0|o[5],S=8191&j,M=j>>>13,N=0|o[6],x=8191&N,A=N>>>13,O=0|o[7],T=8191&O,P=O>>>13,I=0|o[8],R=8191&I,U=I>>>13,D=0|o[9],Z=8191&D,L=D>>>13,z=0|a[0],B=8191&z,F=z>>>13,V=0|a[1],q=8191&V,H=V>>>13,W=0|a[2],J=8191&W,$=W>>>13,K=0|a[3],G=8191&K,Y=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],pe=8191&ue,de=ue>>>13,he=0|a[9],fe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;l=((s=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,B),i=(i=Math.imul(f,F))+Math.imul(m,B)|0,s=Math.imul(m,F);var ve=(l+(r=r+Math.imul(p,q)|0)|0)+((8191&(i=(i=i+Math.imul(p,H)|0)+Math.imul(d,q)|0))<<13)|0;l=((s=s+Math.imul(d,H)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,B),i=(i=Math.imul(v,F))+Math.imul(b,B)|0,s=Math.imul(b,F),r=r+Math.imul(f,q)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,H)|0;var be=(l+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,$)|0)+Math.imul(d,J)|0))<<13)|0;l=((s=s+Math.imul(d,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(w,B)|0,s=Math.imul(w,F),r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,H)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,$)|0;var ye=(l+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,G)|0))<<13)|0;l=((s=s+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,B),i=(i=Math.imul(E,F))+Math.imul(C,B)|0,s=Math.imul(C,F),r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(w,q)|0,s=s+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,$)|0,r=r+Math.imul(f,G)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,G)|0,s=s+Math.imul(m,Y)|0;var ke=(l+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;l=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(S,B),i=(i=Math.imul(S,F))+Math.imul(M,B)|0,s=Math.imul(M,F),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(C,q)|0,s=s+Math.imul(C,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,$)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var we=(l+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;l=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,B),i=(i=Math.imul(x,F))+Math.imul(A,B)|0,s=Math.imul(A,F),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,$)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(w,G)|0,s=s+Math.imul(w,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(l+(r=r+Math.imul(p,se)|0)|0)+((8191&(i=(i=i+Math.imul(p,oe)|0)+Math.imul(d,se)|0))<<13)|0;l=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(P,B)|0,s=Math.imul(P,F),r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,H)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,$)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,G)|0,s=s+Math.imul(C,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(l+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((s=s+Math.imul(d,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,F))+Math.imul(U,B)|0,s=Math.imul(U,F),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,$)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,Q)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,le)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;l=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(Z,B),i=(i=Math.imul(Z,F))+Math.imul(L,B)|0,s=Math.imul(L,F),r=r+Math.imul(R,q)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(U,q)|0,s=s+Math.imul(U,H)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,$)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,G)|0,s=s+Math.imul(A,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,le)|0,r=r+Math.imul(f,pe)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(m,pe)|0,s=s+Math.imul(m,de)|0;var je=(l+(r=r+Math.imul(p,fe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,fe)|0))<<13)|0;l=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(Z,q),i=(i=Math.imul(Z,H))+Math.imul(L,q)|0,s=Math.imul(L,H),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,$)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,oe)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,le)|0,r=r+Math.imul(v,pe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(b,pe)|0,s=s+Math.imul(b,de)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;l=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(Z,J),i=(i=Math.imul(Z,$))+Math.imul(L,J)|0,s=Math.imul(L,$),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(U,G)|0,s=s+Math.imul(U,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(C,ce)|0,s=s+Math.imul(C,le)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(w,pe)|0,s=s+Math.imul(w,de)|0;var Me=(l+(r=r+Math.imul(v,fe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,fe)|0))<<13)|0;l=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(Z,G),i=(i=Math.imul(Z,Y))+Math.imul(L,G)|0,s=Math.imul(L,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(U,Q)|0,s=s+Math.imul(U,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,oe)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,le)|0,r=r+Math.imul(E,pe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(C,pe)|0,s=s+Math.imul(C,de)|0;var Ne=(l+(r=r+Math.imul(k,fe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(w,fe)|0))<<13)|0;l=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(Z,Q),i=(i=Math.imul(Z,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(U,ne)|0,s=s+Math.imul(U,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,le)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(M,pe)|0,s=s+Math.imul(M,de)|0;var xe=(l+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,fe)|0))<<13)|0;l=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(Z,ne),i=(i=Math.imul(Z,re))+Math.imul(L,ne)|0,s=Math.imul(L,re),r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(U,se)|0,s=s+Math.imul(U,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,le)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,pe)|0,s=s+Math.imul(A,de)|0;var Ae=(l+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(M,fe)|0))<<13)|0;l=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(Z,se),i=(i=Math.imul(Z,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(U,ce)|0,s=s+Math.imul(U,le)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(P,pe)|0,s=s+Math.imul(P,de)|0;var Oe=(l+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,fe)|0))<<13)|0;l=((s=s+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(Z,ce),i=(i=Math.imul(Z,le))+Math.imul(L,ce)|0,s=Math.imul(L,le),r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(U,pe)|0,s=s+Math.imul(U,de)|0;var Te=(l+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(P,fe)|0))<<13)|0;l=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(Z,pe),i=(i=Math.imul(Z,de))+Math.imul(L,pe)|0,s=Math.imul(L,de);var Pe=(l+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(U,fe)|0))<<13)|0;l=((s=s+Math.imul(U,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(l+(r=Math.imul(Z,fe))|0)+((8191&(i=(i=Math.imul(Z,me))+Math.imul(L,fe)|0))<<13)|0;return l=((s=Math.imul(L,me))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=ke,c[5]=we,c[6]=_e,c[7]=Ee,c[8]=Ce,c[9]=je,c[10]=Se,c[11]=Me,c[12]=Ne,c[13]=xe,c[14]=Ae,c[15]=Oe,c[16]=Te,c[17]=Pe,c[18]=Ie,0!==l&&(c[19]=l,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),s.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),l=Math.max(0,s-e.length+1);l<=c;l++){var u=s-l,p=(0|e.words[u])*(0|t.words[l]),d=67108863&p;a=67108863&(d=d+a|0),i+=(o=(o=o+(p/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var p=c,d=l,h=0;h<o;h++){var f=n[u+h],m=r[u+h],g=n[u+h+o],v=r[u+h+o],b=p*g-d*v;v=p*v+d*g,g=b,n[u+h]=f+g,r[u+h]=m+v,n[u+h+o]=f-g,r[u+h+o]=m-v,h!==a&&(b=c*p-l*d,d=c*d+l*p,p=b)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),c=new Array(r),l=new Array(r),u=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,s,a,c,r,i),this.transform(l,s,u,p,r,i);for(var h=0;h<r;h++){var f=a[h]*u[h]-c[h]*p[h];c[h]=a[h]*p[h]+c[h]*u[h],a[h]=f}return this.conjugate(a,c,r),this.transform(a,c,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<n;this.words[t]=c|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=n;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var p=0|this.words[l];this.words[l]=u<<26-s|p>>>s,u=p&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[i.length+p])+(0|r.words[i.length+p-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,p),r.isZero()||(r.negative^=1);a&&(a.words[p]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),c=new s(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),p=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(p)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(c)):(n.isub(t),a.isub(i),c.isub(o))}return{a:a,b:c,gcd:n.iushln(l)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var p=0,d=1;0==(n.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(n.iushrn(p);p-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(y,b),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(k,b),i(w,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new k;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var p=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=o;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var v=this.pow(p,new s(1).iushln(f-g-1));d=d.redMul(v),p=v.redSqr(),h=h.redMul(p),f=g}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var p=l>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new C(e)},i(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},53380:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(14864).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function l(e,t,n,i){for(var s=0,o=0,a=Math.min(e.length,n),c=t;c<a;c++){var l=e.charCodeAt(c)-48;s*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&o<i,"Invalid character"),s+=o}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,u=n;u<a;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var p=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)p*=t;this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){u(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch(e){s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?d[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(u).toString(e);n=(p=p.idivn(u)).isZero()?m+n:d[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,p=67108863&c,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var f=l-h|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[h])+p)/67108864|0,p=67108863&o}n.words[l]=0|p,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n++]=255&o,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),6===s?(n<e.length&&(e[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n--]=255&o,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),6===s?(n>=0&&(e[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,l=0,u=0|o[0],p=8191&u,d=u>>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],k=8191&y,w=y>>>13,_=0|o[4],E=8191&_,C=_>>>13,j=0|o[5],S=8191&j,M=j>>>13,N=0|o[6],x=8191&N,A=N>>>13,O=0|o[7],T=8191&O,P=O>>>13,I=0|o[8],R=8191&I,U=I>>>13,D=0|o[9],Z=8191&D,L=D>>>13,z=0|a[0],B=8191&z,F=z>>>13,V=0|a[1],q=8191&V,H=V>>>13,W=0|a[2],J=8191&W,$=W>>>13,K=0|a[3],G=8191&K,Y=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],pe=8191&ue,de=ue>>>13,he=0|a[9],fe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;l=((s=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,B),i=(i=Math.imul(f,F))+Math.imul(m,B)|0,s=Math.imul(m,F);var ve=(l+(r=r+Math.imul(p,q)|0)|0)+((8191&(i=(i=i+Math.imul(p,H)|0)+Math.imul(d,q)|0))<<13)|0;l=((s=s+Math.imul(d,H)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,B),i=(i=Math.imul(v,F))+Math.imul(b,B)|0,s=Math.imul(b,F),r=r+Math.imul(f,q)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,H)|0;var be=(l+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,$)|0)+Math.imul(d,J)|0))<<13)|0;l=((s=s+Math.imul(d,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(w,B)|0,s=Math.imul(w,F),r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,H)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,$)|0;var ye=(l+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,G)|0))<<13)|0;l=((s=s+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,B),i=(i=Math.imul(E,F))+Math.imul(C,B)|0,s=Math.imul(C,F),r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(w,q)|0,s=s+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,$)|0,r=r+Math.imul(f,G)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,G)|0,s=s+Math.imul(m,Y)|0;var ke=(l+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;l=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(S,B),i=(i=Math.imul(S,F))+Math.imul(M,B)|0,s=Math.imul(M,F),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(C,q)|0,s=s+Math.imul(C,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,$)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var we=(l+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;l=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,B),i=(i=Math.imul(x,F))+Math.imul(A,B)|0,s=Math.imul(A,F),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,$)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(w,G)|0,s=s+Math.imul(w,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(l+(r=r+Math.imul(p,se)|0)|0)+((8191&(i=(i=i+Math.imul(p,oe)|0)+Math.imul(d,se)|0))<<13)|0;l=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(P,B)|0,s=Math.imul(P,F),r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,H)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,$)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,G)|0,s=s+Math.imul(C,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(l+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((s=s+Math.imul(d,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,F))+Math.imul(U,B)|0,s=Math.imul(U,F),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,$)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,Q)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,le)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;l=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(Z,B),i=(i=Math.imul(Z,F))+Math.imul(L,B)|0,s=Math.imul(L,F),r=r+Math.imul(R,q)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(U,q)|0,s=s+Math.imul(U,H)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,$)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,G)|0,s=s+Math.imul(A,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,le)|0,r=r+Math.imul(f,pe)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(m,pe)|0,s=s+Math.imul(m,de)|0;var je=(l+(r=r+Math.imul(p,fe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,fe)|0))<<13)|0;l=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(Z,q),i=(i=Math.imul(Z,H))+Math.imul(L,q)|0,s=Math.imul(L,H),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,$)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,oe)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,le)|0,r=r+Math.imul(v,pe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(b,pe)|0,s=s+Math.imul(b,de)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;l=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(Z,J),i=(i=Math.imul(Z,$))+Math.imul(L,J)|0,s=Math.imul(L,$),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(U,G)|0,s=s+Math.imul(U,Y)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(C,ce)|0,s=s+Math.imul(C,le)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(w,pe)|0,s=s+Math.imul(w,de)|0;var Me=(l+(r=r+Math.imul(v,fe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,fe)|0))<<13)|0;l=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(Z,G),i=(i=Math.imul(Z,Y))+Math.imul(L,G)|0,s=Math.imul(L,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(U,Q)|0,s=s+Math.imul(U,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,oe)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,le)|0,r=r+Math.imul(E,pe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(C,pe)|0,s=s+Math.imul(C,de)|0;var Ne=(l+(r=r+Math.imul(k,fe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(w,fe)|0))<<13)|0;l=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(Z,Q),i=(i=Math.imul(Z,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(U,ne)|0,s=s+Math.imul(U,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,le)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(M,pe)|0,s=s+Math.imul(M,de)|0;var xe=(l+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,fe)|0))<<13)|0;l=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(Z,ne),i=(i=Math.imul(Z,re))+Math.imul(L,ne)|0,s=Math.imul(L,re),r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(U,se)|0,s=s+Math.imul(U,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,le)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,pe)|0,s=s+Math.imul(A,de)|0;var Ae=(l+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(M,fe)|0))<<13)|0;l=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(Z,se),i=(i=Math.imul(Z,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(U,ce)|0,s=s+Math.imul(U,le)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(P,pe)|0,s=s+Math.imul(P,de)|0;var Oe=(l+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,fe)|0))<<13)|0;l=((s=s+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(Z,ce),i=(i=Math.imul(Z,le))+Math.imul(L,ce)|0,s=Math.imul(L,le),r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(U,pe)|0,s=s+Math.imul(U,de)|0;var Te=(l+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(P,fe)|0))<<13)|0;l=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(Z,pe),i=(i=Math.imul(Z,de))+Math.imul(L,pe)|0,s=Math.imul(L,de);var Pe=(l+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(U,fe)|0))<<13)|0;l=((s=s+Math.imul(U,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(l+(r=Math.imul(Z,fe))|0)+((8191&(i=(i=Math.imul(Z,me))+Math.imul(L,fe)|0))<<13)|0;return l=((s=Math.imul(L,me))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=ke,c[5]=we,c[6]=_e,c[7]=Ee,c[8]=Ce,c[9]=je,c[10]=Se,c[11]=Me,c[12]=Ne,c[13]=xe,c[14]=Ae,c[15]=Oe,c[16]=Te,c[17]=Pe,c[18]=Ie,0!==l&&(c[19]=l,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),l=Math.max(0,s-e.length+1);l<=c;l++){var u=s-l,p=(0|e.words[u])*(0|t.words[l]),d=67108863&p;a=67108863&(d=d+a|0),i+=(o=(o=o+(p/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return v(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},y.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var p=c,d=l,h=0;h<o;h++){var f=n[u+h],m=r[u+h],g=n[u+h+o],v=r[u+h+o],b=p*g-d*v;v=p*v+d*g,g=b,n[u+h]=f+g,r[u+h]=m+v,n[u+h+o]=f-g,r[u+h+o]=m-v,h!==a&&(b=c*p-l*d,d=c*d+l*p,p=b)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),c=new Array(r),l=new Array(r),u=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,s,a,c,r,i),this.transform(l,s,u,p,r,i);for(var h=0;h<r;h++){var f=a[h]*u[h]-c[h]*p[h];c[h]=a[h]*p[h]+c[h]*u[h],a[h]=f}return this.conjugate(a,c,r),this.transform(a,c,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),b(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<n;this.words[t]=c|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=n;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var p=0|this.words[l];this.words[l]=u<<26-s|p>>>s,u=p&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[i.length+p])+(0|r.words[i.length+p-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,p),r.isZero()||(r.negative^=1);a&&(a.words[p]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),c=new s(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),p=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(p)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(c)):(n.isub(t),a.isub(i),c.isub(o))}return{a:a,b:c,gcd:n.iushln(l)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var p=0,d=1;0==(n.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(n.iushrn(p);p-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new S(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var k={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(C,w),i(j,w),j.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(k[e])return k[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new j}return k[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var p=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=o;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var v=this.pow(p,new s(1).iushln(f-g-1));d=d.redMul(v),p=v.redSqr(),h=h.redMul(p),f=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var p=l>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}c=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new M(e)},i(M,S),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},98707:function(e,t,n){var r=n(52221);e.exports=function(e){var t=null,n=r(e);if(3===e.nodeType){var i=n.createRange();i.selectNodeContents(e),e=i}if("function"==typeof e.getBoundingClientRect&&(t=e.getBoundingClientRect(),e.startContainer&&0===t.left&&0===t.top)){var s=n.createElement("span");s.appendChild(n.createTextNode("​")),e.insertNode(s),t=s.getBoundingClientRect();var o=s.parentNode;o.removeChild(s),o.normalize()}return t}},71876:function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=n(69627);if("function"!=typeof s.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return s.randomBytes(e)}}catch(e){}},9111:function(e,t,n){var r=n(37225).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function s(e){for(;0<e.length;e++)e[0]=0}function o(e,t,n,r,i){for(var s,o,a,c,l=n[0],u=n[1],p=n[2],d=n[3],h=e[0]^t[0],f=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,b=1;b<i;b++)s=l[h>>>24]^u[f>>>16&255]^p[m>>>8&255]^d[255&g]^t[v++],o=l[f>>>24]^u[m>>>16&255]^p[g>>>8&255]^d[255&h]^t[v++],a=l[m>>>24]^u[g>>>16&255]^p[h>>>8&255]^d[255&f]^t[v++],c=l[g>>>24]^u[h>>>16&255]^p[f>>>8&255]^d[255&m]^t[v++],h=s,f=o,m=a,g=c;return s=(r[h>>>24]<<24|r[f>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],o=(r[f>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[v++],a=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&f])^t[v++],c=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[f>>>8&255]<<8|r[255&m])^t[v++],[s>>>=0,o>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,c=0;c<256;++c){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,n[o]=l,r[l]=o;var u=e[o],p=e[u],d=e[p],h=257*e[l]^16843008*l;i[0][o]=h<<24|h>>>8,i[1][o]=h<<16|h>>>16,i[2][o]=h<<8|h>>>24,i[3][o]=h,h=16843009*d^65537*p^257*u^16843008*o,s[0][l]=h<<24|h>>>8,s[1][l]=h<<16|h>>>16,s[2][l]=h<<8|h>>>24,s[3][l]=h,0===o?o=a=1:(o=u^e[e[e[d^u]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:s}}();function l(e){this._key=i(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],s=0;s<t;s++)i[s]=e[s];for(s=t;s<r;s++){var o=i[s-1];s%t==0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=a[s/t|0]<<24):t>6&&s%t==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),i[s]=i[s-t]^o}for(var l=[],u=0;u<r;u++){var p=r-u,d=i[p-(u%4?0:4)];l[u]=u<4||p<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return o(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=o(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),s=r.allocUnsafe(16);return s.writeUInt32BE(n[0],0),s.writeUInt32BE(n[3],4),s.writeUInt32BE(n[2],8),s.writeUInt32BE(n[1],12),s},l.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},e.exports.AES=l},43667:function(e,t,n){var r=n(9111),i=n(37225).Buffer,s=n(69239),o=n(59503),a=n(83579),c=n(35375),l=n(35127);function u(e,t,n,o){s.call(this);var c=i.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(c);this._ghash=new a(u),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new a(n),s=t.length,o=s%16;r.update(t),o&&(o=16-o,r.update(i.alloc(o,0))),r.update(i.alloc(8,0));var c=8*s,u=i.alloc(8);u.writeUIntBE(c,0,8),r.update(u),e._finID=r.state;var p=i.from(e._finID);return l(p),p}(this,n,u),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,s),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=u},6123:function(e,t,n){var r=n(37180),i=n(68161),s=n(4317);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(s)}},68161:function(e,t,n){var r=n(43667),i=n(37225).Buffer,s=n(54354),o=n(76085),a=n(69239),c=n(9111),l=n(51105);function u(e,t,n){a.call(this),this._cache=new p,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function p(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new u(a.module,t,n)}n(59503)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=i.concat([this.cache,e])},p.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},p.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=l(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},37180:function(e,t,n){var r=n(54354),i=n(43667),s=n(37225).Buffer,o=n(76085),a=n(69239),c=n(9111),l=n(51105);function u(e,t,n){a.call(this),this._cache=new d,this._cipher=new c.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}n(59503)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return s.concat(r)};var p=s.alloc(16,16);function d(){this.cache=s.allocUnsafe(0)}function h(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=s.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new o(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new u(a.module,t,n)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=s.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return s.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return h(e,i.key,i.iv)}},83579:function(e,t,n){var r=n(37225).Buffer,i=r.alloc(16,0);function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=o},35127:function(e){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},62113:function(e,t,n){var r=n(35375);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},1634:function(e,t,n){var r=n(37225).Buffer,i=n(35375);function s(e,t,n){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=r.concat([e._prev,n?t:o]),o}t.encrypt=function(e,t,n){for(var i,o=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){o=r.concat([o,s(e,t,n)]);break}i=e._cache.length,o=r.concat([o,s(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},34422:function(e,t,n){var r=n(37225).Buffer;function i(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=s(e._prev,n?r:i);return a}function s(e,t){var n=e.length,i=-1,s=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)s[i]=e[i]<<1|e[i+1]>>7;return s}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},46750:function(e,t,n){var r=n(37225).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},92204:function(e,t,n){var r=n(35375),i=n(37225).Buffer,s=n(35127);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),s=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var c=o(e),l=s+16*a;e._cache.writeUInt32BE(c[0],l+0),e._cache.writeUInt32BE(c[1],l+4),e._cache.writeUInt32BE(c[2],l+8),e._cache.writeUInt32BE(c[3],l+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,u)}},59252:function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},54354:function(e,t,n){var r={ECB:n(59252),CBC:n(62113),CFB:n(1634),CFB8:n(46750),CFB1:n(34422),OFB:n(985),CTR:n(92204),GCM:n(92204)},i=n(4317);for(var s in i)i[s].module=r[i[s].mode];e.exports=i},985:function(e,t,n){var r=n(90778).Buffer,i=n(35375);function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=r.concat([e._cache,s(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,n)}},76085:function(e,t,n){var r=n(9111),i=n(37225).Buffer,s=n(69239);function o(e,t,n,o){s.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=e}n(59503)(o,s),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},83936:function(e,t,n){var r=n(63079),i=n(6123),s=n(54354),o=n(52324),a=n(51105);function c(e,t,n){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function l(e,t,n){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return l(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},63079:function(e,t,n){var r=n(69239),i=n(98625),s=n(59503),o=n(37225).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){r.call(this);var t,n=e.mode.toLowerCase(),i=a[n];t=e.decrypt?"decrypt":"encrypt";var s=e.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=o.concat([s,s.slice(0,8)]));var c=e.iv;o.isBuffer(c)||(c=o.from(c)),this._des=i.create({key:s,iv:c,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=c,s(c,r),c.prototype._update=function(e){return o.from(this._des.update(e))},c.prototype._final=function(){return o.from(this._des.final())}},52324:function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},8568:function(e,t,n){var r=n(90778).Buffer,i=n(53380),s=n(35175);function o(e){var t,n=e.modulus.byteLength();do{t=new i(s(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var n=function(e){var t=o(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),s=t.modulus.byteLength(),a=new i(e).mul(n.blinder).umod(t.modulus),c=a.toRed(i.mont(t.prime1)),l=a.toRed(i.mont(t.prime2)),u=t.coefficient,p=t.prime1,d=t.prime2,h=c.redPow(t.exponent1).fromRed(),f=l.redPow(t.exponent2).fromRed(),m=h.isub(f).imul(u).umod(p).imul(d);return f.iadd(m).imul(n.unblinder).umod(t.modulus).toArrayLike(r,"be",s)}a.getr=o,e.exports=a},60451:function(e,t,n){e.exports=n(1877)},29908:function(e,t,n){var r=n(37225).Buffer,i=n(77439),s=n(7130),o=n(59503),a=n(75043),c=n(53075),l=n(1877);function u(e){s.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function p(e){s.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new u(e)}function h(e){return new p(e)}Object.keys(l).forEach((function(e){l[e].id=r.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),o(u,s.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(p,s.Writable),p.prototype._write=function(e,t,n){this._hash.update(e),n()},p.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},p.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return c(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},75043:function(e,t,n){var r=n(37225).Buffer,i=n(40445),s=n(8568),o=n(73931).ec,a=n(53380),c=n(87758),l=n(72968);function u(e,t,n,s){if((e=r.from(e.toArray())).length<t.byteLength()){var o=r.alloc(t.byteLength()-e.length);e=r.concat([o,e])}var a=n.length,c=function(e,t){e=(e=p(e,t)).mod(t);var n=r.from(e.toArray());if(n.length<t.byteLength()){var i=r.alloc(t.byteLength()-n.length);n=r.concat([i,n])}return n}(n,t),l=r.alloc(a);l.fill(1);var u=r.alloc(a);return u=i(s,u).update(l).update(r.from([0])).update(e).update(c).digest(),l=i(s,u).update(l).digest(),{k:u=i(s,u).update(l).update(r.from([1])).update(e).update(c).digest(),v:l=i(s,u).update(l).digest()}}function p(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function d(e,t,n){var s,o;do{for(s=r.alloc(0);8*s.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),s=r.concat([s,t.v]);o=p(s,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function h(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,n,i,f){var m=c(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var n=l[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var i=new o(n).keyFromPrivate(t.privateKey).sign(e);return r.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,n){var i,s=t.params.priv_key,o=t.params.p,c=t.params.q,l=t.params.g,f=new a(0),m=p(e,c).mod(c),g=!1,v=u(s,c,e,n);for(;!1===g;)f=h(l,i=d(c,v,n),o,c),0===(g=i.invm(c).imul(m.add(s.mul(f))).mod(c)).cmpn(0)&&(g=!1,f=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var n=[48,e.length+t.length+4,2,e.length];return n=n.concat(e,[2,t.length],t),r.from(n)}(f,g)}(e,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([f,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return s(v,m)},e.exports.getKey=u,e.exports.makeKey=d},53075:function(e,t,n){var r=n(37225).Buffer,i=n(53380),s=n(73931).ec,o=n(87758),a=n(72968);function c(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,l,u){var p=o(n);if("ec"===p.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),o=n.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,p)}if("dsa"===p.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,s=n.data.q,a=n.data.g,l=n.data.pub_key,u=o.signature.decode(e,"der"),p=u.s,d=u.r;c(p,s),c(d,s);var h=i.mont(r),f=p.invm(s);return 0===a.toRed(h).redPow(new i(t).mul(f).mod(s)).fromRed().mul(l.toRed(h).redPow(d.mul(f).mod(s)).fromRed()).mod(r).mod(s).cmp(d)}(e,t,p)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=r.concat([u,t]);for(var d=p.modulus.byteLength(),h=[1],f=0;t.length+h.length+2<d;)h.push(255),f++;h.push(0);for(var m=-1;++m<t.length;)h.push(t[m]);h=r.from(h);var g=i.mont(p.modulus);e=(e=new i(e).toRed(g)).redPow(new i(p.publicExponent)),e=r.from(e.fromRed().toArray());var v=f<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(v=1),m=-1;++m<d;)v|=e[m]^h[m];return 0===v}},35375:function(e,t,n){var r=n(90778).Buffer;e.exports=function(e,t){for(var n=Math.min(e.length,t.length),i=new r(n),s=0;s<n;++s)i[s]=e[s]^t[s];return i}},90778:function(e,t,n){"use strict";var r=n(55246);const i=n(62803),s=n(23644),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function c(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=c(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|m(e.length),n=c(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?c(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return p(e),c(e<0?0:0|m(e))}function h(e){const t=e.length<0?0:0|m(e.length),n=c(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function m(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:k(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):k(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function k(e,t,n,r,i){let s,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(s=n;s<a;s++)if(l(e,s)===l(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===c)return r*o}else-1!==r&&(s-=s-r),r=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){let n=!0;for(let r=0;r<c;r++)if(l(e,s+r)!==l(t,r)){n=!1;break}if(n)return s}return-1}function w(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let o;for(r>s/2&&(r=s/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(Y(r))return o;e[n+o]=r}return o}function _(e,t,n,r){return K(J(t,e.length-n),e,n,r)}function E(e,t,n,r){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return K($(t),e,n,r)}function j(e,t,n,r){return K(function(e,t){let n,r,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,a,c;switch(o){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(s=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=o}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=N));return n}(r)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||void 0===r||"function"!=typeof r.error||r.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return p(e),e<=0?c(e):void 0!==t?"string"==typeof n?c(e).fill(t,n):c(e).fill(t):c(e)}(e,t,n)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(G(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?M(this,0,e):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<a;++e)if(c[e]!==u[e]){s=c[e],o=u[e];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function x(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function A(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=X[e[r]];return i}function T(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function D(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Z(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,4),s.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,8),s.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=0,s=1,o=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=n-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return Z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return Z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=l.isBuffer(e)?e:l.from(e,r),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%o]}return this};const z={};function B(e,t,n){z[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,s)}function q(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=F(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function J(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function $(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}f