recogito_integration-1.0.x-dev/js/annotorious.min.js
js/annotorious.min.js
(function(me,ne){typeof exports=="object"&&typeof module!="undefined"?ne(exports):typeof define=="function"&&define.amd?define(["exports"],ne):(me=typeof globalThis!="undefined"?globalThis:me||self,ne(me.Annotorious={}))})(this,function(me){"use strict";var HS=Object.defineProperty;var US=(me,ne,$)=>ne in me?HS(me,ne,{enumerable:!0,configurable:!0,writable:!0,value:$}):me[ne]=$;var h=(me,ne,$)=>(US(me,typeof ne!="symbol"?ne+"":ne,$),$);var ne,$,Ci,Nt,Ai,wi,Oi,fn={},$i=[],Kc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Le(t,e){for(var n in e)t[n]=e[n];return t}function xi(t){var e=t.parentNode;e&&e.removeChild(t)}function Q(t,e,n){var r,o,i,a={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:a[i]=e[i];if(arguments.length>2&&(a.children=arguments.length>3?ne.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)a[i]===void 0&&(a[i]=t.defaultProps[i]);return Lt(t,a,r,o,null)}function Lt(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o==null?++Ci:o};return o==null&&$.vnode!=null&&$.vnode(i),i}function $r(){return{current:null}}function Ce(t){return t.children}function J(t,e){this.props=t,this.context=e}function pt(t,e){if(e==null)return t.__?pt(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?pt(t):null}function Pi(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Pi(t)}}function xr(t){(!t.__d&&(t.__d=!0)&&Nt.push(t)&&!dn.__r++||wi!==$.debounceRendering)&&((wi=$.debounceRendering)||Ai)(dn)}function dn(){for(var t;dn.__r=Nt.length;)t=Nt.sort(function(e,n){return e.__v.__b-n.__v.__b}),Nt=[],t.some(function(e){var n,r,o,i,a,s;e.__d&&(a=(i=(n=e).__v).__e,(s=n.__P)&&(r=[],(o=Le({},i)).__v=i.__v+1,Pr(s,i,o,n.__n,s.ownerSVGElement!==void 0,i.__h!=null?[a]:null,r,a==null?pt(i):a,i.__h),Ri(r,i),i.__e!=a&&Pi(i)))})}function Di(t,e,n,r,o,i,a,s,l,c){var u,f,d,p,m,b,v,S=r&&r.__k||$i,C=S.length;for(n.__k=[],u=0;u<e.length;u++)if((p=n.__k[u]=(p=e[u])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?Lt(null,p,null,null,p):Array.isArray(p)?Lt(Ce,{children:p},null,null,null):p.__b>0?Lt(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(d=S[u])===null||d&&p.key==d.key&&p.type===d.type)S[u]=void 0;else for(f=0;f<C;f++){if((d=S[f])&&p.key==d.key&&p.type===d.type){S[f]=void 0;break}d=null}Pr(t,p,d=d||fn,o,i,a,s,l,c),m=p.__e,(f=p.ref)&&d.ref!=f&&(v||(v=[]),d.ref&&v.push(d.ref,null,p),v.push(f,p.__c||m,p)),m!=null?(b==null&&(b=m),typeof p.type=="function"&&p.__k===d.__k?p.__d=l=Ti(p,l,t):l=Mi(t,p,d,S,m,l),typeof n.type=="function"&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=t&&(l=pt(d))}for(n.__e=b,u=C;u--;)S[u]!=null&&(typeof n.type=="function"&&S[u].__e!=null&&S[u].__e==n.__d&&(n.__d=pt(r,u+1)),Li(S[u],S[u]));if(v)for(u=0;u<v.length;u++)Ni(v[u],v[++u],v[++u])}function Ti(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e=typeof r.type=="function"?Ti(r,e,n):Mi(n,r,r,o,r.__e,e));return e}function Be(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Be(n,e)}):e.push(t)),e}function Mi(t,e,n,r,o,i){var a,s,l;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(n==null||o!=i||o.parentNode==null)e:if(i==null||i.parentNode!==t)t.appendChild(o),a=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==o)break e;t.insertBefore(o,i),a=i}return a!==void 0?a:o.nextSibling}function Jc(t,e,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in e||pn(t,i,null,n[i],r);for(i in e)o&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===e[i]||pn(t,i,e[i],n[i],r)}function ki(t,e,n){e[0]==="-"?t.setProperty(e,n):t[e]=n==null?"":typeof n!="number"||Kc.test(e)?n:n+"px"}function pn(t,e,n,r,o){var i;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ki(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||ki(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?Ii:Fi,i):t.removeEventListener(e,i?Ii:Fi,i);else if(e!=="dangerouslySetInnerHTML"){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||e[0]==="a"&&e[1]==="r")?t.setAttribute(e,n):t.removeAttribute(e))}}function Fi(t){this.l[t.type+!1]($.event?$.event(t):t)}function Ii(t){this.l[t.type+!0]($.event?$.event(t):t)}function Pr(t,e,n,r,o,i,a,s,l){var c,u,f,d,p,m,b,v,S,C,P,F=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=e.__e=n.__e,e.__h=null,i=[s]),(c=$.__b)&&c(e);try{e:if(typeof F=="function"){if(v=e.props,S=(c=F.contextType)&&r[c.__c],C=c?S?S.props.value:c.__:r,n.__c?b=(u=e.__c=n.__c).__=u.__E:("prototype"in F&&F.prototype.render?e.__c=u=new F(v,C):(e.__c=u=new J(v,C),u.constructor=F,u.render=Qc),S&&S.sub(u),u.props=v,u.state||(u.state={}),u.context=C,u.__n=r,f=u.__d=!0,u.__h=[]),u.__s==null&&(u.__s=u.state),F.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Le({},u.__s)),Le(u.__s,F.getDerivedStateFromProps(v,u.__s))),d=u.props,p=u.state,f)F.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(F.getDerivedStateFromProps==null&&v!==d&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,C),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,C)===!1||e.__v===n.__v){u.props=v,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(O){O&&(O.__=e)}),u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,C),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(d,p,m)})}u.context=C,u.props=v,u.state=u.__s,(c=$.__r)&&c(e),u.__d=!1,u.__v=e,u.__P=t,c=u.render(u.props,u.state,u.context),u.state=u.__s,u.getChildContext!=null&&(r=Le(Le({},r),u.getChildContext())),f||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(d,p)),P=c!=null&&c.type===Ce&&c.key==null?c.props.children:c,Di(t,Array.isArray(P)?P:[P],e,n,r,o,i,a,s,l),u.base=e.__e,e.__h=null,u.__h.length&&a.push(u),b&&(u.__E=u.__=null),u.__e=!1}else i==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Zc(n.__e,e,n,r,o,i,a,l);(c=$.diffed)&&c(e)}catch(O){e.__v=null,(l||i!=null)&&(e.__e=s,e.__h=!!l,i[i.indexOf(s)]=null),$.__e(O,e,n)}}function Ri(t,e){$.__c&&$.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){$.__e(r,n.__v)}})}function Zc(t,e,n,r,o,i,a,s){var l,c,u,f=n.props,d=e.props,p=e.type,m=0;if(p==="svg"&&(o=!0),i!=null){for(;m<i.length;m++)if((l=i[m])&&"setAttribute"in l==!!p&&(p?l.localName===p:l.nodeType===3)){t=l,i[m]=null;break}}if(t==null){if(p===null)return document.createTextNode(d);t=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),i=null,s=!1}if(p===null)f===d||s&&t.data===d||(t.data=d);else{if(i=i&&ne.call(t.childNodes),c=(f=n.props||fn).dangerouslySetInnerHTML,u=d.dangerouslySetInnerHTML,!s){if(i!=null)for(f={},m=0;m<t.attributes.length;m++)f[t.attributes[m].name]=t.attributes[m].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(Jc(t,d,f,o,s),u)e.__k=[];else if(m=e.props.children,Di(t,Array.isArray(m)?m:[m],e,n,r,o&&p!=="foreignObject",i,a,i?i[0]:n.__k&&pt(n,0),s),i!=null)for(m=i.length;m--;)i[m]!=null&&xi(i[m]);s||("value"in d&&(m=d.value)!==void 0&&(m!==f.value||m!==t.value||p==="progress"&&!m)&&pn(t,"value",m,f.value,!1),"checked"in d&&(m=d.checked)!==void 0&&m!==t.checked&&pn(t,"checked",m,f.checked,!1))}return t}function Ni(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){$.__e(r,n)}}function Li(t,e,n){var r,o;if($.unmount&&$.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Ni(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){$.__e(i,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Li(r[o],e,typeof t.type!="function");n||t.__e==null||xi(t.__e),t.__e=t.__d=void 0}function Qc(t,e,n){return this.constructor(t,n)}function Bt(t,e,n){var r,o,i;$.__&&$.__(t,e),o=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],Pr(e,t=(!r&&n||e).__k=Q(Ce,null,[t]),o||fn,fn,e.ownerSVGElement!==void 0,!r&&n?[n]:o?null:e.firstChild?ne.call(e.childNodes):null,i,!r&&n?n:o?o.__e:e.firstChild,r),Ri(i,t)}function Bi(t,e){Bt(t,e,Bi)}function ef(t,e,n){var r,o,i,a=Le({},t.props);for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:a[i]=e[i];return arguments.length>2&&(a.children=arguments.length>3?ne.call(arguments,2):n),Lt(t.type,a,r||t.key,o||t.ref,null)}function Vt(t,e){var n={__c:e="__cC"+Oi++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(xr)},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ne=$i.slice,$={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(i){t=i}throw t}},Ci=0,J.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Le({},this.state),typeof t=="function"&&(t=t(Le({},n),this.props)),t&&Le(n,t),t!=null&&this.__v&&(e&&this.__h.push(e),xr(this))},J.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),xr(this))},J.prototype.render=Ce,Nt=[],Ai=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dn.__r=0,Oi=0;var et,re,Vi,ht=0,Dr=[],Hi=$.__b,Ui=$.__r,ji=$.diffed,zi=$.__c,Wi=$.unmount;function mt(t,e){$.__h&&$.__h(re,t,ht||e),ht=0;var n=re.__H||(re.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ve(t){return ht=1,Tr(Xi,t)}function Tr(t,e,n){var r=mt(et++,2);return r.t=t,r.__c||(r.__=[n?n(e):Xi(void 0,e),function(o){var i=r.t(r.__[0],o);r.__[0]!==i&&(r.__=[i,r.__[1]],r.__c.setState({}))}],r.__c=re),r.__}function tt(t,e){var n=mt(et++,3);!$.__s&&Fr(n.__H,e)&&(n.__=t,n.__H=e,re.__H.__h.push(n))}function Mr(t,e){var n=mt(et++,4);!$.__s&&Fr(n.__H,e)&&(n.__=t,n.__H=e,re.__h.push(n))}function $e(t){return ht=5,He(function(){return{current:t}},[])}function Gi(t,e,n){ht=6,Mr(function(){typeof t=="function"?t(e()):t&&(t.current=e())},n==null?n:n.concat(t))}function He(t,e){var n=mt(et++,7);return Fr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function xe(t,e){return ht=8,He(function(){return t},e)}function Ht(t){var e=re.context[t.__c],n=mt(et++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(re)),e.props.value):t.__}function qi(t,e){$.useDebugValue&&$.useDebugValue(e?e(t):t)}function tf(t){var e=mt(et++,10),n=Ve();return e.__=t,re.componentDidCatch||(re.componentDidCatch=function(r){e.__&&e.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function nf(){var t;for(Dr.sort(function(e,n){return e.__v.__b-n.__v.__b});t=Dr.pop();)if(t.__P)try{t.__H.__h.forEach(hn),t.__H.__h.forEach(kr),t.__H.__h=[]}catch(e){t.__H.__h=[],$.__e(e,t.__v)}}$.__b=function(t){re=null,Hi&&Hi(t)},$.__r=function(t){Ui&&Ui(t),et=0;var e=(re=t.__c).__H;e&&(e.__h.forEach(hn),e.__h.forEach(kr),e.__h=[])},$.diffed=function(t){ji&&ji(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(Dr.push(e)!==1&&Vi===$.requestAnimationFrame||((Vi=$.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(i),Yi&&cancelAnimationFrame(r),setTimeout(n)},i=setTimeout(o,100);Yi&&(r=requestAnimationFrame(o))})(nf)),re=null},$.__c=function(t,e){e.some(function(n){try{n.__h.forEach(hn),n.__h=n.__h.filter(function(r){return!r.__||kr(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],$.__e(r,n.__v)}}),zi&&zi(t,e)},$.unmount=function(t){Wi&&Wi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{hn(r)}catch(o){e=o}}),e&&$.__e(e,n.__v))};var Yi=typeof requestAnimationFrame=="function";function hn(t){var e=re,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),re=e}function kr(t){var e=re;t.__c=t.__(),re=e}function Fr(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Xi(t,e){return typeof e=="function"?e(t):e}function Ki(t,e){for(var n in e)t[n]=e[n];return t}function Ir(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Ut(t){this.props=t}function Ji(t,e){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!a:Ir(this.props,o)}function r(o){return this.shouldComponentUpdate=n,Q(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ut.prototype=new J).isPureReactComponent=!0,Ut.prototype.shouldComponentUpdate=function(t,e){return Ir(this.props,t)||Ir(this.state,e)};var Zi=$.__b;$.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Zi&&Zi(t)};var rf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(t){function e(n,r){var o=Ki({},n);return delete o.ref,t(o,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return e.$$typeof=rf,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Qi=function(t,e){return t==null?null:Be(Be(t).map(e))},ea={map:Qi,forEach:Qi,count:function(t){return t?Be(t).length:0},only:function(t){var e=Be(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Be},of=$.__e;$.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}of(t,e,n)};var ta=$.unmount;function jt(){this.__u=0,this.t=null,this.__b=null}function na(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function ra(t){var e,n,r;function o(i){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return Q(n,i)}return o.displayName="Lazy",o.__f=!0,o}function vt(){this.u=null,this.o=null}$.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),ta&&ta(t)},(jt.prototype=new J).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=na(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__e){var c=r.state.__e;r.__v.__k[0]=function f(d,p,m){return d&&(d.__v=null,d.__k=d.__k&&d.__k.map(function(b){return f(b,p,m)}),d.__c&&d.__c.__P===p&&(d.__e&&m.insertBefore(d.__e,d.__d),d.__c.__e=!0,d.__c.__P=m)),d}(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__e:r.__b=null});u=r.t.pop();)u.forceUpdate()}},l=e.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(a,a)},jt.prototype.componentWillUnmount=function(){this.t=[]},jt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(a,s,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),a.__c.__H=null),(a=Ki({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(c){return i(c,s,l)})),a}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&Q(Ce,null,t.fallback);return o&&(o.__h=null),[Q(Ce,null,e.__e?null:t.children),o]};var oa=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function af(t){return this.getChildContext=function(){return t.context},t.children}function sf(t){var e=this,n=t.i;e.componentWillUnmount=function(){Bt(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),Bt(Q(af,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Nr(t,e){return Q(sf,{__v:t,i:e})}(vt.prototype=new J).__e=function(t){var e=this,n=na(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),oa(e,t,r)):o()};n?n(i):i()}},vt.prototype.render=function(t){this.u=null,this.o=new Map;var e=Be(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},vt.prototype.componentDidUpdate=vt.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){oa(t,n,e)})};var ia=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,uf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,lf=typeof document!="undefined",cf=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};function aa(t,e,n){return e.__k==null&&(e.textContent=""),Bt(t,e),typeof n=="function"&&n(),t?t.__c:null}function sa(t,e,n){return Bi(t,e),typeof n=="function"&&n(),t?t.__c:null}J.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(J.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var ua=$.event;function ff(){}function df(){return this.cancelBubble}function pf(){return this.defaultPrevented}$.event=function(t){return ua&&(t=ua(t)),t.persist=ff,t.isPropagationStopped=df,t.isDefaultPrevented=pf,t.nativeEvent=t};var la,ca={configurable:!0,get:function(){return this.class}},fa=$.vnode;$.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var o=e.indexOf("-")===-1;for(var i in r={},n){var a=n[i];lf&&i==="children"&&e==="noscript"||i==="value"&&"defaultValue"in n&&a==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===!0?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!cf(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&uf.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),r[i]=a)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Be(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Be(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),t.props=r,n.class!=n.className&&(ca.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",ca))}t.$$typeof=ia,fa&&fa(t)};var da=$.__r;$.__r=function(t){da&&da(t),la=t.__c};var pa={ReactCurrentDispatcher:{current:{readContext:function(t){return la.__n[t.__c].props.value}}}},hf="17.0.2";function ha(t){return Q.bind(null,t)}function Lr(t){return!!t&&t.$$typeof===ia}function ma(t){return Lr(t)?ef.apply(null,arguments):t}function va(t){return!!t.__k&&(Bt(null,t),!0)}function ga(t){return t&&(t.base||t.nodeType===1&&t)||null}var ya=function(t,e){return t(e)},ba=function(t,e){return t(e)},mf=Ce,g={useState:Ve,useReducer:Tr,useEffect:tt,useLayoutEffect:Mr,useRef:$e,useImperativeHandle:Gi,useMemo:He,useCallback:xe,useContext:Ht,useDebugValue:qi,version:"17.0.2",Children:ea,render:aa,hydrate:sa,unmountComponentAtNode:va,createPortal:Nr,createElement:Q,createContext:Vt,createFactory:ha,cloneElement:ma,createRef:$r,Fragment:Ce,isValidElement:Lr,findDOMNode:ga,Component:J,PureComponent:Ut,memo:Ji,forwardRef:Rr,flushSync:ba,unstable_batchedUpdates:ya,StrictMode:Ce,Suspense:jt,SuspenseList:vt,lazy:ra,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pa},Br=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:g,version:hf,Children:ea,render:aa,hydrate:sa,unmountComponentAtNode:va,createPortal:Nr,createFactory:ha,cloneElement:ma,isValidElement:Lr,findDOMNode:ga,PureComponent:Ut,memo:Ji,forwardRef:Rr,flushSync:ba,unstable_batchedUpdates:ya,StrictMode:mf,Suspense:jt,SuspenseList:vt,lazy:ra,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pa,createElement:Q,createContext:Vt,createRef:$r,Fragment:Ce,Component:J,useState:Ve,useReducer:Tr,useEffect:tt,useLayoutEffect:Mr,useRef:$e,useImperativeHandle:Gi,useMemo:He,useCallback:xe,useContext:Ht,useDebugValue:qi,useErrorBoundary:tf}),nt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function vf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Vr(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}),e}var Hr={exports:{}};function Ur(){}Ur.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;for(r;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},Hr.exports=Ur,Hr.exports.TinyEmitter=Ur;var mn=Hr.exports;const B="http://www.w3.org/2000/svg",jr=t=>{const e=t.getAttribute("class");return e?new Set(e.split(" ")):new Set},gt=(t,e)=>{const n=jr(t);n.add(e),t.setAttribute("class",Array.from(n).join(" "))},gf=(t,e)=>{const n=jr(t);n.delete(e),n.size===0?t.removeAttribute("class"):t.setAttribute("class",Array.from(n).join(" "))},Sa=(t,e)=>jr(t).has(e),vn=(t,e)=>{const n=t.selector("FragmentSelector");if(n!=null&&n.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){const{value:r}=n,o=r.includes(":")?r.substring(r.indexOf("=")+1,r.indexOf(":")):"pixel",i=r.includes(":")?r.substring(r.indexOf(":")+1):r.substring(r.indexOf("=")+1);let[a,s,l,c]=i.split(",").map(parseFloat);return o.toLowerCase()==="percent"&&(a=a*e.naturalWidth/100,s=s*e.naturalHeight/100,l=l*e.naturalWidth/100,c=c*e.naturalHeight/100),{x:a,y:s,w:l,h:c}}},yf=(t,e,n,r,o)=>({source:o==null?void 0:o.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=pixel:${t},${e},${n},${r}`}}),bf=(t,e,n,r,o)=>{const i=t/o.naturalWidth*100,a=e/o.naturalHeight*100,s=n/o.naturalWidth*100,l=r/o.naturalHeight*100;return{source:o.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=percent:${i},${a},${s},${l}`}}},zr=(t,e,n,r,o,i)=>(i==null?void 0:i.toLowerCase())==="percent"?bf(t,e,n,r,o):yf(t,e,n,r,o),gn=(t,e,n,r,o)=>{t.setAttribute("x",e),t.setAttribute("y",n),t.setAttribute("width",r),t.setAttribute("height",o)},yn=(t,e,n)=>{t.setAttribute("cx",e),t.setAttribute("cy",n),t.setAttribute("r",7)},_a=(t,e,n,r,o)=>{const i=document.createElementNS(B,"path");i.setAttribute("fill-rule","evenodd");const{naturalWidth:a,naturalHeight:s}=t;return i.setAttribute("d",`M0 0 h${a} v${s} h-${a} z M${e} ${n} h${r} v${o} h-${r} z`),i},Ea=(t,e,n,r,o,i)=>{const{naturalWidth:a,naturalHeight:s}=e;t.setAttribute("d",`M0 0 h${a} v${s} h-${a} z M${n} ${r} h${o} v${i} h-${o} z`)},Wr=(t,e,n,r)=>{const{x:o,y:i,w:a,h:s}=t.type==="Annotation"||t.type==="Selection"?vn(t,e):{x:t,y:e,w:n,h:r},l=document.createElementNS(B,"g");if(a===0&&s===0){gt(l,"a9s-point"),gt(l,"a9s-non-scaling"),l.setAttribute("transform-origin",`${o} ${i}`);const c=document.createElementNS(B,"circle"),u=document.createElementNS(B,"circle");u.setAttribute("class","a9s-inner"),yn(u,o,i),c.setAttribute("class","a9s-outer"),yn(c,o,i),l.appendChild(c),l.appendChild(u)}else{const c=document.createElementNS(B,"rect"),u=document.createElementNS(B,"rect");u.setAttribute("class","a9s-inner"),gn(u,o,i,a,s),c.setAttribute("class","a9s-outer"),gn(c,o,i,a,s),l.appendChild(c),l.appendChild(u)}return l},Gr=t=>{const e=t.querySelector(".a9s-outer");if(e.nodeName==="rect"){const n=parseFloat(e.getAttribute("x")),r=parseFloat(e.getAttribute("y")),o=parseFloat(e.getAttribute("width")),i=parseFloat(e.getAttribute("height"));return{x:n,y:r,w:o,h:i}}else{const n=parseFloat(e.getAttribute("cx")),r=parseFloat(e.getAttribute("cy"));return{x:n,y:r,w:0,h:0}}},Ca=(t,e,n,r,o)=>{const i=t.querySelector(".a9s-inner"),a=t.querySelector(".a9s-outer");a.nodeName==="rect"?(gn(i,e,n,r,o),gn(a,e,n,r,o)):(yn(i,e,n),yn(a,e,n))},Sf=(t,e)=>{const{w:n,h:r}=vn(t,e);return n*r},bn=t=>{let e=0,n=t.length-1;for(let r=0;r<t.length;r++)e+=(t[n][0]+t[r][0])*(t[n][1]-t[r][1]),n=r;return Math.abs(.5*e)},_f=(t,e)=>{const n=t[0],r=t[1];let o=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const s=e[i][0],l=e[i][1],c=e[a][0],u=e[a][1];l>r!=u>r&&n<(c-s)*(r-l)/(u-l)+s&&(o=!o)}return o},Ef=(t,e)=>{for(let n of t)if(!_f(n,e))return!1;return!0},Cf=t=>{const e=t.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(o=>o.trim()),n=[];let r=[];for(let o of e){const i=o.substring(0,1);if(i.toLowerCase()==="z")n.push([...r]),r=[];else{const a=o.substring(1).split(" ").map(u=>parseFloat(u.trim())),s=i===i.toUpperCase(),l=s?a[0]:a[0]+r[r.length-1][0],c=s?a[1]:a[1]+r[r.length-1][1];r.push([l,c])}}return r.length>0&&n.push([...r]),n},Af=t=>{const r=new XMLSerializer().serializeToString(t.documentElement).replace("<svg>",`<svg xmlns="${B}">`);return new DOMParser().parseFromString(r,"image/svg+xml").documentElement},Aa=t=>{const e=r=>{Array.from(r.attributes).forEach(o=>{o.name.startsWith("on")&&r.removeAttribute(o.name)})},n=t.getElementsByTagName("script");return Array.from(n).reverse().forEach(r=>r.parentNode.removeChild(r)),e(t),Array.from(t.querySelectorAll("*")).forEach(e),t},qr=t=>{const e=t.selector("SvgSelector");if(e){const n=new DOMParser,{value:r}=e,o=n.parseFromString(r,"image/svg+xml"),i=o.lookupPrefix(B),a=o.lookupNamespaceURI(null);return i||a?Aa(o).firstChild:Aa(Af(o)).firstChild}},wa=t=>{const e=qr(t),n=document.createElementNS(B,"g"),r=e.cloneNode(!0);r.setAttribute("class","a9s-inner");const o=e.cloneNode(!0);return o.setAttribute("class","a9s-outer"),n.appendChild(o),n.appendChild(r),n},Yr=(t,e)=>{const n=t.querySelector(".a9s-inner").cloneNode(!0);n.removeAttribute("class"),n.removeAttribute("xmlns");let r=n.outerHTML||new XMLSerializer().serializeToString(n);return r=r.replace(` xmlns="${B}"`,""),{source:e==null?void 0:e.src,selector:{type:"SvgSelector",value:`<svg>${r}</svg>`}}},wf=t=>{const e=qr(t),n=e.nodeName.toLowerCase();if(n==="polygon")return Of(e);if(n==="circle")return $f(e);if(n==="ellipse")return xf(e);if(n=="path")return Pf(e);if(n=="line")return 0;throw`Unsupported SVG shape type: ${n}`},Of=t=>{const e=t.getAttribute("points").trim().split(" ").map(n=>n.split(",").map(r=>parseFloat(r.trim())));return bn(e)},$f=t=>{const e=t.getAttribute("r");return e*e*Math.PI},xf=t=>{const e=t.getAttribute("rx"),n=t.getAttribute("ry");return e*n*Math.PI},Pf=t=>{const e=Cf(t);if(e.length==1)return bn(e[0]);{const n=o=>e.find(i=>{if(o!==i)return Ef(o,i)});let r=0;for(let o of e)n(o)?r-=bn(o):r+=bn(o);return r}},Df={FragmentSelector:Wr,SvgSelector:wa},Tf={FragmentSelector:Sf,SvgSelector:wf},Oa=t=>{const e=t.targets[0];if(e)return Array.isArray(e.selector)?e.selector[0]:e.selector},Mf=(t,e)=>Df[Oa(t).type](t,e),Sn=(t,e)=>Tf[Oa(t).type](t,e);var _n={exports:{}},$a={},yt=Vr(Br),zt={exports:{}},kf="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ff=kf,If=Ff;function xa(){}function Pa(){}Pa.resetWarningCache=xa;var Rf=function(){function t(r,o,i,a,s,l){if(l!==If){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Pa,resetWarningCache:xa};return n.PropTypes=n,n};zt.exports=Rf();function Da(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Da(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Nf(){for(var t=0,e,n,r="";t<arguments.length;)(e=arguments[t++])&&(n=Da(e))&&(r&&(r+=" "),r+=n);return r}var Lf=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Nf}),Bf=Vr(Lf),q={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.findInArray=Vf,Pe.isFunction=Hf,Pe.isNum=Uf,Pe.int=jf,Pe.dontSetMe=zf;function Vf(t,e){for(var n=0,r=t.length;n<r;n++)if(e.apply(e,[t[n],n,t]))return t[n]}function Hf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Function]"}function Uf(t){return typeof t=="number"&&!isNaN(t)}function jf(t){return parseInt(t,10)}function zf(t,e,n){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(n," - do not set this, set it on the child."))}var rt={};Object.defineProperty(rt,"__esModule",{value:!0}),rt.getPrefix=Ta,rt.browserPrefixToKey=Ma,rt.browserPrefixToStyle=Wf,rt.default=void 0;var Xr=["Moz","Webkit","O","ms"];function Ta(){var t,e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";var r=(t=window.document)===null||t===void 0||(e=t.documentElement)===null||e===void 0?void 0:e.style;if(!r||n in r)return"";for(var o=0;o<Xr.length;o++)if(Ma(n,Xr[o])in r)return Xr[o];return""}function Ma(t,e){return e?"".concat(e).concat(Gf(t)):t}function Wf(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t}function Gf(t){for(var e="",n=!0,r=0;r<t.length;r++)n?(e+=t[r].toUpperCase(),n=!1):t[r]==="-"?n=!0:e+=t[r];return e}var qf=Ta();rt.default=qf;function En(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?En=function(n){return typeof n}:En=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},En(t)}Object.defineProperty(q,"__esModule",{value:!0}),q.matchesSelector=La,q.matchesSelectorAndParentsTo=Xf,q.addEvent=Kf,q.removeEvent=Jf,q.outerHeight=Zf,q.outerWidth=Qf,q.innerHeight=ed,q.innerWidth=td,q.offsetXYFromParent=nd,q.createCSSTransform=rd,q.createSVGTransform=od,q.getTranslation=Kr,q.getTouch=id,q.getTouchIdentifier=ad,q.addUserSelectStyles=sd,q.removeUserSelectStyles=ud,q.addClassName=Ba,q.removeClassName=Va;var ge=Pe,ka=Yf(rt);function Fa(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Fa=function(o){return o?n:e})(t)}function Yf(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||En(t)!=="object"&&typeof t!="function")return{default:t};var n=Fa(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function Ia(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ra(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ia(Object(n),!0).forEach(function(r){Na(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ia(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Na(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Cn="";function La(t,e){return Cn||(Cn=(0,ge.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,ge.isFunction)(t[n])})),(0,ge.isFunction)(t[Cn])?t[Cn](e):!1}function Xf(t,e,n){var r=t;do{if(La(r,e))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Kf(t,e,n,r){if(!!t){var o=Ra({capture:!0},r);t.addEventListener?t.addEventListener(e,n,o):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}}function Jf(t,e,n,r){if(!!t){var o=Ra({capture:!0},r);t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}}function Zf(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,ge.int)(n.borderTopWidth),e+=(0,ge.int)(n.borderBottomWidth),e}function Qf(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,ge.int)(n.borderLeftWidth),e+=(0,ge.int)(n.borderRightWidth),e}function ed(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,ge.int)(n.paddingTop),e-=(0,ge.int)(n.paddingBottom),e}function td(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,ge.int)(n.paddingLeft),e-=(0,ge.int)(n.paddingRight),e}function nd(t,e,n){var r=e===e.ownerDocument.body,o=r?{left:0,top:0}:e.getBoundingClientRect(),i=(t.clientX+e.scrollLeft-o.left)/n,a=(t.clientY+e.scrollTop-o.top)/n;return{x:i,y:a}}function rd(t,e){var n=Kr(t,e,"px");return Na({},(0,ka.browserPrefixToKey)("transform",ka.default),n)}function od(t,e){var n=Kr(t,e,"");return n}function Kr(t,e,n){var r=t.x,o=t.y,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(e){var a="".concat(typeof e.x=="string"?e.x:e.x+n),s="".concat(typeof e.y=="string"?e.y:e.y+n);i="translate(".concat(a,", ").concat(s,")")+i}return i}function id(t,e){return t.targetTouches&&(0,ge.findInArray)(t.targetTouches,function(n){return e===n.identifier})||t.changedTouches&&(0,ge.findInArray)(t.changedTouches,function(n){return e===n.identifier})}function ad(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier}function sd(t){if(!!t){var e=t.getElementById("react-draggable-style-el");e||(e=t.createElement("style"),e.type="text/css",e.id="react-draggable-style-el",e.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,e.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,t.getElementsByTagName("head")[0].appendChild(e)),t.body&&Ba(t.body,"react-draggable-transparent-selection")}}function ud(t){if(!!t)try{if(t.body&&Va(t.body,"react-draggable-transparent-selection"),t.selection)t.selection.empty();else{var e=(t.defaultView||window).getSelection();e&&e.type!=="Caret"&&e.removeAllRanges()}}catch{}}function Ba(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function Va(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}var De={};Object.defineProperty(De,"__esModule",{value:!0}),De.getBoundPosition=ld,De.snapToGrid=cd,De.canDragX=fd,De.canDragY=dd,De.getControlPosition=pd,De.createCoreData=hd,De.createDraggableData=md;var ye=Pe,bt=q;function ld(t,e,n){if(!t.props.bounds)return[e,n];var r=t.props.bounds;r=typeof r=="string"?r:vd(r);var o=Jr(t);if(typeof r=="string"){var i=o.ownerDocument,a=i.defaultView,s;if(r==="parent"?s=o.parentNode:s=i.querySelector(r),!(s instanceof a.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var l=s,c=a.getComputedStyle(o),u=a.getComputedStyle(l);r={left:-o.offsetLeft+(0,ye.int)(u.paddingLeft)+(0,ye.int)(c.marginLeft),top:-o.offsetTop+(0,ye.int)(u.paddingTop)+(0,ye.int)(c.marginTop),right:(0,bt.innerWidth)(l)-(0,bt.outerWidth)(o)-o.offsetLeft+(0,ye.int)(u.paddingRight)-(0,ye.int)(c.marginRight),bottom:(0,bt.innerHeight)(l)-(0,bt.outerHeight)(o)-o.offsetTop+(0,ye.int)(u.paddingBottom)-(0,ye.int)(c.marginBottom)}}return(0,ye.isNum)(r.right)&&(e=Math.min(e,r.right)),(0,ye.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,ye.isNum)(r.left)&&(e=Math.max(e,r.left)),(0,ye.isNum)(r.top)&&(n=Math.max(n,r.top)),[e,n]}function cd(t,e,n){var r=Math.round(e/t[0])*t[0],o=Math.round(n/t[1])*t[1];return[r,o]}function fd(t){return t.props.axis==="both"||t.props.axis==="x"}function dd(t){return t.props.axis==="both"||t.props.axis==="y"}function pd(t,e,n){var r=typeof e=="number"?(0,bt.getTouch)(t,e):null;if(typeof e=="number"&&!r)return null;var o=Jr(n),i=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,bt.offsetXYFromParent)(r||t,i,n.props.scale)}function hd(t,e,n){var r=t.state,o=!(0,ye.isNum)(r.lastX),i=Jr(t);return o?{node:i,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:i,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}}function md(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function vd(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function Jr(t){var e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var An={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=gd;function gd(){}function Wt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wt=function(n){return typeof n}:Wt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wt(t)}Object.defineProperty(An,"__esModule",{value:!0}),An.default=void 0;var Zr=bd(yt),be=eo(zt.exports),yd=eo(yt),se=q,ot=De,Qr=Pe,Gt=eo(wn);function eo(t){return t&&t.__esModule?t:{default:t}}function Ha(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Ha=function(o){return o?n:e})(t)}function bd(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Wt(t)!=="object"&&typeof t!="function")return{default:t};var n=Ha(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function Sd(t,e){return Ad(t)||Cd(t,e)||Ed(t,e)||_d()}function _d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ed(t,e){if(!!t){if(typeof t=="string")return Ua(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ua(t,e)}}function Ua(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cd(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Ad(t){if(Array.isArray(t))return t}function wd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Od(t,e,n){return e&&ja(t.prototype,e),n&&ja(t,n),t}function $d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&to(t,e)}function to(t,e){return to=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},to(t,e)}function xd(t){var e=Dd();return function(){var r=On(t),o;if(e){var i=On(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Pd(this,o)}}function Pd(t,e){if(e&&(Wt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ue(t)}function ue(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dd(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function On(t){return On=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},On(t)}function Ae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Oe={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Ge=Oe.mouse,$n=function(t){$d(n,t);var e=xd(n);function n(){var r;wd(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i)),Ae(ue(r),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),Ae(ue(r),"mounted",!1),Ae(ue(r),"handleDragStart",function(s){if(r.props.onMouseDown(s),!r.props.allowAnyClick&&typeof s.button=="number"&&s.button!==0)return!1;var l=r.findDOMNode();if(!l||!l.ownerDocument||!l.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var c=l.ownerDocument;if(!(r.props.disabled||!(s.target instanceof c.defaultView.Node)||r.props.handle&&!(0,se.matchesSelectorAndParentsTo)(s.target,r.props.handle,l)||r.props.cancel&&(0,se.matchesSelectorAndParentsTo)(s.target,r.props.cancel,l))){s.type==="touchstart"&&s.preventDefault();var u=(0,se.getTouchIdentifier)(s);r.setState({touchIdentifier:u});var f=(0,ot.getControlPosition)(s,u,ue(r));if(f!=null){var d=f.x,p=f.y,m=(0,ot.createCoreData)(ue(r),d,p);(0,Gt.default)("DraggableCore: handleDragStart: %j",m),(0,Gt.default)("calling",r.props.onStart);var b=r.props.onStart(s,m);b===!1||r.mounted===!1||(r.props.enableUserSelectHack&&(0,se.addUserSelectStyles)(c),r.setState({dragging:!0,lastX:d,lastY:p}),(0,se.addEvent)(c,Ge.move,r.handleDrag),(0,se.addEvent)(c,Ge.stop,r.handleDragStop))}}}),Ae(ue(r),"handleDrag",function(s){var l=(0,ot.getControlPosition)(s,r.state.touchIdentifier,ue(r));if(l!=null){var c=l.x,u=l.y;if(Array.isArray(r.props.grid)){var f=c-r.state.lastX,d=u-r.state.lastY,p=(0,ot.snapToGrid)(r.props.grid,f,d),m=Sd(p,2);if(f=m[0],d=m[1],!f&&!d)return;c=r.state.lastX+f,u=r.state.lastY+d}var b=(0,ot.createCoreData)(ue(r),c,u);(0,Gt.default)("DraggableCore: handleDrag: %j",b);var v=r.props.onDrag(s,b);if(v===!1||r.mounted===!1){try{r.handleDragStop(new MouseEvent("mouseup"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.handleDragStop(S)}return}r.setState({lastX:c,lastY:u})}}),Ae(ue(r),"handleDragStop",function(s){if(!!r.state.dragging){var l=(0,ot.getControlPosition)(s,r.state.touchIdentifier,ue(r));if(l!=null){var c=l.x,u=l.y,f=(0,ot.createCoreData)(ue(r),c,u),d=r.props.onStop(s,f);if(d===!1||r.mounted===!1)return!1;var p=r.findDOMNode();p&&r.props.enableUserSelectHack&&(0,se.removeUserSelectStyles)(p.ownerDocument),(0,Gt.default)("DraggableCore: handleDragStop: %j",f),r.setState({dragging:!1,lastX:NaN,lastY:NaN}),p&&((0,Gt.default)("DraggableCore: Removing handlers"),(0,se.removeEvent)(p.ownerDocument,Ge.move,r.handleDrag),(0,se.removeEvent)(p.ownerDocument,Ge.stop,r.handleDragStop))}}}),Ae(ue(r),"onMouseDown",function(s){return Ge=Oe.mouse,r.handleDragStart(s)}),Ae(ue(r),"onMouseUp",function(s){return Ge=Oe.mouse,r.handleDragStop(s)}),Ae(ue(r),"onTouchStart",function(s){return Ge=Oe.touch,r.handleDragStart(s)}),Ae(ue(r),"onTouchEnd",function(s){return Ge=Oe.touch,r.handleDragStop(s)}),r}return Od(n,[{key:"componentDidMount",value:function(){this.mounted=!0;var o=this.findDOMNode();o&&(0,se.addEvent)(o,Oe.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.findDOMNode();if(o){var i=o.ownerDocument;(0,se.removeEvent)(i,Oe.mouse.move,this.handleDrag),(0,se.removeEvent)(i,Oe.touch.move,this.handleDrag),(0,se.removeEvent)(i,Oe.mouse.stop,this.handleDragStop),(0,se.removeEvent)(i,Oe.touch.stop,this.handleDragStop),(0,se.removeEvent)(o,Oe.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,se.removeUserSelectStyles)(i)}}},{key:"findDOMNode",value:function(){var o,i,a;return(o=(i=this.props)===null||i===void 0||(a=i.nodeRef)===null||a===void 0?void 0:a.current)!==null&&o!==void 0?o:yd.default.findDOMNode(this)}},{key:"render",value:function(){return Zr.cloneElement(Zr.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),n}(Zr.Component);An.default=$n,Ae($n,"displayName","DraggableCore"),Ae($n,"propTypes",{allowAnyClick:be.default.bool,disabled:be.default.bool,enableUserSelectHack:be.default.bool,offsetParent:function(e,n){if(e[n]&&e[n].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:be.default.arrayOf(be.default.number),handle:be.default.string,cancel:be.default.string,nodeRef:be.default.object,onStart:be.default.func,onDrag:be.default.func,onStop:be.default.func,onMouseDown:be.default.func,scale:be.default.number,className:Qr.dontSetMe,style:Qr.dontSetMe,transform:Qr.dontSetMe}),Ae($n,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(t){function e(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(E){return typeof E}:e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var n=m(yt),r=d(zt.exports),o=d(yt),i=d(Bf),a=q,s=De,l=Pe,c=d(An),u=d(wn),f=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function d(y){return y&&y.__esModule?y:{default:y}}function p(y){if(typeof WeakMap!="function")return null;var _=new WeakMap,E=new WeakMap;return(p=function(w){return w?E:_})(y)}function m(y,_){if(!_&&y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var E=p(_);if(E&&E.has(y))return E.get(y);var A={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in y)if(D!=="default"&&Object.prototype.hasOwnProperty.call(y,D)){var I=w?Object.getOwnPropertyDescriptor(y,D):null;I&&(I.get||I.set)?Object.defineProperty(A,D,I):A[D]=y[D]}return A.default=y,E&&E.set(y,A),A}function b(){return b=Object.assign||function(y){for(var _=1;_<arguments.length;_++){var E=arguments[_];for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&(y[A]=E[A])}return y},b.apply(this,arguments)}function v(y,_){if(y==null)return{};var E=S(y,_),A,w;if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(y);for(w=0;w<D.length;w++)A=D[w],!(_.indexOf(A)>=0)&&(!Object.prototype.propertyIsEnumerable.call(y,A)||(E[A]=y[A]))}return E}function S(y,_){if(y==null)return{};var E={},A=Object.keys(y),w,D;for(D=0;D<A.length;D++)w=A[D],!(_.indexOf(w)>=0)&&(E[w]=y[w]);return E}function C(y,_){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);_&&(A=A.filter(function(w){return Object.getOwnPropertyDescriptor(y,w).enumerable})),E.push.apply(E,A)}return E}function P(y){for(var _=1;_<arguments.length;_++){var E=arguments[_]!=null?arguments[_]:{};_%2?C(Object(E),!0).forEach(function(A){we(y,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(E)):C(Object(E)).forEach(function(A){Object.defineProperty(y,A,Object.getOwnPropertyDescriptor(E,A))})}return y}function F(y,_){return H(y)||X(y,_)||k(y,_)||O()}function O(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k(y,_){if(!!y){if(typeof y=="string")return x(y,_);var E=Object.prototype.toString.call(y).slice(8,-1);if(E==="Object"&&y.constructor&&(E=y.constructor.name),E==="Map"||E==="Set")return Array.from(y);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return x(y,_)}}function x(y,_){(_==null||_>y.length)&&(_=y.length);for(var E=0,A=new Array(_);E<_;E++)A[E]=y[E];return A}function X(y,_){var E=y==null?null:typeof Symbol!="undefined"&&y[Symbol.iterator]||y["@@iterator"];if(E!=null){var A=[],w=!0,D=!1,I,j;try{for(E=E.call(y);!(w=(I=E.next()).done)&&(A.push(I.value),!(_&&A.length===_));w=!0);}catch(U){D=!0,j=U}finally{try{!w&&E.return!=null&&E.return()}finally{if(D)throw j}}return A}}function H(y){if(Array.isArray(y))return y}function fe(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function W(y,_){for(var E=0;E<_.length;E++){var A=_[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function z(y,_,E){return _&&W(y.prototype,_),E&&W(y,E),y}function Y(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),_&&de(y,_)}function de(y,_){return de=Object.setPrototypeOf||function(A,w){return A.__proto__=w,A},de(y,_)}function Ie(y){var _=ln();return function(){var A=Re(y),w;if(_){var D=Re(this).constructor;w=Reflect.construct(A,arguments,D)}else w=A.apply(this,arguments);return he(this,w)}}function he(y,_){if(_&&(e(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(y)}function te(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function ln(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Re(y){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},Re(y)}function we(y,_,E){return _ in y?Object.defineProperty(y,_,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[_]=E,y}var dt=function(y){Y(E,y);var _=Ie(E);function E(A){var w;return fe(this,E),w=_.call(this,A),we(te(w),"onDragStart",function(D,I){(0,u.default)("Draggable: onDragStart: %j",I);var j=w.props.onStart(D,(0,s.createDraggableData)(te(w),I));if(j===!1)return!1;w.setState({dragging:!0,dragged:!0})}),we(te(w),"onDrag",function(D,I){if(!w.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",I);var j=(0,s.createDraggableData)(te(w),I),U={x:j.x,y:j.y};if(w.props.bounds){var Ze=U.x,We=U.y;U.x+=w.state.slackX,U.y+=w.state.slackY;var Qe=(0,s.getBoundPosition)(te(w),U.x,U.y),Ne=F(Qe,2),cn=Ne[0],wr=Ne[1];U.x=cn,U.y=wr,U.slackX=w.state.slackX+(Ze-U.x),U.slackY=w.state.slackY+(We-U.y),j.x=U.x,j.y=U.y,j.deltaX=U.x-w.state.x,j.deltaY=U.y-w.state.y}var Or=w.props.onDrag(D,j);if(Or===!1)return!1;w.setState(U)}),we(te(w),"onDragStop",function(D,I){if(!w.state.dragging)return!1;var j=w.props.onStop(D,(0,s.createDraggableData)(te(w),I));if(j===!1)return!1;(0,u.default)("Draggable: onDragStop: %j",I);var U={dragging:!1,slackX:0,slackY:0},Ze=Boolean(w.props.position);if(Ze){var We=w.props.position,Qe=We.x,Ne=We.y;U.x=Qe,U.y=Ne}w.setState(U)}),w.state={dragging:!1,dragged:!1,x:A.position?A.position.x:A.defaultPosition.x,y:A.position?A.position.y:A.defaultPosition.y,prevPropsPosition:P({},A.position),slackX:0,slackY:0,isElementSVG:!1},A.position&&!(A.onDrag||A.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),w}return z(E,[{key:"componentDidMount",value:function(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var w,D,I;return(w=(D=this.props)===null||D===void 0||(I=D.nodeRef)===null||I===void 0?void 0:I.current)!==null&&w!==void 0?w:o.default.findDOMNode(this)}},{key:"render",value:function(){var w,D=this.props;D.axis,D.bounds;var I=D.children,j=D.defaultPosition,U=D.defaultClassName,Ze=D.defaultClassNameDragging,We=D.defaultClassNameDragged,Qe=D.position,Ne=D.positionOffset;D.scale;var cn=v(D,f),wr={},Or=null,BS=Boolean(Qe),qc=!BS||this.state.dragging,Yc=Qe||j,Xc={x:(0,s.canDragX)(this)&&qc?this.state.x:Yc.x,y:(0,s.canDragY)(this)&&qc?this.state.y:Yc.y};this.state.isElementSVG?Or=(0,a.createSVGTransform)(Xc,Ne):wr=(0,a.createCSSTransform)(Xc,Ne);var VS=(0,i.default)(I.props.className||"",U,(w={},we(w,Ze,this.state.dragging),we(w,We,this.state.dragged),w));return n.createElement(c.default,b({},cn,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(I),{className:VS,style:P(P({},I.props.style),wr),transform:Or}))}}],[{key:"getDerivedStateFromProps",value:function(w,D){var I=w.position,j=D.prevPropsPosition;return I&&(!j||I.x!==j.x||I.y!==j.y)?((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:I,prevPropsPosition:j}),{x:I.x,y:I.y,prevPropsPosition:P({},I)}):null}}]),E}(n.Component);t.default=dt,we(dt,"displayName","Draggable"),we(dt,"propTypes",P(P({},c.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),we(dt,"defaultProps",P(P({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}($a);var za=$a,Wa=za.default,Td=za.DraggableCore;_n.exports=Wa,_n.exports.default=Wa,_n.exports.DraggableCore=Td;var Md=_n.exports,kd=["second","minute","hour","day","week","month","year"];function Fd(t,e){if(e===0)return["just now","right now"];var n=kd[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]}var Id=["\u79D2","\u5206\u949F","\u5C0F\u65F6","\u5929","\u5468","\u4E2A\u6708","\u5E74"];function Rd(t,e){if(e===0)return["\u521A\u521A","\u7247\u523B\u540E"];var n=Id[~~(e/2)];return[t+" "+n+"\u524D",t+" "+n+"\u540E"]}var no={},G=function(t,e){no[t]=e},Ga=function(t){return no[t]||no.en_US},it=[60,60,24,7,365/7/12,12];function qa(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}function Ya(t,e){var n=t<0?1:0;t=Math.abs(t);for(var r=t,o=0;t>=it[o]&&o<it.length;o++)t/=it[o];return t=Math.floor(t),o*=2,t>(o===0?9:1)&&(o+=1),e(t,o,r)[n].replace("%s",t.toString())}function Xa(t,e){var n=e?qa(e):new Date;return(+n-+qa(t))/1e3}function Nd(t){for(var e=1,n=0,r=Math.abs(t);t>=it[n]&&n<it.length;n++)t/=it[n],e*=it[n];return r=r%e,r=r?e-r:e,Math.ceil(r)}var Ld=function(t,e,n){var r=Xa(t,n&&n.relativeDate);return Ya(r,Ga(e))},Ka="timeago-id";function Bd(t){return t.getAttribute("datetime")}function Vd(t,e){t.setAttribute(Ka,e)}function Ja(t){return parseInt(t.getAttribute(Ka))}var ro={},oo=function(t){clearTimeout(t),delete ro[t]};function Za(t,e,n,r){oo(Ja(t));var o=r.relativeDate,i=r.minInterval,a=Xa(e,o);t.innerText=Ya(a,n);var s=setTimeout(function(){Za(t,e,n,r)},Math.min(Math.max(Nd(a),i||1)*1e3,2147483647));ro[s]=0,Vd(t,s)}function Qa(t){t?oo(Ja(t)):Object.keys(ro).forEach(oo)}function Hd(t,e,n){var r=t.length?t:[t];return r.forEach(function(o){Za(o,Bd(o),Ga(e),n||{})}),r}G("en_US",Fd),G("zh_CN",Rd);var Ud=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),io=globalThis&&globalThis.__assign||function(){return io=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},io.apply(this,arguments)},jd=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n},zd=function(t){return""+(t instanceof Date?t.getTime():t)},Wd=function(t){Ud(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.dom=null,n}return e.prototype.componentDidMount=function(){this.renderTimeAgo()},e.prototype.componentDidUpdate=function(){this.renderTimeAgo()},e.prototype.renderTimeAgo=function(){var n=this.props,r=n.live,o=n.datetime,i=n.locale,a=n.opts;Qa(this.dom),r!==!1&&(this.dom.setAttribute("datetime",zd(o)),Hd(this.dom,i,a))},e.prototype.componentWillUnmount=function(){Qa(this.dom)},e.prototype.render=function(){var n=this,r=this.props,o=r.datetime;r.live;var i=r.locale,a=r.opts,s=jd(r,["datetime","live","locale","opts"]);return Q("time",io({ref:function(l){n.dom=l}},s),Ld(o,i,a))},e.defaultProps={live:!0,className:""},e}(Ut);function Gd(t,e){const n=r=>{t.current&&!t.current.contains(event.target)&&e()};tt(()=>(document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)))}var es=Object.prototype.toString,ts=function(e){var n=es.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&es.call(e.callee)==="[object Function]"),r},ns;if(!Object.keys){var xn=Object.prototype.hasOwnProperty,rs=Object.prototype.toString,qd=ts,os=Object.prototype.propertyIsEnumerable,Yd=!os.call({toString:null},"toString"),Xd=os.call(function(){},"prototype"),Pn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ao=function(t){var e=t.constructor;return e&&e.prototype===t},Kd={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Jd=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Kd["$"+t]&&xn.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{ao(window[t])}catch{return!0}}catch{return!0}return!1}(),Zd=function(t){if(typeof window=="undefined"||!Jd)return ao(t);try{return ao(t)}catch{return!1}};ns=function(e){var n=e!==null&&typeof e=="object",r=rs.call(e)==="[object Function]",o=qd(e),i=n&&rs.call(e)==="[object String]",a=[];if(!n&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var s=Xd&&r;if(i&&e.length>0&&!xn.call(e,0))for(var l=0;l<e.length;++l)a.push(String(l));if(o&&e.length>0)for(var c=0;c<e.length;++c)a.push(String(c));else for(var u in e)!(s&&u==="prototype")&&xn.call(e,u)&&a.push(String(u));if(Yd)for(var f=Zd(e),d=0;d<Pn.length;++d)!(f&&Pn[d]==="constructor")&&xn.call(e,Pn[d])&&a.push(Pn[d]);return a}}var Qd=ns,ep=Array.prototype.slice,tp=ts,is=Object.keys,Dn=is?function(e){return is(e)}:Qd,as=Object.keys;Dn.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(r){return tp(r)?as(ep.call(r)):as(r)})}else Object.keys=Dn;return Object.keys||Dn};var np=Dn,rp=np,op=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ip=Object.prototype.toString,ap=Array.prototype.concat,so=Object.defineProperty,sp=function(t){return typeof t=="function"&&ip.call(t)==="[object Function]"},up=function(){var t={};try{so(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch{return!1}},ss=so&&up(),lp=function(t,e,n,r){e in t&&(!sp(r)||!r())||(ss?so(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},us=function(t,e){var n=arguments.length>2?arguments[2]:{},r=rp(e);op&&(r=ap.call(r,Object.getOwnPropertySymbols(e)));for(var o=0;o<r.length;o+=1)lp(t,r[o],e[r[o]],n[r[o]])};us.supportsDescriptors=!!ss;var St=us,_t={exports:{}},cp="Function.prototype.bind called on incompatible ",uo=Array.prototype.slice,fp=Object.prototype.toString,dp="[object Function]",pp=function(e){var n=this;if(typeof n!="function"||fp.call(n)!==dp)throw new TypeError(cp+n);for(var r=uo.call(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,r.concat(uo.call(arguments)));return Object(u)===u?u:this}else return n.apply(e,r.concat(uo.call(arguments)))},a=Math.max(0,n.length-r.length),s=[],l=0;l<a;l++)s.push("$"+l);if(o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},hp=pp,lo=Function.prototype.bind||hp,ls=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},cs=typeof Symbol!="undefined"&&Symbol,mp=ls,fs=function(){return typeof cs!="function"||typeof Symbol!="function"||typeof cs("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mp()},vp=lo,ds=vp.call(Function.call,Object.prototype.hasOwnProperty),R,qt=SyntaxError,ps=Function,Et=TypeError,co=function(t){try{return ps('"use strict"; return ('+t+").constructor;")()}catch{}},at=Object.getOwnPropertyDescriptor;if(at)try{at({},"")}catch{at=null}var fo=function(){throw new Et},gp=at?function(){try{return arguments.callee,fo}catch{try{return at(arguments,"callee").get}catch{return fo}}}():fo,Ct=fs(),qe=Object.getPrototypeOf||function(t){return t.__proto__},At={},yp=typeof Uint8Array=="undefined"?R:qe(Uint8Array),wt={"%AggregateError%":typeof AggregateError=="undefined"?R:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?R:ArrayBuffer,"%ArrayIteratorPrototype%":Ct?qe([][Symbol.iterator]()):R,"%AsyncFromSyncIteratorPrototype%":R,"%AsyncFunction%":At,"%AsyncGenerator%":At,"%AsyncGeneratorFunction%":At,"%AsyncIteratorPrototype%":At,"%Atomics%":typeof Atomics=="undefined"?R:Atomics,"%BigInt%":typeof BigInt=="undefined"?R:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?R:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?R:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?R:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?R:FinalizationRegistry,"%Function%":ps,"%GeneratorFunction%":At,"%Int8Array%":typeof Int8Array=="undefined"?R:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?R:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?R:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ct?qe(qe([][Symbol.iterator]())):R,"%JSON%":typeof JSON=="object"?JSON:R,"%Map%":typeof Map=="undefined"?R:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ct?R:qe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?R:Promise,"%Proxy%":typeof Proxy=="undefined"?R:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?R:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?R:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ct?R:qe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?R:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ct?qe(""[Symbol.iterator]()):R,"%Symbol%":Ct?Symbol:R,"%SyntaxError%":qt,"%ThrowTypeError%":gp,"%TypedArray%":yp,"%TypeError%":Et,"%Uint8Array%":typeof Uint8Array=="undefined"?R:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?R:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?R:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?R:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?R:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?R:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?R:WeakSet},bp=function t(e){var n;if(e==="%AsyncFunction%")n=co("async function () {}");else if(e==="%GeneratorFunction%")n=co("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=co("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&(n=qe(o.prototype))}return wt[e]=n,n},hs={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Tn=lo,Mn=ds,Sp=Tn.call(Function.call,Array.prototype.concat),_p=Tn.call(Function.apply,Array.prototype.splice),ms=Tn.call(Function.call,String.prototype.replace),kn=Tn.call(Function.call,String.prototype.slice),Ep=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cp=/\\(\\)?/g,Ap=function(e){var n=kn(e,0,1),r=kn(e,-1);if(n==="%"&&r!=="%")throw new qt("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new qt("invalid intrinsic syntax, expected opening `%`");var o=[];return ms(e,Ep,function(i,a,s,l){o[o.length]=s?ms(l,Cp,"$1"):a||i}),o},wp=function(e,n){var r=e,o;if(Mn(hs,r)&&(o=hs[r],r="%"+o[0]+"%"),Mn(wt,r)){var i=wt[r];if(i===At&&(i=bp(r)),typeof i=="undefined"&&!n)throw new Et("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new qt("intrinsic "+e+" does not exist!")},pe=function(e,n){if(typeof e!="string"||e.length===0)throw new Et("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Et('"allowMissing" argument must be a boolean');var r=Ap(e),o=r.length>0?r[0]:"",i=wp("%"+o+"%",n),a=i.name,s=i.value,l=!1,c=i.alias;c&&(o=c[0],_p(r,Sp([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],p=kn(d,0,1),m=kn(d,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new qt("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,a="%"+o+"%",Mn(wt,a))s=wt[a];else if(s!=null){if(!(d in s)){if(!n)throw new Et("base intrinsic for "+e+" exists, but the property is not available.");return}if(at&&u+1>=r.length){var b=at(s,d);f=!!b,f&&"get"in b&&!("originalValue"in b.get)?s=b.get:s=s[d]}else f=Mn(s,d),s=s[d];f&&!l&&(wt[a]=s)}}return s};(function(t){var e=lo,n=pe,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||e.call(o,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}t.exports=function(f){var d=i(e,o,arguments);if(a&&s){var p=a(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var c=function(){return i(e,r,arguments)};s?s(t.exports,"apply",{value:c}):t.exports.apply=c})(_t);var vs=pe,gs=_t.exports,Op=gs(vs("String.prototype.indexOf")),st=function(e,n){var r=vs(e,!!n);return typeof r=="function"&&Op(e,".prototype.")>-1?gs(r):r},$p=pe,xp=$p("%TypeError%"),Pp=function(e,n){if(e==null)throw new xp(n||"Cannot call method on "+e);return e},Fn=Pp,Dp=pe,ys=Dp("%Array%"),Tp=!ys.isArray&&st("Object.prototype.toString"),Mp=ys.isArray||function(e){return Tp(e)==="[object Array]"},bs=pe,kp=st,Fp=bs("%TypeError%"),Ip=Mp,Rp=bs("%Reflect.apply%",!0)||kp("%Function.prototype.apply%"),Np=function(e,n){var r=arguments.length>2?arguments[2]:[];if(!Ip(r))throw new Fp("Assertion failed: optional `argumentsList`, if provided, must be a List");return Rp(e,n,r)},Lp={},Bp=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Lp}),Vp=Vr(Bp),po=typeof Map=="function"&&Map.prototype,ho=Object.getOwnPropertyDescriptor&&po?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,In=po&&ho&&typeof ho.get=="function"?ho.get:null,Hp=po&&Map.prototype.forEach,mo=typeof Set=="function"&&Set.prototype,vo=Object.getOwnPropertyDescriptor&&mo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Rn=mo&&vo&&typeof vo.get=="function"?vo.get:null,Up=mo&&Set.prototype.forEach,jp=typeof WeakMap=="function"&&WeakMap.prototype,Yt=jp?WeakMap.prototype.has:null,zp=typeof WeakSet=="function"&&WeakSet.prototype,Xt=zp?WeakSet.prototype.has:null,Wp=typeof WeakRef=="function"&&WeakRef.prototype,Ss=Wp?WeakRef.prototype.deref:null,Gp=Boolean.prototype.valueOf,qp=Object.prototype.toString,Yp=Function.prototype.toString,Xp=String.prototype.match,go=String.prototype.slice,Ye=String.prototype.replace,Kp=String.prototype.toUpperCase,_s=String.prototype.toLowerCase,Es=RegExp.prototype.test,Cs=Array.prototype.concat,Te=Array.prototype.join,Jp=Array.prototype.slice,As=Math.floor,yo=typeof BigInt=="function"?BigInt.prototype.valueOf:null,bo=Object.getOwnPropertySymbols,So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="object",le=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ot?"object":"symbol")?Symbol.toStringTag:null,ws=Object.prototype.propertyIsEnumerable,Os=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Es.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-As(-t):As(t);if(r!==t){var o=String(r),i=go.call(e,o.length+1);return Ye.call(o,n,"$&_")+"."+Ye.call(Ye.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ye.call(e,n,"$&_")}var _o=Vp.custom,Eo=_o&&Ps(_o)?_o:null,Zp=function t(e,n,r,o){var i=n||{};if(Xe(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Xe(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Xe(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Xe(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Xe(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ts(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return s?$s(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return s?$s(e,c):c}var u=typeof i.depth=="undefined"?5:i.depth;if(typeof r=="undefined"&&(r=0),r>=u&&u>0&&typeof e=="object")return Co(e)?"[Array]":"[Object]";var f=gh(i,r);if(typeof o=="undefined")o=[];else if(Ds(o,e)>=0)return"[Circular]";function d(Y,de,Ie){if(de&&(o=Jp.call(o),o.push(de)),Ie){var he={depth:i.depth};return Xe(i,"quoteStyle")&&(he.quoteStyle=i.quoteStyle),t(Y,he,r+1,o)}return t(Y,i,r+1,o)}if(typeof e=="function"){var p=uh(e),m=Nn(e,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(m.length>0?" { "+Te.call(m,", ")+" }":"")}if(Ps(e)){var b=Ot?Ye.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):So.call(e);return typeof e=="object"&&!Ot?Kt(b):b}if(hh(e)){for(var v="<"+_s.call(String(e.nodeName)),S=e.attributes||[],C=0;C<S.length;C++)v+=" "+S[C].name+"="+xs(Qp(S[C].value),"double",i);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+_s.call(String(e.nodeName))+">",v}if(Co(e)){if(e.length===0)return"[]";var P=Nn(e,d);return f&&!vh(P)?"["+wo(P,f)+"]":"[ "+Te.call(P,", ")+" ]"}if(nh(e)){var F=Nn(e,d);return"cause"in e&&!ws.call(e,"cause")?"{ ["+String(e)+"] "+Te.call(Cs.call("[cause]: "+d(e.cause),F),", ")+" }":F.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Te.call(F,", ")+" }"}if(typeof e=="object"&&a){if(Eo&&typeof e[Eo]=="function")return e[Eo]();if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(lh(e)){var O=[];return Hp.call(e,function(Y,de){O.push(d(de,e,!0)+" => "+d(Y,e))}),Ms("Map",In.call(e),O,f)}if(dh(e)){var k=[];return Up.call(e,function(Y){k.push(d(Y,e))}),Ms("Set",Rn.call(e),k,f)}if(ch(e))return Ao("WeakMap");if(ph(e))return Ao("WeakSet");if(fh(e))return Ao("WeakRef");if(oh(e))return Kt(d(Number(e)));if(ah(e))return Kt(d(yo.call(e)));if(ih(e))return Kt(Gp.call(e));if(rh(e))return Kt(d(String(e)));if(!eh(e)&&!th(e)){var x=Nn(e,d),X=Os?Os(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",fe=!X&&le&&Object(e)===e&&le in e?go.call(Ke(e),8,-1):H?"Object":"",W=X||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",z=W+(fe||H?"["+Te.call(Cs.call([],fe||[],H||[]),": ")+"] ":"");return x.length===0?z+"{}":f?z+"{"+wo(x,f)+"}":z+"{ "+Te.call(x,", ")+" }"}return String(e)};function xs(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Qp(t){return Ye.call(String(t),/"/g,""")}function Co(t){return Ke(t)==="[object Array]"&&(!le||!(typeof t=="object"&&le in t))}function eh(t){return Ke(t)==="[object Date]"&&(!le||!(typeof t=="object"&&le in t))}function th(t){return Ke(t)==="[object RegExp]"&&(!le||!(typeof t=="object"&&le in t))}function nh(t){return Ke(t)==="[object Error]"&&(!le||!(typeof t=="object"&&le in t))}function rh(t){return Ke(t)==="[object String]"&&(!le||!(typeof t=="object"&&le in t))}function oh(t){return Ke(t)==="[object Number]"&&(!le||!(typeof t=="object"&&le in t))}function ih(t){return Ke(t)==="[object Boolean]"&&(!le||!(typeof t=="object"&&le in t))}function Ps(t){if(Ot)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!So)return!1;try{return So.call(t),!0}catch{}return!1}function ah(t){if(!t||typeof t!="object"||!yo)return!1;try{return yo.call(t),!0}catch{}return!1}var sh=Object.prototype.hasOwnProperty||function(t){return t in this};function Xe(t,e){return sh.call(t,e)}function Ke(t){return qp.call(t)}function uh(t){if(t.name)return t.name;var e=Xp.call(Yp.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ds(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function lh(t){if(!In||!t||typeof t!="object")return!1;try{In.call(t);try{Rn.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function ch(t){if(!Yt||!t||typeof t!="object")return!1;try{Yt.call(t,Yt);try{Xt.call(t,Xt)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function fh(t){if(!Ss||!t||typeof t!="object")return!1;try{return Ss.call(t),!0}catch{}return!1}function dh(t){if(!Rn||!t||typeof t!="object")return!1;try{Rn.call(t);try{In.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function ph(t){if(!Xt||!t||typeof t!="object")return!1;try{Xt.call(t,Xt);try{Yt.call(t,Yt)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function hh(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ts(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ts(go.call(t,0,e.maxStringLength),e)+r}var o=Ye.call(Ye.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mh);return xs(o,"single",e)}function mh(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Kp.call(e.toString(16))}function Kt(t){return"Object("+t+")"}function Ao(t){return t+" { ? }"}function Ms(t,e,n,r){var o=r?wo(n,r):Te.call(n,", ");return t+" ("+e+") {"+o+"}"}function vh(t){for(var e=0;e<t.length;e++)if(Ds(t[e],`
`)>=0)return!1;return!0}function gh(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Te.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Te.call(Array(e+1),n)}}function wo(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+Te.call(t,","+n)+`
`+e.prev}function Nn(t,e){var n=Co(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=Xe(t,o)?e(t[o],t):""}var i=typeof bo=="function"?bo(t):[],a;if(Ot){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var l in t)!Xe(t,l)||n&&String(Number(l))===l&&l<t.length||Ot&&a["$"+l]instanceof Symbol||(Es.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t)));if(typeof bo=="function")for(var c=0;c<i.length;c++)ws.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var ks=function(e){return typeof e=="string"||typeof e=="symbol"},yh=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"},bh=yh,Oo=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":bh(e)},Sh=pe,Fs=Sh("%TypeError%"),_h=Zp,Eh=ks,Ch=Oo,Is=function(e,n){if(Ch(e)!=="Object")throw new Fs("Assertion failed: Type(O) is not Object");if(!Eh(n))throw new Fs("Assertion failed: IsPropertyKey(P) is not true, got "+_h(n));return e[n]},Ah=pe,Rs=Ah("%TypeError%"),wh=ks,Oh=Oo,$h=function(e,n){if(Oh(e)!=="Object")throw new Rs("Assertion failed: `O` must be an Object");if(!wh(n))throw new Rs("Assertion failed: `P` must be a Property Key");return n in e},Ns=Function.prototype.toString,$t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,$o,Ln;if(typeof $t=="function"&&typeof Object.defineProperty=="function")try{$o=Object.defineProperty({},"length",{get:function(){throw Ln}}),Ln={},$t(function(){throw 42},null,$o)}catch(t){t!==Ln&&($t=null)}else $t=null;var xh=/^\s*class\b/,xo=function(e){try{var n=Ns.call(e);return xh.test(n)}catch{return!1}},Ph=function(e){try{return xo(e)?!1:(Ns.call(e),!0)}catch{return!1}},Dh=Object.prototype.toString,Th="[object Function]",Mh="[object GeneratorFunction]",kh=typeof Symbol=="function"&&!!Symbol.toStringTag,Ls=typeof document=="object"&&typeof document.all=="undefined"&&document.all!==void 0?document.all:{},Po=$t?function(e){if(e===Ls)return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(typeof e=="function"&&!e.prototype)return!0;try{$t(e,null,$o)}catch(n){if(n!==Ln)return!1}return!xo(e)}:function(e){if(e===Ls)return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(typeof e=="function"&&!e.prototype)return!0;if(kh)return Ph(e);if(xo(e))return!1;var n=Dh.call(e);return n===Th||n===Mh},Fh=Po,Bs=pe,Ih=Bs("%Math%"),Rh=Bs("%Number%"),Nh=Rh.MAX_SAFE_INTEGER||Ih.pow(2,53)-1,Lh=pe,Bh=Lh("%Math.abs%"),Vh=function(e){return Bh(e)},Hh=Math.floor,Uh=function(e){return Hh(e)},Vs=function(e){return e===null||typeof e!="function"&&typeof e!="object"},jh=Object.prototype.toString,Hs=Vs,zh=Po,Us={"[[DefaultValue]]":function(t){var e;if(arguments.length>1?e=arguments[1]:e=jh.call(t)==="[object Date]"?String:Number,e===String||e===Number){var n=e===String?["toString","valueOf"]:["valueOf","toString"],r,o;for(o=0;o<n.length;++o)if(zh(t[n[o]])&&(r=t[n[o]](),Hs(r)))return r;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")}},Wh=function(e){return Hs(e)?e:arguments.length>1?Us["[[DefaultValue]]"](e,arguments[1]):Us["[[DefaultValue]]"](e)},Gh=Wh,qh=Gh,Yh=function(e){var n=qh(e,Number);if(typeof n!="string")return+n;var r=n.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g,"");return/^0[ob]|^[+-]0x/.test(r)?NaN:+r},Xh=Number.isNaN||function(e){return e!==e},Kh=Number.isNaN||function(t){return t!==t},Jh=Number.isFinite||function(t){return typeof t=="number"&&!Kh(t)&&t!==1/0&&t!==-1/0},Zh=function(e){return e>=0?1:-1},Qh=Vh,em=Uh,tm=Yh,nm=Xh,rm=Jh,om=Zh,im=function(e){var n=tm(e);return nm(n)?0:n===0||!rm(n)?n:om(n)*em(Qh(n))},am=pe,sm=am("RegExp.prototype.test"),um=_t.exports,lm=function(e){return um(sm,e)},cm=function(e){return e===null||typeof e!="function"&&typeof e!="object"},fm=ls,js=function(){return fm()&&!!Symbol.toStringTag},dm=Date.prototype.getDay,pm=function(e){try{return dm.call(e),!0}catch{return!1}},hm=Object.prototype.toString,mm="[object Date]",vm=js(),gm=function(e){return typeof e!="object"||e===null?!1:vm?pm(e):hm.call(e)===mm},Do={exports:{}},ym=Object.prototype.toString,bm=fs();if(bm){var Sm=Symbol.prototype.toString,_m=/^Symbol\(.*\)$/,Em=function(e){return typeof e.valueOf()!="symbol"?!1:_m.test(Sm.call(e))};Do.exports=function(e){if(typeof e=="symbol")return!0;if(ym.call(e)!=="[object Symbol]")return!1;try{return Em(e)}catch{return!1}}}else Do.exports=function(e){return!1};var Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",To=Vs,zs=Po,Am=gm,Ws=Do.exports,wm=function(e,n){if(typeof e=="undefined"||e===null)throw new TypeError("Cannot call method on "+e);if(typeof n!="string"||n!=="number"&&n!=="string")throw new TypeError('hint must be "string" or "number"');var r=n==="string"?["toString","valueOf"]:["valueOf","toString"],o,i,a;for(a=0;a<r.length;++a)if(o=e[r[a]],zs(o)&&(i=o.call(e),To(i)))return i;throw new TypeError("No default value")},Om=function(e,n){var r=e[n];if(r!==null&&typeof r!="undefined"){if(!zs(r))throw new TypeError(r+" returned for property "+n+" of object "+e+" is not a function");return r}},$m=function(e){if(To(e))return e;var n="default";arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number"));var r;if(Cm&&(Symbol.toPrimitive?r=Om(e,Symbol.toPrimitive):Ws(e)&&(r=Symbol.prototype.valueOf)),typeof r!="undefined"){var o=r.call(e,n);if(To(o))return o;throw new TypeError("unable to convert exotic object to primitive")}return n==="default"&&(Am(e)||Ws(e))&&(n="string"),wm(e,n==="default"?"number":n)},Gs=$m,xm=function(e){return arguments.length>1?Gs(e,arguments[1]):Gs(e)},Bn=pe,qs=Bn("%TypeError%"),Ys=Bn("%Number%"),Pm=Bn("%RegExp%"),Xs=Bn("%parseInt%"),Ks=st,Vn=lm,Dm=cm,Js=Ks("String.prototype.slice"),Tm=Vn(/^0b[01]+$/i),Mm=Vn(/^0o[0-7]+$/i),km=Vn(/^[-+]0x[0-9a-f]+$/i),Fm=["\x85","\u200B","\uFFFE"].join(""),Im=new Pm("["+Fm+"]","g"),Rm=Vn(Im),Zs=[`
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003`,"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028","\u2029\uFEFF"].join(""),Nm=new RegExp("(^["+Zs+"]+)|(["+Zs+"]+$)","g"),Lm=Ks("String.prototype.replace"),Bm=function(t){return Lm(t,Nm,"")},Vm=xm,Hm=function t(e){var n=Dm(e)?e:Vm(e,Ys);if(typeof n=="symbol")throw new qs("Cannot convert a Symbol value to a number");if(typeof n=="bigint")throw new qs("Conversion from 'BigInt' to 'number' is not allowed.");if(typeof n=="string"){if(Tm(n))return t(Xs(Js(n,2),2));if(Mm(n))return t(Xs(Js(n,2),8));if(Rm(n)||km(n))return NaN;var r=Bm(n);if(r!==n)return t(r)}return Ys(n)},Um=im,jm=Hm,zm=function(e){var n=jm(e);return n!==0&&(n=Um(n)),n===0?0:n},Qs=Nh,Wm=zm,Gm=function(e){var n=Wm(e);return n<=0?0:n>Qs?Qs:n},qm=pe,Ym=qm("%TypeError%"),Xm=Is,Km=Gm,Jm=Oo,Zm=function(e){if(Jm(e)!=="Object")throw new Ym("Assertion failed: `obj` must be an Object");return Km(Xm(e,"length"))},Qm=pe,ev=Qm("%Object%"),tv=Fn,nv=function(e){return tv(e),ev(e)},eu=pe,rv=eu("%String%"),ov=eu("%TypeError%"),tu=function(e){if(typeof e=="symbol")throw new ov("Cannot convert a Symbol value to a string");return rv(e)},iv=String.prototype.valueOf,av=function(e){try{return iv.call(e),!0}catch{return!1}},sv=Object.prototype.toString,uv="[object String]",lv=js(),cv=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:lv?av(e):sv.call(e)===uv},fv=pe,dv=st,pv=fv("%TypeError%"),hv=Np,mv=Is,vv=$h,gv=Fh,yv=Zm,bv=nv,Sv=tu,_v=cv,Ev=dv("String.prototype.split"),nu=Object("a"),Cv=nu[0]!=="a"||!(0 in nu),ru=function(e){var n=bv(this),r=Cv&&_v(this)?Ev(this,""):n,o=yv(r);if(!gv(e))throw new pv("Array.prototype.forEach callback must be a function");var i;arguments.length>1&&(i=arguments[1]);for(var a=0;a<o;){var s=Sv(a),l=vv(r,s);if(l){var c=mv(r,s);hv(e,i,[c,a,r])}a+=1}},Av=function(e){var n=!0,r=!0,o=!1;if(typeof e=="function"){try{e.call("f",function(i,a,s){typeof s!="object"&&(n=!1)}),e.call([null],function(){"use strict";r=typeof this=="string"},"x")}catch{o=!0}return!o&&n&&r}return!1},wv=Av,Ov=ru,ou=function(){var e=Array.prototype.forEach;return wv(e)?e:Ov},$v=St,xv=ou,Pv=function(){var e=xv();return $v(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e},Dv=St,Tv=_t.exports,Mv=st,kv=Fn,Fv=ru,iu=ou,Iv=iu(),Rv=Pv,Nv=Mv("Array.prototype.slice"),Lv=Tv.apply(Iv),au=function(e,n){return kv(e),Lv(e,Nv(arguments,1))};Dv(au,{getPolyfill:iu,implementation:Fv,shim:Rv});var Bv=au,Vv=Fn,su=st,Hv=su("Object.prototype.propertyIsEnumerable"),Uv=su("Array.prototype.push"),uu=function(e){var n=Vv(e),r=[];for(var o in n)Hv(n,o)&&Uv(r,[o,n[o]]);return r},jv=uu,lu=function(){return typeof Object.entries=="function"?Object.entries:jv},zv=lu,Wv=St,Gv=function(){var e=zv();return Wv(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e},qv=St,Yv=_t.exports,Xv=uu,cu=lu,Kv=Gv,fu=Yv(cu(),Object);qv(fu,{getPolyfill:cu,implementation:Xv,shim:Kv});var Jv=fu,Zv=Fn,Qv=tu,eg=st,du=eg("String.prototype.replace"),tg=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,ng=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,pu=function(){var e=Qv(Zv(this));return du(du(e,tg,""),ng,"")},rg=pu,hu="\u200B",mu=function(){return String.prototype.trim&&hu.trim()===hu?String.prototype.trim:rg},og=St,ig=mu,ag=function(){var e=ig();return og(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e},sg=_t.exports,ug=St,lg=pu,vu=mu,cg=ag,gu=sg(vu());ug(gu,{getPolyfill:vu,implementation:lg,shim:cg});var fg=gu,Hn=Bv,Mo=Jv,yu=ds,dg=fg,pg=function(e){},hg=String.prototype.replace,bu=String.prototype.split,Un="||||",ko=function(t){var e=t%100,n=e%10;return e!==11&&n===1?0:2<=n&&n<=4&&!(e>=12&&e<=14)?1:2},Su={pluralTypes:{arabic:function(t){if(t<3)return t;var e=t%100;return e>=3&&e<=10?3:e>=11?4:5},bosnian_serbian:ko,chinese:function(){return 0},croatian:ko,french:function(t){return t>=2?1:0},german:function(t){return t!==1?1:0},russian:ko,lithuanian:function(t){return t%10===1&&t%100!==11?0:t%10>=2&&t%10<=9&&(t%100<11||t%100>19)?1:2},czech:function(t){return t===1?0:t>=2&&t<=4?1:2},polish:function(t){if(t===1)return 0;var e=t%10;return 2<=e&&e<=4&&(t%100<10||t%100>=20)?1:2},icelandic:function(t){return t%10!==1||t%100===11?1:0},slovenian:function(t){var e=t%100;return e===1?0:e===2?1:e===3||e===4?2:3}},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is"],slovenian:["sl-SL"]}};function mg(t){var e={};return Hn(Mo(t),function(n){var r=n[0],o=n[1];Hn(o,function(i){e[i]=r})}),e}function vg(t,e){var n=mg(t.pluralTypeToLanguages);return n[e]||n[bu.call(e,/-/,1)[0]]||n.en}function gg(t,e,n){return t.pluralTypes[e](n)}function yg(){var t={};return function(e,n){var r=t[n];return r&&!e.pluralTypes[r]&&(r=null,t[n]=r),r||(r=vg(e,n),r&&(t[n]=r)),r}}function _u(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bg(t){var e=t&&t.prefix||"%{",n=t&&t.suffix||"}";if(e===Un||n===Un)throw new RangeError('"'+Un+'" token is reserved for pluralization');return new RegExp(_u(e)+"(.*?)"+_u(n),"g")}var Sg=yg(),_g=/%\{(.*?)\}/g;function Fo(t,e,n,r,o){if(typeof t!="string")throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(e==null)return t;var i=t,a=r||_g,s=typeof e=="number"?{smart_count:e}:e;if(s.smart_count!=null&&t){var l=o||Su,c=bu.call(t,Un),u=n||"en",f=Sg(l,u),d=gg(l,f,s.smart_count);i=dg(c[d]||c[0])}return i=hg.call(i,a,function(p,m){return!yu(s,m)||s[m]==null?p:s[m]}),i}function Ue(t){var e=t||{};this.phrases={},this.extend(e.phrases||{}),this.currentLocale=e.locale||"en";var n=e.allowMissing?Fo:null;this.onMissingKey=typeof e.onMissingKey=="function"?e.onMissingKey:n,this.warn=e.warn||pg,this.tokenRegex=bg(e.interpolation),this.pluralRules=e.pluralRules||Su}Ue.prototype.locale=function(t){return t&&(this.currentLocale=t),this.currentLocale},Ue.prototype.extend=function(t,e){Hn(Mo(t||{}),function(n){var r=n[0],o=n[1],i=e?e+"."+r:r;typeof o=="object"?this.extend(o,i):this.phrases[i]=o},this)},Ue.prototype.unset=function(t,e){typeof t=="string"?delete this.phrases[t]:Hn(Mo(t||{}),function(n){var r=n[0],o=n[1],i=e?e+"."+r:r;typeof o=="object"?this.unset(o,i):delete this.phrases[i]},this)},Ue.prototype.clear=function(){this.phrases={}},Ue.prototype.replace=function(t){this.clear(),this.extend(t)},Ue.prototype.t=function(t,e){var n,r,o=e==null?{}:e;if(typeof this.phrases[t]=="string")n=this.phrases[t];else if(typeof o._=="string")n=o._;else if(this.onMissingKey){var i=this.onMissingKey;r=i(t,o,this.currentLocale,this.tokenRegex,this.pluralRules)}else this.warn('Missing translation for key: "'+t+'"'),r=t;return typeof n=="string"&&(r=Fo(n,o,this.currentLocale,this.tokenRegex,this.pluralRules)),r},Ue.prototype.has=function(t){return yu(this.phrases,t)},Ue.transformPhrase=function(e,n,r){return Fo(e,n,r)};var Eg=Ue,Cg={"Add a comment...":"\u0625\u0636\u0627\u0641\u0629 \u062A\u0639\u0644\u064A\u0642","Add a reply...":"\u0625\u0636\u0627\u0641\u0629 \u0631\u062F","Add tag...":"\u0625\u0636\u0627\u0641\u0629 \u0639\u0644\u0627\u0645\u0629",Cancel:"\u0625\u0644\u063A\u0627\u0621",Close:"\u0625\u063A\u0644\u0627\u0642",Edit:"Edit",Delete:"Delete",Ok:"\u062A\u0645"},Ag={"Add a comment...":"Napsat koment\xE1\u0159...","Add a reply...":"Odpov\u011Bd\u011Bt...","Add tag...":"P\u0159idat \u0161t\xEDtek...",Cancel:"Zru\u0161it",Close:"Zav\u0159\xEDt",Edit:"Upravit",Delete:"Smazat",Ok:"Ok"},wg={"Add a comment...":"Kommentar schreiben...","Add a reply...":"Antwort schreiben...","Add tag...":"Tag...",Cancel:"Abbrechen",Close:"Schliessen",Edit:"Bearbeiten",Delete:"L\xF6schen",Ok:"Ok"},Og={"Add a comment...":"\u03A3\u03C7\u03BF\u03BB\u03AF\u03B1\u03C3\u03B5...","Add a reply...":"\u0391\u03C0\u03AC\u03BD\u03C4\u03B7\u03C3\u03B5...","Add tag...":"\u03A0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C3\u03B5 tag...",Cancel:"\u0386\u03BA\u03C5\u03C1\u03BF",Close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",Edit:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1",Delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",Ok:"Ok"},$g={"Add a comment...":"Agregar un comentario...","Add a reply...":"Agregar una respuesta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Cerrar",Edit:"Editar",Delete:"Eliminar",Ok:"Ok"},xg={"Add a comment...":"Lis\xE4\xE4 kommentti","Add a reply...":"Lis\xE4\xE4 vastaus","Add tag...":"Lis\xE4\xE4 tunniste",Cancel:"Peruuta",Close:"Sulje",Edit:"Muokkaa",Delete:"Poista",Ok:"Ok"},Pg={"Add a comment...":"Ajouter un commentaire...","Add a reply...":"Ajouter une r\xE9ponse...","Add tag...":"Ajouter une \xE9tiquette...",Cancel:"Annuler",Close:"Fermer",Edit:"\xC9diter",Delete:"Supprimer",Ok:"Ok"},Dg={"Add a comment...":"Engadir un comentario...","Add a reply...":"Engadir unha resposta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Pechar",Edit:"Edit",Delete:"Delete",Ok:"Ok"},Tg={"Add a comment...":"\u091F\u093F\u092A\u094D\u092A\u0923\u0940 \u091C\u094B\u0921\u093C\u0947\u0902","Add a reply...":"\u091C\u0935\u093E\u092C \u0926\u0947\u0902","Add tag...":"\u091F\u0948\u0917 \u0932\u0917\u093E\u090F\u0901",Cancel:"\u0930\u0926\u094D\u0926 \u0915\u0930\u0947\u0902",Close:"\u092C\u0902\u0926 \u0915\u0930\u0947\u0902",Edit:"\u0938\u0902\u092A\u093E\u0926\u093F\u0924 \u0915\u0930\u0947\u0902",Delete:"\u0939\u091F\u093E\u090F\u0901",Ok:"\u0920\u0940\u0915 \u0939\u0948"},Mg={"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...",Cancel:"Annulla",Close:"Chiudi",Edit:"Edit",Delete:"Delete",Ok:"Ok"},kg={"Add a comment...":"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3059\u308B...","Add a reply...":"\u8FD4\u4FE1\u3059\u308B...","Add tag...":"\u30BF\u30B0\u3092\u8FFD\u52A0\u3059\u308B...",Cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",Close:"\u9589\u3058\u308B",Edit:"\u7DE8\u96C6",Delete:"\u524A\u9664",Ok:"Ok"},Fg={"Add a comment...":"\uB313\uAE00 \uCD94\uAC00","Add a reply...":"\uB2F5\uAE00 \uCD94\uAC00","Add tag...":"\uD0DC\uADF8 \uCD94\uAC00",Cancel:"\uCDE8\uC18C",Close:"\uB2EB\uAE30",Edit:"\uC218\uC815",Delete:"\uC0AD\uC81C",Ok:"\uD655\uC778"},Ig={"Add a comment...":"Commentaar toevoegen...","Add a reply...":"Antwoord toevoegen...","Add tag...":"Tag toevoegen...",Cancel:"Afbreken",Close:"Sluiten",Edit:"Bewerken",Delete:"Verwijderen",Ok:"Ok"},Rg={"Add a comment...":"Adicionar um coment\xE1rio...","Add a reply...":"Adicionar uma resposta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Fechar",Edit:"Editar",Delete:"Apagar",Ok:"Ok"},Ng={"Add a comment...":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439...","Add a reply...":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442...","Add tag...":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0442\u044D\u0433...",Cancel:"\u041E\u0442\u043C\u0435\u043D\u0430",Close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",Edit:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",Delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",Ok:"\u041E\u043A"},Lg={"Add a comment...":"Skriv en kommentar...","Add a reply...":"Skriv ett svar...","Add tag...":"Tagg...",Cancel:"Cancel",Close:"St\xE4ng",Edit:"Edit",Delete:"Delete",Ok:"Ok"},Bg={"Add a comment...":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E04\u0E2D\u0E21\u0E40\u0E21\u0E19\u0E15\u0E4C...","Add a reply...":"\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A...","Add tag...":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E41\u0E17\u0E47\u0E01...",Cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",Close:"\u0E1B\u0E34\u0E14",Edit:"\u0E41\u0E01\u0E49\u0E44\u0E02",Delete:"\u0E25\u0E1A",Ok:"\u0E15\u0E01\u0E25\u0E07"},Vg={"Add a comment...":"Yorum ekle...","Add a reply...":"Cevap ekle...","Add tag...":"Tag Ekle...",Cancel:"\u0130ptal",Close:"Kapat",Edit:"D\xFCzenle",Delete:"Sil",Ok:"Tamam"},Hg={"Add a comment...":"\u062A\u0628\u0635\u0631\u06C1 \u06A9\u0631\u06CC\u06BA","Add a reply...":"\u062C\u0648\u0627\u0628 \u062F\u06CC\u06BA","Add tag...":"\u0679\u06CC\u06AF \u0644\u06AF\u0627\u0626\u06CC\u06BA",Cancel:"\u0645\u0646\u0633\u0648\u062E \u06A9\u0631\u06CC\u06BA",Close:"\u0628\u0646\u062F \u06A9\u0631\u06CC\u06BA",Edit:"\u062A\u0631\u0645\u06CC\u0645 \u06A9\u0631\u06CC\u06BA",Delete:"\u06C1\u0679\u0627\u0626\u06CC\u06BA",Ok:"\u0679\u06BE\u06CC\u06A9 \u06C1\u06D2"},Ug={"Add a comment...":"\u6DFB\u52A0\u6CE8\u91CA...","Add a reply...":"\u6DFB\u52A0\u56DE\u590D...","Add tag...":"\u6807\u7B7E...",Cancel:"\u53D6\u6D88",Close:"\u5173\u95ED",Edit:"\u7F16\u8F91",Delete:"\u5220\u9664",Ok:"\u786E\u8BA4"},jg={"Add a comment...":"\u6DFB\u52A0\u8BC4\u8BBA...","Add a reply...":"\u6DFB\u52A0\u56DE\u590D...","Add tag...":"\u6DFB\u52A0\u6807\u7B7E...",Cancel:"\u53D6\u6D88",Close:"\u5173\u95ED",Edit:"\u7F16\u8F91",Delete:"\u5220\u9664",Ok:"\u786E\u8BA4"},zg={"Add a comment...":"\u6DFB\u52A0\u8A55\u8AD6...","Add a reply...":"\u6DFB\u52A0\u56DE\u8986...","Add tag...":"\u6DFB\u52A0\u6A19\u7C64...",Cancel:"\u53D6\u6D88",Close:"\u95DC\u9589",Edit:"\u7DE8\u8F2F",Delete:"\u522A\u9664",Ok:"\u78BA\u8A8D"},Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});var Io=[["\u062B\u0627\u0646\u064A\u0629","\u062B\u0627\u0646\u064A\u062A\u064A\u0646","%s \u062B\u0648\u0627\u0646","%s \u062B\u0627\u0646\u064A\u0629"],["\u062F\u0642\u064A\u0642\u0629","\u062F\u0642\u064A\u0642\u062A\u064A\u0646","%s \u062F\u0642\u0627\u0626\u0642","%s \u062F\u0642\u064A\u0642\u0629"],["\u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u062A\u064A\u0646","%s \u0633\u0627\u0639\u0627\u062A","%s \u0633\u0627\u0639\u0629"],["\u064A\u0648\u0645","\u064A\u0648\u0645\u064A\u0646","%s \u0623\u064A\u0627\u0645","%s \u064A\u0648\u0645\u0627\u064B"],["\u0623\u0633\u0628\u0648\u0639","\u0623\u0633\u0628\u0648\u0639\u064A\u0646","%s \u0623\u0633\u0627\u0628\u064A\u0639","%s \u0623\u0633\u0628\u0648\u0639\u0627\u064B"],["\u0634\u0647\u0631","\u0634\u0647\u0631\u064A\u0646","%s \u0623\u0634\u0647\u0631","%s \u0634\u0647\u0631\u0627\u064B"],["\u0639\u0627\u0645","\u0639\u0627\u0645\u064A\u0646","%s \u0623\u0639\u0648\u0627\u0645","%s \u0639\u0627\u0645\u0627\u064B"]];function Wg(t,e){return e<3?Io[t][e-1]:e>=3&&e<=10?Io[t][2]:Io[t][3]}function Gg(t,e){if(e===0)return["\u0645\u0646\u0630 \u0644\u062D\u0638\u0627\u062A","\u0628\u0639\u062F \u0644\u062D\u0638\u0627\u062A"];var n=Wg(Math.floor(e/2),t);return["\u0645\u0646\u0630 "+n,"\u0628\u0639\u062F "+n]}var qg=Eu.default=Gg,Cu={};Object.defineProperty(Cu,"__esModule",{value:!0});function Yg(t,e){var n=0,r=e==1||e==3||e==5||e==7||e==9||e==11||e==13;return r&&t>=5&&(n=1),[[["pr\xE1v\u011B te\u010F","pr\xE1v\u011B te\u010F"]],[["p\u0159ed %s vte\u0159inami","za %s vte\u0159iny"],["p\u0159ed %s vte\u0159inami","za %s vte\u0159in"]],[["p\u0159ed minutou","za minutu"]],[["p\u0159ed %s minutami","za %s minuty"],["p\u0159ed %s minutami","za %s minut"]],[["p\u0159ed hodinou","za hodinu"]],[["p\u0159ed %s hodinami","za %s hodiny"],["p\u0159ed %s hodinami","za %s hodin"]],[["v\u010Dera","z\xEDtra"]],[["p\u0159ed %s dny","za %s dny"],["p\u0159ed %s dny","za %s dn\u016F"]],[["minul\xFD t\xFDden","p\u0159\xED\u0161t\xED t\xFDden"]],[["p\u0159ed %s t\xFDdny","za %s t\xFDdny"],["p\u0159ed %s t\xFDdny","za %s t\xFDdn\u016F"]],[["minul\xFD m\u011Bs\xEDc","p\u0159\xEDst\xED m\u011Bs\xEDc"]],[["p\u0159ed %s m\u011Bs\xEDci","za %s m\u011Bs\xEDce"],["p\u0159ed %s m\u011Bs\xEDci","za %s m\u011Bs\xEDc\u016F"]],[["p\u0159ed rokem","p\u0159\xEDst\xED rok"]],[["p\u0159ed %s lety","za %s roky"],["p\u0159ed %s lety","za %s let"]]][e][n]}var Xg=Cu.default=Yg,Au={};Object.defineProperty(Au,"__esModule",{value:!0});function Kg(t,e){return[["gerade eben","vor einer Weile"],["vor %s Sekunden","in %s Sekunden"],["vor 1 Minute","in 1 Minute"],["vor %s Minuten","in %s Minuten"],["vor 1 Stunde","in 1 Stunde"],["vor %s Stunden","in %s Stunden"],["vor 1 Tag","in 1 Tag"],["vor %s Tagen","in %s Tagen"],["vor 1 Woche","in 1 Woche"],["vor %s Wochen","in %s Wochen"],["vor 1 Monat","in 1 Monat"],["vor %s Monaten","in %s Monaten"],["vor 1 Jahr","in 1 Jahr"],["vor %s Jahren","in %s Jahren"]][e]}var Jg=Au.default=Kg,wu={};Object.defineProperty(wu,"__esModule",{value:!0});function Zg(t,e){return[["\u03BC\u03CC\u03BB\u03B9\u03C2 \u03C4\u03CE\u03C1\u03B1","\u03C3\u03B5 \u03BB\u03AF\u03B3\u03BF"],["%s \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1"],["1 \u03BB\u03B5\u03C0\u03C4\u03CC \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03BB\u03B5\u03C0\u03C4\u03CC"],["%s \u03BB\u03B5\u03C0\u03C4\u03AC \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03BB\u03B5\u03C0\u03C4\u03AC"],["1 \u03CE\u03C1\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03CE\u03C1\u03B1"],["%s \u03CE\u03C1\u03B5\u03C2 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03CE\u03C1\u03B5\u03C2"],["1 \u03BC\u03AD\u03C1\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03BC\u03AD\u03C1\u03B1"],["%s \u03BC\u03AD\u03C1\u03B5\u03C2 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03BC\u03AD\u03C1\u03B5\u03C2"],["1 \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"],["%s \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2"],["1 \u03BC\u03AE\u03BD\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03BC\u03AE\u03BD\u03B1"],["%s \u03BC\u03AE\u03BD\u03B5\u03C2 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03BC\u03AE\u03BD\u03B5\u03C2"],["1 \u03C7\u03C1\u03CC\u03BD\u03BF \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 1 \u03C7\u03C1\u03CC\u03BD\u03BF"],["%s \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1 \u03C0\u03C1\u03B9\u03BD","\u03C3\u03B5 %s \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"]][e]}var Qg=wu.default=Zg,Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});function ey(t,e){return[["justo ahora","en un rato"],["hace %s segundos","en %s segundos"],["hace 1 minuto","en 1 minuto"],["hace %s minutos","en %s minutos"],["hace 1 hora","en 1 hora"],["hace %s horas","en %s horas"],["hace 1 d\xEDa","en 1 d\xEDa"],["hace %s d\xEDas","en %s d\xEDas"],["hace 1 semana","en 1 semana"],["hace %s semanas","en %s semanas"],["hace 1 mes","en 1 mes"],["hace %s meses","en %s meses"],["hace 1 a\xF1o","en 1 a\xF1o"],["hace %s a\xF1os","en %s a\xF1os"]][e]}var ty=Ou.default=ey,$u={};Object.defineProperty($u,"__esModule",{value:!0});function ny(t,e){return[["juuri \xE4sken","juuri nyt"],["%s sekuntia sitten","%s sekunnin p\xE4\xE4st\xE4"],["minuutti sitten","minuutin p\xE4\xE4st\xE4"],["%s minuuttia sitten","%s minuutin p\xE4\xE4st\xE4"],["tunti sitten","tunnin p\xE4\xE4st\xE4"],["%s tuntia sitten","%s tunnin p\xE4\xE4st\xE4"],["p\xE4iv\xE4 sitten","p\xE4iv\xE4n p\xE4\xE4st\xE4"],["%s p\xE4iv\xE4\xE4 sitten","%s p\xE4iv\xE4n p\xE4\xE4st\xE4"],["viikko sitten","viikon p\xE4\xE4st\xE4"],["%s viikkoa sitten","%s viikon p\xE4\xE4st\xE4"],["kuukausi sitten","kuukauden p\xE4\xE4st\xE4"],["%s kuukautta sitten","%s kuukauden p\xE4\xE4st\xE4"],["vuosi sitten","vuoden p\xE4\xE4st\xE4"],["%s vuotta sitten","%s vuoden p\xE4\xE4st\xE4"]][e]}var ry=$u.default=ny,xu={};Object.defineProperty(xu,"__esModule",{value:!0});function oy(t,e){return[["\xE0 l'instant","dans un instant"],["il y a %s secondes","dans %s secondes"],["il y a 1 minute","dans 1 minute"],["il y a %s minutes","dans %s minutes"],["il y a 1 heure","dans 1 heure"],["il y a %s heures","dans %s heures"],["il y a 1 jour","dans 1 jour"],["il y a %s jours","dans %s jours"],["il y a 1 semaine","dans 1 semaine"],["il y a %s semaines","dans %s semaines"],["il y a 1 mois","dans 1 mois"],["il y a %s mois","dans %s mois"],["il y a 1 an","dans 1 an"],["il y a %s ans","dans %s ans"]][e]}var iy=xu.default=oy,Pu={};Object.defineProperty(Pu,"__esModule",{value:!0});function ay(t,e){return[["xusto agora","daqu\xED a un pouco"],["hai %s segundos","en %s segundos"],["hai 1 minuto","nun minuto"],["hai %s minutos","en %s minutos"],["hai 1 hora","nunha hora"],["hai %s horas","en %s horas"],["hai 1 d\xEDa","nun d\xEDa"],["hai %s d\xEDas","en %s d\xEDas"],["hai 1 semana","nunha semana"],["hai %s semanas","en %s semanas"],["hai 1 mes","nun mes"],["hai %s meses","en %s meses"],["hai 1 ano","nun ano"],["hai %s anos","en %s anos"]][e]}var sy=Pu.default=ay,Du={};Object.defineProperty(Du,"__esModule",{value:!0});function uy(t,e){return[["\u0905\u092D\u0940","\u0915\u0941\u091B \u0938\u092E\u092F"],["%s \u0938\u0947\u0915\u0902\u0921 \u092A\u0939\u0932\u0947","%s \u0938\u0947\u0915\u0902\u0921 \u092E\u0947\u0902"],["1 \u092E\u093F\u0928\u091F \u092A\u0939\u0932\u0947","1 \u092E\u093F\u0928\u091F \u092E\u0947\u0902"],["%s \u092E\u093F\u0928\u091F \u092A\u0939\u0932\u0947","%s \u092E\u093F\u0928\u091F \u092E\u0947\u0902"],["1 \u0918\u0902\u091F\u0947 \u092A\u0939\u0932\u0947","1 \u0918\u0902\u091F\u0947 \u092E\u0947\u0902"],["%s \u0918\u0902\u091F\u0947 \u092A\u0939\u0932\u0947","%s \u0918\u0902\u091F\u0947 \u092E\u0947\u0902"],["1 \u0926\u093F\u0928 \u092A\u0939\u0932\u0947","1 \u0926\u093F\u0928 \u092E\u0947\u0902"],["%s \u0926\u093F\u0928 \u092A\u0939\u0932\u0947","%s \u0926\u093F\u0928\u094B\u0902 \u092E\u0947\u0902"],["1 \u0938\u092A\u094D\u0924\u093E\u0939 \u092A\u0939\u0932\u0947","1 \u0938\u092A\u094D\u0924\u093E\u0939 \u092E\u0947\u0902"],["%s \u0939\u092B\u094D\u0924\u0947 \u092A\u0939\u0932\u0947","%s \u0939\u092B\u094D\u0924\u094B\u0902 \u092E\u0947\u0902"],["1 \u092E\u0939\u0940\u0928\u0947 \u092A\u0939\u0932\u0947","1 \u092E\u0939\u0940\u0928\u0947 \u092E\u0947\u0902"],["%s \u092E\u0939\u0940\u0928\u0947 \u092A\u0939\u0932\u0947","%s \u092E\u0939\u0940\u0928\u094B\u0902 \u092E\u0947\u0902"],["1 \u0938\u093E\u0932 \u092A\u0939\u0932\u0947","1 \u0938\u093E\u0932 \u092E\u0947\u0902"],["%s \u0938\u093E\u0932 \u092A\u0939\u0932\u0947","%s \u0938\u093E\u0932 \u092E\u0947\u0902"]][e]}var ly=Du.default=uy,Tu={};Object.defineProperty(Tu,"__esModule",{value:!0});function cy(t,e){return[["poco fa","fra poco"],["%s secondi fa","fra %s secondi"],["un minuto fa","fra un minuto"],["%s minuti fa","fra %s minuti"],["un'ora fa","fra un'ora"],["%s ore fa","fra %s ore"],["un giorno fa","fra un giorno"],["%s giorni fa","fra %s giorni"],["una settimana fa","fra una settimana"],["%s settimane fa","fra %s settimane"],["un mese fa","fra un mese"],["%s mesi fa","fra %s mesi"],["un anno fa","fra un anno"],["%s anni fa","fra %s anni"]][e]}var fy=Tu.default=cy,Mu={};Object.defineProperty(Mu,"__esModule",{value:!0});function dy(t,e){return[["\u3059\u3053\u3057\u524D","\u3059\u3050\u306B"],["%s\u79D2\u524D","%s\u79D2\u4EE5\u5185"],["1\u5206\u524D","1\u5206\u4EE5\u5185"],["%s\u5206\u524D","%s\u5206\u4EE5\u5185"],["1\u6642\u9593\u524D","1\u6642\u9593\u4EE5\u5185"],["%s\u6642\u9593\u524D","%s\u6642\u9593\u4EE5\u5185"],["1\u65E5\u524D","1\u65E5\u4EE5\u5185"],["%s\u65E5\u524D","%s\u65E5\u4EE5\u5185"],["1\u9031\u9593\u524D","1\u9031\u9593\u4EE5\u5185"],["%s\u9031\u9593\u524D","%s\u9031\u9593\u4EE5\u5185"],["1\u30F6\u6708\u524D","1\u30F6\u6708\u4EE5\u5185"],["%s\u30F6\u6708\u524D","%s\u30F6\u6708\u4EE5\u5185"],["1\u5E74\u524D","1\u5E74\u4EE5\u5185"],["%s\u5E74\u524D","%s\u5E74\u4EE5\u5185"]][e]}var py=Mu.default=dy,ku={};Object.defineProperty(ku,"__esModule",{value:!0});function hy(t,e){return[["\uBC29\uAE08","\uACE7"],["%s\uCD08 \uC804","%s\uCD08 \uD6C4"],["1\uBD84 \uC804","1\uBD84 \uD6C4"],["%s\uBD84 \uC804","%s\uBD84 \uD6C4"],["1\uC2DC\uAC04 \uC804","1\uC2DC\uAC04 \uD6C4"],["%s\uC2DC\uAC04 \uC804","%s\uC2DC\uAC04 \uD6C4"],["1\uC77C \uC804","1\uC77C \uD6C4"],["%s\uC77C \uC804","%s\uC77C \uD6C4"],["1\uC8FC\uC77C \uC804","1\uC8FC\uC77C \uD6C4"],["%s\uC8FC\uC77C \uC804","%s\uC8FC\uC77C \uD6C4"],["1\uAC1C\uC6D4 \uC804","1\uAC1C\uC6D4 \uD6C4"],["%s\uAC1C\uC6D4 \uC804","%s\uAC1C\uC6D4 \uD6C4"],["1\uB144 \uC804","1\uB144 \uD6C4"],["%s\uB144 \uC804","%s\uB144 \uD6C4"]][e]}var my=ku.default=hy,Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});function vy(t,e){return[["recent","binnenkort"],["%s seconden geleden","binnen %s seconden"],["1 minuut geleden","binnen 1 minuut"],["%s minuten geleden","binnen %s minuten"],["1 uur geleden","binnen 1 uur"],["%s uur geleden","binnen %s uur"],["1 dag geleden","binnen 1 dag"],["%s dagen geleden","binnen %s dagen"],["1 week geleden","binnen 1 week"],["%s weken geleden","binnen %s weken"],["1 maand geleden","binnen 1 maand"],["%s maanden geleden","binnen %s maanden"],["1 jaar geleden","binnen 1 jaar"],["%s jaar geleden","binnen %s jaar"]][e]}var gy=Fu.default=vy,Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});function yy(t,e){return[["agora mesmo","agora"],["h\xE1 %s segundos","em %s segundos"],["h\xE1 um minuto","em um minuto"],["h\xE1 %s minutos","em %s minutos"],["h\xE1 uma hora","em uma hora"],["h\xE1 %s horas","em %s horas"],["h\xE1 um dia","em um dia"],["h\xE1 %s dias","em %s dias"],["h\xE1 uma semana","em uma semana"],["h\xE1 %s semanas","em %s semanas"],["h\xE1 um m\xEAs","em um m\xEAs"],["h\xE1 %s meses","em %s meses"],["h\xE1 um ano","em um ano"],["h\xE1 %s anos","em %s anos"]][e]}var by=Iu.default=yy,Ru={};Object.defineProperty(Ru,"__esModule",{value:!0});function ut(t,e,n,r,o){var i=o%10,a=r;return o===1?a=t:i===1&&o>20?a=e:i>1&&i<5&&(o>20||o<10)&&(a=n),a}var Nu=ut.bind(null,"\u0441\u0435\u043A\u0443\u043D\u0434\u0443","%s \u0441\u0435\u043A\u0443\u043D\u0434\u0443","%s \u0441\u0435\u043A\u0443\u043D\u0434\u044B","%s \u0441\u0435\u043A\u0443\u043D\u0434"),Lu=ut.bind(null,"\u043C\u0438\u043D\u0443\u0442\u0443","%s \u043C\u0438\u043D\u0443\u0442\u0443","%s \u043C\u0438\u043D\u0443\u0442\u044B","%s \u043C\u0438\u043D\u0443\u0442"),Bu=ut.bind(null,"\u0447\u0430\u0441","%s \u0447\u0430\u0441","%s \u0447\u0430\u0441\u0430","%s \u0447\u0430\u0441\u043E\u0432"),Vu=ut.bind(null,"\u0434\u0435\u043D\u044C","%s \u0434\u0435\u043D\u044C","%s \u0434\u043D\u044F","%s \u0434\u043D\u0435\u0439"),Hu=ut.bind(null,"\u043D\u0435\u0434\u0435\u043B\u044E","%s \u043D\u0435\u0434\u0435\u043B\u044E","%s \u043D\u0435\u0434\u0435\u043B\u0438","%s \u043D\u0435\u0434\u0435\u043B\u044C"),Uu=ut.bind(null,"\u043C\u0435\u0441\u044F\u0446","%s \u043C\u0435\u0441\u044F\u0446","%s \u043C\u0435\u0441\u044F\u0446\u0430","%s \u043C\u0435\u0441\u044F\u0446\u0435\u0432"),ju=ut.bind(null,"\u0433\u043E\u0434","%s \u0433\u043E\u0434","%s \u0433\u043E\u0434\u0430","%s \u043B\u0435\u0442");function Sy(t,e){switch(e){case 0:return["\u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u043E","\u0447\u0435\u0440\u0435\u0437 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434"];case 1:return[Nu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Nu(t)];case 2:case 3:return[Lu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Lu(t)];case 4:case 5:return[Bu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Bu(t)];case 6:return["\u0432\u0447\u0435\u0440\u0430","\u0437\u0430\u0432\u0442\u0440\u0430"];case 7:return[Vu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Vu(t)];case 8:case 9:return[Hu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Hu(t)];case 10:case 11:return[Uu(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+Uu(t)];case 12:case 13:return[ju(t)+" \u043D\u0430\u0437\u0430\u0434","\u0447\u0435\u0440\u0435\u0437 "+ju(t)];default:return["",""]}}var _y=Ru.default=Sy,zu={};Object.defineProperty(zu,"__esModule",{value:!0});function Ey(t,e){return[["just nu","om en stund"],["%s sekunder sedan","om %s sekunder"],["1 minut sedan","om 1 minut"],["%s minuter sedan","om %s minuter"],["1 timme sedan","om 1 timme"],["%s timmar sedan","om %s timmar"],["1 dag sedan","om 1 dag"],["%s dagar sedan","om %s dagar"],["1 vecka sedan","om 1 vecka"],["%s veckor sedan","om %s veckor"],["1 m\xE5nad sedan","om 1 m\xE5nad"],["%s m\xE5nader sedan","om %s m\xE5nader"],["1 \xE5r sedan","om 1 \xE5r"],["%s \xE5r sedan","om %s \xE5r"]][e]}var Cy=zu.default=Ey,Wu={};Object.defineProperty(Wu,"__esModule",{value:!0});function Ay(t,e){return[["\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E19\u0E35\u0E49","\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"],["%s \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"],["1 \u0E19\u0E32\u0E17\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E19\u0E32\u0E17\u0E35"],["%s \u0E19\u0E32\u0E17\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E19\u0E32\u0E17\u0E35"],["1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],["%s \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],["1 \u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E27\u0E31\u0E19"],["%s \u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E27\u0E31\u0E19"],["1 \u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C"],["%s \u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C"],["1 \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E40\u0E14\u0E37\u0E2D\u0E19"],["%s \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E40\u0E14\u0E37\u0E2D\u0E19"],["1 \u0E1B\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 1 \u0E1B\u0E35"],["%s \u0E1B\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E19 %s \u0E1B\u0E35"]][e]}var wy=Wu.default=Ay,Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});function Oy(t,e){return[["az \xF6nce","\u015Fimdi"],["%s saniye \xF6nce","%s saniye i\xE7inde"],["1 dakika \xF6nce","1 dakika i\xE7inde"],["%s dakika \xF6nce","%s dakika i\xE7inde"],["1 saat \xF6nce","1 saat i\xE7inde"],["%s saat \xF6nce","%s saat i\xE7inde"],["1 g\xFCn \xF6nce","1 g\xFCn i\xE7inde"],["%s g\xFCn \xF6nce","%s g\xFCn i\xE7inde"],["1 hafta \xF6nce","1 hafta i\xE7inde"],["%s hafta \xF6nce","%s hafta i\xE7inde"],["1 ay \xF6nce","1 ay i\xE7inde"],["%s ay \xF6nce","%s ay i\xE7inde"],["1 y\u0131l \xF6nce","1 y\u0131l i\xE7inde"],["%s y\u0131l \xF6nce","%s y\u0131l i\xE7inde"]][e]}var $y=Gu.default=Oy,qu={};Object.defineProperty(qu,"__esModule",{value:!0});var xy=["\u79D2","\u5206\u949F","\u5C0F\u65F6","\u5929","\u5468","\u4E2A\u6708","\u5E74"];function Py(t,e){if(e===0)return["\u521A\u521A","\u7247\u523B\u540E"];var n=xy[~~(e/2)];return[t+" "+n+"\u524D",t+" "+n+"\u540E"]}var Yu=qu.default=Py,Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});function Dy(t,e){return[["\u525B\u525B","\u7247\u523B\u5F8C"],["%s \u79D2\u524D","%s \u79D2\u5F8C"],["1 \u5206\u9418\u524D","1 \u5206\u9418\u5F8C"],["%s \u5206\u9418\u524D","%s \u5206\u9418\u5F8C"],["1 \u5C0F\u6642\u524D","1 \u5C0F\u6642\u5F8C"],["%s \u5C0F\u6642\u524D","%s \u5C0F\u6642\u5F8C"],["1 \u5929\u524D","1 \u5929\u5F8C"],["%s \u5929\u524D","%s \u5929\u5F8C"],["1 \u9031\u524D","1 \u9031\u5F8C"],["%s \u9031\u524D","%s \u9031\u5F8C"],["1 \u500B\u6708\u524D","1 \u500B\u6708\u5F8C"],["%s \u500B\u6708\u524D","%s \u500B\u6708\u5F8C"],["1 \u5E74\u524D","1 \u5E74\u5F8C"],["%s \u5E74\u524D","%s \u5E74\u5F8C"]][e]}var Ty=Xu.default=Dy;const xt={ar:Cg,cs:Ag,de:wg,el:Og,es:$g,fi:xg,fr:Pg,gl:Dg,hi:Tg,it:Mg,ja:kg,ko:Fg,nl:Ig,pt:Rg,ru:Ng,sv:Lg,th:Bg,tr:Vg,ur:Hg,zh:Ug,"zh-CN":jg,"zh-TW":zg},My=Object.keys(xt),lt=new Eg({allowMissing:!0});lt.init=(t,e)=>{lt.clear(),t&&(lt.locale(t),lt.extend(xt[t])),e&<.extend(e)},G("ar",qg),G("cs",Xg),G("de",Jg),G("el",Qg),G("es",ty),G("fi",ry),G("fr",iy),G("gl",sy),G("hi",ly),G("it",fy),G("ja",py),G("ko",my),G("nl",gy),G("pt",by),G("ru",_y),G("sv",Cy),G("th",wy),G("tr",$y),G("zh",Yu),G("zh-CN",Yu),G("zh-TW",Ty),lt.registerMessages=(t,e)=>{xt[t]?xt[t]={...xt[t],...e}:xt[t]=e};var Se=lt,ky=t=>{const e=$e();return Gd(e,()=>t.onClickOutside()),g.createElement("ul",{ref:e,className:"r6o-comment-dropdown-menu"},g.createElement("li",{onClick:t.onEdit},Se.t("Edit")),g.createElement("li",{onClick:t.onDelete},Se.t("Delete")))},Ku={},Ro={},No={exports:{}};/*!
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
*/(function(t,e){(function(n,r){r(t,e)})(nt,function(n,r){var o=typeof Map=="function"?new Map:function(){var u=[],f=[];return{has:function(p){return u.indexOf(p)>-1},get:function(p){return f[u.indexOf(p)]},set:function(p,m){u.indexOf(p)===-1&&(u.push(p),f.push(m))},delete:function(p){var m=u.indexOf(p);m>-1&&(u.splice(m,1),f.splice(m,1))}}}(),i=function(f){return new Event(f,{bubbles:!0})};try{new Event("test")}catch{i=function(d){var p=document.createEvent("Event");return p.initEvent(d,!0,!1),p}}function a(u){if(!u||!u.nodeName||u.nodeName!=="TEXTAREA"||o.has(u))return;var f=null,d=null,p=null;function m(){var O=window.getComputedStyle(u,null);O.resize==="vertical"?u.style.resize="none":O.resize==="both"&&(u.style.resize="horizontal"),O.boxSizing==="content-box"?f=-(parseFloat(O.paddingTop)+parseFloat(O.paddingBottom)):f=parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth),isNaN(f)&&(f=0),C()}function b(O){{var k=u.style.width;u.style.width="0px",u.offsetWidth,u.style.width=k}u.style.overflowY=O}function v(O){for(var k=[];O&&O.parentNode&&O.parentNode instanceof Element;)O.parentNode.scrollTop&&k.push({node:O.parentNode,scrollTop:O.parentNode.scrollTop}),O=O.parentNode;return k}function S(){if(u.scrollHeight!==0){var O=v(u),k=document.documentElement&&document.documentElement.scrollTop;u.style.height="",u.style.height=u.scrollHeight+f+"px",d=u.clientWidth,O.forEach(function(x){x.node.scrollTop=x.scrollTop}),k&&(document.documentElement.scrollTop=k)}}function C(){S();var O=Math.round(parseFloat(u.style.height)),k=window.getComputedStyle(u,null),x=k.boxSizing==="content-box"?Math.round(parseFloat(k.height)):u.offsetHeight;if(x<O?k.overflowY==="hidden"&&(b("scroll"),S(),x=k.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(u,null).height)):u.offsetHeight):k.overflowY!=="hidden"&&(b("hidden"),S(),x=k.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(u,null).height)):u.offsetHeight),p!==x){p=x;var X=i("autosize:resized");try{u.dispatchEvent(X)}catch{}}}var P=function(){u.clientWidth!==d&&C()},F=function(O){window.removeEventListener("resize",P,!1),u.removeEventListener("input",C,!1),u.removeEventListener("keyup",C,!1),u.removeEventListener("autosize:destroy",F,!1),u.removeEventListener("autosize:update",C,!1),Object.keys(O).forEach(function(k){u.style[k]=O[k]}),o.delete(u)}.bind(u,{height:u.style.height,resize:u.style.resize,overflowY:u.style.overflowY,overflowX:u.style.overflowX,wordWrap:u.style.wordWrap});u.addEventListener("autosize:destroy",F,!1),"onpropertychange"in u&&"oninput"in u&&u.addEventListener("keyup",C,!1),window.addEventListener("resize",P,!1),u.addEventListener("input",C,!1),u.addEventListener("autosize:update",C,!1),u.style.overflowX="hidden",u.style.wordWrap="break-word",o.set(u,{destroy:F,update:C}),m()}function s(u){var f=o.get(u);f&&f.destroy()}function l(u){var f=o.get(u);f&&f.update()}var c=null;typeof window=="undefined"||typeof window.getComputedStyle!="function"?(c=function(f){return f},c.destroy=function(u){return u},c.update=function(u){return u}):(c=function(f,d){return f&&Array.prototype.forEach.call(f.length?f:[f],function(p){return a(p)}),f},c.destroy=function(u){return u&&Array.prototype.forEach.call(u.length?u:[u],s),u},c.update=function(u){return u&&Array.prototype.forEach.call(u.length?u:[u],l),u}),r.default=c,n.exports=r.default})})(No,No.exports);var Fy=function(t,e,n){return n=window.getComputedStyle,(n?n(t):t.currentStyle)[e.replace(/-(\w)/gi,function(r,o){return o.toUpperCase()})]},Iy=Fy,Lo=Iy;function Ry(t){var e=Lo(t,"line-height"),n=parseFloat(e,10);if(e===n+""){var r=t.style.lineHeight;t.style.lineHeight=e+"em",e=Lo(t,"line-height"),n=parseFloat(e,10),r?t.style.lineHeight=r:delete t.style.lineHeight}if(e.indexOf("pt")!==-1?(n*=4,n/=3):e.indexOf("mm")!==-1?(n*=96,n/=25.4):e.indexOf("cm")!==-1?(n*=96,n/=2.54):e.indexOf("in")!==-1?n*=96:e.indexOf("pc")!==-1&&(n*=16),n=Math.round(n),e==="normal"){var o=t.nodeName,i=document.createElement(o);i.innerHTML=" ",o.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var a=Lo(t,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var s=document.body;s.appendChild(i);var l=i.offsetHeight;n=l,s.removeChild(i)}return n}var Ny=Ry,Ly=nt&&nt.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=nt&&nt.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},By=nt&&nt.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n};Ro.__esModule=!0;var jn=yt,Jt=zt.exports,zn=No.exports,Vy=Ny,Hy=Vy,Ju="autosize:resized",Uy=function(t){Ly(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={lineHeight:null},n.textarea=null,n.onResize=function(r){n.props.onResize&&n.props.onResize(r)},n.updateLineHeight=function(){n.textarea&&n.setState({lineHeight:Hy(n.textarea)})},n.onChange=function(r){var o=n.props.onChange;n.currentValue=r.currentTarget.value,o&&o(r)},n}return e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.maxRows,i=r.async;typeof o=="number"&&this.updateLineHeight(),typeof o=="number"||i?setTimeout(function(){return n.textarea&&zn(n.textarea)}):this.textarea&&zn(this.textarea),this.textarea&&this.textarea.addEventListener(Ju,this.onResize)},e.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(Ju,this.onResize),zn.destroy(this.textarea))},e.prototype.render=function(){var n=this,r=this,o=r.props;o.onResize;var i=o.maxRows;o.onChange;var a=o.style;o.innerRef;var s=o.children,l=By(o,["onResize","maxRows","onChange","style","innerRef","children"]),c=r.state.lineHeight,u=i&&c?c*i:null;return jn.createElement("textarea",Bo({},l,{onChange:this.onChange,style:u?Bo({},a,{maxHeight:u}):a,ref:function(f){n.textarea=f,typeof n.props.innerRef=="function"?n.props.innerRef(f):n.props.innerRef&&(n.props.innerRef.current=f)}}),s)},e.prototype.componentDidUpdate=function(){this.textarea&&zn.update(this.textarea)},e.defaultProps={rows:1,async:!1},e.propTypes={rows:Jt.number,maxRows:Jt.number,onResize:Jt.func,innerRef:Jt.any,async:Jt.bool},e}(jn.Component);Ro.TextareaAutosize=jn.forwardRef(function(t,e){return jn.createElement(Uy,Bo({},t,{innerRef:e}))}),function(t){t.__esModule=!0;var e=Ro;t.default=e.TextareaAutosize}(Ku);var jy=vf(Ku);class Zu extends J{constructor(n){super(n);h(this,"onKeyDown",n=>{n.which===13&&n.ctrlKey&&this.props.onSaveAndClose()});h(this,"onKeyUp",n=>{n.which===46&&n.stopPropagation()});this.element=$r()}componentDidMount(){this.props.focus&&this.element.current&&this.element.current.focus({preventScroll:!0})}render(){return g.createElement(jy,{ref:this.element,className:"r6o-editable-text",value:this.props.content,placeholder:this.props.placeholder||Se.t("Add a comment..."),disabled:!this.props.editable,onChange:this.props.onChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown})}}function T(){return T=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},T.apply(this,arguments)}function zy(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Wy(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Gy=function(){function t(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Wy(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=zy(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t}(),ce="-ms-",Wn="-moz-",N="-webkit-",Qu="comm",Vo="rule",Ho="decl",qy="@import",el="@keyframes",Yy="@layer",Xy=Math.abs,Gn=String.fromCharCode,Ky=Object.assign;function Jy(t,e){return oe(t,0)^45?(((e<<2^oe(t,0))<<2^oe(t,1))<<2^oe(t,2))<<2^oe(t,3):0}function tl(t){return t.trim()}function Zy(t,e){return(t=e.exec(t))?t[0]:t}function L(t,e,n){return t.replace(e,n)}function Uo(t,e){return t.indexOf(e)}function oe(t,e){return t.charCodeAt(e)|0}function Zt(t,e,n){return t.slice(e,n)}function Me(t){return t.length}function jo(t){return t.length}function qn(t,e){return e.push(t),t}function Qy(t,e){return t.map(e).join("")}var Yn=1,Pt=1,nl=0,ve=0,K=0,Dt="";function Xn(t,e,n,r,o,i,a){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:Yn,column:Pt,length:a,return:""}}function Qt(t,e){return Ky(Xn("",null,null,"",null,null,0),t,{length:-t.length},e)}function e0(){return K}function t0(){return K=ve>0?oe(Dt,--ve):0,Pt--,K===10&&(Pt=1,Yn--),K}function _e(){return K=ve<nl?oe(Dt,ve++):0,Pt++,K===10&&(Pt=1,Yn++),K}function ke(){return oe(Dt,ve)}function Kn(){return ve}function en(t,e){return Zt(Dt,t,e)}function tn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rl(t){return Yn=Pt=1,nl=Me(Dt=t),ve=0,[]}function ol(t){return Dt="",t}function Jn(t){return tl(en(ve-1,zo(t===91?t+2:t===40?t+1:t)))}function n0(t){for(;(K=ke())&&K<33;)_e();return tn(t)>2||tn(K)>3?"":" "}function r0(t,e){for(;--e&&_e()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return en(t,Kn()+(e<6&&ke()==32&&_e()==32))}function zo(t){for(;_e();)switch(K){case t:return ve;case 34:case 39:t!==34&&t!==39&&zo(K);break;case 40:t===41&&zo(t);break;case 92:_e();break}return ve}function o0(t,e){for(;_e()&&t+K!==47+10;)if(t+K===42+42&&ke()===47)break;return"/*"+en(e,ve-1)+"*"+Gn(t===47?t:_e())}function i0(t){for(;!tn(ke());)_e();return en(t,ve)}function a0(t){return ol(Zn("",null,null,null,[""],t=rl(t),0,[0],t))}function Zn(t,e,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,d=0,p=0,m=0,b=1,v=1,S=1,C=0,P="",F=o,O=i,k=r,x=P;v;)switch(m=C,C=_e()){case 40:if(m!=108&&oe(x,f-1)==58){Uo(x+=L(Jn(C),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:x+=Jn(C);break;case 9:case 10:case 13:case 32:x+=n0(m);break;case 92:x+=r0(Kn()-1,7);continue;case 47:switch(ke()){case 42:case 47:qn(s0(o0(_e(),Kn()),e,n),l);break;default:x+="/"}break;case 123*b:s[c++]=Me(x)*S;case 125*b:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+u:S==-1&&(x=L(x,/\f/g,"")),p>0&&Me(x)-f&&qn(p>32?al(x+";",r,n,f-1):al(L(x," ","")+";",r,n,f-2),l);break;case 59:x+=";";default:if(qn(k=il(x,e,n,c,u,o,s,P,F=[],O=[],f),i),C===123)if(u===0)Zn(x,e,k,k,F,i,f,s,O);else switch(d===99&&oe(x,3)===110?100:d){case 100:case 108:case 109:case 115:Zn(t,k,k,r&&qn(il(t,k,k,0,0,o,s,P,o,F=[],f),O),o,O,f,s,r?F:O);break;default:Zn(x,k,k,k,[""],O,0,s,O)}}c=u=p=0,b=S=1,P=x="",f=a;break;case 58:f=1+Me(x),p=m;default:if(b<1){if(C==123)--b;else if(C==125&&b++==0&&t0()==125)continue}switch(x+=Gn(C),C*b){case 38:S=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(Me(x)-1)*S,S=1;break;case 64:ke()===45&&(x+=Jn(_e())),d=ke(),u=f=Me(P=x+=i0(Kn())),C++;break;case 45:m===45&&Me(x)==2&&(b=0)}}return i}function il(t,e,n,r,o,i,a,s,l,c,u){for(var f=o-1,d=o===0?i:[""],p=jo(d),m=0,b=0,v=0;m<r;++m)for(var S=0,C=Zt(t,f+1,f=Xy(b=a[m])),P=t;S<p;++S)(P=tl(b>0?d[S]+" "+C:L(C,/&\f/g,d[S])))&&(l[v++]=P);return Xn(t,e,n,o===0?Vo:s,l,c,u)}function s0(t,e,n){return Xn(t,e,n,Qu,Gn(e0()),Zt(t,2,-2),0)}function al(t,e,n,r){return Xn(t,e,n,Ho,Zt(t,0,r),Zt(t,r+1,-1),r)}function Tt(t,e){for(var n="",r=jo(t),o=0;o<r;o++)n+=e(t[o],o,t,e)||"";return n}function u0(t,e,n,r){switch(t.type){case Yy:if(t.children.length)break;case qy:case Ho:return t.return=t.return||t.value;case Qu:return"";case el:return t.return=t.value+"{"+Tt(t.children,r)+"}";case Vo:t.value=t.props.join(",")}return Me(n=Tt(t.children,r))?t.return=t.value+"{"+n+"}":""}function l0(t){var e=jo(t);return function(n,r,o,i){for(var a="",s=0;s<e;s++)a+=t[s](n,r,o,i)||"";return a}}function c0(t){return function(e){e.root||(e=e.return)&&t(e)}}function f0(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var d0=function(e,n,r){for(var o=0,i=0;o=i,i=ke(),o===38&&i===12&&(n[r]=1),!tn(i);)_e();return en(e,ve)},p0=function(e,n){var r=-1,o=44;do switch(tn(o)){case 0:o===38&&ke()===12&&(n[r]=1),e[r]+=d0(ve-1,n,r);break;case 2:e[r]+=Jn(o);break;case 4:if(o===44){e[++r]=ke()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Gn(o)}while(o=_e());return e},h0=function(e,n){return ol(p0(rl(e),n))},sl=new WeakMap,m0=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,o=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!sl.get(r))&&!o){sl.set(e,!0);for(var i=[],a=h0(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)e.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},v0=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ul(t,e){switch(Jy(t,e)){case 5103:return N+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return N+t+Wn+t+ce+t+t;case 6828:case 4268:return N+t+ce+t+t;case 6165:return N+t+ce+"flex-"+t+t;case 5187:return N+t+L(t,/(\w+).+(:[^]+)/,N+"box-$1$2"+ce+"flex-$1$2")+t;case 5443:return N+t+ce+"flex-item-"+L(t,/flex-|-self/,"")+t;case 4675:return N+t+ce+"flex-line-pack"+L(t,/align-content|flex-|-self/,"")+t;case 5548:return N+t+ce+L(t,"shrink","negative")+t;case 5292:return N+t+ce+L(t,"basis","preferred-size")+t;case 6060:return N+"box-"+L(t,"-grow","")+N+t+ce+L(t,"grow","positive")+t;case 4554:return N+L(t,/([^-])(transform)/g,"$1"+N+"$2")+t;case 6187:return L(L(L(t,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),t,"")+t;case 5495:case 3959:return L(t,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return L(L(t,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+ce+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+t+t;case 4095:case 3583:case 4068:case 2532:return L(t,/(.+)-inline(.+)/,N+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Me(t)-1-e>6)switch(oe(t,e+1)){case 109:if(oe(t,e+4)!==45)break;case 102:return L(t,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+Wn+(oe(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Uo(t,"stretch")?ul(L(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(oe(t,e+1)!==115)break;case 6444:switch(oe(t,Me(t)-3-(~Uo(t,"!important")&&10))){case 107:return L(t,":",":"+N)+t;case 101:return L(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(oe(t,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+ce+"$2box$3")+t}break;case 5936:switch(oe(t,e+11)){case 114:return N+t+ce+L(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return N+t+ce+L(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return N+t+ce+L(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return N+t+ce+t+t}return t}var g0=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case Ho:e.return=ul(e.value,e.length);break;case el:return Tt([Qt(e,{value:L(e.value,"@","@"+N)})],o);case Vo:if(e.length)return Qy(e.props,function(i){switch(Zy(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tt([Qt(e,{props:[L(i,/:(read-\w+)/,":"+Wn+"$1")]})],o);case"::placeholder":return Tt([Qt(e,{props:[L(i,/:(plac\w+)/,":"+N+"input-$1")]}),Qt(e,{props:[L(i,/:(plac\w+)/,":"+Wn+"$1")]}),Qt(e,{props:[L(i,/:(plac\w+)/,ce+"input-$1")]})],o)}return""})}},y0=[g0],b0=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var v=b.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var o=e.stylisPlugins||y0,i={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var v=b.getAttribute("data-emotion").split(" "),S=1;S<v.length;S++)i[v[S]]=!0;s.push(b)});var l,c=[m0,v0];{var u,f=[u0,c0(function(b){u.insert(b)})],d=l0(c.concat(o,f)),p=function(v){return Tt(a0(v),d)};l=function(v,S,C,P){u=C,p(v?v+"{"+S.styles+"}":S.styles),P&&(m.inserted[S.name]=!0)}}var m={key:n,sheet:new Gy({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};return m.sheet.hydrate(s),m},ll={exports:{}},V={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ee=typeof Symbol=="function"&&Symbol.for,Wo=ee?Symbol.for("react.element"):60103,Go=ee?Symbol.for("react.portal"):60106,Qn=ee?Symbol.for("react.fragment"):60107,er=ee?Symbol.for("react.strict_mode"):60108,tr=ee?Symbol.for("react.profiler"):60114,nr=ee?Symbol.for("react.provider"):60109,rr=ee?Symbol.for("react.context"):60110,qo=ee?Symbol.for("react.async_mode"):60111,or=ee?Symbol.for("react.concurrent_mode"):60111,ir=ee?Symbol.for("react.forward_ref"):60112,ar=ee?Symbol.for("react.suspense"):60113,S0=ee?Symbol.for("react.suspense_list"):60120,sr=ee?Symbol.for("react.memo"):60115,ur=ee?Symbol.for("react.lazy"):60116,_0=ee?Symbol.for("react.block"):60121,E0=ee?Symbol.for("react.fundamental"):60117,C0=ee?Symbol.for("react.responder"):60118,A0=ee?Symbol.for("react.scope"):60119;function Ee(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Wo:switch(t=t.type,t){case qo:case or:case Qn:case tr:case er:case ar:return t;default:switch(t=t&&t.$$typeof,t){case rr:case ir:case ur:case sr:case nr:return t;default:return e}}case Go:return e}}}function cl(t){return Ee(t)===or}V.AsyncMode=qo,V.ConcurrentMode=or,V.ContextConsumer=rr,V.ContextProvider=nr,V.Element=Wo,V.ForwardRef=ir,V.Fragment=Qn,V.Lazy=ur,V.Memo=sr,V.Portal=Go,V.Profiler=tr,V.StrictMode=er,V.Suspense=ar,V.isAsyncMode=function(t){return cl(t)||Ee(t)===qo},V.isConcurrentMode=cl,V.isContextConsumer=function(t){return Ee(t)===rr},V.isContextProvider=function(t){return Ee(t)===nr},V.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Wo},V.isForwardRef=function(t){return Ee(t)===ir},V.isFragment=function(t){return Ee(t)===Qn},V.isLazy=function(t){return Ee(t)===ur},V.isMemo=function(t){return Ee(t)===sr},V.isPortal=function(t){return Ee(t)===Go},V.isProfiler=function(t){return Ee(t)===tr},V.isStrictMode=function(t){return Ee(t)===er},V.isSuspense=function(t){return Ee(t)===ar},V.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Qn||t===or||t===tr||t===er||t===ar||t===S0||typeof t=="object"&&t!==null&&(t.$$typeof===ur||t.$$typeof===sr||t.$$typeof===nr||t.$$typeof===rr||t.$$typeof===ir||t.$$typeof===E0||t.$$typeof===C0||t.$$typeof===A0||t.$$typeof===_0)},V.typeOf=Ee,ll.exports=V;var fl=ll.exports,w0={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},O0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},dl={};dl[fl.ForwardRef]=w0,dl[fl.Memo]=O0;var $0=!0;function pl(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):r+=o+" "}),r}var Yo=function(e,n,r){var o=e.key+"-"+n.name;(r===!1||$0===!1)&&e.registered[o]===void 0&&(e.registered[o]=n.styles)},hl=function(e,n,r){Yo(e,n,r);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function x0(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var P0={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},D0=/[A-Z]|^ms/g,T0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ml=function(e){return e.charCodeAt(1)===45},vl=function(e){return e!=null&&typeof e!="boolean"},Xo=f0(function(t){return ml(t)?t:t.replace(D0,"-$&").toLowerCase()}),gl=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(T0,function(r,o,i){return Fe={name:o,styles:i,next:Fe},o})}return P0[e]!==1&&!ml(e)&&typeof n=="number"&&n!==0?n+"px":n},GE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function nn(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Fe={name:n.name,styles:n.styles,next:Fe},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Fe={name:r.name,styles:r.styles,next:Fe},r=r.next;var o=n.styles+";";return o}return M0(t,e,n)}case"function":{if(t!==void 0){var i=Fe,a=n(t);return Fe=i,nn(t,e,a)}break}}if(e==null)return n;var s=e[n];return s!==void 0?s:n}function M0(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=nn(t,e,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object")e!=null&&e[a]!==void 0?r+=i+"{"+e[a]+"}":vl(a)&&(r+=Xo(i)+":"+gl(i,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var s=0;s<a.length;s++)vl(a[s])&&(r+=Xo(i)+":"+gl(i,a[s])+";");else{var l=nn(t,e,a);switch(i){case"animation":case"animationName":{r+=Xo(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var yl=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Fe,Ko=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";Fe=void 0;var a=e[0];a==null||a.raw===void 0?(o=!1,i+=nn(r,n,a)):i+=a[0];for(var s=1;s<e.length;s++)i+=nn(r,n,e[s]),o&&(i+=a[s]);yl.lastIndex=0;for(var l="",c;(c=yl.exec(i))!==null;)l+="-"+c[1];var u=x0(i)+l;return{name:u,styles:i,next:Fe}},k0=function(e){return e()},F0=Br["useInsertionEffect"]?Br["useInsertionEffect"]:!1,bl=F0||k0,Jo={}.hasOwnProperty,Sl=Vt(typeof HTMLElement!="undefined"?b0({key:"css"}):null);Sl.Provider;var _l=function(e){return Rr(function(n,r){var o=Ht(Sl);return e(n,o,r)})},El=Vt({}),Zo="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",I0=function(e,n){var r={};for(var o in n)Jo.call(n,o)&&(r[o]=n[o]);return r[Zo]=e,r},R0=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return Yo(n,r,o),bl(function(){return hl(n,r,o)}),null},N0=_l(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var o=t[Zo],i=[r],a="";typeof t.className=="string"?a=pl(e.registered,i,t.className):t.className!=null&&(a=t.className+" ");var s=Ko(i,void 0,Ht(El));a+=e.key+"-"+s.name;var l={};for(var c in t)Jo.call(t,c)&&c!=="css"&&c!==Zo&&(l[c]=t[c]);return l.ref=n,l.className=a,Q(Ce,null,Q(R0,{cache:e,serialized:s,isStringTag:typeof o=="string"}),Q(o,l))}),L0=N0,M=function(e,n){var r=arguments;if(n==null||!Jo.call(n,"css"))return Q.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=L0,i[1]=I0(e,n);for(var a=2;a<o;a++)i[a]=r[a];return Q.apply(null,i)};function Qo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ko(e)}var B0=function(){var e=Qo.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},V0=function t(e){for(var n=e.length,r=0,o="";r<n;r++){var i=e[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=t(i);else{a="";for(var s in i)i[s]&&s&&(a&&(a+=" "),a+=s)}break}default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};function H0(t,e,n){var r=[],o=pl(t,r,n);return r.length<2?n:o+e(r)}var U0=function(e){var n=e.cache,r=e.serializedArr;return bl(function(){for(var o=0;o<r.length;o++)hl(n,r[o],!1)}),null},j0=_l(function(t,e){var n=!1,r=[],o=function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];var d=Ko(u,e.registered);return r.push(d),Yo(e,d,!1),e.key+"-"+d.name},i=function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return H0(e.registered,o,V0(u))},a={css:o,cx:i,theme:Ht(El)},s=t.children(a);return n=!0,Q(Ce,null,Q(U0,{cache:e,serializedArr:r}),s)});function z0(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function ei(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Mt(t,e){if(t==null)return{};var n=ei(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function kt(t){return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});var ti=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Al=function(){function t(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),wl=yt,rn=Ol(wl),W0=zt.exports,Z=Ol(W0);function Ol(t){return t&&t.__esModule?t:{default:t}}function G0(t,e){var n={};for(var r in t)e.indexOf(r)>=0||!Object.prototype.hasOwnProperty.call(t,r)||(n[r]=t[r]);return n}function q0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y0(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function X0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var $l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},K0=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],J0=function(e){return K0.forEach(function(n){return delete e[n]}),e},xl=function(e,n){n.style.fontSize=e.fontSize,n.style.fontFamily=e.fontFamily,n.style.fontWeight=e.fontWeight,n.style.fontStyle=e.fontStyle,n.style.letterSpacing=e.letterSpacing,n.style.textTransform=e.textTransform},Pl=typeof window!="undefined"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,Dl=function(){return Pl?"_"+Math.random().toString(36).substr(2,12):void 0},ni=function(t){X0(e,t),Al(e,null,[{key:"getDerivedStateFromProps",value:function(r,o){var i=r.id;return i!==o.prevId?{inputId:i||Dl(),prevId:i}:null}}]);function e(n){q0(this,e);var r=Y0(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n));return r.inputRef=function(o){r.input=o,typeof r.props.inputRef=="function"&&r.props.inputRef(o)},r.placeHolderSizerRef=function(o){r.placeHolderSizer=o},r.sizerRef=function(o){r.sizer=o},r.state={inputWidth:n.minWidth,inputId:n.id||Dl(),prevId:n.id},r}return Al(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(r,o){o.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var r=this.input&&window.getComputedStyle(this.input);!r||(xl(r,this.sizer),this.placeHolderSizer&&xl(r,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth=="undefined")){var r=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?r=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:r=this.sizer.scrollWidth+2;var o=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;r+=o,r<this.props.minWidth&&(r=this.props.minWidth),r!==this.state.inputWidth&&this.setState({inputWidth:r})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var r=this.props.injectStyles;return Pl&&r?rn.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var r=[this.props.defaultValue,this.props.value,""].reduce(function(s,l){return s!=null?s:l}),o=ti({},this.props.style);o.display||(o.display="inline-block");var i=ti({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),a=G0(this.props,[]);return J0(a),a.className=this.props.inputClassName,a.id=this.state.inputId,a.style=i,rn.default.createElement("div",{className:this.props.className,style:o},this.renderStyles(),rn.default.createElement("input",ti({},a,{ref:this.inputRef})),rn.default.createElement("div",{ref:this.sizerRef,style:$l},r),this.props.placeholder?rn.default.createElement("div",{ref:this.placeHolderSizerRef,style:$l},this.props.placeholder):null)}}]),e}(wl.Component);ni.propTypes={className:Z.default.string,defaultValue:Z.default.any,extraWidth:Z.default.oneOfType([Z.default.number,Z.default.string]),id:Z.default.string,injectStyles:Z.default.bool,inputClassName:Z.default.string,inputRef:Z.default.func,inputStyle:Z.default.object,minWidth:Z.default.oneOfType([Z.default.number,Z.default.string]),onAutosize:Z.default.func,onChange:Z.default.func,placeholder:Z.default.string,placeholderIsMinWidth:Z.default.bool,style:Z.default.object,value:Z.default.any},ni.defaultProps={minWidth:1,injectStyles:!0};var Z0=Cl.default=ni;function lr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q0(t,e){if(kt(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(kt(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tl(t){var e=Q0(t,"string");return kt(e)==="symbol"?e:String(e)}function Ml(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tl(r.key),r)}}function cr(t,e,n){return e&&Ml(t.prototype,e),n&&Ml(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function fr(t,e){return fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},fr(t,e)}function dr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fr(t,e)}function je(t,e,n){return e=Tl(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function eb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kl(Object(n),!0).forEach(function(r){eb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pr(t){return pr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},pr(t)}function tb(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function nb(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rb(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:nb(t)}function hr(t){var e=tb();return function(){var r=pr(t),o;if(e){var i=pr(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return rb(this,o)}}var mr=function(){};function ob(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function ib(t,e,n){var r=[n];if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&r.push("".concat(ob(t,o)));return r.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Fl=function(e){return Array.isArray(e)?e.filter(Boolean):kt(e)==="object"&&e!==null?[e]:[]},Il=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=Mt(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return ie({},n)};function ri(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function Rl(t){return ri(t)?window.pageYOffset:t.scrollTop}function vr(t,e){if(ri(t)){window.scrollTo(0,e);return}t.scrollTop=e}function ab(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/,o=document.documentElement;if(e.position==="fixed")return o;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return o}function sb(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function gr(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:mr,o=Rl(t),i=e-o,a=10,s=0;function l(){s+=a;var c=sb(s,o,i,n);vr(t,c),s<n?window.requestAnimationFrame(l):r(t)}l()}function ub(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=e.offsetHeight/3;r.bottom+o>n.bottom?vr(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+o,t.scrollHeight)):r.top-o<n.top&&vr(t,Math.max(e.offsetTop-o,0))}function lb(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function Nl(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function cb(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Ll=!1,fb={get passive(){return Ll=!0}},yr=typeof window!="undefined"?window:{};yr.addEventListener&&yr.removeEventListener&&(yr.addEventListener("p",mr,fb),yr.removeEventListener("p",mr,!1));var db=Ll;function pb(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,o=t.placement,i=t.shouldScroll,a=t.isFixedPosition,s=t.theme,l=s.spacing,c=ab(n),u={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return u;var f=c.getBoundingClientRect(),d=f.height,p=n.getBoundingClientRect(),m=p.bottom,b=p.height,v=p.top,S=n.offsetParent.getBoundingClientRect(),C=S.top,P=window.innerHeight,F=Rl(c),O=parseInt(getComputedStyle(n).marginBottom,10),k=parseInt(getComputedStyle(n).marginTop,10),x=C-k,X=P-v,H=x+F,fe=d-F-v,W=m-P+F+O,z=F+v-k,Y=160;switch(o){case"auto":case"bottom":if(X>=b)return{placement:"bottom",maxHeight:e};if(fe>=b&&!a)return i&&gr(c,W,Y),{placement:"bottom",maxHeight:e};if(!a&&fe>=r||a&&X>=r){i&&gr(c,W,Y);var de=a?X-O:fe-O;return{placement:"bottom",maxHeight:de}}if(o==="auto"||a){var Ie=e,he=a?x:H;return he>=r&&(Ie=Math.min(he-O-l.controlHeight,e)),{placement:"top",maxHeight:Ie}}if(o==="bottom")return i&&vr(c,W),{placement:"bottom",maxHeight:e};break;case"top":if(x>=b)return{placement:"top",maxHeight:e};if(H>=b&&!a)return i&&gr(c,z,Y),{placement:"top",maxHeight:e};if(!a&&H>=r||a&&x>=r){var te=e;return(!a&&H>=r||a&&x>=r)&&(te=a?x-k:H-k),i&&gr(c,z,Y),{placement:"top",maxHeight:te}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function hb(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var oi=function(e){return e==="auto"?"bottom":e},mb=function(e){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return n={label:"menu"},je(n,hb(r),"100%"),je(n,"backgroundColor",s.neutral0),je(n,"borderRadius",i),je(n,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),je(n,"marginBottom",a.menuGutter),je(n,"marginTop",a.menuGutter),je(n,"position","absolute"),je(n,"width","100%"),je(n,"zIndex",1),n},Bl=Vt({getPortalPlacement:null}),Vl=function(t){dr(n,t);var e=hr(n);function n(){var r;lr(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i)),r.state={maxHeight:r.props.maxMenuHeight,placement:null},r.getPlacement=function(s){var l=r.props,c=l.minMenuHeight,u=l.maxMenuHeight,f=l.menuPlacement,d=l.menuPosition,p=l.menuShouldScrollIntoView,m=l.theme;if(!!s){var b=d==="fixed",v=p&&!b,S=pb({maxHeight:u,menuEl:s,minHeight:c,placement:f,shouldScroll:v,isFixedPosition:b,theme:m}),C=r.context.getPortalPlacement;C&&C(S),r.setState(S)}},r.getUpdatedProps=function(){var s=r.props.menuPlacement,l=r.state.placement||oi(s);return ie(ie({},r.props),{},{placement:l,maxHeight:r.state.maxHeight})},r}return cr(n,[{key:"render",value:function(){var o=this.props.children;return o({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(J);Vl.contextType=Bl;var vb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerRef,s=e.innerProps;return M("div",T({css:i("menu",e),className:o({menu:!0},r),ref:a},s),n)},gb=function(e){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return{maxHeight:n,overflowY:"auto",paddingBottom:r,paddingTop:r,position:"relative",WebkitOverflowScrolling:"touch"}},yb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps,s=e.innerRef,l=e.isMulti;return M("div",T({css:i("menuList",e),className:o({"menu-list":!0,"menu-list--is-multi":l},r),ref:s},a),n)},Hl=function(e){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:o.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px"),textAlign:"center"}},bb=Hl,Sb=Hl,Ul=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return M("div",T({css:i("noOptionsMessage",e),className:o({"menu-notice":!0,"menu-notice--no-options":!0},r)},a),n)};Ul.defaultProps={children:"No options"};var jl=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return M("div",T({css:i("loadingMessage",e),className:o({"menu-notice":!0,"menu-notice--loading":!0},r)},a),n)};jl.defaultProps={children:"Loading..."};var _b=function(e){var n=e.rect,r=e.offset,o=e.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},Eb=function(t){dr(n,t);var e=hr(n);function n(){var r;lr(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i)),r.state={placement:null},r.getPortalPlacement=function(s){var l=s.placement,c=oi(r.props.menuPlacement);l!==c&&r.setState({placement:l})},r}return cr(n,[{key:"render",value:function(){var o=this.props,i=o.appendTo,a=o.children,s=o.className,l=o.controlElement,c=o.cx,u=o.innerProps,f=o.menuPlacement,d=o.menuPosition,p=o.getStyles,m=d==="fixed";if(!i&&!m||!l)return null;var b=this.state.placement||oi(f),v=lb(l),S=m?0:window.pageYOffset,C=v[b]+S,P={offset:C,position:d,rect:v},F=M("div",T({css:p("menuPortal",P),className:c({"menu-portal":!0},s)},u),a);return M(Bl.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},i?Nr(F,i):F)}}]),n}(J),Cb=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":null,pointerEvents:n?"none":null,position:"relative"}},Ab=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps,s=e.isDisabled,l=e.isRtl;return M("div",T({css:i("container",e),className:o({"--is-disabled":s,"--is-rtl":l},r)},a),n)},wb=function(e){var n=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},Ob=function(e){var n=e.children,r=e.className,o=e.cx,i=e.innerProps,a=e.isMulti,s=e.getStyles,l=e.hasValue;return M("div",T({css:s("valueContainer",e),className:o({"value-container":!0,"value-container--is-multi":a,"value-container--has-value":l},r)},i),n)},$b=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},xb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.innerProps,a=e.getStyles;return M("div",T({css:a("indicatorsContainer",e),className:o({indicators:!0},r)},i),n)},zl,Pb={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Wl=function(e){var n=e.size,r=Mt(e,["size"]);return M("svg",T({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Pb},r))},ii=function(e){return M(Wl,T({size:20},e),M("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Gl=function(e){return M(Wl,T({size:20},e),M("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"}))},ql=function(e){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return{label:"indicatorContainer",color:n?i.neutral60:i.neutral20,display:"flex",padding:o*2,transition:"color 150ms",":hover":{color:n?i.neutral80:i.neutral40}}},Db=ql,Tb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return M("div",T({css:i("dropdownIndicator",e),className:o({indicator:!0,"dropdown-indicator":!0},r)},a),n||M(Gl,null))},Mb=ql,kb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return M("div",T({css:i("clearIndicator",e),className:o({indicator:!0,"clear-indicator":!0},r)},a),n||M(ii,null))},Fb=function(e){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:n?i.neutral10:i.neutral20,marginBottom:o*2,marginTop:o*2,width:1}},Ib=function(e){var n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return M("span",T({},i,{css:o("indicatorSeparator",e),className:r({"indicator-separator":!0},n)}))},Rb=B0(zl||(zl=z0([`
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),Nb=function(e){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return{label:"loadingIndicator",color:n?i.neutral60:i.neutral20,display:"flex",padding:a*2,transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"}},ai=function(e){var n=e.delay,r=e.offset;return M("span",{css:Qo({animation:"".concat(Rb," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Yl=function(e){var n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isRtl;return M("div",T({css:o("loadingIndicator",e),className:r({indicator:!0,"loading-indicator":!0},n)},i),M(ai,{delay:0,offset:a}),M(ai,{delay:160,offset:!0}),M(ai,{delay:320,offset:!a}))};Yl.defaultProps={size:4};var Lb=function(e){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,s=o.spacing;return{label:"control",alignItems:"center",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):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:r?i.primary:i.neutral30}}},Bb=function(e){var n=e.children,r=e.cx,o=e.getStyles,i=e.className,a=e.isDisabled,s=e.isFocused,l=e.innerRef,c=e.innerProps,u=e.menuIsOpen;return M("div",T({ref:l,css:o("control",e),className:r({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":u},i)},c),n)},Vb=function(e){var n=e.theme.spacing;return{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Hb=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.Heading,s=e.headingProps,l=e.innerProps,c=e.label,u=e.theme,f=e.selectProps;return M("div",T({css:i("group",e),className:o({group:!0},r)},l),M(a,T({},s,{selectProps:f,theme:u,getStyles:i,cx:o}),c),M("div",null,n))},Ub=function(e){var n=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:n.baseUnit*3,paddingRight:n.baseUnit*3,textTransform:"uppercase"}},jb=function(e){var n=e.getStyles,r=e.cx,o=e.className,i=Il(e);i.data;var a=Mt(i,["data"]);return M("div",T({css:n("groupHeading",e),className:r({"group-heading":!0},o)},a))},zb=function(e){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:n?"hidden":"visible",color:i.neutral80}},Wb=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Gb=function(e){var n=e.className,r=e.cx,o=e.getStyles,i=Il(e),a=i.innerRef,s=i.isDisabled,l=i.isHidden,c=Mt(i,["innerRef","isDisabled","isHidden"]);return M("div",{css:o("input",e)},M(Z0,T({className:r({input:!0},n),inputRef:a,inputStyle:Wb(l),disabled:s},c)))},qb=function(e){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return{label:"multiValue",backgroundColor:i.neutral10,borderRadius:o/2,display:"flex",margin:r.baseUnit/2,minWidth:0}},Yb=function(e){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return{borderRadius:r/2,color:o.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},Xb=function(e){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return{alignItems:"center",borderRadius:o/2,backgroundColor:a&&i.dangerLight,display:"flex",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},Xl=function(e){var n=e.children,r=e.innerProps;return M("div",r,n)},Kb=Xl,Jb=Xl;function Zb(t){var e=t.children,n=t.innerProps;return M("div",n,e||M(ii,{size:14}))}var Kl=function(e){var n=e.children,r=e.className,o=e.components,i=e.cx,a=e.data,s=e.getStyles,l=e.innerProps,c=e.isDisabled,u=e.removeProps,f=e.selectProps,d=o.Container,p=o.Label,m=o.Remove;return M(j0,null,function(b){var v=b.css,S=b.cx;return M(d,{data:a,innerProps:ie({className:S(v(s("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":c},r))},l),selectProps:f},M(p,{data:a,innerProps:{className:S(v(s("multiValueLabel",e)),i({"multi-value__label":!0},r))},selectProps:f},n),M(m,{data:a,innerProps:ie({className:S(v(s("multiValueRemove",e)),i({"multi-value__remove":!0},r))},u),selectProps:f}))})};Kl.defaultProps={cropWithEllipsis:!0};var Qb=function(e){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return{label:"option",backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!n&&(o?s.primary:s.primary50)}}},e1=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.isFocused,l=e.isSelected,c=e.innerRef,u=e.innerProps;return M("div",T({css:i("option",e),className:o({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":l},r),ref:c},u),n)},t1=function(e){var n=e.theme,r=n.spacing,o=n.colors;return{label:"placeholder",color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},n1=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return M("div",T({css:i("placeholder",e),className:o({placeholder:!0},r)},a),n)},r1=function(e){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return{label:"singleValue",color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2,maxWidth:"calc(100% - ".concat(o.baseUnit*2,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},o1=function(e){var n=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.innerProps;return M("div",T({css:i("singleValue",e),className:o({"single-value":!0,"single-value--is-disabled":a},r)},s),n)},i1={ClearIndicator:kb,Control:Bb,DropdownIndicator:Tb,DownChevron:Gl,CrossIcon:ii,Group:Hb,GroupHeading:jb,IndicatorsContainer:xb,IndicatorSeparator:Ib,Input:Gb,LoadingIndicator:Yl,Menu:vb,MenuList:yb,MenuPortal:Eb,LoadingMessage:jl,NoOptionsMessage:Ul,MultiValue:Kl,MultiValueContainer:Kb,MultiValueLabel:Jb,MultiValueRemove:Zb,Option:e1,Placeholder:n1,SelectContainer:Ab,SingleValue:o1,ValueContainer:Ob},a1=function(e){return ie(ie({},i1),e.components)};function si(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s1(t){if(Array.isArray(t))return si(t)}function u1(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function l1(t,e){if(!!t){if(typeof t=="string")return si(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return si(t,e)}}function c1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jl(t){return s1(t)||u1(t)||l1(t)||c1()}var Zl=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function f1(t,e){return!!(t===e||Zl(t)&&Zl(e))}function d1(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!f1(t[n],e[n]))return!1;return!0}function p1(t,e){e===void 0&&(e=d1);var n,r=[],o,i=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i&&n===this&&e(s,r)||(o=t.apply(this,s),i=!0,n=this,r=s),o}return a}for(var h1={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},m1=function(e){return M("span",T({css:h1},e))},v1={guidance:function(e){var n=e.isSearchable,r=e.isMulti,o=e.isDisabled,i=e.tabSelectsValue,a=e.context;switch(a){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,o=r===void 0?"":r,i=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,o=r===void 0?{}:r,i=e.options,a=e.label,s=a===void 0?"":a,l=e.selectValue,c=e.isDisabled,u=e.isSelected,f=function(b,v){return b&&b.length?"".concat(b.indexOf(v)+1," of ").concat(b.length):""};if(n==="value"&&l)return"value ".concat(s," focused, ").concat(f(l,o),".");if(n==="menu"){var d=c?" disabled":"",p="".concat(u?"selected":"focused").concat(d);return"option ".concat(s," ").concat(p,", ").concat(f(i,o),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},g1=function(e){var n=e.ariaSelection,r=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,c=l.ariaLiveMessages,u=l.getOptionLabel,f=l.inputValue,d=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,v=l.options,S=l.screenReaderStatus,C=l.tabSelectsValue,P=l["aria-label"],F=l["aria-live"],O=He(function(){return ie(ie({},v1),c||{})},[c]),k=He(function(){var W="";if(n&&O.onChange){var z=n.option,Y=n.removedValue,de=n.value,Ie=function(Re){return Array.isArray(Re)?null:Re},he=Y||z||Ie(de),te=ie({isDisabled:he&&p(he),label:he?u(he):""},n);W=O.onChange(te)}return W},[n,p,u,O]),x=He(function(){var W="",z=r||o,Y=!!(r&&s&&s.includes(r));if(z&&O.onFocus){var de={focused:z,label:u(z),isDisabled:p(z),isSelected:Y,options:v,context:z===r?"menu":"value",selectValue:s};W=O.onFocus(de)}return W},[r,o,u,p,O,v,s]),X=He(function(){var W="";if(b&&v.length&&O.onFilter){var z=S({count:i.length});W=O.onFilter({inputValue:f,resultsMessage:z})}return W},[i,f,b,O,v,S]),H=He(function(){var W="";if(O.guidance){var z=o?"value":b?"menu":"input";W=O.guidance({"aria-label":P,context:z,isDisabled:r&&p(r),isMulti:d,isSearchable:m,tabSelectsValue:C})}return W},[P,r,o,d,p,m,b,O,C]),fe="".concat(x," ").concat(X," ").concat(H);return M(m1,{"aria-live":F,"aria-atomic":"false","aria-relevant":"additions text"},a&&M(g.Fragment,null,M("span",{id:"aria-selection"},k),M("span",{id:"aria-context"},fe)))},ui=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],y1=new RegExp("["+ui.map(function(t){return t.letters}).join("")+"]","g"),Ql={},li=0;li<ui.length;li++)for(var ci=ui[li],fi=0;fi<ci.letters.length;fi++)Ql[ci.letters[fi]]=ci.base;var ec=function(e){return e.replace(y1,function(n){return Ql[n]})},b1=p1(ec),tc=function(e){return e.replace(/^\s+|\s+$/g,"")},S1=function(e){return"".concat(e.label," ").concat(e.value)},_1=function(e){return function(n,r){var o=ie({ignoreCase:!0,ignoreAccents:!0,stringify:S1,trim:!0,matchFrom:"any"},e),i=o.ignoreCase,a=o.ignoreAccents,s=o.stringify,l=o.trim,c=o.matchFrom,u=l?tc(r):r,f=l?tc(s(n)):s(n);return i&&(u=u.toLowerCase(),f=f.toLowerCase()),a&&(u=b1(u),f=ec(f)),c==="start"?f.substr(0,u.length)===u:f.indexOf(u)>-1}};function E1(t){t.in,t.out,t.onExited,t.appear,t.enter,t.exit;var e=t.innerRef;t.emotion;var n=Mt(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return M("input",T({ref:e},n,{css:Qo({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var C1=function(e){e.preventDefault(),e.stopPropagation()};function A1(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,o=t.onTopArrive,i=t.onTopLeave,a=$e(!1),s=$e(!1),l=$e(0),c=$e(null),u=xe(function(v,S){if(c.current!==null){var C=c.current,P=C.scrollTop,F=C.scrollHeight,O=C.clientHeight,k=c.current,x=S>0,X=F-O-P,H=!1;X>S&&a.current&&(r&&r(v),a.current=!1),x&&s.current&&(i&&i(v),s.current=!1),x&&S>X?(n&&!a.current&&n(v),k.scrollTop=F,H=!0,a.current=!0):!x&&-S>P&&(o&&!s.current&&o(v),k.scrollTop=0,H=!0,s.current=!0),H&&C1(v)}},[]),f=xe(function(v){u(v,v.deltaY)},[u]),d=xe(function(v){l.current=v.changedTouches[0].clientY},[]),p=xe(function(v){var S=l.current-v.changedTouches[0].clientY;u(v,S)},[u]),m=xe(function(v){if(!!v){var S=db?{passive:!1}:!1;typeof v.addEventListener=="function"&&v.addEventListener("wheel",f,S),typeof v.addEventListener=="function"&&v.addEventListener("touchstart",d,S),typeof v.addEventListener=="function"&&v.addEventListener("touchmove",p,S)}},[p,d,f]),b=xe(function(v){!v||(typeof v.removeEventListener=="function"&&v.removeEventListener("wheel",f,!1),typeof v.removeEventListener=="function"&&v.removeEventListener("touchstart",d,!1),typeof v.removeEventListener=="function"&&v.removeEventListener("touchmove",p,!1))},[p,d,f]);return tt(function(){if(!!e){var v=c.current;return m(v),function(){b(v)}}},[e,m,b]),function(v){c.current=v}}var nc=["boxSizing","height","overflow","paddingRight","position"],rc={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function oc(t){t.preventDefault()}function ic(t){t.stopPropagation()}function ac(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function sc(){return"ontouchstart"in window||navigator.maxTouchPoints}var uc=!!(typeof window!="undefined"&&window.document&&window.document.createElement),on=0,Ft={capture:!1,passive:!1};function w1(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,o=$e({}),i=$e(null),a=xe(function(l){if(!!uc){var c=document.body,u=c&&c.style;if(r&&nc.forEach(function(m){var b=u&&u[m];o.current[m]=b}),r&&on<1){var f=parseInt(o.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,p=window.innerWidth-d+f||0;Object.keys(rc).forEach(function(m){var b=rc[m];u&&(u[m]=b)}),u&&(u.paddingRight="".concat(p,"px"))}c&&sc()&&(c.addEventListener("touchmove",oc,Ft),l&&(l.addEventListener("touchstart",ac,Ft),l.addEventListener("touchmove",ic,Ft))),on+=1}},[]),s=xe(function(l){if(!!uc){var c=document.body,u=c&&c.style;on=Math.max(on-1,0),r&&on<1&&nc.forEach(function(f){var d=o.current[f];u&&(u[f]=d)}),c&&sc()&&(c.removeEventListener("touchmove",oc,Ft),l&&(l.removeEventListener("touchstart",ac,Ft),l.removeEventListener("touchmove",ic,Ft)))}},[]);return tt(function(){if(!!e){var l=i.current;return a(l),function(){s(l)}}},[e,a,s]),function(l){i.current=l}}var O1=function(){return document.activeElement&&document.activeElement.blur()},$1={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function x1(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,o=r===void 0?!0:r,i=t.onBottomArrive,a=t.onBottomLeave,s=t.onTopArrive,l=t.onTopLeave,c=A1({isEnabled:o,onBottomArrive:i,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),u=w1({isEnabled:n}),f=function(p){c(p),u(p)};return M(g.Fragment,null,n&&M("div",{onClick:O1,css:$1}),e(f))}var P1=function(e){return e.label},D1=function(e){return e.label},T1=function(e){return e.value},M1=function(e){return!!e.isDisabled},k1={clearIndicator:Mb,container:Cb,control:Lb,dropdownIndicator:Db,group:Vb,groupHeading:Ub,indicatorsContainer:$b,indicatorSeparator:Fb,input:zb,loadingIndicator:Nb,loadingMessage:Sb,menu:mb,menuList:gb,menuPortal:_b,multiValue:qb,multiValueLabel:Yb,multiValueRemove:Xb,noOptionsMessage:bb,option:Qb,placeholder:t1,singleValue:r1,valueContainer:wb},F1={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%)"},I1=4,lc=4,R1=38,N1=lc*2,L1={baseUnit:lc,controlHeight:R1,menuGutter:N1},di={borderRadius:I1,colors:F1,spacing:L1},B1={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Nl(),captureMenuScroll:!Nl(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_1(),formatGroupLabel:P1,getOptionLabel:D1,getOptionValue:T1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:M1,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!cb(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function cc(t,e,n,r){var o=mc(t,e,n),i=vc(t,e,n),a=hc(t,e),s=br(t,e);return{type:"option",data:e,isDisabled:o,isSelected:i,label:a,value:s,index:r}}function fc(t,e){return t.options.map(function(n,r){if(n.options){var o=n.options.map(function(a,s){return cc(t,a,e,s)}).filter(function(a){return pc(t,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=cc(t,n,e,r);return pc(t,i)?i:void 0}).filter(function(n){return!!n})}function dc(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,Jl(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function V1(t,e){return dc(fc(t,e))}function pc(t,e){var n=t.inputValue,r=n===void 0?"":n,o=e.data,i=e.isSelected,a=e.label,s=e.value;return(!yc(t)||!i)&&gc(t,{label:a,value:s,data:o},r)}function H1(t,e){var n=t.focusedValue,r=t.selectValue,o=r.indexOf(n);if(o>-1){var i=e.indexOf(n);if(i>-1)return n;if(o<e.length)return e[o]}return null}function U1(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var hc=function(e,n){return e.getOptionLabel(n)},br=function(e,n){return e.getOptionValue(n)};function mc(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function vc(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=br(t,e);return n.some(function(o){return br(t,o)===r})}function gc(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var yc=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},j1=1,bc=function(t){dr(n,t);var e=hr(n);function n(r){var o;return lr(this,n),o=e.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.instancePrefix="",o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(i){o.controlRef=i},o.focusedOptionRef=null,o.getFocusedOptionRef=function(i){o.focusedOptionRef=i},o.menuListRef=null,o.getMenuListRef=function(i){o.menuListRef=i},o.inputRef=null,o.getInputRef=function(i){o.inputRef=i},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(i,a){var s=o.props,l=s.onChange,c=s.name;a.name=c,o.ariaOnChange(i,a),l(i,a)},o.setValue=function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",s=arguments.length>2?arguments[2]:void 0,l=o.props,c=l.closeMenuOnSelect,u=l.isMulti;o.onInputChange("",{action:"set-value"}),c&&(o.setState({inputIsHiddenAfterUpdate:!u}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(i,{action:a,option:s})},o.selectOption=function(i){var a=o.props,s=a.blurInputOnSelect,l=a.isMulti,c=a.name,u=o.state.selectValue,f=l&&o.isOptionSelected(i,u),d=o.isOptionDisabled(i,u);if(f){var p=o.getOptionValue(i);o.setValue(u.filter(function(m){return o.getOptionValue(m)!==p}),"deselect-option",i)}else if(!d)l?o.setValue([].concat(Jl(u),[i]),"select-option",i):o.setValue(i,"select-option");else{o.ariaOnChange(i,{action:"select-option",name:c});return}s&&o.blurInput()},o.removeValue=function(i){var a=o.props.isMulti,s=o.state.selectValue,l=o.getOptionValue(i),c=s.filter(function(f){return o.getOptionValue(f)!==l}),u=a?c:c[0]||null;o.onChange(u,{action:"remove-value",removedValue:i}),o.focusInput()},o.clearValue=function(){var i=o.state.selectValue;o.onChange(o.props.isMulti?[]:null,{action:"clear",removedValues:i})},o.popValue=function(){var i=o.props.isMulti,a=o.state.selectValue,s=a[a.length-1],l=a.slice(0,a.length-1),c=i?l:l[0]||null;o.onChange(c,{action:"pop-value",removedValue:s})},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return ib.apply(void 0,[o.props.classNamePrefix].concat(a))},o.getOptionLabel=function(i){return hc(o.props,i)},o.getOptionValue=function(i){return br(o.props,i)},o.getStyles=function(i,a){var s=k1[i](a);s.boxSizing="border-box";var l=o.props.styles[i];return l?l(s,a):s},o.getElementId=function(i){return"".concat(o.instancePrefix,"-").concat(i)},o.getComponents=function(){return a1(o.props)},o.buildCategorizedOptions=function(){return fc(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return dc(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(i,a){o.setState({ariaSelection:ie({value:i},a)})},o.onMenuMouseDown=function(i){i.button===0&&(i.stopPropagation(),i.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(i){o.blockOptionHover=!1},o.onControlMouseDown=function(i){var a=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?i.target.tagName!=="INPUT"&&i.target.tagName!=="TEXTAREA"&&o.onMenuClose():a&&o.openMenu("first"):(a&&(o.openAfterFocus=!0),o.focusInput()),i.target.tagName!=="INPUT"&&i.target.tagName!=="TEXTAREA"&&i.preventDefault()},o.onDropdownIndicatorMouseDown=function(i){if(!(i&&i.type==="mousedown"&&i.button!==0)&&!o.props.isDisabled){var a=o.props,s=a.isMulti,l=a.menuIsOpen;o.focusInput(),l?(o.setState({inputIsHiddenAfterUpdate:!s}),o.onMenuClose()):o.openMenu("first"),i.preventDefault(),i.stopPropagation()}},o.onClearIndicatorMouseDown=function(i){i&&i.type==="mousedown"&&i.button!==0||(o.clearValue(),i.stopPropagation(),o.openAfterFocus=!1,i.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(i){typeof o.props.closeMenuOnScroll=="boolean"?i.target instanceof HTMLElement&&ri(i.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(i)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(i){var a=i.touches,s=a&&a.item(0);!s||(o.initialTouchX=s.clientX,o.initialTouchY=s.clientY,o.userIsDragging=!1)},o.onTouchMove=function(i){var a=i.touches,s=a&&a.item(0);if(!!s){var l=Math.abs(s.clientX-o.initialTouchX),c=Math.abs(s.clientY-o.initialTouchY),u=5;o.userIsDragging=l>u||c>u}},o.onTouchEnd=function(i){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(i.target)&&o.menuListRef&&!o.menuListRef.contains(i.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(i){o.userIsDragging||o.onControlMouseDown(i)},o.onClearIndicatorTouchEnd=function(i){o.userIsDragging||o.onClearIndicatorMouseDown(i)},o.onDropdownIndicatorTouchEnd=function(i){o.userIsDragging||o.onDropdownIndicatorMouseDown(i)},o.handleInputChange=function(i){var a=i.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(a,{action:"input-change"}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(i){o.props.onFocus&&o.props.onFocus(i),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(i){if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(i),o.onInputChange("",{action:"input-blur"}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(i){o.blockOptionHover||o.state.focusedOption===i||o.setState({focusedOption:i})},o.shouldHideSelectedOptions=function(){return yc(o.props)},o.onKeyDown=function(i){var a=o.props,s=a.isMulti,l=a.backspaceRemovesValue,c=a.escapeClearsValue,u=a.inputValue,f=a.isClearable,d=a.isDisabled,p=a.menuIsOpen,m=a.onKeyDown,b=a.tabSelectsValue,v=a.openMenuOnFocus,S=o.state,C=S.focusedOption,P=S.focusedValue,F=S.selectValue;if(!d&&!(typeof m=="function"&&(m(i),i.defaultPrevented))){switch(o.blockOptionHover=!0,i.key){case"ArrowLeft":if(!s||u)return;o.focusValue("previous");break;case"ArrowRight":if(!s||u)return;o.focusValue("next");break;case"Delete":case"Backspace":if(u)return;if(P)o.removeValue(P);else{if(!l)return;s?o.popValue():f&&o.clearValue()}break;case"Tab":if(o.isComposing||i.shiftKey||!p||!b||!C||v&&o.isOptionSelected(C,F))return;o.selectOption(C);break;case"Enter":if(i.keyCode===229)break;if(p){if(!C||o.isComposing)return;o.selectOption(C);break}return;case"Escape":p?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close"}),o.onMenuClose()):f&&c&&o.clearValue();break;case" ":if(u)return;if(!p){o.openMenu("first");break}if(!C)return;o.selectOption(C);break;case"ArrowUp":p?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":p?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!p)return;o.focusOption("pageup");break;case"PageDown":if(!p)return;o.focusOption("pagedown");break;case"Home":if(!p)return;o.focusOption("first");break;case"End":if(!p)return;o.focusOption("last");break;default:return}i.preventDefault()}},o.instancePrefix="react-select-"+(o.props.instanceId||++j1),o.state.selectValue=Fl(r.value),o}return cr(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()}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!a&&o.isDisabled||l&&s&&!o.menuIsOpen)&&this.focusInput(),l&&a&&!o.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(ub(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"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,i){this.props.onInputChange(o,i)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(o){var i=this,a=this.state,s=a.selectValue,l=a.isFocused,c=this.buildFocusableOptions(),u=o==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(s[0]);f>-1&&(u=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u]},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(o){var i=this.state,a=i.selectValue,s=i.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var c=a.length-1,u=-1;if(!!a.length){switch(o){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:a[u]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(!!s.length){var l=0,c=s.indexOf(a);a||(c=-1),o==="up"?l=c>0?c-1:s.length-1:o==="down"?l=(c+1)%s.length:o==="pageup"?(l=c-i,l<0&&(l=0)):o==="pagedown"?(l=c+i,l>s.length-1&&(l=s.length-1)):o==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(di):ie(ie({},di),this.props.theme):di}},{key:"getCommonProps",value:function(){var o=this.clearValue,i=this.cx,a=this.getStyles,s=this.getValue,l=this.selectOption,c=this.setValue,u=this.props,f=u.isMulti,d=u.isRtl,p=u.options,m=this.hasValue();return{clearValue:o,cx:i,getStyles:a,getValue:s,hasValue:m,isMulti:f,isRtl:d,options:p,selectOption:l,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,i=o.isClearable,a=o.isMulti;return i===void 0?a:i}},{key:"isOptionDisabled",value:function(o,i){return mc(this.props,o,i)}},{key:"isOptionSelected",value:function(o,i){return vc(this.props,o,i)}},{key:"filterOption",value:function(o,i){return gc(this.props,o,i)}},{key:"formatOptionLabel",value:function(o,i){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(o,{context:i,inputValue:a,selectValue:s})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{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 o=this.props,i=o.isDisabled,a=o.isSearchable,s=o.inputId,l=o.inputValue,c=o.tabIndex,u=o.form,f=this.getComponents(),d=f.Input,p=this.state.inputIsHidden,m=this.commonProps,b=s||this.getElementId("input"),v={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return a?g.createElement(d,T({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:i,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},v)):g.createElement(E1,T({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:mr,onFocus:this.onInputFocus,readOnly:!0,disabled:i,tabIndex:c,form:u,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,i=this.getComponents(),a=i.MultiValue,s=i.MultiValueContainer,l=i.MultiValueLabel,c=i.MultiValueRemove,u=i.SingleValue,f=i.Placeholder,d=this.commonProps,p=this.props,m=p.controlShouldRenderValue,b=p.isDisabled,v=p.isMulti,S=p.inputValue,C=p.placeholder,P=this.state,F=P.selectValue,O=P.focusedValue,k=P.isFocused;if(!this.hasValue()||!m)return S?null:g.createElement(f,T({},d,{key:"placeholder",isDisabled:b,isFocused:k}),C);if(v){var x=F.map(function(H,fe){var W=H===O;return g.createElement(a,T({},d,{components:{Container:s,Label:l,Remove:c},isFocused:W,isDisabled:b,key:"".concat(o.getOptionValue(H)).concat(fe),index:fe,removeProps:{onClick:function(){return o.removeValue(H)},onTouchEnd:function(){return o.removeValue(H)},onMouseDown:function(Y){Y.preventDefault(),Y.stopPropagation()}},data:H}),o.formatOptionLabel(H,"value"))});return x}if(S)return null;var X=F[0];return g.createElement(u,T({},d,{data:X,isDisabled:b}),this.formatOptionLabel(X,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),i=o.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,u=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,T({},a,{innerProps:f,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),i=o.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,u=this.state.isFocused;if(!i||!c)return null;var f={"aria-hidden":"true"};return g.createElement(i,T({},a,{innerProps:f,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator,a=o.IndicatorSeparator;if(!i||!a)return null;var s=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return g.createElement(a,T({},s,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator;if(!i)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,T({},a,{innerProps:c,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,i=this.getComponents(),a=i.Group,s=i.GroupHeading,l=i.Menu,c=i.MenuList,u=i.MenuPortal,f=i.LoadingMessage,d=i.NoOptionsMessage,p=i.Option,m=this.commonProps,b=this.state.focusedOption,v=this.props,S=v.captureMenuScroll,C=v.inputValue,P=v.isLoading,F=v.loadingMessage,O=v.minMenuHeight,k=v.maxMenuHeight,x=v.menuIsOpen,X=v.menuPlacement,H=v.menuPosition,fe=v.menuPortalTarget,W=v.menuShouldBlockScroll,z=v.menuShouldScrollIntoView,Y=v.noOptionsMessage,de=v.onMenuScrollToTop,Ie=v.onMenuScrollToBottom;if(!x)return null;var he=function(_,E){var A=_.type,w=_.data,D=_.isDisabled,I=_.isSelected,j=_.label,U=_.value,Ze=b===w,We=D?void 0:function(){return o.onOptionHover(w)},Qe=D?void 0:function(){return o.selectOption(w)},Ne="".concat(o.getElementId("option"),"-").concat(E),cn={id:Ne,onClick:Qe,onMouseMove:We,onMouseOver:We,tabIndex:-1};return g.createElement(p,T({},m,{innerProps:cn,data:w,isDisabled:D,isSelected:I,key:Ne,label:j,type:A,value:U,isFocused:Ze,innerRef:Ze?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(_.data,"menu"))},te;if(this.hasOptions())te=this.getCategorizedOptions().map(function(y){if(y.type==="group"){var _=y.data,E=y.options,A=y.index,w="".concat(o.getElementId("group"),"-").concat(A),D="".concat(w,"-heading");return g.createElement(a,T({},m,{key:w,data:_,options:E,Heading:s,headingProps:{id:D,data:y.data},label:o.formatGroupLabel(y.data)}),y.options.map(function(I){return he(I,"".concat(A,"-").concat(I.index))}))}else if(y.type==="option")return he(y,"".concat(y.index))});else if(P){var ln=F({inputValue:C});if(ln===null)return null;te=g.createElement(f,m,ln)}else{var Re=Y({inputValue:C});if(Re===null)return null;te=g.createElement(d,m,Re)}var we={minMenuHeight:O,maxMenuHeight:k,menuPlacement:X,menuPosition:H,menuShouldScrollIntoView:z},dt=g.createElement(Vl,T({},m,we),function(y){var _=y.ref,E=y.placerProps,A=E.placement,w=E.maxHeight;return g.createElement(l,T({},m,we,{innerRef:_,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:P,placement:A}),g.createElement(x1,{captureEnabled:S,onTopArrive:de,onBottomArrive:Ie,lockEnabled:W},function(D){return g.createElement(c,T({},m,{innerRef:function(j){o.getMenuListRef(j),D(j)},isLoading:P,maxHeight:w,focusedOption:b}),te)}))});return fe||H==="fixed"?g.createElement(u,T({},m,{appendTo:fe,controlElement:this.controlRef,menuPlacement:X,menuPosition:H}),dt):dt}},{key:"renderFormField",value:function(){var o=this,i=this.props,a=i.delimiter,s=i.isDisabled,l=i.isMulti,c=i.name,u=this.state.selectValue;if(!(!c||s))if(l)if(a){var f=u.map(function(m){return o.getOptionValue(m)}).join(a);return g.createElement("input",{name:c,type:"hidden",value:f})}else{var d=u.length>0?u.map(function(m,b){return g.createElement("input",{key:"i-".concat(b),name:c,type:"hidden",value:o.getOptionValue(m)})}):g.createElement("input",{name:c,type:"hidden"});return g.createElement("div",null,d)}else{var p=u[0]?this.getOptionValue(u[0]):"";return g.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,i=this.state,a=i.ariaSelection,s=i.focusedOption,l=i.focusedValue,c=i.isFocused,u=i.selectValue,f=this.getFocusableOptions();return g.createElement(g1,T({},o,{ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:f}))}},{key:"render",value:function(){var o=this.getComponents(),i=o.Control,a=o.IndicatorsContainer,s=o.SelectContainer,l=o.ValueContainer,c=this.props,u=c.className,f=c.id,d=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,b=this.commonProps=this.getCommonProps();return g.createElement(s,T({},b,{className:u,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:m}),this.renderLiveRegion(),g.createElement(i,T({},b,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:m,menuIsOpen:p}),g.createElement(l,T({},b,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(a,T({},b,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,i){var a=i.prevProps,s=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,c=o.options,u=o.value,f=o.menuIsOpen,d=o.inputValue,p={};if(a&&(u!==a.value||c!==a.options||f!==a.menuIsOpen||d!==a.inputValue)){var m=Fl(u),b=f?V1(o,m):[],v=s?H1(i,m):null,S=U1(i,b);p={selectValue:m,focusedOption:S,focusedValue:v,clearFocusValueOnUpdate:!1}}var C=l!=null&&o!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{};return ie(ie(ie({},p),C),{},{prevProps:o})}}]),n}(J);bc.defaultProps=B1;var z1={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},W1=function(e){var n,r;return r=n=function(o){dr(a,o);var i=hr(a);function a(){var s;lr(this,a);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return s=i.call.apply(i,[this].concat(c)),s.select=void 0,s.state={inputValue:s.props.inputValue!==void 0?s.props.inputValue:s.props.defaultInputValue,menuIsOpen:s.props.menuIsOpen!==void 0?s.props.menuIsOpen:s.props.defaultMenuIsOpen,value:s.props.value!==void 0?s.props.value:s.props.defaultValue},s.onChange=function(f,d){s.callProp("onChange",f,d),s.setState({value:f})},s.onInputChange=function(f,d){var p=s.callProp("onInputChange",f,d);s.setState({inputValue:p!==void 0?p:f})},s.onMenuOpen=function(){s.callProp("onMenuOpen"),s.setState({menuIsOpen:!0})},s.onMenuClose=function(){s.callProp("onMenuClose"),s.setState({menuIsOpen:!1})},s}return cr(a,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(l){return this.props[l]!==void 0?this.props[l]:this.state[l]}},{key:"callProp",value:function(l){if(typeof this.props[l]=="function"){for(var c,u=arguments.length,f=new Array(u>1?u-1:0),d=1;d<u;d++)f[d-1]=arguments[d];return(c=this.props)[l].apply(c,f)}}},{key:"render",value:function(){var l=this,c=this.props;c.defaultInputValue,c.defaultMenuIsOpen,c.defaultValue;var u=Mt(c,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return g.createElement(e,T({},u,{ref:function(d){l.select=d},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),a}(J),n.defaultProps=z1,r},G1=W1(bc),q1=G1;const pi=[{value:"assessing",label:"Assessing"},{value:"bookmarking",label:"Bookmarking"},{value:"classifying",label:"Classifying"},{value:"commenting",label:"Commenting"},{value:"describing",label:"Describing"},{value:"editing",label:"Editing"},{value:"highlighting",label:"Highlighting"},{value:"identifying",label:"Identifying"},{value:"linking",label:"Linking"},{value:"moderating",label:"Moderating"},{value:"questioning",label:"Questioning"},{value:"replying",label:"Replying"},{value:"supplementing",label:"Transcription"}];var Sc=t=>{const e=t.content?pi.find(n=>n.value===t.content):null;return g.createElement("div",{className:"r6o-purposedropdown"},g.createElement(q1,{value:e,onChange:t.onChange,options:pi,isDisabled:!t.editable}))};const Y1=t=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:t.width},g.createElement("metadata",null,"IcoFont Icons"),g.createElement("title",null,"simple-down"),g.createElement("glyph",{glyphName:"simple-down",unicode:"\uEAB2",horizAdvX:"1000"}),g.createElement("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"})),X1=t=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:t.width},g.createElement("metadata",null,"IcoFont Icons"),g.createElement("title",null,"close"),g.createElement("glyph",{glyphName:"close",unicode:"\uEEE4",horizAdvX:"1000"}),g.createElement("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"})),K1=t=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:t.width},g.createElement("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}));var J1=t=>{const[e,n]=Ve(!1),[r,o]=Ve(!1),i=f=>{n(!0),o(!1)},a=f=>{t.onDelete(t.body),o(!1)},s=f=>t.onUpdate(t.body,{...t.body,value:f.target.value}),l=f=>t.onUpdate(t.body,{...t.body,purpose:f.value}),c=t.body.modified||t.body.created,u=t.body.creator&&g.createElement("div",{className:"r6o-lastmodified"},g.createElement("span",{className:"r6o-lastmodified-by"},t.body.creator.name||t.body.creator.id),t.body.created&&g.createElement("span",{className:"r6o-lastmodified-at"},g.createElement(Wd,{datetime:t.env.toClientTime(c),locale:Se.locale()})));return t.readOnly?g.createElement("div",{className:"r6o-widget comment"},g.createElement("div",{className:"r6o-readonly-comment"},t.body.value),u):g.createElement("div",{className:e?"r6o-widget comment editable":"r6o-widget comment"},g.createElement(Zu,{editable:e,content:t.body.value,onChange:s,onSaveAndClose:t.onSaveAndClose}),!e&&u,t.purposeSelector&&g.createElement(Sc,{editable:e,content:t.body.purpose,onChange:l,onSaveAndClose:t.onSaveAndClose}),g.createElement("div",{className:r?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:()=>o(!r)},g.createElement(Y1,{width:12})),r&&g.createElement(ky,{onEdit:i,onDelete:a,onClickOutside:()=>o(!1)}))};const Z1=pi.map(t=>t.value),_c=(t,e)=>{const n=e?Z1.indexOf(t.purpose)>-1:t.purpose=="commenting"||t.purpose=="replying";return t.type==="TextualBody"&&(!Object.prototype.hasOwnProperty.call(t,"purpose")||n)},Ec=(t,e)=>{var n,r;if(e.editable===!0)return!1;if(e.editable===!1)return!0;if(e.editable==="MINE_ONLY"){const o=(n=t.creator)==null?void 0:n.id;return((r=e.env.user)==null?void 0:r.id)!==o}return e.readOnly},Q1=(t,e)=>t||{type:"TextualBody",value:"",purpose:e?"replying":"commenting",draft:!0},Cc=t=>{const e=t.annotation?t.annotation.bodies.filter(l=>_c(l,t.purposeSelector)):[],n=Q1(e.find(l=>l.draft==!0),e.length>1),r=e.filter(l=>l!=n),o=l=>{const c=n.value,u=l.target.value;c.length===0&&u.length>0?t.onAppendBody({...n,value:u}):c.length>0&&u.length===0?t.onRemoveBody(n):t.onUpdateBody(n,{...n,value:u})},i=l=>t.onUpdateBody(n,{...n,purpose:l.value}),a=!t.readOnly&&t.annotation,s=r.length===0||!t.disableReply;return g.createElement(g.Fragment,null,r.map((l,c)=>g.createElement(J1,{key:c,env:t.env,purposeSelector:t.purposeSelector,readOnly:Ec(l,t),body:l,onUpdate:t.onUpdateBody,onDelete:t.onRemoveBody,onSaveAndClose:t.onSaveAndClose})),a&&s&&g.createElement("div",{className:"r6o-widget comment editable"},g.createElement(Zu,{focus:t.focus,content:n.value,editable:!0,placeholder:r.length>0?Se.t("Add a reply..."):t.textPlaceHolder||Se.t("Add a comment..."),onChange:o,onSaveAndClose:()=>t.onSaveAndClose()}),t.purposeSelector&&n.value.length>0&&g.createElement(Sc,{editable:!0,content:n.purpose,onChange:i,onSaveAndClose:()=>t.onSaveAndClose()})))};Cc.disableDelete=(t,e)=>t.bodies.filter(r=>_c(r,e.purposeSelector)).some(r=>Ec(r,e));var Ac=Cc;function wc(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,fr(t,e)}function eS(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function tS(t,e){t.classList?t.classList.add(e):eS(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Oc(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function nS(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Oc(t.className,e):t.setAttribute("class",Oc(t.className&&t.className.baseVal||"",e))}var $c={disabled:!1},xc=g.createContext(null),an="unmounted",ct="exited",ft="entering",It="entered",hi="exiting",ze=function(t){wc(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=ct,i.appearStatus=ft):l=It:r.unmountOnExit||r.mountOnEnter?l=an:l=ct,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===an?{status:ct}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==ft&&a!==It&&(i=ft):(a===ft||a===It)&&(i=hi)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){o===void 0&&(o=!1),i!==null?(this.cancelNextCallback(),i===ft?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:an})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[g.findDOMNode(this),s],c=l[0],u=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!o&&!a||$c.disabled){this.safeSetState({status:It},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:ft},function(){i.props.onEntering(c,u),i.onTransitionEnd(d,function(){i.safeSetState({status:It},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:g.findDOMNode(this);if(!i||$c.disabled){this.safeSetState({status:ct},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:hi},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:ct},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:g.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===an)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=ei(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return g.createElement(xc.Provider,{value:null},typeof a=="function"?a(o,s):g.cloneElement(g.Children.only(a),s))},e}(g.Component);ze.contextType=xc,ze.propTypes={};function Rt(){}ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rt,onEntering:Rt,onEntered:Rt,onExit:Rt,onExiting:Rt,onExited:Rt},ze.UNMOUNTED=an,ze.EXITED=ct,ze.ENTERING=ft,ze.ENTERED=It,ze.EXITING=hi;var rS=ze,oS=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return tS(e,r)})},mi=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return nS(e,r)})},vi=function(t){wc(e,t);function e(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1];r.removeClasses(u,"exit"),r.addClass(u,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],d=f?"appear":"enter";r.addClass(u,d,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],d=f?"appear":"enter";r.removeClasses(u,d),r.addClass(u,d,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",f=c?""+u+s:l[s],d=c?f+"-active":l[s+"Active"],p=c?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:d,doneClassName:p}},r}var n=e.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;i==="appear"&&a==="done"&&c&&(s+=" "+c),a==="active"&&o&&o.scrollTop,s&&(this.appliedClasses[i][a]=s,oS(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,l=a.active,c=a.done;this.appliedClasses[i]={},s&&mi(o,s),l&&mi(o,l),c&&mi(o,c)},n.render=function(){var o=this.props;o.classNames;var i=ei(o,["classNames"]);return g.createElement(rS,T({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(g.Component);vi.defaultProps={classNames:""},vi.propTypes={};var iS=vi;const aS=(t,e)=>e.filter(n=>(n.label?n.label:n).toLowerCase().startsWith(t.toLowerCase())),sS=(t,e)=>e(t);var uS=t=>{const e=$e(),[n,r]=Ve(t.initialValue||""),[o,i]=Ve([]),[a,s]=Ve(null);tt(()=>{t.focus&&e.current.querySelector("input").focus({preventScroll:!0})},[]),tt(()=>{t.onChange&&t.onChange(n)},[n]);const l=d=>{if(typeof t.vocabulary=="function"){const p=sS(d,t.vocabulary);p.then?p.then(i):i(p)}else{const p=aS(d,t.vocabulary);i(p)}},c=()=>{if(a!==null)t.onSubmit(o[a]);else{const d=n.trim();if(d){const p=Array.isArray(t.vocabulary)?t.vocabulary.find(m=>(m.label||m).toLowerCase()===d.toLowerCase()):null;p?t.onSubmit(p):t.onSubmit(d)}}r(""),i([]),s(null)},u=d=>{if(d.which===13)c();else if(d.which===27)t.onCancel&&t.onCancel();else if(o.length>0){if(d.which===38)if(a===null)s(0);else{const p=Math.max(0,a-1);s(p)}else if(d.which===40)if(a===null)s(0);else{const p=Math.min(o.length-1,a+1);s(p)}}else d.which===40&&Array.isArray(t.vocabulary)&&i(t.vocabulary)},f=d=>{const{value:p}=d.target;r(p),s(null),p?l(p):i([])};return g.createElement("div",{ref:e,className:"r6o-autocomplete"},g.createElement("div",null,g.createElement("input",{onKeyDown:u,onChange:f,value:n,placeholder:t.placeholder})),g.createElement("ul",null,o.length>0&&o.map((d,p)=>g.createElement("li",{key:`${d.label?d.label:d}${p}`,onClick:c,onMouseEnter:()=>s(p),style:a===p?{backgroundColor:"#bde4ff"}:{}},d.label?d.label:d))))};const lS=t=>t||{type:"TextualBody",value:"",purpose:"tagging",draft:!0};var Pc=t=>{const e=t.annotation?t.annotation.bodies.filter(f=>f.purpose==="tagging"):[],n=lS(e.slice().reverse().find(f=>f.draft)),r=e.filter(f=>f!=n),[o,i]=Ve(!1),a=f=>d=>{i(o===f?!1:f)},s=f=>{const d=n.value.trim(),p=f.trim();d.length===0&&p.length>0?t.onAppendBody({...n,value:p}):d.length>0&&p.length===0?t.onRemoveBody(n):d!==p&&t.onUpdateBody(n,{...n,value:p})},l=f=>d=>{d.stopPropagation(),t.onRemoveBody(f)},c=f=>{const d=f.uri?{type:"SpecificResource",purpose:"tagging",source:{id:f.uri,label:f.label}}:{type:"TextualBody",purpose:"tagging",value:f.label||f};n.value.trim().length===0?t.onAppendBody(d):t.onUpdateBody(n,d)},u=f=>f.value||f.source.label;return g.createElement("div",{className:"r6o-widget r6o-tag"},r.length>0&&g.createElement("ul",{className:"r6o-taglist"},r.map(f=>g.createElement("li",{key:u(f),onClick:a(f)},g.createElement("span",{className:"r6o-label"},u(f)),!t.readOnly&&g.createElement(iS,{in:o===f,timeout:200,classNames:"r6o-delete"},g.createElement("span",{className:"r6o-delete-wrapper",onClick:l(f)},g.createElement("span",{className:"r6o-delete"},g.createElement(X1,{width:12}))))))),!t.readOnly&&g.createElement(uS,{focus:t.focus,placeholder:t.textPlaceHolder||Se.t("Add tag..."),vocabulary:t.vocabulary||[],onChange:s,onSubmit:c}))};class Dc extends J{constructor(e){super(e),this.element=g.createRef()}renderWidget(e){const n=this.props.widget({annotation:e.annotation,readOnly:e.readOnly,...e.config,onAppendBody:(r,o)=>e.onAppendBody(r,o),onUpdateBody:(r,o,i)=>e.onUpdateBody(r,o,i),onUpsertBody:(r,o,i)=>e.onUpsertBody(r,o,i),onRemoveBody:(r,o)=>e.onRemoveBody(r,o),onBatchModify:(r,o)=>e.onBatchModify(r,o),onSetProperty:(r,o)=>e.onSetProperty(r,o),onAddContext:r=>e.onAddContext(r),onSaveAndClose:()=>e.onSaveAndClose()});for(;this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(n)}componentDidMount(){this.renderWidget(this.props)}componentWillReceiveProps(e){this.element.current&&this.props.annotation!==e.annotation&&this.renderWidget(e)}render(){return g.createElement("div",{ref:this.element,className:"widget"})}}window.React=g,window.ReactDOM=g;const cS={COMMENT:Ac,TAG:Pc},fS=[g.createElement(Ac,null),g.createElement(Pc,null)],dS=t=>{const e=r=>{var o;return typeof r=="function"&&!!((o=r.prototype)!=null&&o.isReactComponent)},n=r=>typeof r=="function"&&(String(r).match(/return .+\(['|"].+['|"],\s*\{/g)||String(r).match(/return .+preact_compat/)||String(r).match(/return .+\.createElement/g));return e(t)||n(t)},pS=t=>{const e=(n,r,o)=>{if(typeof n=="string"||n instanceof String)return g.createElement(cS[n],r);if((o==null?void 0:o.toLowerCase())==="react")return g.createElement(n,r);if((o==null?void 0:o.toLowerCase())==="plainjs")return g.createElement(Dc,{widget:n,config:r});if(dS(n))return g.createElement(n,r);if(typeof n=="function"||n instanceof Function)return g.createElement(Dc,{widget:n,config:r});throw`${n} is not a valid plugin`};if(t.widget){const{widget:n,force:r,...o}=t;return e(n,o,r)}else return e(t)},Tc=14;var Mc=(t,e,n,r)=>{const o=t.getBoundingClientRect();e.className="r6o-editor r6o-arrow-top r6o-arrow-left";const{left:i,top:a,right:s,bottom:l}=n.getBoundingClientRect();if(e.style.top=`${l-o.top+Tc}px`,e.style.left=`${i-o.left}px`,r){const c=e.children[1].getBoundingClientRect(),{innerWidth:u,innerHeight:f}=t.ownerDocument.defaultView;if(c.right>u&&(e.classList.remove("r6o-arrow-left"),e.classList.add("r6o-arrow-right"),e.style.left=`${s-c.width-o.left}px`),c.bottom>f){e.classList.remove("r6o-arrow-top"),e.classList.add("r6o-arrow-bottom");const p=e.children[1].getBoundingClientRect().height;e.style.top=`${a-o.top-p-Tc}px`}const d=e.children[1].getBoundingClientRect();if(d.top<0){e.classList.add("pushed","down"),e.style.top=`${-o.top}px`;const p=l-o.top;d.height-o.top>p&&e.classList.remove("r6o-arrow-bottom")}d.left<0&&(e.classList.add("pushed","right"),e.style.left=`${-o.left}px`),requestAnimationFrame(()=>e.style.opacity=1)}};const kc=t=>{const{top:e,left:n,width:r,height:o}=t.getBoundingClientRect();return`${e}, ${n}, ${r}, ${o}`};class hS extends J{constructor(n){super(n);h(this,"initResizeObserver",()=>{const n=this.props.autoPosition===void 0?!0:this.props.autoPosition;if(window!=null&&window.ResizeObserver){const r=new ResizeObserver(()=>{this.state.dragged||Mc(this.props.wrapperEl,this.element.current,this.props.selectedElement,n)});return r.observe(this.props.wrapperEl),()=>r.disconnect()}else this.state.dragged||Mc(this.props.wrapperEl,this.element.current,this.props.selectedElement,n)});h(this,"creationMeta",n=>{const r={},{user:o}=this.props.env;return o&&(r.creator={},o.id&&(r.creator.id=o.id),o.displayName&&(r.creator.name=o.displayName),r[n.created?"modified":"created"]=this.props.env.getCurrentTimeAdjusted()),r});h(this,"getCurrentAnnotation",()=>this.state.currentAnnotation.clone());h(this,"hasChanges",()=>{var n;return!((n=this.props.annotation)!=null&&n.isEqual(this.state.currentAnnotation))});h(this,"updateCurrentAnnotation",(n,r)=>{this.setState({currentAnnotation:this.state.currentAnnotation.clone(n)},()=>{r?this.onOk():this.props.onChanged&&this.props.onChanged()})});h(this,"onAppendBody",(n,r)=>this.updateCurrentAnnotation({body:[...this.state.currentAnnotation.bodies,{...n,...this.creationMeta(n)}]},r));h(this,"onUpdateBody",(n,r,o)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.map(i=>i===n?{...r,...this.creationMeta(r)}:i)},o));h(this,"onRemoveBody",(n,r)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.filter(o=>o!==n)},r));h(this,"onUpsertBody",(n,r,o)=>{if(n==null&&r!=null)this.onAppendBody(r,o);else if(n!=null&&r!=null)this.onUpdateBody(n,r,o);else if(n!=null&&r==null){const i=this.state.currentAnnotation.bodies.find(a=>a.purpose===n.purpose);i?this.onUpdateBody(i,n,o):this.onAppendBody(n,o)}});h(this,"onBatchModify",(n,r)=>{const o=n.filter(c=>c.action==="upsert"&&c.body).map(c=>({previous:this.state.currentAnnotation.bodies.find(u=>u.purpose===c.body.purpose),updated:{...c.body,...this.creationMeta(c.body)}})),i=n.filter(c=>c.action==="remove").map(c=>c.body),a=[...n.filter(c=>c.action==="append"||c.action==="upsert"&&c.updated&&!c.previous).map(c=>({...c.body,...this.creationMeta(c.body)})),...o.filter(c=>!c.previous).map(c=>c.updated)],s=[...n.filter(c=>c.action==="update"||c.action==="upsert"&&c.updated&&c.previous).map(c=>({previous:c.previous,updated:{...c.updated,...this.creationMeta(c.updated)}})),...o.filter(c=>c.previous)],l=[...this.state.currentAnnotation.bodies.filter(c=>!i.includes(c)).map(c=>{const u=s.find(f=>f.previous===c);return u?u.updated:c}),...a];this.updateCurrentAnnotation({body:l},r)});h(this,"onSetProperty",(n,r)=>{if(["@context","id","type","body","target"].includes(n))throw new Exception(`Cannot set ${n} - not allowed`);if(r)this.updateCurrentAnnotation({[n]:r});else{const i=this.currentAnnotation.clone();delete i[n],this.setState({currentAnnotation:i})}});h(this,"onAddContext",n=>{const{currentAnnotation:r}=this.state,o=Array.isArray(r.context)?r.context:[r.context];o.indexOf(n)<0&&(o.push(n),this.updateCurrentAnnotation({"@context":o}))});h(this,"onCancel",()=>this.props.onCancel(this.props.annotation));h(this,"onOk",()=>{const n=o=>o.clone({body:o.bodies.map(({draft:i,...a})=>a)}),{currentAnnotation:r}=this.state;r.bodies.length===0&&!this.props.allowEmpty?r.isSelection?this.onCancel():this.props.onAnnotationDeleted(this.props.annotation):r.isSelection?this.props.onAnnotationCreated(n(r).toAnnotation()):this.props.onAnnotationUpdated(n(r),this.props.annotation)});h(this,"onDelete",()=>this.props.onAnnotationDeleted(this.props.annotation));this.element=g.createRef(),this.state={currentAnnotation:n.annotation,dragged:!1,selectionBounds:kc(n.selectedElement)}}componentWillReceiveProps(n){var i;const{selectionBounds:r}=this.state,o=kc(n.selectedElement);(i=this.props.annotation)!=null&&i.isEqual(n.annotation)?this.setState({selectionBounds:o}):this.setState({currentAnnotation:n.annotation,selectionBounds:o}),this.props.modifiedTarget!=n.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),r!=o&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}componentDidMount(){this.removeObserver=this.initResizeObserver(),new MutationObserver(()=>{this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}componentWillUnmount(){this.removeObserver&&this.removeObserver()}render(){const{currentAnnotation:n}=this.state,r=this.props.widgets?this.props.widgets.map(pS):fS,o=a=>a.type.disableDelete?a.type.disableDelete(n,{...a.props,readOnly:this.props.readOnly,env:this.props.env}):!1,i=n&&(n.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!n.isSelection&&!r.some(o);return g.createElement(Md,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:()=>this.setState({dragged:!0})},g.createElement("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},g.createElement("div",{className:"r6o-arrow"}),g.createElement("div",{className:"r6o-editor-inner"},r.map((a,s)=>g.cloneElement(a,{key:`${s}`,focus:s===0,annotation:n,readOnly:this.props.readOnly,env:this.props.env,onAppendBody:this.onAppendBody,onUpdateBody:this.onUpdateBody,onRemoveBody:this.onRemoveBody,onUpsertBody:this.onUpsertBody,onBatchModify:this.onBatchModify,onSetProperty:this.onSetProperty,onAddContext:this.onAddContext,onSaveAndClose:this.onOk})),this.props.readOnly?g.createElement("div",{className:"r6o-footer"},g.createElement("button",{className:"r6o-btn close-annotation",onClick:this.onCancel},Se.t("Close"))):g.createElement("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},i&&g.createElement("button",{className:"r6o-btn left delete-annotation",title:Se.t("Delete"),onClick:this.onDelete},g.createElement(K1,{width:12})),g.createElement("button",{className:"r6o-btn outline cancel-annotation",onClick:this.onCancel},Se.t("Cancel")),g.createElement("button",{className:"r6o-btn ok-annotation",onClick:this.onOk},Se.t("Ok"))))))}}var Sr,mS=new Uint8Array(16);function vS(){if(!Sr&&(Sr=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Sr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sr(mS)}var gS=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function yS(t){return typeof t=="string"&&gS.test(t)}for(var ae=[],gi=0;gi<256;++gi)ae.push((gi+256).toString(16).substr(1));function bS(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ae[t[e+0]]+ae[t[e+1]]+ae[t[e+2]]+ae[t[e+3]]+"-"+ae[t[e+4]]+ae[t[e+5]]+"-"+ae[t[e+6]]+ae[t[e+7]]+"-"+ae[t[e+8]]+ae[t[e+9]]+"-"+ae[t[e+10]]+ae[t[e+11]]+ae[t[e+12]]+ae[t[e+13]]+ae[t[e+14]]+ae[t[e+15]]).toLowerCase();if(!yS(n))throw TypeError("Stringified UUID is invalid");return n}function Fc(t,e,n){t=t||{};var r=t.random||(t.rng||vS)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return bS(r)}var SS=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},Ic=SS;const Ar=class{constructor(e,n){h(this,"clone",(e,n)=>new Ar({...this.underlying,...e},{...this.opts,...n}));h(this,"selector",e=>{const{target:n}=this.underlying;if(n.selector)return(Array.isArray(n.selector)?n.selector:[n.selector]).find(o=>o.type===e)});this.underlying=e,this.opts=n}isEqual(e){return(e==null?void 0:e.type)!=="Annotation"?!1:this.underlying===e.underlying?!0:!this.underlying.id||!e.underlying.id?!1:Ic(this.underlying,e.underlying)}get readOnly(){var e;return(e=this.opts)==null?void 0:e.readOnly}get id(){return this.underlying.id}get context(){return this.underlying["@context"]}get type(){return this.underlying.type}get motivation(){return this.underlying.motivation}get body(){return this.underlying.body}get target(){return this.underlying.target}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}set bodies(e){this.underlying.body=e}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}get quote(){var e;return(e=this.selector("TextQuoteSelector"))==null?void 0:e.exact}get start(){var e;return(e=this.selector("TextPositionSelector"))==null?void 0:e.start}get end(){var e;return(e=this.selector("TextPositionSelector"))==null?void 0:e.end}};let Je=Ar;h(Je,"create",e=>{const n={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${Fc()}`,body:[]};return new Ar({...n,...e})});class sn{constructor(e,n){h(this,"clone",e=>{const n=new sn;return n.underlying=JSON.parse(JSON.stringify(this.underlying)),e&&(n.underlying={...n.underlying,...e}),n});h(this,"selector",e=>{const{target:n}=this.underlying;if(n.selector)return(Array.isArray(n.selector)?n.selector:[n.selector]).find(o=>o.type===e)});h(this,"toAnnotation",()=>{const e=Object.assign({},this.underlying,{type:"Annotation",id:`#${Fc()}`});return new Je(e)});this.underlying={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Selection",body:n||[],target:e}}get context(){return this.underlying["@context"]}get type(){return this.underlying.type}get body(){return this.underlying.body}get target(){return this.underlying.target}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}isEqual(e){return e?Ic(this.underlying,e.underlying):!1}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}get quote(){var e;return(e=this.selector("TextQuoteSelector"))==null?void 0:e.exact}get isSelection(){return!0}}let yi=0;var _S=()=>({setServerTime:t=>{const e=Date.now();yi=t-e},getCurrentTimeAdjusted:()=>new Date(Date.now()+yi).toISOString(),toClientTime:t=>Date.parse(t)-yi});const ES=(t,e)=>{if(t){const n=t==="auto"?window.navigator.userLanguage||window.navigator.language:t,r=n.split("-")[0].toLowerCase(),o=[n,r].find(i=>My.includes(i));o||console.warn(`Unsupported locale '${n}'. Falling back to default en.`),Se.init(o,e)}else Se.init(null,e)};class CS{constructor(e,n,r,o,i){h(this,"dragTo",(e,n)=>{this.group.style.display=null,this.opposite=[e,n];const{x:r,y:o,w:i,h:a}=this.bbox;Ea(this.mask,this.env.image,r,o,i,a),Ca(this.rect,r,o,i,a)});h(this,"getBoundingClientRect",()=>this.rect.getBoundingClientRect());h(this,"toSelection",()=>{const{x:e,y:n,w:r,h:o}=this.bbox;return new sn(zr(e,n,r,o,this.env.image,this.config.fragmentUnit))});h(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.mask=null,this.rect=null,this.group=null});this.anchor=[e,n],this.opposite=[e,n],this.config=o,this.env=i,this.group=document.createElementNS(B,"g"),this.mask=_a(i.image,e,n,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=Wr(e,n,2,2),this.rect.setAttribute("class","a9s-selection"),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),r.appendChild(this.group)}get bbox(){const e=this.opposite[0]-this.anchor[0],n=this.opposite[1]-this.anchor[1];return{x:e>0?this.anchor[0]:this.opposite[0],y:n>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(e)),h:Math.max(1,Math.abs(n))}}get element(){return this.rect}}const AS={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},Rc=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,wS=t=>{let e=null;const n=(o,i)=>new MouseEvent(o,{screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,bubbles:!0}),r=o=>{const i=o.changedTouches[0],a=n(AS[o.type],i);i.target.dispatchEvent(a),o.preventDefault(),(o.type==="touchstart"||o.type==="touchmove")&&(e&&clearTimeout(e),e=setTimeout(()=>{const s=n("dblclick",i);i.target.dispatchEvent(s)},800)),o.type==="touchend"&&e&&clearTimeout(e)};t.addEventListener("touchstart",r,!0),t.addEventListener("touchmove",r,!0),t.addEventListener("touchend",r,!0),t.addEventListener("touchcancel",r,!0)},_r="An implementation is missing",OS=Rc();class Nc extends mn{constructor(n,r,o){super();h(this,"enableResponsive",()=>{window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{const n=this.svg.getBoundingClientRect(),{width:r,height:o}=this.svg.viewBox.baseVal;this.scale=Math.max(r/n.width,o/n.height),this.onScaleChanged&&this.onScaleChanged(this.scale)}),this.resizeObserver.observe(this.svg.parentNode))});h(this,"getSVGPoint",n=>{const r=this.svg.createSVGPoint();if(OS){const o=this.svg.getBoundingClientRect(),i=n.clientX-o.x,a=n.clientY-o.y,{left:s,top:l}=this.svg.getBoundingClientRect();return r.x=i+s,r.y=a+l,r.matrixTransform(this.g.getScreenCTM().inverse())}else return r.x=n.offsetX,r.y=n.offsetY,r.matrixTransform(this.g.getCTM().inverse())});h(this,"drawHandle",(n,r)=>{const o=document.createElementNS(B,"g");o.setAttribute("class","a9s-handle");const i=document.createElementNS(B,"g"),a=u=>{const f=document.createElementNS(B,"circle");return f.setAttribute("cx",n),f.setAttribute("cy",r),f.setAttribute("r",u),f.setAttribute("transform-origin",`${n} ${r}`),f},s=this.config.handleRadius||6,l=a(s);l.setAttribute("class","a9s-handle-inner");const c=a(s+1);return c.setAttribute("class","a9s-handle-outer"),i.appendChild(c),i.appendChild(l),o.appendChild(i),o});h(this,"setHandleXY",(n,r,o)=>{const i=n.querySelector(".a9s-handle-inner");i.setAttribute("cx",r),i.setAttribute("cy",o),i.setAttribute("transform-origin",`${r} ${o}`);const a=n.querySelector(".a9s-handle-outer");a.setAttribute("cx",r),a.setAttribute("cy",o),a.setAttribute("transform-origin",`${r} ${o}`)});h(this,"getHandleXY",n=>{const r=n.querySelector(".a9s-handle-outer");return{x:parseFloat(r.getAttribute("cx")),y:parseFloat(r.getAttribute("cy"))}});h(this,"scaleHandle",n=>{const r=n.querySelector(".a9s-handle-inner"),o=n.querySelector(".a9s-handle-outer"),i=this.scale*(this.config.handleRadius||6);r.setAttribute("r",i),o.setAttribute("r",i)});this.svg=n.closest("svg"),this.g=n,this.config=r,this.env=o,this.scale=1;const{image:i}=o;(i instanceof Element||i instanceof HTMLDocument)&&this.enableResponsive()}destroy(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}class bi extends Nc{constructor(n,r,o){super(n,r,o);h(this,"attachListeners",({mouseMove:n,mouseUp:r,dblClick:o})=>{n&&(this.mouseMove=i=>{const{x:a,y:s}=this.getSVGPoint(i);this.started||(this.emit("startSelection",{x:a,y:s}),this.started=!0),n(a,s,i)},this.svg.addEventListener("mousemove",this.mouseMove)),r&&(this.mouseUp=i=>{if(i.button!==0)return;const{x:a,y:s}=this.getSVGPoint(i);r(a,s,i)},document.addEventListener("mouseup",this.mouseUp)),o&&(this.dblClick=i=>{const{x:a,y:s}=this.getSVGPoint(i);o(a,s,i)},document.addEventListener("dblclick",this.dblClick))});h(this,"detachListeners",()=>{this.mouseMove&&this.svg.removeEventListener("mousemove",this.mouseMove),this.mouseUp&&document.removeEventListener("mouseup",this.mouseUp),this.dblClick&&document.removeEventListener("dblclick",this.dblClick)});h(this,"start",(n,r)=>{const{x:o,y:i}=this.getSVGPoint(n),{naturalWidth:a,naturalHeight:s}=this.env.image,l=o<0?0:o>a?a:o,c=i<0?0:i>s?s:i;this.startDrawing(l,c,r,n)});h(this,"startDrawing",n=>{throw new Error(_r)});h(this,"createEditableShape",(n,r)=>{throw new Error(_r)});this.started=!1}get isDrawing(){throw new Error(_r)}}bi.supports=t=>{throw new Error(_r)};const Lc="An implementation is missing";class Bc extends Nc{constructor(n,r,o,i){super(r,o,i);h(this,"updateState",n=>{throw new Error(Lc)});this.annotation=n}get element(){throw new Error(Lc)}}const $S=/firefox/i.test(navigator.userAgent),Vc=(t,e,n,r,o)=>{t.setAttribute("width",r),t.setAttribute("height",o),$S?(t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("transform",`translate(${e}, ${n})`)):(t.setAttribute("x",e),t.setAttribute("y",n))},xS=(t,e)=>{const{x:n,y:r,width:o,height:i}=e.getBBox(),a=document.createElementNS(B,"svg");a.setAttribute("class","a9s-formatter-el"),Vc(a,n,r,o,i);const s=document.createElementNS(B,"g");s.appendChild(t),a.appendChild(s),e.append(a)},Si=(t,e,n)=>{if(!n)return t;const r=n.reduce((s,l)=>{const c=l(e);if(!c)return s;if(typeof c=="string"||c instanceof String)s.className=s.className?`${s.className} ${c}`:c;else if(c.nodeType===Node.ELEMENT_NODE)s.elements=s.elements?[...s.elements,c]:[c];else{const{className:u,style:f,element:d}=c;u&&(s.className=s.className?`${s.className} ${u}`:u),f&&(s.style=s.style?`${s.style} ${f}`:f),d&&(s.elements=s.elements?[...s.elements,d]:[d])}for(const u in c)c.hasOwnProperty(u)&&u.startsWith("data-")&&(s[u]=c[u]);return s},{}),{className:o,style:i,elements:a}=r;if(o&>(t,o),i){const s=t.querySelector(".a9s-outer"),l=t.querySelector(".a9s-inner");s&&l?(s.setAttribute("style","display:none"),l.setAttribute("style",i)):t.setAttribute("style",i)}a&&a.forEach(s=>xS(s,t));for(const s in r)r.hasOwnProperty(s)&&s.startsWith("data-")&&t.setAttribute(s,r[s])},Hc=(t,e,n,r,o)=>{const i=t.querySelector(".a9s-formatter-el");i&&Vc(i,e,n,r,o)},un="corner",Er="edge";class PS extends Bc{constructor(n,r,o,i){super(n,r,o,i);h(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle));h(this,"setSize",(n,r,o,i)=>{Ca(this.rectangle,n,r,o,i),Ea(this.mask,this.env.image,n,r,o,i),Hc(this.elementGroup,n,r,o,i);const[a,s,l,c,u,f,d,p]=this.handles;this.setHandleXY(a,n,r),this.setHandleXY(s,n+o,r),this.setHandleXY(l,n+o,r+i),this.setHandleXY(c,n,r+i),this.enableEdgeControls&&(this.setHandleXY(u,n+o/2,r),this.setHandleXY(f,n+o,r+i/2),this.setHandleXY(d,n+o/2,r+i),this.setHandleXY(p,n,r+i/2))});h(this,"stretchCorners",(n,r,o)=>{const i=this.getHandleXY(r),a=o.x-i.x,s=o.y-i.y,l=a>0?i.x:o.x,c=s>0?i.y:o.y,u=Math.abs(a),f=Math.abs(s);return this.setSize(l,c,u,f),{x:l,y:c,w:u,h:f}});h(this,"stretchEdge",(n,r,o)=>{const i=this.getHandleXY(r),a=Gr(this.rectangle),s=n%2===0,l=s?a.w:o.x-i.x,c=s?o.y-i.y:a.h,u=s?a.x:l>0?i.x:o.x,f=s?c>0?i.y:o.y:a.y,d=Math.abs(l),p=Math.abs(c);return this.setSize(u,f,d,p),{x:u,y:f,w:d,h:p}});h(this,"onGrab",(n,r)=>o=>{if(o.button!==0)return;this.grabbedElem=n,this.grabbedType=r;const i=this.getSVGPoint(o),{x:a,y:s}=Gr(this.rectangle);this.mouseOffset={x:i.x-a,y:i.y-s}});h(this,"onMouseMove",n=>{if(n.button!==0)return;const r=(o,i)=>o<0?0:o>i?i:o;if(this.grabbedElem){const o=this.getSVGPoint(n);if(this.grabbedElem===this.rectangle){const{w:i,h:a}=Gr(this.rectangle),{naturalWidth:s,naturalHeight:l}=this.env.image,c=r(o.x-this.mouseOffset.x,s-i),u=r(o.y-this.mouseOffset.y,l-a);this.setSize(c,u,i,a),this.emit("update",zr(c,u,i,a,this.env.image,this.config.fragmentUnit))}else{const i=this.handles.indexOf(this.grabbedElem),a=this.handles[i^2],{x:s,y:l,w:c,h:u}=this.grabbedType===un?this.stretchCorners(i,a,o):this.stretchEdge(i,a,o);this.emit("update",zr(s,l,c,u,this.env.image,this.config.fragmentUnit))}}});h(this,"onMouseUp",n=>{this.grabbedElem=null,this.grabbedType=null,this.mouseOffset=null});h(this,"updateState",n=>{const{x:r,y:o,w:i,h:a}=vn(n,this.env.image);this.setSize(r,o,i,a)});this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp);const{x:a,y:s,w:l,h:c}=vn(n,i.image);this.containerGroup=document.createElementNS(B,"g"),this.mask=_a(i.image,a,s,l,c),this.mask.setAttribute("class","a9s-selection-mask"),this.containerGroup.appendChild(this.mask),this.elementGroup=document.createElementNS(B,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.setAttribute("data-id",n.id),this.rectangle=Wr(a,s,l,c),this.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.rectangle)),this.elementGroup.appendChild(this.rectangle),this.enableEdgeControls=o.enableEdgeControls;const u=this.enableEdgeControls?[[a+l/2,s,Er],[a+l,s+c/2,Er],[a+l/2,s+c,Er],[a,s+c/2,Er]]:[];this.handles=[[a,s,un],[a+l,s,un],[a+l,s+c,un],[a,s+c,un],...u].map(f=>{const[d,p,m]=f,b=this.drawHandle(d,p);return b.addEventListener("mousedown",this.onGrab(b,m)),this.elementGroup.appendChild(b),b}),this.containerGroup.appendChild(this.elementGroup),r.appendChild(this.containerGroup),Si(this.rectangle,n,o.formatters),this.grabbedElem=null,this.grabbedType=null,this.mouseOffset=null}get element(){return this.elementGroup}destroy(){this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}}class Cr extends bi{constructor(n,r,o){super(n,r,o);h(this,"startDrawing",(n,r)=>{this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp}),this.rubberband=new CS(n,r,this.g,this.config,this.env)});h(this,"stop",()=>{this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)});h(this,"onMouseMove",(n,r)=>{const{naturalWidth:o,naturalHeight:i}=this.env.image,a=Math.min(Math.max(n,0),o),s=Math.min(Math.max(r,0),i);this.rubberband.dragTo(a,s)});h(this,"onMouseUp",()=>{this.detachListeners(),this.started=!1;const{width:n,height:r}=this.rubberband.getBoundingClientRect(),o=this.config.minSelectionWidth||4,i=this.config.minSelectionHeight||4;if(n>=o&&r>=i){const{element:a}=this.rubberband;a.annotation=this.rubberband.toSelection(),this.emit("complete",a)}else this.emit("cancel");this.stop()});h(this,"createEditableShape",(n,r)=>new PS(n,this.g,{...this.config,formatters:r},this.env));this.rubberband=null}get isDrawing(){return this.rubberband!=null}}Cr.identifier="rect",Cr.supports=t=>{const e=t.selector("FragmentSelector");return e==null?void 0:e.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};class Uc{constructor(e,n){h(this,"redraw",()=>{this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)});h(this,"destroy",()=>this.mask.parentNode.removeChild(this.mask));this.w=e.naturalWidth,this.h=e.naturalHeight,this.polygon=n,this.mask=document.createElementNS(B,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}get element(){return this.mask}}class DS{constructor(e,n,r){h(this,"setPoints",e=>{const n=e.map(r=>`${r[0]},${r[1]}`).join(" ");this.outer.setAttribute("points",n),this.inner.setAttribute("points",n)});h(this,"getBoundingClientRect",()=>this.outer.getBoundingClientRect());h(this,"dragTo",e=>{this.group.style.display=null,this.mousepos=e;const n=[...this.points,e];this.setPoints(n),this.mask.redraw()});h(this,"addPoint",()=>{const[e,n]=this.mousepos,r=this.points[this.points.length-1];Math.pow(e-r[0],2)+Math.pow(n-r[1],2)>4&&(this.points=[...this.points,this.mousepos],this.setPoints(this.points),this.mask.redraw())});h(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.polygon=null,this.group=null});h(this,"toSelection",()=>new sn(Yr(this.group,this.env.image)));this.points=[e],this.env=r,this.mousepos=e,this.group=document.createElementNS(B,"g"),this.polygon=document.createElementNS(B,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(B,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(B,"polygon"),this.inner.setAttribute("class","a9s-inner"),this.setPoints(this.points),this.mask=new Uc(r.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),n.appendChild(this.group)}get element(){return this.polygon}}const _i=t=>{const e=t.querySelector(".a9s-inner").points,n=[];for(let r=0;r<e.numberOfItems;r++)n.push(e.getItem(r));return n},TS=t=>t.querySelector(".a9s-inner").getBBox();class MS extends Bc{constructor(n,r,o,i){super(n,r,o,i);h(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle));h(this,"setPoints",n=>{const r=f=>Math.round(10*f)/10,o=n.map(f=>`${r(f.x)},${r(f.y)}`).join(" ");this.shape.querySelector(".a9s-inner").setAttribute("points",o);const a=this.shape.querySelector(".a9s-outer");a.setAttribute("points",o),this.mask.redraw();const{x:s,y:l,width:c,height:u}=a.getBBox();Hc(this.elementGroup,s,l,c,u)});h(this,"onGrab",n=>r=>{r.button===0&&(this.grabbedElem=n,this.grabbedAt=this.getSVGPoint(r))});h(this,"onMouseMove",n=>{const r=(o,i,a)=>o+i<0?-o:o+i>a?a-o:i;if(this.grabbedElem){const o=this.getSVGPoint(n);if(this.grabbedElem===this.shape){const{x:i,y:a,width:s,height:l}=TS(this.shape),{naturalWidth:c,naturalHeight:u}=this.env.image,f=r(i,o.x-this.grabbedAt.x,c-s),d=r(a,o.y-this.grabbedAt.y,u-l),p=_i(this.shape).map(m=>({x:m.x+f,y:m.y+d}));this.grabbedAt=o,this.setPoints(p),p.forEach((m,b)=>this.setHandleXY(this.handles[b],m.x,m.y)),this.emit("update",Yr(this.shape,this.env.image))}else{const i=this.handles.indexOf(this.grabbedElem),a=_i(this.shape).map((s,l)=>l===i?o:s);this.setPoints(a),this.setHandleXY(this.handles[i],o.x,o.y),this.emit("update",Yr(this.shape,this.env.image))}}});h(this,"onMouseUp",n=>{this.grabbedElem=null,this.grabbedAt=null});h(this,"updateState",n=>{const r=qr(n).getAttribute("points").split(" ").map(o=>{const[i,a]=o.split(",").map(s=>parseFloat(s.trim()));return{x:i,y:a}});this.setPoints(r),r.forEach((o,i)=>this.setHandleXY(this.handles[i],o.x,o.y))});h(this,"destroy",()=>{this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()});this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp),this.containerGroup=document.createElementNS(B,"g"),this.shape=wa(n),this.shape.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.shape)),this.mask=new Uc(i.image,this.shape.querySelector(".a9s-inner")),this.containerGroup.appendChild(this.mask.element),this.elementGroup=document.createElementNS(B,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.setAttribute("data-id",n.id),this.elementGroup.appendChild(this.shape),this.handles=_i(this.shape).map(a=>{const s=this.drawHandle(a.x,a.y);return s.addEventListener("mousedown",this.onGrab(s)),this.elementGroup.appendChild(s),s}),this.containerGroup.appendChild(this.elementGroup),r.appendChild(this.containerGroup),Si(this.shape,n,o.formatters),this.grabbedElem=null,this.grabbedAt=null}get element(){return this.elementGroup}}class Ei extends bi{constructor(n,r,o){super(n,r,o);h(this,"startDrawing",(n,r,o)=>{this._isDrawing=!0,this._startOnSingleClick=o,this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp,dblClick:this.onDblClick}),this.rubberband=new DS([n,r],this.g,this.env)});h(this,"stop",()=>{this.detachListeners(),this._isDrawing=!1,this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)});h(this,"onMouseMove",(n,r)=>this.rubberband.dragTo([n,r]));h(this,"onMouseUp",()=>{const{width:n,height:r}=this.rubberband.getBoundingClientRect(),o=this.config.minSelectionWidth||4,i=this.config.minSelectionHeight||4;n>=o||r>=i?this.rubberband.addPoint():this._startOnSingleClick||(this.emit("cancel"),this.stop())});h(this,"onDblClick",()=>{this._isDrawing=!1;const n=this.rubberband.element;n.annotation=this.rubberband.toSelection(),this.emit("complete",n),this.stop()});h(this,"createEditableShape",(n,r)=>new MS(n,this.g,{...this.config,formatters:r},this.env));this._isDrawing=!1,this._startOnSingleClick=!1}get isDrawing(){return this._isDrawing}}Ei.identifier="polygon",Ei.supports=t=>{var n;const e=t.selector("SvgSelector");if(e)return(n=e.value)==null?void 0:n.match(/^<svg.*<polygon/g)};class kS extends mn{constructor(n,r,o){super();h(this,"listTools",()=>this._registered.map(n=>n.identifier));h(this,"registerTool",n=>{const r=n.identifier;this.listTools().includes(r)&&this.unregisterTool(r),this._registered.unshift(n)});h(this,"unregisterTool",n=>this._registered=this._registered.filter(r=>r.identifier!==n));h(this,"setCurrent",n=>{this._current&&this._current.destroy();const r=typeof n=="string"||n instanceof String?this._registered.find(o=>o.identifier===n):n;this._current=new r(this._g,this._config,this._env),this._current.on("startSelection",o=>this.emit("startSelection",o)),this._current.on("complete",o=>this.emit("complete",o)),this._current.on("cancel",o=>this.emit("cancel",o))});h(this,"forAnnotation",n=>{var s;const[r,...o]=n.targets,i=(s=r.renderedVia)==null?void 0:s.name,a=i?this._registered.find(l=>l.identifier===i):this._registered.find(l=>l.supports(n));return a?new a(this._g,this._config,this._env):null});this._g=n,this._config=r,this._env=o,this._registered=[Cr,Ei],this.setCurrent(Cr)}get current(){return this._current}}class FS{constructor(e,n,r){this.svg=e.closest("svg"),this.g=document.createElementNS(B,"g"),this.g.setAttribute("class","a9s-crosshair");const o=document.createElementNS(B,"line"),i=document.createElementNS(B,"line");this.g.appendChild(o),this.g.appendChild(i),e.appendChild(this.g);const a=s=>{const l=this.svg.getBoundingClientRect(),c=s.clientX-l.x,u=s.clientY-l.y,f=this.svg.createSVGPoint(),{left:d,top:p}=this.svg.getBoundingClientRect();return f.x=c+d,f.y=u+p,f.matrixTransform(e.getScreenCTM().inverse())};this.svg.parentElement.addEventListener("pointermove",s=>{const{x:l,y:c}=a(s);o.setAttribute("x1",0),o.setAttribute("y1",c),o.setAttribute("x2",n),o.setAttribute("y2",c),i.setAttribute("x1",l),i.setAttribute("y1",0),i.setAttribute("x2",l),i.setAttribute("y2",r)})}}const jc=(t,e)=>{const r=(Sa(e,".a9s-annotation")?e:e.closest(".a9s-annotation")).querySelector(".a9s-outer"),o=t.naturalWidth/t.width,i=t.naturalHeight/t.height,a=t.getBoundingClientRect(),s=r.getBoundingClientRect(),l=s.x-a.x,c=s.y-a.y,{width:u,height:f}=s,d=document.createElement("CANVAS"),p=d.getContext("2d");return d.width=u*o,d.height=f*i,p.drawImage(t,l*o,c*i,u*o,f*i,0,0,u*o,f*i),{snippet:d,transform:m=>{const b=l*o+m[0],v=c*i+m[1];return[b,v]}}},zc=Rc();class IS extends mn{constructor(n){super();h(this,"_attachMouseListeners",(n,r)=>{n.addEventListener("mouseenter",()=>{var o,i;(i=(o=this.tools)==null?void 0:o.current)!=null&&i.isDrawing||(this.currentHover!==n&&this.emit("mouseEnterAnnotation",r,n),this.currentHover=n)}),n.addEventListener("mouseleave",()=>{var o,i;(i=(o=this.tools)==null?void 0:o.current)!=null&&i.isDrawing||(this.emit("mouseLeaveAnnotation",r,n),this.currentHover=null)}),zc&&(n.addEventListener("touchstart",o=>{o.stopPropagation(),this.currentHover=n}),n.addEventListener("touchend",o=>{const{clientX:i,clientY:a}=o.changedTouches[0],s=document.elementFromPoint(i,a);o.stopPropagation(),n.contains(s)&&(this.currentHover=n,this.selectCurrentHover())}))});h(this,"_lazy",n=>{this.imageEl.naturalWidth?n():this.imageEl.addEventListener("load",()=>n())});h(this,"_onMouseDown",n=>{var r,o;n.button===0&&(this.readOnly||this.selectedShape||this.tools.current.isDrawing?!((o=(r=this.tools)==null?void 0:r.current)!=null&&o.isDrawing)&&this.selectedShape!==this.currentHover&&this.selectCurrentHover():this.tools.current.start(n,this.drawOnSingleClick&&!this.currentHover))});h(this,"_refreshNonScalingAnnotations",()=>{const n=this.getCurrentScale();n!==1/0&&Array.from(this.svg.querySelectorAll(".a9s-non-scaling")).forEach(r=>{r.setAttribute("transform",`scale(${n})`)})});h(this,"_scaleFormatterElements",n=>{const r=this.getCurrentScale();if(r!==1/0)if(n){const o=n.querySelector(".a9s-formatter-el");o&&o.firstChild.setAttribute("transform",`scale(${r})`)}else Array.from(this.g.querySelectorAll(".a9s-formatter-el")).forEach(i=>i.firstChild.setAttribute("transform",`scale(${r})`))});h(this,"addAnnotation",n=>{const r=Mf(n,this.imageEl);return gt(r,"a9s-annotation"),r.setAttribute("data-id",n.id),r.annotation=n,this._attachMouseListeners(r,n),this.g.appendChild(r),Si(r,n,this.formatters),this._scaleFormatterElements(r),r});h(this,"addDrawingTool",n=>{var r;return(r=this.tools)==null?void 0:r.registerTool(n)});h(this,"addOrUpdateAnnotation",(n,r)=>{this.selectedShape&&(this.selectedShape.annotation.isEqual(n)||this.selectedShape.annotation.isEqual(r))&&(this.deselect(),this.emit("select",{})),r&&this.removeAnnotation(r),this.removeAnnotation(n);const o=this.addAnnotation(n);Sa(o,"a9s-non-scaling")&&o.setAttribute("transform",`scale(${this.getCurrentScale()})`),this.redraw()});h(this,"deselect",n=>{var r;if(this.selectedShape){(r=this.tools)==null||r.current.stop();const{annotation:o}=this.selectedShape;this.selectedShape.destroy?(this.selectedShape.destroy(),this.selectedShape=null,o.isSelection||(this.addAnnotation(o),n||this.redraw())):(gf(this.selectedShape,"selected"),this.selectedShape=null)}});h(this,"destroy",()=>{this.deselect(),this.currentHover=null,this.svg.parentNode.removeChild(this.svg)});h(this,"findShape",n=>{const r=n!=null&&n.id?n.id:n;return this.g.querySelector(`.a9s-annotation[data-id="${r}"]`)});h(this,"getAnnotations",()=>Array.from(this.g.querySelectorAll(".a9s-annotation")).map(r=>r.annotation));h(this,"getCurrentScale",()=>{const n=this.svg.getBoundingClientRect(),{width:r,height:o}=this.svg.viewBox.baseVal;return Math.max(r/n.width,o/n.height)});h(this,"getSelectedImageSnippet",()=>{if(this.selectedShape){const n=this.selectedShape.element||this.selectedShape;return jc(this.imageEl,n)}});h(this,"init",n=>{this.deselect(),this.currentHover=null,Array.from(this.g.querySelectorAll(".a9s-annotation")).forEach(o=>this.g.removeChild(o)),this._lazy(()=>{n.sort((o,i)=>Sn(i,this.imageEl)-Sn(o,this.imageEl)),n.forEach(this.addAnnotation)}),this._refreshNonScalingAnnotations()});h(this,"listDrawingTools",()=>{var n;return(n=this.tools)==null?void 0:n.listTools()});h(this,"overrideId",(n,r)=>{const o=this.findShape(n);o.setAttribute("data-id",r);const{annotation:i}=o,a=i.clone({id:r});return o.annotation=a,a});h(this,"redraw",()=>{const n=Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")),r=n.map(o=>o.annotation);r.sort((o,i)=>Sn(i,this.imageEl)-Sn(o,this.imageEl)),n.forEach(o=>this.g.removeChild(o)),r.forEach(this.addAnnotation)});h(this,"removeAnnotation",n=>{var i,a,s;const r=n.type?n.id:n;((i=this.selectedShape)==null?void 0:i.annotation.id)===r&&this.deselect();const o=this.findShape(n);o&&(((a=this.selectedShape)==null?void 0:a.annotation)===o.annotation&&this.deselect(),((s=this.currentHover)==null?void 0:s.annotation)===o.annotation&&(this.currentHover=null),o.parentNode.removeChild(o))});h(this,"removeDrawingTool",n=>{var r;return(r=this.tools)==null?void 0:r.unregisterTool(n)});h(this,"selectAnnotation",(n,r)=>{this.selectedShape&&this.deselect();const o=this.findShape(n);if(o){this.selectShape(o,r);const i=this.selectedShape.element?this.selectedShape.element:this.selectedShape;return{annotation:o.annotation,element:i}}else this.deselect()});h(this,"selectCurrentHover",()=>{this.currentHover?this.disableSelect?this.emit("clickAnnotation",this.currentHover.annotation,this.currentHover):this.selectShape(this.currentHover):(this.deselect(),this.emit("select",{skipEvent:!0}))});h(this,"selectShape",(n,r)=>{var a;if(!r&&!n.annotation.isSelection&&this.emit("clickAnnotation",n.annotation,n),((a=this.selectedShape)==null?void 0:a.annotation)===n.annotation)return;this.selectedShape&&this.selectedShape.annotation!==n.annotation&&this.deselect(!0);const{annotation:o}=n;if(this.readOnly||o.readOnly)gt(n,"selected"),this.selectedShape=n,r||this.emit("select",{annotation:o,element:n,skipEvent:r});else{const s=this.tools.forAnnotation(o);s?(n.parentNode.removeChild(n),this.selectedShape=s.createEditableShape(o,this.formatters),this.selectedShape.element.annotation=o,this._scaleFormatterElements(this.selectedShape.element),this.selectedShape.on("update",l=>{this.selectedShape&&this.emit("updateTarget",this.selectedShape.element,l)}),setTimeout(()=>{var l;this.selectedShape!=null&&this._attachMouseListeners(this.selectedShape.element,o),r||(this.currentHover=(l=this.selectedShape)==null?void 0:l.element)},1)):this.selectedShape=n,r||this.emit("select",{annotation:o,element:this.selectedShape.element||this.selectedShape})}});h(this,"setDrawingTool",n=>{var r;this.tools&&((r=this.tools.current)==null||r.stop(),this.tools.setCurrent(n))});h(this,"setVisible",n=>{n?this.svg.style.display=null:(this.deselect(),this.svg.style.display="none")});h(this,"stopDrawing",()=>{var n,r;(r=(n=this.tools)==null?void 0:n.current)==null||r.stop()});const{wrapperEl:r,config:o,env:i}=n;this.imageEl=i.image,this.readOnly=o.readOnly,o.formatter?this.formatters=[o.formatter]:o.formatters&&(this.formatters=Array.isArray(o.formatters)?o.formatters:[o.formatters]),this.disableSelect=o.disableSelect,this.drawOnSingleClick=o.drawOnSingleClick,this.svg=document.createElementNS(B,"svg"),this.svg.setAttribute("tabindex",0),zc?(this.svg.setAttribute("class","a9s-annotationlayer touch"),wS(this.svg),this.svg.addEventListener("touchstart",()=>{this.currentHover=null,this.selectCurrentHover()})):this.svg.setAttribute("class","a9s-annotationlayer");const{naturalWidth:a,naturalHeight:s}=this.imageEl;if(!a&&!s){const{width:l,height:c}=this.imageEl;this.svg.setAttribute("viewBox",`0 0 ${l} ${c}`),this.imageEl.nodeName.toLowerCase()!=="img"&&(this.imageEl.naturalWidth=l,this.imageEl.naturalHeight=c),this.imageEl.addEventListener("load",()=>{this.emit("load",this.imageEl.src),this.svg.setAttribute("viewBox",`0 0 ${this.imageEl.naturalWidth} ${this.imageEl.naturalHeight}`)})}else this.svg.setAttribute("viewBox",`0 0 ${a} ${s}`);this.g=document.createElementNS(B,"g"),this.svg.appendChild(this.g),r.appendChild(this.svg),o.crosshair&&(this.crosshair=new FS(this.g,a,s),gt(this.svg,"no-cursor")),this.selectedShape=null,this.tools=new kS(this.g,o,i),this.tools.on("startSelection",l=>this.emit("startSelection",l)),this.tools.on("cancel",this.selectCurrentHover),this.tools.on("complete",this.selectShape),this.svg.addEventListener("mousedown",this._onMouseDown),this.currentHover=null,window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{this._refreshNonScalingAnnotations(),this._scaleFormatterElements()}),this.resizeObserver.observe(this.svg.parentNode))}}var ZE="",RS=0;function Wc(t,e,n,r,o){var i,a,s={};for(a in e)a=="ref"?i=e[a]:s[a]=e[a];var l={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--RS,__source:r,__self:o};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)s[a]===void 0&&(s[a]=i[a]);return $.vnode&&$.vnode(l),l}class NS extends J{constructor(n){super(n);h(this,"clearState",n=>this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},n));h(this,"forwardEvent",(n,r)=>{this.annotationLayer.on(n,(o,i)=>{this.props[r](o.clone(),i)})});h(this,"onKeyUp",n=>{if(n.which===27){this.annotationLayer.stopDrawing();const{selectedAnnotation:r}=this.state;r&&(this.cancelSelected(),this.props.onCancelSelected(r))}else if(n.which===46){const{disableDeleteKey:r}=this.props.config;if(!r){const{selectedAnnotation:o}=this.state;o&&(o.isSelection?this.onCancelAnnotation(o):this.onDeleteAnnotation(o))}}});h(this,"handleStartSelect",n=>this.props.onSelectionStarted(n));h(this,"handleSelect",(n,r)=>{this.state.editorDisabled?this.onHeadlessSelect(n,r):this.onNormalSelect(n,r)});h(this,"onNormalSelect",(n,r)=>{const{annotation:o,element:i}=n;if(o){const a=l=>{this.setState({selectedAnnotation:o,selectedDOMElement:i,modifiedTarget:null,beforeHeadlessModify:null},()=>{r||(o.isSelection?this.props.onSelectionCreated(o.clone()):this.props.onAnnotationSelected(o.clone(),i)),l&&l()})},{selectedAnnotation:s}=this.state;s&&!s.isEqual(o)?this.clearState(()=>{this.props.onCancelSelected(s.clone()),a(()=>this.props.onChangeSelected(o.clone(),s.clone()))}):a()}else{const{selectedAnnotation:a}=this.state;a?this.clearState(()=>{this.props.onCancelSelected(a)}):this.clearState()}});h(this,"onHeadlessSelect",(n,r)=>{this.saveSelected().then(()=>{this.onNormalSelect(n,r);const{annotation:o}=n;if(o&&!o.isSelection){const i=this.annotationLayer.selectAnnotation(n.annotation,!0);this.setState({selectedDOMElement:i.element})}})});h(this,"handleUpdateTarget",(n,r)=>{this.setState({selectedDOMElement:n,modifiedTarget:r});const o=JSON.parse(JSON.stringify(r));this.props.onSelectionTargetChanged(o)});h(this,"overrideAnnotationId",n=>r=>{const{id:o}=n;this.state.selectedAnnotation?this.clearState(()=>{this.annotationLayer.overrideId(o,r)}):this.annotationLayer.overrideId(o,r)});h(this,"onCreateOrUpdateAnnotation",(n,r)=>(o,i)=>{let a=o.isSelection?o.toAnnotation():o;a=this.state.modifiedTarget?a.clone({target:this.state.modifiedTarget}):a.clone(),this.clearState(()=>{this.annotationLayer.deselect(),this.annotationLayer.addOrUpdateAnnotation(a,i),i?this.props[n](a,i.clone()):this.props[n](a,this.overrideAnnotationId(a)),r&&r()})});h(this,"onDeleteAnnotation",n=>{this.clearState(),this.annotationLayer.removeAnnotation(n),this.props.onAnnotationDeleted(n)});h(this,"onCancelAnnotation",(n,r)=>{this.annotationLayer.deselect(),this.props.onCancelSelected(n),this.clearState(r)});h(this,"addAnnotation",n=>this.annotationLayer.addOrUpdateAnnotation(n.clone()));h(this,"addDrawingTool",n=>this.annotationLayer.addDrawingTool(n));h(this,"cancelSelected",()=>new Promise(n=>{this.annotationLayer.deselect(),this.state.selectedAnnotation?this.clearState(n):n()}));h(this,"getAnnotationById",n=>{var r;return(r=this.annotationLayer.findShape(n))==null?void 0:r.annotation});h(this,"getAnnotations",()=>this.annotationLayer.getAnnotations().map(n=>n.clone()));h(this,"getImageSnippetById",n=>{const r=this.annotationLayer.findShape(n);if(r)return jc(this.props.env.image,r)});h(this,"getSelected",()=>{var n;if(this.state.selectedAnnotation)return this.state.editorDisabled?this.state.selectedAnnotation:(n=this._editor.current)==null?void 0:n.getCurrentAnnotation()});h(this,"getSelectedImageSnippet",()=>this.annotationLayer.getSelectedImageSnippet());h(this,"listDrawingTools",()=>this.annotationLayer.listDrawingTools());h(this,"removeAnnotation",n=>{this.annotationLayer.removeAnnotation(n),this.state.selectedAnnotation&&this.setState({selectedAnnotation:null})});h(this,"removeDrawingTool",n=>this.annotationLayer.removeDrawingTool(n));h(this,"saveSelected",()=>new Promise(n=>{const r=this.state.selectedAnnotation;if(r)if(this._editor.current)this._editor.current.onOk(),n();else if(r.isSelection)r.bodies.length>0||this.props.config.allowEmpty?this.onCreateOrUpdateAnnotation("onAnnotationCreated",n)(r):(this.annotationLayer.deselect(),n());else{const{beforeHeadlessModify:o,modifiedTarget:i}=this.state;o?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",n)(r,o):i?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",n)(r,r):this.onCancelAnnotation(r,n)}else n()}));h(this,"selectAnnotation",n=>{const r=this.annotationLayer.selectAnnotation(n,!0);if(r)return this.handleSelect(r,!0),r.annotation.clone();this.clearState()});h(this,"setAnnotations",n=>this.annotationLayer.init(n.map(r=>r.clone())));h(this,"setDrawingTool",n=>this.annotationLayer.setDrawingTool(n));h(this,"setVisible",n=>{this.annotationLayer.setVisible(n),n||this.clearState()});h(this,"updateSelected",(n,r)=>new Promise(o=>{this.state.selectedAnnotation&&(r?this.state.selectedAnnotation.isSelection?this.onCreateOrUpdateAnnotation("onAnnotationCreated",o)(n):this.onCreateOrUpdateAnnotation("onAnnotationUpdated",o)(n,this.state.selectedAnnotation):this.setState({selectedAnnotation:n,beforeHeadlessModify:this.state.beforeHeadlessModify||this.state.selectedAnnotation},o))}));this.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:this.props.config.readOnly,editorDisabled:this.props.config.disableEditor,widgets:this.props.config.widgets,beforeHeadlessModify:null},this._editor=g.createRef()}componentDidMount(){this.annotationLayer=new IS(this.props),this.annotationLayer.on("load",this.props.onLoad),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.forwardEvent("clickAnnotation","onClickAnnotation"),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),document.addEventListener("keyup",this.onKeyUp)}componentWillUnmount(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.onKeyUp)}get disableEditor(){return this.state.editorDisabled}set disableEditor(n){this.setState({editorDisabled:n})}get disableSelect(){return this.annotationLayer.disableSelect}set disableSelect(n){this.annotationLayer.disableSelect=n}get formatters(){return this.annotationLayer.formatters}set formatters(n){this.annotationLayer.formatters=n,this.annotationLayer.redraw()}get readOnly(){return this.state.readOnly}set readOnly(n){this.annotationLayer.readOnly=n,this.setState({readOnly:n})}get widgets(){return this.state.widgets}set widgets(n){this.setState({widgets:n})}render(){var o;const n=this.state.selectedAnnotation&&!this.state.editorDisabled,r=this.state.readOnly||((o=this.state.selectedAnnotation)==null?void 0:o.readOnly);return n&&Wc(hS,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:r,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}var QE="";class Gc{constructor(e){h(this,"handleAnnotationCreated",(e,n)=>this._emitter.emit("createAnnotation",e.underlying,n));h(this,"handleAnnotationDeleted",e=>this._emitter.emit("deleteAnnotation",e.underlying));h(this,"handleAnnotationSelected",(e,n)=>this._emitter.emit("selectAnnotation",e.underlying,n));h(this,"handleAnnotationUpdated",(e,n)=>this._emitter.emit("updateAnnotation",e.underlying,n.underlying));h(this,"handleCancelSelected",e=>this._emitter.emit("cancelSelected",e.underlying));h(this,"handleChangeSelected",(e,n)=>this._emitter.emit("changeSelected",e.underlying,n.underlying));h(this,"handleClickAnnotation",(e,n)=>this._emitter.emit("clickAnnotation",e.underlying,n));h(this,"handleLoad",e=>this._emitter.emit("load",e));h(this,"handleSelectionCreated",e=>this._emitter.emit("createSelection",e.underlying));h(this,"handleSelectionStarted",e=>this._emitter.emit("startSelection",e));h(this,"handleSelectionTargetChanged",e=>this._emitter.emit("changeSelectionTarget",e));h(this,"handleMouseEnterAnnotation",(e,n)=>this._emitter.emit("mouseEnterAnnotation",e.underlying,n));h(this,"handleMouseLeaveAnnotation",(e,n)=>this._emitter.emit("mouseLeaveAnnotation",e.underlying,n));h(this,"_wrap",e=>(e==null?void 0:e.type)==="Annotation"?new Je(e):e);h(this,"addAnnotation",(e,n)=>this._app.current.addAnnotation(new Je(e,{readOnly:n})));h(this,"addDrawingTool",e=>this._app.current.addDrawingTool(e));h(this,"cancelSelected",()=>this._app.current.cancelSelected());h(this,"clearAnnotations",()=>this.setAnnotations([]));h(this,"clearAuthInfo",()=>this._env.user=null);h(this,"destroy",()=>{g.unmountComponentAtNode(this._appContainerEl),this._element.parentNode.insertBefore(this._env.image,this._element),this._element.parentNode.removeChild(this._element)});h(this,"getAnnotationById",e=>{const n=this._app.current.getAnnotationById(e);return n==null?void 0:n.underlying});h(this,"getAnnotations",()=>this._app.current.getAnnotations().map(n=>n.underlying));h(this,"getImageSnippetById",e=>this._app.current.getImageSnippetById(e));h(this,"getSelected",()=>{const e=this._app.current.getSelected();return e==null?void 0:e.underlying});h(this,"getSelectedImageSnippet",()=>this._app.current.getSelectedImageSnippet());h(this,"listDrawingTools",()=>this._app.current.listDrawingTools());h(this,"loadAnnotations",e=>fetch(e).then(n=>n.json()).then(n=>(this.setAnnotations(n),n)));h(this,"off",(e,n)=>this._emitter.off(e,n));h(this,"on",(e,n)=>this._emitter.on(e,n));h(this,"once",(e,n)=>this._emitter.once(e,n));h(this,"removeAnnotation",e=>this._app.current.removeAnnotation(this._wrap(e)));h(this,"removeDrawingTool",e=>this._app.current.removeDrawingTool(e));h(this,"saveSelected",()=>this._app.current.saveSelected());h(this,"selectAnnotation",e=>{const n=this._app.current.selectAnnotation(this._wrap(e));return n==null?void 0:n.underlying});h(this,"setAnnotations",e=>{const r=(e||[]).map(o=>new Je(o));this._app.current.setAnnotations(r)});h(this,"setAuthInfo",e=>this._env.user=e);h(this,"setDrawingTool",e=>this._app.current.setDrawingTool(e));h(this,"setServerTime",e=>this._env.setServerTime(e));h(this,"setVisible",e=>this._app.current.setVisible(e));h(this,"updateSelected",(e,n)=>{let r=null;e.type==="Annotation"?r=new Je(e):e.type==="Selection"&&(r=new sn(e.target,e.body)),r&&this._app.current.updateSelected(r,n)});this._app=g.createRef(),this._emitter=new mn,e.disableEditor=e.disableEditor||e.headless;const n=e.image.nodeType?e.image:document.getElementById(e.image);n.style.display="block",this._env=_S(),this._env.image=n,ES(e.locale,e.messages),this._element=document.createElement("DIV"),this._element.style.position="relative",this._element.style.display="inline-block",n.parentNode.insertBefore(this._element,n),this._element.appendChild(n),this._appContainerEl=document.createElement("DIV"),this._element.appendChild(this._appContainerEl),g.render(Wc(NS,{ref:this._app,env:this._env,wrapperEl:this._element,config:e,onSelectionStarted:this.handleSelectionStarted,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onChangeSelected:this.handleChangeSelected,onClickAnnotation:this.handleClickAnnotation,onLoad:this.handleLoad,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this._appContainerEl)}get disableEditor(){return this._app.current.disableEditor}set disableEditor(e){this._app.current.disableEditor=e}get disableSelect(){return this._app.current.disableSelect}set disableSelect(e){this._app.current.disableSelect=e}get formatters(){return this._app.current.formatters||[]}set formatters(e){if(e){const n=Array.isArray(e)?e:[e];this._app.current.formatters=n}else this._app.current.formatters=null}get readOnly(){return this._app.current.readOnly}set readOnly(e){this._app.current.readOnly=e}get widgets(){return this._app.current.widgets}set widgets(e){this._app.current.widgets=e}}const LS=t=>new Gc(t);me.Annotorious=Gc,me.init=LS,Object.defineProperty(me,"__esModule",{value:!0}),me[Symbol.toStringTag]="Module"});
//# sourceMappingURL=annotorious.umd.js.map
