@payloqa/payment-widget 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/NetworkSelector.d.ts.map +1 -1
- package/dist/components/PaymentWidget.d.ts.map +1 -1
- package/dist/components/PhoneInput.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/payment-widget.css +1 -1
- package/dist/payment-widget.esm.js +1 -1
- package/dist/payment-widget.esm.js.map +1 -1
- package/dist/payment-widget.umd.js +1 -1
- package/dist/payment-widget.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import t,{useState as n,useCallback as r,forwardRef as o,useContext as i,useLayoutEffect as a,useRef as s,useMemo as l,createContext as u,Component as c,Fragment as d,useEffect as p}from"react";import{createPortal as f}from"react-dom";var m={exports:{}},h={},v=Symbol.for("react.transitional.element"),g=Symbol.for("react.fragment");function b(e,t,n){var r=null;if(void 0!==n&&(r=""+n),void 0!==t.key&&(r=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:v,type:e,key:r,ref:void 0!==t?t:null,props:n}}h.Fragment=g,h.jsx=b,h.jsxs=b,m.exports=h;var y=m.exports;function x(e){try{return"https:"===new URL(e).protocol}catch{return!1}}function w(e,t,n,r){const o=new URLSearchParams({payment_id:t,status:n});if("completed"===n&&r){const e="number"==typeof r.amount?r.amount.toString():r.amount;o.append("amount",e),o.append("currency",r.currency||"GHS");const t=r.metadata?.reference||r.metadata?.order_reference;t&&o.append("reference",t)}if("failed"===n&&r?.metadata?.error){const e=r.metadata.error;o.append("reason",e.code||"unknown"),o.append("message",e.message||"Payment failed")}return`${e}?${o.toString()}`}class O{constructor(e){this.config=e}async makeRequest(e,t={}){const n=`${this.config.baseUrl||"https://payment.payloqa.com/api/v1/payments"}${e}`,r={"Content-Type":"application/json","X-API-Key":this.config.apiKey,"X-Platform-Id":this.config.platformId,...t.headers},o=await fetch(n,{...t,headers:r}),i=await o.json();if(!o.ok||!1===i.success){const e=i.error?.message||i.message||`HTTP ${o.status}: ${o.statusText}`,t=new Error(e);throw i.error?.code&&(t.code=i.error.code),t}return i}async createPayment(e){if(e.redirect_url&&!x(e.redirect_url))throw new Error("Redirect URL must be a valid HTTPS URL. HTTP URLs are not allowed for security reasons.");return this.makeRequest("/create",{method:"POST",body:JSON.stringify(e)})}async verifyOTP(e,t){return this.makeRequest(`/${e}/verify-otp`,{method:"POST",body:JSON.stringify(t)})}async resendOTP(e,t){return this.makeRequest(`/${e}/resend-otp`,{method:"POST",body:JSON.stringify(t)})}async getPaymentStatus(e){return this.makeRequest(`/${e}`,{method:"GET"})}async cancelPayment(e,t){return this.makeRequest(`/${e}/cancel`,{method:"POST",body:t?JSON.stringify(t):void 0})}async getPlatformInfo(){const e=await this.makeRequest("/platform",{method:"GET"});return{logo_url:e.data?.logo_url}}}const S=({value:e,onChange:t,onValid:n,placeholder:r="Phone number",disabled:o=!1,error:i,primaryColor:a="#3B82F6"})=>y.jsxs("div",{className:"w-full",children:[y.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Phone Number"}),y.jsx("input",{type:"tel",value:e,onChange:e=>{const r=e.target.value.replace(/\D/g,"").slice(0,10);t(r);10===r.length&&n&&n((e=>{const t=e.replace(/[^\d+]/g,"");return t.startsWith("+233")?t:t.startsWith("0")?"+233"+t.substring(1):10!==t.length||t.startsWith("0")?t:"+233"+t})(r))},placeholder:r,disabled:o,maxLength:10,className:`w-full px-4 py-3 border-2 rounded-lg text-base text-gray-900 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent ${i?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o?"bg-gray-50 cursor-not-allowed opacity-60":""}`}),i&&y.jsx("p",{className:"mt-2 text-sm text-red-600 font-medium",children:i})]});function C(e){return C="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},C(e)}function I(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==C(t)?t:t+""}function k(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var F=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(null,arguments)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function H(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(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 U=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(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.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(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.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=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]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),_="-ms-",B="-moz-",z="-webkit-",W="comm",q="rule",G="decl",Y="@keyframes",X=Math.abs,K=String.fromCharCode,J=Object.assign;function Z(e){return e.trim()}function Q(e,t,n){return e.replace(t,n)}function ee(e,t){return e.indexOf(t)}function te(e,t){return 0|e.charCodeAt(t)}function ne(e,t,n){return e.slice(t,n)}function re(e){return e.length}function oe(e){return e.length}function ie(e,t){return t.push(e),e}var ae=1,se=1,le=0,ue=0,ce=0,de="";function pe(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ae,column:se,length:a,return:""}}function fe(e,t){return J(pe("",null,null,"",null,null,0),e,{length:-e.length},t)}function me(){return ce=ue>0?te(de,--ue):0,se--,10===ce&&(se=1,ae--),ce}function he(){return ce=ue<le?te(de,ue++):0,se++,10===ce&&(se=1,ae++),ce}function ve(){return te(de,ue)}function ge(){return ue}function be(e,t){return ne(de,e,t)}function ye(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xe(e){return ae=se=1,le=re(de=e),ue=0,[]}function we(e){return de="",e}function Oe(e){return Z(be(ue-1,Ie(91===e?e+2:40===e?e+1:e)))}function Se(e){for(;(ce=ve())&&ce<33;)he();return ye(e)>2||ye(ce)>3?"":" "}function Ce(e,t){for(;--t&&he()&&!(ce<48||ce>102||ce>57&&ce<65||ce>70&&ce<97););return be(e,ge()+(t<6&&32==ve()&&32==he()))}function Ie(e){for(;he();)switch(ce){case e:return ue;case 34:case 39:34!==e&&39!==e&&Ie(ce);break;case 40:41===e&&Ie(e);break;case 92:he()}return ue}function ke(e,t){for(;he()&&e+ce!==57&&(e+ce!==84||47!==ve()););return"/*"+be(t,ue-1)+"*"+K(47===e?e:he())}function Pe(e){for(;!ye(ve());)he();return be(e,ue)}function Ee(e){return we(Me("",null,null,null,[""],e=xe(e),0,[0],e))}function Me(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,m=0,h=1,v=1,g=1,b=0,y="",x=o,w=i,O=r,S=y;v;)switch(m=b,b=he()){case 40:if(108!=m&&58==te(S,d-1)){-1!=ee(S+=Q(Oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Oe(b);break;case 9:case 10:case 13:case 32:S+=Se(m);break;case 92:S+=Ce(ge()-1,7);continue;case 47:switch(ve()){case 42:case 47:ie(Re(ke(he(),ge()),t,n),l);break;default:S+="/"}break;case 123*h:s[u++]=re(S)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==g&&(S=Q(S,/\f/g,"")),f>0&&re(S)-d&&ie(f>32?Ve(S+";",r,n,d-1):Ve(Q(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(ie(O=je(S,t,n,u,c,o,s,y,x=[],w=[],d),i),123===b)if(0===c)Me(S,t,O,O,x,i,d,s,w);else switch(99===p&&110===te(S,3)?100:p){case 100:case 108:case 109:case 115:Me(e,O,O,r&&ie(je(e,O,O,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:Me(S,O,O,O,[""],w,0,s,w)}}u=c=f=0,h=g=1,y=S="",d=a;break;case 58:d=1+re(S),f=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==me())continue;switch(S+=K(b),b*h){case 38:g=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(re(S)-1)*g,g=1;break;case 64:45===ve()&&(S+=Oe(he())),p=ve(),c=d=re(y=S+=Pe(ge())),b++;break;case 45:45===m&&2==re(S)&&(h=0)}}return i}function je(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=oe(p),m=0,h=0,v=0;m<r;++m)for(var g=0,b=ne(e,d+1,d=X(h=a[m])),y=e;g<f;++g)(y=Z(h>0?p[g]+" "+b:Q(b,/&\f/g,p[g])))&&(l[v++]=y);return pe(e,t,n,0===o?q:s,l,u,c)}function Re(e,t,n){return pe(e,t,n,W,K(ce),ne(e,2,-2),0)}function Ve(e,t,n,r){return pe(e,t,n,G,ne(e,0,r),ne(e,r+1,-1),r)}function Fe(e,t){for(var n="",r=oe(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Te(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case G:return e.return=e.return||e.value;case W:return"";case Y:return e.return=e.value+"{"+Fe(e.children,r)+"}";case q:e.value=e.props.join(",")}return re(n=Fe(e.children,r))?e.return=e.value+"{"+n+"}":""}function Le(e){var t=oe(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Ne(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var De="undefined"!=typeof document,Ae=function(e,t,n){for(var r=0,o=0;r=o,o=ve(),38===r&&12===o&&(t[n]=1),!ye(o);)he();return be(e,ue)},He=function(e,t){return we(function(e,t){var n=-1,r=44;do{switch(ye(r)){case 0:38===r&&12===ve()&&(t[n]=1),e[n]+=Ae(ue-1,t,n);break;case 2:e[n]+=Oe(r);break;case 4:if(44===r){e[++n]=58===ve()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=K(r)}}while(r=he());return e}(xe(e),t))},$e=new WeakMap,Ue=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||$e.get(n))&&!r){$e.set(e,!0);for(var o=[],i=He(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},_e=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Be(e,t){switch(function(e,t){return 45^te(e,0)?(((t<<2^te(e,0))<<2^te(e,1))<<2^te(e,2))<<2^te(e,3):0}(e,t)){case 5103:return z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+B+e+_+e+e;case 6828:case 4268:return z+e+_+e+e;case 6165:return z+e+_+"flex-"+e+e;case 5187:return z+e+Q(e,/(\w+).+(:[^]+)/,z+"box-$1$2"+_+"flex-$1$2")+e;case 5443:return z+e+_+"flex-item-"+Q(e,/flex-|-self/,"")+e;case 4675:return z+e+_+"flex-line-pack"+Q(e,/align-content|flex-|-self/,"")+e;case 5548:return z+e+_+Q(e,"shrink","negative")+e;case 5292:return z+e+_+Q(e,"basis","preferred-size")+e;case 6060:return z+"box-"+Q(e,"-grow","")+z+e+_+Q(e,"grow","positive")+e;case 4554:return z+Q(e,/([^-])(transform)/g,"$1"+z+"$2")+e;case 6187:return Q(Q(Q(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return Q(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return Q(Q(e,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+_+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+e+e;case 4095:case 3583:case 4068:case 2532:return Q(e,/(.+)-inline(.+)/,z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(re(e)-1-t>6)switch(te(e,t+1)){case 109:if(45!==te(e,t+4))break;case 102:return Q(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+B+(108==te(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ee(e,"stretch")?Be(Q(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==te(e,t+1))break;case 6444:switch(te(e,re(e)-3-(~ee(e,"!important")&&10))){case 107:return Q(e,":",":"+z)+e;case 101:return Q(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(45===te(e,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+_+"$2box$3")+e}break;case 5936:switch(te(e,t+11)){case 114:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+_+e+e}return e}var ze,We,qe=De?void 0:(ze=function(){return Ne(function(){return{}})},We=new WeakMap,function(e){if(We.has(e))return We.get(e);var t=ze(e);return We.set(e,t),t}),Ge=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case G:e.return=Be(e.value,e.length);break;case Y:return Fe([fe(e,{value:Q(e.value,"@","@"+z)})],r);case q:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Fe([fe(e,{props:[Q(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Fe([fe(e,{props:[Q(t,/:(plac\w+)/,":"+z+"input-$1")]}),fe(e,{props:[Q(t,/:(plac\w+)/,":-moz-$1")]}),fe(e,{props:[Q(t,/:(plac\w+)/,_+"input-$1")]})],r)}return""})}}],Ye=function(e){var t=e.key;if(De&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Ge,a={},s=[];De&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u=[Ue,_e];if(qe){var c=[Te],d=Le(u.concat(i,c)),p=qe(i)(t),f=function(e,t){var n=t.name;return void 0===p[n]&&(p[n]=Fe(Ee(e?e+"{"+t.styles+"}":t.styles),d)),p[n]};o=function(e,t,n,r){var o=t.name,i=f(e,t);return void 0===g.compat?(r&&(g.inserted[o]=!0),i):r?void(g.inserted[o]=i):i}}else{var m,h=[Te,(l=function(e){m.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],v=Le(u.concat(i,h));o=function(e,t,n,r){m=n,Fe(Ee(e?e+"{"+t.styles+"}":t.styles),v),r&&(g.inserted[t.name]=!0)}}var g={key:t,sheet:new U({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return g.sheet.hydrate(s),g},Xe={exports:{}},Ke={},Je="function"==typeof Symbol&&Symbol.for,Ze=Je?Symbol.for("react.element"):60103,Qe=Je?Symbol.for("react.portal"):60106,et=Je?Symbol.for("react.fragment"):60107,tt=Je?Symbol.for("react.strict_mode"):60108,nt=Je?Symbol.for("react.profiler"):60114,rt=Je?Symbol.for("react.provider"):60109,ot=Je?Symbol.for("react.context"):60110,it=Je?Symbol.for("react.async_mode"):60111,at=Je?Symbol.for("react.concurrent_mode"):60111,st=Je?Symbol.for("react.forward_ref"):60112,lt=Je?Symbol.for("react.suspense"):60113,ut=Je?Symbol.for("react.suspense_list"):60120,ct=Je?Symbol.for("react.memo"):60115,dt=Je?Symbol.for("react.lazy"):60116,pt=Je?Symbol.for("react.block"):60121,ft=Je?Symbol.for("react.fundamental"):60117,mt=Je?Symbol.for("react.responder"):60118,ht=Je?Symbol.for("react.scope"):60119;function vt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ze:switch(e=e.type){case it:case at:case et:case nt:case tt:case lt:return e;default:switch(e=e&&e.$$typeof){case ot:case st:case dt:case ct:case rt:return e;default:return t}}case Qe:return t}}}function gt(e){return vt(e)===at}Ke.AsyncMode=it,Ke.ConcurrentMode=at,Ke.ContextConsumer=ot,Ke.ContextProvider=rt,Ke.Element=Ze,Ke.ForwardRef=st,Ke.Fragment=et,Ke.Lazy=dt,Ke.Memo=ct,Ke.Portal=Qe,Ke.Profiler=nt,Ke.StrictMode=tt,Ke.Suspense=lt,Ke.isAsyncMode=function(e){return gt(e)||vt(e)===it},Ke.isConcurrentMode=gt,Ke.isContextConsumer=function(e){return vt(e)===ot},Ke.isContextProvider=function(e){return vt(e)===rt},Ke.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ze},Ke.isForwardRef=function(e){return vt(e)===st},Ke.isFragment=function(e){return vt(e)===et},Ke.isLazy=function(e){return vt(e)===dt},Ke.isMemo=function(e){return vt(e)===ct},Ke.isPortal=function(e){return vt(e)===Qe},Ke.isProfiler=function(e){return vt(e)===nt},Ke.isStrictMode=function(e){return vt(e)===tt},Ke.isSuspense=function(e){return vt(e)===lt},Ke.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===et||e===at||e===nt||e===tt||e===lt||e===ut||"object"==typeof e&&null!==e&&(e.$$typeof===dt||e.$$typeof===ct||e.$$typeof===rt||e.$$typeof===ot||e.$$typeof===st||e.$$typeof===ft||e.$$typeof===mt||e.$$typeof===ht||e.$$typeof===pt)},Ke.typeOf=vt,Xe.exports=Ke;var bt=Xe.exports,yt={};yt[bt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yt[bt.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var xt="undefined"!=typeof document;var wt=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===xt&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var Ot={animationIterationCount:1,aspectRatio: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,scale: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},St=/[A-Z]|^ms/g,Ct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,It=function(e){return 45===e.charCodeAt(1)},kt=function(e){return null!=e&&"boolean"!=typeof e},Pt=Ne(function(e){return It(e)?e:e.replace(St,"-$&").toLowerCase()}),Et=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ct,function(e,t,n){return jt={name:t,styles:n,next:jt},t})}return 1===Ot[e]||It(e)||"number"!=typeof t||0===t?t:t+"px"};function Mt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return jt={name:o.name,styles:o.styles,next:jt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)jt={name:a.name,styles:a.styles,next:jt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Mt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;kt(s)&&(r+=Pt(i)+":"+Et(i,s)+";")}else if(Array.isArray(a)&&"string"==typeof a[0]&&null==t)for(var l=0;l<a.length;l++)kt(a[l])&&(r+=Pt(i)+":"+Et(i,a[l])+";");else{var u=Mt(e,t,a);switch(i){case"animation":case"animationName":r+=Pt(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=jt,l=n(e);return jt=s,Mt(e,t,l)}}return n}var jt,Rt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Vt(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";jt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Mt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=Mt(n,t,e[a]),r)o+=i[a]}Rt.lastIndex=0;for(var s,l="";null!==(s=Rt.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:jt}}var Ft="undefined"!=typeof document,Tt=function(e){return e()},Lt=!!e.useInsertionEffect&&e.useInsertionEffect,Nt=Ft&&Lt||Tt,Dt="undefined"!=typeof document,At=e.createContext("undefined"!=typeof HTMLElement?Ye({key:"css"}):null);At.Provider;var Ht=function(e){return o(function(t,n){var r=i(At);return e(t,r,n)})};Dt||(Ht=function(t){return function(n){var r=i(At);return null===r?(r=Ye({key:"css"}),e.createElement(At.Provider,{value:r},t(n,r))):t(n,r)}});var $t,Ut,_t=e.createContext({}),Bt={}.hasOwnProperty,zt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Wt=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;wt(n,r,o);var i=Nt(function(){return function(e,t,n){wt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",i=t;do{var a=e.insert(t===i?"."+r:"",i,e.sheet,!0);xt||void 0===a||(o+=a),i=i.next}while(void 0!==i);if(!xt&&0!==o.length)return o}}(n,r,o)});if(!Dt&&void 0!==i){for(var a,s=r.name,l=r.next;void 0!==l;)s+=" "+l.name,l=l.next;return e.createElement("style",((a={})["data-emotion"]=n.key+" "+s,a.dangerouslySetInnerHTML={__html:i},a.nonce=n.sheet.nonce,a))}return null},qt=Ht(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[zt],a=[o],s="";"string"==typeof t.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Vt(a,void 0,e.useContext(_t));s+=n.key+"-"+l.name;var u={};for(var c in t)Bt.call(t,c)&&"css"!==c&&c!==zt&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(Wt,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))}),Gt=qt,Yt=function(t,n){var r=arguments;if(null==n||!Bt.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Gt,i[1]=function(e,t){var n={};for(var r in t)Bt.call(t,r)&&(n[r]=t[r]);return n[zt]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vt(t)}$t=Yt||(Yt={}),Ut||(Ut=$t.JSX||($t.JSX={}));const Kt=Math.min,Jt=Math.max,Zt=Math.round,Qt=Math.floor,en=e=>({x:e,y:e});function tn(){return"undefined"!=typeof window}function nn(e){return an(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function on(e){var t;return null==(t=(an(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function an(e){return!!tn()&&(e instanceof Node||e instanceof rn(e).Node)}function sn(e){return!!tn()&&(e instanceof HTMLElement||e instanceof rn(e).HTMLElement)}function ln(e){return!(!tn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot)}const un=new Set(["inline","contents"]);function cn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!un.has(o)}const dn=new Set(["html","body","#document"]);function pn(e){return rn(e).getComputedStyle(e)}function fn(e){const t=function(e){if("html"===nn(e))return e;const t=e.assignedSlot||e.parentNode||ln(e)&&e.host||on(e);return ln(t)?t.host:t}(e);return function(e){return dn.has(nn(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&cn(t)?t:fn(t)}function mn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=fn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=rn(o);if(i){const e=hn(a);return t.concat(a,a.visualViewport||[],cn(o)?o:[],e&&n?mn(e):[])}return t.concat(o,mn(o,[],n))}function hn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vn(e){return t=e,tn()&&(t instanceof Element||t instanceof rn(t).Element)?e:e.contextElement;var t}function gn(e){const t=vn(e);if(!sn(t))return en(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=pn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Zt(n)!==i||Zt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Zt(n.width):n.width)/r,s=(i?Zt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function bn(e,t,n,r){void 0===t&&(t=!1);const o=e.getBoundingClientRect(),i=vn(e);let a=en(1);t&&(a=gn(e));const s=en(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=r;let t=rn(i),n=hn(t);for(;n&&r&&e!==t;){const e=gn(n),r=n.getBoundingClientRect(),o=pn(n),i=r.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,a=r.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,t=rn(n),n=hn(t)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}function yn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=vn(e),c=o||i?[...u?mn(u):[],...mn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&s?function(e,t){let n,r=null;const o=on(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=u;if(s||t(),!p||!f)return;const m={rootMargin:-Qt(d)+"px "+-Qt(o.clientWidth-(c+p))+"px "+-Qt(o.clientHeight-(d+f))+"px "+-Qt(c)+"px",threshold:Jt(0,Kt(1,l))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||yn(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h=l?bn(e):null;return l&&function t(){const r=bn(e);h&&!yn(h,r)&&n();h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var wn="undefined"!=typeof document?a:function(){},On=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Sn=function(){};function Cn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function In(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Cn(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var kn=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===C(e)&&null!==e?[e]:[];var t},Pn=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,E({},V(e,On))},En=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function Mn(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function jn(e){return Mn(e)?window.pageYOffset:e.scrollTop}function Rn(e,t){Mn(e)?window.scrollTo(0,t):e.scrollTop=t}function Vn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Sn,o=jn(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);Rn(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function Fn(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Rn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Rn(e,Math.max(t.offsetTop-o,0))}function Tn(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Ln=!1,Nn={get passive(){return Ln=!0}},Dn="undefined"!=typeof window?window:{};Dn.addEventListener&&Dn.removeEventListener&&(Dn.addEventListener("p",Sn,Nn),Dn.removeEventListener("p",Sn,!1));var An=Ln;function Hn(e){return null!=e}function $n(e,t,n){return e?t:n}var Un=["children","innerProps"],_n=["children","innerProps"];function Bn(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,v=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:Mn(c=l)?window.innerHeight:c.clientHeight,b=jn(l),y=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=v-x,O=g-h,S=w+b,C=d-b-h,I=f-g+b+y,k=b+h-x,P=160;switch(o){case"auto":case"bottom":if(O>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!a)return i&&Vn(l,I,P),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&O>=r)return i&&Vn(l,I,P),{placement:"bottom",maxHeight:a?O-y:C-y};if("auto"===o||a){var E=t,M=a?w:S;return M>=r&&(E=Math.min(M-y-s,t)),{placement:"top",maxHeight:E}}if("bottom"===o)return i&&Rn(l,I),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return i&&Vn(l,k,P),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var j=t;return(!a&&S>=r||a&&w>=r)&&(j=a?w-x:S-x),i&&Vn(l,k,P),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var zn,Wn=function(e){return"auto"===e?"bottom":e},qn=u(null),Gn=function(e){var t=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,l=e.menuPosition,u=e.menuShouldScrollIntoView,c=e.theme,d=(i(qn)||{}).setPortalPlacement,p=s(null),f=R(n(o),2),m=f[0],h=f[1],v=R(n(null),2),g=v[0],b=v[1],y=c.spacing.controlHeight;return wn(function(){var e=p.current;if(e){var t="fixed"===l,n=Bn({maxHeight:o,menuEl:e,minHeight:r,placement:a,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});h(n.maxHeight),b(n.placement),null==d||d(n.placement)}},[o,a,l,u,r,d,y]),t({ref:p,placerProps:E(E({},e),{},{placement:g||Wn(a),maxHeight:m})})},Yn=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Yt("div",T({},En(e,"menu",{menu:!0}),{ref:n},r),t)},Xn=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return E({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Kn=Xn,Jn=Xn,Zn=["size"],Qn=["innerProps","isRtl","size"],er={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},tr=function(e){var t=e.size,n=V(e,Zn);return Yt("svg",T({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:er},n))},nr=function(e){return Yt(tr,T({size:20},e),Yt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},rr=function(e){return Yt(tr,T({size:20},e),Yt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},or=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return E({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ir=or,ar=or,sr=function(){var e=Xt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(zn||(zn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),lr=function(e){var t=e.delay,n=e.offset;return Yt("span",{css:Xt({animation:"".concat(sr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ur=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Yt("div",T({ref:o},En(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},cr=["data"],dr=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Yt("div",T({},En(e,"group",{group:!0}),s),Yt(i,T({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),l),Yt("div",null,t))},pr=["innerRef","isDisabled","isHidden","inputClassName"],fr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mr={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":E({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},fr)},hr=function(e){return E({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},fr)},vr=function(e){var t=e.children,n=e.innerProps;return Yt("div",n,t)};var gr=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Yt(l,{data:r,innerProps:E(E({},En(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Yt(u,{data:r,innerProps:E({},En(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Yt(c,{data:r,innerProps:E(E({},En(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},br={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Yt("div",T({},En(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Yt(nr,null))},Control:ur,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Yt("div",T({},En(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Yt(rr,null))},DownChevron:rr,CrossIcon:nr,Group:dr,GroupHeading:function(e){var t=Pn(e);t.data;var n=V(t,cr);return Yt("div",T({},En(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Yt("div",T({},En(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Yt("span",T({},t,En(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Pn(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=V(r,pr);return Yt("div",T({},En(e,"input",{"input-container":!0}),{"data-value":n||""}),Yt("input",T({className:t({input:!0},s),ref:o,style:hr(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=V(e,Qn);return Yt("div",T({},En(E(E({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Yt(lr,{delay:0,offset:n}),Yt(lr,{delay:160,offset:!0}),Yt(lr,{delay:320,offset:!n}))},Menu:Yn,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Yt("div",T({},En(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,o=e.children,i=e.controlElement,a=e.innerProps,u=e.menuPlacement,c=e.menuPosition,d=s(null),p=s(null),m=R(n(Wn(u)),2),h=m[0],v=m[1],g=l(function(){return{setPortalPlacement:v}},[]),b=R(n(null),2),y=b[0],x=b[1],w=r(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===c?0:window.pageYOffset,n=e[h]+t;n===(null==y?void 0:y.offset)&&e.left===(null==y?void 0:y.rect.left)&&e.width===(null==y?void 0:y.rect.width)||x({offset:n,rect:e})}},[i,c,h,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);wn(function(){w()},[w]);var O=r(function(){"function"==typeof p.current&&(p.current(),p.current=null),i&&d.current&&(p.current=xn(i,d.current,w,{elementResize:"ResizeObserver"in window}))},[i,w]);wn(function(){O()},[O]);var S=r(function(e){d.current=e,O()},[O]);if(!t&&"fixed"!==c||!y)return null;var C=Yt("div",T({ref:S},En(E(E({},e),{},{offset:y.offset,position:c,rect:y.rect}),"menuPortal",{"menu-portal":!0}),a),o);return Yt(qn.Provider,{value:g},t?f(C,t):C)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=V(e,_n);return Yt("div",T({},En(E(E({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=V(e,Un);return Yt("div",T({},En(E(E({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:gr,MultiValueContainer:vr,MultiValueLabel:vr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Yt("div",T({role:"button"},n),t||Yt(nr,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Yt("div",T({},En(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Yt("div",T({},En(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Yt("div",T({},En(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Yt("div",T({},En(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Yt("div",T({},En(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},yr=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xr(e,t){return e===t||!(!yr(e)||!yr(t))}function wr(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}for(var Or={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Sr=function(e){return Yt("span",T({css:Or},e))},Cr={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Ir=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,p=s.ariaLiveMessages,f=s.getOptionLabel,m=s.inputValue,h=s.isMulti,v=s.isOptionDisabled,g=s.isSearchable,b=s.menuIsOpen,y=s.options,x=s.screenReaderStatus,w=s.tabSelectsValue,O=s.isLoading,S=s["aria-label"],C=s["aria-live"],I=l(function(){return E(E({},Cr),p||{})},[p]),k=l(function(){var e,n="";if(t&&I.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?f(u):"",d=o||s||void 0,p=d?d.map(f):[],m=E({isDisabled:u&&v(u,a),label:c,labels:p},t);n=I.onChange(m)}return n},[t,I,v,a,f]),P=l(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&I.onFocus){var s={focused:t,label:f(t),isDisabled:v(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=I.onFocus(s)}return e},[n,r,f,v,I,o,a,c]),M=l(function(){var e="";if(b&&y.length&&!O&&I.onFilter){var t=x({count:o.length});e=I.onFilter({inputValue:m,resultsMessage:t})}return e},[o,m,b,I,y,x,O]),j="initial-input-focus"===(null==t?void 0:t.action),R=l(function(){var e="";if(I.guidance){var t=r?"value":b?"menu":"input";e=I.guidance({"aria-label":S,context:t,isDisabled:n&&v(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:j})}return e},[S,n,r,h,v,g,b,I,a,w,j]),V=Yt(d,null,Yt("span",{id:"aria-selection"},k),Yt("span",{id:"aria-focused"},P),Yt("span",{id:"aria-results"},M),Yt("span",{id:"aria-guidance"},R));return Yt(d,null,Yt(Sr,{id:u},j&&V),Yt(Sr,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!j&&V))},kr=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Pr=new RegExp("["+kr.map(function(e){return e.letters}).join("")+"]","g"),Er={},Mr=0;Mr<kr.length;Mr++)for(var jr=kr[Mr],Rr=0;Rr<jr.letters.length;Rr++)Er[jr.letters[Rr]]=jr.base;var Vr=function(e){return e.replace(Pr,function(e){return Er[e]})},Fr=function(e,t){void 0===t&&(t=wr);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Vr),Tr=function(e){return e.replace(/^\s+|\s+$/g,"")},Lr=function(e){return"".concat(e.label," ").concat(e.value)},Nr=["innerRef"];function Dr(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=R(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=R(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(V(e,Nr),"onExited","in","enter","exit","appear");return Yt("input",T({ref:t},n,{css:Xt({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ar=["boxSizing","height","overflow","paddingRight","position"],Hr={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $r(e){e.cancelable&&e.preventDefault()}function Ur(e){e.stopPropagation()}function _r(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Br(){return"ontouchstart"in window||navigator.maxTouchPoints}var zr=!("undefined"==typeof window||!window.document||!window.document.createElement),Wr=0,qr={capture:!1,passive:!1};var Gr=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Yr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Xr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,l=s(!1),u=s(!1),c=s(0),d=s(null),f=r(function(e,t){if(null!==d.current){var r=d.current,s=r.scrollTop,c=r.scrollHeight,p=r.clientHeight,f=d.current,m=t>0,h=c-p-s,v=!1;h>t&&l.current&&(o&&o(e),l.current=!1),m&&u.current&&(a&&a(e),u.current=!1),m&&t>h?(n&&!l.current&&n(e),f.scrollTop=c,v=!0,l.current=!0):!m&&-t>s&&(i&&!u.current&&i(e),f.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,i,a]),m=r(function(e){f(e,e.deltaY)},[f]),h=r(function(e){c.current=e.changedTouches[0].clientY},[]),v=r(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),g=r(function(e){if(e){var t=!!An&&{passive:!1};e.addEventListener("wheel",m,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",v,t)}},[v,h,m]),b=r(function(e){e&&(e.removeEventListener("wheel",m,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",v,!1))},[v,h,m]);return p(function(){if(t){var e=d.current;return g(e),function(){b(e)}}},[t,g,b]),function(e){d.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=s({}),a=s(null),l=r(function(e){if(zr){var t=document.body,n=t&&t.style;if(o&&Ar.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Wr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(Hr).forEach(function(e){var t=Hr[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Br()&&(t.addEventListener("touchmove",$r,qr),e&&(e.addEventListener("touchstart",_r,qr),e.addEventListener("touchmove",Ur,qr))),Wr+=1}},[o]),u=r(function(e){if(zr){var t=document.body,n=t&&t.style;Wr=Math.max(Wr-1,0),o&&Wr<1&&Ar.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Br()&&(t.removeEventListener("touchmove",$r,qr),e&&(e.removeEventListener("touchstart",_r,qr),e.removeEventListener("touchmove",Ur,qr)))}},[o]);return p(function(){if(t){var e=a.current;return l(e),function(){u(e)}}},[t,l,u]),function(e){a.current=e}}({isEnabled:n});return Yt(d,null,n&&Yt("div",{onClick:Gr,css:Yr}),t(function(e){i(e),a(e)}))}var Kr={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Jr=function(e){var t=e.name,n=e.onFocus;return Yt("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Kr,value:"",onChange:function(){}})};function Zr(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Qr(){return Zr(/^Mac/i)}function eo(){return Zr(/^iPhone/i)||Zr(/^iPad/i)||Qr()&&navigator.maxTouchPoints>1}var to,no={clearIndicator:ar,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return E({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ir,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return E({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return E({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return E(E({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},mr),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return E({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Jn,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return E((k(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),k(n,"position","absolute"),k(n,"width","100%"),k(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return E({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return E({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return E({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return E({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Kn,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return E({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return E({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return E({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return E({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},ro={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},oo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tn(),captureMenuScroll:!Tn(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:Lr,trim:!0,matchFrom:"any"},to),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Tr(t):t,u=a?Tr(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Fr(l),u=Vr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function io(e,t,n,r){return{type:"option",data:t,isDisabled:mo(e,t,n),isSelected:ho(e,t,n),label:po(e,t),value:fo(e,t),index:r}}function ao(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return io(e,n,t,r)}).filter(function(t){return uo(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=io(e,n,t,r);return uo(e,i)?i:void 0}).filter(Hn)}function so(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,$(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function lo(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,$(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function uo(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!go(e)||!i)&&vo(e,{label:a,value:s,data:o},r)}var co=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},po=function(e,t){return e.getOptionLabel(t)},fo=function(e,t){return e.getOptionValue(t)};function mo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ho(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=fo(e,t);return n.some(function(t){return fo(e,t)===r})}function vo(e,t,n){return!e.filterOption||e.filterOption(t,n)}var go=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},bo=1,yo=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(n,c);var t=function(e){var t=A();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return H(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat($(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=$n(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange($n(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=$n(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return co(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return lo(ao(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return In.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return po(r.props,e)},r.getOptionValue=function(e){return fo(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=no[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,E(E({},br),e.components);var e},r.buildCategorizedOptions=function(){return ao(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return so(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:E({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Mn(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return go(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!m||p&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++bo),r.state.selectValue=kn(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=co(o,i[a])}return r}return function(e,t,n){t&&L(e.prototype,t),n&&L(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Fn(this.menuListRef,this.focusedOptionRef),(Qr()||eo())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Fn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ro):E(E({},ro),this.props.theme):ro}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return mo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ho(this.props,e,t)}},{key:"filterOption",value:function(e,t){return vo(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,u=t.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,m=this.commonProps,h=o||this.getElementId("input"),v=E(E(E({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(c,T({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):e.createElement(Dr,T({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Sn,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return m?null:e.createElement(l,T({},u,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map(function(n,s){var l=n===b,c="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,T({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:c,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))});if(m)return null;var x=g[0];return e.createElement(s,T({},u,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,T({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,T({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,T({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,T({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,h=f.inputValue,v=f.isLoading,g=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,x=f.menuIsOpen,w=f.menuPlacement,O=f.menuPosition,S=f.menuPortalTarget,C=f.menuShouldBlockScroll,I=f.menuShouldScrollIntoView,k=f.noOptionsMessage,P=f.onMenuScrollToTop,E=f.onMenuScrollToBottom;if(!x)return null;var M,j=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,f=p===i,m=a?void 0:function(){return t.onOptionHover(i)},h=a?void 0:function(){return t.selectOption(i)},v="".concat(t.getElementId("option"),"-").concat(r),g={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":t.state.isAppleDevice?void 0:s};return e.createElement(c,T({},d,{innerProps:g,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:o,value:u,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.createElement(r,T({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return j(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return j(n,"".concat(n.index))});else if(v){var R=g({inputValue:h});if(null===R)return null;M=e.createElement(l,d,R)}else{var V=k({inputValue:h});if(null===V)return null;M=e.createElement(u,d,V)}var F={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:I},L=e.createElement(Gn,T({},d,F),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,T({},d,F,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:v,placement:s}),e.createElement(Xr,{captureEnabled:m,onTopArrive:P,onBottomArrive:E,lockEnabled:C},function(n){return e.createElement(a,T({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),M)}))});return S||"fixed"===O?e.createElement(s,T({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),L):L}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(Jr,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var u=l.map(function(e){return t.getOptionValue(e)}).join(r);return e.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map(function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(Ir,T({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(o,T({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),e.createElement(n,T({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),e.createElement(i,T({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,T({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=kn(c),h={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return so(ao(e,t))}(e,m):[],g=d?lo(ao(e,m),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);h={selectValue:m,focusedOption:y,focusedOptionId:co(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,O=a&&s;return a&&!O&&(w={value:$n(f,m,m[0]||null),options:m,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),E(E(E({},h),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:O})}}]),n}();yo.defaultProps=oo;var xo=o(function(t,o){var i=function(e){var t=e.defaultInputValue,o=void 0===t?"":t,i=e.defaultMenuIsOpen,a=void 0!==i&&i,s=e.defaultValue,l=void 0===s?null:s,u=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,h=e.value,v=V(e,F),g=R(n(void 0!==u?u:o),2),b=g[0],y=g[1],x=R(n(void 0!==c?c:a),2),w=x[0],O=x[1],S=R(n(void 0!==h?h:l),2),C=S[0],I=S[1],k=r(function(e,t){"function"==typeof d&&d(e,t),I(e)},[d]),P=r(function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)},[p]),M=r(function(){"function"==typeof m&&m(),O(!0)},[m]),j=r(function(){"function"==typeof f&&f(),O(!1)},[f]),T=void 0!==u?u:b,L=void 0!==c?c:w,N=void 0!==h?h:C;return E(E({},v),{},{inputValue:T,menuIsOpen:L,onChange:k,onInputChange:P,onMenuClose:j,onMenuOpen:M,value:N})}(t);return e.createElement(yo,T({ref:o},i))}),wo=xo;const Oo=({logoUrl:e,alt:t})=>y.jsx("img",{src:e,alt:t,className:"w-8 h-8 flex-shrink-0 object-contain",onError:e=>{const n=e.target;n.style.display="none";const r=document.createElement("div");r.className="w-8 h-8 rounded-full flex items-center justify-center font-bold text-xs flex-shrink-0 bg-gray-200",r.textContent=t.substring(0,2).toUpperCase(),n.parentNode?.appendChild(r)}}),So=[{value:"mtn",label:"MTN",logoUrl:"https://payments-web.anmgw.com/assets/images/mtn.svg"},{value:"vodafone",label:"Telecel",logoUrl:"https://payments-web.anmgw.com/assets/images/telecel.svg"},{value:"airteltigo",label:"AirtelTigo",logoUrl:"https://payments-web.anmgw.com/assets/images/at.svg"}],Co=e=>{const{innerProps:t,...n}=e,r={...t,style:{...t?.style||{},display:"flex",alignItems:"center",gap:"0.75rem"}};return y.jsxs(br.Option,{...n,innerProps:r,children:[y.jsx(Oo,{logoUrl:e.data.logoUrl,alt:e.data.label}),y.jsx("span",{className:"font-medium",children:e.data.label})]})},Io=e=>y.jsx(br.SingleValue,{...e,children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Oo,{logoUrl:e.data.logoUrl,alt:e.data.label}),y.jsx("span",{className:"font-medium",children:e.data.label})]})}),ko=({selectedNetwork:e,onSelect:n,disabled:r=!1,primaryColor:o})=>{const i=o||"#3B82F6",a=So.find(t=>t.value===e),s={control:(t,n)=>({...t,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',minHeight:"48px",borderWidth:"2px",borderColor:n.isFocused||e?i:"#D1D5DB",boxShadow:n.isFocused?`0 0 0 3px ${i}33`:"none",outline:"none","&:hover":{borderColor:n.isFocused||e?i:"#9CA3AF"},opacity:r?.5:1,cursor:r?"not-allowed":"pointer",backgroundColor:r?"#F9FAFB":"white"}),menu:e=>({...e,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",border:`1px solid ${i}33`,zIndex:9999,position:"absolute"}),menuList:e=>({...e,padding:"4px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden"}),menuPortal:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,display:"flex",alignItems:"center",gap:"0.75rem",fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',backgroundColor:t.isSelected?i:t.isFocused?`${i}20`:"white",color:t.isSelected?"white":"#111827",cursor:"pointer","&:active":{backgroundColor:t.isSelected?i:`${i}40`}}),placeholder:e=>({...e,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#9CA3AF"}),singleValue:e=>({...e,display:"flex",alignItems:"center",gap:"0.75rem",fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#111827"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:"#6B7280","&:hover":{color:"#111827"}})},l=t.useMemo(()=>`network-selector-${Math.random().toString(36).substr(2,9)}`,[]);return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`\n #${l} .react-select__control--is-focused {\n border-color: ${i} !important;\n box-shadow: 0 0 0 3px ${i}33 !important;\n }\n #${l} .react-select__control:hover:not(.react-select__control--is-disabled) {\n border-color: ${e?i:"#9CA3AF"} !important;\n }\n `}),y.jsxs("div",{id:l,className:"w-full",children:[y.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select Network"}),y.jsx(wo,{value:a||null,onChange:e=>{e&&n(e.value)},options:So,isDisabled:r,placeholder:"-- Select Network --",components:{Option:Co,SingleValue:Io},styles:s,isSearchable:!1,menuPortalTarget:"undefined"!=typeof document?document.body:void 0,menuPosition:"fixed",className:"react-select-container",classNamePrefix:"react-select"})]})]})},Po=({length:e=4,onComplete:t,onResend:r,disabled:o=!1,loading:i=!1,error:a,primaryColor:s="#3B82F6"})=>{const[l,u]=n(new Array(e).fill("")),[c,d]=n(0);p(()=>{let e;return c>0&&(e=setTimeout(()=>d(c-1),1e3)),()=>clearTimeout(e)},[c]);const f=n=>{if(o||i)return;n.preventDefault();const r=n.clipboardData.getData("text/plain").replace(/\D/g,"");if(r.length===e){const n=r.split("");u(n),t(r);const o=document.getElementById("otp-input-"+(e-1));o?.focus()}};return y.jsxs("div",{className:"w-full",children:[y.jsx("div",{className:"flex justify-center gap-2 mb-4",children:l.map((n,r)=>y.jsx("input",{id:`otp-input-${r}`,type:"text",inputMode:"numeric",maxLength:1,value:n,onChange:n=>((n,r)=>{if(o||i)return;if(!/^\d*$/.test(r))return;const a=[...l];if(a[n]=r,u(a),r&&n<e-1){const e=document.getElementById(`otp-input-${n+1}`);e?.focus()}const s=a.join("");s.length===e&&t(s)})(r,n.target.value),onKeyDown:t=>((t,n)=>{if(!o&&!i){if("Backspace"===n.key)if(l[t]){const e=[...l];e[t]="",u(e)}else if(t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowLeft"===n.key&&t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowRight"===n.key&&t<e-1){const e=document.getElementById(`otp-input-${t+1}`);e?.focus()}}})(r,t),onPaste:f,disabled:o||i,className:`w-12 h-12 md:w-14 md:h-14 text-center text-lg md:text-xl font-semibold border-2 rounded-lg text-gray-900 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent ${a?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o||i?"opacity-50 cursor-not-allowed":""}`},r))}),a&&y.jsx("p",{className:"text-red-500 text-sm text-center mb-4",children:a}),y.jsx("div",{className:"text-center",children:y.jsx("button",{type:"button",onClick:()=>{c>0||o||i||(r(),d(60))},disabled:c>0||o||i,className:"text-sm "+(c>0||o||i?"opacity-50 cursor-not-allowed":""),style:{color:s},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.8")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:c>0?`Resend OTP in ${c}s`:"Resend OTP"})})]})},Eo=({paymentId:e,showTimeoutWarning:t=!1})=>y.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[y.jsx("div",{className:"relative w-16 h-16 mb-4",children:y.jsx("div",{className:"absolute inset-0 border-4 border-blue-200 border-t-blue-500 rounded-full animate-spin"})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Processing Payment"}),y.jsx("div",{className:"rounded-lg p-3 mb-4 max-w-sm border border-blue-200 bg-blue-50",children:y.jsxs("p",{className:"text-sm text-center font-medium text-blue-600",children:["Please wait for a prompt or go to ",y.jsx("strong",{children:"my approvals"})," to complete the transaction"]})}),t&&y.jsx("p",{className:"text-xs text-amber-600 text-center mt-2",children:"This is taking longer than usual. You'll be notified when it completes."}),y.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Payment ID: ",e]})]}),Mo=({success:e,payment:t,redirectUrl:r,onRedirect:o})=>{const[i,a]=n(r?5:0);return p(()=>{if(r&&i>0){const e=setTimeout(()=>{a(i-1)},1e3);return()=>clearTimeout(e)}if(r&&0===i){const e=setTimeout(()=>{o()},100);return()=>clearTimeout(e)}},[i,r,o]),y.jsx("div",{className:"flex flex-col items-center justify-center py-8",children:e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:y.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Successful!"}),t&&y.jsxs("p",{className:"text-gray-600 text-sm mb-2",children:["Amount: ",t.currency," ","number"==typeof t.amount?t.amount.toFixed(2):"string"==typeof t.amount?Number.parseFloat(t.amount).toFixed(2):t.amount]}),r?y.jsx("p",{className:"text-gray-500 text-xs mb-4",children:i>0?`Redirecting in ${i} seconds...`:"Redirecting..."}):y.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:"Close"})]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:y.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Failed"}),y.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Your payment could not be processed. Please try again."}),r?y.jsx("p",{className:"text-gray-500 text-xs mb-4",children:i>0?`Redirecting in ${i} seconds...`:"Redirecting..."}):y.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:"Close"})]})})},jo=({paymentId:e,redirectUrl:t,onRedirect:r,onContinueWaiting:o})=>{const[i,a]=n(5);return p(()=>{if(!t)return;const e=setInterval(()=>{a(t=>t<=1?(clearInterval(e),r(),0):t-1)},1e3);return()=>clearInterval(e)},[t,r]),y.jsxs("div",{className:"mt-6 p-4 rounded-lg border border-blue-200 bg-blue-50",children:[y.jsx("h4",{className:"text-sm font-semibold mb-2 text-blue-700",children:"Payment Still Processing"}),y.jsx("p",{className:"text-sm mb-4 text-blue-600",children:"Your payment is still being processed. You'll be notified via webhook when it completes."}),y.jsx("div",{className:"flex gap-3",children:t?y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:r,className:"flex-1 py-2 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors",children:["Return Now ",i>0&&`(${i}s)`]}),y.jsx("button",{onClick:o,className:"flex-1 py-2 px-4 bg-white border border-blue-300 text-blue-700 rounded-lg text-sm font-medium transition-colors hover:bg-blue-50",children:"Continue Waiting"})]}):y.jsx("button",{onClick:o,className:"w-full py-2 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors",children:"Continue Waiting"})}),y.jsxs("p",{className:"text-xs mt-3 text-gray-500 text-center",children:["Payment ID: ",e]})]})},Ro=({config:e,isOpen:t,onClose:r})=>{const[o,i]=n("phone-input"),[a,s]=n(""),[l,u]=n(""),[c,d]=n(),[f,m]=n(""),[h,v]=n(null),[g,b]=n(null),[C,I]=n(!1),[k,P]=n(null),[E,M]=n(!1),[j,R]=n(!1),[V,F]=n(!1),[T,L]=n(0),N=new O({apiKey:e.apiKey,platformId:e.platformId,baseUrl:e.apiUrl});p(()=>{t&&e.platformId&&N.getPlatformInfo().then(e=>{if(e.logo_url){const t=new Image;t.onload=()=>{P(e.logo_url),M(!0)},t.onerror=()=>{M(!1)},t.src=e.logo_url}}).catch(e=>{console.debug("Failed to fetch platform logo:",e)})},[t,e.platformId,N]),p(()=>{const n=e.displayMode||"modal";if(t&&"modal"===n){const e=globalThis.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[t,e.displayMode]),p(()=>{t||(i("phone-input"),s(""),u(""),d(void 0),m(""),v(null),b(null),I(!1),P(null),M(!1),R(!1),F(!1),L(0))},[t]),p(()=>{if("verifying"===o&&f&&!j){let t=0;const n=15,r=7;R(!1),F(!1);const o=setInterval(async()=>{t++,t===r&&F(!0);try{const t=await N.getPaymentStatus(f);if(t.data){const n=t.data.status;"completed"===n?(v(t.data),clearInterval(o),F(!1),R(!1),e.onSuccess?.(t.data),i("success")):"failed"!==n&&"cancelled"!==n&&"expired"!==n||(clearInterval(o),F(!1),R(!1),e.onError?.({message:`Payment ${n}`}),i("failed"))}}catch(e){console.error("Error polling payment status:",e)}t>=n&&(clearInterval(o),R(!0),F(!1))},2e3);return()=>{clearInterval(o),F(!1)}}},[o,f,e,T,j]);const D=async()=>{if(l&&c){if(e.redirect_url&&!x(e.redirect_url))return b("Redirect URL must be a valid HTTPS URL"),void e.onError?.({message:"Redirect URL must be a valid HTTPS URL",code:"INVALID_REDIRECT_URL"});I(!0),b(null);try{const t=await N.createPayment({amount:e.amount,currency:e.currency||"GHS",payment_method:"mobile_money",phone_number:l,network:c,redirect_url:e.redirect_url,webhook_url:e.webhookUrl,order_id:e.orderId,metadata:e.metadata});if(!t.data?.payment_id)throw new Error("Failed to create payment");m(t.data.payment_id),t.data.otp_required?i("otp-input"):i("verifying")}catch(t){const n=t instanceof Error?t.message:"Failed to create payment";b(n),e.onError?.({message:n})}finally{I(!1)}}else b("Please enter phone number and select network")},A=async t=>{if(f&&l){I(!0),b(null);try{if(!(await N.verifyOTP(f,{phone_number:l,otp_code:t})).data)throw new Error("Failed to verify OTP");i("verifying")}catch(t){const n=t instanceof Error?t.message:"Invalid OTP code";b(n),e.onError?.({message:n})}finally{I(!1)}}else b("Missing required data")},H=async()=>{if(f){I(!0),b(null);try{await N.resendOTP(f,{phone_number:l})}catch(e){const t=e instanceof Error?e.message:"Failed to resend OTP";b(t)}finally{I(!1)}}},$=()=>{if(f&&e.redirect_url){const t=w(e.redirect_url,f,"cancelled");return void(globalThis.location.href=t)}r&&r()},U=e.displayMode||"modal",_=e.primaryColor||"#3B82F6",B={"--payloqa-primary":_},z=k||e.logoUrl;if(p(()=>{if(e.logoUrl&&!k&&""!==e.logoUrl.trim()){const t=new Image;t.onload=()=>M(!0),t.onerror=()=>M(!1),t.src=e.logoUrl}},[e.logoUrl,k]),p(()=>{if(!t)return;const e=e=>(e.preventDefault(),!1),n=e=>{if("F12"===e.key||e.ctrlKey&&e.shiftKey&&("I"===e.key||"J"===e.key||"C"===e.key)||e.ctrlKey&&("U"===e.key||"S"===e.key))return e.preventDefault(),!1},r=e=>{const t=e.target;"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&e.preventDefault()};return document.addEventListener("contextmenu",e),document.addEventListener("keydown",n),document.addEventListener("selectstart",r),()=>{document.removeEventListener("contextmenu",e),document.removeEventListener("keydown",n),document.removeEventListener("selectstart",r)}},[t]),!t)return null;const W=()=>y.jsxs(y.Fragment,{children:["fullpage"!==U&&y.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[z&&y.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:E||z===e.logoUrl&&!k?y.jsx("img",{src:z,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):y.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),y.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&y.jsx("button",{onClick:$,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:y.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsxs("div",{className:"p-6",children:["phone-input"===o&&y.jsxs("div",{className:"space-y-4",children:[y.jsx(ko,{selectedNetwork:c,onSelect:d,disabled:C,primaryColor:_}),y.jsx(S,{value:a,onChange:s,onValid:u,disabled:C,error:g||void 0,primaryColor:_}),g&&y.jsx("p",{className:"text-red-500 text-sm",children:g}),y.jsx("button",{onClick:D,disabled:!l||!c||C,className:"w-full py-3 px-4 bg-[var(--payloqa-primary)] hover:brightness-90 text-white rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:C?"Processing...":"Continue"})]}),"otp-input"===o&&y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{children:[y.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Enter OTP"}),y.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["We've sent a 4-digit code to ",l]})]}),y.jsx(Po,{length:4,onComplete:A,onResend:H,disabled:C,loading:C,error:g||void 0,primaryColor:_})]}),"verifying"===o&&y.jsxs(y.Fragment,{children:[y.jsx(Eo,{paymentId:f,showTimeoutWarning:V}),j&&y.jsx(jo,{paymentId:f,redirectUrl:e.redirect_url,onRedirect:()=>{if(e.redirect_url){const t=w(e.redirect_url,f,"pending");globalThis.location.href=t}},onContinueWaiting:()=>{R(!1),F(!1),L(e=>e+1)}})]}),("success"===o||"failed"===o)&&y.jsx(Mo,{success:"success"===o,payment:h||void 0,redirectUrl:e.redirect_url,onRedirect:()=>((t,n)=>{if(e.redirect_url&&f){const r=w(e.redirect_url,f,t,n);return void(globalThis.location.href=r)}r&&r()})("success"===o?"completed":"failed"===o?"failed":"cancelled",h||void 0)})]})]});return"inline"===U?y.jsx("div",{className:"payloqa-payment-widget isolate",style:B,children:y.jsx("div",{className:"payment-widget-modal font-poppins w-full max-w-md mx-auto bg-white rounded-lg shadow-lg border border-gray-200",children:W()})}):"fullpage"===U?y.jsx("div",{className:"payloqa-payment-widget isolate",style:B,children:y.jsx("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",children:y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-gray-50",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[z&&y.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:E||z===e.logoUrl&&!k?y.jsx("img",{src:z,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):y.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),y.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&y.jsx("button",{onClick:$,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:y.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsx("div",{className:"flex-1 flex items-center justify-center p-4 font-poppins",children:y.jsx("div",{className:"w-full max-w-md",children:y.jsx("div",{className:"payment-widget-modal bg-white rounded-lg shadow-lg border border-gray-200",children:W()})})})]})})}):y.jsx("div",{className:"payloqa-payment-widget isolate",style:B,children:y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4",children:y.jsx("div",{className:"payment-widget-modal font-poppins bg-white rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:W()})})})};export{O as PaymentService,Ro as PaymentWidget};
|
|
1
|
+
import*as e from"react";import t,{useState as n,useCallback as r,forwardRef as o,useContext as i,useLayoutEffect as a,useRef as s,useMemo as l,createContext as u,Component as c,Fragment as d,useEffect as p}from"react";import f,{createPortal as m}from"react-dom";var h={exports:{}},v={},g=Symbol.for("react.transitional.element"),b=Symbol.for("react.fragment");function y(e,t,n){var r=null;if(void 0!==n&&(r=""+n),void 0!==t.key&&(r=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:g,type:e,key:r,ref:void 0!==t?t:null,props:n}}v.Fragment=b,v.jsx=y,v.jsxs=y,h.exports=v;var x=h.exports;function w(e){try{return"https:"===new URL(e).protocol}catch{return!1}}function O(e,t,n,r){const o=new URLSearchParams({payment_id:t,status:n});if("completed"===n&&r){const e="number"==typeof r.amount?r.amount.toString():r.amount;o.append("amount",e),o.append("currency",r.currency||"GHS");const t=r.metadata?.reference||r.metadata?.order_reference;t&&o.append("reference",t)}if("failed"===n&&r?.metadata?.error){const e=r.metadata.error;o.append("reason",e.code||"unknown"),o.append("message",e.message||"Payment failed")}return`${e}?${o.toString()}`}class S{constructor(e){this.config=e}async makeRequest(e,t={}){const n=`${this.config.baseUrl||"https://payment.payloqa.com/api/v1/payments"}${e}`,r={"Content-Type":"application/json","X-API-Key":this.config.apiKey,"X-Platform-Id":this.config.platformId,...t.headers},o=await fetch(n,{...t,headers:r}),i=await o.json();if(!o.ok||!1===i.success){const e=i.error?.message||i.message||`HTTP ${o.status}: ${o.statusText}`,t=new Error(e);throw i.error?.code&&(t.code=i.error.code),t}return i}async createPayment(e){if(e.redirect_url&&!w(e.redirect_url))throw new Error("Redirect URL must be a valid HTTPS URL. HTTP URLs are not allowed for security reasons.");return this.makeRequest("/create",{method:"POST",body:JSON.stringify(e)})}async verifyOTP(e,t){return this.makeRequest(`/${e}/verify-otp`,{method:"POST",body:JSON.stringify(t)})}async resendOTP(e,t){return this.makeRequest(`/${e}/resend-otp`,{method:"POST",body:JSON.stringify(t)})}async getPaymentStatus(e){return this.makeRequest(`/${e}`,{method:"GET"})}async cancelPayment(e,t){return this.makeRequest(`/${e}/cancel`,{method:"POST",body:t?JSON.stringify(t):void 0})}async getPlatformInfo(){const e=await this.makeRequest("/platform",{method:"GET"});return{logo_url:e.data?.logo_url}}}const C=({value:e,onChange:t,onValid:n,placeholder:r="Phone number",disabled:o=!1,error:i,primaryColor:a="#3B82F6"})=>x.jsxs("div",{className:"w-full",style:{"--payloqa-primary":a},children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Phone Number"}),x.jsx("input",{type:"tel",value:e,onChange:e=>{const r=e.target.value.replace(/\D/g,"").slice(0,10);t(r);10===r.length&&n&&n((e=>{const t=e.replace(/[^\d+]/g,"");return t.startsWith("+233")?t:t.startsWith("0")?"+233"+t.substring(1):10!==t.length||t.startsWith("0")?t:"+233"+t})(r))},placeholder:r,disabled:o,maxLength:10,className:`w-full px-4 py-3 border-2 rounded-lg text-base text-gray-900 transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--payloqa-primary)] focus:border-[var(--payloqa-primary)] ${i?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o?"bg-gray-50 cursor-not-allowed opacity-60":""}`}),i&&x.jsx("p",{className:"mt-2 text-sm text-red-600 font-medium",children:i})]});function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function k(e){var t=function(e,t){if("object"!=I(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==I(t)?t:t+""}function P(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){if(e){if("string"==typeof e)return j(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var T=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(H=function(){return!!e})()}function $(e,t){if(t&&("object"==I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function U(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(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 _=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(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.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(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.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=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]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),B="-ms-",z="-moz-",W="-webkit-",q="comm",G="rule",Y="decl",X="@keyframes",K=Math.abs,J=String.fromCharCode,Z=Object.assign;function Q(e){return e.trim()}function ee(e,t,n){return e.replace(t,n)}function te(e,t){return e.indexOf(t)}function ne(e,t){return 0|e.charCodeAt(t)}function re(e,t,n){return e.slice(t,n)}function oe(e){return e.length}function ie(e){return e.length}function ae(e,t){return t.push(e),e}var se=1,le=1,ue=0,ce=0,de=0,pe="";function fe(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:se,column:le,length:a,return:""}}function me(e,t){return Z(fe("",null,null,"",null,null,0),e,{length:-e.length},t)}function he(){return de=ce>0?ne(pe,--ce):0,le--,10===de&&(le=1,se--),de}function ve(){return de=ce<ue?ne(pe,ce++):0,le++,10===de&&(le=1,se++),de}function ge(){return ne(pe,ce)}function be(){return ce}function ye(e,t){return re(pe,e,t)}function xe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function we(e){return se=le=1,ue=oe(pe=e),ce=0,[]}function Oe(e){return pe="",e}function Se(e){return Q(ye(ce-1,ke(91===e?e+2:40===e?e+1:e)))}function Ce(e){for(;(de=ge())&&de<33;)ve();return xe(e)>2||xe(de)>3?"":" "}function Ie(e,t){for(;--t&&ve()&&!(de<48||de>102||de>57&&de<65||de>70&&de<97););return ye(e,be()+(t<6&&32==ge()&&32==ve()))}function ke(e){for(;ve();)switch(de){case e:return ce;case 34:case 39:34!==e&&39!==e&&ke(de);break;case 40:41===e&&ke(e);break;case 92:ve()}return ce}function Pe(e,t){for(;ve()&&e+de!==57&&(e+de!==84||47!==ge()););return"/*"+ye(t,ce-1)+"*"+J(47===e?e:ve())}function Ee(e){for(;!xe(ge());)ve();return ye(e,ce)}function Me(e){return Oe(je("",null,null,null,[""],e=we(e),0,[0],e))}function je(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,m=0,h=1,v=1,g=1,b=0,y="",x=o,w=i,O=r,S=y;v;)switch(m=b,b=ve()){case 40:if(108!=m&&58==ne(S,d-1)){-1!=te(S+=ee(Se(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Se(b);break;case 9:case 10:case 13:case 32:S+=Ce(m);break;case 92:S+=Ie(be()-1,7);continue;case 47:switch(ge()){case 42:case 47:ae(Ve(Pe(ve(),be()),t,n),l);break;default:S+="/"}break;case 123*h:s[u++]=oe(S)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==g&&(S=ee(S,/\f/g,"")),f>0&&oe(S)-d&&ae(f>32?Fe(S+";",r,n,d-1):Fe(ee(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(ae(O=Re(S,t,n,u,c,o,s,y,x=[],w=[],d),i),123===b)if(0===c)je(S,t,O,O,x,i,d,s,w);else switch(99===p&&110===ne(S,3)?100:p){case 100:case 108:case 109:case 115:je(e,O,O,r&&ae(Re(e,O,O,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:je(S,O,O,O,[""],w,0,s,w)}}u=c=f=0,h=g=1,y=S="",d=a;break;case 58:d=1+oe(S),f=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==he())continue;switch(S+=J(b),b*h){case 38:g=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(oe(S)-1)*g,g=1;break;case 64:45===ge()&&(S+=Se(ve())),p=ge(),c=d=oe(y=S+=Ee(be())),b++;break;case 45:45===m&&2==oe(S)&&(h=0)}}return i}function Re(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=ie(p),m=0,h=0,v=0;m<r;++m)for(var g=0,b=re(e,d+1,d=K(h=a[m])),y=e;g<f;++g)(y=Q(h>0?p[g]+" "+b:ee(b,/&\f/g,p[g])))&&(l[v++]=y);return fe(e,t,n,0===o?G:s,l,u,c)}function Ve(e,t,n){return fe(e,t,n,q,J(de),re(e,2,-2),0)}function Fe(e,t,n,r){return fe(e,t,n,Y,re(e,0,r),re(e,r+1,-1),r)}function Te(e,t){for(var n="",r=ie(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Le(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Y:return e.return=e.return||e.value;case q:return"";case X:return e.return=e.value+"{"+Te(e.children,r)+"}";case G:e.value=e.props.join(",")}return oe(n=Te(e.children,r))?e.return=e.value+"{"+n+"}":""}function Ne(e){var t=ie(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function De(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ae="undefined"!=typeof document,He=function(e,t,n){for(var r=0,o=0;r=o,o=ge(),38===r&&12===o&&(t[n]=1),!xe(o);)ve();return ye(e,ce)},$e=function(e,t){return Oe(function(e,t){var n=-1,r=44;do{switch(xe(r)){case 0:38===r&&12===ge()&&(t[n]=1),e[n]+=He(ce-1,t,n);break;case 2:e[n]+=Se(r);break;case 4:if(44===r){e[++n]=58===ge()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=J(r)}}while(r=ve());return e}(we(e),t))},Ue=new WeakMap,_e=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ue.get(n))&&!r){Ue.set(e,!0);for(var o=[],i=$e(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},Be=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ze(e,t){switch(function(e,t){return 45^ne(e,0)?(((t<<2^ne(e,0))<<2^ne(e,1))<<2^ne(e,2))<<2^ne(e,3):0}(e,t)){case 5103:return W+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return W+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return W+e+z+e+B+e+e;case 6828:case 4268:return W+e+B+e+e;case 6165:return W+e+B+"flex-"+e+e;case 5187:return W+e+ee(e,/(\w+).+(:[^]+)/,W+"box-$1$2"+B+"flex-$1$2")+e;case 5443:return W+e+B+"flex-item-"+ee(e,/flex-|-self/,"")+e;case 4675:return W+e+B+"flex-line-pack"+ee(e,/align-content|flex-|-self/,"")+e;case 5548:return W+e+B+ee(e,"shrink","negative")+e;case 5292:return W+e+B+ee(e,"basis","preferred-size")+e;case 6060:return W+"box-"+ee(e,"-grow","")+W+e+B+ee(e,"grow","positive")+e;case 4554:return W+ee(e,/([^-])(transform)/g,"$1"+W+"$2")+e;case 6187:return ee(ee(ee(e,/(zoom-|grab)/,W+"$1"),/(image-set)/,W+"$1"),e,"")+e;case 5495:case 3959:return ee(e,/(image-set\([^]*)/,W+"$1$`$1");case 4968:return ee(ee(e,/(.+:)(flex-)?(.*)/,W+"box-pack:$3"+B+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+W+e+e;case 4095:case 3583:case 4068:case 2532:return ee(e,/(.+)-inline(.+)/,W+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oe(e)-1-t>6)switch(ne(e,t+1)){case 109:if(45!==ne(e,t+4))break;case 102:return ee(e,/(.+:)(.+)-([^]+)/,"$1"+W+"$2-$3$1"+z+(108==ne(e,t+3)?"$3":"$2-$3"))+e;case 115:return~te(e,"stretch")?ze(ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ne(e,t+1))break;case 6444:switch(ne(e,oe(e)-3-(~te(e,"!important")&&10))){case 107:return ee(e,":",":"+W)+e;case 101:return ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(45===ne(e,14)?"inline-":"")+"box$3$1"+W+"$2$3$1"+B+"$2box$3")+e}break;case 5936:switch(ne(e,t+11)){case 114:return W+e+B+ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return W+e+B+ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return W+e+B+ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return W+e+B+e+e}return e}var We,qe,Ge=Ae?void 0:(We=function(){return De(function(){return{}})},qe=new WeakMap,function(e){if(qe.has(e))return qe.get(e);var t=We(e);return qe.set(e,t),t}),Ye=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Y:e.return=ze(e.value,e.length);break;case X:return Te([me(e,{value:ee(e.value,"@","@"+W)})],r);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Te([me(e,{props:[ee(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Te([me(e,{props:[ee(t,/:(plac\w+)/,":"+W+"input-$1")]}),me(e,{props:[ee(t,/:(plac\w+)/,":-moz-$1")]}),me(e,{props:[ee(t,/:(plac\w+)/,B+"input-$1")]})],r)}return""})}}],Xe=function(e){var t=e.key;if(Ae&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Ye,a={},s=[];Ae&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u=[_e,Be];if(Ge){var c=[Le],d=Ne(u.concat(i,c)),p=Ge(i)(t),f=function(e,t){var n=t.name;return void 0===p[n]&&(p[n]=Te(Me(e?e+"{"+t.styles+"}":t.styles),d)),p[n]};o=function(e,t,n,r){var o=t.name,i=f(e,t);return void 0===g.compat?(r&&(g.inserted[o]=!0),i):r?void(g.inserted[o]=i):i}}else{var m,h=[Le,(l=function(e){m.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],v=Ne(u.concat(i,h));o=function(e,t,n,r){m=n,Te(Me(e?e+"{"+t.styles+"}":t.styles),v),r&&(g.inserted[t.name]=!0)}}var g={key:t,sheet:new _({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return g.sheet.hydrate(s),g},Ke={exports:{}},Je={},Ze="function"==typeof Symbol&&Symbol.for,Qe=Ze?Symbol.for("react.element"):60103,et=Ze?Symbol.for("react.portal"):60106,tt=Ze?Symbol.for("react.fragment"):60107,nt=Ze?Symbol.for("react.strict_mode"):60108,rt=Ze?Symbol.for("react.profiler"):60114,ot=Ze?Symbol.for("react.provider"):60109,it=Ze?Symbol.for("react.context"):60110,at=Ze?Symbol.for("react.async_mode"):60111,st=Ze?Symbol.for("react.concurrent_mode"):60111,lt=Ze?Symbol.for("react.forward_ref"):60112,ut=Ze?Symbol.for("react.suspense"):60113,ct=Ze?Symbol.for("react.suspense_list"):60120,dt=Ze?Symbol.for("react.memo"):60115,pt=Ze?Symbol.for("react.lazy"):60116,ft=Ze?Symbol.for("react.block"):60121,mt=Ze?Symbol.for("react.fundamental"):60117,ht=Ze?Symbol.for("react.responder"):60118,vt=Ze?Symbol.for("react.scope"):60119;function gt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Qe:switch(e=e.type){case at:case st:case tt:case rt:case nt:case ut:return e;default:switch(e=e&&e.$$typeof){case it:case lt:case pt:case dt:case ot:return e;default:return t}}case et:return t}}}function bt(e){return gt(e)===st}Je.AsyncMode=at,Je.ConcurrentMode=st,Je.ContextConsumer=it,Je.ContextProvider=ot,Je.Element=Qe,Je.ForwardRef=lt,Je.Fragment=tt,Je.Lazy=pt,Je.Memo=dt,Je.Portal=et,Je.Profiler=rt,Je.StrictMode=nt,Je.Suspense=ut,Je.isAsyncMode=function(e){return bt(e)||gt(e)===at},Je.isConcurrentMode=bt,Je.isContextConsumer=function(e){return gt(e)===it},Je.isContextProvider=function(e){return gt(e)===ot},Je.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Qe},Je.isForwardRef=function(e){return gt(e)===lt},Je.isFragment=function(e){return gt(e)===tt},Je.isLazy=function(e){return gt(e)===pt},Je.isMemo=function(e){return gt(e)===dt},Je.isPortal=function(e){return gt(e)===et},Je.isProfiler=function(e){return gt(e)===rt},Je.isStrictMode=function(e){return gt(e)===nt},Je.isSuspense=function(e){return gt(e)===ut},Je.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===tt||e===st||e===rt||e===nt||e===ut||e===ct||"object"==typeof e&&null!==e&&(e.$$typeof===pt||e.$$typeof===dt||e.$$typeof===ot||e.$$typeof===it||e.$$typeof===lt||e.$$typeof===mt||e.$$typeof===ht||e.$$typeof===vt||e.$$typeof===ft)},Je.typeOf=gt,Ke.exports=Je;var yt=Ke.exports,xt={};xt[yt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xt[yt.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var wt="undefined"!=typeof document;var Ot=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===wt&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var St={animationIterationCount:1,aspectRatio: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,scale: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},Ct=/[A-Z]|^ms/g,It=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kt=function(e){return 45===e.charCodeAt(1)},Pt=function(e){return null!=e&&"boolean"!=typeof e},Et=De(function(e){return kt(e)?e:e.replace(Ct,"-$&").toLowerCase()}),Mt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(It,function(e,t,n){return Rt={name:t,styles:n,next:Rt},t})}return 1===St[e]||kt(e)||"number"!=typeof t||0===t?t:t+"px"};function jt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Rt={name:o.name,styles:o.styles,next:Rt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Rt={name:a.name,styles:a.styles,next:Rt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=jt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;Pt(s)&&(r+=Et(i)+":"+Mt(i,s)+";")}else if(Array.isArray(a)&&"string"==typeof a[0]&&null==t)for(var l=0;l<a.length;l++)Pt(a[l])&&(r+=Et(i)+":"+Mt(i,a[l])+";");else{var u=jt(e,t,a);switch(i){case"animation":case"animationName":r+=Et(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=Rt,l=n(e);return Rt=s,jt(e,t,l)}}return n}var Rt,Vt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Ft(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Rt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=jt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=jt(n,t,e[a]),r)o+=i[a]}Vt.lastIndex=0;for(var s,l="";null!==(s=Vt.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:Rt}}var Tt="undefined"!=typeof document,Lt=function(e){return e()},Nt=!!e.useInsertionEffect&&e.useInsertionEffect,Dt=Tt&&Nt||Lt,At="undefined"!=typeof document,Ht=e.createContext("undefined"!=typeof HTMLElement?Xe({key:"css"}):null);Ht.Provider;var $t=function(e){return o(function(t,n){var r=i(Ht);return e(t,r,n)})};At||($t=function(t){return function(n){var r=i(Ht);return null===r?(r=Xe({key:"css"}),e.createElement(Ht.Provider,{value:r},t(n,r))):t(n,r)}});var Ut,_t,Bt=e.createContext({}),zt={}.hasOwnProperty,Wt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qt=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;Ot(n,r,o);var i=Dt(function(){return function(e,t,n){Ot(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",i=t;do{var a=e.insert(t===i?"."+r:"",i,e.sheet,!0);wt||void 0===a||(o+=a),i=i.next}while(void 0!==i);if(!wt&&0!==o.length)return o}}(n,r,o)});if(!At&&void 0!==i){for(var a,s=r.name,l=r.next;void 0!==l;)s+=" "+l.name,l=l.next;return e.createElement("style",((a={})["data-emotion"]=n.key+" "+s,a.dangerouslySetInnerHTML={__html:i},a.nonce=n.sheet.nonce,a))}return null},Gt=$t(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[Wt],a=[o],s="";"string"==typeof t.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Ft(a,void 0,e.useContext(Bt));s+=n.key+"-"+l.name;var u={};for(var c in t)zt.call(t,c)&&"css"!==c&&c!==Wt&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(qt,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))}),Yt=Gt,Xt=function(t,n){var r=arguments;if(null==n||!zt.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Yt,i[1]=function(e,t){var n={};for(var r in t)zt.call(t,r)&&(n[r]=t[r]);return n[Wt]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function Kt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ft(t)}Ut=Xt||(Xt={}),_t||(_t=Ut.JSX||(Ut.JSX={}));const Jt=Math.min,Zt=Math.max,Qt=Math.round,en=Math.floor,tn=e=>({x:e,y:e});function nn(){return"undefined"!=typeof window}function rn(e){return sn(e)?(e.nodeName||"").toLowerCase():"#document"}function on(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function an(e){var t;return null==(t=(sn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function sn(e){return!!nn()&&(e instanceof Node||e instanceof on(e).Node)}function ln(e){return!!nn()&&(e instanceof HTMLElement||e instanceof on(e).HTMLElement)}function un(e){return!(!nn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof on(e).ShadowRoot)}const cn=new Set(["inline","contents"]);function dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cn.has(o)}const pn=new Set(["html","body","#document"]);function fn(e){return on(e).getComputedStyle(e)}function mn(e){const t=function(e){if("html"===rn(e))return e;const t=e.assignedSlot||e.parentNode||un(e)&&e.host||an(e);return un(t)?t.host:t}(e);return function(e){return pn.has(rn(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:ln(t)&&dn(t)?t:mn(t)}function hn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=mn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=on(o);if(i){const e=vn(a);return t.concat(a,a.visualViewport||[],dn(o)?o:[],e&&n?hn(e):[])}return t.concat(o,hn(o,[],n))}function vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){return t=e,nn()&&(t instanceof Element||t instanceof on(t).Element)?e:e.contextElement;var t}function bn(e){const t=gn(e);if(!ln(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=fn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ln(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Qt(n)!==i||Qt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Qt(n.width):n.width)/r,s=(i?Qt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function yn(e,t,n,r){void 0===t&&(t=!1);const o=e.getBoundingClientRect(),i=gn(e);let a=tn(1);t&&(a=bn(e));const s=tn(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=r;let t=on(i),n=vn(t);for(;n&&r&&e!==t;){const e=bn(n),r=n.getBoundingClientRect(),o=fn(n),i=r.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,a=r.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,t=on(n),n=vn(t)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}function xn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=gn(e),c=o||i?[...u?hn(u):[],...hn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&s?function(e,t){let n,r=null;const o=an(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=u;if(s||t(),!p||!f)return;const m={rootMargin:-en(d)+"px "+-en(o.clientWidth-(c+p))+"px "+-en(o.clientHeight-(d+f))+"px "+-en(c)+"px",threshold:Zt(0,Jt(1,l))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||xn(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h=l?yn(e):null;return l&&function t(){const r=yn(e);h&&!xn(h,r)&&n();h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var On="undefined"!=typeof document?a:function(){},Sn=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Cn=function(){};function In(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function kn(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(In(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Pn=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===I(e)&&null!==e?[e]:[];var t},En=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,M({},F(e,Sn))},Mn=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function jn(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Rn(e){return jn(e)?window.pageYOffset:e.scrollTop}function Vn(e,t){jn(e)?window.scrollTo(0,t):e.scrollTop=t}function Fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cn,o=Rn(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);Vn(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function Tn(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Vn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Vn(e,Math.max(t.offsetTop-o,0))}function Ln(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Nn=!1,Dn={get passive(){return Nn=!0}},An="undefined"!=typeof window?window:{};An.addEventListener&&An.removeEventListener&&(An.addEventListener("p",Cn,Dn),An.removeEventListener("p",Cn,!1));var Hn=Nn;function $n(e){return null!=e}function Un(e,t,n){return e?t:n}var _n=["children","innerProps"],Bn=["children","innerProps"];function zn(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,v=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:jn(c=l)?window.innerHeight:c.clientHeight,b=Rn(l),y=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=v-x,O=g-h,S=w+b,C=d-b-h,I=f-g+b+y,k=b+h-x,P=160;switch(o){case"auto":case"bottom":if(O>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!a)return i&&Fn(l,I,P),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&O>=r)return i&&Fn(l,I,P),{placement:"bottom",maxHeight:a?O-y:C-y};if("auto"===o||a){var E=t,M=a?w:S;return M>=r&&(E=Math.min(M-y-s,t)),{placement:"top",maxHeight:E}}if("bottom"===o)return i&&Vn(l,I),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return i&&Fn(l,k,P),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var j=t;return(!a&&S>=r||a&&w>=r)&&(j=a?w-x:S-x),i&&Fn(l,k,P),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var Wn,qn=function(e){return"auto"===e?"bottom":e},Gn=u(null),Yn=function(e){var t=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,l=e.menuPosition,u=e.menuShouldScrollIntoView,c=e.theme,d=(i(Gn)||{}).setPortalPlacement,p=s(null),f=V(n(o),2),m=f[0],h=f[1],v=V(n(null),2),g=v[0],b=v[1],y=c.spacing.controlHeight;return On(function(){var e=p.current;if(e){var t="fixed"===l,n=zn({maxHeight:o,menuEl:e,minHeight:r,placement:a,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});h(n.maxHeight),b(n.placement),null==d||d(n.placement)}},[o,a,l,u,r,d,y]),t({ref:p,placerProps:M(M({},e),{},{placement:g||qn(a),maxHeight:m})})},Xn=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Xt("div",L({},Mn(e,"menu",{menu:!0}),{ref:n},r),t)},Kn=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return M({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Jn=Kn,Zn=Kn,Qn=["size"],er=["innerProps","isRtl","size"],tr={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},nr=function(e){var t=e.size,n=F(e,Qn);return Xt("svg",L({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:tr},n))},rr=function(e){return Xt(nr,L({size:20},e),Xt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},or=function(e){return Xt(nr,L({size:20},e),Xt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ir=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return M({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ar=ir,sr=ir,lr=function(){var e=Kt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Wn||(Wn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),ur=function(e){var t=e.delay,n=e.offset;return Xt("span",{css:Kt({animation:"".concat(lr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},cr=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xt("div",L({ref:o},Mn(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},dr=["data"],pr=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Xt("div",L({},Mn(e,"group",{group:!0}),s),Xt(i,L({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),l),Xt("div",null,t))},fr=["innerRef","isDisabled","isHidden","inputClassName"],mr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},hr={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":M({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},mr)},vr=function(e){return M({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},mr)},gr=function(e){var t=e.children,n=e.innerProps;return Xt("div",n,t)};var br=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Xt(l,{data:r,innerProps:M(M({},Mn(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Xt(u,{data:r,innerProps:M({},Mn(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xt(c,{data:r,innerProps:M(M({},Mn(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},yr={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xt("div",L({},Mn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xt(rr,null))},Control:cr,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xt("div",L({},Mn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xt(or,null))},DownChevron:or,CrossIcon:rr,Group:pr,GroupHeading:function(e){var t=En(e);t.data;var n=F(t,dr);return Xt("div",L({},Mn(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xt("div",L({},Mn(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xt("span",L({},t,Mn(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=En(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=F(r,fr);return Xt("div",L({},Mn(e,"input",{"input-container":!0}),{"data-value":n||""}),Xt("input",L({className:t({input:!0},s),ref:o,style:vr(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=F(e,er);return Xt("div",L({},Mn(M(M({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xt(ur,{delay:0,offset:n}),Xt(ur,{delay:160,offset:!0}),Xt(ur,{delay:320,offset:!n}))},Menu:Xn,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Xt("div",L({},Mn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,o=e.children,i=e.controlElement,a=e.innerProps,u=e.menuPlacement,c=e.menuPosition,d=s(null),p=s(null),f=V(n(qn(u)),2),h=f[0],v=f[1],g=l(function(){return{setPortalPlacement:v}},[]),b=V(n(null),2),y=b[0],x=b[1],w=r(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===c?0:window.pageYOffset,n=e[h]+t;n===(null==y?void 0:y.offset)&&e.left===(null==y?void 0:y.rect.left)&&e.width===(null==y?void 0:y.rect.width)||x({offset:n,rect:e})}},[i,c,h,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);On(function(){w()},[w]);var O=r(function(){"function"==typeof p.current&&(p.current(),p.current=null),i&&d.current&&(p.current=wn(i,d.current,w,{elementResize:"ResizeObserver"in window}))},[i,w]);On(function(){O()},[O]);var S=r(function(e){d.current=e,O()},[O]);if(!t&&"fixed"!==c||!y)return null;var C=Xt("div",L({ref:S},Mn(M(M({},e),{},{offset:y.offset,position:c,rect:y.rect}),"menuPortal",{"menu-portal":!0}),a),o);return Xt(Gn.Provider,{value:g},t?m(C,t):C)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=F(e,Bn);return Xt("div",L({},Mn(M(M({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=F(e,_n);return Xt("div",L({},Mn(M(M({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:br,MultiValueContainer:gr,MultiValueLabel:gr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xt("div",L({role:"button"},n),t||Xt(rr,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Xt("div",L({},Mn(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xt("div",L({},Mn(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Xt("div",L({},Mn(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Xt("div",L({},Mn(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Xt("div",L({},Mn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},xr=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function wr(e,t){return e===t||!(!xr(e)||!xr(t))}function Or(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}for(var Sr={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Cr=function(e){return Xt("span",L({css:Sr},e))},Ir={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},kr=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,p=s.ariaLiveMessages,f=s.getOptionLabel,m=s.inputValue,h=s.isMulti,v=s.isOptionDisabled,g=s.isSearchable,b=s.menuIsOpen,y=s.options,x=s.screenReaderStatus,w=s.tabSelectsValue,O=s.isLoading,S=s["aria-label"],C=s["aria-live"],I=l(function(){return M(M({},Ir),p||{})},[p]),k=l(function(){var e,n="";if(t&&I.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?f(u):"",d=o||s||void 0,p=d?d.map(f):[],m=M({isDisabled:u&&v(u,a),label:c,labels:p},t);n=I.onChange(m)}return n},[t,I,v,a,f]),P=l(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&I.onFocus){var s={focused:t,label:f(t),isDisabled:v(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=I.onFocus(s)}return e},[n,r,f,v,I,o,a,c]),E=l(function(){var e="";if(b&&y.length&&!O&&I.onFilter){var t=x({count:o.length});e=I.onFilter({inputValue:m,resultsMessage:t})}return e},[o,m,b,I,y,x,O]),j="initial-input-focus"===(null==t?void 0:t.action),R=l(function(){var e="";if(I.guidance){var t=r?"value":b?"menu":"input";e=I.guidance({"aria-label":S,context:t,isDisabled:n&&v(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:j})}return e},[S,n,r,h,v,g,b,I,a,w,j]),V=Xt(d,null,Xt("span",{id:"aria-selection"},k),Xt("span",{id:"aria-focused"},P),Xt("span",{id:"aria-results"},E),Xt("span",{id:"aria-guidance"},R));return Xt(d,null,Xt(Cr,{id:u},j&&V),Xt(Cr,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!j&&V))},Pr=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Er=new RegExp("["+Pr.map(function(e){return e.letters}).join("")+"]","g"),Mr={},jr=0;jr<Pr.length;jr++)for(var Rr=Pr[jr],Vr=0;Vr<Rr.letters.length;Vr++)Mr[Rr.letters[Vr]]=Rr.base;var Fr=function(e){return e.replace(Er,function(e){return Mr[e]})},Tr=function(e,t){void 0===t&&(t=Or);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Fr),Lr=function(e){return e.replace(/^\s+|\s+$/g,"")},Nr=function(e){return"".concat(e.label," ").concat(e.value)},Dr=["innerRef"];function Ar(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=V(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=V(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(F(e,Dr),"onExited","in","enter","exit","appear");return Xt("input",L({ref:t},n,{css:Kt({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Hr=["boxSizing","height","overflow","paddingRight","position"],$r={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ur(e){e.cancelable&&e.preventDefault()}function _r(e){e.stopPropagation()}function Br(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zr(){return"ontouchstart"in window||navigator.maxTouchPoints}var Wr=!("undefined"==typeof window||!window.document||!window.document.createElement),qr=0,Gr={capture:!1,passive:!1};var Yr=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Xr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Kr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,l=s(!1),u=s(!1),c=s(0),d=s(null),f=r(function(e,t){if(null!==d.current){var r=d.current,s=r.scrollTop,c=r.scrollHeight,p=r.clientHeight,f=d.current,m=t>0,h=c-p-s,v=!1;h>t&&l.current&&(o&&o(e),l.current=!1),m&&u.current&&(a&&a(e),u.current=!1),m&&t>h?(n&&!l.current&&n(e),f.scrollTop=c,v=!0,l.current=!0):!m&&-t>s&&(i&&!u.current&&i(e),f.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,i,a]),m=r(function(e){f(e,e.deltaY)},[f]),h=r(function(e){c.current=e.changedTouches[0].clientY},[]),v=r(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),g=r(function(e){if(e){var t=!!Hn&&{passive:!1};e.addEventListener("wheel",m,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",v,t)}},[v,h,m]),b=r(function(e){e&&(e.removeEventListener("wheel",m,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",v,!1))},[v,h,m]);return p(function(){if(t){var e=d.current;return g(e),function(){b(e)}}},[t,g,b]),function(e){d.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=s({}),a=s(null),l=r(function(e){if(Wr){var t=document.body,n=t&&t.style;if(o&&Hr.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&qr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys($r).forEach(function(e){var t=$r[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&zr()&&(t.addEventListener("touchmove",Ur,Gr),e&&(e.addEventListener("touchstart",Br,Gr),e.addEventListener("touchmove",_r,Gr))),qr+=1}},[o]),u=r(function(e){if(Wr){var t=document.body,n=t&&t.style;qr=Math.max(qr-1,0),o&&qr<1&&Hr.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&zr()&&(t.removeEventListener("touchmove",Ur,Gr),e&&(e.removeEventListener("touchstart",Br,Gr),e.removeEventListener("touchmove",_r,Gr)))}},[o]);return p(function(){if(t){var e=a.current;return l(e),function(){u(e)}}},[t,l,u]),function(e){a.current=e}}({isEnabled:n});return Xt(d,null,n&&Xt("div",{onClick:Yr,css:Xr}),t(function(e){i(e),a(e)}))}var Jr={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Zr=function(e){var t=e.name,n=e.onFocus;return Xt("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Jr,value:"",onChange:function(){}})};function Qr(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function eo(){return Qr(/^Mac/i)}function to(){return Qr(/^iPhone/i)||Qr(/^iPad/i)||eo()&&navigator.maxTouchPoints>1}var no,ro={clearIndicator:sr,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return M({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ar,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return M({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return M({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return M(M({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},hr),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return M({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Zn,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return M((P(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),P(n,"position","absolute"),P(n,"width","100%"),P(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return M({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return M({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return M({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return M({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Jn,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return M({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return M({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return M({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return M({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},oo={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},io={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Ln(),captureMenuScroll:!Ln(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=M({ignoreCase:!0,ignoreAccents:!0,stringify:Nr,trim:!0,matchFrom:"any"},no),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Lr(t):t,u=a?Lr(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Tr(l),u=Fr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ao(e,t,n,r){return{type:"option",data:t,isDisabled:ho(e,t,n),isSelected:vo(e,t,n),label:fo(e,t),value:mo(e,t),index:r}}function so(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return ao(e,n,t,r)}).filter(function(t){return co(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=ao(e,n,t,r);return co(e,i)?i:void 0}).filter($n)}function lo(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,U(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function uo(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,U(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function co(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!bo(e)||!i)&&go(e,{label:a,value:s,data:o},r)}var po=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},fo=function(e,t){return e.getOptionLabel(t)},mo=function(e,t){return e.getOptionValue(t)};function ho(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function vo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=mo(e,t);return n.some(function(t){return mo(e,t)===r})}function go(e,t,n){return!e.filterOption||e.filterOption(t,n)}var bo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},yo=1,xo=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(n,c);var t=function(e){var t=H();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(U(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=Un(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Un(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=Un(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return po(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return uo(so(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return kn.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return fo(r.props,e)},r.getOptionValue=function(e){return mo(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=ro[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,M(M({},yr),e.components);var e},r.buildCategorizedOptions=function(){return so(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return lo(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:M({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&jn(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return bo(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!m||p&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++yo),r.state.selectValue=Pn(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=po(o,i[a])}return r}return function(e,t,n){t&&N(e.prototype,t),n&&N(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Tn(this.menuListRef,this.focusedOptionRef),(eo()||to())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Tn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(oo):M(M({},oo),this.props.theme):oo}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ho(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return vo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return go(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,u=t.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,m=this.commonProps,h=o||this.getElementId("input"),v=M(M(M({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(c,L({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):e.createElement(Ar,L({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Cn,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return m?null:e.createElement(l,L({},u,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map(function(n,s){var l=n===b,c="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,L({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:c,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))});if(m)return null;var x=g[0];return e.createElement(s,L({},u,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,L({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,L({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,L({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,L({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,h=f.inputValue,v=f.isLoading,g=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,x=f.menuIsOpen,w=f.menuPlacement,O=f.menuPosition,S=f.menuPortalTarget,C=f.menuShouldBlockScroll,I=f.menuShouldScrollIntoView,k=f.noOptionsMessage,P=f.onMenuScrollToTop,E=f.onMenuScrollToBottom;if(!x)return null;var M,j=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,f=p===i,m=a?void 0:function(){return t.onOptionHover(i)},h=a?void 0:function(){return t.selectOption(i)},v="".concat(t.getElementId("option"),"-").concat(r),g={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":t.state.isAppleDevice?void 0:s};return e.createElement(c,L({},d,{innerProps:g,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:o,value:u,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.createElement(r,L({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return j(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return j(n,"".concat(n.index))});else if(v){var R=g({inputValue:h});if(null===R)return null;M=e.createElement(l,d,R)}else{var V=k({inputValue:h});if(null===V)return null;M=e.createElement(u,d,V)}var F={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:I},T=e.createElement(Yn,L({},d,F),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,L({},d,F,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:v,placement:s}),e.createElement(Kr,{captureEnabled:m,onTopArrive:P,onBottomArrive:E,lockEnabled:C},function(n){return e.createElement(a,L({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),M)}))});return S||"fixed"===O?e.createElement(s,L({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),T):T}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(Zr,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var u=l.map(function(e){return t.getOptionValue(e)}).join(r);return e.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map(function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(kr,L({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(o,L({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),e.createElement(n,L({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),e.createElement(i,L({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,L({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=Pn(c),h={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return lo(so(e,t))}(e,m):[],g=d?uo(so(e,m),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);h={selectValue:m,focusedOption:y,focusedOptionId:po(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,O=a&&s;return a&&!O&&(w={value:Un(f,m,m[0]||null),options:m,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),M(M(M({},h),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:O})}}]),n}();xo.defaultProps=io;var wo=o(function(t,o){var i=function(e){var t=e.defaultInputValue,o=void 0===t?"":t,i=e.defaultMenuIsOpen,a=void 0!==i&&i,s=e.defaultValue,l=void 0===s?null:s,u=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,h=e.value,v=F(e,T),g=V(n(void 0!==u?u:o),2),b=g[0],y=g[1],x=V(n(void 0!==c?c:a),2),w=x[0],O=x[1],S=V(n(void 0!==h?h:l),2),C=S[0],I=S[1],k=r(function(e,t){"function"==typeof d&&d(e,t),I(e)},[d]),P=r(function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)},[p]),E=r(function(){"function"==typeof m&&m(),O(!0)},[m]),j=r(function(){"function"==typeof f&&f(),O(!1)},[f]),R=void 0!==u?u:b,L=void 0!==c?c:w,N=void 0!==h?h:C;return M(M({},v),{},{inputValue:R,menuIsOpen:L,onChange:k,onInputChange:P,onMenuClose:j,onMenuOpen:E,value:N})}(t);return e.createElement(xo,L({ref:o},i))}),Oo=wo;const So=({logoUrl:e,alt:t})=>x.jsx("img",{src:e,alt:t,className:"w-8 h-8 flex-shrink-0 object-contain",onError:e=>{const n=e.target;n.style.display="none";const r=document.createElement("div");r.className="w-8 h-8 rounded-full flex items-center justify-center font-bold text-xs flex-shrink-0 bg-gray-200",r.textContent=t.substring(0,2).toUpperCase(),n.parentNode?.appendChild(r)}}),Co=[{value:"mtn",label:"MTN",logoUrl:"https://payments-web.anmgw.com/assets/images/mtn.svg"},{value:"vodafone",label:"Telecel",logoUrl:"https://payments-web.anmgw.com/assets/images/telecel.svg"},{value:"airteltigo",label:"AirtelTigo",logoUrl:"https://payments-web.anmgw.com/assets/images/at.svg"}],Io=e=>{const{innerProps:t,...n}=e,r={...t,style:{...t?.style||{},display:"flex",alignItems:"center",gap:"0.75rem"}};return x.jsxs(yr.Option,{...n,innerProps:r,children:[x.jsx(So,{logoUrl:e.data.logoUrl,alt:e.data.label}),x.jsx("span",{className:"font-medium",children:e.data.label})]})},ko=e=>x.jsx(yr.SingleValue,{...e,children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(So,{logoUrl:e.data.logoUrl,alt:e.data.label}),x.jsx("span",{className:"font-medium",children:e.data.label})]})}),Po=({selectedNetwork:e,onSelect:n,disabled:r=!1,primaryColor:o})=>{const i=o||"#3B82F6",a=Co.find(t=>t.value===e),s=t.useMemo(()=>"undefined"!=typeof window&&void 0!==window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]),l="undefined"==typeof document||s?void 0:document.body,u={control:(t,n)=>({...t,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',minHeight:"48px",borderWidth:"2px",borderColor:n.isFocused||e?i:"#D1D5DB",boxShadow:n.isFocused?`0 0 0 3px ${i}33`:"none",outline:"none","&:hover":{borderColor:n.isFocused||e?i:"#9CA3AF"},opacity:r?.5:1,cursor:r?"not-allowed":"pointer",backgroundColor:r?"#F9FAFB":"white"}),menu:e=>({...e,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",border:`1px solid ${i}33`,zIndex:9999,position:"absolute"}),menuList:e=>({...e,padding:"4px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden"}),menuPortal:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,display:"flex",alignItems:"center",gap:"0.75rem",fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',backgroundColor:t.isSelected?i:t.isFocused?`${i}20`:"white",color:t.isSelected?"white":"#111827",cursor:"pointer","&:active":{backgroundColor:t.isSelected?i:`${i}40`}}),placeholder:e=>({...e,fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#9CA3AF"}),singleValue:e=>({...e,display:"flex",alignItems:"center",gap:"0.75rem",fontFamily:'"Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#111827"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:"#6B7280","&:hover":{color:"#111827"}})},c=t.useMemo(()=>`network-selector-${Math.random().toString(36).substr(2,9)}`,[]);return x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`\n #${c} .react-select__control--is-focused {\n border-color: ${i} !important;\n box-shadow: 0 0 0 3px ${i}33 !important;\n }\n #${c} .react-select__control:hover:not(.react-select__control--is-disabled) {\n border-color: ${e?i:"#9CA3AF"} !important;\n }\n `}),x.jsxs("div",{id:c,className:"w-full",children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select Network"}),x.jsx(Oo,{value:a||null,onChange:e=>{e&&n(e.value)},options:Co,isDisabled:r,placeholder:"-- Select Network --",components:{Option:Io,SingleValue:ko},styles:u,isSearchable:!1,menuPortalTarget:l,menuPosition:"fixed",className:"react-select-container",classNamePrefix:"react-select"})]})]})},Eo=({length:e=4,onComplete:t,onResend:r,disabled:o=!1,loading:i=!1,error:a,primaryColor:s="#3B82F6"})=>{const[l,u]=n(new Array(e).fill("")),[c,d]=n(0);p(()=>{let e;return c>0&&(e=setTimeout(()=>d(c-1),1e3)),()=>clearTimeout(e)},[c]);const f=n=>{if(o||i)return;n.preventDefault();const r=n.clipboardData.getData("text/plain").replace(/\D/g,"");if(r.length===e){const n=r.split("");u(n),t(r);const o=document.getElementById("otp-input-"+(e-1));o?.focus()}};return x.jsxs("div",{className:"w-full",children:[x.jsx("div",{className:"flex justify-center gap-2 mb-4",children:l.map((n,r)=>x.jsx("input",{id:`otp-input-${r}`,type:"text",inputMode:"numeric",maxLength:1,value:n,onChange:n=>((n,r)=>{if(o||i)return;if(!/^\d*$/.test(r))return;const a=[...l];if(a[n]=r,u(a),r&&n<e-1){const e=document.getElementById(`otp-input-${n+1}`);e?.focus()}const s=a.join("");s.length===e&&t(s)})(r,n.target.value),onKeyDown:t=>((t,n)=>{if(!o&&!i){if("Backspace"===n.key)if(l[t]){const e=[...l];e[t]="",u(e)}else if(t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowLeft"===n.key&&t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowRight"===n.key&&t<e-1){const e=document.getElementById(`otp-input-${t+1}`);e?.focus()}}})(r,t),onPaste:f,disabled:o||i,className:`w-12 h-12 md:w-14 md:h-14 text-center text-lg md:text-xl font-semibold border-2 rounded-lg text-gray-900 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent ${a?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o||i?"opacity-50 cursor-not-allowed":""}`},r))}),a&&x.jsx("p",{className:"text-red-500 text-sm text-center mb-4",children:a}),x.jsx("div",{className:"text-center",children:x.jsx("button",{type:"button",onClick:()=>{c>0||o||i||(r(),d(60))},disabled:c>0||o||i,className:"text-sm "+(c>0||o||i?"opacity-50 cursor-not-allowed":""),style:{color:s},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.8")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:c>0?`Resend OTP in ${c}s`:"Resend OTP"})})]})},Mo=({paymentId:e,showTimeoutWarning:t=!1})=>x.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[x.jsx("div",{className:"relative w-16 h-16 mb-4",children:x.jsx("div",{className:"absolute inset-0 border-4 border-blue-200 border-t-blue-500 rounded-full animate-spin"})}),x.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Processing Payment"}),x.jsx("div",{className:"rounded-lg p-3 mb-4 max-w-sm border border-blue-200 bg-blue-50",children:x.jsxs("p",{className:"text-sm text-center font-medium text-blue-600",children:["Please wait for a prompt or go to ",x.jsx("strong",{children:"my approvals"})," to complete the transaction"]})}),t&&x.jsx("p",{className:"text-xs text-amber-600 text-center mt-2",children:"This is taking longer than usual. You'll be notified when it completes."}),x.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Payment ID: ",e]})]}),jo=({success:e,payment:t,redirectUrl:r,onRedirect:o})=>{const[i,a]=n(r?5:0);return p(()=>{if(r&&i>0){const e=setTimeout(()=>{a(i-1)},1e3);return()=>clearTimeout(e)}if(r&&0===i){const e=setTimeout(()=>{o()},100);return()=>clearTimeout(e)}},[i,r,o]),x.jsx("div",{className:"flex flex-col items-center justify-center py-8",children:e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:x.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),x.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Successful!"}),t&&x.jsxs("p",{className:"text-gray-600 text-sm mb-2",children:["Amount: ",t.currency," ","number"==typeof t.amount?t.amount.toFixed(2):"string"==typeof t.amount?Number.parseFloat(t.amount).toFixed(2):t.amount]}),r?x.jsx("p",{className:"text-gray-500 text-xs mb-4",children:i>0?`Redirecting in ${i} seconds...`:"Redirecting..."}):x.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:"Close"})]}):x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:x.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),x.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Failed"}),x.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Your payment could not be processed. Please try again."}),r?x.jsx("p",{className:"text-gray-500 text-xs mb-4",children:i>0?`Redirecting in ${i} seconds...`:"Redirecting..."}):x.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:"Close"})]})})},Ro=({paymentId:e,redirectUrl:t,onRedirect:r,onContinueWaiting:o})=>{const[i,a]=n(5);return p(()=>{if(!t)return;const e=setInterval(()=>{a(t=>t<=1?(clearInterval(e),r(),0):t-1)},1e3);return()=>clearInterval(e)},[t,r]),x.jsxs("div",{className:"mt-6 p-4 rounded-lg border border-blue-200 bg-blue-50",children:[x.jsx("h4",{className:"text-sm font-semibold mb-2 text-blue-700",children:"Payment Still Processing"}),x.jsx("p",{className:"text-sm mb-4 text-blue-600",children:"Your payment is still being processed. You'll be notified via webhook when it completes."}),x.jsx("div",{className:"flex gap-3",children:t?x.jsxs(x.Fragment,{children:[x.jsxs("button",{onClick:r,className:"flex-1 py-2 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors",children:["Return Now ",i>0&&`(${i}s)`]}),x.jsx("button",{onClick:o,className:"flex-1 py-2 px-4 bg-white border border-blue-300 text-blue-700 rounded-lg text-sm font-medium transition-colors hover:bg-blue-50",children:"Continue Waiting"})]}):x.jsx("button",{onClick:o,className:"w-full py-2 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors",children:"Continue Waiting"})}),x.jsxs("p",{className:"text-xs mt-3 text-gray-500 text-center",children:["Payment ID: ",e]})]})},Vo=({config:e,isOpen:t,onClose:r})=>{const[o,i]=n("phone-input"),[a,s]=n(""),[l,u]=n(""),[c,d]=n(),[m,h]=n(""),[v,g]=n(null),[b,y]=n(null),[I,k]=n(!1),[P,E]=n(null),[M,j]=n(!1),[R,V]=n(!1),[F,T]=n(!1),[L,N]=n(0),D=new S({apiKey:e.apiKey,platformId:e.platformId,baseUrl:e.apiUrl});p(()=>{t&&e.platformId&&D.getPlatformInfo().then(e=>{if(e.logo_url){const t=new Image;t.onload=()=>{E(e.logo_url),j(!0)},t.onerror=()=>{j(!1)},t.src=e.logo_url}}).catch(e=>{console.debug("Failed to fetch platform logo:",e)})},[t,e.platformId,D]),p(()=>{const n=e.displayMode||"modal";if(t&&"modal"===n){const e=globalThis.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[t,e.displayMode]),p(()=>{t||(i("phone-input"),s(""),u(""),d(void 0),h(""),g(null),y(null),k(!1),E(null),j(!1),V(!1),T(!1),N(0))},[t]),p(()=>{if("verifying"===o&&m&&!R){let t=0;const n=15,r=7;V(!1),T(!1);const o=setInterval(async()=>{t++,t===r&&T(!0);try{const t=await D.getPaymentStatus(m);if(t.data){const n=t.data.status;"completed"===n?(g(t.data),clearInterval(o),T(!1),V(!1),e.onSuccess?.(t.data),i("success")):"failed"!==n&&"cancelled"!==n&&"expired"!==n||(clearInterval(o),T(!1),V(!1),e.onError?.({message:`Payment ${n}`}),i("failed"))}}catch(e){console.error("Error polling payment status:",e)}t>=n&&(clearInterval(o),V(!0),T(!1))},2e3);return()=>{clearInterval(o),T(!1)}}},[o,m,e,L,R]);const A=async()=>{if(l&&c){if(e.redirect_url&&!w(e.redirect_url))return y("Redirect URL must be a valid HTTPS URL"),void e.onError?.({message:"Redirect URL must be a valid HTTPS URL",code:"INVALID_REDIRECT_URL"});k(!0),y(null);try{const t=await D.createPayment({amount:e.amount,currency:e.currency||"GHS",payment_method:"mobile_money",phone_number:l,network:c,redirect_url:e.redirect_url,webhook_url:e.webhookUrl,order_id:e.orderId,metadata:e.metadata});if(!t.data?.payment_id)throw new Error("Failed to create payment");h(t.data.payment_id),t.data.otp_required?i("otp-input"):i("verifying")}catch(t){const n=t instanceof Error?t.message:"Failed to create payment";y(n),e.onError?.({message:n})}finally{k(!1)}}else y("Please enter phone number and select network")},H=async t=>{if(m&&l){k(!0),y(null);try{if(!(await D.verifyOTP(m,{phone_number:l,otp_code:t})).data)throw new Error("Failed to verify OTP");i("verifying")}catch(t){const n=t instanceof Error?t.message:"Invalid OTP code";y(n),e.onError?.({message:n})}finally{k(!1)}}else y("Missing required data")},$=async()=>{if(m){k(!0),y(null);try{await D.resendOTP(m,{phone_number:l})}catch(e){const t=e instanceof Error?e.message:"Failed to resend OTP";y(t)}finally{k(!1)}}},U=()=>{if(m&&e.redirect_url){const t=O(e.redirect_url,m,"cancelled");return void(globalThis.location.href=t)}r&&r()},_=e.displayMode||"modal",B=e.primaryColor||"#3B82F6",z={"--payloqa-primary":B},W=P||e.logoUrl;if(p(()=>{if(e.logoUrl&&!P&&""!==e.logoUrl.trim()){const t=new Image;t.onload=()=>j(!0),t.onerror=()=>j(!1),t.src=e.logoUrl}},[e.logoUrl,P]),p(()=>{if(!t)return;const e=e=>(e.preventDefault(),!1),n=e=>{if("F12"===e.key||e.ctrlKey&&e.shiftKey&&("I"===e.key||"J"===e.key||"C"===e.key)||e.ctrlKey&&("U"===e.key||"S"===e.key))return e.preventDefault(),!1};return document.addEventListener("contextmenu",e),document.addEventListener("keydown",n),()=>{document.removeEventListener("contextmenu",e),document.removeEventListener("keydown",n)}},[t]),!t)return null;const q=()=>x.jsxs(x.Fragment,{children:["fullpage"!==_&&x.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[W&&x.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:M||W===e.logoUrl&&!P?x.jsx("img",{src:W,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):x.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),x.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&x.jsx("button",{onClick:U,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:x.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x.jsxs("div",{className:"p-6",children:["phone-input"===o&&x.jsxs("div",{className:"space-y-4",children:[x.jsx(Po,{selectedNetwork:c,onSelect:d,disabled:I,primaryColor:B}),x.jsx(C,{value:a,onChange:s,onValid:u,disabled:I,error:b||void 0,primaryColor:B}),b&&x.jsx("p",{className:"text-red-500 text-sm",children:b}),x.jsx("button",{onClick:A,disabled:!l||!c||I,className:"w-full py-3 px-4 bg-[var(--payloqa-primary)] hover:brightness-90 text-white rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:I?"Processing...":"Continue"})]}),"otp-input"===o&&x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{children:[x.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Enter OTP"}),x.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["We've sent a 4-digit code to ",l]})]}),x.jsx(Eo,{length:4,onComplete:H,onResend:$,disabled:I,loading:I,error:b||void 0,primaryColor:B})]}),"verifying"===o&&x.jsxs(x.Fragment,{children:[x.jsx(Mo,{paymentId:m,showTimeoutWarning:F}),R&&x.jsx(Ro,{paymentId:m,redirectUrl:e.redirect_url,onRedirect:()=>{if(e.redirect_url){const t=O(e.redirect_url,m,"pending");globalThis.location.href=t}},onContinueWaiting:()=>{V(!1),T(!1),N(e=>e+1)}})]}),("success"===o||"failed"===o)&&x.jsx(jo,{success:"success"===o,payment:v||void 0,redirectUrl:e.redirect_url,onRedirect:()=>((t,n)=>{if(e.redirect_url&&m){const r=O(e.redirect_url,m,t,n);return void(globalThis.location.href=r)}r&&r()})("success"===o?"completed":"failed"===o?"failed":"cancelled",v||void 0)})]})]});if("inline"===_)return x.jsx("div",{className:"payloqa-payment-widget isolate",style:z,children:x.jsx("div",{className:"payment-widget-modal font-poppins w-full max-w-md mx-auto bg-white rounded-lg shadow-lg border border-gray-200",children:q()})});if("fullpage"===_){const t=x.jsx("div",{className:"payloqa-payment-widget isolate fixed inset-0 z-[9999]",style:z,children:x.jsx("div",{className:"fixed inset-0 bg-white overflow-y-auto",children:x.jsxs("div",{className:"min-h-screen flex flex-col",children:[x.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-gray-50",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[W&&x.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:M||W===e.logoUrl&&!P?x.jsx("img",{src:W,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):x.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),x.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&x.jsx("button",{onClick:U,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:x.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x.jsx("div",{className:"flex-1 flex items-center justify-center p-4 font-poppins",children:x.jsx("div",{className:"w-full max-w-md",children:x.jsx("div",{className:"payment-widget-modal bg-white rounded-lg shadow-lg border border-gray-200",children:q()})})})]})})});return"undefined"==typeof document?t:f.createPortal(t,document.body)}const G=x.jsxs("div",{className:"payloqa-payment-widget isolate fixed inset-0 z-[9999]",style:z,children:[x.jsx("div",{className:"fixed inset-0 bg-black/50","aria-hidden":!0}),x.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4 pointer-events-none",children:x.jsx("div",{className:"payment-widget-modal font-poppins bg-white rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto pointer-events-auto relative z-10",role:"dialog","aria-modal":"true",children:q()})})]});return"undefined"==typeof document?G:f.createPortal(G,document.body)};export{S as PaymentService,Vo as PaymentWidget};
|
|
2
2
|
//# sourceMappingURL=payment-widget.esm.js.map
|