From b8c6aee355984373b34914e1ee81b3471b9aa9f5 Mon Sep 17 00:00:00 2001 From: James Hunt <10615884+thetwopct@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:37:09 +0700 Subject: [PATCH] Block makes use of event Sched ID Signed-off-by: James Hunt <10615884+thetwopct@users.noreply.github.com> --- .../speakers-block-2/block-speakers-block.php | 7 ++++++- .../plugins/speakers-block-2/block.json | 3 --- .../speakers-block-2/build/index.asset.php | 2 +- .../plugins/speakers-block-2/build/index.js | 2 +- .../includes/speaker-block.php | 1 - .../plugins/speakers-block-2/src/edit.js | 19 +------------------ 6 files changed, 9 insertions(+), 25 deletions(-) diff --git a/web/wp-content/plugins/speakers-block-2/block-speakers-block.php b/web/wp-content/plugins/speakers-block-2/block-speakers-block.php index 1c1a7c77..87a11ebb 100644 --- a/web/wp-content/plugins/speakers-block-2/block-speakers-block.php +++ b/web/wp-content/plugins/speakers-block-2/block-speakers-block.php @@ -44,7 +44,12 @@ function ( $speaker ) { $attributes['speakers'] ); - $sched_event_id = $attributes['schedEventID'] ?? ''; + global $post; + $sched_event_id = null; + if (function_exists('lfe_get_event_parent_id')) { + $parent_id = lfe_get_event_parent_id( $post ); + $sched_event_id = get_post_meta( $parent_id, 'lfes_sched_event_id', true ); + } $speakers_query = new WP_Query( array( diff --git a/web/wp-content/plugins/speakers-block-2/block.json b/web/wp-content/plugins/speakers-block-2/block.json index a1895f9f..c69d4a1d 100644 --- a/web/wp-content/plugins/speakers-block-2/block.json +++ b/web/wp-content/plugins/speakers-block-2/block.json @@ -25,9 +25,6 @@ "speakers": { "type": "array", "default": [] - }, - "schedEventID": { - "type": "string" } }, "textdomain": "speakers-block-2", diff --git a/web/wp-content/plugins/speakers-block-2/build/index.asset.php b/web/wp-content/plugins/speakers-block-2/build/index.asset.php index cf0cb120..5ccc9bb7 100644 --- a/web/wp-content/plugins/speakers-block-2/build/index.asset.php +++ b/web/wp-content/plugins/speakers-block-2/build/index.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '3158526a5552f3f9ce81'); + array('react', 'react-dom', 'wp-block-editor', 'wp-blocks'), 'version' => '19787af58ebe2e768e3b'); diff --git a/web/wp-content/plugins/speakers-block-2/build/index.js b/web/wp-content/plugins/speakers-block-2/build/index.js index 0d236b51..70551be8 100644 --- a/web/wp-content/plugins/speakers-block-2/build/index.js +++ b/web/wp-content/plugins/speakers-block-2/build/index.js @@ -1 +1 @@ -(()=>{"use strict";var e={459:e=>{e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=void 0,o=void 0,i=void 0,a=[];return function(){var l=function(e){return"function"==typeof e?e():e}(t),u=(new Date).getTime(),c=!r||u-r>l;r=u;for(var d=arguments.length,p=Array(d),f=0;f{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},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),v=l(n),g=0;g{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case g:case v:case l:return e;default:return t}}case o:return t}}}function O(e){return x(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=v,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||x(e)===c},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===m)},t.typeOf=x},363:(e,t,n)=>{e.exports=n(799)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=window.wp.blocks,o=window.React;var i=n.n(o);const a=window.wp.blockEditor,s=window.wp.components;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?M(H,--F):0,L--,10===N&&(L=1,V--),N}function U(){return N=F2||Y(N)>3?"":" "}function J(e,t){for(;--t&&U()&&!(N<48||N>102||N>57&&N<65||N>70&&N<97););return W(e,_()+(t<6&&32==$()&&32==U()))}function Z(e){for(;U();)switch(N){case e:return F;case 34:case 39:34!==e&&39!==e&&Z(N);break;case 40:41===e&&Z(e);break;case 92:U()}return F}function Q(e,t){for(;U()&&e+N!==57&&(e+N!==84||47!==$()););return"/*"+W(t,F-1)+"*"+C(47===e?e:U())}function ee(e){for(;!Y($());)U();return W(e,F)}var te="-ms-",ne="-moz-",re="-webkit-",oe="comm",ie="rule",ae="decl",se="@keyframes";function le(e,t){for(var n="",r=P(e),o=0;o0&&k(S)-d&&T(f>32?he(S+";",r,n,d-1):he(D(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(T(O=pe(S,t,n,u,c,o,s,y,w=[],x=[],d),i),123===b)if(0===c)de(S,t,O,O,w,i,d,s,x);else switch(99===p&&110===M(S,3)?100:p){case 100:case 108:case 109:case 115:de(e,O,O,r&&T(pe(e,O,O,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:de(S,O,O,O,[""],x,0,s,x)}}u=c=f=0,v=m=1,y=S="",d=a;break;case 58:d=1+k(S),f=h;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==z())continue;switch(S+=C(b),b*v){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(k(S)-1)*m,m=1;break;case 64:45===$()&&(S+=K(U())),p=$(),c=d=k(y=S+=ee(_())),b++;break;case 45:45===h&&2==k(S)&&(v=0)}}return i}function pe(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=P(p),h=0,v=0,g=0;h0?p[m]+" "+b:D(b,/&\f/g,p[m])))&&(l[g++]=y);return j(e,t,n,0===o?ie:s,l,u,c)}function fe(e,t,n){return j(e,t,n,oe,C(N),R(e,2,-2),0)}function he(e,t,n,r){return j(e,t,n,ae,R(e,0,r),R(e,r+1,-1),r)}var ve=function(e,t,n){for(var r=0,o=0;r=o,o=$(),38===r&&12===o&&(t[n]=1),!Y(o);)U();return W(e,F)},ge=new WeakMap,me=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)||ge.get(n))&&!r){ge.set(e,!0);for(var o=[],i=function(e,t){return G(function(e,t){var n=-1,r=44;do{switch(Y(r)){case 0:38===r&&12===$()&&(t[n]=1),e[n]+=ve(F-1,t,n);break;case 2:e[n]+=K(r);break;case 4:if(44===r){e[++n]=58===$()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=C(r)}}while(r=U());return e}(X(e),t))}(t,o),a=n.props,s=0,l=0;s6)switch(M(e,t+1)){case 109:if(45!==M(e,t+4))break;case 102:return D(e,/(.+:)(.+)-([^]+)/,"$1"+re+"$2-$3$1"+ne+(108==M(e,t+3)?"$3":"$2-$3"))+e;case 115:return~I(e,"stretch")?ye(D(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==M(e,t+1))break;case 6444:switch(M(e,k(e)-3-(~I(e,"!important")&&10))){case 107:return D(e,":",":"+re)+e;case 101:return D(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+re+(45===M(e,14)?"inline-":"")+"box$3$1"+re+"$2$3$1"+te+"$2box$3")+e}break;case 5936:switch(M(e,t+11)){case 114:return re+e+te+D(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return re+e+te+D(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return re+e+te+D(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return re+e+te+e+e}return e}var we=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ae:e.return=ye(e.value,e.length);break;case se:return le([B(e,{value:D(e.value,"@","@"+re)})],r);case ie:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return le([B(e,{props:[D(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return le([B(e,{props:[D(t,/:(plac\w+)/,":"+re+"input-$1")]}),B(e,{props:[D(t,/:(plac\w+)/,":-moz-$1")]}),B(e,{props:[D(t,/:(plac\w+)/,te+"input-$1")]})],r)}return""}))}}],xe=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,i=e.stylisPlugins||we,a={},s=[];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)+l;return{name:u,styles:o,next:Le}}var Ne=!!o.useInsertionEffect&&o.useInsertionEffect,He=Ne||function(e){return e()},je=(Ne||o.useLayoutEffect,o.createContext("undefined"!=typeof HTMLElement?xe({key:"css"}):null)),Be=(je.Provider,function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(je);return e(t,r,n)}))}),ze=o.createContext({}),Ue={}.hasOwnProperty,$e="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_e=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Oe(t,n,r),He((function(){return function(e,t,n){Oe(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},We=Be((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[$e],a=[r],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=Fe(a,void 0,o.useContext(ze));s+=t.key+"-"+l.name;var u={};for(var c in e)Ue.call(e,c)&&"css"!==c&&c!==$e&&(u[c]=e[c]);return u.className=s,n&&(u.ref=n),o.createElement(o.Fragment,null,o.createElement(_e,{cache:t,serialized:l,isStringTag:"string"==typeof i}),o.createElement(i,u))})),Ye=We,Xe=(n(146),function(e,t){var n=arguments;if(null==t||!Ue.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Ye,i[1]=function(e,t){var n={};for(var r in t)Ue.call(t,r)&&(n[r]=t[r]);return n[$e]=e,n}(e,t);for(var a=2;a({x:e,y:e});function rt(e){return at(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function it(e){var t;return null==(t=(at(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function at(e){return e instanceof Node||e instanceof ot(e).Node}function st(e){return e instanceof Element||e instanceof ot(e).Element}function lt(e){return e instanceof HTMLElement||e instanceof ot(e).HTMLElement}function ut(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot)}function ct(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dt(e){return ot(e).getComputedStyle(e)}function pt(e){const t=function(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||ut(e)&&e.host||it(e);return ut(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(rt(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&ct(t)?t:pt(t)}function ft(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=pt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=ot(o);if(i){const e=ht(a);return t.concat(a,a.visualViewport||[],ct(o)?o:[],e&&n?ft(e):[])}return t.concat(o,ft(o,[],n))}function ht(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vt(e){return st(e)?e:e.contextElement}function gt(e){const t=vt(e);if(!lt(t))return nt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=lt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=et(n)!==i||et(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?et(n.width):n.width)/r,s=(i?et(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const mt=nt(0);function bt(e){const t=ot(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:mt}function yt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=vt(e);let a=nt(1);t&&(r?st(r)&&(a=gt(r)):a=gt(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ot(e))&&t}(i,n,r)?bt(i):nt(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=ot(i),t=r&&st(r)?ot(r):r;let n=e,o=ht(n);for(;o&&r&&t!==n;){const e=gt(o),t=o.getBoundingClientRect(),r=dt(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,n=ot(o),o=ht(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}const wt=o.useLayoutEffect;var xt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ot=function(){};function Ct(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function Rt(e){return Mt(e)?window.pageYOffset:e.scrollTop}function kt(e,t){Mt(e)?window.scrollTo(0,t):e.scrollTop=t}function Pt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ot,o=Rt(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;kt(e,l),an.bottom?kt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!a)return i&&Pt(l,E,I),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&O>=r)return i&&Pt(l,E,I),{placement:"bottom",maxHeight:a?O-y:S-y};if("auto"===o||a){var M=t,R=a?x:C;return R>=r&&(M=Math.min(R-y-s,t)),{placement:"top",maxHeight:M}}if("bottom"===o)return i&&kt(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(C>=h&&!a)return i&&Pt(l,D,I),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&x>=r){var k=t;return(!a&&C>=r||a&&x>=r)&&(k=a?x-w:C-w),i&&Pt(l,D,I),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:b});h(o.maxHeight),m(o.placement),null==u||u(o.placement)}}),[r,i,a,s,n,u,b]),t({ref:c,placerProps:f(f({},e),{},{placement:g||Wt(i),maxHeight:p})})},Gt=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return f({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Kt=Gt,qt=Gt,Jt=["size"],Zt=["innerProps","isRtl","size"],Qt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},en=function(e){var t=e.size,n=qe(e,Jt);return Xe("svg",l({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Qt},n))},tn=function(e){return Xe(en,l({size:20},e),Xe("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"}))},nn=function(e){return Xe(en,l({size:20},e),Xe("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"}))},rn=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return f({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},on=rn,an=rn,sn=function(){var e=Ge.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_"}}}(Ut||($t=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],_t||(_t=$t.slice(0)),Ut=Object.freeze(Object.defineProperties($t,{raw:{value:Object.freeze(_t)}})))),ln=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ge({animation:"".concat(sn," 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"},"","")})},un=["data"],cn=["innerRef","isDisabled","isHidden","inputClassName"],dn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":f({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},dn)},fn=function(e){return f({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},dn)},hn=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)},vn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",l({},It(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(tn,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",l({ref:o},It(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",l({},It(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(nn,null))},DownChevron:nn,CrossIcon:tn,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,u=e.label,c=e.theme,d=e.selectProps;return Xe("div",l({},It(e,"group",{group:!0}),s),Xe(i,l({},a,{selectProps:d,theme:c,getStyles:r,getClassNames:o,cx:n}),u),Xe("div",null,t))},GroupHeading:function(e){var t=Dt(e);t.data;var n=qe(t,un);return Xe("div",l({},It(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",l({},It(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",l({},t,It(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Dt(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,u=qe(r,cn);return Xe("div",l({},It(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",l({className:t({input:!0},s),ref:o,style:fn(a),disabled:i},u)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=qe(e,Zt);return Xe("div",l({},It(f(f({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(ln,{delay:0,offset:n}),Xe(ln,{delay:160,offset:!0}),Xe(ln,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Xe("div",l({},It(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Xe("div",l({},It(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,s=e.menuPosition,u=(0,o.useRef)(null),c=(0,o.useRef)(null),d=Ke((0,o.useState)(Wt(a)),2),p=d[0],h=d[1],v=(0,o.useMemo)((function(){return{setPortalPlacement:h}}),[]),g=Ke((0,o.useState)(null),2),m=g[0],b=g[1],y=(0,o.useCallback)((function(){if(r){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}}(r),t="fixed"===s?0:window.pageYOffset,n=e[p]+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)||b({offset:n,rect:e})}}),[r,s,p,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);wt((function(){y()}),[y]);var w=(0,o.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&u.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=vt(e),c=o||i?[...u?ft(u):[],...ft(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=it(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-tt(c)+"px "+-tt(o.clientWidth-(u+d))+"px "+-tt(o.clientHeight-(c+p))+"px "+-tt(u)+"px",threshold:Qe(0,Ze(1,l))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let v=l?yt(e):null;return l&&function t(){const r=yt(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,u.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);wt((function(){w()}),[w]);var x=(0,o.useCallback)((function(e){u.current=e,w()}),[w]);if(!t&&"fixed"!==s||!m)return null;var O=Xe("div",l({ref:x},It(f(f({},e),{},{offset:m.offset,position:s,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Xe(Yt.Provider,{value:v},t?(0,Je.createPortal)(O,t):O)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=qe(e,zt);return Xe("div",l({},It(f(f({},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=qe(e,Bt);return Xe("div",l({},It(f(f({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Xe(l,{data:r,innerProps:f(f({},It(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Xe(u,{data:r,innerProps:f({},It(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xe(c,{data:r,innerProps:f(f({},It(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:hn,MultiValueLabel:hn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",l({role:"button"},n),t||Xe(tn,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",l({},It(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",l({},It(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Xe("div",l({},It(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Xe("div",l({},It(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 Xe("div",l({},It(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},gn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(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,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},xn=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,u=e.id,c=e.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,h=l.inputValue,v=l.isMulti,g=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,y=l.options,w=l.screenReaderStatus,x=l.tabSelectsValue,O=l.isLoading,C=l["aria-label"],S=l["aria-live"],E=(0,o.useMemo)((function(){return f(f({},wn),d||{})}),[d]),D=(0,o.useMemo)((function(){var e,n="";if(t&&E.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?p(u):"",d=o||a||void 0,h=d?d.map(p):[],v=f({isDisabled:u&&g(u,s),label:c,labels:h},t);n=E.onChange(v)}return n}),[t,E,g,s,p]),I=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&s&&s.includes(n));if(t&&E.onFocus){var a={focused:t,label:p(t),isDisabled:g(t,s),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:s,isAppleDevice:c};e=E.onFocus(a)}return e}),[n,r,p,g,E,i,s,c]),M=(0,o.useMemo)((function(){var e="";if(b&&y.length&&!O&&E.onFilter){var t=w({count:i.length});e=E.onFilter({inputValue:h,resultsMessage:t})}return e}),[i,h,b,E,y,w,O]),R="initial-input-focus"===(null==t?void 0:t.action),k=(0,o.useMemo)((function(){var e="";if(E.guidance){var t=r?"value":b?"menu":"input";e=E.guidance({"aria-label":C,context:t,isDisabled:n&&g(n,s),isMulti:v,isSearchable:m,tabSelectsValue:x,isInitialFocus:R})}return e}),[C,n,r,v,g,m,b,E,s,x,R]),P=Xe(o.Fragment,null,Xe("span",{id:"aria-selection"},D),Xe("span",{id:"aria-focused"},I),Xe("span",{id:"aria-results"},M),Xe("span",{id:"aria-guidance"},k));return Xe(o.Fragment,null,Xe(yn,{id:u},R&&P),Xe(yn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!R&&P))},On=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Cn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Sn={},En=0;En1?t-1:0),r=1;r0,v=d-p-u,g=!1;v>t&&s.current&&(r&&r(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>v?(n&&!s.current&&n(e),f.scrollTop=d,g=!0,s.current=!0):!h&&-t>u&&(i&&!l.current&&i(e),f.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),p=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,o.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),v=(0,o.useCallback)((function(e){if(e){var t=!!Nt&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),g=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return(0,o.useEffect)((function(){if(t){var e=c.current;return v(e),function(){g(e)}}}),[t,v,g]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),a=(0,o.useRef)(null),s=(0,o.useCallback)((function(e){if(Bn){var t=document.body,n=t&&t.style;if(r&&Ln.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&zn<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(An).forEach((function(e){var t=An[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&jn()&&(t.addEventListener("touchmove",Fn,Un),e&&(e.addEventListener("touchstart",Hn,Un),e.addEventListener("touchmove",Nn,Un))),zn+=1}}),[r]),l=(0,o.useCallback)((function(e){if(Bn){var t=document.body,n=t&&t.style;zn=Math.max(zn-1,0),r&&zn<1&&Ln.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&jn()&&(t.removeEventListener("touchmove",Fn,Un),e&&(e.removeEventListener("touchstart",Hn,Un),e.removeEventListener("touchmove",Nn,Un)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return Xe(o.Fragment,null,n&&Xe("div",{onClick:$n,css:Wn}),t((function(e){i(e),a(e)})))}var Xn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Gn=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Xn,value:"",onChange:function(){}})};function Kn(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 qn(){return Kn(/^Mac/i)}var Jn={clearIndicator:an,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return f({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:on,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 f({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return f({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return f(f({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},pn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return f({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:qt,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return f((d(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),d(n,"position","absolute"),d(n,"width","100%"),d(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return f({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return f({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return f({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return f({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Kt,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return f({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return f({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return f({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return f({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Zn={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}},Qn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Vt(),captureMenuScroll:!Vt(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=f({ignoreCase:!0,ignoreAccents:!0,stringify:Pn,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?kn(t):t,u=a?kn(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Rn(l),u=Mn(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function er(e,t,n,r){return{type:"option",data:t,isDisabled:lr(e,t,n),isSelected:ur(e,t,n),label:ar(e,t),value:sr(e,t),index:r}}function tr(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return er(e,n,t,r)})).filter((function(t){return or(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=er(e,n,t,r);return or(e,i)?i:void 0})).filter(Ht)}function nr(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,w(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function rr(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,w(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 or(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!dr(e)||!i)&&cr(e,{label:a,value:s,data:o},r)}var ir=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},ar=function(e,t){return e.getOptionLabel(t)},sr=function(e,t){return e.getOptionValue(t)};function lr(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ur(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=sr(e,t);return n.some((function(t){return sr(e,t)===r}))}function cr(e,t,n){return!e.filterOption||e.filterOption(t,n)}var dr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},pr=1,fr=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&&v(e,t)}(n,e);var t=function(e){var t=m();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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:""},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.isAppleDevice=qn()||Kn(/^iPhone/i)||Kn(/^iPad/i)||qn()&&navigator.maxTouchPoints>1,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(w(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=jt(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(jt(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=jt(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return ir(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return rr(tr(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||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return dr(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,v=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)r.removeValue(v);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||p&&r.isOptionSelected(h,g))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:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)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||++pr),r.state.selectValue=Et(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=ir(o,i[a])}return r}return function(e,t,n){t&&h(e.prototype,t),n&&h(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&&Tt(this.menuListRef,this.focusedOptionRef)}},{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&&(Tt(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&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,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Zn):f(f({},Zn),this.props.theme):Zn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return lr(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ur(this.props,e,t)}},{key:"filterOption",value:function(e,t){return cr(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,r=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,u=e.menuIsOpen,c=e.required,d=this.getComponents().Input,p=this.state,h=p.inputIsHidden,v=p.ariaSelection,g=this.commonProps,m=r||this.getElementId("input"),b=f(f(f({"aria-autocomplete":"list","aria-expanded":u,"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":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==v?void 0:v.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(d,l({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},b)):o.createElement(Vn,l({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ot,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,u=t.Placeholder,c=this.commonProps,d=this.props,p=d.controlShouldRenderValue,f=d.isDisabled,h=d.isMulti,v=d.inputValue,g=d.placeholder,m=this.state,b=m.selectValue,y=m.focusedValue,w=m.isFocused;if(!this.hasValue()||!p)return v?null:o.createElement(u,l({},c,{key:"placeholder",isDisabled:f,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),g);if(h)return b.map((function(t,s){var u=t===y,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,l({},c,{components:{Container:r,Label:i,Remove:a},isFocused:u,isDisabled:f,key:d,index:s,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(v)return null;var x=b[0];return o.createElement(s,l({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,l({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?o.createElement(e,l({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.createElement(n,l({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,l({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,u=t.LoadingMessage,c=t.NoOptionsMessage,d=t.Option,p=this.commonProps,f=this.state.focusedOption,h=this.props,v=h.captureMenuScroll,g=h.inputValue,m=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,x=h.menuIsOpen,O=h.menuPlacement,C=h.menuPosition,S=h.menuPortalTarget,E=h.menuShouldBlockScroll,D=h.menuShouldScrollIntoView,I=h.noOptionsMessage,M=h.onMenuScrollToTop,R=h.onMenuScrollToBottom;if(!x)return null;var k,P=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,u=t.label,c=t.value,h=f===i,v=a?void 0:function(){return e.onOptionHover(i)},g=a?void 0:function(){return e.selectOption(i)},m="".concat(e.getElementId("option"),"-").concat(n),b={id:m,onClick:g,onMouseMove:v,onMouseOver:v,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return o.createElement(d,l({},p,{innerProps:b,data:i,isDisabled:a,isSelected:s,key:m,label:u,type:r,value:c,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,u="".concat(e.getElementId("group"),"-").concat(s),c="".concat(u,"-heading");return o.createElement(n,l({},p,{key:u,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(m){var T=b({inputValue:g});if(null===T)return null;k=o.createElement(u,p,T)}else{var V=I({inputValue:g});if(null===V)return null;k=o.createElement(c,p,V)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:O,menuPosition:C,menuShouldScrollIntoView:D},A=o.createElement(Xt,l({},p,L),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,u=r.maxHeight;return o.createElement(i,l({},p,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:s}),o.createElement(Yn,{captureEnabled:v,onTopArrive:M,onBottomArrive:R,lockEnabled:E},(function(t){return o.createElement(a,l({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:u,focusedOption:f}),k)})))}));return S||"fixed"===C?o.createElement(s,l({},p,{appendTo:S,controlElement:this.controlRef,menuPlacement:O,menuPosition:C}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!r)return o.createElement(Gn,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(n){var u=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,u=this.getFocusableOptions();return o.createElement(xn,l({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,u=a.id,c=a.isDisabled,d=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return o.createElement(r,l({},f,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:p}),this.renderLiveRegion(),o.createElement(t,l({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:p,menuIsOpen:d}),o.createElement(i,l({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,l({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,h=e.isMulti,v=Et(c),g={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var m=d?function(e,t){return nr(tr(e,t))}(e,v):[],b=d?rr(tr(e,v),"".concat(l,"-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,m);g={selectValue:v,focusedOption:w,focusedOptionId:ir(b,w),focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},O=i,C=a&&s;return a&&!C&&(O={value:jt(h,v,v[0]||null),options:v,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),f(f(f({},g),x),{},{prevProps:e,ariaSelection:O,prevWasFocused:C})}}]),n}(o.Component);fr.defaultProps=Qn;var hr=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],vr=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],gr=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,i=void 0!==r&&r,a=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,u=e.onInputChange,c=e.filterOption,p=void 0===c?null:c,h=qe(e,vr),v=h.inputValue,g=(0,o.useRef)(void 0),m=(0,o.useRef)(!1),b=Ke((0,o.useState)(Array.isArray(n)?n:void 0),2),y=b[0],w=b[1],x=Ke((0,o.useState)(void 0!==v?v:""),2),O=x[0],C=x[1],S=Ke((0,o.useState)(!0===n),2),E=S[0],D=S[1],I=Ke((0,o.useState)(void 0),2),M=I[0],R=I[1],k=Ke((0,o.useState)([]),2),P=k[0],T=k[1],V=Ke((0,o.useState)(!1),2),L=V[0],A=V[1],F=Ke((0,o.useState)({}),2),N=F[0],H=F[1],j=Ke((0,o.useState)(void 0),2),B=j[0],z=j[1],U=Ke((0,o.useState)(void 0),2),$=U[0],_=U[1];i!==$&&(H({}),_(i)),n!==B&&(w(Array.isArray(n)?n:void 0),z(n)),(0,o.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var W=(0,o.useCallback)((function(e,t){if(!a)return t();var n=a(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[a]);(0,o.useEffect)((function(){!0===n&&W(O,(function(e){m.current&&(w(e||[]),D(!!g.current))}))}),[]);var Y=(0,o.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 g.current=void 0,C(""),R(""),T([]),D(!1),void A(!1);if(i&&N[n])C(n),R(n),T(N[n]),D(!1),A(!1);else{var r=g.current={};C(n),D(!0),A(!M),W(n,(function(e){m&&r===g.current&&(g.current=void 0,D(!1),R(n),T(e||[]),A(!1),H(e?f(f({},N),{},d({},n,e)):N))}))}}),[i,W,M,N,u]),X=L?[]:O&&M?P:y||[];return f(f({},h),{},{options:X,isLoading:E||l,onInputChange:Y,filterOption:p})}(e),r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,p=e.onMenuClose,h=e.onMenuOpen,v=e.value,g=qe(e,hr),m=Ke((0,o.useState)(void 0!==l?l:n),2),b=m[0],y=m[1],w=Ke((0,o.useState)(void 0!==u?u:i),2),x=w[0],O=w[1],C=Ke((0,o.useState)(void 0!==v?v:s),2),S=C[0],E=C[1],D=(0,o.useCallback)((function(e,t){"function"==typeof c&&c(e,t),E(e)}),[c]),I=(0,o.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),M=(0,o.useCallback)((function(){"function"==typeof h&&h(),O(!0)}),[h]),R=(0,o.useCallback)((function(){"function"==typeof p&&p(),O(!1)}),[p]),k=void 0!==l?l:b,P=void 0!==u?u:x,T=void 0!==v?v:S;return f(f({},g),{},{inputValue:k,menuIsOpen:P,onChange:D,onInputChange:I,onMenuClose:R,onMenuOpen:M,value:T})}(n);return o.createElement(fr,l({ref:t},r))})),mr=gr;const br="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function yr(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function wr(e){return"nodeType"in e}function xr(e){var t,n;return e?yr(e)?e:wr(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Or(e){const{Document:t}=xr(e);return e instanceof t}function Cr(e){return!yr(e)&&e instanceof xr(e).HTMLElement}function Sr(e){return e instanceof xr(e).SVGElement}function Er(e){return e?yr(e)?e.document:wr(e)?Or(e)?e:Cr(e)||Sr(e)?e.ownerDocument:document:document:document}const Dr=br?o.useLayoutEffect:o.useEffect;function Ir(e){const t=(0,o.useRef)(e);return Dr((()=>{t.current=e})),(0,o.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{n.current!==e&&(n.current=e)}),t),n}function Rr(e,t){const n=(0,o.useRef)();return(0,o.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function kr(e){const t=Ir(e),n=(0,o.useRef)(null),r=(0,o.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function Pr(e){const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current}let Tr={};function Vr(e,t){return(0,o.useMemo)((()=>{if(t)return t;const n=null==Tr[e]?0:Tr[e]+1;return Tr[e]=n,e+"-"+n}),[e,t])}function Lr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const Ar=Lr(1),Fr=Lr(-1);function Nr(e){if(!e)return!1;const{KeyboardEvent:t}=xr(e.target);return t&&e instanceof t}function Hr(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=xr(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const jr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[jr.Translate.toString(e),jr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Br="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zr(e){return e.matches(Br)?e:e.querySelector(Br)}const Ur={display:"none"};function $r(e){let{id:t,value:n}=e;return i().createElement("div",{id:t,style:Ur},n)}function _r(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return i().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const Wr=(0,o.createContext)(null),Yr={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Xr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Gr(e){let{announcements:t=Xr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=Yr}=e;const{announce:s,announcement:l}=function(){const[e,t]=(0,o.useState)("");return{announce:(0,o.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),u=Vr("DndLiveRegion"),[c,d]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{d(!0)}),[]),function(e){const t=(0,o.useContext)(Wr);(0,o.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,o.useMemo)((()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&s(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;s(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;s(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;s(t.onDragCancel({active:n,over:r}))}})),[s,t])),!c)return null;const p=i().createElement(i().Fragment,null,i().createElement($r,{id:r,value:a.draggable}),i().createElement(_r,{id:u,announcement:l}));return n?(0,Je.createPortal)(p,n):p}var Kr;function qr(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Kr||(Kr={}));const Jr=Object.freeze({x:0,y:0});function Zr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Qr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function eo(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}const to=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=eo(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=eo(r),a=o.reduce(((e,t,r)=>{return e+(o=n[r],i=t,Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)));var o,i}),0),s=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(Zr)};function no(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=no(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Qr)};function oo(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jr}function io(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ao=io(1);const so={ignoreTransform:!1};function lo(e,t){void 0===t&&(t=so);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=xr(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function uo(e){return lo(e,{ignoreTransform:!0})}function co(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(Or(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Cr(o)||Sr(o))return n;if(n.includes(o))return n;const i=xr(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=xr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=xr(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function po(e){const[t]=co(e,1);return null!=t?t:null}function fo(e){return br&&e?yr(e)?e:wr(e)?Or(e)||e===Er(e).scrollingElement?window:Cr(e)?e:null:null:null}function ho(e){return yr(e)?e.scrollX:e.scrollLeft}function vo(e){return yr(e)?e.scrollY:e.scrollTop}function go(e){return{x:ho(e),y:vo(e)}}var mo;function bo(e){return!(!br||!e)&&e===document.scrollingElement}function yo(e){const t={x:0,y:0},n=bo(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(mo||(mo={}));const wo={x:.2,y:.2};function xo(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=wo);const{isTop:u,isBottom:c,isLeft:d,isRight:p}=yo(e),f={x:0,y:0},h={x:0,y:0},v=t.height*o.y,g=t.width*o.x;return!u&&i<=t.top+v?(f.y=mo.Backward,h.y=r*Math.abs((t.top+v-i)/v)):!c&&l>=t.bottom-v&&(f.y=mo.Forward,h.y=r*Math.abs((t.bottom-v-l)/v)),!p&&s>=t.right-g?(f.x=mo.Forward,h.x=r*Math.abs((t.right-g-s)/g)):!d&&a<=t.left+g&&(f.x=mo.Backward,h.x=r*Math.abs((t.left+g-a)/g)),{direction:f,speed:h}}function Oo(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Co(e){return e.reduce(((e,t)=>Ar(e,go(t))),Jr)}const So=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+ho(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+vo(t)),0)}]];class Eo{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=co(t),r=Co(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of So)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Do{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Io(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Mo,Ro,ko;function Po(e){e.preventDefault()}function To(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Mo||(Mo={})),(ko=Ro||(Ro={})).Space="Space",ko.Down="ArrowDown",ko.Right="ArrowRight",ko.Left="ArrowLeft",ko.Up="ArrowUp",ko.Esc="Escape",ko.Enter="Enter";const Vo={start:[Ro.Space,Ro.Enter],cancel:[Ro.Esc],end:[Ro.Space,Ro.Enter]},Lo=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ro.Right:return{...n,x:n.x+25};case Ro.Left:return{...n,x:n.x-25};case Ro.Down:return{...n,y:n.y+25};case Ro.Up:return{...n,y:n.y-25}}};class Ao{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Do(Er(t)),this.windowListeners=new Do(xr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Mo.Resize,this.handleCancel),this.windowListeners.add(Mo.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Mo.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=lo),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);po(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Jr)}handleKeyDown(e){if(Nr(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Vo,coordinateGetter:i=Lo,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Jr;this.referenceCoordinates||(this.referenceCoordinates=u);const c=i(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Fr(c,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:u,maxScroll:d,minScroll:p}=yo(n),f=Oo(n),h={x:Math.min(o===Ro.Right?f.right-f.width/2:f.right,Math.max(o===Ro.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(o===Ro.Down?f.bottom-f.height/2:f.bottom,Math.max(o===Ro.Down?f.top:f.top+f.height/2,c.y))},v=o===Ro.Right&&!s||o===Ro.Left&&!l,g=o===Ro.Down&&!u||o===Ro.Up&&!i;if(v&&h.x!==c.x){const e=n.scrollLeft+t.x,i=o===Ro.Right&&e<=d.x||o===Ro.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Ro.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&h.y!==c.y){const e=n.scrollTop+t.y,i=o===Ro.Down&&e<=d.y||o===Ro.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Ro.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,Ar(Fr(c,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Fo(e){return Boolean(e&&"distance"in e)}function No(e){return Boolean(e&&"delay"in e)}Ao.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Vo,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Ho{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=xr(e);return e instanceof t?e:Er(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=Er(i),this.documentListeners=new Do(this.document),this.listeners=new Do(n),this.windowListeners=new Do(xr(i)),this.initialCoordinates=null!=(r=Hr(o))?r:Jr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Mo.Resize,this.handleCancel),this.windowListeners.add(Mo.DragStart,Po),this.windowListeners.add(Mo.VisibilityChange,this.handleCancel),this.windowListeners.add(Mo.ContextMenu,Po),this.documentListeners.add(Mo.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(No(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Fo(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Mo.Click,To,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Mo.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=Hr(e))?t:Jr,l=Fr(r,s);if(!n&&a){if(Fo(a)){if(null!=a.tolerance&&Io(l,a.tolerance))return this.handleCancel();if(Io(l,a.distance))return this.handleStart()}return No(a)&&Io(l,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Ro.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const jo={move:{name:"pointermove"},end:{name:"pointerup"}};class Bo extends Ho{constructor(e){const{event:t}=e,n=Er(t.target);super(e,jo,n)}}Bo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const zo={move:{name:"mousemove"},end:{name:"mouseup"}};var Uo;!function(e){e[e.RightClick=2]="RightClick"}(Uo||(Uo={})),class extends Ho{constructor(e){super(e,zo,Er(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Uo.RightClick&&(null==r||r({event:n}),!0)}}];const $o={move:{name:"touchmove"},end:{name:"touchend"}};var _o,Wo;(class extends Ho{constructor(e){super(e,$o)}static setup(){return window.addEventListener($o.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener($o.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_o||(_o={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Wo||(Wo={}));const Yo={x:{[mo.Backward]:!1,[mo.Forward]:!1},y:{[mo.Backward]:!1,[mo.Forward]:!1}};var Xo,Go;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Xo||(Xo={})),function(e){e.Optimized="optimized"}(Go||(Go={}));const Ko=new Map;function qo(e,t){return Rr((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Jo(e){let{callback:t,disabled:n}=e;const r=Ir(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Zo(e){return new Eo(lo(e),e)}function Qo(e,t,n){void 0===t&&(t=Zo);const[r,i]=(0,o.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=Ir(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=Jo({callback:i});return Dr((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const ei=[];function ti(e,t){void 0===t&&(t=[]);const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{n.current=null}),t),(0,o.useEffect)((()=>{const t=e!==Jr;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?Fr(e,n.current):Jr}function ni(e){return(0,o.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const ri=[];const oi=[{sensor:Bo,options:{}},{sensor:Ao,options:{}}],ii={current:{}},ai={draggable:{measure:uo},droppable:{measure:uo,strategy:Xo.WhileDragging,frequency:Go.Optimized},dragOverlay:{measure:lo}};class si extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const li={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new si,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:qr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ai,measureDroppableContainers:qr,windowRect:null,measuringScheduled:!1},ui={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:qr,draggableNodes:new Map,over:null,measureDroppableContainers:qr},ci=(0,o.createContext)(ui),di=(0,o.createContext)(li);function pi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new si}}}function fi(e,t){switch(t.type){case Kr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Kr.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Kr.DragEnd:case Kr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Kr.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new si(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Kr.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new si(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Kr.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new si(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function hi(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=(0,o.useContext)(ci),a=Pr(r),s=Pr(null==n?void 0:n.id);return(0,o.useEffect)((()=>{if(!t&&!r&&a&&null!=s){if(!Nr(a))return;if(document.activeElement===a.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=zr(e);if(t){t.focus();break}}}))}}),[r,t,i,s,a]),null}const vi=(0,o.createContext)({...Jr,scaleX:1,scaleY:1});var gi;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(gi||(gi={}));const mi=(0,o.memo)((function(e){var t,n,r,a;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=oi,collisionDetection:p=ro,measuring:f,modifiers:h,...v}=e;const g=(0,o.useReducer)(fi,void 0,pi),[m,b]=g,[y,w]=function(){const[e]=(0,o.useState)((()=>new Set)),t=(0,o.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,o.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[x,O]=(0,o.useState)(gi.Uninitialized),C=x===gi.Initialized,{draggable:{active:S,nodes:E,translate:D},droppable:{containers:I}}=m,M=S?E.get(S):null,R=(0,o.useRef)({initial:null,translated:null}),k=(0,o.useMemo)((()=>{var e;return null!=S?{id:S,data:null!=(e=null==M?void 0:M.data)?e:ii,rect:R}:null}),[S,M]),P=(0,o.useRef)(null),[T,V]=(0,o.useState)(null),[L,A]=(0,o.useState)(null),F=Mr(v,Object.values(v)),N=Vr("DndDescribedBy",s),H=(0,o.useMemo)((()=>I.getEnabled()),[I]),j=function(e){return(0,o.useMemo)((()=>({draggable:{...ai.draggable,...null==e?void 0:e.draggable},droppable:{...ai.droppable,...null==e?void 0:e.droppable},dragOverlay:{...ai.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(f),{droppableRects:B,measureDroppableContainers:z,measuringScheduled:U}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=(0,o.useState)(null),{frequency:l,measure:u,strategy:c}=i,d=(0,o.useRef)(e),p=function(){switch(c){case Xo.Always:return!1;case Xo.BeforeDragging:return n;default:return!n}}(),f=Mr(p),h=(0,o.useCallback)((function(e){void 0===e&&(e=[]),f.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),v=(0,o.useRef)(null),g=Rr((t=>{if(p&&!n)return Ko;if(!t||t===Ko||d.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Eo(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,p,u]);return(0,o.useEffect)((()=>{d.current=e}),[e]),(0,o.useEffect)((()=>{p||h()}),[n,p]),(0,o.useEffect)((()=>{a&&a.length>0&&s(null)}),[JSON.stringify(a)]),(0,o.useEffect)((()=>{p||"number"!=typeof l||null!==v.current||(v.current=setTimeout((()=>{h(),v.current=null}),l))}),[l,p,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:null!=a}}(H,{dragging:C,dependencies:[D.x,D.y],config:j.droppable}),$=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return Rr((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(E,S),_=(0,o.useMemo)((()=>L?Hr(L):null),[L]),W=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof u?!1===u.enabled:!1===u,n=C&&!e&&!t;return"object"==typeof u?{...u,enabled:n}:{enabled:n}}(),Y=function(e,t){return qo(e,t)}($,j.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=(0,o.useRef)(!1),{x:s,y:l}="boolean"==typeof i?{x:i,y:i}:i;Dr((()=>{if(!s&&!l||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=oo(n(e),r);if(s||(o.x=0),l||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=po(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,s,l,r,n])}({activeNode:S?E.get(S):null,config:W.layoutShiftCompensation,initialRect:Y,measure:j.draggable.measure});const X=Qo($,j.draggable.measure,Y),G=Qo($?$.parentElement:null),K=(0,o.useRef)({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),q=I.getNodeFor(null==(t=K.current.over)?void 0:t.id),J=function(e){let{measure:t}=e;const[n,r]=(0,o.useState)(null),i=Jo({callback:(0,o.useCallback)((e=>{for(const{target:n}of e)if(Cr(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,o.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Cr(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[s,l]=kr(a);return(0,o.useMemo)((()=>({nodeRef:s,rect:n,setRef:l})),[n,s,l])}({measure:j.dragOverlay.measure}),Z=null!=(n=J.nodeRef.current)?n:$,Q=C?null!=(r=J.rect)?r:X:null,ee=Boolean(J.nodeRef.current&&J.rect),te=oo(ne=ee?null:X,qo(ne));var ne;const re=ni(Z?xr(Z):null),oe=function(e){const t=(0,o.useRef)(e),n=Rr((n=>e?n&&n!==ei&&e&&t.current&&e.parentNode===t.current.parentNode?n:co(e):ei),[e]);return(0,o.useEffect)((()=>{t.current=e}),[e]),n}(C?null!=q?q:$:null),ie=function(e,t){void 0===t&&(t=lo);const[n]=e,r=ni(n?xr(n):null),[i,a]=(0,o.useReducer)((function(){return e.length?e.map((e=>bo(e)?r:new Eo(t(e),e))):ri}),ri),s=Jo({callback:a});return e.length>0&&i===ri&&a(),Dr((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),a())}),[e]),i}(oe),ae=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(h,{transform:{x:D.x-te.x,y:D.y-te.y,scaleX:1,scaleY:1},activatorEvent:L,active:k,activeNodeRect:X,containerNodeRect:G,draggingNodeRect:Q,over:K.current.over,overlayNodeRect:J.rect,scrollableAncestors:oe,scrollableAncestorRects:ie,windowRect:re}),se=_?Ar(_,D):null,le=function(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(e),i=(0,o.useCallback)((e=>{const t=fo(e.target);t&&n((e=>e?(e.set(t,go(t)),new Map(e)):null))}),[]);return(0,o.useEffect)((()=>{const t=r.current;if(e!==t){o(t);const a=e.map((e=>{const t=fo(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,go(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=fo(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,o.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>Ar(e,t)),Jr):Co(e):Jr),[e,t])}(oe),ue=ti(le),ce=ti(le,[X]),de=Ar(ae,ue),pe=Q?ao(Q,ae):null,fe=k&&pe?p({active:k,collisionRect:pe,droppableRects:B,droppableContainers:H,pointerCoordinates:se}):null,he=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(fe),[ve,ge]=(0,o.useState)(null),me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ee?ae:Ar(ae,ce),null!=(a=null==ve?void 0:ve.rect)?a:null,X),be=(0,o.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==P.current)return;const o=E.get(P.current);if(!o)return;const i=e.nativeEvent,a=new n({active:P.current,activeNode:o,event:i,options:r,context:K,onStart(e){const t=P.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:r}=F.current,o={active:{id:t,data:n.data,rect:R}};(0,Je.unstable_batchedUpdates)((()=>{null==r||r(o),O(gi.Initializing),b({type:Kr.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o})}))},onMove(e){b({type:Kr.DragMove,coordinates:e})},onEnd:s(Kr.DragEnd),onCancel:s(Kr.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=K.current;let a=null;if(t&&o){const{cancelDrop:s}=F.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Kr.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Kr.DragCancel)}P.current=null,(0,Je.unstable_batchedUpdates)((()=>{b({type:e}),O(gi.Uninitialized),ge(null),V(null),A(null);const t=e===Kr.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=F.current[t];null==e||e(a),y({type:t,event:a})}}))}}(0,Je.unstable_batchedUpdates)((()=>{V(a),A(e.nativeEvent)}))}),[E]),ye=(0,o.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=E.get(r);if(null!==P.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},P.current=r,be(n,t))}),[E,be]),we=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(d,ye);!function(e){(0,o.useEffect)((()=>{if(!br)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(d),Dr((()=>{X&&x===gi.Initializing&&O(gi.Initialized)}),[X,x]),(0,o.useEffect)((()=>{const{onDragMove:e}=F.current,{active:t,activatorEvent:n,collisions:r,over:o}=K.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:de.x,y:de.y},over:o};(0,Je.unstable_batchedUpdates)((()=>{null==e||e(i),y({type:"onDragMove",event:i})}))}),[de.x,de.y]),(0,o.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=K.current;if(!e||null==P.current||!t||!o)return;const{onDragOver:i}=F.current,a=r.get(he),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,Je.unstable_batchedUpdates)((()=>{ge(s),null==i||i(l),y({type:"onDragOver",event:l})}))}),[he]),Dr((()=>{K.current={activatorEvent:L,active:k,activeNode:$,collisionRect:pe,collisions:fe,droppableRects:B,draggableNodes:E,draggingNode:Z,draggingNodeRect:Q,droppableContainers:I,over:ve,scrollableAncestors:oe,scrollAdjustedTranslate:de},R.current={initial:Q,translated:pe}}),[k,$,fe,pe,E,Z,Q,B,I,ve,oe,de]),function(e){let{acceleration:t,activator:n=_o.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=Wo.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=Pr(t);return Rr((e=>{if(n||!r||!e)return Yo;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[mo.Backward]:e.x[mo.Backward]||-1===o,[mo.Forward]:e.x[mo.Forward]||1===o},y:{[mo.Backward]:e.y[mo.Backward]||-1===i,[mo.Forward]:e.y[mo.Forward]||1===i}}}),[n,t,r])}({delta:p,disabled:!a}),[v,g]=function(){const e=(0,o.useRef)(null);return[(0,o.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,o.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),m=(0,o.useRef)({x:0,y:0}),b=(0,o.useRef)({x:0,y:0}),y=(0,o.useMemo)((()=>{switch(n){case _o.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case _o.DraggableRect:return i}}),[n,i,u]),w=(0,o.useRef)(null),x=(0,o.useCallback)((()=>{const e=w.current;if(!e)return;const t=m.current.x*b.current.x,n=m.current.y*b.current.y;e.scrollBy(t,n)}),[]),O=(0,o.useMemo)((()=>l===Wo.TreeOrder?[...c].reverse():c),[l,c]);(0,o.useEffect)((()=>{if(a&&c.length&&y){for(const e of O){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=xo(e,o,y,t,f);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return g(),w.current=e,v(x,s),m.current=a,void(b.current=i)}m.current={x:0,y:0},b.current={x:0,y:0},g()}else g()}),[t,x,r,g,a,s,JSON.stringify(y),JSON.stringify(h),v,c,O,d,JSON.stringify(f)])}({...W,delta:D,draggingRect:pe,pointerCoordinates:se,scrollableAncestors:oe,scrollableAncestorRects:ie});const xe=(0,o.useMemo)((()=>({active:k,activeNode:$,activeNodeRect:X,activatorEvent:L,collisions:fe,containerNodeRect:G,dragOverlay:J,draggableNodes:E,droppableContainers:I,droppableRects:B,over:ve,measureDroppableContainers:z,scrollableAncestors:oe,scrollableAncestorRects:ie,measuringConfiguration:j,measuringScheduled:U,windowRect:re})),[k,$,X,L,fe,G,J,E,I,B,ve,z,oe,ie,j,U,re]),Oe=(0,o.useMemo)((()=>({activatorEvent:L,activators:we,active:k,activeNodeRect:X,ariaDescribedById:{draggable:N},dispatch:b,draggableNodes:E,over:ve,measureDroppableContainers:z})),[L,we,k,X,b,N,E,ve,z]);return i().createElement(Wr.Provider,{value:w},i().createElement(ci.Provider,{value:Oe},i().createElement(di.Provider,{value:xe},i().createElement(vi.Provider,{value:me},c)),i().createElement(hi,{disabled:!1===(null==l?void 0:l.restoreFocus)})),i().createElement(Gr,{...l,hiddenTextDescribedById:N}))})),bi=(0,o.createContext)(null),yi="button",wi="Droppable";const xi={timeout:25};const Oi=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};function Ci(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Si(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function Ei(e){return null!==e&&e>=0}const Di=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Ci(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},Ii="Sortable",Mi=i().createContext({activeIndex:-1,containerId:Ii,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Di,disabled:{draggable:!1,droppable:!1}});function Ri(e){let{children:t,id:n,items:r,strategy:a=Di,disabled:s=!1}=e;const{active:l,dragOverlay:u,droppableRects:c,over:d,measureDroppableContainers:p}=(0,o.useContext)(di),f=Vr(Ii,n),h=Boolean(null!==u.rect),v=(0,o.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),g=null!=l,m=l?v.indexOf(l.id):-1,b=d?v.indexOf(d.id):-1,y=(0,o.useRef)(v),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{w&&g&&p(v)}),[w,v,g,p]),(0,o.useEffect)((()=>{y.current=v}),[v]);const C=(0,o.useMemo)((()=>({activeIndex:m,containerId:f,disabled:O,disableTransforms:x,items:v,overIndex:b,useDragOverlay:h,sortedRects:Si(v,c),strategy:a})),[m,f,O.draggable,O.droppable,x,v,b,c,h,a]);return i().createElement(Mi.Provider,{value:C},t)}const ki=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Ci(n,r,o).indexOf(t)},Pi=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!(!u||!r||s!==i&&o===a||!n&&(a===o||t!==l))},Ti={duration:200,easing:"ease"},Vi="transform",Li=jr.Transition.toString({property:Vi,duration:0,easing:"linear"}),Ai={roleDescription:"sortable"};function Fi(e){let{animateLayoutChanges:t=Pi,attributes:n,disabled:r,data:i,getNewIndex:a=ki,id:s,strategy:l,resizeObserverConfig:u,transition:c=Ti}=e;const{items:d,containerId:p,activeIndex:f,disabled:h,disableTransforms:v,sortedRects:g,overIndex:m,useDragOverlay:b,strategy:y}=(0,o.useContext)(Mi),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=d.indexOf(s),O=(0,o.useMemo)((()=>({sortable:{containerId:p,index:x,items:d},...i})),[p,i,x,d]),C=(0,o.useMemo)((()=>d.slice(d.indexOf(s))),[d,s]),{rect:S,node:E,isOver:D,setNodeRef:I}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Vr("Droppable"),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=(0,o.useContext)(ci),d=(0,o.useRef)({disabled:n}),p=(0,o.useRef)(!1),f=(0,o.useRef)(null),h=(0,o.useRef)(null),{disabled:v,updateMeasurementsFor:g,timeout:m}={...xi,...i},b=Mr(null!=g?g:r),y=Jo({callback:(0,o.useCallback)((()=>{p.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{c(Array.isArray(b.current)?b.current:[b.current]),h.current=null}),m)):p.current=!0}),[m]),disabled:v||!s}),w=(0,o.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),p.current=!1),e&&y.observe(e))}),[y]),[x,O]=kr(w),C=Mr(t);return(0,o.useEffect)((()=>{y&&x.current&&(y.disconnect(),p.current=!1,y.observe(x.current))}),[x,y]),Dr((()=>(l({type:Kr.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:f,data:C}}),()=>l({type:Kr.UnregisterDroppable,key:a,id:r}))),[r]),(0,o.useEffect)((()=>{n!==d.current.disabled&&(l({type:Kr.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)}),[r,a,n,l]),{active:s,rect:f,isOver:(null==u?void 0:u.id)===r,node:x,over:u,setNodeRef:O}}({id:s,data:O,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...u}}),{active:M,activatorEvent:R,activeNodeRect:k,attributes:P,setNodeRef:T,listeners:V,isDragging:L,over:A,setActivatorNodeRef:F,transform:N}=function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=Vr(wi),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:p,over:f}=(0,o.useContext)(ci),{role:h=yi,roleDescription:v="draggable",tabIndex:g=0}=null!=i?i:{},m=(null==u?void 0:u.id)===t,b=(0,o.useContext)(m?vi:bi),[y,w]=kr(),[x,O]=kr(),C=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),S=Mr(n);return Dr((()=>(p.set(t,{id:t,key:a,node:y,activatorNode:x,data:S}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)})),[p,t]),{active:u,activatorEvent:l,activeNodeRect:c,attributes:(0,o.useMemo)((()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":!(!m||h!==yi)||void 0,"aria-roledescription":v,"aria-describedby":d.draggable})),[r,h,g,m,v,d.draggable]),isDragging:m,listeners:r?void 0:C,node:y,over:f,setNodeRef:w,setActivatorNodeRef:O,transform:b}}({id:s,data:O,attributes:{...Ai,...n},disabled:w.draggable}),H=function(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}(I,T),j=Boolean(M),B=j&&!v&&Ei(f)&&Ei(m),z=!b&&L,U=z&&B?N:null,$=B?null!=U?U:(null!=l?l:y)({rects:g,activeNodeRect:k,activeIndex:f,overIndex:m,index:x}):null,_=Ei(f)&&Ei(m)?a({id:s,items:d,activeIndex:f,overIndex:m}):x,W=null==M?void 0:M.id,Y=(0,o.useRef)({activeId:W,items:d,newIndex:_,containerId:p}),X=d!==Y.current.items,G=t({active:M,containerId:p,isDragging:L,isSorting:j,id:s,index:x,items:d,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:null!=Y.current.activeId}),K=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=(0,o.useState)(null),l=(0,o.useRef)(n);return Dr((()=>{if(!t&&n!==l.current&&r.current){const e=i.current;if(e){const t=lo(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==l.current&&(l.current=n)}),[t,n,r,i]),(0,o.useEffect)((()=>{a&&s(null)}),[a]),a}({disabled:!G,index:x,node:E,rect:S});return(0,o.useEffect)((()=>{j&&Y.current.newIndex!==_&&(Y.current.newIndex=_),p!==Y.current.containerId&&(Y.current.containerId=p),d!==Y.current.items&&(Y.current.items=d)}),[j,_,p,d]),(0,o.useEffect)((()=>{if(W===Y.current.activeId)return;if(W&&!Y.current.activeId)return void(Y.current.activeId=W);const e=setTimeout((()=>{Y.current.activeId=W}),50);return()=>clearTimeout(e)}),[W]),{active:M,activeIndex:f,attributes:P,data:O,rect:S,index:x,newIndex:_,items:d,isOver:D,isSorting:j,isDragging:L,listeners:V,node:E,overIndex:m,over:A,setNodeRef:H,setActivatorNodeRef:F,setDroppableNodeRef:I,setDraggableNodeRef:T,transform:null!=K?K:$,transition:K||X&&Y.current.newIndex===x?Li:z&&!Nr(R)||!c?void 0:j||G?jr.Transition.toString({...c,property:Vi}):void 0}}Ro.Down,Ro.Right,Ro.Up,Ro.Left;var Ni=n(459),Hi=n.n(Ni);const{apiFetch:ji}=wp,Bi=e=>{const t={...e.innerProps,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()}},{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:s}=Fi({id:e.data.value}),l={transform:jr.Translate.toString(a),transition:s};return(0,o.createElement)("div",{style:l,ref:i,...n,...r},(0,o.createElement)(vn.MultiValue,{...e,innerProps:t}))},zi=e=>(0,o.createElement)(vn.MultiValueRemove,{...e,innerProps:{onPointerDown:e=>e.stopPropagation(),...e.innerProps}}),Ui=Hi()((e=>(e=>{const t=e.replace(/\W/g,"");return ji({path:`/wp/v2/lfe_speaker/?per_page=100&search=${t}`}).then((e=>e.map((e=>({value:e.id,label:e.title.rendered})))))})(e)),1e3,{leading:!1});(0,r.registerBlockType)("lf/speakers-block-2",{edit:function({attributes:e,setAttributes:t}){const{speakers:n,schedEventID:r}=e,[i,l]=(0,o.useState)(n),u=(0,o.useCallback)((e=>{const{active:n,over:r}=e;n&&r&&l((e=>{const o=e.findIndex((e=>e.value===n.id)),i=e.findIndex((e=>e.value===r.id));let a=Ci(e,o,i);return t({speakers:[...a]}),a}))}),[l]);return[(0,o.createElement)(a.InspectorControls,{key:"speakers-block-panel"},(0,o.createElement)(s.PanelBody,{title:"Settings",initialOpen:!0},(0,o.createElement)(s.TextControl,{label:"Sched Event ID",value:r,onChange:e=>t({schedEventID:e})}))),(0,o.createElement)("div",{...(0,a.useBlockProps)(),key:"speakers-block-edit"},(0,o.createElement)("p",null,(0,o.createElement)("strong",null,"Featured Speakers (each opens with modal):")),(0,o.createElement)(mi,{modifiers:[Oi],onDragEnd:u,collisionDetection:to},(0,o.createElement)(Ri,{items:i.map((e=>e.value))},(0,o.createElement)(mr,{className:"SortableList",isMulti:!0,defaultOptions:!0,loadOptions:Ui,helperClass:"react-select-draggable",value:i,onChange:e=>{t({speakers:[...e]}),l([...e])},components:{MultiValue:Bi,MultiValueRemove:zi},closeMenuOnSelect:!1}))))]}})})(); \ No newline at end of file +(()=>{"use strict";var e={459:e=>{e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=void 0,o=void 0,i=void 0,a=[];return function(){var l=function(e){return"function"==typeof e?e():e}(t),u=(new Date).getTime(),c=!r||u-r>l;r=u;for(var d=arguments.length,p=Array(d),f=0;f{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},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),v=l(n),g=0;g{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case g:case v:case l:return e;default:return t}}case o:return t}}}function O(e){return x(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=v,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||x(e)===c},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===m)},t.typeOf=x},363:(e,t,n)=>{e.exports=n(799)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=window.wp.blocks,o=window.React;var i=n.n(o);const a=window.wp.blockEditor;function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?R(N,--A):0,V--,10===F&&(V=1,T--),F}function z(){return F=A2||W(F)>3?"":" "}function q(e,t){for(;--t&&z()&&!(F<48||F>102||F>57&&F<65||F>70&&F<97););return _(e,$()+(t<6&&32==U()&&32==z()))}function J(e){for(;z();)switch(F){case e:return A;case 34:case 39:34!==e&&39!==e&&J(F);break;case 40:41===e&&J(e);break;case 92:z()}return A}function Z(e,t){for(;z()&&e+F!==57&&(e+F!==84||47!==U()););return"/*"+_(t,A-1)+"*"+O(47===e?e:z())}function Q(e){for(;!W(U());)z();return _(e,A)}var ee="-ms-",te="-moz-",ne="-webkit-",re="comm",oe="rule",ie="decl",ae="@keyframes";function se(e,t){for(var n="",r=k(e),o=0;o0&&I(S)-d&&P(f>32?fe(S+";",r,n,d-1):fe(E(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(P(C=de(S,t,n,u,c,o,s,y,w=[],x=[],d),i),123===b)if(0===c)ce(S,t,C,C,w,i,d,s,x);else switch(99===p&&110===R(S,3)?100:p){case 100:case 108:case 109:case 115:ce(e,C,C,r&&P(de(e,C,C,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:ce(S,C,C,C,[""],x,0,s,x)}}u=c=f=0,v=m=1,y=S="",d=a;break;case 58:d=1+I(S),f=h;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==B())continue;switch(S+=O(b),b*v){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(I(S)-1)*m,m=1;break;case 64:45===U()&&(S+=G(z())),p=U(),c=d=I(y=S+=Q($())),b++;break;case 45:45===h&&2==I(S)&&(v=0)}}return i}function de(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=k(p),h=0,v=0,g=0;h0?p[m]+" "+b:E(b,/&\f/g,p[m])))&&(l[g++]=y);return H(e,t,n,0===o?oe:s,l,u,c)}function pe(e,t,n){return H(e,t,n,re,O(F),D(e,2,-2),0)}function fe(e,t,n,r){return H(e,t,n,ie,D(e,0,r),D(e,r+1,-1),r)}var he=function(e,t,n){for(var r=0,o=0;r=o,o=U(),38===r&&12===o&&(t[n]=1),!W(o);)z();return _(e,A)},ve=new WeakMap,ge=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)||ve.get(n))&&!r){ve.set(e,!0);for(var o=[],i=function(e,t){return X(function(e,t){var n=-1,r=44;do{switch(W(r)){case 0:38===r&&12===U()&&(t[n]=1),e[n]+=he(A-1,t,n);break;case 2:e[n]+=G(r);break;case 4:if(44===r){e[++n]=58===U()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=O(r)}}while(r=z());return e}(Y(e),t))}(t,o),a=n.props,s=0,l=0;s6)switch(R(e,t+1)){case 109:if(45!==R(e,t+4))break;case 102:return E(e,/(.+:)(.+)-([^]+)/,"$1"+ne+"$2-$3$1"+te+(108==R(e,t+3)?"$3":"$2-$3"))+e;case 115:return~M(e,"stretch")?be(E(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==R(e,t+1))break;case 6444:switch(R(e,I(e)-3-(~M(e,"!important")&&10))){case 107:return E(e,":",":"+ne)+e;case 101:return E(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(45===R(e,14)?"inline-":"")+"box$3$1"+ne+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(R(e,t+11)){case 114:return ne+e+ee+E(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+ee+E(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+ee+E(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+ee+e+e}return e}var ye=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ie:e.return=be(e.value,e.length);break;case ae:return se([j(e,{value:E(e.value,"@","@"+ne)})],r);case oe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return se([j(e,{props:[E(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return se([j(e,{props:[E(t,/:(plac\w+)/,":"+ne+"input-$1")]}),j(e,{props:[E(t,/:(plac\w+)/,":-moz-$1")]}),j(e,{props:[E(t,/:(plac\w+)/,ee+"input-$1")]})],r)}return""}))}}],we=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,i=e.stylisPlugins||ye,a={},s=[];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)+l;return{name:u,styles:o,next:Ve}}var Fe=!!o.useInsertionEffect&&o.useInsertionEffect,Ne=Fe||function(e){return e()},He=(Fe||o.useLayoutEffect,o.createContext("undefined"!=typeof HTMLElement?we({key:"css"}):null)),je=(He.Provider,function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(He);return e(t,r,n)}))}),Be=o.createContext({}),ze={}.hasOwnProperty,Ue="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",$e=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return xe(t,n,r),Ne((function(){return function(e,t,n){xe(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},_e=je((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Ue],a=[r],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=Ae(a,void 0,o.useContext(Be));s+=t.key+"-"+l.name;var u={};for(var c in e)ze.call(e,c)&&"css"!==c&&c!==Ue&&(u[c]=e[c]);return u.className=s,n&&(u.ref=n),o.createElement(o.Fragment,null,o.createElement($e,{cache:t,serialized:l,isStringTag:"string"==typeof i}),o.createElement(i,u))})),We=_e,Ye=(n(146),function(e,t){var n=arguments;if(null==t||!ze.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=We,i[1]=function(e,t){var n={};for(var r in t)ze.call(t,r)&&(n[r]=t[r]);return n[Ue]=e,n}(e,t);for(var a=2;a({x:e,y:e});function nt(e){return it(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ot(e){var t;return null==(t=(it(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function it(e){return e instanceof Node||e instanceof rt(e).Node}function at(e){return e instanceof Element||e instanceof rt(e).Element}function st(e){return e instanceof HTMLElement||e instanceof rt(e).HTMLElement}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ct(e){return rt(e).getComputedStyle(e)}function dt(e){const t=function(e){if("html"===nt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||ot(e);return lt(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(nt(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&ut(t)?t:dt(t)}function pt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=dt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=rt(o);if(i){const e=ft(a);return t.concat(a,a.visualViewport||[],ut(o)?o:[],e&&n?pt(e):[])}return t.concat(o,pt(o,[],n))}function ft(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ht(e){return at(e)?e:e.contextElement}function vt(e){const t=ht(e);if(!st(t))return tt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Qe(n)!==i||Qe(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Qe(n.width):n.width)/r,s=(i?Qe(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const gt=tt(0);function mt(e){const t=rt(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:gt}function bt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ht(e);let a=tt(1);t&&(r?at(r)&&(a=vt(r)):a=vt(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==rt(e))&&t}(i,n,r)?mt(i):tt(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=rt(i),t=r&&at(r)?rt(r):r;let n=e,o=ft(n);for(;o&&r&&t!==n;){const e=vt(o),t=o.getBoundingClientRect(),r=ct(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,n=rt(o),o=ft(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}const yt=o.useLayoutEffect;var wt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],xt=function(){};function Ot(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Ct(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function Dt(e){return Rt(e)?window.pageYOffset:e.scrollTop}function It(e,t){Rt(e)?window.scrollTo(0,t):e.scrollTop=t}function kt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xt,o=Dt(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;It(e,l),an.bottom?It(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!a)return i&&kt(l,E,R),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&O>=r)return i&&kt(l,E,R),{placement:"bottom",maxHeight:a?O-y:S-y};if("auto"===o||a){var D=t,I=a?x:C;return I>=r&&(D=Math.min(I-y-s,t)),{placement:"top",maxHeight:D}}if("bottom"===o)return i&&It(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(C>=h&&!a)return i&&kt(l,M,R),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&x>=r){var k=t;return(!a&&C>=r||a&&x>=r)&&(k=a?x-w:C-w),i&&kt(l,M,R),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:b});h(o.maxHeight),m(o.placement),null==u||u(o.placement)}}),[r,i,a,s,n,u,b]),t({ref:c,placerProps:p(p({},e),{},{placement:g||_t(i),maxHeight:f})})},Xt=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return p({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Gt=Xt,Kt=Xt,qt=["size"],Jt=["innerProps","isRtl","size"],Zt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qt=function(e){var t=e.size,n=Ke(e,qt);return Ye("svg",s({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Zt},n))},en=function(e){return Ye(Qt,s({size:20},e),Ye("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"}))},tn=function(e){return Ye(Qt,s({size:20},e),Ye("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"}))},nn=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return p({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},rn=nn,on=nn,an=function(){var e=Xe.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_"}}}(zt||(Ut=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],$t||($t=Ut.slice(0)),zt=Object.freeze(Object.defineProperties(Ut,{raw:{value:Object.freeze($t)}})))),sn=function(e){var t=e.delay,n=e.offset;return Ye("span",{css:Xe({animation:"".concat(an," 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"},"","")})},ln=["data"],un=["innerRef","isDisabled","isHidden","inputClassName"],cn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":p({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cn)},pn=function(e){return p({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},cn)},fn=function(e){var t=e.children,n=e.innerProps;return Ye("div",n,t)},hn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ye("div",s({},Mt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ye(en,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ye("div",s({ref:o},Mt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ye("div",s({},Mt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ye(tn,null))},DownChevron:tn,CrossIcon:en,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,u=e.label,c=e.theme,d=e.selectProps;return Ye("div",s({},Mt(e,"group",{group:!0}),l),Ye(i,s({},a,{selectProps:d,theme:c,getStyles:r,getClassNames:o,cx:n}),u),Ye("div",null,t))},GroupHeading:function(e){var t=Et(e);t.data;var n=Ke(t,ln);return Ye("div",s({},Mt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ye("div",s({},Mt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ye("span",s({},t,Mt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Et(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,u=Ke(r,un);return Ye("div",s({},Mt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ye("input",s({className:t({input:!0},l),ref:o,style:pn(a),disabled:i},u)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=Ke(e,Jt);return Ye("div",s({},Mt(p(p({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ye(sn,{delay:0,offset:n}),Ye(sn,{delay:160,offset:!0}),Ye(sn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ye("div",s({},Mt(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ye("div",s({},Mt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,l=e.menuPosition,u=(0,o.useRef)(null),c=(0,o.useRef)(null),d=Ge((0,o.useState)(_t(a)),2),f=d[0],h=d[1],v=(0,o.useMemo)((function(){return{setPortalPlacement:h}}),[]),g=Ge((0,o.useState)(null),2),m=g[0],b=g[1],y=(0,o.useCallback)((function(){if(r){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}}(r),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)||b({offset:n,rect:e})}}),[r,l,f,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);yt((function(){y()}),[y]);var w=(0,o.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&u.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=ht(e),c=o||i?[...u?pt(u):[],...pt(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=ot(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-et(c)+"px "+-et(o.clientWidth-(u+d))+"px "+-et(o.clientHeight-(c+p))+"px "+-et(u)+"px",threshold:Ze(0,Je(1,l))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let v=l?bt(e):null;return l&&function t(){const r=bt(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,u.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);yt((function(){w()}),[w]);var x=(0,o.useCallback)((function(e){u.current=e,w()}),[w]);if(!t&&"fixed"!==l||!m)return null;var O=Ye("div",s({ref:x},Mt(p(p({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Ye(Wt.Provider,{value:v},t?(0,qe.createPortal)(O,t):O)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=Ke(e,Bt);return Ye("div",s({},Mt(p(p({},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=Ke(e,jt);return Ye("div",s({},Mt(p(p({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Ye(l,{data:r,innerProps:p(p({},Mt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Ye(u,{data:r,innerProps:p({},Mt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ye(c,{data:r,innerProps:p(p({},Mt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ye("div",s({role:"button"},n),t||Ye(en,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ye("div",s({},Mt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ye("div",s({},Mt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ye("div",s({},Mt(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ye("div",s({},Mt(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 Ye("div",s({},Mt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},vn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function gn(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,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wn=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,u=e.id,c=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,h=l.inputValue,v=l.isMulti,g=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,y=l.options,w=l.screenReaderStatus,x=l.tabSelectsValue,O=l.isLoading,C=l["aria-label"],S=l["aria-live"],E=(0,o.useMemo)((function(){return p(p({},yn),d||{})}),[d]),M=(0,o.useMemo)((function(){var e,n="";if(t&&E.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?f(u):"",d=o||a||void 0,h=d?d.map(f):[],v=p({isDisabled:u&&g(u,s),label:c,labels:h},t);n=E.onChange(v)}return n}),[t,E,g,s,f]),R=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&s&&s.includes(n));if(t&&E.onFocus){var a={focused:t,label:f(t),isDisabled:g(t,s),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:s,isAppleDevice:c};e=E.onFocus(a)}return e}),[n,r,f,g,E,i,s,c]),D=(0,o.useMemo)((function(){var e="";if(b&&y.length&&!O&&E.onFilter){var t=w({count:i.length});e=E.onFilter({inputValue:h,resultsMessage:t})}return e}),[i,h,b,E,y,w,O]),I="initial-input-focus"===(null==t?void 0:t.action),k=(0,o.useMemo)((function(){var e="";if(E.guidance){var t=r?"value":b?"menu":"input";e=E.guidance({"aria-label":C,context:t,isDisabled:n&&g(n,s),isMulti:v,isSearchable:m,tabSelectsValue:x,isInitialFocus:I})}return e}),[C,n,r,v,g,m,b,E,s,x,I]),P=Ye(o.Fragment,null,Ye("span",{id:"aria-selection"},M),Ye("span",{id:"aria-focused"},R),Ye("span",{id:"aria-results"},D),Ye("span",{id:"aria-guidance"},k));return Ye(o.Fragment,null,Ye(bn,{id:u},I&&P),Ye(bn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!I&&P))},xn=[{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źẑżžẓẕƶȥɀⱬꝣ"}],On=new RegExp("["+xn.map((function(e){return e.letters})).join("")+"]","g"),Cn={},Sn=0;Sn1?t-1:0),r=1;r0,v=d-p-u,g=!1;v>t&&s.current&&(r&&r(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>v?(n&&!s.current&&n(e),f.scrollTop=d,g=!0,s.current=!0):!h&&-t>u&&(i&&!l.current&&i(e),f.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),p=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,o.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),v=(0,o.useCallback)((function(e){if(e){var t=!!Ft&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),g=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return(0,o.useEffect)((function(){if(t){var e=c.current;return v(e),function(){g(e)}}}),[t,v,g]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),a=(0,o.useRef)(null),s=(0,o.useCallback)((function(e){if(jn){var t=document.body,n=t&&t.style;if(r&&Vn.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Bn<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(Ln).forEach((function(e){var t=Ln[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Hn()&&(t.addEventListener("touchmove",An,zn),e&&(e.addEventListener("touchstart",Nn,zn),e.addEventListener("touchmove",Fn,zn))),Bn+=1}}),[r]),l=(0,o.useCallback)((function(e){if(jn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),r&&Bn<1&&Vn.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Hn()&&(t.removeEventListener("touchmove",An,zn),e&&(e.removeEventListener("touchstart",Nn,zn),e.removeEventListener("touchmove",Fn,zn)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return Ye(o.Fragment,null,n&&Ye("div",{onClick:Un,css:$n}),t((function(e){i(e),a(e)})))}var Yn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Xn=function(e){var t=e.name,n=e.onFocus;return Ye("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Yn,value:"",onChange:function(){}})};function Gn(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 Kn(){return Gn(/^Mac/i)}var qn={clearIndicator:on,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return p({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:rn,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 p({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return p({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return p(p({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},dn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return p({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Kt,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return p((c(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),c(n,"position","absolute"),c(n,"width","100%"),c(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return p({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return p({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return p({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return p({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Gt,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return p({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return p({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return p({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return p({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Jn={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}},Zn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tt(),captureMenuScroll:!Tt(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=p({ignoreCase:!0,ignoreAccents:!0,stringify:kn,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?In(t):t,u=a?In(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Dn(l),u=Rn(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qn(e,t,n,r){return{type:"option",data:t,isDisabled:sr(e,t,n),isSelected:lr(e,t,n),label:ir(e,t),value:ar(e,t),index:r}}function er(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Qn(e,n,t,r)})).filter((function(t){return rr(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Qn(e,n,t,r);return rr(e,i)?i:void 0})).filter(Nt)}function tr(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,y(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function nr(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,y(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 rr(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!cr(e)||!i)&&ur(e,{label:a,value:s,data:o},r)}var or=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},ir=function(e,t){return e.getOptionLabel(t)},ar=function(e,t){return e.getOptionValue(t)};function sr(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lr(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ar(e,t);return n.some((function(t){return ar(e,t)===r}))}function ur(e,t,n){return!e.filterOption||e.filterOption(t,n)}var cr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},dr=1,pr=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&&h(e,t)}(n,e);var t=function(e){var t=g();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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:""},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.isAppleDevice=Kn()||Gn(/^iPhone/i)||Gn(/^iPad/i)||Kn()&&navigator.maxTouchPoints>1,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(y(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=Ht(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Ht(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=Ht(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return or(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return nr(er(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||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return cr(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,v=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)r.removeValue(v);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||p&&r.isOptionSelected(h,g))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:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)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||++dr),r.state.selectValue=St(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=or(o,i[a])}return r}return function(e,t,n){t&&f(e.prototype,t),n&&f(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&&Pt(this.menuListRef,this.focusedOptionRef)}},{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&&(Pt(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&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,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Jn):p(p({},Jn),this.props.theme):Jn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return sr(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lr(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ur(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,r=e.inputId,i=e.inputValue,a=e.tabIndex,l=e.form,u=e.menuIsOpen,c=e.required,d=this.getComponents().Input,f=this.state,h=f.inputIsHidden,v=f.ariaSelection,g=this.commonProps,m=r||this.getElementId("input"),b=p(p(p({"aria-autocomplete":"list","aria-expanded":u,"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":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==v?void 0:v.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(d,s({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:l,type:"text",value:i},b)):o.createElement(Tn,s({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:xt,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:l,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,l=t.SingleValue,u=t.Placeholder,c=this.commonProps,d=this.props,p=d.controlShouldRenderValue,f=d.isDisabled,h=d.isMulti,v=d.inputValue,g=d.placeholder,m=this.state,b=m.selectValue,y=m.focusedValue,w=m.isFocused;if(!this.hasValue()||!p)return v?null:o.createElement(u,s({},c,{key:"placeholder",isDisabled:f,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),g);if(h)return b.map((function(t,l){var u=t===y,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,s({},c,{components:{Container:r,Label:i,Remove:a},isFocused:u,isDisabled:f,key:d,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(v)return null;var x=b[0];return o.createElement(l,s({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,s({},t,{innerProps:l,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?o.createElement(e,s({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.createElement(n,s({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,s({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,l=t.MenuPortal,u=t.LoadingMessage,c=t.NoOptionsMessage,d=t.Option,p=this.commonProps,f=this.state.focusedOption,h=this.props,v=h.captureMenuScroll,g=h.inputValue,m=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,x=h.menuIsOpen,O=h.menuPlacement,C=h.menuPosition,S=h.menuPortalTarget,E=h.menuShouldBlockScroll,M=h.menuShouldScrollIntoView,R=h.noOptionsMessage,D=h.onMenuScrollToTop,I=h.onMenuScrollToBottom;if(!x)return null;var k,P=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,l=t.isSelected,u=t.label,c=t.value,h=f===i,v=a?void 0:function(){return e.onOptionHover(i)},g=a?void 0:function(){return e.selectOption(i)},m="".concat(e.getElementId("option"),"-").concat(n),b={id:m,onClick:g,onMouseMove:v,onMouseOver:v,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:l};return o.createElement(d,s({},p,{innerProps:b,data:i,isDisabled:a,isSelected:l,key:m,label:u,type:r,value:c,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,l=t.index,u="".concat(e.getElementId("group"),"-").concat(l),c="".concat(u,"-heading");return o.createElement(n,s({},p,{key:u,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(m){var T=b({inputValue:g});if(null===T)return null;k=o.createElement(u,p,T)}else{var V=R({inputValue:g});if(null===V)return null;k=o.createElement(c,p,V)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:O,menuPosition:C,menuShouldScrollIntoView:M},A=o.createElement(Yt,s({},p,L),(function(t){var n=t.ref,r=t.placerProps,l=r.placement,u=r.maxHeight;return o.createElement(i,s({},p,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:l}),o.createElement(Wn,{captureEnabled:v,onTopArrive:D,onBottomArrive:I,lockEnabled:E},(function(t){return o.createElement(a,s({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:u,focusedOption:f}),k)})))}));return S||"fixed"===C?o.createElement(l,s({},p,{appendTo:S,controlElement:this.controlRef,menuPlacement:O,menuPosition:C}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!r)return o.createElement(Xn,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(n){var u=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,l=t.selectValue,u=this.getFocusableOptions();return o.createElement(wn,s({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:l,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,l=a.className,u=a.id,c=a.isDisabled,d=a.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return o.createElement(r,s({},f,{className:l,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:p}),this.renderLiveRegion(),o.createElement(t,s({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:p,menuIsOpen:d}),o.createElement(i,s({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,s({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,f=e.inputValue,h=e.isMulti,v=St(c),g={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var m=d?function(e,t){return tr(er(e,t))}(e,v):[],b=d?nr(er(e,v),"".concat(l,"-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,m);g={selectValue:v,focusedOption:w,focusedOptionId:or(b,w),focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},O=i,C=a&&s;return a&&!C&&(O={value:Ht(h,v,v[0]||null),options:v,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),p(p(p({},g),x),{},{prevProps:e,ariaSelection:O,prevWasFocused:C})}}]),n}(o.Component);pr.defaultProps=Zn;var fr=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],hr=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],vr=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,i=void 0!==r&&r,a=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,u=e.onInputChange,d=e.filterOption,f=void 0===d?null:d,h=Ke(e,hr),v=h.inputValue,g=(0,o.useRef)(void 0),m=(0,o.useRef)(!1),b=Ge((0,o.useState)(Array.isArray(n)?n:void 0),2),y=b[0],w=b[1],x=Ge((0,o.useState)(void 0!==v?v:""),2),O=x[0],C=x[1],S=Ge((0,o.useState)(!0===n),2),E=S[0],M=S[1],R=Ge((0,o.useState)(void 0),2),D=R[0],I=R[1],k=Ge((0,o.useState)([]),2),P=k[0],T=k[1],V=Ge((0,o.useState)(!1),2),L=V[0],A=V[1],F=Ge((0,o.useState)({}),2),N=F[0],H=F[1],j=Ge((0,o.useState)(void 0),2),B=j[0],z=j[1],U=Ge((0,o.useState)(void 0),2),$=U[0],_=U[1];i!==$&&(H({}),_(i)),n!==B&&(w(Array.isArray(n)?n:void 0),z(n)),(0,o.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var W=(0,o.useCallback)((function(e,t){if(!a)return t();var n=a(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[a]);(0,o.useEffect)((function(){!0===n&&W(O,(function(e){m.current&&(w(e||[]),M(!!g.current))}))}),[]);var Y=(0,o.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 g.current=void 0,C(""),I(""),T([]),M(!1),void A(!1);if(i&&N[n])C(n),I(n),T(N[n]),M(!1),A(!1);else{var r=g.current={};C(n),M(!0),A(!D),W(n,(function(e){m&&r===g.current&&(g.current=void 0,M(!1),I(n),T(e||[]),A(!1),H(e?p(p({},N),{},c({},n,e)):N))}))}}),[i,W,D,N,u]),X=L?[]:O&&D?P:y||[];return p(p({},h),{},{options:X,isLoading:E||l,onInputChange:Y,filterOption:f})}(e),r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,v=e.value,g=Ke(e,fr),m=Ge((0,o.useState)(void 0!==l?l:n),2),b=m[0],y=m[1],w=Ge((0,o.useState)(void 0!==u?u:i),2),x=w[0],O=w[1],C=Ge((0,o.useState)(void 0!==v?v:s),2),S=C[0],E=C[1],M=(0,o.useCallback)((function(e,t){"function"==typeof c&&c(e,t),E(e)}),[c]),R=(0,o.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),D=(0,o.useCallback)((function(){"function"==typeof h&&h(),O(!0)}),[h]),I=(0,o.useCallback)((function(){"function"==typeof f&&f(),O(!1)}),[f]),k=void 0!==l?l:b,P=void 0!==u?u:x,T=void 0!==v?v:S;return p(p({},g),{},{inputValue:k,menuIsOpen:P,onChange:M,onInputChange:R,onMenuClose:I,onMenuOpen:D,value:T})}(n);return o.createElement(pr,s({ref:t},r))})),gr=vr;const mr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function br(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function yr(e){return"nodeType"in e}function wr(e){var t,n;return e?br(e)?e:yr(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function xr(e){const{Document:t}=wr(e);return e instanceof t}function Or(e){return!br(e)&&e instanceof wr(e).HTMLElement}function Cr(e){return e instanceof wr(e).SVGElement}function Sr(e){return e?br(e)?e.document:yr(e)?xr(e)?e:Or(e)||Cr(e)?e.ownerDocument:document:document:document}const Er=mr?o.useLayoutEffect:o.useEffect;function Mr(e){const t=(0,o.useRef)(e);return Er((()=>{t.current=e})),(0,o.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{n.current!==e&&(n.current=e)}),t),n}function Dr(e,t){const n=(0,o.useRef)();return(0,o.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Ir(e){const t=Mr(e),n=(0,o.useRef)(null),r=(0,o.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function kr(e){const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current}let Pr={};function Tr(e,t){return(0,o.useMemo)((()=>{if(t)return t;const n=null==Pr[e]?0:Pr[e]+1;return Pr[e]=n,e+"-"+n}),[e,t])}function Vr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const Lr=Vr(1),Ar=Vr(-1);function Fr(e){if(!e)return!1;const{KeyboardEvent:t}=wr(e.target);return t&&e instanceof t}function Nr(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=wr(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Hr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Hr.Translate.toString(e),Hr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),jr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Br(e){return e.matches(jr)?e:e.querySelector(jr)}const zr={display:"none"};function Ur(e){let{id:t,value:n}=e;return i().createElement("div",{id:t,style:zr},n)}function $r(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return i().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const _r=(0,o.createContext)(null),Wr={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Yr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Xr(e){let{announcements:t=Yr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=Wr}=e;const{announce:s,announcement:l}=function(){const[e,t]=(0,o.useState)("");return{announce:(0,o.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),u=Tr("DndLiveRegion"),[c,d]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{d(!0)}),[]),function(e){const t=(0,o.useContext)(_r);(0,o.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,o.useMemo)((()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&s(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;s(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;s(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;s(t.onDragCancel({active:n,over:r}))}})),[s,t])),!c)return null;const p=i().createElement(i().Fragment,null,i().createElement(Ur,{id:r,value:a.draggable}),i().createElement($r,{id:u,announcement:l}));return n?(0,qe.createPortal)(p,n):p}var Gr;function Kr(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Gr||(Gr={}));const qr=Object.freeze({x:0,y:0});function Jr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Zr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Qr(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}const eo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Qr(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Qr(r),a=o.reduce(((e,t,r)=>{return e+(o=n[r],i=t,Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)));var o,i}),0),s=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(Jr)};function to(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=to(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Zr)};function ro(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:qr}function oo(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const io=oo(1);const ao={ignoreTransform:!1};function so(e,t){void 0===t&&(t=ao);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=wr(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function lo(e){return so(e,{ignoreTransform:!0})}function uo(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(xr(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Or(o)||Cr(o))return n;if(n.includes(o))return n;const i=wr(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=wr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=wr(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function co(e){const[t]=uo(e,1);return null!=t?t:null}function po(e){return mr&&e?br(e)?e:yr(e)?xr(e)||e===Sr(e).scrollingElement?window:Or(e)?e:null:null:null}function fo(e){return br(e)?e.scrollX:e.scrollLeft}function ho(e){return br(e)?e.scrollY:e.scrollTop}function vo(e){return{x:fo(e),y:ho(e)}}var go;function mo(e){return!(!mr||!e)&&e===document.scrollingElement}function bo(e){const t={x:0,y:0},n=mo(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(go||(go={}));const yo={x:.2,y:.2};function wo(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=yo);const{isTop:u,isBottom:c,isLeft:d,isRight:p}=bo(e),f={x:0,y:0},h={x:0,y:0},v=t.height*o.y,g=t.width*o.x;return!u&&i<=t.top+v?(f.y=go.Backward,h.y=r*Math.abs((t.top+v-i)/v)):!c&&l>=t.bottom-v&&(f.y=go.Forward,h.y=r*Math.abs((t.bottom-v-l)/v)),!p&&s>=t.right-g?(f.x=go.Forward,h.x=r*Math.abs((t.right-g-s)/g)):!d&&a<=t.left+g&&(f.x=go.Backward,h.x=r*Math.abs((t.left+g-a)/g)),{direction:f,speed:h}}function xo(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Oo(e){return e.reduce(((e,t)=>Lr(e,vo(t))),qr)}const Co=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+fo(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+ho(t)),0)}]];class So{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=uo(t),r=Oo(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Co)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Eo{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Mo(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Ro,Do,Io;function ko(e){e.preventDefault()}function Po(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ro||(Ro={})),(Io=Do||(Do={})).Space="Space",Io.Down="ArrowDown",Io.Right="ArrowRight",Io.Left="ArrowLeft",Io.Up="ArrowUp",Io.Esc="Escape",Io.Enter="Enter";const To={start:[Do.Space,Do.Enter],cancel:[Do.Esc],end:[Do.Space,Do.Enter]},Vo=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Do.Right:return{...n,x:n.x+25};case Do.Left:return{...n,x:n.x-25};case Do.Down:return{...n,y:n.y+25};case Do.Up:return{...n,y:n.y-25}}};class Lo{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Eo(Sr(t)),this.windowListeners=new Eo(wr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ro.Resize,this.handleCancel),this.windowListeners.add(Ro.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Ro.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=so),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);co(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(qr)}handleKeyDown(e){if(Fr(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=To,coordinateGetter:i=Vo,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:qr;this.referenceCoordinates||(this.referenceCoordinates=u);const c=i(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Ar(c,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:u,maxScroll:d,minScroll:p}=bo(n),f=xo(n),h={x:Math.min(o===Do.Right?f.right-f.width/2:f.right,Math.max(o===Do.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(o===Do.Down?f.bottom-f.height/2:f.bottom,Math.max(o===Do.Down?f.top:f.top+f.height/2,c.y))},v=o===Do.Right&&!s||o===Do.Left&&!l,g=o===Do.Down&&!u||o===Do.Up&&!i;if(v&&h.x!==c.x){const e=n.scrollLeft+t.x,i=o===Do.Right&&e<=d.x||o===Do.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Do.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&h.y!==c.y){const e=n.scrollTop+t.y,i=o===Do.Down&&e<=d.y||o===Do.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Do.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,Lr(Ar(c,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Ao(e){return Boolean(e&&"distance"in e)}function Fo(e){return Boolean(e&&"delay"in e)}Lo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=To,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class No{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=wr(e);return e instanceof t?e:Sr(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=Sr(i),this.documentListeners=new Eo(this.document),this.listeners=new Eo(n),this.windowListeners=new Eo(wr(i)),this.initialCoordinates=null!=(r=Nr(o))?r:qr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Ro.Resize,this.handleCancel),this.windowListeners.add(Ro.DragStart,ko),this.windowListeners.add(Ro.VisibilityChange,this.handleCancel),this.windowListeners.add(Ro.ContextMenu,ko),this.documentListeners.add(Ro.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Fo(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Ao(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ro.Click,Po,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ro.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=Nr(e))?t:qr,l=Ar(r,s);if(!n&&a){if(Ao(a)){if(null!=a.tolerance&&Mo(l,a.tolerance))return this.handleCancel();if(Mo(l,a.distance))return this.handleStart()}return Fo(a)&&Mo(l,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Do.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Ho={move:{name:"pointermove"},end:{name:"pointerup"}};class jo extends No{constructor(e){const{event:t}=e,n=Sr(t.target);super(e,Ho,n)}}jo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Bo={move:{name:"mousemove"},end:{name:"mouseup"}};var zo;!function(e){e[e.RightClick=2]="RightClick"}(zo||(zo={})),class extends No{constructor(e){super(e,Bo,Sr(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==zo.RightClick&&(null==r||r({event:n}),!0)}}];const Uo={move:{name:"touchmove"},end:{name:"touchend"}};var $o,_o;(class extends No{constructor(e){super(e,Uo)}static setup(){return window.addEventListener(Uo.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Uo.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}($o||($o={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(_o||(_o={}));const Wo={x:{[go.Backward]:!1,[go.Forward]:!1},y:{[go.Backward]:!1,[go.Forward]:!1}};var Yo,Xo;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Yo||(Yo={})),function(e){e.Optimized="optimized"}(Xo||(Xo={}));const Go=new Map;function Ko(e,t){return Dr((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function qo(e){let{callback:t,disabled:n}=e;const r=Mr(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Jo(e){return new So(so(e),e)}function Zo(e,t,n){void 0===t&&(t=Jo);const[r,i]=(0,o.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=Mr(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=qo({callback:i});return Er((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const Qo=[];function ei(e,t){void 0===t&&(t=[]);const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{n.current=null}),t),(0,o.useEffect)((()=>{const t=e!==qr;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?Ar(e,n.current):qr}function ti(e){return(0,o.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const ni=[];const ri=[{sensor:jo,options:{}},{sensor:Lo,options:{}}],oi={current:{}},ii={draggable:{measure:lo},droppable:{measure:lo,strategy:Yo.WhileDragging,frequency:Xo.Optimized},dragOverlay:{measure:so}};class ai extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const si={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ai,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Kr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ii,measureDroppableContainers:Kr,windowRect:null,measuringScheduled:!1},li={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Kr,draggableNodes:new Map,over:null,measureDroppableContainers:Kr},ui=(0,o.createContext)(li),ci=(0,o.createContext)(si);function di(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ai}}}function pi(e,t){switch(t.type){case Gr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Gr.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Gr.DragEnd:case Gr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Gr.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ai(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Gr.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new ai(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Gr.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new ai(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function fi(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=(0,o.useContext)(ui),a=kr(r),s=kr(null==n?void 0:n.id);return(0,o.useEffect)((()=>{if(!t&&!r&&a&&null!=s){if(!Fr(a))return;if(document.activeElement===a.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Br(e);if(t){t.focus();break}}}))}}),[r,t,i,s,a]),null}const hi=(0,o.createContext)({...qr,scaleX:1,scaleY:1});var vi;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(vi||(vi={}));const gi=(0,o.memo)((function(e){var t,n,r,a;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=ri,collisionDetection:p=no,measuring:f,modifiers:h,...v}=e;const g=(0,o.useReducer)(pi,void 0,di),[m,b]=g,[y,w]=function(){const[e]=(0,o.useState)((()=>new Set)),t=(0,o.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,o.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[x,O]=(0,o.useState)(vi.Uninitialized),C=x===vi.Initialized,{draggable:{active:S,nodes:E,translate:M},droppable:{containers:R}}=m,D=S?E.get(S):null,I=(0,o.useRef)({initial:null,translated:null}),k=(0,o.useMemo)((()=>{var e;return null!=S?{id:S,data:null!=(e=null==D?void 0:D.data)?e:oi,rect:I}:null}),[S,D]),P=(0,o.useRef)(null),[T,V]=(0,o.useState)(null),[L,A]=(0,o.useState)(null),F=Rr(v,Object.values(v)),N=Tr("DndDescribedBy",s),H=(0,o.useMemo)((()=>R.getEnabled()),[R]),j=function(e){return(0,o.useMemo)((()=>({draggable:{...ii.draggable,...null==e?void 0:e.draggable},droppable:{...ii.droppable,...null==e?void 0:e.droppable},dragOverlay:{...ii.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(f),{droppableRects:B,measureDroppableContainers:z,measuringScheduled:U}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=(0,o.useState)(null),{frequency:l,measure:u,strategy:c}=i,d=(0,o.useRef)(e),p=function(){switch(c){case Yo.Always:return!1;case Yo.BeforeDragging:return n;default:return!n}}(),f=Rr(p),h=(0,o.useCallback)((function(e){void 0===e&&(e=[]),f.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),v=(0,o.useRef)(null),g=Dr((t=>{if(p&&!n)return Go;if(!t||t===Go||d.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new So(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,p,u]);return(0,o.useEffect)((()=>{d.current=e}),[e]),(0,o.useEffect)((()=>{p||h()}),[n,p]),(0,o.useEffect)((()=>{a&&a.length>0&&s(null)}),[JSON.stringify(a)]),(0,o.useEffect)((()=>{p||"number"!=typeof l||null!==v.current||(v.current=setTimeout((()=>{h(),v.current=null}),l))}),[l,p,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:null!=a}}(H,{dragging:C,dependencies:[M.x,M.y],config:j.droppable}),$=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return Dr((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(E,S),_=(0,o.useMemo)((()=>L?Nr(L):null),[L]),W=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof u?!1===u.enabled:!1===u,n=C&&!e&&!t;return"object"==typeof u?{...u,enabled:n}:{enabled:n}}(),Y=function(e,t){return Ko(e,t)}($,j.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=(0,o.useRef)(!1),{x:s,y:l}="boolean"==typeof i?{x:i,y:i}:i;Er((()=>{if(!s&&!l||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=ro(n(e),r);if(s||(o.x=0),l||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=co(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,s,l,r,n])}({activeNode:S?E.get(S):null,config:W.layoutShiftCompensation,initialRect:Y,measure:j.draggable.measure});const X=Zo($,j.draggable.measure,Y),G=Zo($?$.parentElement:null),K=(0,o.useRef)({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),q=R.getNodeFor(null==(t=K.current.over)?void 0:t.id),J=function(e){let{measure:t}=e;const[n,r]=(0,o.useState)(null),i=qo({callback:(0,o.useCallback)((e=>{for(const{target:n}of e)if(Or(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,o.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Or(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[s,l]=Ir(a);return(0,o.useMemo)((()=>({nodeRef:s,rect:n,setRef:l})),[n,s,l])}({measure:j.dragOverlay.measure}),Z=null!=(n=J.nodeRef.current)?n:$,Q=C?null!=(r=J.rect)?r:X:null,ee=Boolean(J.nodeRef.current&&J.rect),te=ro(ne=ee?null:X,Ko(ne));var ne;const re=ti(Z?wr(Z):null),oe=function(e){const t=(0,o.useRef)(e),n=Dr((n=>e?n&&n!==Qo&&e&&t.current&&e.parentNode===t.current.parentNode?n:uo(e):Qo),[e]);return(0,o.useEffect)((()=>{t.current=e}),[e]),n}(C?null!=q?q:$:null),ie=function(e,t){void 0===t&&(t=so);const[n]=e,r=ti(n?wr(n):null),[i,a]=(0,o.useReducer)((function(){return e.length?e.map((e=>mo(e)?r:new So(t(e),e))):ni}),ni),s=qo({callback:a});return e.length>0&&i===ni&&a(),Er((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),a())}),[e]),i}(oe),ae=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(h,{transform:{x:M.x-te.x,y:M.y-te.y,scaleX:1,scaleY:1},activatorEvent:L,active:k,activeNodeRect:X,containerNodeRect:G,draggingNodeRect:Q,over:K.current.over,overlayNodeRect:J.rect,scrollableAncestors:oe,scrollableAncestorRects:ie,windowRect:re}),se=_?Lr(_,M):null,le=function(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(e),i=(0,o.useCallback)((e=>{const t=po(e.target);t&&n((e=>e?(e.set(t,vo(t)),new Map(e)):null))}),[]);return(0,o.useEffect)((()=>{const t=r.current;if(e!==t){o(t);const a=e.map((e=>{const t=po(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,vo(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=po(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,o.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>Lr(e,t)),qr):Oo(e):qr),[e,t])}(oe),ue=ei(le),ce=ei(le,[X]),de=Lr(ae,ue),pe=Q?io(Q,ae):null,fe=k&&pe?p({active:k,collisionRect:pe,droppableRects:B,droppableContainers:H,pointerCoordinates:se}):null,he=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(fe),[ve,ge]=(0,o.useState)(null),me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ee?ae:Lr(ae,ce),null!=(a=null==ve?void 0:ve.rect)?a:null,X),be=(0,o.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==P.current)return;const o=E.get(P.current);if(!o)return;const i=e.nativeEvent,a=new n({active:P.current,activeNode:o,event:i,options:r,context:K,onStart(e){const t=P.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:r}=F.current,o={active:{id:t,data:n.data,rect:I}};(0,qe.unstable_batchedUpdates)((()=>{null==r||r(o),O(vi.Initializing),b({type:Gr.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o})}))},onMove(e){b({type:Gr.DragMove,coordinates:e})},onEnd:s(Gr.DragEnd),onCancel:s(Gr.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=K.current;let a=null;if(t&&o){const{cancelDrop:s}=F.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Gr.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Gr.DragCancel)}P.current=null,(0,qe.unstable_batchedUpdates)((()=>{b({type:e}),O(vi.Uninitialized),ge(null),V(null),A(null);const t=e===Gr.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=F.current[t];null==e||e(a),y({type:t,event:a})}}))}}(0,qe.unstable_batchedUpdates)((()=>{V(a),A(e.nativeEvent)}))}),[E]),ye=(0,o.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=E.get(r);if(null!==P.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},P.current=r,be(n,t))}),[E,be]),we=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(d,ye);!function(e){(0,o.useEffect)((()=>{if(!mr)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(d),Er((()=>{X&&x===vi.Initializing&&O(vi.Initialized)}),[X,x]),(0,o.useEffect)((()=>{const{onDragMove:e}=F.current,{active:t,activatorEvent:n,collisions:r,over:o}=K.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:de.x,y:de.y},over:o};(0,qe.unstable_batchedUpdates)((()=>{null==e||e(i),y({type:"onDragMove",event:i})}))}),[de.x,de.y]),(0,o.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=K.current;if(!e||null==P.current||!t||!o)return;const{onDragOver:i}=F.current,a=r.get(he),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,qe.unstable_batchedUpdates)((()=>{ge(s),null==i||i(l),y({type:"onDragOver",event:l})}))}),[he]),Er((()=>{K.current={activatorEvent:L,active:k,activeNode:$,collisionRect:pe,collisions:fe,droppableRects:B,draggableNodes:E,draggingNode:Z,draggingNodeRect:Q,droppableContainers:R,over:ve,scrollableAncestors:oe,scrollAdjustedTranslate:de},I.current={initial:Q,translated:pe}}),[k,$,fe,pe,E,Z,Q,B,R,ve,oe,de]),function(e){let{acceleration:t,activator:n=$o.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=_o.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=kr(t);return Dr((e=>{if(n||!r||!e)return Wo;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[go.Backward]:e.x[go.Backward]||-1===o,[go.Forward]:e.x[go.Forward]||1===o},y:{[go.Backward]:e.y[go.Backward]||-1===i,[go.Forward]:e.y[go.Forward]||1===i}}}),[n,t,r])}({delta:p,disabled:!a}),[v,g]=function(){const e=(0,o.useRef)(null);return[(0,o.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,o.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),m=(0,o.useRef)({x:0,y:0}),b=(0,o.useRef)({x:0,y:0}),y=(0,o.useMemo)((()=>{switch(n){case $o.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case $o.DraggableRect:return i}}),[n,i,u]),w=(0,o.useRef)(null),x=(0,o.useCallback)((()=>{const e=w.current;if(!e)return;const t=m.current.x*b.current.x,n=m.current.y*b.current.y;e.scrollBy(t,n)}),[]),O=(0,o.useMemo)((()=>l===_o.TreeOrder?[...c].reverse():c),[l,c]);(0,o.useEffect)((()=>{if(a&&c.length&&y){for(const e of O){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=wo(e,o,y,t,f);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return g(),w.current=e,v(x,s),m.current=a,void(b.current=i)}m.current={x:0,y:0},b.current={x:0,y:0},g()}else g()}),[t,x,r,g,a,s,JSON.stringify(y),JSON.stringify(h),v,c,O,d,JSON.stringify(f)])}({...W,delta:M,draggingRect:pe,pointerCoordinates:se,scrollableAncestors:oe,scrollableAncestorRects:ie});const xe=(0,o.useMemo)((()=>({active:k,activeNode:$,activeNodeRect:X,activatorEvent:L,collisions:fe,containerNodeRect:G,dragOverlay:J,draggableNodes:E,droppableContainers:R,droppableRects:B,over:ve,measureDroppableContainers:z,scrollableAncestors:oe,scrollableAncestorRects:ie,measuringConfiguration:j,measuringScheduled:U,windowRect:re})),[k,$,X,L,fe,G,J,E,R,B,ve,z,oe,ie,j,U,re]),Oe=(0,o.useMemo)((()=>({activatorEvent:L,activators:we,active:k,activeNodeRect:X,ariaDescribedById:{draggable:N},dispatch:b,draggableNodes:E,over:ve,measureDroppableContainers:z})),[L,we,k,X,b,N,E,ve,z]);return i().createElement(_r.Provider,{value:w},i().createElement(ui.Provider,{value:Oe},i().createElement(ci.Provider,{value:xe},i().createElement(hi.Provider,{value:me},c)),i().createElement(fi,{disabled:!1===(null==l?void 0:l.restoreFocus)})),i().createElement(Xr,{...l,hiddenTextDescribedById:N}))})),mi=(0,o.createContext)(null),bi="button",yi="Droppable";const wi={timeout:25};const xi=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};function Oi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ci(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function Si(e){return null!==e&&e>=0}const Ei=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Oi(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},Mi="Sortable",Ri=i().createContext({activeIndex:-1,containerId:Mi,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ei,disabled:{draggable:!1,droppable:!1}});function Di(e){let{children:t,id:n,items:r,strategy:a=Ei,disabled:s=!1}=e;const{active:l,dragOverlay:u,droppableRects:c,over:d,measureDroppableContainers:p}=(0,o.useContext)(ci),f=Tr(Mi,n),h=Boolean(null!==u.rect),v=(0,o.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),g=null!=l,m=l?v.indexOf(l.id):-1,b=d?v.indexOf(d.id):-1,y=(0,o.useRef)(v),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{w&&g&&p(v)}),[w,v,g,p]),(0,o.useEffect)((()=>{y.current=v}),[v]);const C=(0,o.useMemo)((()=>({activeIndex:m,containerId:f,disabled:O,disableTransforms:x,items:v,overIndex:b,useDragOverlay:h,sortedRects:Ci(v,c),strategy:a})),[m,f,O.draggable,O.droppable,x,v,b,c,h,a]);return i().createElement(Ri.Provider,{value:C},t)}const Ii=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Oi(n,r,o).indexOf(t)},ki=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!(!u||!r||s!==i&&o===a||!n&&(a===o||t!==l))},Pi={duration:200,easing:"ease"},Ti="transform",Vi=Hr.Transition.toString({property:Ti,duration:0,easing:"linear"}),Li={roleDescription:"sortable"};function Ai(e){let{animateLayoutChanges:t=ki,attributes:n,disabled:r,data:i,getNewIndex:a=Ii,id:s,strategy:l,resizeObserverConfig:u,transition:c=Pi}=e;const{items:d,containerId:p,activeIndex:f,disabled:h,disableTransforms:v,sortedRects:g,overIndex:m,useDragOverlay:b,strategy:y}=(0,o.useContext)(Ri),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=d.indexOf(s),O=(0,o.useMemo)((()=>({sortable:{containerId:p,index:x,items:d},...i})),[p,i,x,d]),C=(0,o.useMemo)((()=>d.slice(d.indexOf(s))),[d,s]),{rect:S,node:E,isOver:M,setNodeRef:R}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Tr("Droppable"),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=(0,o.useContext)(ui),d=(0,o.useRef)({disabled:n}),p=(0,o.useRef)(!1),f=(0,o.useRef)(null),h=(0,o.useRef)(null),{disabled:v,updateMeasurementsFor:g,timeout:m}={...wi,...i},b=Rr(null!=g?g:r),y=qo({callback:(0,o.useCallback)((()=>{p.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{c(Array.isArray(b.current)?b.current:[b.current]),h.current=null}),m)):p.current=!0}),[m]),disabled:v||!s}),w=(0,o.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),p.current=!1),e&&y.observe(e))}),[y]),[x,O]=Ir(w),C=Rr(t);return(0,o.useEffect)((()=>{y&&x.current&&(y.disconnect(),p.current=!1,y.observe(x.current))}),[x,y]),Er((()=>(l({type:Gr.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:f,data:C}}),()=>l({type:Gr.UnregisterDroppable,key:a,id:r}))),[r]),(0,o.useEffect)((()=>{n!==d.current.disabled&&(l({type:Gr.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)}),[r,a,n,l]),{active:s,rect:f,isOver:(null==u?void 0:u.id)===r,node:x,over:u,setNodeRef:O}}({id:s,data:O,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...u}}),{active:D,activatorEvent:I,activeNodeRect:k,attributes:P,setNodeRef:T,listeners:V,isDragging:L,over:A,setActivatorNodeRef:F,transform:N}=function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=Tr(yi),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:p,over:f}=(0,o.useContext)(ui),{role:h=bi,roleDescription:v="draggable",tabIndex:g=0}=null!=i?i:{},m=(null==u?void 0:u.id)===t,b=(0,o.useContext)(m?hi:mi),[y,w]=Ir(),[x,O]=Ir(),C=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),S=Rr(n);return Er((()=>(p.set(t,{id:t,key:a,node:y,activatorNode:x,data:S}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)})),[p,t]),{active:u,activatorEvent:l,activeNodeRect:c,attributes:(0,o.useMemo)((()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":!(!m||h!==bi)||void 0,"aria-roledescription":v,"aria-describedby":d.draggable})),[r,h,g,m,v,d.draggable]),isDragging:m,listeners:r?void 0:C,node:y,over:f,setNodeRef:w,setActivatorNodeRef:O,transform:b}}({id:s,data:O,attributes:{...Li,...n},disabled:w.draggable}),H=function(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}(R,T),j=Boolean(D),B=j&&!v&&Si(f)&&Si(m),z=!b&&L,U=z&&B?N:null,$=B?null!=U?U:(null!=l?l:y)({rects:g,activeNodeRect:k,activeIndex:f,overIndex:m,index:x}):null,_=Si(f)&&Si(m)?a({id:s,items:d,activeIndex:f,overIndex:m}):x,W=null==D?void 0:D.id,Y=(0,o.useRef)({activeId:W,items:d,newIndex:_,containerId:p}),X=d!==Y.current.items,G=t({active:D,containerId:p,isDragging:L,isSorting:j,id:s,index:x,items:d,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:null!=Y.current.activeId}),K=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=(0,o.useState)(null),l=(0,o.useRef)(n);return Er((()=>{if(!t&&n!==l.current&&r.current){const e=i.current;if(e){const t=so(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==l.current&&(l.current=n)}),[t,n,r,i]),(0,o.useEffect)((()=>{a&&s(null)}),[a]),a}({disabled:!G,index:x,node:E,rect:S});return(0,o.useEffect)((()=>{j&&Y.current.newIndex!==_&&(Y.current.newIndex=_),p!==Y.current.containerId&&(Y.current.containerId=p),d!==Y.current.items&&(Y.current.items=d)}),[j,_,p,d]),(0,o.useEffect)((()=>{if(W===Y.current.activeId)return;if(W&&!Y.current.activeId)return void(Y.current.activeId=W);const e=setTimeout((()=>{Y.current.activeId=W}),50);return()=>clearTimeout(e)}),[W]),{active:D,activeIndex:f,attributes:P,data:O,rect:S,index:x,newIndex:_,items:d,isOver:M,isSorting:j,isDragging:L,listeners:V,node:E,overIndex:m,over:A,setNodeRef:H,setActivatorNodeRef:F,setDroppableNodeRef:R,setDraggableNodeRef:T,transform:null!=K?K:$,transition:K||X&&Y.current.newIndex===x?Vi:z&&!Fr(I)||!c?void 0:j||G?Hr.Transition.toString({...c,property:Ti}):void 0}}Do.Down,Do.Right,Do.Up,Do.Left;var Fi=n(459),Ni=n.n(Fi);const{apiFetch:Hi}=wp,ji=e=>{const t={...e.innerProps,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()}},{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:s}=Ai({id:e.data.value}),l={transform:Hr.Translate.toString(a),transition:s};return(0,o.createElement)("div",{style:l,ref:i,...n,...r},(0,o.createElement)(hn.MultiValue,{...e,innerProps:t}))},Bi=e=>(0,o.createElement)(hn.MultiValueRemove,{...e,innerProps:{onPointerDown:e=>e.stopPropagation(),...e.innerProps}}),zi=Ni()((e=>(e=>{const t=e.replace(/\W/g,"");return Hi({path:`/wp/v2/lfe_speaker/?per_page=100&search=${t}`}).then((e=>e.map((e=>({value:e.id,label:e.title.rendered})))))})(e)),1e3,{leading:!1});(0,r.registerBlockType)("lf/speakers-block-2",{edit:function({attributes:e,setAttributes:t}){const{speakers:n}=e,[r,i]=(0,o.useState)(n),s=(0,o.useCallback)((e=>{const{active:n,over:r}=e;n&&r&&i((e=>{const o=e.findIndex((e=>e.value===n.id)),i=e.findIndex((e=>e.value===r.id));let a=Oi(e,o,i);return t({speakers:[...a]}),a}))}),[i]);return[(0,o.createElement)("div",{...(0,a.useBlockProps)(),key:"speakers-block-edit"},(0,o.createElement)("p",null,(0,o.createElement)("strong",null,"Featured Speakers (each opens with modal):")),(0,o.createElement)(gi,{modifiers:[xi],onDragEnd:s,collisionDetection:eo},(0,o.createElement)(Di,{items:r.map((e=>e.value))},(0,o.createElement)(gr,{className:"SortableList",isMulti:!0,defaultOptions:!0,loadOptions:zi,helperClass:"react-select-draggable",value:r,onChange:e=>{t({speakers:[...e]}),i([...e])},components:{MultiValue:ji,MultiValueRemove:Bi},closeMenuOnSelect:!1}))))]}})})(); \ No newline at end of file diff --git a/web/wp-content/plugins/speakers-block-2/includes/speaker-block.php b/web/wp-content/plugins/speakers-block-2/includes/speaker-block.php index 73a1cd02..10532d78 100644 --- a/web/wp-content/plugins/speakers-block-2/includes/speaker-block.php +++ b/web/wp-content/plugins/speakers-block-2/includes/speaker-block.php @@ -6,7 +6,6 @@ * @since 0.3.0 */ -global $wp; global $post; $speaker_id = get_the_ID(); $speaker_slug = $post->post_name; diff --git a/web/wp-content/plugins/speakers-block-2/src/edit.js b/web/wp-content/plugins/speakers-block-2/src/edit.js index b51dcf28..af02b753 100644 --- a/web/wp-content/plugins/speakers-block-2/src/edit.js +++ b/web/wp-content/plugins/speakers-block-2/src/edit.js @@ -1,13 +1,7 @@ import { useBlockProps, - InspectorControls, } from '@wordpress/block-editor'; -import { - PanelBody, - TextControl, -} from '@wordpress/components'; - const { apiFetch } = wp; import React, { MouseEventHandler, useCallback, useState } from 'react'; @@ -93,7 +87,7 @@ const loadOptions = debounce( ); export default function Edit( { attributes, setAttributes } ) { - const { speakers, schedEventID } = attributes; + const { speakers } = attributes; const [selected, setSelected] = useState(speakers); @@ -124,17 +118,6 @@ export default function Edit( { attributes, setAttributes } ) { }, [setSelected]); return [ - - - - setAttributes( { schedEventID: value } ) - } - /> - - ,

Featured Speakers (each opens with modal):