multi-currency-switcher-block.js 198 KB
/*! For license information please see multi-currency-switcher-block.js.LICENSE.txt */
!function(){var e={4184:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},4155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(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(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=a(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},7621:function(e,t,r){var n;!function(o){var i=/^\s+/,a=/\s+$/,s=0,c=o.round,u=o.min,l=o.max,d=o.random;function p(e,t){if(t=t||{},(e=e||"")instanceof p)return e;if(!(this instanceof p))return new p(e,t);var r=function(e){var t,r,n,s={r:0,g:0,b:0},c=1,d=null,p=null,f=null,m=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(a,"").toLowerCase();var t,r=!1;if(x[e])e=x[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=q.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=q.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=q.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=q.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=q.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=q.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=q.hex8.exec(e))?{r:F(t[1]),g:F(t[2]),b:F(t[3]),a:z(t[4]),format:r?"name":"hex8"}:(t=q.hex6.exec(e))?{r:F(t[1]),g:F(t[2]),b:F(t[3]),format:r?"name":"hex"}:(t=q.hex4.exec(e))?{r:F(t[1]+""+t[1]),g:F(t[2]+""+t[2]),b:F(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=q.hex3.exec(e))&&{r:F(t[1]+""+t[1]),g:F(t[2]+""+t[2]),b:F(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(t=e.r,r=e.g,n=e.b,s={r:255*I(t,255),g:255*I(r,255),b:255*I(n,255)},m=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(d=L(e.s),p=L(e.v),s=function(e,t,r){e=6*I(e,360),t=I(t,100),r=I(r,100);var n=o.floor(e),i=e-n,a=r*(1-t),s=r*(1-i*t),c=r*(1-(1-i)*t),u=n%6;return{r:255*[r,s,a,a,c,r][u],g:255*[c,r,r,s,a,a][u],b:255*[a,a,c,r,r,s][u]}}(e.h,d,p),m=!0,h="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(d=L(e.s),f=L(e.l),s=function(e,t,r){var n,o,i;function a(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=o=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=a(c,s,e+1/3),o=a(c,s,e),i=a(c,s,e-1/3)}return{r:255*n,g:255*o,b:255*i}}(e.h,d,f),m=!0,h="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=P(c),{ok:m,format:e.format||h,r:u(255,l(s.r,0)),g:u(255,l(s.g,0)),b:u(255,l(s.b,0)),a:c}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function f(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,o,i=l(e,t,r),a=u(e,t,r),s=(i+a)/2;if(i==a)n=o=0;else{var c=i-a;switch(o=s>.5?c/(2-i-a):c/(i+a),i){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:o,l:s}}function m(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,o,i=l(e,t,r),a=u(e,t,r),s=i,c=i-a;if(o=0===i?0:c/i,i==a)n=0;else{switch(i){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:o,v:s}}function h(e,t,r,n){var o=[M(c(e).toString(16)),M(c(t).toString(16)),M(c(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function y(e,t,r,n){return[M(j(n)),M(c(e).toString(16)),M(c(t).toString(16)),M(c(r).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.s-=t/100,r.s=N(r.s),p(r)}function v(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.s+=t/100,r.s=N(r.s),p(r)}function b(e){return p(e).desaturate(100)}function _(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.l+=t/100,r.l=N(r.l),p(r)}function w(e,t){t=0===t?0:t||10;var r=p(e).toRgb();return r.r=l(0,u(255,r.r-c(-t/100*255))),r.g=l(0,u(255,r.g-c(-t/100*255))),r.b=l(0,u(255,r.b-c(-t/100*255))),p(r)}function E(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.l-=t/100,r.l=N(r.l),p(r)}function S(e,t){var r=p(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,p(r)}function O(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function T(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+120)%360,s:t.s,l:t.l}),p({h:(r+240)%360,s:t.s,l:t.l})]}function k(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+90)%360,s:t.s,l:t.l}),p({h:(r+180)%360,s:t.s,l:t.l}),p({h:(r+270)%360,s:t.s,l:t.l})]}function R(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+72)%360,s:t.s,l:t.l}),p({h:(r+216)%360,s:t.s,l:t.l})]}function C(e,t,r){t=t||6,r=r||30;var n=p(e).toHsl(),o=360/r,i=[p(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,i.push(p(n));return i}function A(e,t){t=t||6;for(var r=p(e).toHsv(),n=r.h,o=r.s,i=r.v,a=[],s=1/t;t--;)a.push(p({h:n,s:o,v:i})),i=(i+s)%1;return a}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:o.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var i=[M(c(e).toString(16)),M(c(t).toString(16)),M(c(r).toString(16)),M(j(n))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*I(this._r,255))+"%",g:c(100*I(this._g,255))+"%",b:c(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*I(this._r,255))+"%, "+c(100*I(this._g,255))+"%, "+c(100*I(this._b,255))+"%)":"rgba("+c(100*I(this._r,255))+"%, "+c(100*I(this._g,255))+"%, "+c(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+y(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);r="#"+y(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:L(e[n]));e=r}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,r){r=0===r?0:r||50;var n=p(e).toRgb(),o=p(t).toRgb(),i=r/100;return p({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},p.readability=function(e,t){var r=p(e),n=p(t);return(o.max(r.getLuminance(),n.getLuminance())+.05)/(o.min(r.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(e,t,r){var n,o,i,a,s,c=p.readability(e,t);switch(o=!1,(i=r,"AA"!==(a=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:a,size:s}).level+n.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},p.mostReadable=function(e,t,r){var n,o,i,a,s=null,c=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var u=0;u<t.length;u++)(n=p.readability(e,t[u]))>c&&(c=n,s=p(t[u]));return p.isReadable(e,s,{level:i,size:a})||!o?s:(r.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],r))};var x=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=p.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(x);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,l(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return u(1,l(0,e))}function F(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function j(e){return o.round(255*parseFloat(e)).toString(16)}function z(e){return F(e)/255}var B,U,H,q=(U="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",H="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function G(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(n=function(){return p}.call(t,r,t,e))||(e.exports=n)}(Math)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),r.p=window.wcpayAssets.url,function(){"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:function(){return ie},getAllDepositsOverviewsError:function(){return ae},getDeposit:function(){return re},getDepositQueryError:function(){return le},getDeposits:function(){return ce},getDepositsCount:function(){return ue},getDepositsOverview:function(){return ne},getDepositsOverviewError:function(){return oe},getDepositsSummary:function(){return pe},getDepositsSummaryError:function(){return fe},getInstantDeposit:function(){return me}});var t={};r.r(t),r.d(t,{submitInstantDeposit:function(){return ze},updateAllDepositsOverviews:function(){return De},updateDeposit:function(){return Ce},updateDeposits:function(){return Ie},updateDepositsCount:function(){return Ne},updateDepositsOverview:function(){return Ae},updateDepositsSummary:function(){return Me},updateErrorForAllDepositsOverviews:function(){return Pe},updateErrorForDepositQuery:function(){return Fe},updateErrorForDepositsOverview:function(){return xe},updateErrorForDepositsSummary:function(){return Le},updateInstantDeposit:function(){return je}});var n={};r.r(n),r.d(n,{getAllDepositsOverviews:function(){return He},getDeposit:function(){return Be},getDeposits:function(){return Ve},getDepositsCSV:function(){return Ge},getDepositsOverview:function(){return Ue},getDepositsSummary:function(){return We}});var o={};r.r(o),r.d(o,{getTransactions:function(){return et},getTransactionsError:function(){return tt},getTransactionsSummary:function(){return nt},getTransactionsSummaryError:function(){return ot}});var i={};r.r(i),r.d(i,{updateErrorForTransactions:function(){return at},updateErrorForTransactionsSummary:function(){return ct},updateTransactions:function(){return it},updateTransactionsSummary:function(){return st}});var a={};r.r(a),r.d(a,{formatQueryFilters:function(){return ut},getTransactions:function(){return lt},getTransactionsCSV:function(){return dt},getTransactionsSummary:function(){return pt}});var s={};r.r(s),r.d(s,{getCharge:function(){return ht},getChargeError:function(){return yt}});var c={};r.r(c),r.d(c,{updateCharge:function(){return gt},updateErrorForCharge:function(){return vt}});var u={};r.r(u),r.d(u,{getCharge:function(){return bt}});var l={};r.r(l),r.d(l,{getTimeline:function(){return Et},getTimelineError:function(){return St}});var d={};r.r(d),r.d(d,{updateErrorForTimeline:function(){return Tt},updateTimeline:function(){return Ot}});var p={};r.r(p),r.d(p,{getTimeline:function(){return kt}});var f={};r.r(f),r.d(f,{getCachedDispute:function(){return It},getDispute:function(){return Pt},getDisputes:function(){return Nt},getDisputesSummary:function(){return Ft}});var m={};r.r(m),r.d(m,{acceptDispute:function(){return qt},updateDispute:function(){return Bt},updateDisputes:function(){return Ut},updateDisputesSummary:function(){return Ht}});var h={};r.r(h),r.d(h,{getDispute:function(){return Wt},getDisputes:function(){return Kt},getDisputesCSV:function(){return Vt},getDisputesSummary:function(){return Yt}});var y={};r.r(y),r.d(y,{getAccountBrandingLogo:function(){return Tr},getAccountBusinessName:function(){return mr},getAccountBusinessSupportAddress:function(){return yr},getAccountBusinessSupportAddressCity:function(){return _r},getAccountBusinessSupportAddressCountry:function(){return gr},getAccountBusinessSupportAddressLine1:function(){return vr},getAccountBusinessSupportAddressLine2:function(){return br},getAccountBusinessSupportAddressPostalCode:function(){return Er},getAccountBusinessSupportAddressState:function(){return wr},getAccountBusinessSupportEmail:function(){return Sr},getAccountBusinessSupportPhone:function(){return Or},getAccountBusinessURL:function(){return hr},getAccountStatementDescriptor:function(){return fr},getAvailablePaymentMethodIds:function(){return lr},getCompletedWaitingPeriod:function(){return xr},getDepositDelayDays:function(){return Ar},getDepositScheduleInterval:function(){return kr},getDepositScheduleMonthlyAnchor:function(){return Cr},getDepositScheduleWeeklyAnchor:function(){return Rr},getDepositStatus:function(){return Dr},getEnabledPaymentMethodIds:function(){return ur},getIsCardPresentEligible:function(){return Gr},getIsClientSecretEncryptionEnabled:function(){return cr},getIsDebugLogEnabled:function(){return Mr},getIsDevModeEnabled:function(){return Nr},getIsManualCaptureEnabled:function(){return Pr},getIsMultiCurrencyEnabled:function(){return Lr},getIsPaymentRequestEnabled:function(){return Fr},getIsPlatformCheckoutEnabled:function(){return Yr},getIsSavedCardsEnabled:function(){return Hr},getIsSubscriptionsPluginActive:function(){return Kr},getIsTestModeEnabled:function(){return Ir},getIsWCPayEnabled:function(){return sr},getIsWCPaySubscriptionsEligible:function(){return Wr},getIsWCPaySubscriptionsEnabled:function(){return Vr},getPaymentMethodStatuses:function(){return dr},getPaymentRequestButtonSize:function(){return Br},getPaymentRequestButtonTheme:function(){return Ur},getPaymentRequestButtonType:function(){return zr},getPaymentRequestLocations:function(){return jr},getPlatformCheckoutCustomMessage:function(){return $r},getPlatformCheckoutLocations:function(){return Xr},getPlatformCheckoutStoreLogo:function(){return Qr},getSavingError:function(){return qr},getSettings:function(){return ir},isSavingSettings:function(){return pr}});var g={};r.r(g),r.d(g,{saveSettings:function(){return An},updateAccountBrandingLogo:function(){return Tn},updateAccountBusinessName:function(){return _n},updateAccountBusinessSupportAddress:function(){return En},updateAccountBusinessSupportEmail:function(){return Sn},updateAccountBusinessSupportPhone:function(){return On},updateAccountBusinessURL:function(){return wn},updateAccountStatementDescriptor:function(){return bn},updateAvailablePaymentMethodIds:function(){return ln},updateDepositScheduleInterval:function(){return kn},updateDepositScheduleMonthlyAnchor:function(){return Cn},updateDepositScheduleWeeklyAnchor:function(){return Rn},updateEnabledPaymentMethodIds:function(){return un},updateIsCardPresentEligible:function(){return en},updateIsClientSecretEncryptionEnabled:function(){return tn},updateIsDebugLogEnabled:function(){return yn},updateIsManualCaptureEnabled:function(){return mn},updateIsMultiCurrencyEnabled:function(){return gn},updateIsPaymentRequestEnabled:function(){return cn},updateIsPlatformCheckoutEnabled:function(){return Dn},updateIsSavedCardsEnabled:function(){return Jr},updateIsSavingSettings:function(){return dn},updateIsTestModeEnabled:function(){return hn},updateIsWCPayEnabled:function(){return sn},updateIsWCPaySubscriptionsEnabled:function(){return vn},updatePaymentRequestButtonSize:function(){return nn},updatePaymentRequestButtonTheme:function(){return on},updatePaymentRequestButtonType:function(){return rn},updatePaymentRequestLocations:function(){return xn},updatePlatformCheckoutCustomMessage:function(){return Pn},updatePlatformCheckoutLocations:function(){return Nn},updatePlatformCheckoutStoreLogo:function(){return In},updateSelectedPaymentMethod:function(){return pn},updateSettings:function(){return an},updateUnselectedPaymentMethod:function(){return fn}});var v={};r.r(v),r.d(v,{getSettings:function(){return Fn}});var b={};r.r(b),r.d(b,{getAvailableCurrencies:function(){return Vn},getCurrencies:function(){return Gn},getCurrencySettings:function(){return Yn},getDefaultCurrency:function(){return Kn},getEnabledCurrencies:function(){return Wn},getStoreSettings:function(){return $n}});var _={};r.r(_),r.d(_,{submitCurrencySettings:function(){return no},submitEnabledCurrenciesUpdate:function(){return ro},submitStoreSettingsUpdate:function(){return oo},updateAvailableCurrencies:function(){return Xn},updateCurrencies:function(){return Qn},updateCurrencySettings:function(){return eo},updateDefaultCurrency:function(){return Jn},updateEnabledCurrencies:function(){return Zn},updateStoreSettings:function(){return to}});var w={};r.r(w),r.d(w,{getCurrencies:function(){return io},getCurrencySettings:function(){return ao},getStoreSettings:function(){return so}});var E={};r.r(E),r.d(E,{getCardReaderStats:function(){return uo},getCardReaderStatsError:function(){return lo},getCardReaders:function(){return po}});var S={};r.r(S),r.d(S,{updateCardReaderStats:function(){return fo},updateCardReaders:function(){return mo},updateErrorForCardReaderStats:function(){return ho},updateErrorForCardReaders:function(){return yo}});var O={};r.r(O),r.d(O,{getCardReaderStats:function(){return go},getCardReaders:function(){return vo}});var T={};r.r(T),r.d(T,{getActiveLoanSummary:function(){return Oo},getActiveLoanSummaryError:function(){return To},getLoans:function(){return ko},getLoansError:function(){return Ro}});var k={};r.r(k),r.d(k,{updateActiveLoanSummary:function(){return Co},updateErrorForActiveLoanSummary:function(){return Ao},updateErrorForLoans:function(){return Do},updateLoans:function(){return xo}});var R={};r.r(R),r.d(R,{getActiveLoanSummary:function(){return Io},getLoans:function(){return No}});var C={};r.r(C),r.d(C,{getDocuments:function(){return Ho},getDocumentsError:function(){return qo},getDocumentsSummary:function(){return Vo},getDocumentsSummaryError:function(){return Wo}});var A={};r.r(A),r.d(A,{updateDocuments:function(){return Ko},updateDocumentsSummary:function(){return $o},updateErrorForDocuments:function(){return Yo},updateErrorForDocumentsSummary:function(){return Qo}});var x={};r.r(x),r.d(x,{formatQueryFilters:function(){return Xo},getDocuments:function(){return Zo},getDocumentsSummary:function(){return Jo}});var D={};r.r(D),r.d(D,{getPaymentIntent:function(){return oi},getPaymentIntentError:function(){return ii}});var P={};r.r(P),r.d(P,{updateErrorForPaymentIntent:function(){return si},updatePaymentIntent:function(){return ai}});var I={};r.r(I),r.d(I,{getPaymentIntent:function(){return ci}});var N={};r.r(N),r.d(N,{getAuthorization:function(){return bi},getAuthorizations:function(){return vi},getAuthorizationsError:function(){return _i},getAuthorizationsSummary:function(){return Ei},getAuthorizationsSummaryError:function(){return Si}});var F={};r.r(F),r.d(F,{submitCaptureAuthorization:function(){return Ci},updateAuthorization:function(){return ki},updateAuthorizations:function(){return Oi},updateAuthorizationsSummary:function(){return Ri},updateErrorForAuthorizations:function(){return Ti},updateErrorForAuthorizationsSummary:function(){return Ai}});var M={};r.r(M),r.d(M,{getAuthorization:function(){return Pi},getAuthorizations:function(){return Di},getAuthorizationsSummary:function(){return Ii}});var L=window.wp.element,j=window.wp.data,z=window.wp.dataControls;const B="wc/payments";var U=window.lodash,H="SET_DEPOSIT",q="SET_DEPOSITS_OVERVIEW",G="SET_ERROR_FOR_DEPOSITS_OVERVIEW",V="SET_DEPOSITS",W="SET_DEPOSITS_COUNT",K="SET_ERROR_FOR_DEPOSIT_QUERY",Y="SET_DEPOSITS_SUMMARY",$="SET_ERROR_FOR_DEPOSITS_SUMMARY",Q="SET_INSTANT_DEPOSIT",X="SET_ALL_DEPOSITS_OVERVIEWS",Z="SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS";const J=e=>JSON.stringify(e,Object.keys(e).sort()),ee={byId:{},queries:{},count:0,instant:{}};const te=e=>e&&e.deposits||{},re=(e,t)=>(te(e).byId||{})[t],ne=e=>(te(e).overview||{}).data,oe=e=>(te(e).overview||{}).error,ie=e=>{const t=te(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:n,account:o}=t.data,i={lastPaid:r.last_paid,nextScheduled:r.next_scheduled,pending:n.pending,available:n.available,instant:n.instant},a={};for(const[e,t]of Object.entries(i))null==t||t.forEach((t=>{const{currency:r}=t;a[r]||(a[r]={currency:r,lastPaid:void 0,nextScheduled:void 0,pending:void 0,available:void 0,instant:void 0}),a[r][e]=t}));const s=Object.values(a);return{account:o,currencies:[...s.filter((e=>o.default_currency===e.currency)),...s.filter((e=>o.default_currency!==e.currency))]}},ae=e=>(te(e).overviews||{}).error,se=(e,t)=>{const r=J(t);return(te(e).queries||{})[r]||{}},ce=(e,t)=>(se(e,t).data||[]).map(re.bind(void 0,e)),ue=e=>te(e).count,le=(e,t)=>se(e,t).error||{},de=(e,t)=>{const r=J(t);return(te(e).summary||{})[r]||{}},pe=(e,t)=>de(e,t).data||{},fe=(e,t)=>de(e,t).error||{},me=e=>(te(e).instant||{}).data;var he=window.wp.i18n,ye=window.wc.currency,ge=r.n(ye);(0,he.__)("Australian dollar","woocommerce-payments"),(0,he.__)("Canadian dollar","woocommerce-payments"),(0,he.__)("Swiss franc","woocommerce-payments"),(0,he.__)("Danish krone","woocommerce-payments"),(0,he.__)("Euro","woocommerce-payments"),(0,he.__)("Pound sterling","woocommerce-payments"),(0,he.__)("Norwegian krone","woocommerce-payments"),(0,he.__)("New Zealand dollar","woocommerce-payments"),(0,he.__)("Swedish krona","woocommerce-payments"),(0,he.__)("United States (US) dollar","woocommerce-payments");const ve=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{currencyData:r,connect:{country:n="US"}}=wcpaySettings,o=(0,U.find)(r,{code:e.toUpperCase()});if(o){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[n]){const e=t?(0,U.find)(r,{code:t.toUpperCase()}):r[n];e&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition,0!==o.precision&&(o.precision=e.precision))}return new(ge())(o)}return null},be=e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase());function _e(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(n){return(0,he.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function we(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}var Ee=window.wp.url,Se=window.moment,Oe=r.n(Se),Te=window.wp.date;window.wc.number;const ke=e=>(0,Ee.addQueryArgs)("admin.php",e),Re=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=t?Oe()(e).endOf("day").utc().toISOString():Oe()(e).startOf("day").utc().toISOString();return e&&(0,Te.dateI18n)("Y-m-d H:i:s",r,!0)};function Ce(e){return{type:H,data:e}}function Ae(e){return{type:q,data:e}}function xe(e,t){return{type:G,error:t}}function De(e){return{type:X,data:e}}function Pe(e,t){return{type:Z,error:t}}function Ie(e,t){return{type:V,query:e,data:t}}function Ne(e){return{type:W,data:e}}function Fe(e,t,r){return{type:K,query:e,data:t,error:r}}function Me(e,t){return{type:Y,query:e,data:t}}function Le(e,t,r){return{type:$,query:e,data:t,error:r}}function je(e){return{type:Q,data:e}}function*ze(e){try{yield(0,j.dispatch)(B).startResolution("getInstantDeposit",[e]);const t=yield(0,z.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",transaction_ids:e}});yield je(t),yield(0,j.dispatch)(B).invalidateResolutionForStoreSelector("getDeposits"),yield(0,j.dispatch)(B).invalidateResolutionForStoreSelector("getDepositsOverview"),yield(0,j.dispatch)("core/notices").createSuccessNotice((0,he.sprintf)((0,he.__)("Instant deposit for %s in transit.","woocommerce-payments"),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=be(t);n||(e/=100);const o=ve(t,r);if(null===o)return _e(e,t,n);try{return"function"==typeof o.formatAmount?we(o.formatAmount(e)):we(o.formatCurrency(e))}catch(r){return we(_e(e,t,n))}}(t.amount)),{actions:[{label:(0,he.__)("View details","woocommerce-payments"),url:ke({page:"wc-admin",path:"/payments/deposits/details",id:t.id})}]})}catch{yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error creating instant deposit.","woocommerce-payments"))}finally{yield(0,j.dispatch)(B).finishResolution("getInstantDeposit",[e])}}function*Be(e){const t=(0,Ee.addQueryArgs)(`/wc/v3/payments/deposits/${e}`);try{const e=yield(0,z.apiFetch)({path:t});yield Ce(e)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving deposit.","woocommerce-payments"))}}function*Ue(){const e=(0,Ee.addQueryArgs)("/wc/v3/payments/deposits/overview");try{const t=yield(0,z.apiFetch)({path:e});yield Ae(t)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving deposits overview.","woocommerce-payments")),yield xe()}}function*He(){const e=(0,Ee.addQueryArgs)("/wc/v3/payments/deposits/overview-all");try{const t=yield(0,z.apiFetch)({path:e});yield De(t)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving all deposits' overviews.","woocommerce-payments")),yield Pe()}}const qe=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Re(e.dateBefore,!0),date_after:Re(e.dateAfter),date_between:e.dateBetween&&[Re(e.dateBetween[0]),Re(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot});function Ge(e){return(0,Ee.addQueryArgs)("/wc/v3/payments/deposits/download",qe(e))}function*Ve(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/deposits",{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...qe(e)});try{const r=yield(0,z.apiFetch)({path:t})||{};yield Ie(e,r.data),yield Ne(r.total_count);for(const e in r.data)yield(0,z.dispatch)(B,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving deposits.","woocommerce-payments")),yield Fe(e,null,t)}}function*We(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/deposits/summary",qe(e));try{const r=yield(0,z.apiFetch)({path:t});yield Me(e,r)}catch(t){yield Le(e,null,t)}}var Ke="SET_TRANSACTIONS",Ye="SET_ERROR_FOR_TRANSACTIONS",$e="SET_TRANSACTIONS_SUMMARY",Qe="SET_ERROR_FOR_TRANSACTIONS_SUMMARY";const Xe={summary:{}};const Ze=e=>e&&e.transactions||{},Je=(e,t)=>{const r=J(t);return Ze(e)[r]||{}},et=(e,t)=>Je(e,t).data||[],tt=(e,t)=>Je(e,t).error||{},rt=(e,t)=>{const r=J(t);return Ze(e).summary[r]||{}},nt=(e,t)=>rt(e,t).data||{},ot=(e,t)=>rt(e,t).error||{};function it(e,t){return{type:Ke,query:e,data:t}}function at(e,t,r){return{type:Ye,query:e,data:t,error:r}}function st(e,t){return{type:$e,query:e,data:t}}function ct(e,t,r){return{type:Qe,query:e,data:t,error:r}}const ut=e=>({user_email:e.userEmail,match:e.match,date_before:Re(e.dateBefore,!0),date_after:Re(e.dateAfter),date_between:e.dateBetween&&[Re(e.dateBetween[0]),Re(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,store_currency_is:e.storeCurrencyIs,loan_id_is:e.loanIdIs,deposit_id:e.depositId,customer_currency_is:e.customerCurrencyIs,customer_currency_is_not:e.customerCurrencyIsNot,search:e.search,user_timezone:Oe()(new Date).format("Z")});function*lt(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/transactions",{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ut(e)});try{const r=yield(0,z.apiFetch)({path:t});yield it(e,r.data||[])}catch(t){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving transactions.","woocommerce-payments")),yield at(e,null,t)}}function dt(e){return(0,Ee.addQueryArgs)("/wc/v3/payments/transactions/download",ut(e))}function*pt(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/transactions/summary",ut(e));try{const r=yield(0,z.apiFetch)({path:t});yield st(e,r)}catch(t){yield ct(e,null,t)}}var ft="SET_CHARGE",mt="SET_ERROR_FOR_CHARGE";const ht=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},yt=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{};function gt(e,t){return{type:ft,id:e,data:t}}function vt(e,t,r){return{type:mt,id:e,data:t,error:r}}function*bt(e){try{const t=yield(0,z.apiFetch)({path:`/wc/v3/payments/charges/${e}`});yield gt(e,t)}catch(t){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving transaction.","woocommerce-payments")),yield vt(e,null,t)}}var _t="SET_TIMELINE",wt="SET_ERROR_FOR_TIMELINE";const Et=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},St=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Ot(e,t){return{id:e,type:_t,data:t}}function Tt(e,t){return{id:e,type:wt,error:t}}function*kt(e){try{const t=yield(0,z.apiFetch)({path:`/wc/v3/payments/timeline/${e}`});yield Ot(e,t.data)}catch(t){yield Tt(e,t)}}var Rt="SET_DISPUTE",Ct="SET_DISPUTES",At="SET_DISPUTES_SUMMARY";const xt={byId:{},queries:{},summary:{},cached:{}};const Dt=e=>e&&e.disputes||{},Pt=(e,t)=>(Dt(e).byId||{})[t],It=(e,t)=>(Dt(e).cached||{})[t],Nt=(e,t)=>{const r=((e,t)=>{const r=J(t);return(Dt(e).queries||{})[r]||{}})(e,t).data||[];return r.map(It.bind(void 0,e))},Ft=(e,t)=>((e,t)=>{const r=J(t);return(Dt(e).summary||{})[r]||{}})(e,t).data||{};var Mt=window.wp.domReady,Lt=r.n(Mt);var jt=function(e,t){Lt()((()=>{var r,n,o;(null!==(r=null===(n=window.wc)||void 0===n||null===(o=n.tracks)||void 0===o?void 0:o.recordEvent)&&void 0!==r?r:window.wcTracks.recordEvent)(e,t)}))},zt={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",CONNECT_ACCOUNT_KYC_MODAL_OPENED:"wcpay_connect_account_kyc_modal_opened",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",PLATFORM_CHECKOUT_AUTO_REDIRECT:"platform_checkout_auto_redirect",PLATFORM_CHECKOUT_SKIPPED:"platform_checkout_skipped",PLATFORM_CHECKOUT_EXPRESS_BUTTON_OFFERED:"platform_checkout_express_button_offered",PLATFORM_CHECKOUT_EXPRESS_BUTTON_CLICKED:"platform_checkout_express_button_clicked"};function Bt(e){return{type:Rt,data:e}}function Ut(e,t){return{type:Ct,query:e,data:t}}function Ht(e,t){return{type:At,query:e,data:t}}function*qt(e){try{yield(0,z.dispatch)(B,"startResolution","getDispute",[e]);const t=yield(0,z.apiFetch)({path:`/wc/v3/payments/disputes/${e}/close`,method:"post"});yield Bt(t),yield(0,z.dispatch)(B,"finishResolution","getDispute",[e]),window.location.replace(ke({page:"wc-admin",path:"/payments/disputes",filter:"awaiting_response"})),jt("wcpay_dispute_accept_success");const r=t.order?(0,he.sprintf)((0,he.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),t.order.number):(0,he.__)("You have accepted the dispute.","woocommerce-payments");yield(0,z.dispatch)("core/notices","createSuccessNotice",r)}catch(e){const t=(0,he.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");jt("wcpay_dispute_accept_failed"),yield(0,z.dispatch)("core/notices","createErrorNotice",t)}}const Gt=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Re(e.dateBefore,!0),date_after:Re(e.dateAfter),date_between:e.dateBetween&&[Re(e.dateBetween[0]),Re(e.dateBetween[1],!0)],search:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot});function Vt(e){return(0,Ee.addQueryArgs)("/wc/v3/payments/disputes/download",Gt(e))}function*Wt(e){const t=(0,Ee.addQueryArgs)(`/wc/v3/payments/disputes/${e}`);try{const e=yield(0,z.apiFetch)({path:t});yield Bt(e)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving dispute.","woocommerce-payments"))}}function*Kt(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/disputes",{page:e.paged,pagesize:e.perPage,sort:(0,U.snakeCase)(e.orderBy),direction:e.order,...Gt(e)});try{const r=yield(0,z.apiFetch)({path:t})||{};yield Ut(e,r.data)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving disputes.","woocommerce-payments"))}}function*Yt(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/disputes/summary",{page:e.paged,pagesize:e.perPage,...Gt(e)});try{const r=yield(0,z.apiFetch)({path:t});yield Ht(e,r)}catch(e){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}(0,he.__)("Bank cannot process","woocommerce-payments"),(0,he.__)("Check returned","woocommerce-payments"),(0,he.__)("Credit not processed","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments"),(0,he.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments"),(0,he.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,he.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments"),(0,he.__)("Customer initiated","woocommerce-payments"),(0,he.__)("Debit not authorized","woocommerce-payments"),(0,he.__)("Duplicate","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,he.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,he.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,he.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),(0,he.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,he.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,he.__)("Fraudulent","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting fraudulent payments with you, the business.","woocommerce-payments"),(0,he.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make a fraudulent purchase. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments"),(0,he.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments"),(0,he.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),(0,he.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,he.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,he.__)("General","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments"),(0,he.__)("Incorrect account details","woocommerce-payments"),(0,he.__)("Insufficient funds","woocommerce-payments"),(0,he.__)("Product not received","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,he.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments"),(0,he.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),(0,he.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,he.__)("Product unacceptable","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,he.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,he.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),(0,he.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),(0,he.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),(0,he.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),(0,he.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments"),(0,he.__)("Subscription canceled","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,he.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,he.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),(0,he.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,he.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,he.__)("Unrecognized","woocommerce-payments"),(0,he.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,he.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,he.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,he.__)("As with fraudulent disputes, get your customer to withdraw the dispute by helping them identify the payment. Otherwise challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments"),(0,he.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,he.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments");var $t={warning_needs_response:(0,he.__)("Inquiry: Needs response","woocommerce-payments"),warning_under_review:(0,he.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,he.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,he.__)("Needs response","woocommerce-payments"),under_review:(0,he.__)("Under review","woocommerce-payments"),charge_refunded:(0,he.__)("Charge refunded","woocommerce-payments"),won:(0,he.__)("Won","woocommerce-payments"),lost:(0,he.__)("Lost","woocommerce-payments")},Qt=(Object.entries($t).map((function(e){var t=e[0];return{label:e[1],value:t}})).filter((function(e){return null!=e})),(0,he.__)("Dispute currency","woocommerce-payments"),(0,he.__)("All currencies","woocommerce-payments"),(0,he.__)("Show","woocommerce-payments"),(0,he.__)("Needs response","woocommerce-payments"),(0,he.__)("All disputes","woocommerce-payments"),(0,he.__)("Advanced filters","woocommerce-payments"),(0,he.__)("Disputes match {{select /}} filters","woocommerce-payments"),(0,he.__)("Disputed on date","woocommerce-payments"),(0,he.__)("Remove dispute date filter","woocommerce-payments"),(0,he.__)("Select a dispute date filter match","woocommerce-payments"),(0,he.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),(0,he.__)("Select a dispute date","woocommerce-payments"),(0,he.__)("Before","woocommerce-payments"),(0,he.__)("After","woocommerce-payments"),(0,he.__)("Between","woocommerce-payments"),(0,he.__)("Status","woocommerce-payments"),(0,he.__)("Remove dispute status filter","woocommerce-payments"),(0,he.__)("Select a dispute status filter match","woocommerce-payments"),(0,he.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),(0,he.__)("Select a dispute status","woocommerce-payments"),(0,he._x)("Is","dispute status","woocommerce-payments"),(0,he._x)("Is not","dispute status","woocommerce-payments"),"SET_SETTINGS"),Xt="SET_SETTINGS_VALUES",Zt="SET_IS_SAVING_SETTINGS",Jt="SET_SELECTED_PAYMENT_METHOD",er="SET_UNSELECTED_PAYMENT_METHOD";const tr={isSaving:!1,savingError:null,data:{}};const rr={},nr=[],or=e=>e&&e.settings||rr,ir=e=>or(e).data||rr,ar=e=>ir(e).account_business_support_address||rr,sr=e=>ir(e).is_wcpay_enabled||!1,cr=e=>ir(e).is_client_secret_encryption_enabled||!1,ur=e=>ir(e).enabled_payment_method_ids||nr,lr=e=>ir(e).available_payment_method_ids||nr,dr=e=>ir(e).payment_method_statuses||nr,pr=e=>or(e).isSaving||!1,fr=e=>ir(e).account_statement_descriptor||"",mr=e=>ir(e).account_business_name||"",hr=e=>ir(e).account_business_url||"",yr=e=>ir(e).account_business_support_address||"",gr=e=>ar(e).country||"",vr=e=>ar(e).line1||"",br=e=>ar(e).line2||"",_r=e=>ar(e).city||"",wr=e=>ar(e).state||"",Er=e=>ar(e).postal_code||"",Sr=e=>ir(e).account_business_support_email||"",Or=e=>ir(e).account_business_support_phone||"",Tr=e=>ir(e).account_branding_logo||"",kr=e=>ir(e).deposit_schedule_interval||"",Rr=e=>ir(e).deposit_schedule_weekly_anchor||"",Cr=e=>ir(e).deposit_schedule_monthly_anchor||"",Ar=e=>ir(e).deposit_delay_days||"7",xr=e=>ir(e).deposit_completed_waiting_period||!1,Dr=e=>ir(e).deposit_status||"",Pr=e=>ir(e).is_manual_capture_enabled||!1,Ir=e=>ir(e).is_test_mode_enabled||!1,Nr=e=>ir(e).is_dev_mode_enabled||!1,Fr=e=>ir(e).is_payment_request_enabled||!1,Mr=e=>ir(e).is_debug_log_enabled||!1,Lr=e=>ir(e).is_multi_currency_enabled||!1,jr=e=>ir(e).payment_request_enabled_locations||nr,zr=e=>ir(e).payment_request_button_type||"",Br=e=>ir(e).payment_request_button_size||"",Ur=e=>ir(e).payment_request_button_theme||"",Hr=e=>ir(e).is_saved_cards_enabled||!1,qr=e=>or(e).savingError,Gr=e=>ir(e).is_card_present_eligible||!1,Vr=e=>ir(e).is_wcpay_subscriptions_enabled||!1,Wr=e=>ir(e).is_wcpay_subscriptions_eligible||!1,Kr=e=>ir(e).is_subscriptions_plugin_active||!1,Yr=e=>ir(e).is_platform_checkout_enabled||!1,$r=e=>ir(e).platform_checkout_custom_message||"",Qr=e=>ir(e).platform_checkout_store_logo||"",Xr=e=>ir(e).platform_checkout_enabled_locations||nr;function Zr(e){return{type:Xt,payload:e}}function Jr(e){return Zr({is_saved_cards_enabled:e})}function en(e){return Zr({is_card_present_eligible:e})}function tn(e){return Zr({is_client_secret_encryption_enabled:e})}function rn(e){return Zr({payment_request_button_type:e})}function nn(e){return Zr({payment_request_button_size:e})}function on(e){return Zr({payment_request_button_theme:e})}function an(e){return{type:Qt,data:e}}function sn(e){return Zr({is_wcpay_enabled:e})}function cn(e){return Zr({is_payment_request_enabled:e})}function un(e){return Zr({enabled_payment_method_ids:[...e]})}function ln(e){return Zr({available_payment_method_ids:[...e]})}function dn(e,t){return{type:Zt,isSaving:e,error:t}}function pn(e){return{type:Jt,id:e}}function fn(e){return{type:er,id:e}}function mn(e){return Zr({is_manual_capture_enabled:e})}function hn(e){return Zr({is_test_mode_enabled:e})}function yn(e){return Zr({is_debug_log_enabled:e})}function gn(e){return Zr({is_multi_currency_enabled:e})}function vn(e){return Zr({is_wcpay_subscriptions_enabled:e})}function bn(e){return Zr({account_statement_descriptor:e})}function _n(e){return Zr({account_business_name:e})}function wn(e){return Zr({account_business_url:e})}function En(e){return Zr({account_business_support_address:e})}function Sn(e){return Zr({account_business_support_email:e})}function On(e){return Zr({account_business_support_phone:e})}function Tn(e){return Zr({account_branding_logo:e})}function kn(e){return Zr({deposit_schedule_interval:e})}function Rn(e){return Zr({deposit_schedule_weekly_anchor:e})}function Cn(e){return Zr({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*An(){let e=null;try{const t=(0,j.select)(B).getSettings();yield dn(!0,null),yield(0,z.apiFetch)({path:"/wc/v3/payments/settings",method:"post",data:t}),yield(0,j.dispatch)("core/notices").createSuccessNotice((0,he.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error saving settings.","woocommerce-payments"))}finally{yield dn(!1,e)}return null===e}function xn(e){return Zr({payment_request_enabled_locations:[...e]})}function Dn(e){return Zr({is_platform_checkout_enabled:e})}function Pn(e){return Zr({platform_checkout_custom_message:e})}function In(e){return Zr({platform_checkout_store_logo:e})}function Nn(e){return Zr({platform_checkout_enabled_locations:[...e]})}function*Fn(){try{const e=yield(0,z.apiFetch)({path:"/wc/v3/payments/settings"});yield an(e)}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error retrieving settings.","woocommerce-payments"))}}var Mn="SET_CURRENCIES",Ln="SET_AVAILABLE_CURRENCIES",jn="SET_ENABLED_CURRENCIES",zn="SET_DEFAULT_CURRENCY",Bn="SET_CURRENCY_SETTINGS",Un="SET_STORE_SETTINGS";const Hn={};const qn=e=>e&&e.multiCurrency||{},Gn=e=>qn(e).currencies||[],Vn=e=>Gn(e).available||{},Wn=e=>Gn(e).enabled||{},Kn=e=>Gn(e).default||{},Yn=e=>qn(e).currency_settings||{},$n=e=>qn(e).settings||{};function Qn(e){return{type:Mn,data:e}}function Xn(e){return{type:Ln,data:e}}function Zn(e){return{type:jn,data:e}}function Jn(e){return{type:zn,data:e}}function eo(e,t){return{type:Bn,data:{code:e,data:t}}}function to(e){return{type:Un,data:e}}function*ro(e){const t=Object.keys((0,j.select)(B).getEnabledCurrencies()),r=e.filter((e=>!t.includes(e))),n=t.filter((t=>!e.includes(t)));try{const t=yield(0,z.apiFetch)({path:"/wc/v3/payments/multi-currency/update-enabled-currencies",method:"POST",data:{enabled:e}});yield Qn(t),yield(0,j.dispatch)("core/notices").createSuccessNotice((0,he.__)("Enabled currencies updated.","woocommerce-payments")),jt(zt.MULTI_CURRENCY_ENABLED_CURRENCIES_UPDATED,{added_currencies:r,removed_currencies:n})}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error updating enabled currencies.","woocommerce-payments"))}}function*no(e,t){try{const r=yield(0,z.apiFetch)({path:`/wc/v3/payments/multi-currency/currencies/${e}`,method:"POST",data:t});yield eo(e,r),yield(0,j.dispatch)("core/notices").createSuccessNotice((0,he.__)("Currency settings updated.","woocommerce-payments"))}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error updating currency settings.","woocommerce-payments"))}}function*oo(e,t){try{const r=yield(0,z.apiFetch)({path:"/wc/v3/payments/multi-currency/update-settings",method:"POST",data:{wcpay_multi_currency_enable_auto_currency:e?"yes":"no",wcpay_multi_currency_enable_storefront_switcher:t?"yes":"no"}});yield to(r),yield(0,j.dispatch)("core/notices").createSuccessNotice((0,he.__)("Store settings saved.","woocommerce-payments"))}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error saving store settings.","woocommerce-payments"))}}function*io(){try{const e=yield(0,z.apiFetch)({path:"/wc/v3/payments/multi-currency/currencies"});yield Qn(e)}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error retrieving currencies.","woocommerce-payments"))}}function*ao(e){const t=`/wc/v3/payments/multi-currency/currencies/${e}`;try{const r=yield(0,z.apiFetch)({path:t});yield eo(e,r)}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*so(){try{const e=yield(0,z.apiFetch)({path:"/wc/v3/payments/multi-currency/get-settings"});yield to(e)}catch(e){yield(0,j.dispatch)("core/notices").createErrorNotice((0,he.__)("Error retrieving store settings.","woocommerce-payments"))}}var co={SET_CARD_READER_STATS:"SET_CARD_READER_STATS",SET_ERROR_FOR_CARD_READER_STATS:"SET_ERROR_FOR_CARD_READER_STATS",SET_READERS:"SET_READERS",SET_ERROR_FOR_CARD_READERS:"SET_ERROR_FOR_CARD_READERS"};const uo=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},lo=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},po=e=>e.readers&&e.readers.list?e.readers.list:{};function fo(e,t){return{type:co.SET_CARD_READER_STATS,id:e,data:t}}function mo(e,t){return{type:co.SET_READERS,query:e,data:t}}function ho(e,t,r){return{type:co.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function yo(e,t){return{type:co.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*go(e,t){try{const r=yield(0,z.apiFetch)({path:`/wc/v3/payments/readers/charges/${t}`});yield fo(e,r)}catch(t){yield ho(e,null,t)}}function*vo(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/readers",{limit:e.limit});try{const r=yield(0,z.apiFetch)({path:t})||{};yield mo(e,r)}catch(e){yield yo(null,e)}}var bo;!function(e){e.SET_ACTIVE_LOAN_SUMMARY="SET_ACTIVE_LOAN_SUMMARY",e.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY="SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY",e.SET_LOANS="SET_LOANS",e.SET_ERROR_FOR_LOANS="SET_ERROR_FOR_LOANS"}(bo||(bo={}));var _o=bo,wo=function(){return wo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wo.apply(this,arguments)},Eo={},So=function(e){return e&&e.capital||{}},Oo=function(e){return So(e).summary},To=function(e){return So(e).summaryError},ko=function(e){return So(e).loans||[]},Ro=function(e){return So(e).loansError};function Co(e){return{type:_o.SET_ACTIVE_LOAN_SUMMARY,data:e}}function Ao(e){return{type:_o.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function xo(e){return{type:_o.SET_LOANS,data:e.data}}function Do(e){return{type:_o.SET_ERROR_FOR_LOANS,error:e}}var Po=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function Io(){var e,t;return Po(this,(function(r){switch(r.label){case 0:e="/wc/v3/payments/capital/active_loan_summary",r.label=1;case 1:return r.trys.push([1,4,,7]),[4,(0,z.apiFetch)({path:e})];case 2:return[4,Co(r.sent())];case 3:return r.sent(),[3,7];case 4:return t=r.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving the active loan summary.","woocommerce-payments"))];case 5:return r.sent(),[4,Ao(t)];case 6:return r.sent(),[3,7];case 7:return[2]}}))}function No(){var e,t;return Po(this,(function(r){switch(r.label){case 0:e="/wc/v3/payments/capital/loans",r.label=1;case 1:return r.trys.push([1,4,,7]),[4,(0,z.apiFetch)({path:e})];case 2:return[4,xo(r.sent())];case 3:return r.sent(),[3,7];case 4:return t=r.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving the active loan summary.","woocommerce-payments"))];case 5:return r.sent(),[4,Do(t)];case 6:return r.sent(),[3,7];case 7:return[2]}}))}var Fo="SET_DOCUMENTS",Mo="SET_ERROR_FOR_DOCUMENTS",Lo="SET_DOCUMENTS_SUMMARY",jo="SET_ERROR_FOR_DOCUMENTS_SUMMARY";const zo={summary:{}};const Bo=e=>e&&e.documents||{},Uo=(e,t)=>{const r=J(t);return Bo(e)[r]||{}},Ho=(e,t)=>Uo(e,t).data||[],qo=(e,t)=>Uo(e,t).error||{},Go=(e,t)=>{const r=J(t);return Bo(e).summary[r]||{}},Vo=(e,t)=>Go(e,t).data||{},Wo=(e,t)=>Go(e,t).error||{};function Ko(e,t){return{type:Fo,query:e,data:t}}function Yo(e,t,r){return{type:Mo,query:e,data:t,error:r}}function $o(e,t){return{type:Lo,query:e,data:t}}function Qo(e,t,r){return{type:jo,query:e,data:t,error:r}}const Xo=e=>({user_email:e.userEmail,match:e.match,date_before:Re(e.dateBefore,!0),date_after:Re(e.dateAfter),date_between:e.dateBetween&&[Re(e.dateBetween[0]),Re(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*Zo(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/documents",{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Xo(e)});try{const r=yield(0,z.apiFetch)({path:t});yield Ko(e,r.data||[])}catch(t){yield(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving documents.","woocommerce-payments")),yield Yo(e,null,t)}}function*Jo(e){const t=(0,Ee.addQueryArgs)("/wc/v3/payments/documents/summary",Xo(e));try{const r=yield(0,z.apiFetch)({path:t});yield $o(e,r)}catch(t){yield Qo(e,null,t)}}var ei;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(ei||(ei={}));var ti=ei,ri=function(){return ri=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ri.apply(this,arguments)},ni={},oi=function(e,t){var r=e.paymentIntents,n=null==r?void 0:r[t];return(null==n?void 0:n.data)||{}},ii=function(e,t){var r=e.paymentIntents,n=null==r?void 0:r[t];return(null==n?void 0:n.error)||{}};function ai(e,t){return{type:ti.SET_PAYMENT_INTENT,id:e,data:t}}function si(e,t){return{type:ti.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function ci(e){var t,r;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,6]),[4,(0,z.apiFetch)({path:"/wc/v3/payments/payment_intents/"+e})];case 1:return t=n.sent(),[4,ai(e,t)];case 2:case 5:return n.sent(),[3,6];case 3:return r=n.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving transaction.","woocommerce-payments"))];case 4:return n.sent(),[4,si(e,r)];case 6:return[2]}}))}var ui="SET_AUTHORIZATIONS",li="SET_AUTHORIZATION",di="SET_ERROR_FOR_AUTHORIZATIONS",pi="SET_AUTHORIZATIONS_SUMMARY",fi="SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY",mi=function(){return mi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mi.apply(this,arguments)},hi={summary:{},byId:{}},yi=function(e){return e&&e.authorizations||{}},gi=function(e,t){var r=J(t);return yi(e)[r]||{}},vi=function(e,t){return gi(e,t).data||[]},bi=function(e,t){return(yi(e).byId||{})[t]},_i=function(e,t){return gi(e,t).error||{}},wi=function(e,t){var r=J(t);return yi(e).summary[r]||{}},Ei=function(e,t){return wi(e,t).data||{}},Si=function(e,t){return wi(e,t).error||{}};function Oi(e,t){return{type:ui,data:t,query:e}}function Ti(e,t){return{type:di,query:e,error:t}}function ki(e){return{type:li,data:e}}function Ri(e,t){return{type:pi,data:t,query:e}}function Ci(e,t){var r;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){switch(n.label){case 0:return n.trys.push([0,8,10,12]),[4,(0,z.dispatch)(B,"startResolution","getAuthorization",[e])];case 1:return n.sent(),[4,(0,z.apiFetch)({path:"/wc/v3/payments/orders/"+t+"/capture_authorization",method:"post",data:{payment_intent_id:e}})];case 2:return[4,ki({payment_intent_id:(r=n.sent()).id,captured:"succeeded"===r.status})];case 3:return n.sent(),[4,(0,z.dispatch)(B,"invalidateResolutionForStoreSelector","getAuthorizations")];case 4:return n.sent(),[4,(0,z.dispatch)(B,"invalidateResolutionForStoreSelector","getAuthorizationsSummary")];case 5:return n.sent(),[4,(0,z.dispatch)(B,"invalidateResolutionForStoreSelector","getTimeline")];case 6:return n.sent(),[4,(0,z.dispatch)("core/notices","createSuccessNotice",(0,he.sprintf)((0,he.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))];case 7:case 9:return n.sent(),[3,12];case 8:return n.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.sprintf)((0,he.__)("There has been an error capturing the payment for order #%s. Please try again later.","woocommerce-payments"),t))];case 10:return[4,(0,z.dispatch)(B,"finishResolution","getAuthorization",[e])];case 11:return n.sent(),[7];case 12:return[2]}}))}function Ai(e,t){return{type:fi,query:e,error:t}}var xi=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function Di(e){var t,r,n,o,i,a,s,c,u,l,d,p;return xi(this,(function(f){switch(f.label){case 0:t=e.paged,r=void 0===t?1:t,n=e.per_page,o=void 0===n?25:n,i=e.orderby,a=void 0===i?"created":i,s=e.order,c=void 0===s?"desc":s,"capture_by"===a&&(a="created"),u=(0,Ee.addQueryArgs)("/wc/v3/payments/authorizations",{page:r,pagesize:o,sort:a,direction:c}),f.label=1;case 1:return f.trys.push([1,4,,7]),[4,(0,z.apiFetch)({path:u})];case 2:return l=f.sent(),[4,Oi(e,null!==(p=l.data)&&void 0!==p?p:[])];case 3:return f.sent(),[3,7];case 4:return d=f.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving uncaptured transactions.","woocommerce-payments"))];case 5:return f.sent(),[4,Ti(e,d)];case 6:return f.sent(),[3,7];case 7:return[2]}}))}function Pi(e){var t,r,n,o,i;return xi(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,7]),e?[4,(0,z.apiFetch)({path:"/wc/v3/payments/authorizations/"+e})]:[3,3];case 1:return t=a.sent(),n=(r=t).is_captured,o=r.payment_intent_id,i=r.created,[4,ki({payment_intent_id:o,captured:n,created:i})];case 2:a.sent(),a.label=3;case 3:return[3,7];case 4:return"authorization_missing"===a.sent().code?[3,6]:[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving authorization.","woocommerce-payments"))];case 5:a.sent(),a.label=6;case 6:return[3,7];case 7:return[2]}}))}function Ii(e){var t,r,n;return xi(this,(function(o){switch(o.label){case 0:t=(0,Ee.addQueryArgs)("/wc/v3/payments/authorizations/summary",{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged}),o.label=1;case 1:return o.trys.push([1,4,,7]),[4,(0,z.apiFetch)({path:t})];case 2:return r=o.sent(),[4,Ri(e,null!=r?r:[])];case 3:return o.sent(),[3,7];case 4:return n=o.sent(),[4,(0,z.dispatch)("core/notices","createErrorNotice",(0,he.__)("Error retrieving uncaptured transactions.","woocommerce-payments"))];case 5:return o.sent(),[4,Ai(e,n)];case 6:return o.sent(),[3,7];case 7:return[2]}}))}(0,j.registerStore)(B,{reducer:(0,j.combineReducers)({deposits:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,{type:t,query:r={},data:n=[],error:o}=arguments.length>1?arguments[1]:void 0;const i=J(r);switch(t){case H:return{...e,byId:{...e.byId,[n.id]:n}};case q:return{...e,overview:{...e.overview,data:n}};case G:return{...e,overview:{...e.overview,error:o}};case X:return{...e,overviews:{...e.overviews,data:n}};case Z:return{...e,overviews:{...e.overviews,error:o}};case V:return{...e,byId:{...e.byId,...(0,U.keyBy)(n,"id")},queries:{...e.queries,[i]:{data:(0,U.map)(n,"id")}}};case W:return{...e,count:n};case K:return{...e,queries:{...e.queries,[i]:{error:o}}};case Y:return{...e,summary:{...e.summary,[i]:{data:n}}};case $:return{...e,summary:{...e.summary,[i]:{error:o}}};case Q:return{...e,instant:{...e.instant,data:n}}}return e},transactions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe,{type:t,query:r={},data:n=[],error:o}=arguments.length>1?arguments[1]:void 0;const i=J(r);switch(t){case Ke:return{...e,[i]:{data:n}};case Ye:return{...e,[i]:{error:o}};case $e:return{...e,summary:{...e.summary,[i]:{data:n}}};case Qe:return{...e,summary:{...e.summary,[i]:{error:o}}}}return e},charges:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,id:r,data:n,error:o}=arguments.length>1?arguments[1]:void 0;switch(t){case ft:e={...e,[r]:{...e[r],data:n}};break;case mt:e={...e,[r]:{...e[r],error:o}}}return e},timeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,id:r,data:n,error:o}=arguments.length>1?arguments[1]:void 0;switch(t){case _t:e={...e,[r]:{data:n}};break;case wt:e={...e,[r]:{...e[r],error:o}}}return e},disputes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt,{type:t,query:r={},data:n=[]}=arguments.length>1?arguments[1]:void 0;const o=J(r);switch(t){case Rt:return{...e,byId:{...e.byId,[n.id]:n}};case Ct:return{...e,cached:{...e.cached,...(0,U.keyBy)(n,"dispute_id")},queries:{...e.queries,[o]:{data:(0,U.map)(n,"dispute_id")}}};case At:return{...e,summary:{...e.summary,[o]:{data:n}}}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tr,{type:t,...r}=arguments.length>1?arguments[1]:void 0;switch(t){case Qt:return{...e,data:r.data};case Xt:return{...e,savingError:null,data:{...e.data,...r.payload}};case Zt:return{...e,isSaving:r.isSaving,savingError:r.error};case Jt:return{...e,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case er:return{...e,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter((e=>e!==r.id))}}}return e},multiCurrency:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hn,{type:t,data:r=[]}=arguments.length>1?arguments[1]:void 0;switch(t){case Mn:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case Ln:return{...e,currencies:{...e,available:r.available},available:r.available};case jn:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case zn:return{...e,currencies:{...e,default:r.default},default:r.default};case Bn:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case Un:return{...e,settings:{enable_auto_currency:r.wcpay_multi_currency_enable_auto_currency,enable_storefront_switcher:r.wcpay_multi_currency_enable_storefront_switcher,site_theme:r.site_theme,date_format:r.date_format,time_format:r.time_format,store_url:r.store_url}}}return e},readers:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,id:r,data:n,error:o}=arguments.length>1?arguments[1]:void 0;switch(t){case co.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:n}};break;case co.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:o}};break;case co.SET_READERS:e={...e,list:n}}return e},capital:function(e,t){switch(void 0===e&&(e=Eo),t.type){case _o.SET_ACTIVE_LOAN_SUMMARY:return wo(wo({},e),{summary:t.data,summaryError:void 0});case _o.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return wo(wo({},e),{summary:void 0,summaryError:t.error});case _o.SET_LOANS:return wo(wo({},e),{loans:t.data,loansError:void 0});case _o.SET_ERROR_FOR_LOANS:return wo(wo({},e),{loans:void 0,loansError:t.error})}return e},documents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zo,{type:t,query:r={},data:n=[],error:o}=arguments.length>1?arguments[1]:void 0;const i=J(r);switch(t){case Fo:return{...e,[i]:{data:n}};case Mo:return{...e,[i]:{error:o}};case Lo:return{...e,summary:{...e.summary,[i]:{data:n}}};case jo:return{...e,summary:{...e.summary,[i]:{error:o}}}}return e},paymentIntents:function(e,t){var r,n;void 0===e&&(e=ni);var o=t.type,i=t.id;switch(o){case ti.SET_PAYMENT_INTENT:return ri(ri({},e),((r={})[i]=ri(ri({},e[i]),{data:t.data}),r));case ti.SET_ERROR_FOR_PAYMENT_INTENT:return ri(ri({},e),((n={})[i]=ri(ri({},e[i]),{error:t.error}),n));default:return e}},authorizations:function(e,t){var r,n,o,i,a;switch(void 0===e&&(e=hi),t.type){case li:var s=t.data;return mi(mi({},e),{byId:mi(mi({},e.byId),(r={},r[s.payment_intent_id]=mi(mi({},e.byId[s.payment_intent_id]),t.data),r))});case ui:return mi(mi({},e),((n={})[J(t.query)]={data:t.data},n));case di:return mi(mi({},e),((o={})[J(t.query)]={error:t.error},o));case pi:var c=t.data;return mi(mi({},e),{summary:mi(mi({},e.summary),(i={},i[J(t.query)]={data:c||{}},i))});case fi:return mi(mi({},e),{summary:mi(mi({},e.summary),(a={},a[J(t.query)]={error:t.error||""},a))})}return e}}),actions:{...t,...i,...c,...d,...m,...g,..._,...S,...k,...A,...P,...F},controls:z.controls,selectors:{...e,...o,...s,...l,...f,...y,...b,...E,...T,...C,...D,...N},resolvers:{...n,...a,...u,...p,...h,...v,...w,...O,...R,...x,...I,...M}});var Ni=window.React,Fi=r.n(Ni);function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mi.apply(this,arguments)}function Li(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ji(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zi(e,t){if(e){if("string"==typeof e)return ji(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ji(e,t):void 0}}function Bi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(e,t)||zi(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.")}()}var Ui=r(4184),Hi=r.n(Ui),qi=window.wp.compose,Gi=window.wp.primitives,Vi=(0,L.createElement)(Gi.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,L.createElement)(Gi.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Wi=(0,L.createElement)(Gi.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,L.createElement)(Gi.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Ki=window.wp.deprecated,Yi=r.n(Ki);function $i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Xi(e,t,r){return t&&Qi(e.prototype,t),r&&Qi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zi(e,t){return Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zi(e,t)}function Ji(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zi(e,t)}function ea(e){return ea="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},ea(e)}function ta(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ra(e,t){if(t&&("object"===ea(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ta(e)}function na(e){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},na(e)}var oa=window.wp.dom,ia=window.wp.keycodes,aa=(0,L.createElement)(Gi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,L.createElement)(Gi.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 sa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ca(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ua(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ca(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function la(e,t,r,n,o,i,a){var s=t.width,c="rtl"===document.documentElement.dir;"left"===r&&c?r="right":"right"===r&&c&&(r="left"),"left"===n&&c?n="right":"right"===n&&c&&(n="left");var u=Math.round(e.left+e.width/2),l={popoverLeft:u,contentWidth:(u-s/2>0?s/2:u)+(u+s/2>window.innerWidth?window.innerWidth-u:s/2)},d=e.left;"right"===n?d=e.right:"middle"!==i&&(d=u);var p=e.right;"left"===n?p=e.left:"middle"!==i&&(p=u);var f,m={popoverLeft:d,contentWidth:d-s>0?s:d},h={popoverLeft:p,contentWidth:p+s>window.innerWidth?window.innerWidth-p:s},y=r,g=null;if(!o)if("center"===r&&l.contentWidth===s)y="center";else if("left"===r&&m.contentWidth===s)y="left";else if("right"===r&&h.contentWidth===s)y="right";else{var v="left"==(y=m.contentWidth>h.contentWidth?"left":"right")?m.contentWidth:h.contentWidth;g=v!==s?v:null}if(f="center"===y?l.popoverLeft:"left"===y?m.popoverLeft:h.popoverLeft,a){var b=a.getBoundingClientRect();f=Math.min(f,b.right-s)}return{xAxis:y,popoverLeft:f,contentWidth:g}}function da(e,t,r,n,o,i,a){var s=t.height;if(o){var c=((0,oa.getScrollContainer)(i)||document.body).getBoundingClientRect().top+s-a;if(e.top<=c)return{yAxis:r,popoverTop:Math.min(e.bottom,c)}}var u=e.top+e.height/2;"bottom"===n?u=e.bottom:"top"===n&&(u=e.top);var l={popoverTop:u,contentHeight:(u-s/2>0?s/2:u)+(u+s/2>window.innerHeight?window.innerHeight-u:s/2)},d={popoverTop:e.top,contentHeight:e.top-10-s>0?s:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+s>window.innerHeight?window.innerHeight-10-e.bottom:s},f=r,m=null;if(!o)if("middle"===r&&l.contentHeight===s)f="middle";else if("top"===r&&d.contentHeight===s)f="top";else if("bottom"===r&&p.contentHeight===s)f="bottom";else{var h="top"==(f=d.contentHeight>p.contentHeight?"top":"bottom")?d.contentHeight:p.contentHeight;m=h!==s?h:null}return{yAxis:f,popoverTop:"middle"===f?l.popoverTop:"top"===f?d.popoverTop:p.popoverTop,contentHeight:m}}function pa(e){return function(e){if(Array.isArray(e))return ji(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zi(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 fa=(0,L.createContext)({focusHistory:[]}),ma=fa.Provider,ha=fa.Consumer;ma.displayName="FocusReturnProvider",ha.displayName="FocusReturnConsumer",L.Component;var ya=(0,qi.createHigherOrderComponent)((function e(t){if((n=t)instanceof L.Component||"function"==typeof n){var r=t;return e({})(r)}var n,o=t.onFocusReturn,i=void 0===o?U.stubTrue:o;return function(e){var t=function(t){Ji(a,t);var r,n,o=(r=a,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,t=na(r);if(n){var o=na(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return ra(this,e)});function a(){var e;return $i(this,a),(e=o.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 Xi(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,r=this.ownFocusedElements;if(t&&!1!==i())for(var n,o=[].concat(pa(U.without.apply(void 0,[this.props.focus.focusHistory].concat(pa(r)))),[e]);n=o.pop();)if(document.body.contains(n))return void n.focus()}},{key:"render",value:function(){return(0,L.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},(0,L.createElement)(e,this.props.childProps))}}]),a}(L.Component);return function(e){return(0,L.createElement)(ha,null,(function(r){return(0,L.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var ga=(0,qi.createHigherOrderComponent)((function(e){return function(t){Ji(i,t);var r,n,o=(r=i,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,t=na(r);if(n){var o=na(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return ra(this,e)});function i(){var e;return $i(this,i),(e=o.apply(this,arguments)).focusContainRef=(0,L.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(ta(e)),e}return Xi(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===ia.TAB){var t=oa.focus.tabbable.find(this.focusContainRef.current);if(t.length){var r=t[0],n=t[t.length-1];e.shiftKey&&e.target===r?(e.preventDefault(),n.focus()):(e.shiftKey||e.target!==n)&&t.includes(e.target)||(e.preventDefault(),r.focus())}}}},{key:"render",value:function(){return(0,L.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},(0,L.createElement)(e,this.props))}}]),i}(L.Component)}),"withConstrainedTabbing"),va=ga;var ba=["button","submit"],_a=(0,qi.createHigherOrderComponent)((function(e){return function(t){Ji(i,t);var r,n,o=(r=i,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,t=na(r);if(n){var o=na(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return ra(this,e)});function i(){var e;return $i(this,i),(e=o.apply(this,arguments)).bindNode=e.bindNode.bind(ta(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(ta(e)),e.queueBlurCheck=e.queueBlurCheck.bind(ta(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(ta(e)),e}return Xi(i,[{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,r=e.target;(0,U.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,U.includes)(ba,e.type)}return!1}(r)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return(0,L.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},(0,L.createElement)(e,Mi({ref:this.bindNode},this.props)))}}]),i}(L.Component)}),"withFocusOutside");var wa=function(e){Ji(o,e);var t,r,n=(t=o,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,n=na(t);if(r){var o=na(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ra(this,e)});function o(){return $i(this,o),n.apply(this,arguments)}return Xi(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(L.Component),Ea=_a(wa);function Sa(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 r,n=na(e);if(t){var o=na(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ra(this,r)}}var Oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,r=void 0===t?document:t,n=e.className,o=void 0===n?"lockscroll":n,i=0,a=0;function s(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](o),r.documentElement.classList[n](o),e||(t.scrollTop=a)}function c(){0===i&&s(!0),++i}function u(){1===i&&s(!1),--i}return function(e){Ji(r,e);var t=Sa(r);function r(){return $i(this,r),t.apply(this,arguments)}return Xi(r,[{key:"componentDidMount",value:function(){c()}},{key:"componentWillUnmount",value:function(){u()}},{key:"render",value:function(){return null}}]),r}(L.Component)}();function Ta(e){e.stopPropagation()}var ka=(0,L.forwardRef)((function(e,t){var r=e.children,n=Li(e,["children"]);return(0,L.createElement)("div",Mi({},n,{ref:t,onMouseDown:Ta}),r)}));function Ra(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=na(e)););return e}function Ca(){return Ca="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Ra(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ca.apply(this,arguments)}window.wp.isShallowEqual;var Aa=(window.wp.warning,r(4155)),xa=(0,L.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==Aa&&Aa.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}});var Da=(0,L.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),Pa=(Da.Provider,Da.Consumer);L.Component;var Ia=function(e){Ji(o,e);var t,r,n=(t=o,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,n=na(t);if(r){var o=na(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ra(this,e)});function o(){var e;return $i(this,o),(e=n.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(ta(e)),e}return Xi(o,[{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,r=t.name,n=t.unregisterSlot,o=t.registerSlot;e.name!==r&&(n(e.name),o(r,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||Ca(na(o.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.name,n=e.fillProps,o=void 0===n?{}:n,i=e.getFills,a=(0,U.map)(i(r,this),(function(e){var t=e.occurrence,r=(0,U.isFunction)(e.children)?e.children(o):e.children;return L.Children.map(r,(function(e,r){if(!e||(0,U.isString)(e))return e;var n="".concat(t,"---").concat(e.key||r);return(0,L.cloneElement)(e,{key:n})}))})).filter((0,U.negate)(L.isEmptyElement));return(0,L.createElement)(L.Fragment,null,(0,U.isFunction)(t)?t(a):a)}}]),o}(L.Component),Na=function(e){return(0,L.createElement)(Pa,null,(function(t){var r=t.registerSlot,n=t.unregisterSlot,o=t.getFills;return(0,L.createElement)(Ia,Mi({},e,{registerSlot:r,unregisterSlot:n,getFills:o}))}))},Fa=0;function Ma(e){var t=e.name,r=e.children,n=e.registerFill,o=e.unregisterFill,i=function(e){var t=(0,L.useContext)(Da),r=t.getSlot,n=t.subscribe,o=Bi((0,L.useState)(r(e)),2),i=o[0],a=o[1];return(0,L.useEffect)((function(){return a(r(e)),n((function(){a(r(e))}))}),[e]),i}(t),a=(0,L.useRef)({name:t,children:r});return a.current.occurrence||(a.current.occurrence=++Fa),(0,L.useLayoutEffect)((function(){return n(t,a.current),function(){return o(t,a.current)}}),[]),(0,L.useLayoutEffect)((function(){a.current.children=r,i&&i.forceUpdate()}),[r]),(0,L.useLayoutEffect)((function(){t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,n(t,a.current))}),[t]),i&&i.node?((0,U.isFunction)(r)&&(r=r(i.props.fillProps)),(0,L.createPortal)(r,i.node)):null}var La=function(e){return(0,L.createElement)(Pa,null,(function(t){var r=t.registerFill,n=t.unregisterFill;return(0,L.createElement)(Ma,Mi({},e,{registerFill:r,unregisterFill:n}))}))};function ja(e){var t=e.name,r=e.fillProps,n=void 0===r?{}:r,o=e.as,i=void 0===o?"div":o,a=Li(e,["name","fillProps","as"]),s=(0,L.useContext)(xa),c=(0,L.useRef)();return(0,L.useLayoutEffect)((function(){return s.registerSlot(t,c,n),function(){s.unregisterSlot(t,c)}}),[s.registerSlot,s.unregisterSlot,t]),(0,L.useLayoutEffect)((function(){s.updateSlot(t,n)})),(0,L.createElement)(i,Mi({ref:c},a))}function za(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?za(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ua(e){var t=(0,L.useContext)(xa),r=t.slots[e]||{},n=t.fills[e],o=(0,L.useMemo)((function(){return n||[]}),[n]),i=(0,L.useCallback)((function(r){t.updateSlot(e,r)}),[e,t.updateSlot]),a=(0,L.useCallback)((function(r){t.unregisterSlot(e,r)}),[e,t.unregisterSlot]),s=(0,L.useCallback)((function(r){t.registerFill(e,r)}),[e,t.registerFill]),c=(0,L.useCallback)((function(r){t.unregisterFill(e,r)}),[e,t.unregisterFill]);return Ba(Ba({},r),{},{updateSlot:i,unregisterSlot:a,fills:o,registerFill:s,unregisterFill:c})}function Ha(e){var t,r=e.name,n=e.children,o=Ua(r),i=(0,L.useRef)({rerender:(t=Bi((0,L.useState)({}),2)[1],function(){return t({})})});return(0,L.useEffect)((function(){return o.registerFill(i),function(){o.unregisterFill(i)}}),[o.registerFill,o.unregisterFill]),o.ref&&o.ref.current?("function"==typeof n&&(n=n(o.fillProps)),(0,L.createPortal)(n,o.ref.current)):null}function qa(e){var t=e.bubblesVirtually,r=Li(e,["bubblesVirtually"]);return t?(0,L.createElement)(ja,r):(0,L.createElement)(Na,r)}function Ga(e){return(0,L.createElement)(L.Fragment,null,(0,L.createElement)(La,e),(0,L.createElement)(Ha,e))}function Va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Va(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Va(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ka(e){var t=e.type,r=e.origin,n=void 0===r?function(e){return"appear"===e?"top":"left"}(t):r;if("appear"===t){var o,i=Bi(n.split(" "),2),a=i[0],s=i[1],c=void 0===s?"center":s;return Hi()("components-animate__appear",(sa(o={},"is-from-"+c,"center"!==c),sa(o,"is-from-"+a,"middle"!==a),o))}return"slide-in"===t?Hi()("components-animate__slide-in","is-from-"+n):"loading"===t?Hi()("components-animate__loading"):void 0}function Ya(e){var t=e.type,r=e.options,n=void 0===r?{}:r;return(0,e.children)({className:Ka(Wa({type:t},n))})}var $a=va(ya((function(e){return e.children}))),Qa="Popover";function Xa(e,t){var r,n=(r=t).ownerDocument.defaultView.getComputedStyle(r),o=n.paddingTop,i=n.paddingBottom,a=n.paddingLeft,s=n.paddingRight,c=o?parseInt(o,10):0,u=i?parseInt(i,10):0,l=a?parseInt(a,10):0,d=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+c,width:e.width-l-d,height:e.height-c-u,left:e.left+l,right:e.right-d,top:e.top+c,bottom:e.bottom-u}}function Za(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function Ja(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function es(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ts=function(e){var t=e.headerTitle,r=e.onClose,n=e.onKeyDown,o=e.children,i=e.className,a=e.noArrow,s=void 0===a||a,c=e.isAlternate,u=e.position,l=void 0===u?"bottom right":u,d=(e.range,e.focusOnMount),p=void 0===d?"firstElement":d,f=e.anchorRef,m=e.shouldAnchorIncludePadding,h=e.anchorRect,y=e.getAnchorRect,g=e.expandOnMobile,v=e.animate,b=void 0===v||v,_=e.onClickOutside,w=e.onFocusOutside,E=e.__unstableSticky,S=e.__unstableSlotName,O=void 0===S?Qa:S,T=e.__unstableObserveElement,k=e.__unstableBoundaryParent,R=Li(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),C=(0,L.useRef)(null),A=(0,L.useRef)(null),x=(0,L.useRef)(),D=(0,qi.useViewportMatch)("medium","<"),P=Bi((0,L.useState)(),2),I=P[0],N=P[1],F=Ua(O),M=g&&D,j=Bi((0,qi.useResizeObserver)(),2),z=j[0],B=j[1];s=M||s,(0,L.useLayoutEffect)((function(){if(M)return es(x.current,"is-without-arrow",s),es(x.current,"is-alternate",c),Za(x.current,"data-x-axis"),Za(x.current,"data-y-axis"),Ja(x.current,"top"),Ja(x.current,"left"),Ja(A.current,"maxHeight"),void Ja(A.current,"maxWidth");var e=function(){if(x.current&&A.current){var e=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(r){if(!e.current)return;return r(e.current)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if(n instanceof window.Range)return(0,oa.getRectangleFromRange)(n);if(n instanceof window.Element){var i=n.getBoundingClientRect();return o?i:Xa(i,n)}var a=n.top,s=n.bottom,c=a.getBoundingClientRect(),u=s.getBoundingClientRect(),l=new window.DOMRect(c.left,c.top,c.width,u.bottom-c.top);return o?l:Xa(l,n)}if(e.current){var d=e.current.parentNode,p=d.getBoundingClientRect();return o?p:Xa(p,d)}}(C,h,y,f,m);if(e){var t,r,n=x.current,o=n.offsetParent,i=n.ownerDocument,a=0;if(o&&o!==i.body){var u=o.getBoundingClientRect();a=u.top,e=new window.DOMRect(e.left-u.left,e.top-u.top,e.width,e.height)}k&&(t=null===(r=x.current.closest(".popover-slot"))||void 0===r?void 0:r.parentNode);var d=function(e,t){var r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=Bi((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top").split(" "),3),s=a[0],c=a[1],u=void 0===c?"center":c,l=a[2],d=da(e,t,s,l,r,n,o);return ua(ua({},la(e,t,u,l,r,d.yAxis,i)),d)}(e,B.height?B:A.current.getBoundingClientRect(),l,E,x.current,a,t),p=d.popoverTop,g=d.popoverLeft,v=d.xAxis,b=d.yAxis,_=d.contentHeight,w=d.contentWidth;"number"==typeof p&&"number"==typeof g&&(Ja(x.current,"top",p+"px"),Ja(x.current,"left",g+"px")),es(x.current,"is-without-arrow",s||"center"===v&&"middle"===b),es(x.current,"is-alternate",c),Za(x.current,"data-x-axis",v),Za(x.current,"data-y-axis",b),Ja(A.current,"maxHeight","number"==typeof _?_+"px":""),Ja(A.current,"maxWidth","number"==typeof w?w+"px":""),N(({left:"right",right:"left"}[v]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,r,n=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),T&&(r=new window.MutationObserver(e)).observe(T,{attributes:!0}),function(){window.clearInterval(n),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),r&&r.disconnect()}}),[M,h,y,f,m,l,B,E,T,k]),function(e,t){(0,L.useEffect)((function(){var r=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var r=oa.focus.tabbable.find(t.current)[0];r?r.focus():t.current.focus()}}),0);return function(){return clearTimeout(r)}}),[])}(p,A);var U=function(e){e.keyCode===ia.ESCAPE&&r&&(e.stopPropagation(),r()),n&&n(e)},H=(0,L.createElement)(Ea,{onFocusOutside:function(e){if(w)w(e);else if(_){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}}),Yi()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),_(t)}else r&&r()}},(0,L.createElement)(Ya,{type:b&&I?"appear":null,options:{origin:I}},(function(e){var n=e.className;return(0,L.createElement)(ka,Mi({className:Hi()("components-popover",i,n,{"is-expanded":M,"is-without-arrow":s,"is-alternate":c})},R,{onKeyDown:U,ref:x}),M&&(0,L.createElement)(Oa,null),M&&(0,L.createElement)("div",{className:"components-popover__header"},(0,L.createElement)("span",{className:"components-popover__header-title"},t),(0,L.createElement)(ps,{className:"components-popover__close",icon:aa,onClick:r})),(0,L.createElement)("div",{ref:A,className:"components-popover__content",tabIndex:"-1"},(0,L.createElement)("div",{style:{position:"relative"}},z,o)))})));return p&&(H=(0,L.createElement)($a,null,H)),F.ref&&(H=(0,L.createElement)(Ga,{name:O},H)),f||h?H:(0,L.createElement)("span",{ref:C},H)};ts.Slot=function(e){var t=e.name,r=void 0===t?Qa:t;return(0,L.createElement)(qa,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var rs=ts,ns=function(e){var t,r,n=e.shortcut,o=e.className;return n?((0,U.isString)(n)&&(t=n),(0,U.isObject)(n)&&(t=n.display,r=n.ariaLabel),(0,L.createElement)("span",{className:o,"aria-label":r},t)):null};var os=function(e){Ji(o,e);var t,r,n=(t=o,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,n=na(t);if(r){var o=na(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ra(this,e)});function o(){var e;return $i(this,o),(e=n.apply(this,arguments)).delayedSetIsOver=(0,U.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Xi(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var r=this.props.children;if(1===L.Children.count(r)){var n=L.Children.only(r);"function"==typeof n.props[e]&&n.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var r=this;return function(n){if(r.emitToChild(e,n),!(n.currentTarget.disabled||"focus"===n.type&&r.isInMouseDown)){r.delayedSetIsOver.cancel();var o=(0,U.includes)(["focus","mouseenter"],n.type);o!==r.state.isOver&&(t?r.delayedSetIsOver(o):r.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(r){t.emitToChild(e?"onMouseDown":"onMouseUp",r),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.position,n=e.text,o=e.shortcut;if(1!==L.Children.count(t))return t;var i=L.Children.only(t),a=this.state.isOver;return(0,L.cloneElement)(i,{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,L.concatChildren)(i.props.children,a&&(0,L.createElement)(rs,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,(0,L.createElement)(ns,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(L.Component),is=os,as=function(e){var t=e.icon,r=e.className,n=Li(e,["icon","className"]),o=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return(0,L.createElement)("span",Mi({className:o},n))};function ss(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ss(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ss(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var us=function(e){var t=e.icon,r=void 0===t?null:t,n=e.size,o=Li(e,["icon","size"]);if("string"==typeof r)return(0,L.createElement)(as,Mi({icon:r},o));if(r&&as===r.type)return(0,L.cloneElement)(r,cs({},o));var i=n||24;if("function"==typeof r)return r.prototype instanceof L.Component?(0,L.createElement)(r,cs({size:i},o)):r(cs({size:i},o));if(r&&("svg"===r.type||r.type===Gi.SVG)){var a=cs(cs({width:i,height:i},r.props),o);return(0,L.createElement)(Gi.SVG,a)}return(0,L.isValidElement)(r)?(0,L.cloneElement)(r,cs({size:i},o)):r};function ls(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ds=["onMouseDown","onClick"],ps=(0,L.forwardRef)((function(e,t){var r=e.href,n=e.target,o=e.isPrimary,i=e.isSmall,a=e.isTertiary,s=e.isPressed,c=e.isBusy,u=e.isDefault,l=e.isSecondary,d=e.isLink,p=e.isDestructive,f=e.className,m=e.disabled,h=e.icon,y=e.iconSize,g=e.showTooltip,v=e.tooltipPosition,b=e.shortcut,_=e.label,w=e.children,E=e.__experimentalIsFocusable,S=Li(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);u&&Yi()("Button isDefault prop",{alternative:"isSecondary"});var O=Hi()("components-button",f,{"is-secondary":u||l,"is-primary":o,"is-small":i,"is-tertiary":a,"is-pressed":s,"is-busy":c,"is-link":d,"is-destructive":p,"has-text":!!h&&!!w,"has-icon":!!h}),T=m&&!E,k=void 0===r||T?"button":"a",R="a"===k?{href:r,target:n}:{type:"button",disabled:T,"aria-pressed":s};if(m&&E){R["aria-disabled"]=!0;var C,A=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ls(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ls(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(ds);try{for(A.s();!(C=A.n()).done;)S[C.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){A.e(e)}finally{A.f()}}var x=!T&&(g&&_||b||!!_&&(!w||(0,U.isArray)(w)&&!w.length)&&!1!==g),D=(0,L.createElement)(k,Mi({},R,S,{className:O,"aria-label":S["aria-label"]||_,ref:t}),h&&(0,L.createElement)(us,{icon:h,size:y}),w);return x?(0,L.createElement)(is,{text:_,shortcut:b,position:v},D):D}));function fs(e){return null!=e}function ms(e){var t=""===e;return!fs(e)||t}function hs(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(fs))&&void 0!==e?e:r}function ys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vs={initial:void 0,fallback:""},bs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vs,r=gs(gs({},vs),t),n=r.initial,o=r.fallback,i=(0,L.useState)(e),a=Bi(i,2),s=a[0],c=a[1],u=fs(e);(0,L.useEffect)((function(){u&&s&&c(void 0)}),[u,s]);var l=hs([e,s,n],o),d=function(e){u||c(e)};return[l,d]},_s=function(e,t){var r=(0,L.useRef)(!1);(0,L.useEffect)((function(){if(r.current)return e();r.current=!0}),t)},ws=(0,L.forwardRef)((function(e,t){var r=e.isOpened,n=e.icon,o=e.title,i=Li(e,["isOpened","icon","title"]);return o?(0,L.createElement)("h2",{className:"components-panel__body-title"},(0,L.createElement)(ps,Mi({className:"components-panel__body-toggle","aria-expanded":r,ref:t},i),(0,L.createElement)("span",{"aria-hidden":"true"},(0,L.createElement)(us,{className:"components-panel__arrow",icon:r?Vi:Wi})),o,n&&(0,L.createElement)(us,{icon:n,className:"components-panel__icon",size:20}))):null})),Es=(0,L.forwardRef)((function(e,t){var r=e.children,n=e.className,o=e.icon,i=e.initialOpen,a=e.onToggle,s=void 0===a?U.noop:a,c=e.opened,u=e.title,l=e.scrollAfterOpen,d=void 0===l||l,p=Bi(bs(c,{initial:void 0===i||i}),2),f=p[0],m=p[1],h=(0,L.useRef)(),y=(0,qi.useReducedMotion)()?"auto":"smooth",g=(0,L.useRef)();g.current=d,_s((function(){var e;f&&g.current&&(null===(e=h.current)||void 0===e?void 0:e.scrollIntoView)&&h.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:y})}),[f,y]);var v,b=Hi()("components-panel__body",n,{"is-opened":f});return(0,L.createElement)("div",{className:b,ref:(v=[h,t],function(e){v.forEach((function(t){"function"==typeof t?t(e):null!=t&&(t.current=e)}))})},(0,L.createElement)(ws,{icon:o,isOpened:f,onClick:function(e){e.preventDefault();var t=!f;m(t),s(t)},title:u}),"function"==typeof r?r({opened:f}):f&&r)}));Es.displayName="PanelBody";var Ss=Es;function Os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ts=function(e){var t=e.icon,r=e.size,n=void 0===r?24:r,o=Li(e,["icon","size"]);return(0,L.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Os(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))},ks=(0,L.createElement)(Gi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,L.createElement)(Gi.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function Rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Cs=function(e){var t=e.as,r=void 0===t?"div":t,n=e.className,o=Li(e,["as","className"]);return function(e){var t=e.as,r=void 0===t?"div":t,n=Li(e,["as"]);return"function"==typeof n.children?n.children(n):(0,L.createElement)(r,n)}(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rs(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({as:r,className:Hi()("components-visually-hidden",n)},o))},As=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}},xs=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ds=As((function(e){return xs.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ps=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,r=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(r,t),this.tags.push(r)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){}}else n.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Is=function(e){function t(e,n,c,u,p){for(var f,m,h,y,_,E=0,S=0,O=0,T=0,k=0,P=0,N=h=f=0,M=0,L=0,j=0,z=0,B=c.length,U=B-1,H="",q="",G="",V="";M<B;){if(m=c.charCodeAt(M),M===U&&0!==S+T+O+E&&(0!==S&&(m=47===S?10:47),T=O=E=0,B++,U++),0===S+T+O+E){if(M===U&&(0<L&&(H=H.replace(d,"")),0<H.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(M)}m=59}switch(m){case 123:for(f=(H=H.trim()).charCodeAt(0),h=1,z=++M;M<B;){switch(m=c.charCodeAt(M)){case 123:h++;break;case 125:h--;break;case 47:switch(m=c.charCodeAt(M+1)){case 42:case 47:e:{for(N=M+1;N<U;++N)switch(c.charCodeAt(N)){case 47:if(42===m&&42===c.charCodeAt(N-1)&&M+2!==N){M=N+1;break e}break;case 10:if(47===m){M=N+1;break e}}M=N}}break;case 91:m++;case 40:m++;case 34:case 39:for(;M++<U&&c.charCodeAt(M)!==m;);}if(0===h)break;M++}if(h=c.substring(z,M),0===f&&(f=(H=H.replace(l,"").trim()).charCodeAt(0)),64===f){switch(0<L&&(H=H.replace(d,"")),m=H.charCodeAt(1)){case 100:case 109:case 115:case 45:L=n;break;default:L=D}if(z=(h=t(n,L,h,m,p+1)).length,0<I&&(_=s(3,h,L=r(D,H,j),n,C,R,z,m,p,u),H=L.join(""),void 0!==_&&0===(z=(h=_.trim()).length)&&(m=0,h="")),0<z)switch(m){case 115:H=H.replace(w,a);case 100:case 109:case 45:h=H+"{"+h+"}";break;case 107:h=(H=H.replace(g,"$1 $2"))+"{"+h+"}",h=1===x||2===x&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=H+h,112===u&&(q+=h,h="")}else h=""}else h=t(n,r(n,H,j),h,u,p+1);G+=h,h=j=L=N=f=0,H="",m=c.charCodeAt(++M);break;case 125:case 59:if(1<(z=(H=(0<L?H.replace(d,""):H).trim()).length))switch(0===N&&(f=H.charCodeAt(0),45===f||96<f&&123>f)&&(z=(H=H.replace(" ",":")).length),0<I&&void 0!==(_=s(1,H,n,e,C,R,q.length,u,p,u))&&0===(z=(H=_.trim()).length)&&(H="\0\0"),f=H.charCodeAt(0),m=H.charCodeAt(1),f){case 0:break;case 64:if(105===m||99===m){V+=H+c.charAt(M);break}default:58!==H.charCodeAt(z-1)&&(q+=o(H,f,m,H.charCodeAt(2)))}j=L=N=f=0,H="",m=c.charCodeAt(++M)}}switch(m){case 13:case 10:47===S?S=0:0===1+f&&107!==u&&0<H.length&&(L=1,H+="\0"),0<I*F&&s(0,H,n,e,C,R,q.length,u,p,u),R=1,C++;break;case 59:case 125:if(0===S+T+O+E){R++;break}default:switch(R++,y=c.charAt(M),m){case 9:case 32:if(0===T+E+S)switch(k){case 44:case 58:case 9:case 32:y="";break;default:32!==m&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===T+S+E&&(L=j=1,y="\f"+y);break;case 108:if(0===T+S+E+A&&0<N)switch(M-N){case 2:112===k&&58===c.charCodeAt(M-3)&&(A=k);case 8:111===P&&(A=P)}break;case 58:0===T+S+E&&(N=M);break;case 44:0===S+O+T+E&&(L=1,y+="\r");break;case 34:case 39:0===S&&(T=T===m?0:0===T?m:T);break;case 91:0===T+S+O&&E++;break;case 93:0===T+S+O&&E--;break;case 41:0===T+S+E&&O--;break;case 40:0===T+S+E&&(0===f&&(2*k+3*P==533||(f=1)),O++);break;case 64:0===S+O+T+E+N+h&&(h=1);break;case 42:case 47:if(!(0<T+E+O))switch(S){case 0:switch(2*m+3*c.charCodeAt(M+1)){case 235:S=47;break;case 220:z=M,S=42}break;case 42:47===m&&42===k&&z+2!==M&&(33===c.charCodeAt(z+2)&&(q+=c.substring(z,M+1)),y="",S=0)}}0===S&&(H+=y)}P=k,k=m,M++}if(0<(z=q.length)){if(L=n,0<I&&void 0!==(_=s(2,q,L,e,C,R,z,u,p,u))&&0===(q=_).length)return V+q+G;if(q=L.join(",")+"{"+q+"}",0!=x*A){switch(2!==x||i(q,2)||(A=0),A){case 111:q=q.replace(b,":-moz-$1")+q;break;case 112:q=q.replace(v,"::-webkit-input-$1")+q.replace(v,"::-moz-$1")+q.replace(v,":-ms-input-$1")+q}A=0}}return V+q+G}function r(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var u=0;u<a;++u)t[c++]=n(e[u]+" ",o[s],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(y,"$1"+e.trim());case 58:return e.trim()+t.replace(y,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(y,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",s=2*t+3*r+4*n;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===x||2===x&&i(c,1)?"-webkit-"+c+c:c}if(0===x||2===x&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(k,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(_,"tb");break;case 232:c=a.replace(_,"tb-rl");break;case 220:c=a.replace(_,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),N(2!==t?n:n.replace(O,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(E," or ($1)").substring(4):"("+t+")"}function s(e,t,r,n,o,i,a,s,c,l){for(var d,p=0,f=t;p<I;++p)switch(d=P[p].call(u,e,f,r,n,o,i,a,s,c,l)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function c(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?x=1:(x=2,N=e):x=0),c}function u(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<I){var o=s(-1,r,n,n,C,R,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(D,n,r,0,0);return 0<I&&void 0!==(o=s(-2,i,n,n,C,R,i.length,0,0,0))&&(i=o),A=0,R=C=1,i}var l=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,m=/([,: ])(transform)/g,h=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,S=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,R=1,C=1,A=0,x=1,D=[],P=[],I=0,N=null,F=0;return u.use=function e(t){switch(t){case void 0:case null:I=P.length=0;break;default:if("function"==typeof t)P[I++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else F=0|!!t}return e},u.set=c,void 0!==e&&c(e),u},Ns="/*|*/";function Fs(e){e&&Ms.current.insert(e+"}")}var Ms={current:null},Ls=function(e,t,r,n,o,i,a,s,c,u){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return Ms.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+Ns;break;case 3:switch(s){case 102:case 112:return Ms.current.insert(r[0]+t),"";default:return t+(0===u?Ns:"")}case-2:t.split("/*|*/}").forEach(Fs)}},js=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},zs={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Bs=/[A-Z]|^ms/g,Us=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hs=function(e){return 45===e.charCodeAt(1)},qs=function(e){return null!=e&&"boolean"!=typeof e},Gs=As((function(e){return Hs(e)?e:e.replace(Bs,"-$&").toLowerCase()})),Vs=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Us,(function(e,t,r){return Ks={name:t,styles:r,next:Ks},t}))}return 1===zs[e]||Hs(e)||"number"!=typeof t||0===t?t:t+"px"};function Ws(e,t,r,n){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Ks={name:r.name,styles:r.styles,next:Ks},r.name;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)Ks={name:o.name,styles:o.styles,next:Ks},o=o.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ws(e,t,r[o],!1);else for(var i in r){var a=r[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=i+"{"+t[a]+"}":qs(a)&&(n+=Gs(i)+":"+Vs(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Ws(e,t,a,!1);switch(i){case"animation":case"animationName":n+=Gs(i)+":"+s+";";break;default:n+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)qs(a[c])&&(n+=Gs(i)+":"+Vs(i,a[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=Ks,a=r(e);return Ks=i,Ws(e,t,a,n)}}if(null==t)return r;var s=t[r];return void 0===s||n?r:s}var Ks,Ys=/label:\s*([^\s;\n{]+)\s*;/g,$s=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";Ks=void 0;var i=e[0];null==i||void 0===i.raw?(n=!1,o+=Ws(r,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=Ws(r,t,e[a],46===o.charCodeAt(o.length-1)),n&&(o+=i[a]);Ys.lastIndex=0;for(var s,c="";null!==(s=Ys.exec(o));)c+="-"+s[1];return{name:js(o)+c,styles:o,next:Ks}},Qs=(Object.prototype.hasOwnProperty,(0,Ni.createContext)("undefined"!=typeof HTMLElement?function(e){void 0===e&&(e={});var t,r=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var n,o=new Is(t),i={};n=e.container||document.head;var a,s=document.querySelectorAll("style[data-emotion-"+r+"]");Array.prototype.forEach.call(s,(function(e){e.getAttribute("data-emotion-"+r).split(" ").forEach((function(e){i[e]=!0})),e.parentNode!==n&&n.appendChild(e)})),o.use(e.stylisPlugins)(Ls),a=function(e,t,r,n){var i=t.name;Ms.current=r,o(e,t.styles),n&&(c.inserted[i]=!0)};var c={key:r,sheet:new Ps({key:r,container:n,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:i,registered:{},insert:a};return c}():null)),Xs=(0,Ni.createContext)({}),Zs=(Qs.Provider,function(e){var t=function(t,r){return(0,Ni.createElement)(Qs.Consumer,null,(function(n){return e(t,n,r)}))};return(0,Ni.forwardRef)(t)});function Js(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]):n+=r+" "})),n}var ec=function(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+n,o,e.sheet,!0),o=o.next}while(void 0!==o)}},tc=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return $s(t)},rc=(Ni.Component,function e(t){for(var r=t.length,n=0,o="";n<r;n++){var i=t[n];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o});function nc(e,t,r){var n=[],o=Js(e,n,r);return n.length<2?r:o+t(n)}Zs((function(e,t){return(0,Ni.createElement)(Xs.Consumer,null,(function(r){var n=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=$s(r,t.registered);return ec(t,o,!1),t.key+"-"+o.name},o={css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return nc(t.registered,n,rc(r))},theme:r};return e.children(o)}))}));var oc=Ds,ic=function(e){return"theme"!==e&&"innerRef"!==e},ac=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?oc:ic};function sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sc(r,!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sc(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var uc=function e(t,r){var n,o,i;void 0!==r&&(n=r.label,i=r.target,o=t.__emotion_forwardProp&&r.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&r.shouldForwardProp(e)}:r.shouldForwardProp);var a=t.__emotion_real===t,s=a&&t.__emotion_base||t;"function"!=typeof o&&a&&(o=t.__emotion_forwardProp);var c=o||ac(s),u=!c("as");return function(){var l=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)d.push.apply(d,l);else{d.push(l[0][0]);for(var p=l.length,f=1;f<p;f++)d.push(l[f],l[0][f])}var m=Zs((function(e,t,r){return(0,Ni.createElement)(Xs.Consumer,null,(function(n){var a=u&&e.as||s,l="",p=[],f=e;if(null==e.theme){for(var m in f={},e)f[m]=e[m];f.theme=n}"string"==typeof e.className?l=Js(t.registered,p,e.className):null!=e.className&&(l=e.className+" ");var h=$s(d.concat(p),t.registered,f);ec(t,h,"string"==typeof a),l+=t.key+"-"+h.name,void 0!==i&&(l+=" "+i);var y=u&&void 0===o?ac(a):c,g={};for(var v in e)u&&"as"===v||y(v)&&(g[v]=e[v]);return g.className=l,g.ref=r||e.innerRef,(0,Ni.createElement)(a,g)}))}));return m.displayName=void 0!==n?n:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=s,m.__emotion_styles=d,m.__emotion_forwardProp=o,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,n){return e(t,void 0!==n?cc({},r||{},{},n):r).apply(void 0,d)},m}},lc={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function dc(e){return(0,U.get)(lc,e,"")}function pc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return isNaN(e)?"".concat(8,"px"):"".concat(8*e,"px")}var fc=r(7621),mc=r.n(fc);function hc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hc(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gc={black:"#000",white:"#fff"},vc={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",200:"#ddd",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},bc={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:Cc(vc.gray[900],.62)},_c={900:Cc("#000510",.9),800:Cc("#00000a",.85),700:Cc("#06060b",.8),600:Cc("#000913",.75),500:Cc("#0a1829",.7),400:Cc("#0a1829",.65),300:Cc("#0e1c2e",.62),200:Cc("#162435",.55),100:Cc("#223443",.5),backgroundFill:Cc(bc[700],.7)},wc={900:Cc("#304455",.45),800:Cc("#425863",.4),700:Cc("#667886",.35),600:Cc("#7b86a2",.3),500:Cc("#9197a2",.25),400:Cc("#95959c",.2),300:Cc("#829493",.15),200:Cc("#8b8b96",.1),100:Cc("#747474",.05)},Ec={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:Cc(gc.white,.65)},Sc={900:Cc(gc.white,.5),800:Cc(gc.white,.45),700:Cc(gc.white,.4),600:Cc(gc.white,.35),500:Cc(gc.white,.3),400:Cc(gc.white,.25),300:Cc(gc.white,.2),200:Cc(gc.white,.15),100:Cc(gc.white,.1),backgroundFill:Cc(Ec[300],.8)},Oc={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},Tc={theme:"var( --wp-admin-theme-color, ".concat(Oc.wordpress[700],")"),themeDark10:"var( --wp-admin-theme-color-darker-10, ".concat(Oc.medium.focus,")")},kc={theme:Tc.theme,background:gc.white,backgroundDisabled:Ec[200],border:vc.gray[700],borderFocus:Tc.themeDark10,borderDisabled:vc.gray[400],borderLight:vc.gray[200],label:bc[500],textDisabled:bc[150],textDark:gc.white,textLight:gc.black},Rc=yc(yc({},gc),{},{darkGray:(0,U.merge)({},bc,vc.darkGray),darkOpacity:_c,darkOpacityLight:wc,mediumGray:vc.mediumGray,lightGray:(0,U.merge)({},Ec,vc.lightGray),lightGrayLight:Sc,blue:(0,U.merge)({},Oc,vc.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:Tc,ui:kc});function Cc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=mc()(e).toRgb(),n=r.r,o=r.g,i=r.b;return"rgba(".concat(n,", ").concat(o,", ").concat(i,", ").concat(t,")")}function Ac(e){return(0,U.get)(Rc,e,"#000")}var xc=uc("div",{target:"e1puf3u0",label:"Wrapper"})("font-family:",dc("default.fontFamily"),";font-size:",dc("default.fontSize"),";"),Dc=uc("div",{target:"e1puf3u1",label:"StyledField"})("margin-bottom:",pc(1),";.components-panel__row &{margin-bottom:inherit;}"),Pc=uc("label",{target:"e1puf3u2",label:"StyledLabel"})("display:inline-block;margin-bottom:",pc(1),";"),Ic=uc("p",{target:"e1puf3u3",label:"StyledHelp"})("margin-top:-",pc(1),";font-size:",dc("helpText.fontSize"),";font-style:normal;color:",Ac("mediumGray.text"),";");function Nc(e){var t=e.id,r=e.label,n=e.hideLabelFromVision,o=e.help,i=e.className,a=e.children;return(0,L.createElement)(xc,{className:Hi()("components-base-control",i)},(0,L.createElement)(Dc,{className:"components-base-control__field"},r&&t&&(n?(0,L.createElement)(Cs,{as:"label",htmlFor:t},r):(0,L.createElement)(Pc,{className:"components-base-control__label",htmlFor:t},r)),r&&!t&&(n?(0,L.createElement)(Cs,{as:"label"},r):(0,L.createElement)(Nc.VisualLabel,null,r)),a),!!o&&(0,L.createElement)(Ic,{id:t+"__help",className:"components-base-control__help"},o))}Nc.VisualLabel=function(e){var t=e.className,r=e.children;return t=Hi()("components-base-control__label",t),(0,L.createElement)("span",{className:t},r)};var Fc=Nc;function Mc(e){var t=e.label,r=e.className,n=e.heading,o=e.checked,i=e.help,a=e.onChange,s=Li(e,["label","className","heading","checked","help","onChange"]),c=(0,qi.useInstanceId)(Mc),u="inspector-checkbox-control-".concat(c);return(0,L.createElement)(Fc,{label:n,id:u,help:i,className:r},(0,L.createElement)("span",{className:"components-checkbox-control__input-container"},(0,L.createElement)("input",Mi({id:u,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:function(e){return a(e.target.checked)},checked:o,"aria-describedby":i?u+"__help":void 0},s)),o?(0,L.createElement)(Ts,{icon:ks,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,L.createElement)("label",{className:"components-checkbox-control__label",htmlFor:u},t))}function Lc(e,t,r){return"number"!=typeof e?null:parseFloat((0,U.clamp)(e,t,r))}var jc={name:"8kj89b",styles:"flex-direction:row-reverse;"},zc=uc("div",{target:"eboqfv50",label:"Flex"})("box-sizing:border-box;display:flex;width:100%;",(function(e){var t=e.align;return tc({alignItems:{top:"flex-start",bottom:"flex-end"}[t]||t},"")})," ",(function(e){var t=e.justify,r=e.isReversed,n={left:"flex-start",right:"flex-end"},o=n[t]||t;return r&&n[t]&&(o="left"===t?n.right:n.left),tc({justifyContent:o},"")})," ",(function(e){var t=e.gap,r=e.isReversed,n="number"==typeof t?4*t:4,o="margin-".concat(r?"left":"right");return tc("> *{",o,":",n,"px;&:last-child{",o,":0;}}")})," ",(function(e){return e.isReversed?jc:""}),""),Bc=uc("div",{target:"eboqfv51",label:"Item"})({name:"13luw5d",styles:"box-sizing:border-box;min-width:0;max-width:100%;"}),Uc=(0,L.forwardRef)((function(e,t){var r=e.align,n=void 0===r?"center":r,o=e.className,i=e.gap,a=void 0===i?2:i,s=e.justify,c=void 0===s?"space-between":s,u=e.isReversed,l=void 0!==u&&u,d=Li(e,["align","className","gap","justify","isReversed"]),p=Hi()("components-flex",o);return(0,L.createElement)(zc,Mi({},d,{align:n,className:p,ref:t,gap:a,justify:c,isReversed:l}))})),Hc=Uc,qc=(0,L.forwardRef)((function(e,t){var r=e.className,n=Li(e,["className"]),o=Hi()("components-flex__item",r);return(0,L.createElement)(Bc,Mi({},n,{className:o,ref:t}))}));function Gc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Vc=tc;function Wc(){var e=Gc(["\n\t","\n\t","\n"]);return Wc=function(){return e},e}function Kc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Kc=function(){return e},e}function Yc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Yc=function(){return e},e}function $c(){var e=Gc(["\n\t\t\t\t","\n\t\t\t"]);return $c=function(){return e},e}function Qc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Qc=function(){return e},e}function Xc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Xc=function(){return e},e}function Zc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Zc=function(){return e},e}function Jc(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return Jc=function(){return e},e}function eu(){var e=Gc(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"]);return eu=function(){return e},e}var tu="font-weight: 400;",ru="font-weight: 600;",nu="\n  ".concat(tu,"\n"),ou="\n\tfont-size: 32px;\n\tline-height: 40px;\n",iu="\n\tfont-size: 24px;\n\tline-height: 32px;\n",au="\n\tfont-size: 20px;\n\tline-height: 28px;\n",su="\n\t".concat(ru,"\n\tfont-size: 14px;\n\tline-height: 20px;\n"),cu="\n\tfont-size: 16px;\n\tline-height: 24px;\n",uu="\n\tfont-size: 14px;\n\tline-height: 20px;\n",lu="\n\t".concat(tu,"\n"),du="\n\tfont-size: 16px;\n\tline-height: 24px;\n",pu="\n\tfont-size: 14px;\n\tline-height: 20px;\n",fu="\n  ".concat(ru,"\n  font-size: 14px;\n  line-height: 20px;\n"),mu="\n\t".concat(tu,"\n\tfont-size: 12px;\n\tline-height: 16px;\n"),hu="\n\t".concat(ru,"\n\tfont-size: 12px;\n\tline-height: 16px;\n"),yu="\n\t".concat("font-weight: 500;","\n\tfont-size: 11px;\n\tline-height: 1.4;\n\ttext-transform: uppercase;\n\tcolor: ").concat(vc.gray[700],"\n"),gu=uc("p",{target:"e15wbhsk0",label:"Text"})("\n\tbox-sizing: border-box;\n\tmargin: 0;\n",(function(e){return Vc(Wc(),'font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,\nOxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;',function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"body"){case"title.large":return Vc(eu(),nu,ou);case"title.medium":return Vc(Jc(),nu,iu);case"title.small":return Vc(Zc(),nu,au);case"subtitle":return Vc(Xc(),su,cu);case"subtitle.small":return Vc(Qc(),su,uu);case"body":return Vc($c(),lu);case"body.large":return Vc(Yc(),lu,du);case"body.small":return Vc(Kc(),lu,pu);case"button":return fu;case"caption":return mu;case"label":return hu;case"sectionheading":return yu}}(e.variant))}),""),vu=gu,bu=new RegExp(/-left/g),_u=new RegExp(/-right/g),wu=new RegExp(/Left/g),Eu=new RegExp(/Right/g);function Su(){return!(!document||"rtl"!==document.documentElement.dir)}function Ou(){return Su()}function Tu(e){return"left"===e?"right":"right"===e?"left":bu.test(e)?e.replace(bu,"-right"):_u.test(e)?e.replace(_u,"-left"):wu.test(e)?e.replace(wu,"Right"):Eu.test(e)?e.replace(Eu,"Left"):e}var ku=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,U.mapKeys)(e,(function(e,t){return Tu(t)}))};function Ru(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return function(){var r=Su();return tc(t?r?t:e:r?ku(e):e,"")}}var Cu={name:"1dacand",styles:"padding-top:0;"},Au=function(){return Cu},xu={name:"r6z5ec",styles:"z-index:1;"},Du=function(e){return e.isFocused?xu:""},Pu={name:"uz6002",styles:"align-items:flex-start;flex-direction:column;"},Iu={name:"53hdd7",styles:"align-items:flex-start;flex-direction:column-reverse;"},Nu={name:"x4dmss",styles:"justify-content:space-between;"},Fu=function(e){switch(e.labelPosition){case"top":return Pu;case"bottom":return Iu;case"edge":return Nu;default:return""}},Mu=uc(Hc,{target:"e1cr7zh10",label:"Root"})("position:relative;border-radius:2px;",Au," ",Du," ",Fu,""),Lu={name:"8atqhb",styles:"width:100%;"},ju=uc("div",{target:"e1cr7zh11",label:"Container"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(function(e){var t=Ac(e.disabled?"ui.backgroundDisabled":"ui.background");return tc({backgroundColor:t},"")})," ",(function(e){var t=e.__unstableInputWidth,r=e.labelPosition;return t?"side"===r?"":tc("edge"===r?{flex:"0 0 ".concat(t)}:{width:t},""):Lu}),""),zu={name:"103r1kr",styles:"&::-webkit-input-placeholder{line-height:normal;}"},Bu=uc("input",{target:"e1cr7zh12",label:"Input"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none !important;color:",Ac("black"),";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",(function(e){var t=e.isDragging,r=e.dragCursor,n="",o="";return t&&(n=tc("cursor:",r,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none !important;margin:0 !important;}")),t&&r&&(o=tc("&:active{cursor:",r,";}")),tc(n," ",o,"")})," ",(function(e){return e.disabled?tc({color:Ac("ui.textDisabled")},""):""})," ",(function(e){var t={default:"13px",small:"11px"}[e.size];return t?tc("font-size:","16px",";@media ( min-width:600px ){font-size:",t,";}"):""})," ",(function(e){var t=e.size,r={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}};return tc(r[t]||r.default,"")})," ",(function(){return zu}),"}"),Uu={name:"8uhtka",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"},Hu=function(){return Uu},qu=function(e){var t=e.labelPosition,r=4;return"edge"!==t&&"side"!==t||(r=0),tc({paddingTop:0,paddingBottom:r},"")},Gu=uc(vu,{target:"e1cr7zh13",label:"BaseLabel"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",qu," ",Hu,"}"),Vu=function(e){return(0,L.createElement)(Gu,Mi({},e,{as:"label"}))},Wu=uc(qc,{target:"e1cr7zh14",label:"LabelWrapper"})({name:"120o8im",styles:"max-width:calc( 100% - 10px );"}),Ku=uc("div",{target:"e1cr7zh15",label:"BackdropUI"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(function(e){var t=e.disabled,r=e.isFocused,n=Ac(r?"ui.borderFocus":"ui.border"),o=null;return r&&(o="0 0 0 1px ".concat(Ac("ui.borderFocus")," inset")),t&&(n=Ac("ui.borderDisabled")),tc({boxShadow:o,borderColor:n,borderStyle:"solid",borderWidth:1},"")})," ",Ru({paddingLeft:2}),"}"),Yu=uc("span",{target:"e1cr7zh16",label:"Prefix"})({name:"1pxuk39",styles:"box-sizing:border-box;display:block;"}),$u=uc("span",{target:"e1cr7zh17",label:"Suffix"})({name:"1pxuk39",styles:"box-sizing:border-box;display:block;"}),Qu=(0,L.memo)((function(e){var t=e.disabled,r=void 0!==t&&t,n=e.isFocused,o=void 0!==n&&n;return(0,L.createElement)(Ku,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:r,isFocused:o})})),Xu=Qu;function Zu(e){var t=e.children,r=e.hideLabelFromVision,n=e.htmlFor,o=Li(e,["children","hideLabelFromVision","htmlFor"]);return t?r?(0,L.createElement)(Cs,{as:"label",htmlFor:n},t):(0,L.createElement)(Vu,Mi({htmlFor:n},o),t):null}var Ju=(0,L.forwardRef)((function e(t,r){var n=t.__unstableInputWidth,o=t.children,i=t.className,a=t.disabled,s=void 0!==a&&a,c=t.hideLabelFromVision,u=void 0!==c&&c,l=t.labelPosition,d=t.id,p=t.isFocused,f=void 0!==p&&p,m=t.label,h=t.prefix,y=t.size,g=void 0===y?"default":y,v=t.suffix,b=Li(t,["__unstableInputWidth","children","className","disabled","hideLabelFromVision","labelPosition","id","isFocused","label","prefix","size","suffix"]),_=function(t){var r=(0,qi.useInstanceId)(e),n="input-base-control-".concat(r);return t||n}(d);return(0,L.createElement)(Mu,Mi({},b,{className:i,isFocused:f,labelPosition:l,ref:r}),(0,L.createElement)(Wu,null,(0,L.createElement)(Zu,{className:"components-input-control__label",hideLabelFromVision:u,labelPosition:l,htmlFor:_,size:g},m)),(0,L.createElement)(ju,{__unstableInputWidth:n,className:"components-input-control__container",disabled:s,isFocused:f,labelPosition:l},h&&(0,L.createElement)(Yu,{className:"components-input-control__prefix"},h),o,v&&(0,L.createElement)($u,{className:"components-input-control__suffix"},v),(0,L.createElement)(Xu,{"aria-hidden":"true",disabled:s,isFocused:f,label:m,size:g})))}));function el(e,t){return e.map((function(e,r){return e+t[r]}))}function tl(e,t){return e.map((function(e,r){return e-t[r]}))}function rl(e,t,r){return r=r||Math.hypot.apply(Math,e),t?r/t:0}function nl(e,t){return t?e.map((function(e){return e/t})):Array(e.length).fill(0)}function ol(e){return Math.hypot.apply(Math,e)}function il(e,t){return t=t||Math.hypot.apply(Math,e)||1,e.map((function(e){return e/t}))}function al(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function sl(e,t){return Math.abs(e)>=t&&al(e)*t}function cl(e,t,r){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,r):e*t*r/(t+r*e)}function ul(e,t,r,n){return void 0===n&&(n=.15),0===n?function(e,t,r){return Math.max(t,Math.min(e,r))}(e,t,r):e<t?-cl(t-e,r-t,n)+t:e>r?cl(e-r,r-t,n)+r:e}function ll(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dl(){return dl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dl.apply(this,arguments)}function pl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function fl(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hl(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return ml(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ml(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function yl(){}var gl=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.forEach((function(e){return e.apply(void 0,r)}))}},vl=function(e){return Array.isArray(e)?e:[e,e]},bl=function(e,t){return void 0!==e?e:t};function _l(e,t){var r={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1];return(void 0!==o||n in t)&&(r[n]=o)})),r}function wl(e){return"function"==typeof e?e():e}function El(){var e={_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_lastEventType:void 0,event:void 0,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:yl,canceled:!1,memo:void 0,args:void 0},t={axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0};return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:dl(dl(dl({},e),t),{},{_isTap:!0,_delayedEvent:!1,tap:!1,swipe:[0,0]}),pinch:dl(dl({},e),{da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:dl(dl({},e),t),move:dl(dl({},e),t),scroll:dl(dl({},e),t)}}var Sl=function(e){return function(t,r,n){var o=e?"addEventListener":"removeEventListener";r.forEach((function(e){var r=e[0],i=e[1];return t[o](r,i,n)}))}},Ol=Sl(!0),Tl=Sl(!1);function kl(e){if("touches"in e){var t=e.touches,r=e.changedTouches;return t.length>0?t:r}return null}function Rl(e){var t="buttons"in e?e.buttons:0,r=kl(e),n=r&&r.length||0;return dl({touches:n,down:n>0||t>0,buttons:t},function(e){return{shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}(e))}function Cl(e){var t=kl(e),r=t?t[0]:e;return{values:[r.clientX,r.clientY]}}var Al=function(){var e=this;this.state=El(),this.timeouts={},this.domListeners=[],this.windowListeners={},this.bindings={},this.clean=function(){e.resetBindings(),Object.values(e.timeouts).forEach(clearTimeout),Object.keys(e.windowListeners).forEach((function(t){return e.removeWindowListeners(t)}))},this.resetBindings=function(){e.bindings={};var t=e.getDomTarget();t&&(Tl(t,e.domListeners,e.config.eventOptions),e.domListeners=[])},this.getDomTarget=function(){var t=e.config.domTarget;return t&&"current"in t?t.current:t},this.addWindowListeners=function(t,r){e.config.window&&(e.windowListeners[t]=r,Ol(e.config.window,r,e.config.eventOptions))},this.removeWindowListeners=function(t){if(e.config.window){var r=e.windowListeners[t];r&&(Tl(e.config.window,r,e.config.eventOptions),delete e.windowListeners[t])}},this.addDomTargetListeners=function(t){Object.entries(e.bindings).forEach((function(t){var r=t[0],n=t[1];e.domListeners.push([r.substr(2).toLowerCase(),gl.apply(void 0,n)])})),Ol(t,e.domListeners,e.config.eventOptions)},this.addBindings=function(t,r){(Array.isArray(t)?t:[t]).forEach((function(t){e.bindings[t]?e.bindings[t].push(r):e.bindings[t]=[r]}))},this.getBindings=function(){var t={},r=e.config.captureString;return Object.entries(e.bindings).forEach((function(e){var n=e[0],o=e[1],i=Array.isArray(o)?o:[o];t[n+r]=gl.apply(void 0,i)})),t},this.getBind=function(){if(e.config.domTarget){var t=e.getDomTarget();return t&&e.addDomTargetListeners(t),e.clean}return e.getBindings()}};var xl=function(){function e(e,t,r){var n=this;void 0===r&&(r=[]),this.stateKey=e,this.controller=t,this.args=r,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140);for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.addWindowListeners=function(e){n.controller.addWindowListeners(n.stateKey,e)},this.removeWindowListeners=function(){n.controller.removeWindowListeners(n.stateKey)},this.getStartGestureState=function(e,t){return dl(dl({},El()[n.stateKey]),{},{_active:!0,values:e,initial:e,offset:n.state.offset,lastOffset:n.state.offset,startTime:t.timeStamp})},this.rubberband=function(e,t){var r=n.config.bounds;return e.map((function(e,n){return ul(e,r[n][0],r[n][1],t[n])}))},this.fireGestureHandler=function(e){if(n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;var t=n.state._intentional,r=t[0],o=t[1];if(!e&&!1===r&&!1===o)return null;var i=n.state,a=i._active,s=i.active;n.state.active=a,n.state.first=a&&!s,n.state.last=s&&!a,n.controller.state.shared[n.ingKey]=a;var c=dl(dl(dl({},n.controller.state.shared),n.state),n.mapStateValues(n.state)),u=n.handler(c);return n.state.memo=void 0!==u?u:n.state.memo,a||n.clean(),c}}var t,r,n=e.prototype;return n.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},n.updateGestureState=function(e){Object.assign(this.state,e)},n.getGenericPayload=function(e,t){var r=e.timeStamp,n=e.type,o=this.state,i=o.values,a=o.startTime;return{_lastEventType:n,event:e,timeStamp:r,elapsedTime:t?0:r-a,args:this.args,previous:i}},n.checkIntentionality=function(e,t,r){return{_intentional:e,_blocked:!1}},n.getMovement=function(e,t){void 0===t&&(t=this.state);var r=this.config,n=r.initial,o=r.threshold,i=r.rubberband,a=o[0],s=o[1],c=t,u=c._initial,l=c._active,d=c._intentional,p=c.lastOffset,f=c.movement,m=d[0],h=d[1],y=this.getInternalMovement(e,t),g=y[0],v=y[1];!1===m&&(m=sl(g,a)),!1===h&&(h=sl(v,s));var b=this.checkIntentionality([m,h],[g,v],t),_=b._intentional,w=b._blocked,E=_[0],S=_[1],O=[g,v];if(!1!==E&&!1===d[0]&&(u[0]=wl(n)[0]),!1!==S&&!1===d[1]&&(u[1]=wl(n)[1]),w)return dl(dl({},b),{},{_movement:O,delta:[0,0]});var T=[!1!==E?g-E:wl(n)[0],!1!==S?v-S:wl(n)[1]],k=el(T,p),R=l?i:[0,0];return T=this.rubberband(el(T,u),R),dl(dl({},b),{},{_initial:u,_movement:O,movement:T,offset:this.rubberband(k,R),delta:tl(T,f)})},n.clean=function(){this.clearTimeout(),this.removeWindowListeners()},t=e,(r=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}])&&ll(t.prototype,r),e}(),Dl=function(e){function t(){return e.apply(this,arguments)||this}pl(t,e);var r=t.prototype;return r.getInternalMovement=function(e,t){return tl(e,t.initial)},r.checkIntentionality=function(e,t,r){var n=e,o=n[0],i=n[1],a=!1!==o||!1!==i,s=r.axis,c=!1;if(a){var u=t.map(Math.abs),l=u[0],d=u[1],p=this.config,f=p.axis,m=p.lockDirection;s=s||(l>d?"x":l<d?"y":void 0),(f||m)&&(s?f&&s!==f?c=!0:e["x"===s?1:0]=!1:e=[!1,!1])}return{_intentional:e,_blocked:c,axis:s}},r.getKinematics=function(e,t){var r=this.state.timeStamp,n=this.getMovement(e,this.state),o=n._blocked,i=n.delta,a=n.movement;if(o)return n;var s=function(e,t,r){var n=Math.hypot.apply(Math,t);return{velocities:nl(t,r),velocity:rl(t,r,n),distance:ol(e),direction:il(t,n)}}(a,i,t.timeStamp-r);return dl(dl({values:e,delta:i},n),s)},r.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(xl),Pl=function(e){function t(t,r){var n;return(n=e.call(this,"drag",t,r)||this).ingKey="dragging",n.wasTouch=!1,n.isEventTypeTouch=function(e){return!!e&&0===e.indexOf("touch")},n.dragShouldStart=function(e){var t=Rl(e).touches,r=n.state._lastEventType;return!(!n.controller.config.pointer&&n.isEventTypeTouch(r)&&!n.isEventTypeTouch(e.type)&&Math.abs(e.timeStamp-n.state.startTime)<200)&&(n.enabled&&t<2)},n.setPointers=function(e){var t=e.currentTarget,r=e.pointerId;t&&t.setPointerCapture(r),n.updateGestureState({currentTarget:t,pointerId:r})},n.removePointers=function(){var e=n.state,t=e.currentTarget,r=e.pointerId;t&&r&&t.releasePointerCapture(r)},n.setListeners=function(e){n.removeWindowListeners();var t=e?[["touchmove",n.onDragChange],["touchend",n.onDragEnd],["touchcancel",n.onDragEnd]]:[["mousemove",n.onDragChange],["mouseup",n.onDragEnd]];n.addWindowListeners(t)},n.onDragStart=function(e){n.dragShouldStart(e)&&(n.controller.config.pointer?n.setPointers(e):n.setListeners(n.isEventTypeTouch(e.type)),n.config.delay>0?(n.state._delayedEvent=!0,"function"==typeof e.persist&&e.persist(),n.setTimeout((function(){return n.startDrag(e)}),n.config.delay)):n.startDrag(e))},n.onDragChange=function(e){if(!n.state.canceled)if(n.state._active){var t=Rl(e);if(t.down){n.updateSharedState(t);var r=Cl(e).values,o=n.getKinematics(r,e),i=n.state._isTap;i&&ol(o._movement)>=3&&(i=!1),n.updateGestureState(dl(dl(dl({},n.getGenericPayload(e)),o),{},{_isTap:i,cancel:function(){return n.onCancel()}})),n.fireGestureHandler()}else n.onDragEnd(e)}else n.state._delayedEvent&&(n.clearTimeout(),n.startDrag(e))},n.onDragEnd=function(e){n.state._active=!1,n.updateSharedState({down:!1,buttons:0,touches:0});var t=n.state,r=t._isTap,o=t.values,i=t.velocities,a=i[0],s=i[1],c=t.movement,u=c[0],l=c[1],d=t._intentional,p=d[0],f=d[1],m=dl(dl({},n.getGenericPayload(e)),n.getMovement(o)),h=m.elapsedTime,y=n.config,g=y.swipeVelocity,v=g[0],b=g[1],_=y.swipeDistance,w=_[0],E=_[1],S=[0,0];h<220&&(!1!==p&&Math.abs(a)>v&&Math.abs(u)>w&&(S[0]=al(a)),!1!==f&&Math.abs(s)>b&&Math.abs(l)>E&&(S[1]=al(s))),n.updateGestureState(dl(dl({event:e},m),{},{tap:r,swipe:S})),n.fireGestureHandler(n.config.filterTaps&&n.state._isTap)},n.clean=function(){e.prototype.clean.call(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n.state._delayedEvent=!1,n.controller.config.pointer&&n.removePointers()},n.onCancel=function(){n.updateGestureState({canceled:!0,cancel:yl}),n.state._active=!1,n.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return n.fireGestureHandler()}))},n}pl(t,e);var r=t.prototype;return r.startDrag=function(e){var t=this,r=Cl(e).values;this.updateSharedState(Rl(e));var n=dl(dl({},this.getStartGestureState(r,e)),this.getGenericPayload(e,!0));this.updateGestureState(dl(dl(dl({},n),this.getMovement(r,n)),{},{cancel:function(){return t.onCancel()}})),this.fireGestureHandler()},r.addBindings=function(){this.controller.config.pointer?(this.controller.addBindings("onPointerDown",this.onDragStart),this.controller.addBindings("onPointerMove",this.onDragChange),this.controller.addBindings(["onPointerUp","onPointerCancel"],this.onDragEnd)):this.controller.addBindings(["onTouchStart","onMouseDown"],this.onDragStart)},t}(Dl),Il="undefined"!=typeof window?window:void 0,Nl={lockDirection:!1,axis:void 0,bounds:void 0};function Fl(e){void 0===e&&(e={});var t=e,r=t.axis,n=t.lockDirection,o=t.bounds,i=void 0===o?{}:o,a=fl(t,["axis","lockDirection","bounds"]),s=[[bl(i.left,-1/0),bl(i.right,1/0)],[bl(i.top,-1/0),bl(i.bottom,1/0)]];return dl(dl(dl(dl({},function(e){var t=e.threshold,r=void 0===t?void 0:t,n=e.rubberband,o=void 0===n?0:n,i=e.enabled,a=void 0===i||i,s=e.initial;return"boolean"==typeof o&&(o=o?.15:0),void 0===r&&(r=0),{enabled:a,initial:void 0===s?[0,0]:s,threshold:vl(r),rubberband:vl(o)}}(a)),Nl),_l({axis:r,lockDirection:n},e)),{},{bounds:s})}function Ml(e){void 0===e&&(e={});var t=e,r=t.enabled,n=t.threshold,o=t.bounds,i=t.rubberband,a=t.initial,s=fl(t,["enabled","threshold","bounds","rubberband","initial"]),c=s.swipeVelocity,u=void 0===c?.5:c,l=s.swipeDistance,d=void 0===l?60:l,p=s.delay,f=void 0!==p&&p,m=s.filterTaps,h=void 0!==m&&m,y=s.axis,g=s.lockDirection;void 0===n?n=Math.max(0,h?3:0,g||y?1:0):h=!0;var v=Fl(_l({enabled:r,threshold:n,bounds:o,rubberband:i,axis:y,lockDirection:g,initial:a},e));return dl(dl({},v),{},{filterTaps:h||v.threshold[0]+v.threshold[1]>0,swipeVelocity:vl(u),swipeDistance:vl(d),delay:"number"==typeof f?f:f?180:0})}function Ll(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ll(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ll(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var zl=function(e){return e},Bl={_event:{},error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},Ul={CHANGE:"CHANGE",COMMIT:"COMMIT",DRAG_END:"DRAG_END",DRAG_START:"DRAG_START",DRAG:"DRAG",INVALIDATE:"INVALIDATE",PRESS_DOWN:"PRESS_DOWN",PRESS_ENTER:"PRESS_ENTER",PRESS_UP:"PRESS_UP",RESET:"RESET",UPDATE:"UPDATE"},Hl=Ul;function ql(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bl,t=e.value;return jl(jl(jl({},Bl),e),{},{initialValue:t})}var Gl=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.reduceRight((function(e,t){var n=t.apply(void 0,r);return(0,U.isEmpty)(n)?e:jl(jl({},e),n)}),{})}};function Vl(e){return function(t,r){var n=jl({},t),o=r.type,i=r.payload;switch(o){case Ul.PRESS_UP:case Ul.PRESS_DOWN:n.isDirty=!1;break;case Ul.DRAG_START:n.isDragging=!0;break;case Ul.DRAG_END:n.isDragging=!1;break;case Ul.CHANGE:n.error=null,n.value=i.value,t.isPressEnterToChange&&(n.isDirty=!0);break;case Ul.COMMIT:case Ul.UPDATE:n.value=i.value,n.isDirty=!1;break;case Ul.RESET:n.error=null,n.isDirty=!1,n.value=i.value||t.initialValue;break;case Ul.INVALIDATE:n.error=i.error}return i.event&&(n._event=i.event),e(n,r)}}var Wl=(0,L.forwardRef)((function(e,t){var r=e.disabled,n=void 0!==r&&r,o=e.dragDirection,i=void 0===o?"n":o,a=e.dragThreshold,s=void 0===a?10:a,c=e.id,u=e.isDragEnabled,l=void 0!==u&&u,d=e.isFocused,p=e.isPressEnterToChange,f=void 0!==p&&p,m=e.onBlur,h=void 0===m?U.noop:m,y=e.onChange,g=void 0===y?U.noop:y,v=e.onDrag,b=void 0===v?U.noop:v,_=e.onDragEnd,w=void 0===_?U.noop:_,E=e.onDragStart,S=void 0===E?U.noop:E,O=e.onFocus,T=void 0===O?U.noop:O,k=e.onKeyDown,R=void 0===k?U.noop:k,C=e.onValidate,A=void 0===C?U.noop:C,x=e.size,D=void 0===x?"default":x,P=e.setIsFocused,I=e.stateReducer,N=void 0===I?function(e){return e}:I,F=e.value,M=e.type,j=Li(e,["disabled","dragDirection","dragThreshold","id","isDragEnabled","isFocused","isPressEnterToChange","onBlur","onChange","onDrag","onDragEnd","onDragStart","onFocus","onKeyDown","onValidate","size","setIsFocused","stateReducer","value","type"]),z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zl,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bl,r=Bi((0,L.useReducer)(Vl(e),ql(t)),2),n=r[0],o=r[1],i=function(e){return function(t,r){r&&r.persist&&r.persist(),o({type:e,payload:{value:t,event:r}})}},a=function(e){return function(t){t&&t.persist&&t.persist(),o({type:e,payload:{event:t}})}},s=function(e){return function(t){o({type:e,payload:t})}},c=i(Ul.CHANGE),u=i(Ul.INVALIDATE),l=i(Ul.RESET),d=i(Ul.COMMIT),p=i(Ul.UPDATE),f=s(Ul.DRAG_START),m=s(Ul.DRAG),h=s(Ul.DRAG_END),y=a(Ul.PRESS_UP),g=a(Ul.PRESS_DOWN),v=a(Ul.PRESS_ENTER);return{change:c,commit:d,dispatch:o,drag:m,dragEnd:h,dragStart:f,invalidate:u,pressDown:g,pressEnter:v,pressUp:y,reset:l,state:n,update:p}}(N,{isDragEnabled:l,value:F,isPressEnterToChange:f}),B=z.state,H=z.change,q=z.commit,G=z.drag,V=z.dragEnd,W=z.dragStart,K=z.invalidate,Y=z.pressDown,$=z.pressEnter,Q=z.pressUp,X=z.reset,Z=z.update,J=B._event,ee=B.value,te=B.isDragging,re=B.isDirty,ne=(0,L.useRef)(!1),oe=function(e,t){var r=function(e){var t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,L.useEffect)((function(){e?(document.documentElement.style.cursor=r,document.documentElement.style.pointerEvents="none"):(document.documentElement.style.cursor=null,document.documentElement.style.pointerEvents=null)}),[e]),r}(te,i);_s((function(){F!==ee&&(d||ne.current?re||(g(ee,{event:J}),ne.current=!1):Z(F))}),[ee,re,d,F]);var ie=function(e){var t=e.target.value;try{A(t,e),q(t,e)}catch(t){K(t,e)}},ae=function(e,t){void 0===t&&(t={});var r=t,n=r.domTarget,o=r.eventOptions,i=r.window,a=fl(r,["domTarget","eventOptions","window"]),s=dl(dl({},function(e){void 0===e&&(e={});var t=e,r=t.eventOptions,n=(r=void 0===r?{}:r).passive,o=void 0===n||n,i=r.capture,a=void 0!==i&&i,s=r.pointer,c=void 0!==s&&s,u=t.window,l=void 0===u?Il:u,d=t.domTarget,p=void 0===d?void 0:d,f=t.enabled,m=void 0===f||f;return dl(dl({},fl(t,["eventOptions","window","domTarget","enabled"])),{},{enabled:m,domTarget:p,window:l,eventOptions:{passive:!p||!!o,capture:!!a},captureString:a?"Capture":"",pointer:!!c})}({domTarget:n,eventOptions:o,window:i})),{},{drag:Ml(a)});return function(e,t,r,n){var o=Fi().useMemo((function(){var e=new Al;return{nativeRefs:n,current:e,bind:function(){e.resetBindings();for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var a,s=hl(t);!(a=s()).done;){new(0,a.value)(e,n).addBindings()}if(o.nativeRefs)for(var c in o.nativeRefs)e.addBindings(c,o.nativeRefs[c]);return e.getBind()}}}),[]);return o.current.config=r,o.current.handlers=e,o.nativeRefs=n,Fi().useEffect((function(){return o.current.clean}),[]),o.bind}({drag:e},[Pl],s)}((function(e){var t=e.distance,r=e.dragging,n=e.event;if(t){if(n.stopPropagation(),!r)return w(e),void V(e);b(e),G(e),te||(S(e),W(e))}}),{threshold:s,enabled:l}),se=l?ae():{},ce=se.onMouseDown,ue=se.onTouchStart,le=ce;return"number"===M&&(le=function(e){e.target!==e.target.ownerDocument.activeElement&&e.target.focus(),l&&ce(e)}),(0,L.createElement)(Bu,Mi({},j,{className:"components-input-control__input",disabled:n,dragCursor:oe,isDragging:te,id:c,onBlur:function(e){h(e),P(!1),f&&re&&(ne.current=!0,ms(ee)?X(F):ie(e))},onChange:function(e){var t=e.target.value;H(t,e)},onFocus:function(e){T(e),P(!0)},onKeyDown:function(e){var t=e.keyCode;switch(R(e),t){case ia.UP:Q(e);break;case ia.DOWN:Y(e);break;case ia.ENTER:$(e),f&&(e.preventDefault(),ie(e))}},onMouseDown:le,onTouchStart:ue,ref:t,size:D,value:ee,type:M}))})),Kl=Wl;var Yl=(0,L.forwardRef)((function e(t,r){var n=t.__unstableStateReducer,o=void 0===n?function(e){return e}:n,i=t.__unstableInputWidth,a=t.className,s=t.disabled,c=void 0!==s&&s,u=t.hideLabelFromVision,l=void 0!==u&&u,d=t.id,p=t.isPressEnterToChange,f=void 0!==p&&p,m=t.label,h=t.labelPosition,y=void 0===h?"top":h,g=t.onChange,v=void 0===g?U.noop:g,b=t.onValidate,_=void 0===b?U.noop:b,w=t.onKeyDown,E=void 0===w?U.noop:w,S=t.prefix,O=t.size,T=void 0===O?"default":O,k=t.suffix,R=t.value,C=Li(t,["__unstableStateReducer","__unstableInputWidth","className","disabled","hideLabelFromVision","id","isPressEnterToChange","label","labelPosition","onChange","onValidate","onKeyDown","prefix","size","suffix","value"]),A=Bi((0,L.useState)(!1),2),x=A[0],D=A[1],P=function(t){var r=(0,qi.useInstanceId)(e),n="inspector-input-control-".concat(r);return t||n}(d),I=Hi()("components-input-control",a);return(0,L.createElement)(Ju,{__unstableInputWidth:i,className:I,disabled:c,gap:3,hideLabelFromVision:l,id:P,isFocused:x,justify:"left",label:m,labelPosition:y,prefix:S,size:T,suffix:k},(0,L.createElement)(Kl,Mi({},C,{className:"components-input-control__input",disabled:c,id:P,isFocused:x,isPressEnterToChange:f,onChange:v,onKeyDown:E,onValidate:_,ref:r,setIsFocused:D,size:T,stateReducer:o,value:R})))})),$l={name:"1b9wwt5",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none !important;margin:0 !important;}"},Ql=function(e){return e.hideHTMLArrows?$l:""},Xl=uc(Yl,{target:"ep48uk90",label:"Input"})(Ql,";");function Zl(e){var t=Number(e);return isNaN(t)?0:t}function Jl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){return e+Zl(t)}),0)}function ed(e){var t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function td(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Zl(e),i=Zl(n),a=ed(n),s=Math.round(o/i)*i,c=(0,U.clamp)(s,t,r);return a?Zl(c.toFixed(a)):c}var rd=function(e){var t=e.isShiftStepEnabled,r=void 0===t||t,n=e.shiftStep,o=void 0===n?10:n,i=e.step,a=void 0===i?1:i,s=Bi((0,L.useState)(!1),2),c=s[0],u=s[1];return(0,L.useEffect)((function(){var e=function(e){u(e.shiftKey)};return window.addEventListener("keydown",e),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}}),[]),r&&c?o*a:a},nd=(0,L.forwardRef)((function(e,t){var r=e.__unstableStateReducer,n=void 0===r?function(e){return e}:r,o=e.className,i=e.dragDirection,a=void 0===i?"n":i,s=e.hideHTMLArrows,c=void 0!==s&&s,u=e.isDragEnabled,l=void 0===u||u,d=e.isShiftStepEnabled,p=void 0===d||d,f=e.label,m=e.max,h=void 0===m?1/0:m,y=e.min,g=void 0===y?-1/0:y,v=e.shiftStep,b=void 0===v?10:v,_=e.step,w=void 0===_?1:_,E=e.type,S=void 0===E?"number":E,O=e.value,T=Li(e,["__unstableStateReducer","className","dragDirection","hideHTMLArrows","isDragEnabled","isShiftStepEnabled","label","max","min","shiftStep","step","type","value"]),k=Ou(),R=td(0,g,h,w),C=rd({step:w,shiftStep:b,isShiftStepEnabled:p}),A="number"===S?"off":null,x=Hi()("components-number-control",o);return(0,L.createElement)(Xl,Mi({autoComplete:A,inputMode:"numeric"},T,{className:x,dragDirection:a,hideHTMLArrows:c,isDragEnabled:l,label:f,max:h,min:g,ref:t,step:C,type:S,value:O,__unstableStateReducer:Gl((function(e,t){var r=t.type,n=t.payload,o=null==n?void 0:n.event,i=e.value;if(r===Hl.PRESS_UP||r===Hl.PRESS_DOWN){var s=o.shiftKey&&p?parseFloat(b)*parseFloat(w):parseFloat(w),c=ms(i)?R:i;(null==o?void 0:o.preventDefault)&&o.preventDefault(),r===Hl.PRESS_UP&&(c=Jl(c,s)),r===Hl.PRESS_DOWN&&(c=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){var n=Zl(t);return 0===r?n:e-n}))}(c,s)),c=td(c,g,h,s),e.value=c}if(r===Hl.DRAG&&l){var u,d,f=n.delta,m=n.shiftKey,y=Bi(f,2),v=y[0],_=y[1],E=m?parseFloat(b)*parseFloat(w):parseFloat(w);switch(a){case"n":d=_,u=-1;break;case"e":d=v,u=k?-1:1;break;case"s":d=_,u=1;break;case"w":d=v,u=k?1:-1}var S,O=d*E*u;0!==O&&(S=td(Jl(i,O),g,h,E),e.value=S)}return r!==Hl.PRESS_ENTER&&r!==Hl.COMMIT||(e.value=td(i,g,h)),e}),n)}))})),od={name:"tdik1c",styles:"height:30px;min-height:30px;"},id=function(){return od},ad=uc("span",{target:"exqw8y20",label:"Root"})({name:"1916452",styles:"-webkit-tap-highlight-color:transparent;box-sizing:border-box;cursor:pointer;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;"}),sd=uc("span",{target:"exqw8y21",label:"Wrapper"})("box-sizing:border-box;color:",Ac("blue.medium.focus"),";display:block;flex:1;padding-top:15px;position:relative;width:100%;",(function(e){var t=e.color,r=void 0===t?Ac("ui.borderFocus"):t;return tc({color:r},"")}),";",id,";",(function(e){var t=e.marks;return tc({marginBottom:t?16:null},"")}),";",Ru({marginLeft:10}),""),cd=uc("span",{target:"exqw8y22",label:"BeforeIconWrapper"})("margin-top:3px;",Ru({marginRight:6}),""),ud=uc("span",{target:"exqw8y23",label:"AfterIconWrapper"})("margin-top:3px;",Ru({marginLeft:16}),""),ld=uc("span",{target:"exqw8y24",label:"Rail"})("background-color:",Ac("lightGray.600"),";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:3px;position:absolute;margin-top:14px;top:0;",(function(e){var t=e.disabled,r=e.railColor||null;return t&&(r=Ac("lightGray.400")),tc({background:r},"")}),";"),dd=uc("span",{target:"exqw8y25",label:"Track"})("background-color:currentColor;border-radius:1px;box-sizing:border-box;height:3px;pointer-events:none;display:block;position:absolute;margin-top:14px;top:0;",(function(e){var t=e.disabled,r=e.trackColor||"currentColor";return t&&(r=Ac("lightGray.800")),tc({background:r},"")}),";"),pd=uc("span",{target:"exqw8y26",label:"MarksWrapper"})({name:"sx8y8z",styles:"box-sizing:border-box;display:block;position:relative;width:100%;user-select:none;"}),fd=uc("span",{target:"exqw8y27",label:"Mark"})("box-sizing:border-box;height:9px;left:0;position:absolute;top:-4px;width:1px;",(function(e){var t=e.disabled,r=e.isFilled?"currentColor":Ac("lightGray.600");return t&&(r=Ac("lightGray.800")),tc({backgroundColor:r},"")}),";"),md=uc("span",{target:"exqw8y28",label:"MarkLabel"})("box-sizing:border-box;color:",Ac("lightGray.600"),";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(function(e){var t=e.isFilled;return tc({color:Ac(t?"darkGray.300":"lightGray.600")},"")}),";"),hd=uc("span",{target:"exqw8y29",label:"ThumbWrapper"})("align-items:center;box-sizing:border-box;display:flex;height:20px;justify-content:center;margin-top:5px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:20px;",Ru({marginLeft:-10}),""),yd=uc("span",{target:"exqw8y210",label:"Thumb"})("align-items:center;background-color:white;border-radius:50%;border:1px solid ",Ac("darkGray.200"),";box-sizing:border-box;height:100%;outline:0;pointer-events:none;position:absolute;user-select:none;width:100%;",(function(e){var t=e.isFocused;return tc({borderColor:Ac(t?"ui.borderFocus":"darkGray.200"),boxShadow:t?"\n\t\t\t\t0 0 0 1px ".concat(Ac("ui.borderFocus"),"\n\t\t\t"):"\n\t\t\t\t0 0 0 rgba(0, 0, 0, 0)\n\t\t\t"},"")}),";"),gd=uc("input",{target:"exqw8y211",label:"InputRange"})({name:"cvc9dl",styles:"box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0;opacity:0;outline:none;position:absolute;right:0;top:0;width:100%;"}),vd={name:"5qqmyx",styles:"top:-80%;"},bd={name:"eda4eg",styles:"bottom:-80%;"},_d=uc("span",{target:"exqw8y212",label:"Tooltip"})("background:",Ac("ui.border"),";border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(function(e){var t=e.show;return tc({opacity:t?1:0},"")}),";",(function(e){return"top"===e.position?vd:bd}),";",function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return"\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t".concat(e,";\n\t\t}\n\t")}("transition"),";",Ru({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),""),wd=uc(nd,{target:"exqw8y213",label:"InputNumber"})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:",pc(8),";input[type='number']&{",id,";}",Ru({marginLeft:pc(2)}),""),Ed=uc("span",{target:"exqw8y214",label:"ActionRightWrapper"})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;",id,";}",Ru({marginLeft:8}),""),Sd=(0,L.forwardRef)((function(e,t){var r=e.describedBy,n=e.isShiftStepEnabled,o=void 0===n||n,i=e.label,a=e.onHideTooltip,s=void 0===a?U.noop:a,c=e.onMouseLeave,u=void 0===c?U.noop:c,l=e.step,d=void 0===l?1:l,p=e.onBlur,f=void 0===p?U.noop:p,m=e.onChange,h=void 0===m?U.noop:m,y=e.onFocus,g=void 0===y?U.noop:y,v=e.onMouseMove,b=void 0===v?U.noop:v,_=e.onShowTooltip,w=void 0===_?U.noop:_,E=e.shiftStep,S=void 0===E?10:E,O=e.value,T=Li(e,["describedBy","isShiftStepEnabled","label","onHideTooltip","onMouseLeave","step","onBlur","onChange","onFocus","onMouseMove","onShowTooltip","shiftStep","value"]),k=rd({step:d,shiftStep:S,isShiftStepEnabled:o}),R=function(e){var t=e.onHide,r=void 0===t?U.noop:t,n=e.onMouseLeave,o=void 0===n?U.noop:n,i=e.onMouseMove,a=void 0===i?U.noop:i,s=e.onShow,c=void 0===s?U.noop:s,u=e.timeout,l=void 0===u?300:u,d=Bi((0,L.useState)(!1),2),p=d[0],f=d[1],m=(0,L.useRef)(),h=(0,L.useCallback)((function(e){window.clearTimeout(m.current),m.current=setTimeout(e,l)}),[l]),y=(0,L.useCallback)((function(e){a(e),h((function(){p||(f(!0),c())}))}),[]),g=(0,L.useCallback)((function(e){o(e),h((function(){f(!1),r()}))}),[]);return(0,L.useEffect)((function(){return function(){window.clearTimeout(m.current)}})),{onMouseMove:y,onMouseLeave:g}}({onHide:s,onMouseLeave:u,onMouseMove:b,onShow:w});return(0,L.createElement)(gd,Mi({},T,R,{"aria-describedby":r,"aria-label":i,"aria-hidden":!1,onBlur:f,onChange:h,onFocus:g,ref:t,step:k,tabIndex:0,type:"range",value:O}))})),Od=Sd;function Td(e){var t=e.className,r=e.isFilled,n=void 0!==r&&r,o=e.label,i=e.style,a=void 0===i?{}:i,s=Li(e,["className","isFilled","label","style"]),c=Hi()("components-range-control__mark",n&&"is-filled",t),u=Hi()("components-range-control__mark-label",n&&"is-filled");return(0,L.createElement)(L.Fragment,null,(0,L.createElement)(fd,Mi({},s,{"aria-hidden":"true",className:c,isFilled:n,style:a})),o&&(0,L.createElement)(md,{"aria-hidden":"true",className:u,isFilled:n,style:a},o))}function kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kd(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Cd(e){var t=e.disabled,r=void 0!==t&&t,n=e.marks,o=void 0!==n&&n,i=e.min,a=void 0===i?0:i,s=e.max,c=void 0===s?100:s,u=e.step,l=void 0===u?1:u,d=e.value,p=void 0===d?0:d,f=Li(e,["disabled","marks","min","max","step","value"]);return(0,L.createElement)(L.Fragment,null,(0,L.createElement)(ld,Mi({disabled:r},f)),o&&(0,L.createElement)(Ad,{disabled:r,marks:o,min:a,max:c,step:l,value:p}))}function Ad(e){var t=e.disabled,r=void 0!==t&&t,n=e.marks,o=void 0!==n&&n,i=e.min,a=void 0===i?0:i,s=e.max,c=void 0===s?100:s,u=e.step,l=void 0===u?1:u,d=e.value,p=function(e){var t=e.marks,r=e.min,n=void 0===r?0:r,o=e.max,i=void 0===o?100:o,a=e.step,s=void 0===a?1:a,c=e.value,u=void 0===c?0:c,l="rtl"===document.documentElement.dir;if(!t)return[];var d=Array.isArray(t),p=Math.round((i-n)/s);return(d?t:pa(Array(p+1)).map((function(e,t){return{value:t}}))).map((function(e,t){var r=void 0!==e.value?e.value:u,o="mark-".concat(t),i=r*s+n<=u,a="".concat(r/p*100,"%"),c=sa({},l?"right":"left",a);return Rd(Rd({},e),{},{isFilled:i,key:o,style:c})}))}({marks:o,min:a,max:c,step:l,value:void 0===d?0:d});return(0,L.createElement)(pd,{"aria-hidden":"true",className:"components-range-control__marks"},p.map((function(e){return(0,L.createElement)(Td,Mi({},e,{key:e.key,"aria-hidden":"true",disabled:r}))})))}function xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pd(e){var t=e.className,r=e.inputRef,n=e.position,o=void 0===n?"auto":n,i=e.show,a=void 0!==i&&i,s=e.style,c=void 0===s?{}:s,u=e.value,l=void 0===u?0:u,d=e.renderTooltipContent,p=void 0===d?function(e){return e}:d,f=e.zIndex,m=void 0===f?100:f,h=Li(e,["className","inputRef","position","show","style","value","renderTooltipContent","zIndex"]),y=function(e){var t=e.inputRef,r=e.position,n=Bi((0,L.useState)("top"),2),o=n[0],i=n[1],a=(0,L.useCallback)((function(){if(t&&t.current){var e=r;"auto"===r&&(e=t.current.getBoundingClientRect().top-32<0?"bottom":"top"),i(e)}}),[r]);return(0,L.useEffect)((function(){a()}),[a]),(0,L.useEffect)((function(){return window.addEventListener("resize",a),function(){window.removeEventListener("resize",a)}})),o}({inputRef:r,position:o}),g=Hi()("components-simple-tooltip",t),v=Dd(Dd({},c),{},{zIndex:m});return(0,L.createElement)(_d,Mi({},h,{"aria-hidden":a,className:g,position:y,show:a,role:"tooltip",style:v}),p(l))}var Id=(0,L.forwardRef)((function e(t,r){var n,o=t.afterIcon,i=t.allowReset,a=void 0!==i&&i,s=t.beforeIcon,c=t.className,u=t.currentInput,l=t.color,d=void 0===l?Ac("ui.theme"):l,p=t.disabled,f=void 0!==p&&p,m=t.help,h=t.initialPosition,y=t.isShiftStepEnabled,g=void 0===y||y,v=t.label,b=t.marks,_=void 0!==b&&b,w=t.max,E=void 0===w?100:w,S=t.min,O=void 0===S?0:S,T=t.onBlur,k=void 0===T?U.noop:T,R=t.onChange,C=void 0===R?U.noop:R,A=t.onFocus,x=void 0===A?U.noop:A,D=t.onMouseMove,P=void 0===D?U.noop:D,I=t.onMouseLeave,N=void 0===I?U.noop:I,F=t.railColor,M=t.resetFallbackValue,j=t.renderTooltipContent,z=void 0===j?function(e){return e}:j,B=t.showTooltip,H=t.shiftStep,q=void 0===H?10:H,G=t.step,V=void 0===G?1:G,W=t.trackColor,K=t.value,Y=t.withInputField,$=void 0===Y||Y,Q=Li(t,["afterIcon","allowReset","beforeIcon","className","currentInput","color","disabled","help","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseMove","onMouseLeave","railColor","resetFallbackValue","renderTooltipContent","showTooltip","shiftStep","step","trackColor","value","withInputField"]),X=Ou(),Z=function(e){var t=e.min,r=e.max,n=e.initial,o=Bi(bs(Lc(e.value,t,r),{initial:n,fallback:null}),2),i=o[0],a=o[1];return[i,(0,L.useCallback)((function(e){a(null===e?null:Lc(e,t,r))}),[t,r])]}({min:O,max:E,value:K,initial:h}),J=Bi(Z,2),ee=J[0],te=J[1],re=(0,L.useRef)(!1),ne=Bi((0,L.useState)(B),2),oe=ne[0],ie=ne[1],ae=Bi((0,L.useState)(!1),2),se=ae[0],ce=ae[1],ue=(0,L.useRef)(),le=null===(n=ue.current)||void 0===n?void 0:n.matches(":focus"),de=!f&&se,pe=null===ee,fe=pe?"":void 0!==ee?ee:u,me=pe?Lc(E/2,O,E):ee,ye=pe?50:(ee-O)/(E-O)*100,ge="".concat((0,U.clamp)(ye,0,100),"%"),ve=Hi()("components-range-control",c),be=Hi()("components-range-control__wrapper",!!_&&"is-marked"),_e=(0,qi.useInstanceId)(e,"inspector-range-control"),we=m?"".concat(_e,"__help"):void 0,Ee=!1!==B&&(0,U.isFinite)(ee),Se=function(){var e=parseFloat(M),t=e;isNaN(e)&&(e=null,t=void 0),te(e),C(t)},Oe=sa({},X?"right":"left",ge);return(0,L.createElement)(Fc,{className:ve,label:v,id:_e,help:m},(0,L.createElement)(ad,{className:"components-range-control__root",isRTL:X},s&&(0,L.createElement)(cd,null,(0,L.createElement)(us,{icon:s})),(0,L.createElement)(sd,{className:be,color:d,marks:!!_},(0,L.createElement)(Od,Mi({},Q,{className:"components-range-control__slider",describedBy:we,disabled:f,id:_e,isShiftStepEnabled:g,label:v,max:E,min:O,onBlur:function(e){k(e),ce(!1),ie(!1)},onChange:function(e){var t=parseFloat(e.target.value);te(t),C(t)},onFocus:function(e){x(e),ce(!0),ie(!0)},onMouseMove:P,onMouseLeave:N,ref:function(e){ue.current=e,r&&r(e)},shiftStep:q,step:V,value:fe})),(0,L.createElement)(Cd,{"aria-hidden":!0,disabled:f,marks:_,max:E,min:O,railColor:F,step:V,value:me}),(0,L.createElement)(dd,{"aria-hidden":!0,className:"components-range-control__track",disabled:f,style:{width:ge},trackColor:W}),(0,L.createElement)(hd,{style:Oe},(0,L.createElement)(yd,{"aria-hidden":!0,isFocused:de})),Ee&&(0,L.createElement)(Pd,{className:"components-range-control__tooltip",inputRef:ue,renderTooltipContent:z,show:le||oe,style:Oe,value:ee})),o&&(0,L.createElement)(ud,null,(0,L.createElement)(us,{icon:o})),$&&(0,L.createElement)(wd,{"aria-label":v,className:"components-range-control__number",disabled:f,inputMode:"decimal",isShiftStepEnabled:g,max:E,min:O,onBlur:function(){re.current&&(Se(),re.current=!1)},onChange:function(e){e=parseFloat(e),te(e),isNaN(e)?a&&(re.current=!0):((e<O||e>E)&&(e=Lc(e,O,E)),C(e),re.current=!1)},shiftStep:q,step:V,value:fe}),a&&(0,L.createElement)(Ed,null,(0,L.createElement)(ps,{className:"components-range-control__reset",disabled:f||void 0===ee,isSecondary:!0,isSmall:!0,onClick:Se},(0,he.__)("Reset")))))})),Nd=Id,Fd=window.wp.blocks,Md=window.wp.blockEditor;(0,Fd.registerBlockType)("woocommerce-payments/multi-currency-switcher",{apiVersion:2,title:(0,he.__)("Currency Switcher Block","woocommerce-payments"),description:(0,he.__)("Let your customers switch between your enabled currencies","woocommerce-payments"),icon:(0,L.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",baseProfile:"tiny-ps",viewBox:"0 0 24 24"},(0,L.createElement)("path",{d:"M13.5 8.1h.86c.34 1.81 1.54 2.9 3.2 2.9 1.58 0 2.64-.89 2.94-2.29h-1.11c-.23.72-.86 1.21-1.82 1.21-1 0-1.77-.67-2.06-1.82h2.78v-.65H15.4L15.38 7l.02-.46h2.89v-.65h-2.78c.3-1.13 1.06-1.81 2.05-1.81.94 0 1.63.59 1.84 1.38h1.1A2.86 2.86 0 0017.56 3c-1.65 0-2.85 1.09-3.19 2.89h-.87v.65h.78l-.02.46.02.45h-.78v.65zm-9 8.57v.78h1.8c.07.24.12.49.12.73 0 .87-.79 1.64-1.9 1.84V21h6.98v-1.01H6.57v-.07c.7-.33 1.25-.95 1.25-1.79 0-.23-.04-.45-.1-.68h2.72v-.78H7.43a3.6 3.6 0 01-.35-1.33c0-.83.77-1.33 2.12-1.33.74 0 1.51.13 1.85.29v-1.01A5.9 5.9 0 009.06 13c-2.15 0-3.44.87-3.44 2.28 0 .48.18.94.37 1.39H4.5z",className:"prefix__shp0"}),(0,L.createElement)("path",{fillRule:"evenodd",d:"M7.63 10.22c-1.72-.09-3.08-.75-3.13-1.85h1.41c.13.54.64.93 1.72 1.01V7.37l-.26-.05c-1.73-.27-2.66-.8-2.66-1.73 0-1.04 1.22-1.72 2.92-1.8V3h.8v.79c1.69.09 2.91.78 2.96 1.82H9.98c-.08-.57-.69-.91-1.55-.99v1.93l.31.05c1.79.28 2.76.78 2.76 1.77 0 1.13-1.35 1.77-3.07 1.85V11h-.8v-.78zm0-3.8v-1.8c-.98.08-1.48.47-1.48.89 0 .42.4.73 1.48.91zm.8 1.07v1.9c1.15-.07 1.64-.44 1.64-.93 0-.48-.39-.76-1.64-.97z",className:"prefix__shp0"}),(0,L.createElement)("path",{d:"M17.63 21v-1.61h1.97v-.67h-1.97v-.87h1.97v-.67h-1.63L20.5 13h-1.4l-2.07 3.63h-.05L14.92 13H13.5l2.53 4.18H14.4v.67h1.97v.87H14.4v.67h1.97V21h1.26z",opacity:.8})),category:"widgets",attributes:{symbol:{type:"boolean",default:!0},flag:{type:"boolean",default:!1},fontSize:{type:"integer",default:14},fontLineHeight:{type:"float",default:1.5},fontColor:{type:"string",default:"#000000"},border:{type:"boolean",default:!0},borderRadius:{type:"integer",default:3},borderColor:{type:"string",default:"#000000"},backgroundColor:{type:"string",default:"transparent"}},edit:e=>{const{attributes:{symbol:t,flag:r,fontSize:n,fontLineHeight:o,fontColor:i,border:a,borderRadius:s,borderColor:c,backgroundColor:u},setAttributes:l}=e,{isLoading:d}=(0,j.useSelect)((e=>{const{getCurrencies:t,isResolving:r}=e(B);return{currencies:t(),isLoading:r("getCurrencies",[])}}),[]),{enabledCurrencies:p}=(()=>{const e=(0,j.useSelect)((e=>{const{getEnabledCurrencies:t}=e(B);return t()})),{submitEnabledCurrenciesUpdate:t}=(0,j.useDispatch)(B);return{enabledCurrencies:e,submitEnabledCurrenciesUpdate:t}})(),f=p?Object.keys(p):[],m={div:{lineHeight:o},select:{fontSize:n,color:i,backgroundColor:u,borderWidth:a?"1px":"0px",borderColor:c,borderRadius:s}},h=(0,Md.useBlockProps)();return(0,L.createElement)("div",h,(0,L.createElement)(Md.InspectorControls,{key:"setting"},(0,L.createElement)(Ss,{title:(0,he.__)("Multi-Currency settings","woocommerce-payments")},(0,L.createElement)("a",{href:"/wp-admin/admin.php?page=wc-settings&tab=wcpay_multi_currency",target:"_blank",rel:"noreferrer"},(0,he.__)("Adjust and edit your Multi-Currency settings","woocommerce-payments"))),(0,L.createElement)(Ss,{title:(0,he.__)("Layout","woocommerce-payments")},(0,L.createElement)(Mc,{label:(0,he.__)("Display flags","woocommerce-payments"),checked:r,onChange:e=>{l({flag:e})}}),(0,L.createElement)(Mc,{label:(0,he.__)("Display currency symbols","woocommerce-payments"),checked:t,onChange:e=>{l({symbol:e})}}),(0,L.createElement)(Mc,{label:(0,he.__)("Border","woocommerce-payments"),checked:a,onChange:e=>{l({border:void 0!==e&&e})}}),(0,L.createElement)(Nd,{label:(0,he.__)("Border radius","woocommerce-payments"),value:s,onChange:e=>{l({borderRadius:void 0===e?3:e})},min:1,max:20})),(0,L.createElement)(Ss,{title:(0,he.__)("Typography","woocommerce-payments")},(0,L.createElement)(Nd,{label:(0,he.__)("Size","woocommerce-payments"),value:n,onChange:e=>{l({fontSize:void 0===e?11:e})},min:6,max:48}),(0,L.createElement)(Nd,{label:(0,he.__)("Line height","woocommerce-payments"),value:o,onChange:e=>{l({fontLineHeight:void 0===e?"normal":e})},min:1,max:3,step:.1})),(0,L.createElement)(Ss,{title:(0,he.__)("Color settings","woocommerce-payments")},(0,L.createElement)(Md.ColorPaletteControl,{onChange:e=>{l({fontColor:void 0===e?"#000000":e})},value:i,label:(0,he.__)("Text","woocommerce-payments")}),(0,L.createElement)(Md.ColorPaletteControl,{onChange:e=>{l({backgroundColor:void 0===e?"transparent":e})},value:u,label:(0,he.__)("Background","woocommerce-payments")}),(0,L.createElement)(Md.ColorPaletteControl,{onChange:e=>{l({borderColor:void 0===e?"#000000":e})},value:c,label:(0,he.__)("Border","woocommerce-payments")}))),(0,L.createElement)("div",{className:"currency-switcher-holder",style:m.div},(0,L.createElement)("select",{name:"currency",disabled:d,style:m.select},d&&(0,L.createElement)("option",null,(0,he.__)("Loading…","woocommerce-payments")),!d&&p&&f.map((e=>(0,L.createElement)("option",{key:p[e].id,value:p[e].code},r?p[e].flag+" ":"",t&&p[e].symbol!==p[e].code?p[e].symbol+" ":"",p[e].code))))))},save:()=>null})}()}();