File: /var/www/sites/1250.info/wp-content/plugins/woocommerce-payments/dist/tos.js
/*! For license information please see tos.js.LICENSE.txt */
!function(){var e={77766:function(e,t,n){n(8065)},20116:function(e,t,n){n(11955)},2991:function(e,t,n){n(61798)},3649:function(e,t,n){n(82073)},29828:function(e,t,n){n(35178)},25843:function(e,t,n){n(76361)},86902:function(e,t,n){n(23059)},63109:function(e,t,n){e.exports=n(35666)},94184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===i)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?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},15367:function(e,t,n){n(85906);var r=n(35703);e.exports=r("Array").concat},62383:function(e,t,n){n(21501);var r=n(35703);e.exports=r("Array").filter},23866:function(e,t,n){n(68787);var r=n(35703);e.exports=r("Array").map},24900:function(e,t,n){n(60186);var r=n(35703);e.exports=r("Array").slice},56043:function(e,t,n){var r=n(15367),o=Array.prototype;e.exports=function(e){var t=e.concat;return e===o||e instanceof Array&&t===o.concat?r:t}},2480:function(e,t,n){var r=n(62383),o=Array.prototype;e.exports=function(e){var t=e.filter;return e===o||e instanceof Array&&t===o.filter?r:t}},88287:function(e,t,n){var r=n(23866),o=Array.prototype;e.exports=function(e){var t=e.map;return e===o||e instanceof Array&&t===o.map?r:t}},69601:function(e,t,n){var r=n(24900),o=Array.prototype;e.exports=function(e){var t=e.slice;return e===o||e instanceof Array&&t===o.slice?r:t}},71611:function(e,t,n){var r=n(3269),o=String.prototype;e.exports=function(e){var t=e.startsWith;return"string"==typeof e||e===o||e instanceof String&&t===o.startsWith?r:t}},62774:function(e,t,n){var r=n(13348),o=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===o||e instanceof String&&t===o.trim?r:t}},48494:function(e,t,n){n(21724);var r=n(54058);e.exports=r.Object.keys},3269:function(e,t,n){n(94761);var r=n(35703);e.exports=r("String").startsWith},13348:function(e,t,n){n(57398);var r=n(35703);e.exports=r("String").trim},33916:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},96059:function(e,t,n){var r=n(10941);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},31692:function(e,t,n){var r=n(74529),o=n(43057),i=n(59413),c=function(e){return function(t,n,c){var a,u=r(t),s=o(u.length),l=i(c,s);if(e&&n!=n){for(;s>l;)if((a=u[l++])!=a)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},3610:function(e,t,n){var r=n(86843),o=n(37026),i=n(89678),c=n(43057),a=n(64692),u=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,l=4==e,f=6==e,p=7==e,d=5==e||f;return function(h,m,v,y){for(var g,w,b=i(h),_=o(b),E=r(m,v,3),O=c(_.length),S=0,x=y||a,C=t?x(h,O):n||p?x(h,0):void 0;O>S;S++)if((d||S in _)&&(w=E(g=_[S],S,b),e))if(t)C[S]=w;else if(w)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:u.call(C,g)}else switch(e){case 4:return!1;case 7:u.call(C,g)}return f?-1:s||l?l:C}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},50568:function(e,t,n){var r=n(95981),o=n(99813),i=n(53385),c=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},64692:function(e,t,n){var r=n(10941),o=n(1052),i=n(99813)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},82532:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},67772:function(e,t,n){var r=n(99813)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},32029:function(e,t,n){var r=n(55746),o=n(65988),i=n(31887);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},31887:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},55449:function(e,t,n){"use strict";var r=n(46935),o=n(65988),i=n(31887);e.exports=function(e,t,n){var c=r(t);c in e?o.f(e,c,i(0,n)):e[c]=n}},55746:function(e,t,n){var r=n(95981);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},61333:function(e,t,n){var r=n(21899),o=n(10941),i=r.document,c=o(i)&&o(i.createElement);e.exports=function(e){return c?i.createElement(e):{}}},6049:function(e,t,n){var r=n(82532),o=n(21899);e.exports="process"==r(o.process)},2861:function(e,t,n){var r=n(626);e.exports=r("navigator","userAgent")||""},53385:function(e,t,n){var r,o,i=n(21899),c=n(2861),a=i.process,u=a&&a.versions,s=u&&u.v8;s?o=(r=s.split("."))[0]+r[1]:c&&(!(r=c.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},35703:function(e,t,n){var r=n(54058);e.exports=function(e){return r[e+"Prototype"]}},56759:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},76887:function(e,t,n){"use strict";var r=n(21899),o=n(49677).f,i=n(37252),c=n(54058),a=n(86843),u=n(32029),s=n(47457),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,d,h,m,v,y,g=e.target,w=e.global,b=e.stat,_=e.proto,E=w?r:b?r[g]:(r[g]||{}).prototype,O=w?c:c[g]||(c[g]={}),S=O.prototype;for(p in t)n=!i(w?p:g+(b?".":"#")+p,e.forced)&&E&&s(E,p),h=O[p],n&&(m=e.noTargetGet?(y=o(E,p))&&y.value:E[p]),d=n&&m?m:t[p],n&&typeof h==typeof d||(v=e.bind&&n?a(d,r):e.wrap&&n?l(d):_&&"function"==typeof d?a(Function.call,d):d,(e.sham||d&&d.sham||h&&h.sham)&&u(v,"sham",!0),O[p]=v,_&&(s(c,f=g+"Prototype")||u(c,f,{}),c[f][p]=d,e.real&&S&&!S[p]&&u(S,p,d)))}},95981:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},86843:function(e,t,n){var r=n(33916);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},626:function(e,t,n){var r=n(54058),o=n(21899),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},21899:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},47457:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},27748:function(e){e.exports={}},2840:function(e,t,n){var r=n(55746),o=n(95981),i=n(61333);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},37026:function(e,t,n){var r=n(95981),o=n(82532),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},1052:function(e,t,n){var r=n(82532);e.exports=Array.isArray||function(e){return"Array"==r(e)}},37252:function(e,t,n){var r=n(95981),o=/#|\.prototype\./,i=function(e,t){var n=a[c(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},c=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},a=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},10941:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},82529:function(e){e.exports=!0},60685:function(e,t,n){var r=n(10941),o=n(82532),i=n(99813)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},72497:function(e,t,n){var r=n(6049),o=n(53385),i=n(95981);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!Symbol.sham&&(r?38===o:o>37&&o<41)}))},70344:function(e,t,n){var r=n(60685);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},65988:function(e,t,n){var r=n(55746),o=n(2840),i=n(96059),c=n(46935),a=Object.defineProperty;t.f=r?a:function(e,t,n){if(i(e),t=c(t,!0),i(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},49677:function(e,t,n){var r=n(55746),o=n(36760),i=n(31887),c=n(74529),a=n(46935),u=n(47457),s=n(2840),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=c(e),t=a(t,!0),s)try{return l(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},55629:function(e,t,n){var r=n(47457),o=n(74529),i=n(31692).indexOf,c=n(27748);e.exports=function(e,t){var n,a=o(e),u=0,s=[];for(n in a)!r(c,n)&&r(a,n)&&s.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~i(s,n)||s.push(n));return s}},14771:function(e,t,n){var r=n(55629),o=n(56759);e.exports=Object.keys||function(e){return r(e,o)}},36760:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},54058:function(e){e.exports={}},48219:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4911:function(e,t,n){var r=n(21899),o=n(32029);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},63030:function(e,t,n){var r=n(21899),o=n(4911),i="__core-js_shared__",c=r[i]||o(i,{});e.exports=c},68726:function(e,t,n){var r=n(82529),o=n(63030);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},93093:function(e,t,n){var r=n(95981),o=n(73483);e.exports=function(e){return r((function(){return!!o[e]()||"
"!="
"[e]()||o[e].name!==e}))}},74853:function(e,t,n){var r=n(48219),o="["+n(73483)+"]",i=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),a=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(c,"")),n}};e.exports={start:a(1),end:a(2),trim:a(3)}},59413:function(e,t,n){var r=n(68459),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},74529:function(e,t,n){var r=n(37026),o=n(48219);e.exports=function(e){return r(o(e))}},68459:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},43057:function(e,t,n){var r=n(68459),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},89678:function(e,t,n){var r=n(48219);e.exports=function(e){return Object(r(e))}},46935:function(e,t,n){var r=n(10941);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},99418:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},32302:function(e,t,n){var r=n(72497);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},99813:function(e,t,n){var r=n(21899),o=n(68726),i=n(47457),c=n(99418),a=n(72497),u=n(32302),s=o("wks"),l=r.Symbol,f=u?l:l&&l.withoutSetter||c;e.exports=function(e){return i(s,e)&&(a||"string"==typeof s[e])||(a&&i(l,e)?s[e]=l[e]:s[e]=f("Symbol."+e)),s[e]}},73483:function(e){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},85906:function(e,t,n){"use strict";var r=n(76887),o=n(95981),i=n(1052),c=n(10941),a=n(89678),u=n(43057),s=n(55449),l=n(64692),f=n(50568),p=n(99813),d=n(53385),h=p("isConcatSpreadable"),m=9007199254740991,v="Maximum allowed index exceeded",y=d>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),w=function(e){if(!c(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!y||!g},{concat:function(e){var t,n,r,o,i,c=a(this),f=l(c,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(w(i=-1===t?c:arguments[t])){if(p+(o=u(i.length))>m)throw TypeError(v);for(n=0;n<o;n++,p++)n in i&&s(f,p,i[n])}else{if(p>=m)throw TypeError(v);s(f,p++,i)}return f.length=p,f}})},21501:function(e,t,n){"use strict";var r=n(76887),o=n(3610).filter;r({target:"Array",proto:!0,forced:!n(50568)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},68787:function(e,t,n){"use strict";var r=n(76887),o=n(3610).map;r({target:"Array",proto:!0,forced:!n(50568)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},60186:function(e,t,n){"use strict";var r=n(76887),o=n(10941),i=n(1052),c=n(59413),a=n(43057),u=n(74529),s=n(55449),l=n(99813),f=n(50568)("slice"),p=l("species"),d=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,l,f=u(this),m=a(f.length),v=c(e,m),y=c(void 0===t?m:t,m);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(f,v,y);for(r=new(void 0===n?Array:n)(h(y-v,0)),l=0;v<y;v++,l++)v in f&&s(r,l,f[v]);return r.length=l,r}})},21724:function(e,t,n){var r=n(76887),o=n(89678),i=n(14771);r({target:"Object",stat:!0,forced:n(95981)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},94761:function(e,t,n){"use strict";var r,o=n(76887),i=n(49677).f,c=n(43057),a=n(70344),u=n(48219),s=n(67772),l=n(82529),f="".startsWith,p=Math.min,d=s("startsWith");o({target:"String",proto:!0,forced:!(!l&&!d&&(r=i(String.prototype,"startsWith"),r&&!r.writable)||d)},{startsWith:function(e){var t=String(u(this));a(e);var n=c(p(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},57398:function(e,t,n){"use strict";var r=n(76887),o=n(74853).trim;r({target:"String",proto:!0,forced:n(93093)("trim")},{trim:function(){return o(this)}})},8065:function(e,t,n){var r=n(56043);e.exports=r},11955:function(e,t,n){var r=n(2480);e.exports=r},61798:function(e,t,n){var r=n(88287);e.exports=r},82073:function(e,t,n){var r=n(69601);e.exports=r},35178:function(e,t,n){var r=n(71611);e.exports=r},76361:function(e,t,n){var r=n(62774);e.exports=r},23059:function(e,t,n){var r=n(48494);e.exports=r},60139:function(e){"use strict";function t(e){return function(){return e}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},73759:function(e){"use strict";e.exports=function(e,t,n,r,o,i,c,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,c,a],l=0;(u=new Error(t.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},63620:function(e,t,n){"use strict";var r=n(60139);e.exports=r},96746:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=a(n(99196)),i=a(n(49156)),c=a(n(76743));function a(e){return e&&e.__esModule?e:{default:e}}var u=void 0;function s(e,t){var n,c,a,l,f,p,d,h,m=[],v={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+u);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],a=p;break}m.push(t[f.value])}else m.push(f.value);return n&&(l=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(a,e),d=s(e.slice(a+1,l),t),c=o.default.cloneElement(n,{},d),m.push(c),l<e.length-1&&(h=s(e.slice(l+1),t),m=m.concat(h))),1===m.length?m[0]:(m.forEach((function(e,t){e&&(v["interpolation-child-"+t]=e)})),(0,i.default)(v))}t.Z=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(u=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return s(i,n)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},76743:function(e){"use strict";function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},29016:function(e){"use strict";e.exports=function(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,a=void 0===n?".":n,u="";return u=(i?function(e,t){if(-1===(""+e).indexOf("e"))return+(Math.round(e+"e+"+t)+"e-"+t);var n=(""+e).split("e"),r="";return+n[1]+t>0&&(r="+"),(+(Math.round(+n[0]+"e"+r+(+n[1]+t))+"e-"+t)).toFixed(t)}(o,i).toString():""+Math.round(o)).split("."),u[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(u[1]||"").length<i&&(u[1]=u[1]||"",u[1]+=new Array(i-u[1].length+1).join("0")),u.join(a)}},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!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:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,u=[],s=!1,l=-1;function f(){s&&a&&(s=!1,a.length?u=a.concat(u):l=-1,u.length&&p())}function p(){if(!s){var e=c(f);s=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,s=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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 d(e,t){this.fun=e,this.array=t}function h(){}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];u.push(new d(e,t)),1!==u.length||s||c(p)},d.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=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,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}},49156:function(e,t,n){"use strict";var r=n(99196),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(60139),c=n(73759),a=n(63620),u="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function l(e,t,n,r){var i,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||"object"===a&&e.$$typeof===o)return n(r,e,""===t?"."+s(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var d=0;d<e.length;d++)f+=l(i=e[d],p+s(i,d),n,r);else{var h=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h)for(var m,v=h.call(e),y=0;!(m=v.next()).done;)f+=l(i=m.value,p+s(i,y++),n,r);else if("object"===a){var g=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===g?"object with keys {"+Object.keys(e).join(", ")+"}":g,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var d,h,m=v,v=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)};function y(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function g(e,t,n){var o,c,a=e.result,u=e.keyPrefix,s=e.func,l=e.context,f=s.call(l,t,e.count++);Array.isArray(f)?w(f,a,n,i.thatReturnsArgument):null!=f&&(r.isValidElement(f)&&(o=f,c=u+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),a.push(f))}function w(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var c=y.getPooled(t,i,r,o);!function(e,t,n){null==e||l(e,"",t,n)}(e,g,c),y.release(c)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},(h=y).instancePool=[],h.getPooled=d||m,h.poolSize||(h.poolSize=10),h.release=function(e){var t=this;c(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return a(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return a(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,i.thatReturnsArgument);return t}},35666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new P(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var a=x(c,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?h:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,c),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",m={};function v(){}function y(){}function g(){}var w={};w[i]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(k([])));_&&_!==n&&r.call(_,i)&&(w=_);var E=g.prototype=v.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,c,a){var u=l(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,a)}),(function(e){n("throw",e,c,a)})):t.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,a)}))}a(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function k(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,c=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return c.next=c}}return{next:R}}function R(){return{value:t,done:!0}}return y.prototype=E.constructor=g,g.constructor=y,y.displayName=u(g,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,a,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},O(S.prototype),S.prototype[c]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var c=new S(s(t,n,r,o),i);return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},O(E),u(E,a,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var u=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(u&&s){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(u){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=e,c.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},99196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=(n(99196),window.ReactDOM),r=n.n(t);function o(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var c=e.apply(t,n);function a(e){o(c,r,i,a,u,"next",e)}function u(e){o(c,r,i,a,u,"throw",e)}a(void 0)}))}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var l=n(63109),f=n.n(l),p=window.wp.i18n,d=n(96746);function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(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&&g(e,t)}function b(e){return b="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},b(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?_(e):t}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var S=window.wp.compose,x=window.wp.deprecated,C=n.n(x),T=n(94184),P=n.n(T),k=window.wp.keycodes;function R(e){e.stopPropagation()}var D=(0,e.forwardRef)((function(t,n){var r=t.children,o=h(t,["children"]);return(0,e.createElement)("div",s({},o,{ref:n,onMouseDown:R}),r)})),N=window.lodash;var j=["button","submit"],A=(0,S.createHigherOrderComponent)((function(t){return function(n){w(c,n);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function c(){var e;return m(this,c),(e=i.apply(this,arguments)).bindNode=e.bindNode.bind(_(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(_(e)),e.queueBlurCheck=e.queueBlurCheck.bind(_(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(_(e)),e}return y(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;(0,N.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,N.includes)(j,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return(0,e.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},(0,e.createElement)(t,s({ref:this.bindNode},this.props)))}}]),c}(e.Component)}),"withFocusOutside");function F(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var L=(0,e.createContext)({focusHistory:[]}),M=L.Provider,I=L.Consumer;M.displayName="FocusReturnProvider",I.displayName="FocusReturnConsumer",e.Component;var B=(0,S.createHigherOrderComponent)((function t(n){if((o=n)instanceof e.Component||"function"==typeof o){var r=n;return t({})(r)}var o,i=n.onFocusReturn,c=void 0===i?N.stubTrue:i;return function(t){var n=function(n){w(a,n);var r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function a(){var e;return m(this,a),(e=i.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return y(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==c())for(var r,o=[].concat(F(N.without.apply(void 0,[this.props.focus.focusHistory].concat(F(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return(0,e.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},(0,e.createElement)(t,this.props.childProps))}}]),a}(e.Component);return function(t){return(0,e.createElement)(I,null,(function(r){return(0,e.createElement)(n,{childProps:t,focus:r})}))}}}),"withFocusReturn"),U=window.wp.dom;var W=(0,S.createHigherOrderComponent)((function(t){return function(n){w(c,n);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function c(){var t;return m(this,c),(t=i.apply(this,arguments)).focusContainRef=(0,e.createRef)(),t.handleTabBehaviour=t.handleTabBehaviour.bind(_(t)),t}return y(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===k.TAB){var t=U.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return(0,e.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},(0,e.createElement)(t,this.props))}}]),c}(e.Component)}),"withConstrainedTabbing"),H=W;var z=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return E(this,e)});function i(){var t;return m(this,i),(t=o.apply(this,arguments)).containerRef=(0,e.createRef)(),t.handleKeyDown=t.handleKeyDown.bind(_(t)),t.handleFocusOutside=t.handleFocusOutside.bind(_(t)),t}return y(i,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.containerRef.current.focus()}},{key:"handleFocusOutside",value:function(e){this.props.shouldCloseOnClickOutside&&this.onRequestClose(e)}},{key:"handleKeyDown",value:function(e){e.keyCode===k.ESCAPE&&this.handleEscapeKeyDown(e)}},{key:"handleEscapeKeyDown",value:function(e){this.props.shouldCloseOnEsc&&(e.stopPropagation(),this.onRequestClose(e))}},{key:"onRequestClose",value:function(e){var t=this.props.onRequestClose;t&&t(e)}},{key:"render",value:function(){var t=this.props,n=t.overlayClassName,r=t.contentLabel,o=t.aria,i=o.describedby,c=o.labelledby,a=t.children,u=t.className,s=t.role,l=t.style;return(0,e.createElement)(D,{className:P()("components-modal__screen-overlay",n),onKeyDown:this.handleKeyDown},(0,e.createElement)("div",{className:P()("components-modal__frame",u),style:l,ref:this.containerRef,role:s,"aria-label":r,"aria-labelledby":r?null:c,"aria-describedby":i,tabIndex:"-1"},a))}}]),i}(e.Component),q=(0,S.compose)([B,H,A])(z),K=window.wp.primitives,V=(0,e.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(K.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));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}function Y(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 $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t,n,r,o,i,c){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==i&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==i&&(p=s);var d,h={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},v=n,y=null;if(!o)if("center"===n&&l.contentWidth===a)v="center";else if("left"===n&&h.contentWidth===a)v="left";else if("right"===n&&m.contentWidth===a)v="right";else{var g="left"==(v=h.contentWidth>m.contentWidth?"left":"right")?h.contentWidth:m.contentWidth;y=g!==a?g:null}if(d="center"===v?l.popoverLeft:"left"===v?h.popoverLeft:m.popoverLeft,c){var w=c.getBoundingClientRect();d=Math.min(d,w.right-a)}return{xAxis:v,popoverLeft:d,contentWidth:y}}function Z(e,t,n,r,o,i,c){var a=t.height;if(o){var u=((0,U.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,h=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;h=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:h}}var J=function(e){w(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=O(t);if(n){var o=O(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return E(this,e)});function o(){return m(this,o),r.apply(this,arguments)}return y(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(e.Component),X=A(J);function ee(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=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}var te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.htmlDocument,r=void 0===n?document:n,o=t.className,i=void 0===o?"lockscroll":o,c=0,a=0;function u(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](i),r.documentElement.classList[n](i),e||(t.scrollTop=a)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){w(n,e);var t=ee(n);function n(){return m(this,n),t.apply(this,arguments)}return y(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(e.Component)}();function ne(e,t,n){return ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},ne(e,t,n||e)}window.wp.isShallowEqual;var re=(window.wp.warning,n(34155)),oe=(0,e.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==re&&re.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}});var ie=(0,e.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),ce=(ie.Provider,ie.Consumer);e.Component;var ae=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return E(this,e)});function i(){var e;return m(this,i),(e=o.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(_(e)),e}return y(i,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ne(O(i.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.name,o=t.fillProps,i=void 0===o?{}:o,c=t.getFills,a=(0,N.map)(c(r,this),(function(t){var n=t.occurrence,r=(0,N.isFunction)(t.children)?t.children(i):t.children;return e.Children.map(r,(function(t,r){if(!t||(0,N.isString)(t))return t;var o="".concat(n,"---").concat(t.key||r);return(0,e.cloneElement)(t,{key:o})}))})).filter((0,N.negate)(e.isEmptyElement));return(0,e.createElement)(e.Fragment,null,(0,N.isFunction)(n)?n(a):a)}}]),i}(e.Component),ue=function(t){return(0,e.createElement)(ce,null,(function(n){var r=n.registerSlot,o=n.unregisterSlot,i=n.getFills;return(0,e.createElement)(ae,s({},t,{registerSlot:r,unregisterSlot:o,getFills:i}))}))},se=0;function le(t){var n=t.name,r=t.children,o=t.registerFill,i=t.unregisterFill,c=function(t){var n=(0,e.useContext)(ie),r=n.getSlot,o=n.subscribe,i=u((0,e.useState)(r(t)),2),c=i[0],a=i[1];return(0,e.useEffect)((function(){return a(r(t)),o((function(){a(r(t))}))}),[t]),c}(n),a=(0,e.useRef)({name:n,children:r});return a.current.occurrence||(a.current.occurrence=++se),(0,e.useLayoutEffect)((function(){return o(n,a.current),function(){return i(n,a.current)}}),[]),(0,e.useLayoutEffect)((function(){a.current.children=r,c&&c.forceUpdate()}),[r]),(0,e.useLayoutEffect)((function(){n!==a.current.name&&(i(a.current.name,a.current),a.current.name=n,o(n,a.current))}),[n]),c&&c.node?((0,N.isFunction)(r)&&(r=r(c.props.fillProps)),(0,e.createPortal)(r,c.node)):null}var fe=function(t){return(0,e.createElement)(ce,null,(function(n){var r=n.registerFill,o=n.unregisterFill;return(0,e.createElement)(le,s({},t,{registerFill:r,unregisterFill:o}))}))};function pe(t){var n=t.name,r=t.fillProps,o=void 0===r?{}:r,i=t.as,c=void 0===i?"div":i,a=h(t,["name","fillProps","as"]),u=(0,e.useContext)(oe),l=(0,e.useRef)();return(0,e.useLayoutEffect)((function(){return u.registerSlot(n,l,o),function(){u.unregisterSlot(n,l)}}),[u.registerSlot,u.unregisterSlot,n]),(0,e.useLayoutEffect)((function(){u.updateSlot(n,o)})),(0,e.createElement)(c,s({ref:l},a))}function de(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 he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function me(t){var n=(0,e.useContext)(oe),r=n.slots[t]||{},o=n.fills[t],i=(0,e.useMemo)((function(){return o||[]}),[o]),c=(0,e.useCallback)((function(e){n.updateSlot(t,e)}),[t,n.updateSlot]),a=(0,e.useCallback)((function(e){n.unregisterSlot(t,e)}),[t,n.unregisterSlot]),u=(0,e.useCallback)((function(e){n.registerFill(t,e)}),[t,n.registerFill]),s=(0,e.useCallback)((function(e){n.unregisterFill(t,e)}),[t,n.unregisterFill]);return he(he({},r),{},{updateSlot:c,unregisterSlot:a,fills:i,registerFill:u,unregisterFill:s})}function ve(t){var n,r=t.name,o=t.children,i=me(r),c=(0,e.useRef)({rerender:(n=u((0,e.useState)({}),2)[1],function(){return n({})})});return(0,e.useEffect)((function(){return i.registerFill(c),function(){i.unregisterFill(c)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),(0,e.createPortal)(o,i.ref.current)):null}function ye(t){var n=t.bubblesVirtually,r=h(t,["bubblesVirtually"]);return n?(0,e.createElement)(pe,r):(0,e.createElement)(ue,r)}function ge(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fe,t),(0,e.createElement)(ve,t))}function we(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 be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,i=u(r.split(" "),2),c=i[0],a=i[1],s=void 0===a?"center":a;return P()("components-animate__appear",(G(o={},"is-from-"+s,"center"!==s),G(o,"is-from-"+c,"middle"!==c),o))}return"slide-in"===t?P()("components-animate__slide-in","is-from-"+r):"loading"===t?P()("components-animate__loading"):void 0}function Ee(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:_e(be({type:t},r))})}var Oe=H(B((function(e){return e.children}))),Se="Popover";function xe(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,i=r.paddingBottom,c=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=i?parseInt(i,10):0,l=c?parseInt(c,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Ce(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Te(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Pe(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ke=function(t){var n=t.headerTitle,r=t.onClose,o=t.onKeyDown,i=t.children,c=t.className,a=t.noArrow,l=void 0===a||a,f=t.isAlternate,p=t.position,d=void 0===p?"bottom right":p,m=(t.range,t.focusOnMount),v=void 0===m?"firstElement":m,y=t.anchorRef,g=t.shouldAnchorIncludePadding,w=t.anchorRect,b=t.getAnchorRect,_=t.expandOnMobile,E=t.animate,O=void 0===E||E,x=t.onClickOutside,T=t.onFocusOutside,R=t.__unstableSticky,N=t.__unstableSlotName,j=void 0===N?Se:N,A=t.__unstableObserveElement,F=t.__unstableBoundaryParent,L=h(t,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),M=(0,e.useRef)(null),I=(0,e.useRef)(null),B=(0,e.useRef)(),W=(0,S.useViewportMatch)("medium","<"),H=u((0,e.useState)(),2),z=H[0],q=H[1],K=me(j),G=_&&W,Y=u((0,S.useResizeObserver)(),2),J=Y[0],ee=Y[1];l=G||l,(0,e.useLayoutEffect)((function(){if(G)return Pe(B.current,"is-without-arrow",l),Pe(B.current,"is-alternate",f),Ce(B.current,"data-x-axis"),Ce(B.current,"data-y-axis"),Te(B.current,"top"),Te(B.current,"left"),Te(I.current,"maxHeight"),void Te(I.current,"maxWidth");var e=function(){if(B.current&&I.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return(0,U.getRectangleFromRange)(r);if(r instanceof window.Element){var i=r.getBoundingClientRect();return o?i:xe(i,r)}var c=r.top,a=r.bottom,u=c.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:xe(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:xe(p,f)}}(M,w,b,y,g);if(e){var t,n,r=B.current,o=r.offsetParent,i=r.ownerDocument,c=0;if(o&&o!==i.body){var a=o.getBoundingClientRect();c=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}F&&(t=null===(n=B.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=u((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top").split(" "),3),a=c[0],s=c[1],l=void 0===s?"center":s,f=c[2],p=Z(e,t,a,f,n,r,o);return $($({},Q(e,t,l,f,n,p.yAxis,i)),p)}(e,ee.height?ee:I.current.getBoundingClientRect(),d,R,B.current,c,t),p=s.popoverTop,h=s.popoverLeft,m=s.xAxis,v=s.yAxis,_=s.contentHeight,E=s.contentWidth;"number"==typeof p&&"number"==typeof h&&(Te(B.current,"top",p+"px"),Te(B.current,"left",h+"px")),Pe(B.current,"is-without-arrow",l||"center"===m&&"middle"===v),Pe(B.current,"is-alternate",f),Ce(B.current,"data-x-axis",m),Ce(B.current,"data-y-axis",v),Te(I.current,"maxHeight","number"==typeof _?_+"px":""),Te(I.current,"maxWidth","number"==typeof E?E+"px":""),q(({left:"right",right:"left"}[m]||"center")+" "+({top:"bottom",bottom:"top"}[v]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),A&&(n=new window.MutationObserver(e)).observe(A,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[G,w,b,y,g,d,ee,R,A,F]),function(t,n){(0,e.useEffect)((function(){var e=setTimeout((function(){if(t&&n.current)if("firstElement"!==t)"container"===t&&n.current.focus();else{var e=U.focus.tabbable.find(n.current)[0];e?e.focus():n.current.focus()}}),0);return function(){return clearTimeout(e)}}),[])}(v,I);var ne=function(e){e.keyCode===k.ESCAPE&&r&&(e.stopPropagation(),r()),o&&o(e)},re=(0,e.createElement)(X,{onFocusOutside:function(e){if(T)T(e);else if(x){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),C()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),x(t)}else r&&r()}},(0,e.createElement)(Ee,{type:O&&z?"appear":null,options:{origin:z}},(function(t){var o=t.className;return(0,e.createElement)(D,s({className:P()("components-popover",c,o,{"is-expanded":G,"is-without-arrow":l,"is-alternate":f})},L,{onKeyDown:ne,ref:B}),G&&(0,e.createElement)(te,null),G&&(0,e.createElement)("div",{className:"components-popover__header"},(0,e.createElement)("span",{className:"components-popover__header-title"},n),(0,e.createElement)(Ue,{className:"components-popover__close",icon:V,onClick:r})),(0,e.createElement)("div",{ref:I,className:"components-popover__content",tabIndex:"-1"},(0,e.createElement)("div",{style:{position:"relative"}},J,i)))})));return v&&(re=(0,e.createElement)(Oe,null,re)),K.ref&&(re=(0,e.createElement)(ge,{name:j},re)),y||w?re:(0,e.createElement)("span",{ref:M},re)};ke.Slot=function(t){var n=t.name,r=void 0===n?Se:n;return(0,e.createElement)(ye,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var Re=ke,De=function(t){var n,r,o=t.shortcut,i=t.className;return o?((0,N.isString)(o)&&(n=o),(0,N.isObject)(o)&&(n=o.display,r=o.ariaLabel),(0,e.createElement)("span",{className:i,"aria-label":r},n)):null};var Ne=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return E(this,e)});function i(){var e;return m(this,i),(e=o.apply(this,arguments)).delayedSetIsOver=(0,N.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(i,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(t,n){var r=this.props.children;if(1===e.Children.count(r)){var o=e.Children.only(r);"function"==typeof o.props[t]&&o.props[t](n)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=(0,N.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.position,o=t.text,i=t.shortcut;if(1!==e.Children.count(n))return n;var c=e.Children.only(n),a=this.state.isOver;return(0,e.cloneElement)(c,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:(0,e.concatChildren)(c.props.children,a&&(0,e.createElement)(Re,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,e.createElement)(De,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(e.Component),je=Ne,Ae=function(t){var n=t.icon,r=t.className,o=h(t,["icon","className"]),i=["dashicon","dashicons","dashicons-"+n,r].filter(Boolean).join(" ");return(0,e.createElement)("span",s({className:i},o))};function Fe(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 Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=function(t){var n=t.icon,r=void 0===n?null:n,o=t.size,i=h(t,["icon","size"]);if("string"==typeof r)return(0,e.createElement)(Ae,s({icon:r},i));if(r&&Ae===r.type)return(0,e.cloneElement)(r,Le({},i));var c=o||24;if("function"==typeof r)return r.prototype instanceof e.Component?(0,e.createElement)(r,Le({size:c},i)):r(Le({size:c},i));if(r&&("svg"===r.type||r.type===K.SVG)){var a=Le(Le({width:c,height:c},r.props),i);return(0,e.createElement)(K.SVG,a)}return(0,e.isValidElement)(r)?(0,e.cloneElement)(r,Le({size:c},i)):r};function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Be=["onMouseDown","onClick"],Ue=(0,e.forwardRef)((function(t,n){var r=t.href,o=t.target,i=t.isPrimary,c=t.isSmall,a=t.isTertiary,u=t.isPressed,l=t.isBusy,f=t.isDefault,p=t.isSecondary,d=t.isLink,m=t.isDestructive,v=t.className,y=t.disabled,g=t.icon,w=t.iconSize,b=t.showTooltip,_=t.tooltipPosition,E=t.shortcut,O=t.label,S=t.children,x=t.__experimentalIsFocusable,T=h(t,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);f&&C()("Button isDefault prop",{alternative:"isSecondary"});var k=P()("components-button",v,{"is-secondary":f||p,"is-primary":i,"is-small":c,"is-tertiary":a,"is-pressed":u,"is-busy":l,"is-link":d,"is-destructive":m,"has-text":!!g&&!!S,"has-icon":!!g}),R=y&&!x,D=void 0===r||R?"button":"a",j="a"===D?{href:r,target:o}:{type:"button",disabled:R,"aria-pressed":u};if(y&&x){j["aria-disabled"]=!0;var A,F=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}(Be);try{for(F.s();!(A=F.n()).done;)T[A.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){F.e(e)}finally{F.f()}}var L=!R&&(b&&O||E||!!O&&(!S||(0,N.isArray)(S)&&!S.length)&&!1!==b),M=(0,e.createElement)(D,s({},j,T,{className:k,"aria-label":T["aria-label"]||O,ref:n}),g&&(0,e.createElement)(Me,{icon:g,size:w}),S);return L?(0,e.createElement)(je,{text:O,shortcut:E,position:_},M):M})),We=function(t){var n=t.icon,r=t.title,o=t.onClose,i=t.closeLabel,c=t.headingId,a=t.isDismissible,u=i||(0,p.__)("Close dialog");return(0,e.createElement)("div",{className:"components-modal__header"},(0,e.createElement)("div",{className:"components-modal__header-heading-container"},n&&(0,e.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},n),r&&(0,e.createElement)("h1",{id:c,className:"components-modal__header-heading"},r)),a&&(0,e.createElement)(Ue,{onClick:o,icon:V,label:u}))},He=new Set(["alert","status","log","marquee","timer"]),ze=[],qe=!1;var Ke,Ve=0,Ge=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return E(this,e)});function i(e){var t;return m(this,i),(t=o.call(this,e)).prepareDOM(),t}return y(i,[{key:"componentDidMount",value:function(){1==++Ve&&this.openFirstModal()}},{key:"componentWillUnmount",value:function(){0==--Ve&&this.closeLastModal(),this.cleanDOM()}},{key:"prepareDOM",value:function(){Ke||(Ke=document.createElement("div"),document.body.appendChild(Ke)),this.node=document.createElement("div"),Ke.appendChild(this.node)}},{key:"cleanDOM",value:function(){Ke.removeChild(this.node)}},{key:"openFirstModal",value:function(){(function(e){if(!qe){var t=document.body.children;(0,N.forEach)(t,(function(t){t!==e&&function(e){var t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||He.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),ze.push(t))})),qe=!0}})(Ke),document.body.classList.add(this.props.bodyOpenClassName)}},{key:"closeLastModal",value:function(){document.body.classList.remove(this.props.bodyOpenClassName),qe&&((0,N.forEach)(ze,(function(e){e.removeAttribute("aria-hidden")})),ze=[],qe=!1)}},{key:"render",value:function(){var t=this.props,n=t.onRequestClose,r=t.title,o=t.icon,i=t.closeButtonLabel,c=t.children,a=t.aria,u=t.instanceId,l=t.isDismissible,f=t.isDismissable,p=h(t,["onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissible","isDismissable"]),d=a.labelledby||"components-modal-header-".concat(u);return f&&C()("isDismissable prop of the Modal component",{alternative:"isDismissible prop (renamed) of the Modal component"}),(0,e.createPortal)((0,e.createElement)(q,s({onRequestClose:n,aria:{labelledby:r?d:null,describedby:a.describedby}},p),(0,e.createElement)("div",{className:"components-modal__content",role:"document"},(0,e.createElement)(We,{closeLabel:i,headingId:d,icon:o,isDismissible:l||f,onClose:n,title:r}),c)),this.node)}}]),i}(e.Component);Ge.defaultProps={bodyOpenClassName:"modal-open",role:"dialog",title:null,focusOnMount:!0,shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,isDismissible:!0,aria:{labelledby:null,describedby:null}};var Ye=(0,S.withInstanceId)(Ge),$e=window.wp.a11y,Qe=function(t){var n=t.className,r=t.status,o=void 0===r?"info":r,i=t.children,c=t.spokenMessage,a=void 0===c?i:c,u=t.onRemove,s=void 0===u?N.noop:u,l=t.isDismissible,f=void 0===l||l,d=t.actions,h=void 0===d?[]:d,m=t.politeness,v=void 0===m?function(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}(o):m,y=t.__unstableHTML;!function(t,n){var r="string"==typeof t?t:(0,e.renderToString)(t);(0,e.useEffect)((function(){r&&(0,$e.speak)(r,n)}),[r,n])}(a,v);var g=P()(n,"components-notice","is-"+o,{"is-dismissible":f});return y&&(i=(0,e.createElement)(e.RawHTML,null,i)),(0,e.createElement)("div",{className:g},(0,e.createElement)("div",{className:"components-notice__content"},i,h.map((function(t,n){var r=t.className,o=t.label,i=t.isPrimary,c=t.noDefaultClasses,a=void 0!==c&&c,u=t.onClick,s=t.url;return(0,e.createElement)(Ue,{key:n,href:s,isPrimary:i,isSecondary:!a&&!s,isLink:!a&&!!s,onClick:s?void 0:u,className:P()("components-notice__action",r)},o)}))),f&&(0,e.createElement)(Ue,{className:"components-notice__dismiss",icon:V,label:(0,p.__)("Dismiss this notice"),onClick:s,showTooltip:!1}))},Ze=window.wc.components,Je=window.wp.url;n(77766),n(29828),window.moment,window.wp.date,n(29016);var Xe,et=window.wp.apiFetch,tt=n.n(et),nt=window.wp.domReady,rt=n.n(nt),ot=(n(86902),n(2991),n(20116),n(3649),n(25843),function(){return window.wcTracks.isEnabled}),it=function(e,t){rt()((function(){var n,r,o;(null!==(n=null===(r=window.wc)||void 0===r||null===(o=r.tracks)||void 0===o?void 0:o.recordEvent)&&void 0!==n?n:window.wcTracks.recordEvent)(e,t)}))},ct={CONNECT_ACCOUNT_CLICKED:"wcpay_connect_account_clicked",CONNECT_ACCOUNT_VIEW:"page_view",CONNECT_ACCOUNT_LEARN_MORE:"wcpay_welcome_learn_more",CONNECT_ACCOUNT_STRIPE_CONNECTED:"wcpay_stripe_connected",UPE_ENABLED:"wcpay_upe_enabled",UPE_DISABLED:"wcpay_upe_disabled",MULTI_CURRENCY_ENABLED_CURRENCIES_UPDATED:"wcpay_multi_currency_enabled_currencies_updated",PAYMENT_REQUEST_SETTINGS_CHANGE:"wcpay_payment_request_settings_change",SUBSCRIPTIONS_EMPTY_STATE_VIEW:"wcpay_subscriptions_empty_state_view",SUBSCRIPTIONS_EMPTY_STATE_FINISH_SETUP:"wcpay_subscriptions_empty_state_finish_setup",SUBSCRIPTIONS_EMPTY_STATE_CREATE_PRODUCT:"wcpay_subscriptions_empty_state_create_product",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_VIEW:"wcpay_subscriptions_account_not_connected_product_modal_view",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_FINISH_SETUP:"wcpay_subscriptions_account_not_connected_product_modal_finish_setup",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_DISMISS:"wcpay_subscriptions_account_not_connected_product_modal_dismiss",PLATFORM_CHECKOUT_OFFERED:"platform_checkout_offered",PLATFORM_CHECKOUT_OTP_START:"platform_checkout_otp_prompt_start",PLATFORM_CHECKOUT_OTP_COMPLETE:"platform_checkout_otp_prompt_complete",PLATFORM_CHECKOUT_OTP_FAILED:"platform_checkout_otp_prompt_failed"},at=function(){var e=i(f().mark((function e(t){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.accept,e.abrupt("return",tt()({path:"/wc/v3/payments/tos",method:"POST",data:{accept:n}}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ut=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",tt()({path:"/wc/v3/payments/tos/reactivate",method:"POST"}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),st=function(){var e=i(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=wcpay_tos_settings.trackStripeConnected,ot()&&t){e.next=3;break}return e.abrupt("return");case 3:it(ct.CONNECT_ACCOUNT_STRIPE_CONNECTED,{is_existing_stripe_account:t.is_existing_stripe_account}),tt()({path:"/wc/v3/payments/tos/stripe_track_connected",method:"POST"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lt=function(t){return(0,e.createElement)(Ze.Link,s({},t,{href:"https://wordpress.com/tos",target:"_blank",rel:"noopener noreferrer",type:"external"}))},ft=function(t){var n=t.onAccept,r=t.onDecline,o=t.isBusy,i=t.hasError,c=(0,p.__)("WooCommerce Payments: Terms of Service","woocommerce-payments"),a=(0,d.Z)({mixedString:(0,p.__)("To continue using WooCommerce Payments, please review and agree to our {{link}}Terms of Service{{/link}}. By clicking “Accept” you agree to the Terms of Service.","woocommerce-payments"),components:{link:(0,e.createElement)(lt,null)}});return(0,e.createElement)(Ye,{title:c,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:r,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(Qe,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,p.__)("Something went wrong. Please try accepting the Terms of Service again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},a),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(Ue,{isSecondary:!0,onClick:r,isBusy:o},(0,p.__)("Decline","woocommerce-payments")),(0,e.createElement)(Ue,{isPrimary:!0,onClick:n,isBusy:o},(0,p.__)("Accept","woocommerce-payments")))))},pt=function(t){var n=t.onDisable,r=t.onCancel,o=t.isBusy,i=t.hasError,c=(0,p.__)("Disable WooCommerce Payments","woocommerce-payments"),a=(0,d.Z)({mixedString:(0,p.__)("By declining our {{link}}Terms of Service{{/link}}, you’ll no longer be able to capture credit card payments using WooCommerce Payments. Your previous transaction and deposit data will still be available.","woocommerce-payments"),components:{link:(0,e.createElement)(lt,null)}});return(0,e.createElement)(Ye,{title:c,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:n,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(Qe,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,p.__)("Something went wrong. Please try again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},a),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(Ue,{isTertiary:!0,onClick:r,isBusy:o},(0,p.__)("Back","woocommerce-payments")),(0,e.createElement)(Ue,{isPrimary:!0,onClick:n,isBusy:o},(0,p.__)("Disable","woocommerce-payments")))))},dt=window.wp.data;wcpay_tos_settings.tosAgreementRequired?((Xe=document.createElement("div")).id="wcpay-tos-container",document.body.appendChild(Xe),r().render((0,e.createElement)((function(){var t=u((0,e.useState)(!0),2),n=t[0],r=t[1],o=u((0,e.useState)(!1),2),c=o[0],a=o[1],s=u((0,e.useState)(!1),2),l=s[0],p=s[1],d=u((0,e.useState)(!1),2),h=d[0],m=d[1],v=u((0,e.useState)(!1),2),y=v[0],g=v[1],w=function(){return r(!1)},b=function(){return a(!1)},_=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(!1),p(!0),e.next=5,at({accept:!0});case 5:st(),w(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),m(!0);case 12:return e.prev=12,p(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,g(!1),p(!0),e.next=5,at({accept:!1});case 5:b(),window.location=(0,Je.addQueryArgs)((t={page:"wc-settings",tab:"checkout"},(0,Je.addQueryArgs)("admin.php",t)),{"tos-disabled":1}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),g(!0);case 12:return e.prev=12,p(!1),e.finish(12);case 15:case"end":return e.stop()}var t}),e,null,[[0,9,12,15]])})));return function(){return e.apply(this,arguments)}}();return c?(0,e.createElement)(pt,{onDisable:E,onCancel:function(){b(),r(!0)},isBusy:l,hasError:y}):n?(0,e.createElement)(ft,{onAccept:_,onDecline:function(){w(),a(!0)},isBusy:l,hasError:h}):null}),null),Xe)):st(),wcpay_tos_settings.tosAgreementDeclined&&window.addEventListener("load",(function(){!function(e){var t=(0,dt.dispatch)("core/notices").createInfoNotice,n=function(){var t=i(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ut();case 3:return t.prev=3,window.location=e,t.finish(3);case 6:case"end":return t.stop()}}),t,null,[[0,,3,6]])})));return function(){return t.apply(this,arguments)}}();t((0,p.__)("Disabled WooCommerce Payments","woocommerce-payments"),{actions:[{label:(0,p.__)("Undo","woocommerce-payments"),onClick:n}]})}(wcpay_tos_settings.settingsUrl)}))}()}();