/*! For license information please see admin-react.js.LICENSE.txt */ (()=>{var e,t,n,r={20(e,t,n){"use strict";var r=n(540),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,a={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:a,_owner:l.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},115(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;function a(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){var l,s,u,c=t(e),f=t(i);if(c&&f){if((s=e.length)!=i.length)return!1;for(l=s;0!==l--;)if(!a(e[l],i[l]))return!1;return!0}if(c!=f)return!1;var d=e instanceof Date,p=i instanceof Date;if(d!=p)return!1;if(d&&p)return e.getTime()==i.getTime();var h=e instanceof RegExp,m=i instanceof RegExp;if(h!=m)return!1;if(h&&m)return e.toString()==i.toString();var v=n(e);if((s=v.length)!==n(i).length)return!1;for(l=s;0!==l--;)if(!r.call(i,v[l]))return!1;if(o&&e instanceof Element&&i instanceof Element)return e===i;for(l=s;0!==l--;)if(!("_owner"===(u=v[l])&&e.$$typeof||a(e[u],i[u])))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return a(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},146(e,t,n){"use strict";var r=n(363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=c(n);f&&(i=i.concat(f(n)));for(var l=s(t),m=s(n),v=0;v3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(f(t={},r,function(){return this}),t),p=u.prototype=l.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,f(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=u,f(p,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,o,"GeneratorFunction"),f(p),f(p,o,"Generator"),f(p,r,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:a,m:h}})()}function f(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}f=function(e,t,n,r){function a(t,n){f(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},f(e,t,n,r)}function d(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){d(a,r,o,i,l,"next",e)}function l(e){d(a,r,o,i,l,"throw",e)}i(void 0)})}}var h=function(){return document.getElementById("notifier-admin-root")},m="notifier:session-expired",v=function(){var e=p(c().m(function e(){var t,n,r,o;return c().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=window.ajaxurl||"/wp-admin/admin-ajax.php",e.p=1,e.n=2,fetch("".concat(t,"?action=rest-nonce"),{credentials:"same-origin"});case 2:return n=e.v,e.n=3,n.text();case 3:if(r=e.v.trim(),!n.ok||!/^[a-f0-9]{10}$/i.test(r)){e.n=4;break}return(o=h())&&(o.dataset.restNonce=r),e.a(2,r);case 4:e.n=6;break;case 5:e.p=5,e.v;case 6:return e.a(2,null)}},e,null,[[1,5]])}));return function(){return e.apply(this,arguments)}}(),b=function(){var e=p(c().m(function e(t){var n;return c().w(function(e){for(;;)switch(e.p=e.n){case 0:if(403===t.status){e.n=1;break}return e.a(2,!1);case 1:return e.p=1,e.n=2,t.clone().json();case 2:return n=e.v,e.a(2,"rest_cookie_invalid_nonce"===(null==n?void 0:n.code));case 3:return e.p=3,e.v,e.a(2,!1)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=p(c().m(function e(t){var n,r,o,a,i,l,u,f,d,p,y=arguments;return c().w(function(e){for(;;)switch(e.n){case 0:return o=y.length>1&&void 0!==y[1]?y[1]:{},a=h(),i=(null==a||null===(n=a.dataset)||void 0===n?void 0:n.restUrl)||"/wp-json/notifier/v1/",l=t.startsWith("http")?t:i+t.replace(/^\//,""),u=o.body instanceof FormData,f=function(e){var t={"X-WP-Nonce":e};return u||(t["Content-Type"]="application/json"),s(s({},o),{},{headers:s(s({},t),o.headers)})},e.n=1,fetch(l,f((null==a||null===(r=a.dataset)||void 0===r?void 0:r.restNonce)||""));case 1:return d=e.v,e.n=2,b(d);case 2:if(!e.v){e.n=6;break}return e.n=3,v();case 3:if(!(p=e.v)){e.n=5;break}return e.n=4,fetch(l,f(p));case 4:d=e.v,e.n=6;break;case 5:window.dispatchEvent(new CustomEvent(m));case 6:return e.a(2,d)}},e)}));return function(t){return e.apply(this,arguments)}}(),g=n(848);function w(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(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.")}()}function x(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&void 0!==arguments[2]?arguments[2]:5e3,r=++j;return a(function(n){return[].concat(w(n),[{id:r,type:e,message:t}])}),n&&setTimeout(function(){a(function(e){return e.filter(function(e){return e.id!==r})})},n),r},[]);(0,r.useEffect)(function(){var e=function(){i.current||(i.current=!0,l("error","Your session has expired. Please reload the page and log in again.",0))};return window.addEventListener(m,e),function(){return window.removeEventListener(m,e)}},[l]);var s=(0,r.useCallback)(function(e){a(function(t){return t.filter(function(t){return t.id!==e})})},[]);return(0,g.jsx)(_.Provider,{value:{notices:o,addNotice:l,removeNotice:s},children:t})},E=function(){var e=(0,r.useContext)(_);if(!e)throw new Error("useNotices must be used within NoticeProvider");return e},C={success:"alert-success",error:"alert-danger",warning:"alert-warning",info:"alert-info"},N=function(){var e=E(),t=e.notices,n=e.removeNotice;return t.length?(0,g.jsx)("div",{className:"notifier-notices",children:t.map(function(e){return(0,g.jsxs)("div",{className:"alert ".concat(C[e.type]||"alert-info"," alert-dismissible fade show mb-0"),role:"alert",children:[e.message,(0,g.jsx)("button",{type:"button",className:"btn-close",onClick:function(){return n(e.id)},"aria-label":"Close"})]},e.id)})}):null};const T=function(e){var t,n=e.rootEl,r=function(){var e,t=h();return(null==t||null===(e=t.dataset)||void 0===e?void 0:e.pluginUrl)||""}(),o=(null==n||null===(t=n.dataset)||void 0===t?void 0:t.pluginVersion)||"";return(0,g.jsx)("div",{id:"notifier-admin-header",children:(0,g.jsxs)("div",{className:"notifier-admin-header-content",children:[(0,g.jsx)("div",{className:"header-page-title",children:(0,g.jsx)("a",{className:"header-logo",href:"admin.php?page=notifier",children:(0,g.jsx)("img",{src:"".concat(r,"assets/images/logo.svg"),alt:"WANotifier"})})}),(0,g.jsxs)("div",{className:"header-action-links",children:[(0,g.jsxs)("span",{className:"review-us-link",children:["Review us:"," ",(0,g.jsx)("a",{href:"https://wordpress.org/support/plugin/notifier/reviews/#new-post",target:"_blank",children:"⭐⭐⭐⭐⭐"})]}),o&&(0,g.jsxs)("span",{className:"header-version",children:["Version: ",o]}),(0,g.jsx)("a",{href:"https://wanotifier.com/support/",target:"_blank",children:"Help"})]})]})})};function P(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return F(u,"_invoke",function(n,r,o){var a,l,s,u=0,c=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,d.n=n,i}};function p(n,r){for(l=n,s=r,t=0;!f&&u&&!o&&t3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(F(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,F(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,F(f,"constructor",u),F(u,"constructor",s),s.displayName="GeneratorFunction",F(u,o,"GeneratorFunction"),F(f),F(f,o,"Generator"),F(f,r,function(){return this}),F(f,"toString",function(){return"[object Generator]"}),(P=function(){return{w:a,m:d}})()}function F(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}F=function(e,t,n,r){function a(t,n){F(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},F(e,t,n,r)}function A(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function I(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){A(a,r,o,i,l,"next",e)}function l(e){A(a,r,o,i,l,"throw",e)}i(void 0)})}}function M(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}(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 D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n-1};const ge=function(e,t){var n=this.__data__,r=he(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function we(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var It={};It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Arguments]"]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object Boolean]"]=It["[object DataView]"]=It["[object Date]"]=It["[object Error]"]=It["[object Function]"]=It["[object Map]"]=It["[object Number]"]=It["[object Object]"]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object WeakMap]"]=!1;const Mt=function(e){return ae(e)&&At(e.length)&&!!It[ne(e)]};const Dt=function(e){return function(t){return e(t)}};var Rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Rt&&"object"==typeof module&&module&&!module.nodeType&&module,zt=Lt&&Lt.exports===Rt&&B.process;const Vt=function(){try{var e=Lt&&Lt.require&&Lt.require("util").types;return e||zt&&zt.binding&&zt.binding("util")}catch(e){}}();var $t=Vt&&Vt.isTypedArray;const Ut=$t?Dt($t):Mt;var Ht=Object.prototype.hasOwnProperty;const Bt=function(e,t){var n=jt(e),r=!n&&_t(e),o=!n&&!r&&Tt(e),a=!n&&!r&&!o&&Ut(e),i=n||r||o||a,l=i?yt(e.length,String):[],s=l.length;for(var u in e)!t&&!Ht.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ft(u,s))||l.push(u);return l};var Wt=Object.prototype;const Gt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Wt)};const qt=re(Object.keys,Object);var Qt=Object.prototype.hasOwnProperty;const Yt=function(e){if(!Gt(e))return qt(e);var t=[];for(var n in Object(e))Qt.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Kt=function(e){return null!=e&&At(e.length)&&!Ee(e)};const Xt=function(e){return Kt(e)?Bt(e):Yt(e)};const Zt=function(e,t){return e&&bt(t,Xt(t),e)};const Jt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var en=Object.prototype.hasOwnProperty;const tn=function(e){if(!Oe(e))return Jt(e);var t=Gt(e),n=[];for(var r in e)("constructor"!=r||!t&&en.call(e,r))&&n.push(r);return n};const nn=function(e){return Kt(e)?Bt(e,!0):tn(e)};const rn=function(e,t){return e&&bt(t,nn(t),e)};var on="object"==typeof exports&&exports&&!exports.nodeType&&exports,an=on&&"object"==typeof module&&module&&!module.nodeType&&module,ln=an&&an.exports===on?G.Buffer:void 0,sn=ln?ln.allocUnsafe:void 0;const un=function(e,t){if(t)return e.slice();var n=e.length,r=sn?sn(n):new e.constructor(n);return e.copy(r),r};const cn=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0||(o[n]=e[n]);return o}function Dr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Rr=(0,r.createContext)(void 0);Rr.displayName="FormikContext";var Lr=Rr.Provider;Rr.Consumer;function zr(){var e=(0,r.useContext)(Rr);return e||br(!1),e}var Vr=function(e){return Array.isArray(e)&&0===e.length},$r=function(e){return"function"==typeof e},Ur=function(e){return null!==e&&"object"==typeof e},Hr=function(e){return String(Math.floor(Number(e)))===e},Br=function(e){return"[object String]"===Object.prototype.toString.call(e)},Wr=function(e){return 0===r.Children.count(e)},Gr=function(e){return Ur(e)&&$r(e.then)};function qr(e,t,n,r){void 0===r&&(r=0);for(var o=Fr(t);e&&r=0?[]:{}}}return(0===a?e:o)[i[a]]===n?e:(void 0===n?delete o[i[a]]:o[i[a]]=n,0===a&&void 0===n&&delete r[i[a]],r)}function Yr(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,a=Object.keys(e);o=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}var i=a;qr(t,i.path)||(t=Qr(t,i.path,i.message))}}return t}(n)):t(n)})})},[p.validationSchema]),O=(0,r.useCallback)(function(e,t){return new Promise(function(n){return n(g.current[e].validate(t))})},[]),E=(0,r.useCallback)(function(e){var t=Object.keys(g.current).filter(function(e){return $r(g.current[e].validate)}),n=t.length>0?t.map(function(t){return O(t,qr(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Qr(e,t[r],n)),e},{})})},[O]),C=(0,r.useCallback)(function(e){return Promise.all([E(e),p.validationSchema?j(e):{},p.validate?_(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return H.all([t,n,r],{arrayMerge:to})})},[p.validate,p.validationSchema,E,_,j]),N=ro(function(e){return void 0===e&&(e=S.values),k({type:"SET_ISVALIDATING",payload:!0}),C(e).then(function(e){return y.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:e})),e})});(0,r.useEffect)(function(){l&&!0===y.current&&vr()(h.current,p.initialValues)&&N(h.current)},[l,N]);var T=(0,r.useCallback)(function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:m.current?m.current:p.initialErrors||{},r=e&&e.touched?e.touched:v.current?v.current:p.initialTouched||{},o=e&&e.status?e.status:b.current?b.current:p.initialStatus;h.current=t,m.current=n,v.current=r,b.current=o;var a=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var i=p.onReset(S.values,K);Gr(i)?i.then(a):a()}else a()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,r.useEffect)(function(){!0!==y.current||vr()(h.current,p.initialValues)||c&&(h.current=p.initialValues,T(),l&&N(h.current))},[c,p.initialValues,T,l,N]),(0,r.useEffect)(function(){c&&!0===y.current&&!vr()(m.current,p.initialErrors)&&(m.current=p.initialErrors||Kr,k({type:"SET_ERRORS",payload:p.initialErrors||Kr}))},[c,p.initialErrors]),(0,r.useEffect)(function(){c&&!0===y.current&&!vr()(v.current,p.initialTouched)&&(v.current=p.initialTouched||Xr,k({type:"SET_TOUCHED",payload:p.initialTouched||Xr}))},[c,p.initialTouched]),(0,r.useEffect)(function(){c&&!0===y.current&&!vr()(b.current,p.initialStatus)&&(b.current=p.initialStatus,k({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var P=ro(function(e){if(g.current[e]&&$r(g.current[e].validate)){var t=qr(S.values,e),n=g.current[e].validate(t);return Gr(n)?(k({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),j(S.values,e).then(function(e){return e}).then(function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:qr(t,e)}}),k({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),F=(0,r.useCallback)(function(e,t){var n=t.validate;g.current[e]={validate:n}},[]),A=(0,r.useCallback)(function(e){delete g.current[e]},[]),I=ro(function(e,t){return k({type:"SET_TOUCHED",payload:e}),(void 0===t?a:t)?N(S.values):Promise.resolve()}),M=(0,r.useCallback)(function(e){k({type:"SET_ERRORS",payload:e})},[]),D=ro(function(e,t){var r=$r(e)?e(S.values):e;return k({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?N(r):Promise.resolve()}),R=(0,r.useCallback)(function(e,t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),L=ro(function(e,t,r){var o=$r(t)?t(qr(S.values,e)):t;return k({type:"SET_FIELD_VALUE",payload:{field:e,value:o}}),(void 0===r?n:r)?N(Qr(S.values,e,o)):Promise.resolve()}),z=(0,r.useCallback)(function(e,t){var n,r=t,o=e;if(!Br(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,i=a.type,l=a.name,s=a.id,u=a.value,c=a.checked,f=(a.outerHTML,a.options),d=a.multiple;r=t||(l||s),o=/number|range/.test(i)?(n=parseFloat(u),isNaN(n)?"":n):/checkbox/.test(i)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],o=!1,a=-1;if(Array.isArray(e))r=e,o=(a=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!o)return r.concat(n);if(!o)return r;return r.slice(0,a).concat(r.slice(a+1))}(qr(S.values,r),c,u):f&&d?function(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}(f):u}r&&L(r,o)},[L,S.values]),V=ro(function(e){if(Br(e))return function(t){return z(t,e)};z(e)}),$=ro(function(e,t,n){return void 0===t&&(t=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?a:n)?N(S.values):Promise.resolve()}),U=(0,r.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,a=(n.outerHTML,t||(r||o));$(a,!0)},[$]),B=ro(function(e){if(Br(e))return function(t){return U(t,e)};U(e)}),W=(0,r.useCallback)(function(e){$r(e)?k({type:"SET_FORMIK_STATE",payload:e}):k({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),G=(0,r.useCallback)(function(e){k({type:"SET_STATUS",payload:e})},[]),q=(0,r.useCallback)(function(e){k({type:"SET_ISSUBMITTING",payload:e})},[]),Q=ro(function(){return k({type:"SUBMIT_ATTEMPT"}),N().then(function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=X()))return}catch(e){throw e}return Promise.resolve(n).then(function(e){return y.current&&k({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(y.current)throw k({type:"SUBMIT_FAILURE"}),e})}if(y.current&&(k({type:"SUBMIT_FAILURE"}),t))throw e})}),Y=ro(function(e){e&&e.preventDefault&&$r(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&$r(e.stopPropagation)&&e.stopPropagation(),Q().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),K={resetForm:T,validateForm:N,validateField:P,setErrors:M,setFieldError:R,setFieldTouched:$,setFieldValue:L,setStatus:G,setSubmitting:q,setTouched:I,setValues:D,setFormikState:W,submitForm:Q},X=ro(function(){return f(S.values,K)}),Z=ro(function(e){e&&e.preventDefault&&$r(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&$r(e.stopPropagation)&&e.stopPropagation(),T()}),J=(0,r.useCallback)(function(e){return{value:qr(S.values,e),error:qr(S.errors,e),touched:!!qr(S.touched,e),initialValue:qr(h.current,e),initialTouched:!!qr(v.current,e),initialError:qr(m.current,e)}},[S.errors,S.touched,S.values]),ee=(0,r.useCallback)(function(e){return{setValue:function(t,n){return L(e,t,n)},setTouched:function(t,n){return $(e,t,n)},setError:function(t){return R(e,t)}}},[L,$,R]),te=(0,r.useCallback)(function(e){var t=Ur(e),n=t?e.name:e,r=qr(S.values,n),o={name:n,value:r,onChange:V,onBlur:B};if(t){var a=e.type,i=e.value,l=e.as,s=e.multiple;"checkbox"===a?void 0===i?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(i)),o.value=i):"radio"===a?(o.checked=r===i,o.value=i):"select"===l&&s&&(o.value=o.value||[],o.multiple=!0)}return o},[B,V,S.values]),ne=(0,r.useMemo)(function(){return!vr()(h.current,S.values)},[h.current,S.values]),re=(0,r.useMemo)(function(){return void 0!==s?ne?S.errors&&0===Object.keys(S.errors).length:!1!==s&&$r(s)?s(p):s:S.errors&&0===Object.keys(S.errors).length},[s,ne,S.errors,p]);return Ar({},S,{initialValues:h.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:B,handleChange:V,handleReset:Z,handleSubmit:Y,resetForm:T,setErrors:M,setFormikState:W,setFieldTouched:$,setFieldValue:L,setFieldError:R,setStatus:G,setSubmitting:q,setTouched:I,setValues:D,submitForm:Q,validateForm:N,validateField:P,isValid:re,dirty:ne,unregisterField:A,registerField:F,getFieldProps:te,getFieldMeta:J,getFieldHelpers:ee,validateOnBlur:a,validateOnChange:n,validateOnMount:l})}function Jr(e){var t=Zr(e),n=e.component,o=e.children,a=e.render,i=e.innerRef;return(0,r.useImperativeHandle)(i,function(){return t}),(0,r.createElement)(Lr,{value:t},n?(0,r.createElement)(n,t):a?a(t):o?$r(o)?o(t):Wr(o)?null:r.Children.only(o):null)}function eo(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||fe(e)?eo(e):""!==e?e:void 0}):fe(e[r])?t[r]=eo(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function to(e,t,n){var r=e.slice();return t.forEach(function(t,o){if(void 0===r[o]){var a=!1!==n.clone&&n.isMergeableObject(t);r[o]=a?H(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=H(e[o],t,n):-1===e.indexOf(t)&&r.push(t)}),r}var no="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function ro(e){var t=(0,r.useRef)(e);return no(function(){t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;re?t:e},0);return Array.from(Ar({},e,{length:t+1}))}return[]},uo=function(e,t){var n="function"==typeof e?e:t;return function(e){if(Array.isArray(e)||Ur(e)){var t=so(e);return n(t)}return e}},co=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var o=n.props,a=o.name;(0,o.formik.setFormikState)(function(n){var o=uo(r,e),i=uo(t,e),l=Qr(n.values,a,e(qr(n.values,a))),s=r?o(qr(n.errors,a)):void 0,u=t?i(qr(n.touched,a)):void 0;return Vr(s)&&(s=void 0),Vr(u)&&(u=void 0),Ar({},n,{values:l,errors:r?Qr(n.errors,a,s):n.errors,touched:t?Qr(n.touched,a,u):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(so(t),[hr(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=so(e),o=r[t];return r[t]=r[n],r[n]=o,r}(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=so(e),o=r[t];return r.splice(t,1),r.splice(n,0,o),r}(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return lo(n,e,t)},function(t){return lo(t,e,null)},function(t){return lo(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=so(e);return r[t]=n,r}(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t=r.length,r},function(e){return e?[null].concat(e):[null]},function(e){return e?[null].concat(e):[null]}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Dr(n)),n.pop=n.pop.bind(Dr(n)),n}Ir(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vr()(qr(e.formik.values,e.name),qr(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?so(n):[];return t||(t=r[e]),$r(r.splice)&&r.splice(e,1),$r(r.every)&&r.every(function(e){return void 0===e})?[]:r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t.slice();return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,o=t.render,a=t.children,i=t.name,l=Ar({},e,{form:Mr(t.formik,["validate","validationSchema"]),name:i});return n?(0,r.createElement)(n,l):o?o(l):a?"function"==typeof a?a(l):Wr(a)?null:r.Children.only(a):null},t}(r.Component);co.defaultProps={validateOnChange:!0};function fo(e){return fo="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},fo(e)}function po(e){var t=function(e,t){if("object"!=fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fo(t)?t:t+""}function ho(e,t,n){return(t=po(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(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 vo(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?Ro(qo,--Wo):0,Ho--,10===Go&&(Ho=1,Uo--),Go}function Xo(){return Go=Wo2||ta(Go)>3?"":" "}function ia(e,t){for(;--t&&Xo()&&!(Go<48||Go>102||Go>57&&Go<65||Go>70&&Go<97););return ea(e,Jo()+(t<6&&32==Zo()&&32==Xo()))}function la(e){for(;Xo();)switch(Go){case e:return Wo;case 34:case 39:34!==e&&39!==e&&la(Go);break;case 40:41===e&&la(e);break;case 92:Xo()}return Wo}function sa(e,t){for(;Xo()&&e+Go!==57&&(e+Go!==84||47!==Zo()););return"/*"+ea(t,Wo-1)+"*"+Fo(47===e?e:Xo())}function ua(e){for(;!ta(Zo());)Xo();return ea(e,Wo)}var ca="-ms-",fa="-moz-",da="-webkit-",pa="comm",ha="rule",ma="decl",va="@keyframes";function ba(e,t){for(var n="",r=Vo(e),o=0;o0&&zo(k)-f&&$o(p>32?ka(k+";",r,n,f-1):ka(Mo(k," ","")+";",r,n,f-2),s);break;case 59:k+=";";default:if($o(S=xa(k,t,n,u,c,o,l,g,w=[],x=[],f),a),123===y)if(0===c)wa(k,t,S,S,w,a,f,l,x);else switch(99===d&&110===Ro(k,3)?100:d){case 100:case 108:case 109:case 115:wa(e,S,S,r&&$o(xa(e,S,S,0,0,o,l,g,o,w=[],f),x),o,x,f,l,r?w:x);break;default:wa(k,S,S,S,[""],x,0,l,x)}}u=c=p=0,m=b=1,g=k="",f=i;break;case 58:f=1+zo(k),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==Ko())continue;switch(k+=Fo(y),y*m){case 38:b=c>0?1:(k+="\f",-1);break;case 44:l[u++]=(zo(k)-1)*b,b=1;break;case 64:45===Zo()&&(k+=oa(Xo())),d=Zo(),c=f=zo(g=k+=ua(Jo())),y++;break;case 45:45===h&&2==zo(k)&&(m=0)}}return a}function xa(e,t,n,r,o,a,i,l,s,u,c){for(var f=o-1,d=0===o?a:[""],p=Vo(d),h=0,m=0,v=0;h0?d[b]+" "+y:Mo(y,/&\f/g,d[b])))&&(s[v++]=g);return Qo(e,t,n,0===o?ha:l,s,u,c)}function Sa(e,t,n){return Qo(e,t,n,pa,Fo(Go),Lo(e,2,-2),0)}function ka(e,t,n,r){return Qo(e,t,n,ma,Lo(e,0,r),Lo(e,r+1,-1),r)}var _a=function(e,t,n){for(var r=0,o=0;r=o,o=Zo(),38===r&&12===o&&(t[n]=1),!ta(o);)Xo();return ea(e,Wo)},ja=function(e,t){return ra(function(e,t){var n=-1,r=44;do{switch(ta(r)){case 0:38===r&&12===Zo()&&(t[n]=1),e[n]+=_a(Wo-1,t,n);break;case 2:e[n]+=oa(r);break;case 4:if(44===r){e[++n]=58===Zo()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Fo(r)}}while(r=Xo());return e}(na(e),t))},Oa=new WeakMap,Ea=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)||Oa.get(n))&&!r){Oa.set(e,!0);for(var o=[],a=ja(t,o),i=n.props,l=0,s=0;l6)switch(Ro(e,t+1)){case 109:if(45!==Ro(e,t+4))break;case 102:return Mo(e,/(.+:)(.+)-([^]+)/,"$1"+da+"$2-$3$1"+fa+(108==Ro(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Do(e,"stretch")?Na(Mo(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ro(e,t+1))break;case 6444:switch(Ro(e,zo(e)-3-(~Do(e,"!important")&&10))){case 107:return Mo(e,":",":"+da)+e;case 101:return Mo(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+da+(45===Ro(e,14)?"inline-":"")+"box$3$1"+da+"$2$3$1"+ca+"$2box$3")+e}break;case 5936:switch(Ro(e,t+11)){case 114:return da+e+ca+Mo(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return da+e+ca+Mo(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return da+e+ca+Mo(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return da+e+ca+e+e}return e}var Ta=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ma:e.return=Na(e.value,e.length);break;case va:return ba([Yo(e,{value:Mo(e.value,"@","@"+da)})],r);case ha: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 ba([Yo(e,{props:[Mo(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ba([Yo(e,{props:[Mo(t,/:(plac\w+)/,":"+da+"input-$1")]}),Yo(e,{props:[Mo(t,/:(plac\w+)/,":-moz-$1")]}),Yo(e,{props:[Mo(t,/:(plac\w+)/,ca+"input-$1")]})],r)}return""})}}],Pa=function(e){var t=e.key;if("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,a=e.stylisPlugins||Ta,i={},l=[];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=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)+s;return{name:u,styles:o,next:Ua}}var Wa=!!o.useInsertionEffect&&o.useInsertionEffect,Ga=Wa||function(e){return e()},qa=(Wa||r.useLayoutEffect,r.createContext("undefined"!=typeof HTMLElement?Pa({key:"css"}):null)),Qa=(qa.Provider,function(e){return(0,r.forwardRef)(function(t,n){var o=(0,r.useContext)(qa);return e(t,o,n)})}),Ya=r.createContext({});var Ka={}.hasOwnProperty,Xa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Za=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Fa(t,n,r),Ga(function(){return function(e,t,n){Fa(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},Ja=Qa(function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[Xa],i=[o],l="";"string"==typeof e.className?l=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,i,e.className):null!=e.className&&(l=e.className+" ");var s=Ba(i,void 0,r.useContext(Ya));l+=t.key+"-"+s.name;var u={};for(var c in e)Ka.call(e,c)&&"css"!==c&&c!==Xa&&(u[c]=e[c]);return u.className=l,n&&(u.ref=n),r.createElement(r.Fragment,null,r.createElement(Za,{cache:t,serialized:s,isStringTag:"string"==typeof a}),r.createElement(a,u))}),ei=Ja,ti=function(e,t){var n=arguments;if(null==t||!Ka.call(t,"css"))return r.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=ei,a[1]=function(e,t){var n={};for(var r in t)Ka.call(t,r)&&(n[r]=t[r]);return n[Xa]=e,n}(e,t);for(var i=2;i({x:e,y:e});function ui(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}}function ci(){return"undefined"!=typeof window}function fi(e){return hi(e)?(e.nodeName||"").toLowerCase():"#document"}function di(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pi(e){var t;return null==(t=(hi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function hi(e){return!!ci()&&(e instanceof Node||e instanceof di(e).Node)}function mi(e){return!!ci()&&(e instanceof Element||e instanceof di(e).Element)}function vi(e){return!!ci()&&(e instanceof HTMLElement||e instanceof di(e).HTMLElement)}function bi(e){return!(!ci()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof di(e).ShadowRoot)}function yi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Si(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}let gi;function wi(){return null==gi&&(gi="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gi}function xi(e){return/^(html|body|#document)$/.test(fi(e))}function Si(e){return di(e).getComputedStyle(e)}function ki(e){if("html"===fi(e))return e;const t=e.assignedSlot||e.parentNode||bi(e)&&e.host||pi(e);return bi(t)?t.host:t}function _i(e){const t=ki(e);return xi(t)?(e.ownerDocument||e).body:vi(t)&&yi(t)?t:_i(t)}function ji(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=_i(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=di(o);if(a){const e=Oi(i);return t.concat(i,i.visualViewport||[],yi(o)?o:[],e&&n?ji(e):[])}return t.concat(o,ji(o,[],n))}function Oi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ei(e){const t=Si(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=vi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ii(n)!==a||ii(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Ci(e){return mi(e)?e:e.contextElement}function Ni(e){const t=Ci(e);if(!vi(t))return si(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ei(t);let i=(a?ii(n.width):n.width)/r,l=(a?ii(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Ti=si(0);function Pi(e){const t=di(e);return wi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ti}function Fi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Ci(e);let i=si(1);t&&(r?mi(r)&&(i=Ni(r)):i=Ni(e));const l=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===di(e)}(a,n,r)?Pi(a):si(0);let s=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a&&r){const e=di(a),t=mi(r)?di(r):r;let n=e,o=Oi(n);for(;o&&t!==n;){const e=Ni(o),t=o.getBoundingClientRect(),r=Si(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,f*=e.y,s+=a,u+=i,n=di(o),o=Oi(n)}}return ui({width:c,height:f,x:s,y:u})}function Ai(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ii(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=Ci(e),c=o||a?[...u?ji(u):[],...t?ji(t):[]]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const f=u&&l?function(e,t,n){let r,o=null;const a=pi(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function l(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),i();const u=e.getBoundingClientRect(),{left:c,top:f,width:d,height:p}=u;if(n||t(),!d||!p)return;const h={rootMargin:-li(f)+"px "+-li(a.clientWidth-(c+d))+"px "+-li(a.clientHeight-(f+p))+"px "+-li(c)+"px",threshold:ai(0,oi(1,s))||1};let m=!0;function v(t){const n=t[0].intersectionRatio;if(!Ai(u,e.getBoundingClientRect()))return l();if(n!==s){if(!m)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}m=!1}try{o=new IntersectionObserver(v,{...h,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(v,h)}o.observe(e)}const s=di(e),u=()=>l(n);return s.addEventListener("resize",u),l(!0),()=>{s.removeEventListener("resize",u),i()}}(u,n,a):null;let d,p=-1,h=null;i&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),u&&!s&&h.observe(u),t&&h.observe(t));let m=s?Fi(e):null;return s&&function t(){const r=Fi(e);m&&!Ai(m,r)&&n();m=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(d)}}var Mi=r.useLayoutEffect,Di=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ri=function(){};function Li(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function zi(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function Bi(e){return Hi(e)?window.pageYOffset:e.scrollTop}function Wi(e,t){Hi(e)?window.scrollTo(0,t):e.scrollTop=t}function Gi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ri,o=Bi(e),a=t-o,i=0;!function t(){var l,s=a*((l=(l=i+=10)/n-1)*l*l+1)+o;Wi(e,s),in.bottom?Wi(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(_>=h&&!i)return a&&Gi(s,j,E),{placement:"bottom",maxHeight:t};if(!i&&_>=r||i&&S>=r)return a&&Gi(s,j,E),{placement:"bottom",maxHeight:i?S-g:_-g};if("auto"===o||i){var C=t,N=i?x:k;return N>=r&&(C=Math.min(N-g-l,t)),{placement:"top",maxHeight:C}}if("bottom"===o)return a&&Wi(s,j),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(k>=h&&!i)return a&&Gi(s,O,E),{placement:"top",maxHeight:t};if(!i&&k>=r||i&&x>=r){var T=t;return(!i&&k>=r||i&&x>=r)&&(T=i?x-w:k-w),a&&Gi(s,O,E),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var ol,al=function(e){return"auto"===e?"bottom":e},il=(0,r.createContext)(null),ll=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,s=e.theme,u=((0,r.useContext)(il)||{}).setPortalPlacement,c=(0,r.useRef)(null),f=go((0,r.useState)(o),2),d=f[0],p=f[1],h=go((0,r.useState)(null),2),m=h[0],v=h[1],b=s.spacing.controlHeight;return Mi(function(){var e=c.current;if(e){var t="fixed"===i,r=rl({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:b});p(r.maxHeight),v(r.placement),null==u||u(r.placement)}},[o,a,i,l,n,u,b]),t({ref:c,placerProps:vo(vo({},e),{},{placement:m||al(a),maxHeight:d})})},sl=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return ti("div",ko({},Ui(e,"menu",{menu:!0}),{ref:n},r),t)},ul=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return vo({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},cl=ul,fl=ul,dl=["size"],pl=["innerProps","isRtl","size"];var hl,ml,vl={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},bl=function(e){var t=e.size,n=wo(e,dl);return ti("svg",ko({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:vl},n))},yl=function(e){return ti(bl,ko({size:20},e),ti("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"}))},gl=function(e){return ti(bl,ko({size:20},e),ti("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"}))},wl=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return vo({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o,":hover":{color:n?a.neutral80:a.neutral40}})},xl=wl,Sl=wl,kl=function(){var e=ni.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_"}}}(ol||(hl=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],ml||(ml=hl.slice(0)),ol=Object.freeze(Object.defineProperties(hl,{raw:{value:Object.freeze(ml)}})))),_l=function(e){var t=e.delay,n=e.offset;return ti("span",{css:ni({animation:"".concat(kl," 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"},"","")})},jl=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return ti("div",ko({ref:o},Ui(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),a,{"aria-disabled":n||void 0}),t)},Ol=["data"],El=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,a=e.Heading,i=e.headingProps,l=e.innerProps,s=e.label,u=e.theme,c=e.selectProps;return ti("div",ko({},Ui(e,"group",{group:!0}),l),ti(a,ko({},i,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),s),ti("div",null,t))},Cl=["innerRef","isDisabled","isHidden","inputClassName"],Nl={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Tl={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":vo({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Nl)},Pl=function(e){return vo({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Nl)},Fl=function(e){var t=e.children,n=e.innerProps;return ti("div",n,t)};var Al=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,a=e.isDisabled,i=e.removeProps,l=e.selectProps,s=n.Container,u=n.Label,c=n.Remove;return ti(s,{data:r,innerProps:vo(vo({},Ui(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},ti(u,{data:r,innerProps:vo({},Ui(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),ti(c,{data:r,innerProps:vo(vo({},Ui(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:l}))},Il={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ti("div",ko({},Ui(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ti(yl,null))},Control:jl,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return ti("div",ko({},Ui(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ti(gl,null))},DownChevron:gl,CrossIcon:yl,Group:El,GroupHeading:function(e){var t=$i(e);t.data;var n=wo(t,Ol);return ti("div",ko({},Ui(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ti("div",ko({},Ui(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ti("span",ko({},t,Ui(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=$i(e),o=r.innerRef,a=r.isDisabled,i=r.isHidden,l=r.inputClassName,s=wo(r,Cl);return ti("div",ko({},Ui(e,"input",{"input-container":!0}),{"data-value":n||""}),ti("input",ko({className:t({input:!0},l),ref:o,style:Pl(i),disabled:a},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,a=wo(e,pl);return ti("div",ko({},Ui(vo(vo({},a),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ti(_l,{delay:0,offset:n}),ti(_l,{delay:160,offset:!0}),ti(_l,{delay:320,offset:!n}))},Menu:sl,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return ti("div",ko({},Ui(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,a=e.innerProps,i=e.menuPlacement,l=e.menuPosition,s=(0,r.useRef)(null),u=(0,r.useRef)(null),c=go((0,r.useState)(al(i)),2),f=c[0],d=c[1],p=(0,r.useMemo)(function(){return{setPortalPlacement:d}},[]),h=go((0,r.useState)(null),2),m=h[0],v=h[1],b=(0,r.useCallback)(function(){if(o){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}}(o),t="fixed"===l?0:window.pageYOffset,n=e[f]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||v({offset:n,rect:e})}},[o,l,f,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);Mi(function(){b()},[b]);var y=(0,r.useCallback)(function(){"function"==typeof u.current&&(u.current(),u.current=null),o&&s.current&&(u.current=Ii(o,s.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);Mi(function(){y()},[y]);var g=(0,r.useCallback)(function(e){s.current=e,y()},[y]);if(!t&&"fixed"!==l||!m)return null;var w=ti("div",ko({ref:g},Ui(vo(vo({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),a),n);return ti(il.Provider,{value:p},t?(0,ri.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=wo(e,nl);return ti("div",ko({},Ui(vo(vo({},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=wo(e,tl);return ti("div",ko({},Ui(vo(vo({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:Al,MultiValueContainer:Fl,MultiValueLabel:Fl,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ti("div",ko({role:"button"},n),t||ti(yl,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.innerRef,i=e.innerProps;return ti("div",ko({},Ui(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:a,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return ti("div",ko({},Ui(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return ti("div",ko({},Ui(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return ti("div",ko({},Ui(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 ti("div",ko({},Ui(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},Ml=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Dl(e,t){return e===t||!(!Ml(e)||!Ml(t))}function Rl(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,l=e.isDisabled,s=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&&i)return"value ".concat(a," focused, ").concat(c(i,n),".");if("menu"===t&&u){var f=l?" disabled":"",d="".concat(s?" selected":"").concat(f);return"".concat(a).concat(d,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},$l=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,a=e.focusableOptions,i=e.isFocused,l=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,f=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,b=s.menuIsOpen,y=s.options,g=s.screenReaderStatus,w=s.tabSelectsValue,x=s.isLoading,S=s["aria-label"],k=s["aria-live"],_=(0,r.useMemo)(function(){return vo(vo({},Vl),f||{})},[f]),j=(0,r.useMemo)(function(){var e,n="";if(t&&_.onChange){var r=t.option,o=t.options,a=t.removedValue,i=t.removedValues,s=t.value,u=a||r||(e=s,Array.isArray(e)?null:e),c=u?d(u):"",f=o||i||void 0,p=f?f.map(d):[],h=vo({isDisabled:u&&m(u,l),label:c,labels:p},t);n=_.onChange(h)}return n},[t,_,m,l,d]),O=(0,r.useMemo)(function(){var e="",t=n||o,r=!!(n&&l&&l.includes(n));if(t&&_.onFocus){var i={focused:t,label:d(t),isDisabled:m(t,l),isSelected:r,options:a,context:t===n?"menu":"value",selectValue:l,isAppleDevice:c};e=_.onFocus(i)}return e},[n,o,d,m,_,a,l,c]),E=(0,r.useMemo)(function(){var e="";if(b&&y.length&&!x&&_.onFilter){var t=g({count:a.length});e=_.onFilter({inputValue:p,resultsMessage:t})}return e},[a,p,b,_,y,g,x]),C="initial-input-focus"===(null==t?void 0:t.action),N=(0,r.useMemo)(function(){var e="";if(_.guidance){var t=o?"value":b?"menu":"input";e=_.guidance({"aria-label":S,context:t,isDisabled:n&&m(n,l),isMulti:h,isSearchable:v,tabSelectsValue:w,isInitialFocus:C})}return e},[S,n,o,h,m,v,b,_,l,w,C]),T=ti(r.Fragment,null,ti("span",{id:"aria-selection"},j),ti("span",{id:"aria-focused"},O),ti("span",{id:"aria-results"},E),ti("span",{id:"aria-guidance"},N));return ti(r.Fragment,null,ti(zl,{id:u},C&&T),ti(zl,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!C&&T))},Ul=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Hl=new RegExp("["+Ul.map(function(e){return e.letters}).join("")+"]","g"),Bl={},Wl=0;Wl1?t-1:0),r=1;r0,m=f-d-u,v=!1;m>t&&l.current&&(o&&o(e),l.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!l.current&&n(e),p.scrollTop=f,v=!0,l.current=!0):!h&&-t>u&&(a&&!s.current&&a(e),p.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,a,i]),d=(0,r.useCallback)(function(e){f(e,e.deltaY)},[f]),p=(0,r.useCallback)(function(e){u.current=e.changedTouches[0].clientY},[]),h=(0,r.useCallback)(function(e){var t=u.current-e.changedTouches[0].clientY;f(e,t)},[f]),m=(0,r.useCallback)(function(e){if(e){var t=!!Zi&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}},[h,p,d]),v=(0,r.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))},[h,p,d]);return(0,r.useEffect)(function(){if(t){var e=c.current;return m(e),function(){v(e)}}},[t,m,v]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,a=(0,r.useRef)({}),i=(0,r.useRef)(null),l=(0,r.useCallback)(function(e){if(is){var t=document.body,n=t&&t.style;if(o&&es.forEach(function(e){var t=n&&n[e];a.current[e]=t}),o&&ls<1){var r=parseInt(a.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,l=window.innerWidth-i+r||0;Object.keys(ts).forEach(function(e){var t=ts[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(l,"px"))}t&&as()&&(t.addEventListener("touchmove",ns,ss),e&&(e.addEventListener("touchstart",os,ss),e.addEventListener("touchmove",rs,ss))),ls+=1}},[o]),s=(0,r.useCallback)(function(e){if(is){var t=document.body,n=t&&t.style;ls=Math.max(ls-1,0),o&&ls<1&&es.forEach(function(e){var t=a.current[e];n&&(n[e]=t)}),t&&as()&&(t.removeEventListener("touchmove",ns,ss),e&&(e.removeEventListener("touchstart",os,ss),e.removeEventListener("touchmove",rs,ss)))}},[o]);return(0,r.useEffect)(function(){if(t){var e=i.current;return l(e),function(){s(e)}}},[t,l,s]),function(e){i.current=e}}({isEnabled:n});return ti(r.Fragment,null,n&&ti("div",{onClick:us,css:cs}),t(function(e){a(e),i(e)}))}var ds={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ps=function(e){var t=e.name,n=e.onFocus;return ti("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:ds,value:"",onChange:function(){}})};function hs(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 ms(){return hs(/^Mac/i)}function vs(){return hs(/^iPhone/i)||hs(/^iPad/i)||ms()&&navigator.maxTouchPoints>1}var bs={clearIndicator:Sl,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,a=o.colors,i=o.borderRadius;return vo({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?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},dropdownIndicator:xl,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 vo({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,a=r.colors;return vo({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,a=o.spacing,i=o.colors;return vo(vo({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Tl),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,a=o.colors,i=o.spacing.baseUnit;return vo({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*i})},loadingMessage:fl,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,i=o.spacing,l=o.colors;return vo((ho(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),ho(n,"position","absolute"),ho(n,"width","100%"),ho(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return vo({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,a=n.colors;return vo({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,a=e.cropWithEllipsis;return vo({overflow:"hidden",textOverflow:a||void 0===a?"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,a=n.colors,i=e.isFocused;return vo({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},noOptionsMessage:cl,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.theme,i=a.spacing,l=a.colors;return vo({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return vo({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,a=r.colors;return vo({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,a=e.selectProps.controlShouldRenderValue;return vo({alignItems:"center",display:r&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var ys,gs={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}},ws={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Qi(),captureMenuScroll:!Qi(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=vo({ignoreCase:!0,ignoreAccents:!0,stringify:Xl,trim:!0,matchFrom:"any"},ys),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,l=n.matchFrom,s=i?Kl(t):t,u=i?Kl(a(e)):a(e);return r&&(s=s.toLowerCase(),u=u.toLowerCase()),o&&(s=Yl(s),u=Ql(u)),"start"===l?u.substr(0,s.length)===s:u.indexOf(s)>-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 xs(e,t,n,r){return{type:"option",data:t,isDisabled:Ns(e,t,n),isSelected:Ts(e,t,n),label:Es(e,t),value:Cs(e,t),index:r}}function Ss(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return xs(e,n,t,r)}).filter(function(t){return js(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=xs(e,n,t,r);return js(e,a)?a:void 0}).filter(Ji)}function ks(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,No(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function _s(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,No(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 js(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,l=t.value;return(!Fs(e)||!a)&&Ps(e,{label:i,value:l,data:o},r)}var Os=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},Es=function(e,t){return e.getOptionLabel(t)},Cs=function(e,t){return e.getOptionValue(t)};function Ns(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Ts(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Cs(e,t);return n.some(function(t){return Cs(e,t)===r})}function Ps(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Fs=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},As=1,Is=function(e){!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&&jo(e,t)}(n,e);var t=function(e){var t=Eo();return function(){var n,r=Oo(e);if(t){var o=Oo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Co(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,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,a=o.closeMenuOnSelect,i=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),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,a=t.name,i=r.state.selectValue,l=o&&r.isOptionSelected(e,i),s=r.isOptionDisabled(e,i);if(l){var u=r.getOptionValue(e);r.setValue(i.filter(function(e){return r.getOptionValue(e)!==u}),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});o?r.setValue([].concat(No(i),[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),a=n.filter(function(e){return r.getOptionValue(e)!==o}),i=el(t,a,a[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(el(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),a=el(e,o,o[0]||null);n&&r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Os(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return _s(Ss(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;n5||a>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 Fs(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,a=t.escapeClearsValue,i=t.inputValue,l=t.isClearable,s=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,d=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,v=p.selectValue;if(!(s||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!f||!h||d&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):l&&a&&r.clearValue();break;case" ":if(i)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);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||++As),r.state.selectValue=Vi(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),i=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=a[i],r.state.focusedOptionId=Os(o,a[i])}return r}return function(e,t,n){t&&_o(e.prototype,t),n&&_o(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&&qi(this.menuListRef,this.focusedOptionRef),(ms()||vs())&&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&&(qi(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,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var l=a.indexOf(r[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i],focusedOptionId:this.getFocusedOptionId(a[i])},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 a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+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(gs):vo(vo({},gs),this.props.theme):gs}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,l=this.props,s=l.isMulti,u=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:c,selectOption:a,selectProps:l,setValue:i,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 Ns(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Ts(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Ps(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 e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,a=e.inputValue,i=e.tabIndex,l=e.form,s=e.menuIsOpen,u=e.required,c=this.getComponents().Input,f=this.state,d=f.inputIsHidden,p=f.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),v=vo(vo(vo({"aria-autocomplete":"list","aria-expanded":s,"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||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(c,ko({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:l,type:"text",value:a},v)):r.createElement(Jl,ko({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ri,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:l,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,a=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,u=this.commonProps,c=this.props,f=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,h=c.inputValue,m=c.placeholder,v=this.state,b=v.selectValue,y=v.focusedValue,g=v.isFocused;if(!this.hasValue()||!f)return h?null:r.createElement(s,ko({},u,{key:"placeholder",isDisabled:d,isFocused:g,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return b.map(function(t,l){var s=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,ko({},u,{components:{Container:o,Label:a,Remove:i},isFocused:s,isDisabled:d,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var w=b[0];return r.createElement(l,ko({},u,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||a)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,ko({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;if(!e||!a)return null;return r.createElement(e,ko({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,a=this.props.isDisabled,i=this.state.isFocused;return r.createElement(n,ko({},o,{isDisabled:a,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,ko({},t,{innerProps:a,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,a=t.Menu,i=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,f=this.commonProps,d=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,b=p.loadingMessage,y=p.minMenuHeight,g=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,S=p.menuPosition,k=p.menuPortalTarget,_=p.menuShouldBlockScroll,j=p.menuShouldScrollIntoView,O=p.noOptionsMessage,E=p.onMenuScrollToTop,C=p.onMenuScrollToBottom;if(!w)return null;var N,T=function(t,n){var o=t.type,a=t.data,i=t.isDisabled,l=t.isSelected,s=t.label,u=t.value,p=d===a,h=i?void 0:function(){return e.onOptionHover(a)},m=i?void 0:function(){return e.selectOption(a)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:l};return r.createElement(c,ko({},f,{innerProps:b,data:a,isDisabled:i,isSelected:l,key:v,label:s,type:o,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map(function(t){if("group"===t.type){var a=t.data,i=t.options,l=t.index,s="".concat(e.getElementId("group"),"-").concat(l),u="".concat(s,"-heading");return r.createElement(n,ko({},f,{key:s,data:a,options:i,Heading:o,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e,"".concat(l,"-").concat(e.index))}))}if("option"===t.type)return T(t,"".concat(t.index))});else if(v){var P=b({inputValue:m});if(null===P)return null;N=r.createElement(s,f,P)}else{var F=O({inputValue:m});if(null===F)return null;N=r.createElement(u,f,F)}var A={minMenuHeight:y,maxMenuHeight:g,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:j},I=r.createElement(ll,ko({},f,A),function(t){var n=t.ref,o=t.placerProps,l=o.placement,s=o.maxHeight;return r.createElement(a,ko({},f,A,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:l}),r.createElement(fs,{captureEnabled:h,onTopArrive:E,onBottomArrive:C,lockEnabled:_},function(t){return r.createElement(i,ko({},f,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":f.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:d}),N)}))});return k||"fixed"===S?r.createElement(l,ko({},f,{appendTo:k,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,a=t.isMulti,i=t.name,l=t.required,s=this.state.selectValue;if(l&&!this.hasValue()&&!o)return r.createElement(ps,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(a){if(n){var u=s.map(function(t){return e.getOptionValue(t)}).join(n);return r.createElement("input",{name:i,type:"hidden",value:u})}var c=s.length>0?s.map(function(t,n){return r.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):r.createElement("input",{name:i,type:"hidden",value:""});return r.createElement("div",null,c)}var f=s[0]?this.getOptionValue(s[0]):"";return r.createElement("input",{name:i,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,a=t.focusedValue,i=t.isFocused,l=t.selectValue,s=this.getFocusableOptions();return r.createElement($l,ko({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:a,isFocused:i,selectValue:l,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,a=e.ValueContainer,i=this.props,l=i.className,s=i.id,u=i.isDisabled,c=i.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return r.createElement(o,ko({},d,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:f}),this.renderLiveRegion(),r.createElement(t,ko({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:f,menuIsOpen:c}),r.createElement(a,ko({},d,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,ko({},d,{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,a=t.ariaSelection,i=t.isFocused,l=t.prevWasFocused,s=t.instancePrefix,u=e.options,c=e.value,f=e.menuIsOpen,d=e.inputValue,p=e.isMulti,h=Vi(c),m={};if(n&&(c!==n.value||u!==n.options||f!==n.menuIsOpen||d!==n.inputValue)){var v=f?function(e,t){return ks(Ss(e,t))}(e,h):[],b=f?_s(Ss(e,h),"".concat(s,"-option")):[],y=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-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:g,focusedOptionId:Os(b,g),focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=a,S=i&&l;return i&&!S&&(x={value:el(p,h,h[0]||null),options:h,action:"initial-input-focus"},S=!l),"initial-input-focus"===(null==a?void 0:a.action)&&(x=null),vo(vo(vo({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:S})}}]),n}(r.Component);Is.defaultProps=ws;var Ms=(0,r.forwardRef)(function(e,t){var n=So(e);return r.createElement(Is,ko({ref:t},n))}),Ds=["label","description","maxLength","disabled","type","inputWrapperClass"],Rs=["children","label","description"],Ls=["label","description","onChange"],zs=["label","description","options","disabled","enhanced","onChange"],Vs=["label","description","min","max","step","disabled"],$s=["label","description"];function Us(e){return Us="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},Us(e)}function Hs(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 Bs(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(iu(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,iu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,iu(f,"constructor",u),iu(u,"constructor",s),s.displayName="GeneratorFunction",iu(u,o,"GeneratorFunction"),iu(f),iu(f,o,"Generator"),iu(f,r,function(){return this}),iu(f,"toString",function(){return"[object Generator]"}),(au=function(){return{w:a,m:d}})()}function iu(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}iu=function(e,t,n,r){function a(t,n){iu(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},iu(e,t,n,r)}function lu(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function su(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){lu(a,r,o,i,l,"next",e)}function l(e){lu(a,r,o,i,l,"throw",e)}i(void 0)})}}function uu(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cu(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)?cu(e,t):void 0}}(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 cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==o[0]&&o[0],p(!0),e.p=1,e.n=2,y("admin/wp-available-meta-fields?show_hidden=".concat(t?"1":"0"));case 2:return n=e.v,e.n=3,n.json();case 3:r=e.v,l(r),e.n=5;break;case 4:e.p=4,e.v,S("error","Failed to load meta fields.");case 5:return e.p=5,p(!1),e.f(5);case 6:return e.a(2)}},e,null,[[1,4,5,6]])})),[]);(0,r.useEffect)(function(){Promise.all([y("admin/settings").then(function(e){return e.json()}),y("admin/wp-available-meta-fields?show_hidden=0").then(function(e){return e.json()})]).then(function(e){var t=uu(e,2),n=t[0],r=t[1];o(n),l(r),c(!1)}).catch(function(){S("error","Failed to load configuration."),c(!1)})},[]);var _=function(){var e=!w;x(e),k(e)},j=function(){var e=su(au().m(function e(){var t,n;return au().w(function(e){for(;;)switch(e.p=e.n){case 0:return v(!0),e.p=1,e.n=2,y("admin/sync-meta-fields",{method:"POST"});case 2:return t=e.v,e.n=3,t.json();case 3:if(!(n=e.v).success){e.n=5;break}return S("success",n.message||"Meta fields synced."),e.n=4,k(w);case 4:e.n=6;break;case 5:S("error",n.message||"Failed to sync meta fields.");case 6:e.n=8;break;case 7:e.p=7,e.v,S("error","Failed to sync meta fields.");case 8:return e.p=8,v(!1),e.f(8);case 9:return e.a(2)}},e,null,[[1,7,8,9]])}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=su(au().m(function e(t,n){var r,a,i;return au().w(function(e){for(;;)switch(e.p=e.n){case 0:return r=n.setSubmitting,e.p=1,e.n=2,y("admin/settings",{method:"POST",body:JSON.stringify(t)});case 2:return a=e.v,e.n=3,a.json();case 3:(i=e.v).success?(S("success",i.message),i.settings&&o(i.settings)):(i.errors||[]).forEach(function(e){return S("error",e)}),e.n=5;break;case 4:e.p=4,e.v,S("error","Failed to save settings.");case 5:return e.p=5,r(!1),e.f(5);case 6:return e.a(2)}},e,null,[[1,4,5,6]])}));return function(t,n){return e.apply(this,arguments)}}();if(u||!n||!i)return(0,g.jsx)("div",{className:"text-center py-5",children:(0,g.jsx)("div",{className:"spinner-border text-secondary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})})});var C=i.groups&&"object"===ou(i.groups)?Object.entries(i.groups).map(function(e){var t=uu(e,2);return{label:t[0],options:(t[1]||[]).map(function(e){return{value:e.id,label:e.label||e.id}})}}):[],N={wp_enabled_merge_tags:n.wp_enabled_merge_tags||[],wp_enabled_recipient_fields:n.wp_enabled_recipient_fields||[]},T=[{id:"data-fields",label:"Data Fields"}];return(0,g.jsx)(Jr,{initialValues:N,onSubmit:O,enableReinitialize:!0,children:function(e){var t=e.isSubmitting;return(0,g.jsx)(io,{children:(0,g.jsx)(ru,{tabs:T,defaultTab:"data-fields",children:function(e){return(0,g.jsx)(g.Fragment,{children:"data-fields"===e&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"card-header d-flex flex-wrap justify-content-between align-items-center gap-2",children:[(0,g.jsx)("h4",{className:"mb-0",children:"Data Fields"}),(0,g.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,g.jsx)("button",{type:"button",className:"btn btn-outline-secondary btn-sm me-2",onClick:j,disabled:m,children:m?"Syncing…":"Re-sync meta fields"}),(0,g.jsxs)("div",{className:"form-check form-switch mb-0",children:[(0,g.jsx)("input",{type:"checkbox",className:"form-check-input",id:"show-hidden-keys",checked:w,onChange:_}),(0,g.jsx)("label",{className:"form-check-label",htmlFor:"show-hidden-keys",children:"Show hidden keys"})]})]})]}),(0,g.jsx)("div",{className:"card-body",children:(0,g.jsxs)("div",{className:"form-table",children:[(0,g.jsxs)("div",{className:"form-row",children:[(0,g.jsx)("div",{className:"form-row-label",children:"Merge Tags"}),(0,g.jsx)("div",{className:"form-row-field",children:(0,g.jsx)(eu,{name:"wp_enabled_merge_tags",options:C,isLoading:d,description:"Select the custom meta merge tags to include in trigger payloads."})})]}),(0,g.jsxs)("div",{className:"form-row",children:[(0,g.jsx)("div",{className:"form-row-label",children:"Recipient Fields"}),(0,g.jsx)("div",{className:"form-row-field",children:(0,g.jsx)(eu,{name:"wp_enabled_recipient_fields",options:C,isLoading:d,description:"Select the custom meta recipient fields to include in trigger payloads."})})]})]})}),(0,g.jsx)("div",{className:"card-footer",children:(0,g.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:t,children:t?"Saving...":"Save Changes"})})]})})}})})}})};var du={WordPressConfig:fu};const pu=function(e){var t=e.integration,n=e.onBack,r=t.config_component?du[t.config_component]:null;return(0,g.jsxs)("div",{className:"notifier-integration-config",children:[(0,g.jsxs)("div",{className:"mb-3",children:[(0,g.jsxs)("h3",{className:"mb-1",children:[(0,g.jsx)("a",{href:"#",className:"text-decoration-none text-muted",onClick:n,children:"Integrations"})," > ",t.label," Configuration"]}),(0,g.jsxs)("p",{className:"mb-0",children:["Configure ",t.label," integration settings."]})]}),r?(0,g.jsx)(r,{integration:t}):(0,g.jsx)("p",{children:"No configuration available for this integration."})]})};function hu(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return mu(u,"_invoke",function(n,r,o){var a,l,s,u=0,c=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,d.n=n,i}};function p(n,r){for(l=n,s=r,t=0;!f&&u&&!o&&t3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(mu(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,mu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,mu(f,"constructor",u),mu(u,"constructor",s),s.displayName="GeneratorFunction",mu(u,o,"GeneratorFunction"),mu(f),mu(f,o,"Generator"),mu(f,r,function(){return this}),mu(f,"toString",function(){return"[object Generator]"}),(hu=function(){return{w:a,m:d}})()}function mu(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mu=function(e,t,n,r){function a(t,n){mu(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},mu(e,t,n,r)}function vu(e){return vu="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},vu(e)}function bu(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function yu(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){bu(a,r,o,i,l,"next",e)}function l(e){bu(a,r,o,i,l,"throw",e)}i(void 0)})}}function gu(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wu(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)?wu(e,t):void 0}}(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 wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n"",Pu=/^Symbol\((.*)\)(.*)$/;function Fu(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Tu.call(e).replace(Pu,"Symbol($1)");const r=Eu.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Cu.call(e)+"]":"RegExp"===r?Nu.call(e):null}function Au(e,t){let n=Fu(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Fu(this[e],t);return null!==r?r:n},2)}function Iu(e){return null==e?[]:[].concat(e)}let Mu,Du,Ru,Lu=/\$\{\s*(\w+)\s*\}/g;Mu=Symbol.toStringTag;class zu{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Mu]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Iu(e).forEach(e=>{if(Vu.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Du=Symbol.hasInstance,Ru=Symbol.toStringTag;class Vu extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(Lu,(e,n)=>Au(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,o){const a=new zu(e,t,n,r);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ru]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Vu)}static[Du](e){return zu[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let $u={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=null!=r&&r!==n?` (cast from the value \`${Au(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Au(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Au(n,!0)}\``+o}},Uu={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Hu={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Bu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Wu={isValue:"${path} field must be ${value}"},Gu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},qu={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Qu={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Au(n,!0)}\``}return Vu.formatError($u.notType,e)}};Object.assign(Object.create(null),{mixed:$u,string:Uu,number:Hu,date:Bu,object:Gu,array:qu,boolean:Wu,tuple:Qu});const Yu=e=>e&&e.__isYupSchema__;class Ku{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:o}=t,a="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new Ku(e,(e,t)=>{var n;let i=a(...e)?r:o;return null!=(n=null==i?void 0:i(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!Yu(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const Xu="$",Zu=".";class Ju{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Xu,this.isValue=this.key[0]===Zu,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Xu:this.isValue?Zu:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,ku.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Ju.prototype.__isYupRef=!0;const ec=e=>null==e;function tc(e){function t({value:t,path:n="",options:r,originalValue:o,schema:a},i,l){const{name:s,test:u,params:c,message:f,skipAbsent:d}=e;let{parent:p,context:h,abortEarly:m=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=r;const b={value:t,parent:p,context:h};function y(e={}){const r=nc(Object.assign({value:t,originalValue:o,label:a.spec.label,path:e.path||n,spec:a.spec,disableStackTrace:e.disableStackTrace||v},c,e.params),b),i=new Vu(Vu.formatError(e.message||f,r),t,r.path,e.type||s,r.disableStackTrace);return i.params=r,i}const g=m?i:l;let w={path:n,parent:p,type:s,from:r.from,createError:y,resolve:e=>rc(e,b),options:r,originalValue:o,schema:a};const x=e=>{Vu.isError(e)?g(e):e?l(null):g(y())},S=e=>{Vu.isError(e)?g(e):i(e)};if(d&&ec(t))return x(!0);let k;try{var _;if(k=u.call(w,t,w),"function"==typeof(null==(_=k)?void 0:_.then)){if(r.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(x,S)}}catch(e){return void S(e)}x(k)}return t.OPTIONS=e,t}function nc(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=rc(e[n],t);return e}function rc(e,t){return Ju.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function oc(e,t,n,r=n){let o,a,i;return t?((0,ku.forEach)(t,(l,s,u)=>{let c=s?l.slice(1,l.length-1):l,f="tuple"===(e=e.resolve({context:r,parent:o,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[d],e=f?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${i} which is a type: "${e.type}")`);o=n,n=n&&n[c],e=e.fields[c]}a=c,i=s?"["+l+"]":"."+l}),{schema:e,parent:o,parentPath:a}):{parent:o,parentPath:t,schema:e}}class ac extends Set{describe(){const e=[];for(const t of this.values())e.push(Ju.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new ac(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function ic(e,t=new Map){if(Yu(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r({message:e,path:lc(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>sc(e,r))}class uc{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ac,this._blacklist=new ac,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($u.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=ic(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,o;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(o=e.disableStackTrace)?o:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,o=n._cast(e,t);if(!1!==t.assert&&!n.isType(o)){if(r&&ec(o))return o;let a=Au(e),i=Au(o);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${a} \n`+(i!==a?`result of cast: ${i}`:""))}return o}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:o,originalValue:a=e,strict:i=this.spec.strict}=t,l=e;i||(l=this._cast(l,Object.assign({assert:!1},t)));let s=[];for(let e of Object.values(this.internalTests))e&&s.push(e);this.runTests({path:o,value:l,originalValue:a,options:t,tests:s},n,e=>{if(e.length)return r(e,l);this.runTests({path:o,value:l,originalValue:a,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:o,value:a,originalValue:i,path:l,options:s}=e,u=e=>{r||(r=!0,t(e,a))},c=e=>{r||(r=!0,n(e,a))},f=o.length,d=[];if(!f)return c([]);let p={value:a,originalValue:i,path:l,options:s,schema:this};for(let e=0;ethis.resolve(u)._validate(s,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,a)=>r._validate(e,t,(e,t)=>{Vu.isError(e)&&(e.value=t),a(e)},(e,t)=>{e.length?a(new Vu(e,t,void 0,void 0,o)):n(t)}))}validateSync(e,t){var n;let r,o=this.resolve(Object.assign({},t,{value:e})),a=null!=(n=null==t?void 0:t.disableStackTrace)?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw Vu.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Vu(t,e,void 0,void 0,a);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Vu.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Vu.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):ic(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=tc({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=tc({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=$u.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=$u.notNull){return this.nullability(!1,e)}required(e=$u.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=$u.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=tc(t),o=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(o)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Iu(e).map(e=>new Ju(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new Ku(r,t):Ku.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=tc({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=$u.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=tc({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=$u.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=tc({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:o,nullable:a}=t.spec;return{meta:r,label:n,optional:o,nullable:a,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?nc(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof Vu)return{issues:sc(e)};throw e}}}}}uc.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])uc.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:a,schema:i}=oc(this,t,n,r.context);return i[e](o&&o[a],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])uc.prototype[e]=uc.prototype.oneOf;for(const e of["not","nope"])uc.prototype[e]=uc.prototype.notOneOf;const cc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function fc(e){var t,n;const r=cc.exec(e);return r?{year:dc(r[1]),month:dc(r[2],1)-1,day:dc(r[3],1),hour:dc(r[4]),minute:dc(r[5]),second:dc(r[6]),millisecond:r[7]?dc(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:dc(r[10]),minuteOffset:dc(r[11])}:null}function dc(e,t=0){return Number(e)||t}let pc=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hc=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,mc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,vc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),bc=e=>ec(e)||e===e.trim(),yc={}.toString();function gc(){return new wc}class wc extends uc{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===yc?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||$u.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Uu.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Uu.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Uu.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,o=!1;return t&&("object"==typeof t?({excludeEmptyString:o=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Uu.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&o||-1!==t.search(e)})}email(e=Uu.email){return this.matches(pc,{name:"email",message:e,excludeEmptyString:!0})}url(e=Uu.url){return this.matches(hc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Uu.uuid){return this.matches(mc,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(vc,{name:"datetime",message:r||Uu.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Uu.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=fc(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||Uu.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=fc(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Uu.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:bc})}lowercase(e=Uu.lowercase){return this.transform(e=>ec(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ec(e)||e===e.toLowerCase()})}uppercase(e=Uu.uppercase){return this.transform(e=>ec(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ec(e)||e===e.toUpperCase()})}}gc.prototype=wc.prototype;let xc=new Date("");function Sc(){return new kc}class kc extends uc{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=fc(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?kc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Ju.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Bu.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Bu.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function _c(e,t){let n=1/0;return e.some((e,r)=>{var o;if(null!=(o=t.path)&&o.includes(e))return n=r,!0}),n}function jc(e){return(t,n)=>_c(e,t)-_c(e,n)}kc.INVALID_DATE=xc,Sc.prototype=kc.prototype,Sc.INVALID_DATE=xc;const Oc=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Ec(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Ec(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Ec(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Ec)}):"optional"in e?e.optional():e}let Cc=e=>"[object Object]"===Object.prototype.toString.call(e);function Nc(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Tc=jc([]);function Pc(e){return new Fc(e)}class Fc extends uc{constructor(e){super({type:"object",check:e=>Cc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Tc,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let o=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,i=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),l={},s=Object.assign({},t,{parent:l,__validating:t.__validating||!1}),u=!1;for(const e of i){let n=o[e],i=e in r,c=r[e];if(n){let o;s.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:l});let a=n instanceof uc?n.spec:void 0,i=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}o=t.__validating&&i?c:n.cast(c,s),void 0!==o&&(l[e]=o)}else i&&!a&&(l[e]=c);i===e in l&&l[e]===c||(u=!0)}return u?l:r}_validate(e,t={},n,r){let{from:o=[],originalValue:a=e,recursive:i=this.spec.recursive}=t;t.from=[{schema:this,value:a},...o],t.__validating=!0,t.originalValue=a,super._validate(e,t,n,(e,o)=>{if(!i||!Cc(o))return void r(e,o);a=a||o;let l=[];for(let e of this._nodes){let n=this.fields[e];n&&!Ju.isRef(n)&&l.push(n.asNestedTest({options:t,key:e,parent:o,parentPath:t.path,originalParent:a}))}this.runTests({tests:l,value:o,originalValue:a,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),o)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const o=this.fields[n];let a=e;null!=(r=a)&&r.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),t[n]=o&&"getDefault"in o?o.getDefault(a):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([e,t])=>`${e}-${t}`));function a(e,t){let a=(0,ku.split)(e)[0];r.add(a),o.has(`${t}-${a}`)||n.push([t,a])}for(const t of Object.keys(e)){let n=e[t];r.add(t),Ju.isRef(n)&&n.isSibling?a(n.path,t):Yu(n)&&"deps"in n&&n.deps.forEach(e=>a(e,t))}return Ou().array(Array.from(r),n).reverse()}(e,t),n._sortErrors=jc(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Ec(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=(0,ku.getter)(e,!0);return this.transform(o=>{if(!o)return o;let a=o;return((e,t)=>{const n=[...(0,ku.normalizePath)(t)];if(1===n.length)return n[0]in e;let r=n.pop(),o=(0,ku.getter)((0,ku.join)(n),!0)(e);return!(!o||!(r in o))})(o,e)&&(a=Object.assign({},o),n||delete a[e],a[t]=r(o)),a})}json(){return this.transform(Oc)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Gu.exact,test(e){if(null==e)return!0;const t=Nc(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Gu.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Nc(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Gu.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(_u.camelCase)}snakeCase(){return this.transformKeys(_u.snakeCase)}constantCase(){return this.transformKeys(e=>(0,_u.snakeCase)(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,a]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[o]})),n.fields[o]=a.describe(t)}return n}}function Ac(e){return new Ic(e)}Pc.prototype=Fc.prototype;class Ic extends uc{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const o=n.map((e,o)=>{const a=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${o}]`,parent:n,originalValue:e,value:e,index:o}));return a!==e&&(r=!0),a});return r?o:n}_validate(e,t={},n,r){var o;let a=this.innerType,i=null!=(o=t.recursive)?o:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(o,l)=>{var s;if(!i||!a||!this._typeCheck(l))return void r(o,l);let u=new Array(l.length);for(let n=0;nr(e.concat(o),l))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Oc)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!Yu(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Au(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=qu.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||qu.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||qu.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let o=e;null!=(r=o)&&r.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[0]})),n.innerType=t.innerType.describe(o)}return n}}Ac.prototype=Ic.prototype;var Mc=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];var Dc=(0,r.forwardRef)(function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,a=void 0!==o&&o,i=e.loadOptions;e.options;var l=e.isLoading,s=void 0!==l&&l,u=e.onInputChange,c=e.filterOption,f=void 0===c?null:c,d=wo(e,Mc),p=d.inputValue,h=(0,r.useRef)(void 0),m=(0,r.useRef)(!1),v=go((0,r.useState)(Array.isArray(n)?n:void 0),2),b=v[0],y=v[1],g=go((0,r.useState)(void 0!==p?p:""),2),w=g[0],x=g[1],S=go((0,r.useState)(!0===n),2),k=S[0],_=S[1],j=go((0,r.useState)(void 0),2),O=j[0],E=j[1],C=go((0,r.useState)([]),2),N=C[0],T=C[1],P=go((0,r.useState)(!1),2),F=P[0],A=P[1],I=go((0,r.useState)({}),2),M=I[0],D=I[1],R=go((0,r.useState)(void 0),2),L=R[0],z=R[1],V=go((0,r.useState)(void 0),2),$=V[0],U=V[1];a!==$&&(D({}),U(a)),n!==L&&(y(Array.isArray(n)?n:void 0),z(n)),(0,r.useEffect)(function(){return m.current=!0,function(){m.current=!1}},[]);var H=(0,r.useCallback)(function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,function(){return t()})},[i]);(0,r.useEffect)(function(){!0===n&&H(w,function(e){m.current&&(y(e||[]),_(!!h.current))})},[]);var B=(0,r.useCallback)(function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,u);if(!n)return h.current=void 0,x(""),E(""),T([]),_(!1),void A(!1);if(a&&M[n])x(n),E(n),T(M[n]),_(!1),A(!1);else{var r=h.current={};x(n),_(!0),A(!O),H(n,function(e){m&&r===h.current&&(h.current=void 0,_(!1),E(n),T(e||[]),A(!1),D(e?vo(vo({},M),{},ho({},n,e)):M))})}},[a,H,O,M,u]),W=F?[]:w&&O?N:b||[];return vo(vo({},d),{},{options:W,isLoading:k||s,onInputChange:B,filterOption:f})}(e),o=So(n);return r.createElement(Is,ko({ref:t},o))}),Rc=Dc;function Lc(e){return Lc="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},Lc(e)}function zc(e){return function(e){if(Array.isArray(e))return Wc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Bc(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.")}()}function Vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Xc(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Xc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,Xc(f,"constructor",u),Xc(u,"constructor",s),s.displayName="GeneratorFunction",Xc(u,o,"GeneratorFunction"),Xc(f),Xc(f,o,"Generator"),Xc(f,r,function(){return this}),Xc(f,"toString",function(){return"[object Generator]"}),(Kc=function(){return{w:a,m:d}})()}function Xc(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Xc=function(e,t,n,r){function a(t,n){Xc(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Xc(e,t,n,r)}function Zc(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Jc(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){Zc(a,r,o,i,l,"next",e)}function l(e){Zc(a,r,o,i,l,"throw",e)}i(void 0)})}}function ef(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tf(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)?tf(e,t):void 0}}(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 tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ni.current&&e.length&&(i.current=o,t(of[e[0]]||"general"))},[o,a]),null};const lf=function(){var e,t,n,o,a,i=ef((0,r.useState)(null),2),l=i[0],s=i[1],u=ef((0,r.useState)(!0),2),c=u[0],f=u[1],d=ef((0,r.useState)(""),2),p=d[0],h=d[1],m=ef((0,r.useState)(!1),2),v=m[0],b=m[1],w=ef((0,r.useState)("desktop"),2),x=w[0],S=w[1],k=ef((0,r.useState)("general"),2),_=k[0],j=k[1],O=E().addNotice,C=function(e){e!==_&&(j(e),O("error","Some fields need attention before the settings can be saved."))},N=(null===(e=document.getElementById("notifier-admin-root"))||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.siteUrl)||window.location.hostname;(0,r.useEffect)(function(){y("admin/settings").then(function(e){return e.json()}).then(function(e){s(e),f(!1),e.ctc_button_style&&"default"!==e.ctc_button_style&&"btn-custom-image"!==e.ctc_button_style&&T(e.ctc_button_style,e)}).catch(function(){O("error","Failed to load settings."),f(!1)})},[]);var T=function(){var e=Jc(Kc().m(function e(t){var n,r,o,a=arguments;return Kc().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},t&&"default"!==t&&"btn-custom-image"!==t){e.n=1;break}return h(""),e.a(2);case 1:return b(!0),e.p=2,e.n=3,y("admin/preview-btn-style",{method:"POST",body:JSON.stringify({btn_style:t,whatsapp_number:n.ctc_whatsapp_number||"",greeting_text:n.ctc_greeting_text||"",custom_image_url:n.ctc_custom_button_image_url||""})});case 3:return r=e.v,e.n=4,r.json();case 4:o=e.v,h(o.preview||""),e.n=6;break;case 5:e.p=5,e.v,h("");case 6:return e.p=6,b(!1),e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=Jc(Kc().m(function e(t,n){var r,o,a;return Kc().w(function(e){for(;;)switch(e.p=e.n){case 0:return r=n.setSubmitting,e.p=1,e.n=2,y("admin/settings",{method:"POST",body:JSON.stringify(t)});case 2:return o=e.v,e.n=3,o.json();case 3:(a=e.v).success?(O("success",a.message),a.settings&&s(a.settings),T(t.ctc_button_style,t)):(a.errors||[]).forEach(function(e){return O("error",e)}),e.n=5;break;case 4:e.p=4,e.v,O("error","Failed to save settings.");case 5:return e.p=5,r(!1),e.f(5);case 6:return e.a(2)}},e,null,[[1,4,5,6]])}));return function(t,n){return e.apply(this,arguments)}}();if(c)return(0,g.jsx)("div",{className:"text-center py-5",children:(0,g.jsx)("div",{className:"spinner-border text-secondary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})})});var F=nf(null==l?void 0:l.button_styles),A=nf(null==l?void 0:l.ctc_position_options),I=(null==l?void 0:l.ctc_location_options)||[],M=nf(null==l?void 0:l.ctc_device_options),D=function(e){return(e||[]).every(function(e){return e.rule&&("specifics"!==e.rule||(e.specifics||[]).length>0)})},R=Pc({ctc_whatsapp_number:gc().when("ctc_enable",{is:"yes",then:function(e){return e.required("Enter your WhatsApp number to enable the chat button").matches(/^\+[1-9]\d{8,15}$/,"Enter a valid number with country code, starting with + (e.g. +919876543210)")}}),ctc_display_rules:Pc({display:Ac().min(1,"Add at least one display rule, otherwise the button will not appear anywhere.").test("complete","Choose a location for every display rule, or remove the empty rule.",D),exclude:Ac().test("complete","Choose a location for every exclusion rule, or remove the empty rule.",D)}),ctc_devices:Ac().min(1,"Select at least one device")}),L={ctc_enable:(null==l?void 0:l.ctc_enable)||"no",ctc_whatsapp_number:(null==l?void 0:l.ctc_whatsapp_number)||"",ctc_greeting_text:(null==l?void 0:l.ctc_greeting_text)||"",ctc_button_style:(null==l?void 0:l.ctc_button_style)||"default",ctc_custom_button_image_url:(null==l?void 0:l.ctc_custom_button_image_url)||"",ctc_position:(null==l?void 0:l.ctc_position)||"bottom-right",ctc_offset_x:null!==(t=null==l?void 0:l.ctc_offset_x)&&void 0!==t?t:20,ctc_offset_y:null!==(n=null==l?void 0:l.ctc_offset_y)&&void 0!==n?n:20,ctc_mobile_position_enable:(null==l?void 0:l.ctc_mobile_position_enable)||"no",ctc_mobile_position:(null==l?void 0:l.ctc_mobile_position)||"bottom-right",ctc_mobile_offset_x:null!==(o=null==l?void 0:l.ctc_mobile_offset_x)&&void 0!==o?o:20,ctc_mobile_offset_y:null!==(a=null==l?void 0:l.ctc_mobile_offset_y)&&void 0!==a?a:20,ctc_display_rules:(null==l?void 0:l.ctc_display_rules)||{display:[{rule:"basic-global",specifics:[]}],exclude:[]},ctc_devices:(null==l?void 0:l.ctc_devices)||M.map(function(e){return e.value})},z=function(e){var t="mobile"===x&&"yes"===e.ctc_mobile_position_enable?"ctc_mobile_":"ctc_",n=e["".concat(t,"position")],r=null!=n&&n.startsWith("top")?"top":"bottom",o=null!=n&&n.endsWith("left")?"left":"right";return Yc(Yc({top:"auto",bottom:"auto",left:"auto",right:"auto"},r,"".concat(parseInt(e["".concat(t,"offset_y")],10)||0,"px")),o,"".concat(parseInt(e["".concat(t,"offset_x")],10)||0,"px"))},V=function(e,t){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Zs,{name:"".concat(e,"position"),label:"Screen Corner",options:A,enhanced:!1,description:"Choose which corner of the screen the button appears in."}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-6",children:(0,g.jsx)(Js,{name:"".concat(e,"offset_x"),label:"Space from ".concat(null!=t&&t.endsWith("left")?"left":"right"," (px)"),min:0})}),(0,g.jsx)("div",{className:"col-6",children:(0,g.jsx)(Js,{name:"".concat(e,"offset_y"),label:"Space from ".concat(null!=t&&t.startsWith("top")?"top":"bottom"," (px)"),min:0})})]})]})};return(0,g.jsx)("div",{className:"notifier-chat-button-tab",children:(0,g.jsx)(Jr,{initialValues:L,validationSchema:R,onSubmit:P,enableReinitialize:!0,children:function(e){var t=e.isSubmitting,n=e.values,r=e.errors,o=(0,g.jsx)("div",{className:"card-footer",children:(0,g.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:t,children:t?"Saving...":"Save Changes"})});return(0,g.jsxs)(io,{children:[(0,g.jsx)(af,{onFocusTab:C}),(0,g.jsxs)("div",{className:"mb-3",children:[(0,g.jsx)("h3",{className:"mb-1",children:"WhatsApp Chat Button"}),(0,g.jsx)("p",{className:"mb-0",children:"Add a WhatsApp chat button to your website to let visitors start a chat with you on WhatsApp."})]}),(0,g.jsxs)("div",{className:"row g-4",children:[(0,g.jsx)("div",{className:"col-12 col-md-6 mb-3",children:(0,g.jsx)(ru,{tabs:rf,activeTab:_,onTabChange:j,className:"notifier-card-tabs--compact",children:function(e){return(0,g.jsxs)(g.Fragment,{children:["general"===e&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"card-header",children:(0,g.jsx)("h4",{className:"mb-0",children:"General"})}),(0,g.jsxs)("div",{className:"card-body",children:[(0,g.jsx)(Xs,{name:"ctc_enable",label:"Enable chat button",wrapperclass:"mb-3"}),(0,g.jsx)(Ys,{name:"ctc_whatsapp_number",label:"WhatsApp Number",placeholder:"Enter your WhatsApp number",description:"Enter your WhatsApp number with country code. Eg. +919876543210"}),(0,g.jsx)(Ys,{name:"ctc_greeting_text",label:"Text Message",placeholder:"Enter your text message here",description:"This message is pre-filled in the visitor's WhatsApp chat box when they click the button."}),(0,g.jsx)(Zs,{name:"ctc_button_style",label:"Button Style",options:F,description:"Select a button style. You can customize it with CSS in your theme.",enhanced:!1,onChange:T}),"btn-custom-image"===n.ctc_button_style&&(0,g.jsx)(Ys,{name:"ctc_custom_button_image_url",label:"Button Image URL",placeholder:"https://",description:"Enter the URL of your custom button image."})]}),o]}),"position"===e&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"card-header",children:(0,g.jsx)("h4",{className:"mb-0",children:"Position"})}),(0,g.jsxs)("div",{className:"card-body",children:[V("ctc_",n.ctc_position),(0,g.jsx)(Xs,{name:"ctc_mobile_position_enable",label:"Use a different position on mobile phones",wrapperclass:"mb-3",onChange:function(e){return S(e.target.checked?"mobile":"desktop")}}),"yes"===n.ctc_mobile_position_enable&&(0,g.jsxs)("div",{className:"notifier-mobile-position",children:[(0,g.jsx)("div",{className:"description mt-0 mb-2",children:"These settings apply to phones (screens up to 767px wide). Desktop and tablet keep the position above."}),V("ctc_mobile_",n.ctc_mobile_position)]})]}),o]}),"display"===e&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"card-header",children:(0,g.jsx)("h4",{className:"mb-0",children:"Display Rules"})}),(0,g.jsxs)("div",{className:"card-body",children:[(0,g.jsx)(qc,{name:"ctc_display_rules.display",label:"Display on",description:"The button appears on pages that match any of these rules.",options:I,addLabel:"Add display rule",emptyText:"No display rules yet. The button will not appear anywhere until you add one."}),(0,g.jsx)(qc,{name:"ctc_display_rules.exclude",label:"Exclude on",description:"The button is hidden on pages that match any of these rules, even when a display rule matches.",options:I,addLabel:"Add exclusion rule"}),(0,g.jsxs)("div",{className:"mb-3",children:[(0,g.jsx)("label",{className:"form-label d-block",children:"Show on these devices"}),(0,g.jsx)("div",{className:"description mt-0 mb-2",children:"Untick a device to hide the button on it. Mobile = phones, Tablet = screens 768–1024px wide, Desktop = larger screens."}),M.map(function(e){return(0,g.jsxs)("div",{className:"form-check form-check-inline",children:[(0,g.jsx)(ao,{type:"checkbox",name:"ctc_devices",value:e.value,id:"ctc_devices_".concat(e.value),className:"form-check-input"}),(0,g.jsx)("label",{className:"form-check-label",htmlFor:"ctc_devices_".concat(e.value),children:e.label})]},e.value)}),r.ctc_devices&&(0,g.jsx)("div",{className:"text-danger small mt-1",children:r.ctc_devices})]})]}),o]})]})}})}),(0,g.jsx)("div",{className:"col-12 col-md-6 mb-3",children:(0,g.jsxs)("div",{className:"card notifier-sticky-preview",children:[(0,g.jsxs)("div",{className:"card-header d-flex justify-content-between align-items-center",children:[(0,g.jsx)("h4",{className:"mb-0",children:"Chat Button Preview"}),(0,g.jsx)("div",{className:"btn-group btn-group-sm",role:"group","aria-label":"Preview device",children:["desktop","mobile"].map(function(e){return(0,g.jsx)("button",{type:"button",className:"btn btn-sm ".concat(x===e?"btn-primary":"btn-outline-primary"),onClick:function(){return S(e)},children:"desktop"===e?"Desktop":"Mobile"},e)})})]}),(0,g.jsx)("div",{className:"card-body p-0",children:(0,g.jsxs)("div",{className:"notifier-browser-mock ".concat("mobile"===x?"notifier-browser-mock--mobile":""),children:[(0,g.jsxs)("div",{className:"notifier-browser-mock__bar",children:[(0,g.jsx)("span",{className:"notifier-browser-mock__dot"}),(0,g.jsx)("span",{className:"notifier-browser-mock__dot"}),(0,g.jsx)("span",{className:"notifier-browser-mock__dot"}),(0,g.jsx)("span",{className:"notifier-browser-mock__address",children:N})]}),(0,g.jsxs)("div",{className:"notifier-browser-mock__body",children:[(0,g.jsxs)("div",{className:"notifier-browser-mock__page",children:[(0,g.jsx)("div",{className:"notifier-browser-mock__topbar",children:(0,g.jsxs)("div",{className:"notifier-browser-mock__container",children:[(0,g.jsx)("span",{className:"notifier-browser-mock__logo-block"}),(0,g.jsx)("span",{className:"notifier-browser-mock__spacer"}),(0,g.jsx)("span",{className:"notifier-browser-mock__nav-item"}),(0,g.jsx)("span",{className:"notifier-browser-mock__nav-item"}),(0,g.jsx)("span",{className:"notifier-browser-mock__nav-item"})]})}),(0,g.jsxs)("div",{className:"notifier-browser-mock__main",children:[(0,g.jsx)("div",{className:"notifier-browser-mock__hero",children:(0,g.jsxs)("div",{className:"notifier-browser-mock__container",children:[(0,g.jsxs)("div",{className:"notifier-browser-mock__hero-text",children:[(0,g.jsx)("span",{className:"notifier-browser-mock__title notifier-browser-mock__title--lg"}),(0,g.jsx)("span",{className:"notifier-browser-mock__title"}),(0,g.jsx)("span",{className:"notifier-browser-mock__line"}),(0,g.jsx)("span",{className:"notifier-browser-mock__line notifier-browser-mock__line--short"}),(0,g.jsx)("span",{className:"notifier-browser-mock__btn"})]}),(0,g.jsx)("div",{className:"notifier-browser-mock__hero-image"})]})}),(0,g.jsx)("div",{className:"notifier-browser-mock__logos",children:(0,g.jsxs)("div",{className:"notifier-browser-mock__container",children:[(0,g.jsx)("span",{className:"notifier-browser-mock__logo"}),(0,g.jsx)("span",{className:"notifier-browser-mock__logo"}),(0,g.jsx)("span",{className:"notifier-browser-mock__logo"}),(0,g.jsx)("span",{className:"notifier-browser-mock__logo"}),(0,g.jsx)("span",{className:"notifier-browser-mock__logo"})]})}),(0,g.jsx)("div",{className:"notifier-browser-mock__features",children:(0,g.jsxs)("div",{className:"notifier-browser-mock__container",children:[(0,g.jsx)("span",{className:"notifier-browser-mock__feature"}),(0,g.jsx)("span",{className:"notifier-browser-mock__feature"}),(0,g.jsx)("span",{className:"notifier-browser-mock__feature"})]})})]})]}),v?(0,g.jsx)("div",{className:"notifier-btn-preview notifier-btn-preview--loading",style:z(n),children:(0,g.jsx)("div",{className:"spinner-border spinner-border-sm text-secondary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading preview..."})})}):p?(0,g.jsx)("div",{className:"notifier-btn-preview",style:z(n),dangerouslySetInnerHTML:{__html:p}}):(0,g.jsx)("div",{className:"notifier-btn-preview notifier-btn-preview--default",style:z(n),children:(0,g.jsx)("a",{href:"#",onClick:function(e){return e.preventDefault()},children:(0,g.jsxs)("svg",{style:{pointerEvents:"none",display:"block",height:"50px",width:"50px"},width:"50px",height:"50px",viewBox:"0 0 1219.547 1225.016",children:[(0,g.jsx)("path",{style:{fill:"#E0E0E0"},d:"M1041.858 178.02C927.206 63.289 774.753.07 612.325 0 277.617 0 5.232 272.298 5.098 606.991c-.039 106.986 27.915 211.42 81.048 303.476L0 1225.016l321.898-84.406c88.689 48.368 188.547 73.855 290.166 73.896h.258.003c334.654 0 607.08-272.346 607.222-607.023.056-162.208-63.052-314.724-177.689-429.463zm-429.533 933.963h-.197c-90.578-.048-179.402-24.366-256.878-70.339l-18.438-10.93-191.021 50.083 51-186.176-12.013-19.087c-50.525-80.336-77.198-173.175-77.16-268.504.111-278.186 226.507-504.503 504.898-504.503 134.812.056 261.519 52.604 356.814 147.965 95.289 95.36 147.728 222.128 147.688 356.948-.118 278.195-226.522 504.543-504.693 504.543z"}),(0,g.jsxs)("linearGradient",{id:"htwaicona-chat",gradientUnits:"userSpaceOnUse",x1:"609.77",y1:"1190.114",x2:"609.77",y2:"21.084",children:[(0,g.jsx)("stop",{offset:"0",stopColor:"#20b038"}),(0,g.jsx)("stop",{offset:"1",stopColor:"#60d66a"})]}),(0,g.jsx)("path",{style:{fill:"url(#htwaicona-chat)"},d:"M27.875 1190.114l82.211-300.18c-50.719-87.852-77.391-187.523-77.359-289.602.133-319.398 260.078-579.25 579.469-579.25 155.016.07 300.508 60.398 409.898 169.891 109.414 109.492 169.633 255.031 169.57 409.812-.133 319.406-260.094 579.281-579.445 579.281-.023 0 .016 0 0 0h-.258c-96.977-.031-192.266-24.375-276.898-70.5l-307.188 80.548z"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",style:{fill:"#FFFFFF"},d:"M462.273 349.294c-11.234-24.977-23.062-25.477-33.75-25.914-8.742-.375-18.75-.352-28.742-.352-10 0-26.25 3.758-39.992 18.766-13.75 15.008-52.5 51.289-52.5 125.078 0 73.797 53.75 145.102 61.242 155.117 7.5 10 103.758 166.266 256.203 226.383 126.695 49.961 152.477 40.023 179.977 37.523s88.734-36.273 101.234-71.297c12.5-35.016 12.5-65.031 8.75-71.305-3.75-6.25-13.75-10-28.75-17.5s-88.734-43.789-102.484-48.789-23.75-7.5-33.75 7.516c-10 15-38.727 48.773-47.477 58.773-8.75 10.023-17.5 11.273-32.5 3.773-15-7.523-63.305-23.344-120.609-74.438-44.586-39.75-74.688-88.844-83.438-103.859-8.75-15-.938-23.125 6.586-30.602 6.734-6.719 15-17.508 22.5-26.266 7.484-8.758 9.984-15.008 14.984-25.008 5-10.016 2.5-18.773-1.25-26.273s-32.898-81.67-46.234-111.326z"}),(0,g.jsx)("path",{style:{fill:"#FFFFFF"},d:"M1036.898 176.091C923.562 62.677 772.859.185 612.297.114 281.43.114 12.172 269.286 12.039 600.137 12 705.896 39.633 809.13 92.156 900.13L7 1211.067l318.203-83.438c87.672 47.812 186.383 73.008 286.836 73.047h.255.003c330.812 0 600.109-269.219 600.25-600.055.055-160.343-62.328-311.108-175.649-424.53zm-424.601 923.242h-.195c-89.539-.047-177.344-24.086-253.93-69.531l-18.227-10.805-188.828 49.508 50.414-184.039-11.875-18.867c-49.945-79.414-76.312-171.188-76.273-265.422.109-274.992 223.906-498.711 499.102-498.711 133.266.055 258.516 52 352.719 146.266 94.195 94.266 146.031 219.578 145.992 352.852-.118 274.999-223.923 498.749-498.899 498.749z"})]})})})]})]})})]})})]})]})}})})};function sf(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return uf(u,"_invoke",function(n,r,o){var a,l,s,u=0,c=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,d.n=n,i}};function p(n,r){for(l=n,s=r,t=0;!f&&u&&!o&&t3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(uf(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,uf(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,uf(f,"constructor",u),uf(u,"constructor",s),s.displayName="GeneratorFunction",uf(u,o,"GeneratorFunction"),uf(f),uf(f,o,"Generator"),uf(f,r,function(){return this}),uf(f,"toString",function(){return"[object Generator]"}),(sf=function(){return{w:a,m:d}})()}function uf(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}uf=function(e,t,n,r){function a(t,n){uf(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},uf(e,t,n,r)}function cf(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ff(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return df(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)?df(e,t):void 0}}(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 df(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(mf(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,mf(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,mf(f,"constructor",u),mf(u,"constructor",s),s.displayName="GeneratorFunction",mf(u,o,"GeneratorFunction"),mf(f),mf(f,o,"Generator"),mf(f,r,function(){return this}),mf(f,"toString",function(){return"[object Generator]"}),(hf=function(){return{w:a,m:d}})()}function mf(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mf=function(e,t,n,r){function a(t,n){mf(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},mf(e,t,n,r)}function vf(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function bf(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){vf(a,r,o,i,l,"next",e)}function l(e){vf(a,r,o,i,l,"throw",e)}i(void 0)})}}function yf(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gf(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)?gf(e,t):void 0}}(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 gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&(0,g.jsx)("button",{type:"button",className:"btn btn-outline-danger",onClick:P,disabled:j,children:j?"Deleting...":"Delete Logs"}),(0,g.jsx)("button",{type:"button",className:"btn ".concat(t?"btn-outline-secondary":"btn-primary"),onClick:T,disabled:S,children:S?"Toggling...":t?"Disable Logging":"Enable Logging"})]})]}),t?h?(0,g.jsx)("div",{className:"text-center py-5",children:(0,g.jsx)("div",{className:"spinner-border text-secondary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}):(0,g.jsx)("div",{className:"card",children:(0,g.jsx)("div",{className:"card-body p-0",children:b?(0,g.jsx)("div",{className:"text-center py-4",children:(0,g.jsx)("div",{className:"spinner-border text-secondary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}):(0,g.jsx)("div",{className:"table-responsive",children:(0,g.jsxs)("table",{className:"table table-hover mb-0",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{style:{width:"160px"},children:"Time"}),(0,g.jsx)("th",{style:{width:"80px"},children:"Type"}),(0,g.jsx)("th",{children:"Message"})]})}),(0,g.jsx)("tbody",{children:0===f.length?(0,g.jsx)("tr",{children:(0,g.jsx)("td",{colSpan:3,className:"text-center text-muted py-4",children:"No logs found."})}):f.map(function(e){return(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"text-nowrap small",children:new Date(e.timestamp).toLocaleTimeString()}),(0,g.jsx)("td",{children:(0,g.jsx)("span",{className:"badge ".concat(F(e.type)," bg-opacity-30 border"),children:e.type})}),(0,g.jsx)("td",{className:"small",children:e.message})]},e.log_id)})})]})})})}):(0,g.jsx)("div",{className:"card",children:(0,g.jsx)("div",{className:"card-body text-center py-5",children:(0,g.jsx)("p",{className:"text-muted mb-0",children:"Activity logging is disabled. Enable it to start recording trigger activity."})})})]})};function xf(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return Sf(u,"_invoke",function(n,r,o){var a,l,s,u=0,c=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,d.n=n,i}};function p(n,r){for(l=n,s=r,t=0;!f&&u&&!o&&t3?(o=h===r)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,l=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!f;){a||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,l=1,s=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Sf(t={},r,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Sf(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,Sf(f,"constructor",u),Sf(u,"constructor",s),s.displayName="GeneratorFunction",Sf(u,o,"GeneratorFunction"),Sf(f),Sf(f,o,"Generator"),Sf(f,r,function(){return this}),Sf(f,"toString",function(){return"[object Generator]"}),(xf=function(){return{w:a,m:d}})()}function Sf(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Sf=function(e,t,n,r){function a(t,n){Sf(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Sf(e,t,n,r)}function kf(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function _f(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){kf(a,r,o,i,l,"next",e)}function l(e){kf(a,r,o,i,l,"throw",e)}i(void 0)})}}function jf(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Of(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)?Of(e,t):void 0}}(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 Of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n ",e.title]},e.id)})})]}),(0,g.jsx)("div",{className:"card-footer",children:(0,g.jsx)("a",{href:w,className:"btn btn-primary",target:"_blank",children:"Get Order & Abandoned Cart Notifications for WooCommerce"})})]})})})}):(0,g.jsx)("div",{className:"notifier-migration-tab",children:(0,g.jsx)("div",{className:"row",children:(0,g.jsxs)("div",{className:"col-md-6",children:["mixed"===h&&(0,g.jsxs)("div",{className:"alert alert-warning mb-4",children:[(0,g.jsx)("strong",{children:"Note:"})," Your WooCommerce and Cart Abandonment Recovery triggers require the"," ",(0,g.jsx)("a",{href:w,target:"_blank",children:"Order & Abandoned Cart Notifications for WooCommerce"})," ","plugin and will not be migrated here. Only your other integration triggers will be migrated below."]}),(0,g.jsxs)("div",{className:"card mb-4",children:[(0,g.jsx)("div",{className:"card-header",children:(0,g.jsx)("h4",{className:"mb-0",children:n.all_connected?"Almost Done!":"⚠️ Major Plugin Version Update - Migration Required"})}),(0,g.jsx)("div",{className:"card-body",children:n.all_connected?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("p",{className:"mt-0 mb-0",children:"Your WANotifier account is now connected. Click the button below to complete the migration. This will permanently move all your legacy triggers to the new integration system and remove the old ones."})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"mt-0",children:"Thank you for updating your plugin to v3.0.0. This is a major update and your existing triggers need to be migrated to our new integration system. They will continue to work until you complete the migration."}),(0,g.jsx)("p",{className:"mt-0",children:"When you click on the button below, that'll take you to your WANotifier account for authorization. After authorization, all your existing triggers will be migrated to the new integration system."}),(0,g.jsx)("p",{className:"mt-0",children:"Migration process will take less than a minute to complete."}),(0,g.jsx)("hr",{}),(0,g.jsx)("ul",{style:{margin:0},children:Object.entries(b).map(function(e){var t=jf(e,2),n=(t[0],t[1]);return n.triggers.map(function(e){return(0,g.jsxs)("li",{children:[(0,g.jsx)("b",{children:n.label})," > ",e.title]},e.id)})})})]})}),(0,g.jsx)("div",{className:"card-footer",children:(0,g.jsxs)("div",{className:"d-flex gap-3",children:[!n.all_connected&&(0,g.jsx)("a",{href:n.migrate_url,className:"btn btn-primary",children:"Migrate Triggers to v3"}),n.all_connected&&(0,g.jsx)("button",{type:"button",className:"btn btn-primary",onClick:p,disabled:u,children:u?"Completing...":"Complete Migration"})]})})]})]})})})};function Cf(e){return Cf="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},Cf(e)}function Nf(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 Tf(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n>>1,o=e[r];if(!(0>>1;ra(s,n))ua(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(ua(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],f=1,d=null,p=3,h=!1,m=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(v=!1,w(e),!m)if(null!==r(u))m=!0,A(S);else{var t=r(c);null!==t&&I(x,t.startTime-e)}}function S(e,n){m=!1,v&&(v=!1,y(O),O=-1),h=!0;var a=p;try{for(w(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!N());){var i=d.callback;if("function"==typeof i){d.callback=null,p=d.priorityLevel;var l=i(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?d.callback=l:d===r(u)&&o(u),w(n)}else o(u);d=r(u)}if(null!==d)var s=!0;else{var f=r(c);null!==f&&I(x,f.startTime-n),s=!1}return s}finally{d=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,_=!1,j=null,O=-1,E=5,C=-1;function N(){return!(t.unstable_now()-Ce||125i?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(v?(y(O),O=-1):v=!0,I(x,a-i))):(e.sortIndex=l,n(u,e),m||h||(m=!0,A(S))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},540(e,t,n){"use strict";e.exports=n(287)},549(){},551(e,t,n){"use strict";var r=n(540),o=n(982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n