eehitus-building-project-file-ui 0.13.25 → 0.13.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -72,4 +72,4 @@
72
72
  animation-iteration-count: infinite;
73
73
  animation-delay: 200ms;
74
74
  }
75
- `),nS.rippleVisible,cS,550,(({theme:e})=>e.transitions.easing.easeInOut),nS.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),nS.child,nS.childLeaving,uS,550,(({theme:e})=>e.transitions.easing.easeInOut),nS.childPulsate,dS,(({theme:e})=>e.transitions.easing.easeInOut)),hS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=Au(n,rS),[l,c]=s.useState([]),u=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=s.useRef(!1),p=Ph(),h=s.useRef(null),g=s.useRef(null),m=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,(0,C.jsx)(pS,{classes:{ripple:qp(o.ripple,nS.ripple),rippleVisible:qp(o.rippleVisible,nS.rippleVisible),ripplePulsate:qp(o.ripplePulsate,nS.ripplePulsate),child:qp(o.child,nS.child),childLeaving:qp(o.childLeaving,nS.childLeaving),childPulsate:qp(o.childPulsate,nS.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),v=s.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&f.current)return void(f.current=!1);"touchstart"===(null==e?void 0:e.type)&&(f.current=!0);const s=a?null:g.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,m,p]),b=s.useCallback((()=>{v({},{pulsate:!0})}),[v]),y=s.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{y(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return s.useImperativeHandle(t,(()=>({pulsate:b,start:v,stop:y})),[b,v,y]),(0,C.jsx)(fS,bu({className:qp(nS.root,o.root,i),ref:g},a,{children:(0,C.jsx)(Y_,{component:null,exit:!0,children:l})}))}));function gS(e){return Jp("MuiButtonBase",e)}const mS=Xp("MuiButtonBase",["root","disabled","focusVisible"]),vS=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bS=av("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${mS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),yS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:p="a",onBlur:h,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:b,onFocusVisible:y,onKeyDown:x,onKeyUp:w,onMouseDown:_,onMouseLeave:S,onMouseUp:k,onTouchEnd:E,onTouchMove:j,onTouchStart:O,tabIndex:T=0,TouchRippleProps:I,touchRippleRef:R,type:P}=n,M=Au(n,vS),A=s.useRef(null),D=s.useRef(null),F=Oh(D,R),{isFocusVisibleRef:L,onFocus:N,onBlur:B,ref:z}=$h(),[$,V]=s.useState(!1);c&&$&&V(!1),s.useImperativeHandle(r,(()=>({focusVisible:()=>{V(!0),A.current.focus()}})),[]);const[H,K]=s.useState(!1);s.useEffect((()=>{K(!0)}),[]);const U=H&&!u&&!c;function G(e,t,n=d){return jh((r=>(t&&t(r),!n&&D.current&&D.current[e](r),!0)))}s.useEffect((()=>{$&&f&&!u&&H&&D.current.pulsate()}),[u,f,$,H]);const W=G("start",_),q=G("stop",m),Y=G("stop",v),J=G("stop",k),X=G("stop",(e=>{$&&e.preventDefault(),S&&S(e)})),Z=G("start",O),Q=G("stop",E),ee=G("stop",j),te=G("stop",(e=>{B(e),!1===L.current&&V(!1),h&&h(e)}),!1),ne=jh((e=>{A.current||(A.current=e.currentTarget),N(e),!0===L.current&&(V(!0),y&&y(e)),b&&b(e)})),re=()=>{const e=A.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},oe=s.useRef(!1),ie=jh((e=>{f&&!oe.current&&$&&D.current&&" "===e.key&&(oe.current=!0,D.current.stop(e,(()=>{D.current.start(e)}))),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),ae=jh((e=>{f&&" "===e.key&&D.current&&$&&!e.defaultPrevented&&(oe.current=!1,D.current.stop(e,(()=>{D.current.pulsate(e)}))),w&&w(e),g&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let se=l;"button"===se&&(M.href||M.to)&&(se=p);const le={};"button"===se?(le.type=void 0===P?"button":P,le.disabled=c):(!M.href&&!M.to&&(le.role="button"),c&&(le["aria-disabled"]=c));const ce=Oh(t,z,A),ue=bu({},n,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:T,focusVisible:$}),de=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Gh({root:["root",t&&"disabled",n&&"focusVisible"]},gS,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return(0,C.jsxs)(bS,bu({as:se,className:qp(de.root,a),ownerState:ue,onBlur:te,onClick:g,onContextMenu:q,onFocus:ne,onKeyDown:ie,onKeyUp:ae,onMouseDown:W,onMouseLeave:X,onMouseUp:J,onDragLeave:Y,onTouchEnd:Q,onTouchMove:ee,onTouchStart:Z,ref:ce,tabIndex:c?-1:T,type:P},le,M,{children:[i,U?(0,C.jsx)(hS,bu({ref:F,center:o},I)):null]}))}));function xS(e){return Jp("MuiIconButton",e)}const wS=Xp("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),_S=["edge","children","className","color","disabled","disableFocusRipple","size"],SS=av(yS,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${$f(n.color)}`],n.edge&&t[`edge${$f(n.edge)}`],t[`size${$f(n.size)}`]]}})((({theme:e,ownerState:t})=>bu({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return bu({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&bu({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":bu({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${wS.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),kS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=Au(n,_S),d=bu({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),f=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Gh({root:["root",n&&"disabled","default"!==r&&`color${$f(r)}`,o&&`edge${$f(o)}`,`size${$f(i)}`]},xS,t)})(d);return(0,C.jsx)(SS,bu({className:qp(f.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:o}))}));function ES(e){return Jp("MuiTypography",e)}Xp("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const CS=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],jS=av("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${$f(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>bu({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),OS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},TS={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},IS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTypography"}),r=(e=>TS[e]||e)(n.color),o=Hp(bu({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=OS}=o,p=Au(o,CS),h=bu({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),g=s||(u?"p":f[d]||OS[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Gh({root:["root",i,"inherit"!==e.align&&`align${$f(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},ES,a)})(h);return(0,C.jsx)(jS,bu({as:g,ref:t,ownerState:h,className:qp(m.root,a)},p))}));var RS={};Object.defineProperty(RS,"__esModule",{value:!0});var PS=RS.default=void 0,MS=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=DS(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(s),AS=Dm;function DS(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(DS=function(e){return e?n:t})(e)}PS=RS.default=function(e=null){const t=MS.useContext(AS.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t};var FS="top",LS="bottom",NS="right",BS="left",zS="auto",$S=[FS,LS,NS,BS],VS="start",HS="end",KS="viewport",US="popper",GS=$S.reduce((function(e,t){return e.concat([t+"-"+VS,t+"-"+HS])}),[]),WS=[].concat($S,[zS]).reduce((function(e,t){return e.concat([t,t+"-"+VS,t+"-"+HS])}),[]),qS=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function YS(e){return e?(e.nodeName||"").toLowerCase():null}function JS(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function XS(e){return e instanceof JS(e).Element||e instanceof Element}function ZS(e){return e instanceof JS(e).HTMLElement||e instanceof HTMLElement}function QS(e){return!(typeof ShadowRoot>"u")&&(e instanceof JS(e).ShadowRoot||e instanceof ShadowRoot)}const ek={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!ZS(o)||!YS(o)||(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});!ZS(r)||!YS(r)||(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function tk(e){return e.split("-")[0]}var nk=Math.max,rk=Math.min,ok=Math.round;function ik(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function ak(){return!/^((?!chrome|android).)*safari/i.test(ik())}function sk(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&ZS(e)&&(o=e.offsetWidth>0&&ok(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ok(r.height)/e.offsetHeight||1);var a=(XS(e)?JS(e):window).visualViewport,s=!ak()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function lk(e){var t=sk(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ck(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&QS(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function uk(e){return JS(e).getComputedStyle(e)}function dk(e){return["table","td","th"].indexOf(YS(e))>=0}function fk(e){return((XS(e)?e.ownerDocument:e.document)||window.document).documentElement}function pk(e){return"html"===YS(e)?e:e.assignedSlot||e.parentNode||(QS(e)?e.host:null)||fk(e)}function hk(e){return ZS(e)&&"fixed"!==uk(e).position?e.offsetParent:null}function gk(e){for(var t=JS(e),n=hk(e);n&&dk(n)&&"static"===uk(n).position;)n=hk(n);return n&&("html"===YS(n)||"body"===YS(n)&&"static"===uk(n).position)?t:n||function(e){var t=/firefox/i.test(ik());if(/Trident/i.test(ik())&&ZS(e)&&"fixed"===uk(e).position)return null;var n=pk(e);for(QS(n)&&(n=n.host);ZS(n)&&["html","body"].indexOf(YS(n))<0;){var r=uk(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function mk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vk(e,t,n){return nk(e,rk(t,n))}function bk(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function yk(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const xk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=tk(n.placement),l=mk(s),c=[BS,NS].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return bk("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:yk(e,$S))}(o.padding,n),d=lk(i),f="y"===l?FS:BS,p="y"===l?LS:NS,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=gk(i),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=h/2-g/2,y=u[f],x=v-d[c]-u[p],w=v/2-d[c]/2+b,_=vk(y,w,x),S=l;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||ck(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wk(e){return e.split("-")[1]}var _k={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sk(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,g=void 0===h?0:h,m="function"==typeof u?u({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=BS,x=FS,w=window;if(c){var _=gk(n),S="clientHeight",k="clientWidth";if(_===JS(n)&&("static"!==uk(_=fk(n)).position&&"absolute"===s&&(S="scrollHeight",k="scrollWidth")),o===FS||(o===BS||o===NS)&&i===HS)x=LS,g-=(d&&_===w&&w.visualViewport?w.visualViewport.height:_[S])-r.height,g*=l?1:-1;if(o===BS||(o===FS||o===LS)&&i===HS)y=NS,p-=(d&&_===w&&w.visualViewport?w.visualViewport.width:_[k])-r.width,p*=l?1:-1}var E,C=Object.assign({position:s},c&&_k),j=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:ok(n*o)/o||0,y:ok(r*o)/o||0}}({x:p,y:g},JS(n)):{x:p,y:g};return p=j.x,g=j.y,l?Object.assign({},C,((E={})[x]=b?"0":"",E[y]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},C,((t={})[x]=b?g+"px":"",t[y]=v?p+"px":"",t.transform="",t))}const kk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:tk(t.placement),variation:wk(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Sk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Ek={passive:!0};const Ck={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=JS(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ek)})),s&&l.addEventListener("resize",n.update,Ek),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ek)})),s&&l.removeEventListener("resize",n.update,Ek)}},data:{}};var jk={left:"right",right:"left",bottom:"top",top:"bottom"};function Ok(e){return e.replace(/left|right|bottom|top/g,(function(e){return jk[e]}))}var Tk={start:"end",end:"start"};function Ik(e){return e.replace(/start|end/g,(function(e){return Tk[e]}))}function Rk(e){var t=JS(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Pk(e){return sk(fk(e)).left+Rk(e).scrollLeft}function Mk(e){var t=uk(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ak(e){return["html","body","#document"].indexOf(YS(e))>=0?e.ownerDocument.body:ZS(e)&&Mk(e)?e:Ak(pk(e))}function Dk(e,t){var n;void 0===t&&(t=[]);var r=Ak(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=JS(r),a=o?[i].concat(i.visualViewport||[],Mk(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Dk(pk(a)))}function Fk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lk(e,t,n){return t===KS?Fk(function(e,t){var n=JS(e),r=fk(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=ak();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Pk(e),y:l}}(e,n)):XS(t)?function(e,t){var n=sk(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Fk(function(e){var t,n=fk(e),r=Rk(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=nk(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=nk(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Pk(e),l=-r.scrollTop;return"rtl"===uk(o||n).direction&&(s+=nk(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(fk(e)))}function Nk(e,t,n,r){var o="clippingParents"===t?function(e){var t=Dk(pk(e)),n=["absolute","fixed"].indexOf(uk(e).position)>=0&&ZS(e)?gk(e):e;return XS(n)?t.filter((function(e){return XS(e)&&ck(e,n)&&"body"!==YS(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=Lk(e,n,r);return t.top=nk(o.top,t.top),t.right=rk(o.right,t.right),t.bottom=rk(o.bottom,t.bottom),t.left=nk(o.left,t.left),t}),Lk(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Bk(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?tk(o):null,a=o?wk(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case FS:t={x:s,y:n.y-r.height};break;case LS:t={x:s,y:n.y+n.height};break;case NS:t={x:n.x+n.width,y:l};break;case BS:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?mk(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case VS:t[c]=t[c]-(n[u]/2-r[u]/2);break;case HS:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function zk(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?KS:c,d=n.elementContext,f=void 0===d?US:d,p=n.altBoundary,h=void 0!==p&&p,g=n.padding,m=void 0===g?0:g,v=bk("number"!=typeof m?m:yk(m,$S)),b=f===US?"reference":US,y=e.rects.popper,x=e.elements[h?b:f],w=Nk(XS(x)?x:x.contextElement||fk(e.elements.popper),l,u,a),_=sk(e.elements.reference),S=Bk({reference:_,element:y,strategy:"absolute",placement:o}),k=Fk(Object.assign({},y,S)),E=f===US?k:_,C={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},j=e.modifiersData.offset;if(f===US&&j){var O=j[o];Object.keys(C).forEach((function(e){var t=[NS,LS].indexOf(e)>=0?1:-1,n=[FS,LS].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}const $k={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,g=n.allowedAutoPlacements,m=t.options.placement,v=tk(m),b=l||(v===m||!h?[Ok(m)]:function(e){if(tk(e)===zS)return[];var t=Ok(e);return[Ik(e),t,Ik(t)]}(m)),y=[m].concat(b).reduce((function(e,n){return e.concat(tk(n)===zS?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?WS:l,u=wk(r),d=u?s?GS:GS.filter((function(e){return wk(e)===u})):$S,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=zk(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[tk(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):n)}),[]),x=t.rects.reference,w=t.rects.popper,_=new Map,S=!0,k=y[0],E=0;E<y.length;E++){var C=y[E],j=tk(C),O=wk(C)===VS,T=[FS,LS].indexOf(j)>=0,I=T?"width":"height",R=zk(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=T?O?NS:BS:O?LS:FS;x[I]>w[I]&&(P=Ok(P));var M=Ok(P),A=[];if(i&&A.push(R[j]<=0),s&&A.push(R[P]<=0,R[M]<=0),A.every((function(e){return e}))){k=C,S=!1;break}_.set(C,A)}if(S)for(var D=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},F=h?3:1;F>0;F--){if("break"===D(F))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Vk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Hk(e){return[FS,NS,LS,BS].some((function(t){return e[t]>=0}))}const Kk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zk(t,{elementContext:"reference"}),s=zk(t,{altBoundary:!0}),l=Vk(a,r),c=Vk(s,o,i),u=Hk(l),d=Hk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const Uk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=WS.reduce((function(e,n){return e[n]=function(e,t,n){var r=tk(e),o=[BS,FS].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[BS,NS].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};const Gk={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Bk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Wk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,g=void 0===h?0:h,m=zk(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=tk(t.placement),b=wk(t.placement),y=!b,x=mk(v),w=function(e){return"x"===e?"y":"x"}(x),_=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(_){if(i){var T,I="y"===x?FS:BS,R="y"===x?LS:NS,P="y"===x?"height":"width",M=_[x],A=M+m[I],D=M-m[R],F=p?-k[P]/2:0,L=b===VS?S[P]:k[P],N=b===VS?-k[P]:-S[P],B=t.elements.arrow,z=p&&B?lk(B):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=$[I],H=$[R],K=vk(0,S[P],z[P]),U=y?S[P]/2-F-K-V-C.mainAxis:L-K-V-C.mainAxis,G=y?-S[P]/2+F+K+H+C.mainAxis:N+K+H+C.mainAxis,W=t.elements.arrow&&gk(t.elements.arrow),q=W?"y"===x?W.clientTop||0:W.clientLeft||0:0,Y=null!=(T=null==j?void 0:j[x])?T:0,J=M+G-Y,X=vk(p?rk(A,M+U-Y-q):A,M,p?nk(D,J):D);_[x]=X,O[x]=X-M}if(s){var Z,Q="x"===x?FS:BS,ee="x"===x?LS:NS,te=_[w],ne="y"===w?"height":"width",re=te+m[Q],oe=te-m[ee],ie=-1!==[FS,BS].indexOf(v),ae=null!=(Z=null==j?void 0:j[w])?Z:0,se=ie?re:te-S[ne]-k[ne]-ae+C.altAxis,le=ie?te+S[ne]+k[ne]-ae-C.altAxis:oe,ce=p&&ie?function(e,t,n){var r=vk(e,t,n);return r>n?n:r}(se,te,le):vk(p?se:re,te,p?le:oe);_[w]=ce,O[w]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function qk(e,t,n){void 0===n&&(n=!1);var r=ZS(t),o=ZS(t)&&function(e){var t=e.getBoundingClientRect(),n=ok(t.width)/e.offsetWidth||1,r=ok(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=fk(t),a=sk(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==YS(t)||Mk(i))&&(s=function(e){return e!==JS(e)&&ZS(e)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):Rk(e)}(t)),ZS(t)?((l=sk(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Pk(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Yk(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Jk(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Xk={placement:"bottom",modifiers:[],strategy:"absolute"};function Zk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Qk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Xk:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xk,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:XS(e)?Dk(e):e.contextElement?Dk(e.contextElement):[],popper:Dk(t)};var u=function(e){var t=Yk(e);return qS.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Zk(t,n)){o.rects={reference:qk(t,gk(n),"fixed"===o.options.strategy),popper:lk(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:Jk((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Zk(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var eE=Qk({defaultModifiers:[Ck,Gk,kk,ek,Uk,$k,Wk,xk,Kk]});const tE=s.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=s.useState(null),l=Oh(s.isValidElement(n)?Xh(n):null,t);if(ch((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),ch((()=>{if(i&&!o)return _h(t,i),()=>{_h(t,null)}}),[t,i,o]),o){if(s.isValidElement(n)){const e={ref:l};return s.cloneElement(n,e)}return(0,C.jsx)(s.Fragment,{children:n})}return(0,C.jsx)(s.Fragment,{children:i&&cc.createPortal(n,i)})}));function nE(e){return Jp("MuiPopper",e)}Xp("MuiPopper",["root"]);const rE=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],oE=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function iE(e){return"function"==typeof e?e():e}function aE(e){return void 0!==e.nodeType}const sE={},lE=s.forwardRef((function(e,t){var n;const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:p={},slots:h={},TransitionProps:g}=e,m=Au(e,rE),v=s.useRef(null),b=Oh(v,t),y=s.useRef(null),x=Oh(y,f),w=s.useRef(x);ch((()=>{w.current=x}),[x]),s.useImperativeHandle(f,(()=>y.current),[]);const _=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,i),[S,k]=s.useState(_),[E,j]=s.useState(iE(r));s.useEffect((()=>{y.current&&y.current.forceUpdate()})),s.useEffect((()=>{r&&j(iE(r))}),[r]),ch((()=>{if(!E||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{(e=>{k(e.placement)})(e)}}];null!=l&&(e=e.concat(l)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=eE(E,v.current,bu({placement:_},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[E,a,l,c,d,_]);const O={placement:S};null!==g&&(O.TransitionProps=g);const T=(e=>{const{classes:t}=e;return Gh({root:["root"]},nE,t)})(e),I=null!=(n=h.root)?n:"div",R=Jh({elementType:I,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:T.root});return(0,C.jsx)(I,bu({},R,{children:"function"==typeof o?o(O):o}))})),cE=s.forwardRef((function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=sE,popperRef:p,style:h,transition:g=!1,slotProps:m={},slots:v={}}=e,b=Au(e,oE),[y,x]=s.useState(!0);if(!l&&!u&&(!g||y))return null;let w;if(o)w=o;else if(n){const e=iE(n);w=e&&aE(e)?xh(e).body:xh(null).body}const _=u||!l||g&&!y?void 0:"none",S=g?{in:u,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return(0,C.jsx)(tE,{disablePortal:a,container:w,children:(0,C.jsx)(lE,bu({anchorEl:n,direction:i,disablePortal:a,modifiers:c,ref:t,open:g?!y:u,placement:d,popperOptions:f,popperRef:p,slotProps:m,slots:v},b,{style:bu({position:"fixed",top:0,left:0,display:_},h),TransitionProps:S,children:r}))})})),uE=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],dE=av(cE,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fE=s.forwardRef((function(e,t){var n;const r=PS(),o=__({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:g,popperRef:m,transition:v,slots:b,slotProps:y}=o,x=Au(o,uE),w=null!=(n=null==b?void 0:b.root)?n:null==s?void 0:s.Root,_=bu({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:g,popperRef:m,transition:v},x);return(0,C.jsx)(dE,bu({as:a,direction:null==r?void 0:r.direction,slots:{root:w},slotProps:y??l},_,{ref:t}))})),pE=s.createContext(void 0);const hE=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],gE={entering:{opacity:1},entered:{opacity:1}},mE=s.forwardRef((function(e,t){const n=Tm(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:g,style:m,timeout:v=r,TransitionComponent:b=B_}=e,y=Au(e,hE),x=s.useRef(null),w=Oh(x,Xh(a),t),_=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=_(f),k=_(((e,t)=>{J_(e);const r=X_({style:m,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),E=_(d),j=_(g),O=_((e=>{const t=X_({style:m,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),T=_(h);return(0,C.jsx)(b,bu({appear:i,in:c,nodeRef:x,onEnter:k,onEntered:E,onEntering:S,onExit:O,onExited:T,onExiting:j,addEndListener:e=>{o&&o(x.current,e)},timeout:v},y,{children:(e,t)=>s.cloneElement(a,bu({style:bu({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},gE[e],m,a.props.style),ref:w},t))}))}));function vE(e){return Jp("MuiBackdrop",e)}Xp("MuiBackdrop",["root","invisible"]);const bE=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],yE=av("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>bu({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),xE=s.forwardRef((function(e,t){var n,r,o;const i=__({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:p={},slots:h={},TransitionComponent:g=mE,transitionDuration:m}=i,v=Au(i,bE),b=bu({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return Gh({root:["root",n&&"invisible"]},vE,t)})(b),x=null!=(n=p.root)?n:u.root;return(0,C.jsx)(g,bu({in:f,timeout:m},v,{children:(0,C.jsx)(yE,bu({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:qp(y.root,s,null==x?void 0:x.className),ownerState:bu({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}));function wE(e){return Jp("MuiButton",e)}const _E=Xp("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),SE=s.createContext({}),kE=s.createContext(void 0),EE=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],CE=e=>bu({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),jE=av(yS,{shouldForwardProp:e=>iv(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${$f(n.color)}`],t[`size${$f(n.size)}`],t[`${n.variant}Size${$f(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return bu({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":bu({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":bu({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${_E.focusVisible}`]:bu({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${_E.disabled}`]:bu({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${dg(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_E.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_E.disabled}`]:{boxShadow:"none"}})),OE=av("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${$f(n.size)}`]]}})((({ownerState:e})=>bu({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},CE(e)))),TE=av("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${$f(n.size)}`]]}})((({ownerState:e})=>bu({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},CE(e)))),IE=s.forwardRef((function(e,t){const n=s.useContext(SE),r=s.useContext(kE),o=__({props:sh(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:f=!1,endIcon:p,focusVisibleClassName:h,fullWidth:g=!1,size:m="medium",startIcon:v,type:b,variant:y="text"}=o,x=Au(o,EE),w=bu({},o,{color:a,component:l,disabled:u,disableElevation:d,disableFocusRipple:f,fullWidth:g,size:m,type:b,variant:y}),_=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return bu({},a,Gh({root:["root",i,`${i}${$f(t)}`,`size${$f(o)}`,`${i}Size${$f(o)}`,`color${$f(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${$f(o)}`],endIcon:["icon","endIcon",`iconSize${$f(o)}`]},wE,a))})(w),S=v&&(0,C.jsx)(OE,{className:_.startIcon,ownerState:w,children:v}),k=p&&(0,C.jsx)(TE,{className:_.endIcon,ownerState:w,children:p}),E=r||"";return(0,C.jsxs)(jE,bu({ownerState:w,className:qp(n.className,_.root,c,E),component:l,disabled:u,focusRipple:!f,focusVisibleClassName:qp(_.focusVisible,h),ref:t,type:b},x,{classes:_,children:[S,i,k]}))}));function RE(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function PE(e){return parseInt(wh(e).getComputedStyle(e).paddingRight,10)||0}function ME(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&RE(e,o)}))}function AE(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function DE(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=xh(e);return t.body===e?wh(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(xh(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${PE(r)+e}px`;const t=xh(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${PE(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=xh(r).body;else{const t=r.parentElement,n=wh(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const FE=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function LE(e){const t=[],n=[];return Array.from(e.querySelectorAll(FE)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1===o||!function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)||(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function NE(){return!0}function BE(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=LE,isEnabled:a=NE,open:l}=e,c=s.useRef(!1),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=s.useRef(!1),g=s.useRef(null),m=Oh(Xh(t),g),v=s.useRef(null);s.useEffect((()=>{!l||!g.current||(h.current=!n)}),[n,l]),s.useEffect((()=>{if(!l||!g.current)return;const e=xh(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),h.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}}),[l]),s.useEffect((()=>{if(!l||!g.current)return;const e=xh(g.current),t=t=>{v.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!a()||c.current)return void(c.current=!1);if(t.contains(e.activeElement)||r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if((e.activeElement===u.current||e.activeElement===d.current)&&(n=i(g.current)),n.length>0){var o,s;const e=!(null==(o=v.current)||!o.shiftKey||"Tab"!==(null==(s=v.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,i]);const b=e=>{null===f.current&&(f.current=e.relatedTarget),h.current=!0};return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),s.cloneElement(t,{ref:m,onFocus:e=>{null===f.current&&(f.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,C.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const zE=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&RE(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ME(t,e.mount,e.modalRef,r,!0);const o=AE(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=AE(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=DE(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=AE(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&RE(e.modalRef,t),ME(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&RE(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function $E(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=zE,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:f}=e,p=s.useRef({}),h=s.useRef(null),g=s.useRef(null),m=Oh(g,f),[v,b]=s.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(x=!1);const w=()=>(p.current.modalRef=g.current,p.current.mount=h.current,p.current),_=()=>{o.mount(w(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},S=jh((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||xh(h.current).body;o.add(w(),e),g.current&&_()})),k=s.useCallback((()=>o.isTopModal(w())),[o]),E=jh((e=>{h.current=e,e&&(d&&k()?_():g.current&&RE(g.current,x))})),C=s.useCallback((()=>{o.remove(w(),x)}),[x,o]);s.useEffect((()=>()=>{C()}),[C]),s.useEffect((()=>{d?S():(!y||!i)&&C()}),[d,C,y,i,S]);const j=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},O=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Wh(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=bu({},n,t);return bu({role:"presentation"},r,{onKeyDown:j(r),ref:m})},getBackdropProps:(e={})=>bu({"aria-hidden":!0},e,{onClick:O(e),open:d}),getTransitionProps:()=>({onEnter:bh((()=>{b(!1),a&&a()}),null==c?void 0:c.props.onEnter),onExited:bh((()=>{b(!0),l&&l(),i&&C()}),null==c?void 0:c.props.onExited)}),rootRef:m,portalRef:E,isTopModal:k,exited:v,hasTransition:y}}function VE(e){return Jp("MuiModal",e)}Xp("MuiModal",["root","hidden","backdrop"]);const HE=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],KE=av("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>bu({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),UE=av(xE,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),GE=s.forwardRef((function(e,t){var n,r,o,i,a,l;const c=__({name:"MuiModal",props:e}),{BackdropComponent:u=UE,BackdropProps:d,className:f,closeAfterTransition:p=!1,children:h,container:g,component:m,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:_=!1,disableRestoreFocus:S=!1,disableScrollLock:k=!1,hideBackdrop:E=!1,keepMounted:j=!1,onBackdropClick:O,open:T,slotProps:I,slots:R}=c,P=Au(c,HE),M=bu({},c,{closeAfterTransition:p,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:_,disableRestoreFocus:S,disableScrollLock:k,hideBackdrop:E,keepMounted:j}),{getRootProps:A,getBackdropProps:D,getTransitionProps:F,portalRef:L,isTopModal:N,exited:B,hasTransition:z}=$E(bu({},M,{rootRef:t})),$=bu({},M,{exited:B}),V=(e=>{const{open:t,exited:n,classes:r}=e;return Gh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},VE,r)})($),H={};if(void 0===h.props.tabIndex&&(H.tabIndex="-1"),z){const{onEnter:e,onExited:t}=F();H.onEnter=e,H.onExited=t}const K=null!=(n=null!=(r=null==R?void 0:R.root)?r:v.Root)?n:KE,U=null!=(o=null!=(i=null==R?void 0:R.backdrop)?i:v.Backdrop)?o:u,G=null!=(a=null==I?void 0:I.root)?a:b.root,W=null!=(l=null==I?void 0:I.backdrop)?l:b.backdrop,q=Jh({elementType:K,externalSlotProps:G,externalForwardedProps:P,getSlotProps:A,additionalProps:{ref:t,as:m},ownerState:$,className:qp(f,null==G?void 0:G.className,null==V?void 0:V.root,!$.open&&$.exited&&(null==V?void 0:V.hidden))}),Y=Jh({elementType:U,externalSlotProps:W,additionalProps:d,getSlotProps:e=>D(bu({},e,{onClick:t=>{O&&O(t),null!=e&&e.onClick&&e.onClick(t)}})),className:qp(null==W?void 0:W.className,null==d?void 0:d.className,null==V?void 0:V.backdrop),ownerState:$});return j||T||z&&!B?(0,C.jsx)(tE,{ref:L,container:g,disablePortal:_,children:(0,C.jsxs)(K,bu({},q,{children:[!E&&u?(0,C.jsx)(U,bu({},Y)):null,(0,C.jsx)(BE,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:S,isEnabled:N,open:T,children:s.cloneElement(h,H)})]}))}):null}));function WE(e){return Jp("MuiDialog",e)}const qE=Xp("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),YE=s.createContext({}),JE=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],XE=av(xE,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ZE=av(GE,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),QE=av("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${$f(n.scroll)}`]]}})((({ownerState:e})=>bu({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),eC=av(tS,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${$f(n.scroll)}`],t[`paperWidth${$f(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>bu({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${qE.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${qE.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${qE.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),tC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialog"}),r=Tm(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:m,onClick:v,onClose:b,open:y,PaperComponent:x=tS,PaperProps:w={},scroll:_="paper",TransitionComponent:S=mE,transitionDuration:k=o,TransitionProps:E}=n,j=Au(n,JE),O=bu({},n,{disableEscapeKeyDown:f,fullScreen:p,fullWidth:h,maxWidth:g,scroll:_}),T=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Gh({root:["root"],container:["container",`scroll${$f(n)}`],paper:["paper",`paperScroll${$f(n)}`,`paperWidth${$f(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},WE,t)})(O),I=s.useRef(),R=Eh(a),P=s.useMemo((()=>({titleId:R})),[R]);return(0,C.jsx)(ZE,bu({className:qp(T.root,d),closeAfterTransition:!0,components:{Backdrop:XE},componentsProps:{backdrop:bu({transitionDuration:k,as:l},c)},disableEscapeKeyDown:f,onClose:b,open:y,ref:t,onClick:e=>{v&&v(e),I.current&&(I.current=null,m&&m(e),b&&b(e,"backdropClick"))},ownerState:O},j,{children:(0,C.jsx)(S,bu({appear:!0,in:y,timeout:k,role:"presentation"},E,{children:(0,C.jsx)(QE,{className:qp(T.container),onMouseDown:e=>{I.current=e.target===e.currentTarget},ownerState:O,children:(0,C.jsx)(eC,bu({as:x,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":R},w,{className:qp(T.paper,w.className),ownerState:O,children:(0,C.jsx)(YE.Provider,{value:P,children:u})}))})}))}))}));function nC(e){return Jp("MuiDialogActions",e)}Xp("MuiDialogActions",["root","spacing"]);const rC=["className","disableSpacing"],oC=av("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>bu({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}}))),iC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,i=Au(n,rC),a=bu({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e;return Gh({root:["root",!n&&"spacing"]},nC,t)})(a);return(0,C.jsx)(oC,bu({className:qp(s.root,r),ownerState:a,ref:t},i))}));function aC(e){return Jp("MuiDialogContent",e)}Xp("MuiDialogContent",["root","dividers"]);const sC=Xp("MuiDialogTitle",["root"]),lC=["className","dividers"],cC=av("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>bu({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${sC.root} + &`]:{paddingTop:0}}))),uC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,i=Au(n,lC),a=bu({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Gh({root:["root",n&&"dividers"]},aC,t)})(a);return(0,C.jsx)(cC,bu({className:qp(s.root,r),ownerState:a,ref:t},i))})),dC=s.createContext();function fC(e){return Jp("MuiGrid",e)}const pC=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],hC=Xp("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...pC.map((e=>`grid-xs-${e}`)),...pC.map((e=>`grid-sm-${e}`)),...pC.map((e=>`grid-md-${e}`)),...pC.map((e=>`grid-lg-${e}`)),...pC.map((e=>`grid-xl-${e}`))]),gC=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function mC(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function vC({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const bC=av("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>bu({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return Bf({theme:e},zf({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${hC.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=zf({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=vC({breakpoints:e.breakpoints.values,values:t})),o=Bf({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${mC(i)}`,[`& > .${hC.item}`]:{paddingTop:mC(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${hC.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=zf({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=vC({breakpoints:e.breakpoints.values,values:t})),o=Bf({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${mC(i)})`,marginLeft:`-${mC(i)}`,[`& > .${hC.item}`]:{paddingLeft:mC(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${hC.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=zf({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${mC(n)})`;c={flexBasis:e,maxWidth:e}}}i=bu({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const yC=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Gh({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},fC,t)},xC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiGrid"}),{breakpoints:r}=Tm(),o=Hp(n),{className:i,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:f=!1,rowSpacing:p,spacing:h=0,wrap:g="wrap",zeroMinWidth:m=!1}=o,v=Au(o,gC),b=p||h,y=l||h,x=s.useContext(dC),w=u?a||12:x,_={},S=bu({},v);r.keys.forEach((e=>{null!=v[e]&&(_[e]=v[e],delete S[e])}));const k=bu({},o,{columns:w,container:u,direction:d,item:f,rowSpacing:b,columnSpacing:y,wrap:g,zeroMinWidth:m,spacing:h},_,{breakpoints:r.keys}),E=yC(k);return(0,C.jsx)(dC.Provider,{value:w,children:(0,C.jsx)(bC,bu({ownerState:k,className:qp(E.root,i),as:c,ref:t},S))})}));const wC=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function _C(e){return`scale(${e}, ${e**2})`}const SC={entering:{opacity:1,transform:_C(1)},entered:{opacity:1,transform:"none"}},kC=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),EC=s.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:g="auto",TransitionComponent:m=B_}=e,v=Au(e,wC),b=Ph(),y=s.useRef(),x=Tm(),w=s.useRef(null),_=Oh(w,Xh(o),t),S=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},k=S(u),E=S(((e,t)=>{J_(e);const{duration:n,delay:r,easing:o}=X_({style:h,timeout:g,easing:i},{mode:"enter"});let a;"auto"===g?(a=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:r}),x.transitions.create("transform",{duration:kC?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),j=S(c),O=S(p),T=S((e=>{const{duration:t,delay:n,easing:r}=X_({style:h,timeout:g,easing:i},{mode:"exit"});let o;"auto"===g?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:kC?o:.666*o,delay:kC?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=_C(.75),d&&d(e)})),I=S(f);return(0,C.jsx)(m,bu({appear:r,in:a,nodeRef:w,onEnter:E,onEntered:j,onEntering:k,onExit:T,onExited:I,onExiting:O,addEndListener:e=>{"auto"===g&&b.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===g?null:g},v,{children:(e,t)=>s.cloneElement(o,bu({style:bu({opacity:0,transform:_C(.75),visibility:"exited"!==e||a?void 0:"hidden"},SC[e],h,o.props.style),ref:_},t))}))}));function CC(e){return Jp("MuiInputAdornment",e)}EC.muiSupportAuto=!0;const jC=Xp("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var OC;const TC=["children","className","component","disablePointerEvents","disableTypography","position","variant"],IC=av("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${$f(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>bu({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${jC.positionStart}&:not(.${jC.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),RC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:c,variant:u}=n,d=Au(n,TC),f=s.useContext(pE)||{};let p=u;u&&f.variant,p||(p=f.variant);const h=bu({},n,{hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:a,position:c,variant:p}),g=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Gh({root:["root",n&&"disablePointerEvents",o&&`position${$f(o)}`,a,r&&"hiddenLabel",i&&`size${$f(i)}`]},CC,t)})(h);return(0,C.jsx)(pE.Provider,{value:null,children:(0,C.jsx)(IC,bu({as:i,ownerState:h,className:qp(g.root,o),ref:t},d,{children:"string"!=typeof r||l?(0,C.jsxs)(s.Fragment,{children:["start"===c?OC||(OC=(0,C.jsx)("span",{className:"notranslate",children:"​"})):null,r]}):(0,C.jsx)(IS,{color:"text.secondary",children:r})}))})}));const PC=Xp("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),MC=(av(yS,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${$f(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${PC.iconWrapper}`]:t.iconWrapper}]}})((({theme:e,ownerState:t})=>bu({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${PC.iconWrapper}`]:bu({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${PC.selected}`]:{opacity:1},[`&.${PC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${PC.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${PC.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${PC.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${PC.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),j_((0,C.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")),AC=j_((0,C.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function DC(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const FC=["onChange"],LC={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function NC(e){return Jp("MuiTabScrollButton",e)}const BC=Xp("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zC=["className","slots","slotProps","direction","orientation","disabled"],$C=av(yS,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((({ownerState:e})=>bu({width:40,flexShrink:0,opacity:.8,[`&.${BC.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),VC=s.forwardRef((function(e,t){var n,r;const o=__({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=Au(o,zC),u=bu({isRtl:Qh()},o),d=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Gh({root:["root",n,r&&"disabled"]},NC,t)})(u),f=null!=(n=a.StartScrollButtonIcon)?n:MC,p=null!=(r=a.EndScrollButtonIcon)?r:AC,h=Jh({elementType:f,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),g=Jh({elementType:p,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return(0,C.jsx)($C,bu({component:"div",className:qp(d.root,i),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?(0,C.jsx)(f,bu({},h)):(0,C.jsx)(p,bu({},g))}))}));function HC(e){return Jp("MuiTabs",e)}const KC=Xp("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),UC=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],GC=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,WC=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},YC=av("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${KC.scrollButtons}`]:t.scrollButtons},{[`& .${KC.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>bu({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${KC.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),JC=av("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((({ownerState:e})=>bu({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),XC=av("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((({ownerState:e})=>bu({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),ZC=av("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>bu({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),QC=av((function(e){const{onChange:t}=e,n=Au(e,FC),r=s.useRef(),o=s.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return ch((()=>{const e=yh((()=>{const e=r.current;i(),e!==r.current&&t(r.current)})),n=wh(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),s.useEffect((()=>{i(),t(r.current)}),[t]),(0,C.jsx)("div",bu({style:LC},n,{ref:o}))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ej={};const tj=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTabs"}),r=Tm(),o=Qh(),{"aria-label":i,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:g,orientation:m="horizontal",ScrollButtonComponent:v=VC,scrollButtons:b="auto",selectionFollowsFocus:y,slots:x={},slotProps:w={},TabIndicatorProps:_={},TabScrollButtonProps:S={},textColor:k="primary",value:E,variant:j="standard",visibleScrollbar:O=!1}=n,T=Au(n,UC),I="scrollable"===j,R="vertical"===m,P=R?"scrollTop":"scrollLeft",M=R?"top":"left",A=R?"bottom":"right",D=R?"clientHeight":"clientWidth",F=R?"height":"width",L=bu({},n,{component:f,allowScrollButtonsMobile:p,indicatorColor:h,orientation:m,vertical:R,scrollButtons:b,textColor:k,variant:j,visibleScrollbar:O,fixed:!I,hideScrollbar:I&&!O,scrollableX:I&&!R,scrollableY:I&&R,centered:c&&!I,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Gh({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},HC,l)})(L),B=Jh({elementType:x.StartScrollButtonIcon,externalSlotProps:w.startScrollButtonIcon,ownerState:L}),z=Jh({elementType:x.EndScrollButtonIcon,externalSlotProps:w.endScrollButtonIcon,ownerState:L}),[$,V]=s.useState(!1),[H,K]=s.useState(ej),[U,G]=s.useState(!1),[W,q]=s.useState(!1),[Y,J]=s.useState(!1),[X,Z]=s.useState({overflow:"hidden",scrollbarWidth:0}),Q=new Map,ee=s.useRef(null),te=s.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Kh(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==E){const e=te.current.children;if(e.length>0){const t=e[Q.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=jh((()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(R)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[F]:t?t[F]:0};if(isNaN(H[n])||isNaN(H[F]))K(i);else{const e=Math.abs(H[n]-i[n]),t=Math.abs(H[F]-i[F]);(e>=1||t>=1)&&K(i)}})),oe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=DC,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=i(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(P,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[P]=e},ie=e=>{let t=ee.current[P];R?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Hh()?-1:1),oe(t)},ae=()=>{const e=ee.current[D];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[D]>e){0===r&&(t=e);break}t+=o[D]}return t},se=()=>{ie(-1*ae())},le=()=>{ie(ae())},ce=s.useCallback((e=>{Z({overflow:null,scrollbarWidth:e})}),[]),ue=jh((e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[M]<t[M]){const r=t[P]+(n[M]-t[M]);oe(r,{animation:e})}else if(n[A]>t[A]){const r=t[P]+(n[A]-t[A]);oe(r,{animation:e})}})),de=jh((()=>{I&&!1!==b&&J(!Y)}));s.useEffect((()=>{const e=yh((()=>{ee.current&&re()}));let t;const n=wh(ee.current);let r;return n.addEventListener("resize",e),typeof ResizeObserver<"u"&&(t=new ResizeObserver(e),Array.from(te.current.children).forEach((e=>{t.observe(e)}))),typeof MutationObserver<"u"&&(r=new MutationObserver((n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),de()})),r.observe(te.current,{childList:!0})),()=>{var o,i;e.clear(),n.removeEventListener("resize",e),null==(o=r)||o.disconnect(),null==(i=t)||i.disconnect()}}),[re,de]),s.useEffect((()=>{const e=Array.from(te.current.children),t=e.length;if(typeof IntersectionObserver<"u"&&t>0&&I&&!1!==b){const n=e[0],r=e[t-1],o={root:ee.current,threshold:.99},i=e=>{G(!e[0].isIntersecting)},a=new IntersectionObserver(i,o);a.observe(n);const s=e=>{q(!e[0].isIntersecting)},l=new IntersectionObserver(s,o);return l.observe(r),()=>{a.disconnect(),l.disconnect()}}}),[I,b,Y,null==u?void 0:u.length]),s.useEffect((()=>{V(!0)}),[]),s.useEffect((()=>{re()})),s.useEffect((()=>{ue(ej!==H)}),[ue,H]),s.useImperativeHandle(l,(()=>({updateIndicator:re,updateScrollButtons:de})),[re,de]);const fe=(0,C.jsx)(ZC,bu({},_,{className:qp(N.indicator,_.className),ownerState:L,style:bu({},H,_.style)}));let pe=0;const he=s.Children.map(u,(e=>{if(!s.isValidElement(e))return null;const t=void 0===e.props.value?pe:e.props.value;Q.set(t,pe);const n=t===E;return pe+=1,s.cloneElement(e,bu({fullWidth:"fullWidth"===j,indicator:n&&!$&&fe,selected:n,selectionFollowsFocus:y,onChange:g,textColor:k,value:t},1!==pe||!1!==E||e.props.tabIndex?{}:{tabIndex:0}))})),ge=(()=>{const e={};e.scrollbarSizeListener=I?(0,C.jsx)(QC,{onChange:ce,className:qp(N.scrollableX,N.hideScrollbar)}):null;const t=I&&("auto"===b&&(U||W)||!0===b);return e.scrollButtonStart=t?(0,C.jsx)(v,bu({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:B},orientation:m,direction:o?"right":"left",onClick:se,disabled:!U},S,{className:qp(N.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?(0,C.jsx)(v,bu({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:z},orientation:m,direction:o?"left":"right",onClick:le,disabled:!W},S,{className:qp(N.scrollButtons,S.className)})):null,e})();return(0,C.jsxs)(YC,bu({className:qp(N.root,d),ownerState:L,ref:t,as:f},T,{children:[ge.scrollButtonStart,ge.scrollbarSizeListener,(0,C.jsxs)(JC,{className:N.scroller,ownerState:L,style:{overflow:X.overflow,[R?"margin"+(o?"Left":"Right"):"marginBottom"]:O?void 0:-X.scrollbarWidth},ref:ee,children:[(0,C.jsx)(XC,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:L,onKeyDown:e=>{const t=te.current,n=xh(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),qC(t,n,WC);break;case i:e.preventDefault(),qC(t,n,GC);break;case"Home":e.preventDefault(),qC(t,null,GC);break;case"End":e.preventDefault(),qC(t,null,WC)}},ref:te,role:"tablist",children:he}),$&&fe]}),ge.scrollButtonEnd]}))}));function nj(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}const rj=(e,t)=>t=>{("Enter"===t.key||" "===t.key)&&(e(t),t.preventDefault(),t.stopPropagation())},oj=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?oj(t.shadowRoot):t:null};function ij(e){return Jp("PrivatePickersMonth",e)}const aj=Xp("PrivatePickersMonth",["root","selected"]),sj=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],lj=av(IS,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${aj.selected}`]:t.selected}]})((({theme:e})=>bu({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:e.palette.text.secondary},[`&.${aj.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}}))),cj=()=>{},uj=e=>{const{disabled:t,onSelect:n,selected:r,value:o,tabIndex:i,hasFocus:a,onFocus:l=cj,onBlur:c=cj}=e,u=Au(e,sj),d=(e=>{const{classes:t,selected:n}=e;return Gh({root:["root",n&&"selected"]},ij,t)})(e),f=()=>{n(o)},p=s.useRef(null);return ch((()=>{var e;a&&(null==(e=p.current)||e.focus())}),[a]),(0,C.jsx)(lj,bu({ref:p,component:"button",type:"button",className:d.root,tabIndex:i,onClick:f,onKeyDown:rj(f),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>l(e,o),onBlur:e=>c(e,o)},u))},dj=()=>{const e=s.useContext(uv);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},fj=()=>dj().utils,pj=()=>dj().defaultDates,hj=()=>dj().localeText,gj=()=>{const e=fj();return s.useRef(e.date()).current};function mj(e){return Jp("MuiMonthPicker",e)}Xp("MuiMonthPicker",["root"]);const vj=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a})=>{const s=a.startOfDay(a.date());n&&a.isBefore(o,s)&&(o=s),t&&a.isAfter(r,s)&&(r=s);let l=e,c=e;for(a.isBefore(e,o)&&(l=a.date(o),c=null),a.isAfter(e,r)&&(c&&(c=a.date(r)),l=null);l||c;){if(l&&a.isAfter(l,r)&&(l=null),c&&a.isBefore(c,o)&&(c=null),l){if(!i(l))return l;l=a.addDays(l,1)}if(c){if(!i(c))return c;c=a.addDays(c,-1)}}return null},bj=(e,t)=>{const n=e.date(t);return e.isValid(n)?n:null},yj=(e,t,n)=>{if(null==t)return n;const r=e.date(t);return e.isValid(r)?r:n},xj=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"];const wj=av("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),_j=s.forwardRef((function(e,t){const n=fj(),r=gj(),o=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({disableFuture:!1,disablePast:!1},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiMonthPicker"),{className:i,date:a,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:h,readOnly:g,disableHighlightToday:m,autoFocus:v=!1,onMonthFocus:b,hasFocus:y,onFocusedViewChange:x}=o,w=Au(o,xj),_=o,S=(e=>{const{classes:t}=e;return Gh({root:["root"]},mj,t)})(_),k=$p(),E=s.useMemo((()=>a??n.startOfMonth(r)),[r,n,a]),j=s.useMemo((()=>null!=a?n.getMonth(a):m?null:n.getMonth(r)),[r,a,n,m]),[O,T]=s.useState((()=>j||n.getMonth(r))),I=s.useCallback((e=>{const t=n.startOfMonth(u&&n.isAfter(r,f)?r:f),o=n.startOfMonth(c&&n.isBefore(r,d)?r:d);return!(!n.isBefore(e,t)&&!n.isAfter(e,o))||!!h&&h(e)}),[c,u,d,f,r,h,n]),R=e=>{if(g)return;const t=n.setMonth(E,e);p(t,"finish")},[P,M]=Ch({name:"MonthPicker",state:"hasFocus",controlled:y,default:v}),A=s.useCallback((e=>{M(e),x&&x(e)}),[M,x]),D=s.useCallback((e=>{I(n.setMonth(E,e))||(T(e),A(!0),b&&b(e))}),[I,n,E,A,b]);s.useEffect((()=>{T((e=>null!==j&&e!==j?j:e))}),[j]);const F=jh((e=>{switch(e.key){case"ArrowUp":D((12+O-3)%12),e.preventDefault();break;case"ArrowDown":D((12+O+3)%12),e.preventDefault();break;case"ArrowLeft":D((12+O+("ltr"===k.direction?-1:1))%12),e.preventDefault();break;case"ArrowRight":D((12+O+("ltr"===k.direction?1:-1))%12),e.preventDefault()}})),L=s.useCallback(((e,t)=>{D(t)}),[D]),N=s.useCallback((()=>{A(!1)}),[A]),B=n.getMonth(r);return(0,C.jsx)(wj,bu({ref:t,className:w_(S.root,i),ownerState:_,onKeyDown:F},w,{children:n.getMonthArray(E).map((e=>{const t=n.getMonth(e),r=n.format(e,"monthShort"),o=l||I(e);return(0,C.jsx)(uj,{value:t,selected:t===j,tabIndex:t!==O||o?-1:0,hasFocus:P&&t===O,onSelect:R,onFocus:L,onBlur:N,disabled:o,"aria-current":B===t?"date":void 0,children:r},r)}))}))}));function Sj(e,t,n){const{value:r,onError:o}=e,i=dj(),a=s.useRef(null),l=t({adapter:i,value:r,props:e});return s.useEffect((()=>{o&&!n(l,a.current)&&o(l,r),a.current=l}),[n,o,a,l,r]),l}const kj=({props:e,value:t,adapter:n})=>{const r=n.utils.date(),o=n.utils.date(t),i=yj(n.utils,e.minDate,n.defaultDates.minDate),a=yj(n.utils,e.maxDate,n.defaultDates.maxDate);if(null===o)return null;switch(!0){case!n.utils.isValid(t):return"invalidDate";case!(!e.shouldDisableDate||!e.shouldDisableDate(o)):return"shouldDisableDate";case!(!e.disableFuture||!n.utils.isAfterDay(o,r)):return"disableFuture";case!(!e.disablePast||!n.utils.isBeforeDay(o,r)):return"disablePast";case!(!i||!n.utils.isBeforeDay(o,i)):return"minDate";case!(!a||!n.utils.isAfterDay(o,a)):return"maxDate";default:return null}},Ej=({shouldDisableDate:e,minDate:t,maxDate:n,disableFuture:r,disablePast:o})=>{const i=dj();return s.useCallback((a=>null!==kj({adapter:i,value:a,props:{shouldDisableDate:e,minDate:t,maxDate:n,disableFuture:r,disablePast:o}})),[i,e,t,n,r,o])},Cj=(e,t)=>e===t,jj=e=>Sj(e,kj,Cj),Oj=({date:e,defaultCalendarMonth:t,disableFuture:n,disablePast:r,disableSwitchToMonthOnDayFocus:o=!1,maxDate:i,minDate:a,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u})=>{var d;const f=gj(),p=fj(),h=s.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return bu({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return bu({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return bu({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(!!c,o,p)).current,[g,m]=s.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:e||f,currentMonth:p.startOfMonth(null!=(d=e??t)?d:f),slideDirection:"left"}),v=s.useCallback((e=>{m(bu({type:"changeMonth"},e)),l&&l(e.newMonth)}),[l]),b=s.useCallback((e=>{const t=e??f;p.isSameMonth(t,g.currentMonth)||v({newMonth:p.startOfMonth(t),direction:p.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,v,f,p]),y=Ej({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:n,disablePast:r}),x=s.useCallback((()=>{m({type:"finishMonthSwitchingAnimation"})}),[]),w=s.useCallback(((e,t)=>{y(e)||m({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),[y]);return{calendarState:g,changeMonth:b,changeFocusedDay:w,isDateDisabled:y,onMonthSwitchingAnimationEnd:x,handleChangeMonth:v}},Tj=e=>Jp("MuiPickersFadeTransitionGroup",e);Xp("MuiPickersFadeTransitionGroup",["root"]);const Ij=av(Y_,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Rj(e){const t=Im({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=(e=>{const{classes:t}=e;return Gh({root:["root"]},Tj,t)})(t);return o?n:(0,C.jsx)(Ij,{className:w_(a.root,r),children:(0,C.jsx)(mE,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},i)})}function Pj(e){return Jp("MuiPickersDay",e)}const Mj=Xp("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Aj=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],Dj=({theme:e,ownerState:t})=>bu({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,"&:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},"&:focus":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity),[`&.${Mj.selected}`]:{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${Mj.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${Mj.disabled}`]:{color:e.palette.text.disabled}},!t.disableMargin&&{margin:"0 2px"},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:e.palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${Mj.selected})`]:{border:`1px solid ${e.palette.text.secondary}`}}),Fj=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Lj=av(yS,{name:"MuiPickersDay",slot:"Root",overridesResolver:Fj})(Dj),Nj=av("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Fj})((({theme:e,ownerState:t})=>bu({},Dj({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"}))),Bj=()=>{},zj=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:o,day:i,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=Bj,onBlur:h=Bj,onKeyDown:g=Bj,onMouseDown:m,outsideCurrentMonth:v,selected:b=!1,showDaysOutsideCurrentMonth:y=!1,children:x,today:w=!1}=n,_=Au(n,Aj),S=bu({},n,{autoFocus:r,disabled:a,disableHighlightToday:l,disableMargin:c,selected:b,showDaysOutsideCurrentMonth:y,today:w}),k=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e;return Gh({root:["root",t&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",a&&!s&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Pj,l)})(S),E=fj(),j=s.useRef(null),O=Oh(j,t);ch((()=>{r&&!a&&!u&&!v&&j.current.focus()}),[r,a,u,v]);return v&&!y?(0,C.jsx)(Nj,{className:w_(k.root,k.hiddenDaySpacingFiller,o),ownerState:S,role:_.role}):(0,C.jsx)(Lj,bu({className:w_(k.root,o),ownerState:S,ref:O,centerRipple:!0,disabled:a,tabIndex:b?0:-1,onKeyDown:e=>g(e,i),onFocus:e=>p(e,i),onBlur:e=>h(e,i),onClick:e=>{a||f(i,"finish"),v&&e.currentTarget.focus(),d&&d(e)},onMouseDown:e=>{m&&m(e),v&&e.preventDefault()}},_,{children:x||E.format(i,"dayOfMonth")}))})),$j=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,Vj=s.memo(zj,$j),Hj=e=>Jp("PrivatePickersSlideTransition",e),Kj=Xp("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Uj=["children","className","reduceAnimations","slideDirection","transKey"],Gj=av(Y_,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Kj["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Kj["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Kj.slideEnterActive}`]:t.slideEnterActive},{[`.${Kj.slideExit}`]:t.slideExit},{[`.${Kj["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Kj["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Kj["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Kj["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Kj.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Kj.slideExit}`]:{transform:"translate(0%)"},[`& .${Kj["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Kj["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}})),Wj=e=>Jp("MuiDayPicker",e);Xp("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]);const qj=e=>e.charAt(0).toUpperCase(),Yj=av("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Jj=av(IS,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.secondary}))),Xj=av("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Zj=av((e=>{const{children:t,className:n,reduceAnimations:r,slideDirection:o,transKey:i}=e,a=Au(e,Uj),l=(e=>{const{classes:t}=e;return Gh({root:["root"]},Hj,t)})(e);if(r)return(0,C.jsx)("div",{className:w_(l.root,n),children:t});const c={exit:Kj.slideExit,enterActive:Kj.slideEnterActive,enter:Kj[`slideEnter-${o}`],exitActive:Kj[`slideExitActiveLeft-${o}`]};return(0,C.jsx)(Gj,{className:w_(l.root,n),childFactory:e=>s.cloneElement(e,{classNames:c}),role:"presentation",children:(0,C.jsx)(V_,bu({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:c},a,{children:t}),i)})}),{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Qj=av("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),eO=av("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function tO(e){const t=gj(),n=fj(),r=Im({props:e,name:"MuiDayPicker"}),o=(e=>{const{classes:t}=e;return Gh({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},Wj,t)})(r),{onFocusedDayChange:i,className:a,currentMonth:l,selectedDays:c,disabled:u,disableHighlightToday:d,focusedDay:f,isMonthSwitchingAnimating:p,loading:h,onSelectedDaysChange:g,onMonthSwitchingAnimationEnd:m,readOnly:v,reduceAnimations:b,renderDay:y,renderLoading:x=()=>(0,C.jsx)("span",{children:"..."}),showDaysOutsideCurrentMonth:w,slideDirection:_,TransitionProps:S,disablePast:k,disableFuture:E,minDate:j,maxDate:O,shouldDisableDate:T,dayOfWeekFormatter:I=qj,hasFocus:R,onFocusedViewChange:P,gridLabelId:M}=r,A=Ej({shouldDisableDate:T,minDate:j,maxDate:O,disablePast:k,disableFuture:E}),[D,F]=s.useState((()=>f||t)),L=s.useCallback((e=>{P&&P(e)}),[P]),N=s.useCallback(((e,t="finish")=>{v||g(e,t)}),[g,v]),B=s.useCallback((e=>{A(e)||(i(e),F(e),L(!0))}),[A,i,L]),z=Tm();function $(e,t){switch(e.key){case"ArrowUp":B(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":B(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,"ltr"===z.direction?-1:1),o="ltr"===z.direction?n.getPreviousMonth(t):n.getNextMonth(t),i=vj({utils:n,date:r,minDate:"ltr"===z.direction?n.startOfMonth(o):r,maxDate:"ltr"===z.direction?r:n.endOfMonth(o),isDateDisabled:A});B(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,"ltr"===z.direction?1:-1),o="ltr"===z.direction?n.getNextMonth(t):n.getPreviousMonth(t),i=vj({utils:n,date:r,minDate:"ltr"===z.direction?r:n.startOfMonth(o),maxDate:"ltr"===z.direction?n.endOfMonth(o):r,isDateDisabled:A});B(i||r),e.preventDefault();break}case"Home":B(n.startOfWeek(t)),e.preventDefault();break;case"End":B(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":B(n.getNextMonth(t)),e.preventDefault();break;case"PageDown":B(n.getPreviousMonth(t)),e.preventDefault()}}function V(e,t){B(t)}function H(e,t){R&&n.isSameDay(D,t)&&L(!1)}const K=n.getMonth(l),U=c.filter((e=>!!e)).map((e=>n.startOfDay(e))),G=K,W=s.useMemo((()=>s.createRef()),[G]),q=n.startOfWeek(t),Y=s.useMemo((()=>{const e=n.startOfMonth(l),t=n.endOfMonth(l);return A(D)||n.isAfterDay(D,t)||n.isBeforeDay(D,e)?vj({utils:n,date:D,minDate:e,maxDate:t,disablePast:k,disableFuture:E,isDateDisabled:A}):D}),[l,E,k,D,A,n]);return(0,C.jsxs)("div",{role:"grid","aria-labelledby":M,children:[(0,C.jsx)(Yj,{role:"row",className:o.header,children:n.getWeekdays().map(((e,t)=>{var r;return(0,C.jsx)(Jj,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(q,t),"weekday"),className:o.weekDayLabel,children:null!=(r=null==I?void 0:I(e))?r:e},e+t.toString())}))}),h?(0,C.jsx)(Xj,{className:o.loadingContainer,children:x()}):(0,C.jsx)(Zj,bu({transKey:G,onExited:m,reduceAnimations:b,slideDirection:_,className:w_(a,o.slideTransition)},S,{nodeRef:W,children:(0,C.jsx)(Qj,{ref:W,role:"rowgroup",className:o.monthContainer,children:n.getWeekArray(l).map((e=>(0,C.jsx)(eO,{role:"row",className:o.weekContainer,children:e.map((e=>{const r=null!==Y&&n.isSameDay(e,Y),o=U.some((t=>n.isSameDay(t,e))),i=n.isSameDay(e,t),a={key:null==e?void 0:e.toString(),day:e,isAnimating:p,disabled:u||A(e),autoFocus:R&&r,today:i,outsideCurrentMonth:n.getMonth(e)!==K,selected:o,disableHighlightToday:d,showDaysOutsideCurrentMonth:w,onKeyDown:$,onFocus:V,onBlur:H,onDaySelect:N,tabIndex:r?0:-1,role:"gridcell","aria-selected":o};return i&&(a["aria-current"]="date"),y?y(e,U,a):(0,s.createElement)(Vj,bu({},a,{key:a.key}))}))},`week-${e[0]}`)))})}))]})}function nO({onChange:e,onViewChange:t,openTo:n,view:r,views:o}){var i,a;const[l,c]=Ch({name:"Picker",state:"view",controlled:r,default:n&&nj(o,n)?n:o[0]}),u=null!=(i=o[o.indexOf(l)-1])?i:null,d=null!=(a=o[o.indexOf(l)+1])?a:null,f=s.useCallback((e=>{c(e),t&&t(e)}),[c,t]),p=s.useCallback((()=>{d&&f(d)}),[d,f]);return{handleChangeAndOpenNext:s.useCallback(((t,n)=>{const r="finish"===n;e(t,r&&d?"partial":n),r&&p()}),[d,e,p]),nextView:d,previousView:u,openNext:p,openView:l,setOpenView:f}}const rO=j_((0,C.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),oO=j_((0,C.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),iO=j_((0,C.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),aO=j_((0,C.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),sO=j_((0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,C.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),lO=(j_((0,C.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),j_((0,C.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));j_((0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,C.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function cO(e){return Jp("MuiPickersArrowSwitcher",e)}Xp("MuiPickersArrowSwitcher",["root","spacer","button"]);const uO=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],dO=av("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),fO=av("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),pO=av(kS,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>bu({},e.hidden&&{visibility:"hidden"}))),hO=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:o,components:i,componentsProps:a,isLeftDisabled:s,isLeftHidden:l,isRightDisabled:c,isRightHidden:u,leftArrowButtonText:d,onLeftClick:f,onRightClick:p,rightArrowButtonText:h}=n,g=Au(n,uO),m="rtl"===Tm().direction,v=(null==a?void 0:a.leftArrowButton)||{},b=(null==i?void 0:i.LeftArrowIcon)||oO,y=(null==a?void 0:a.rightArrowButton)||{},x=(null==i?void 0:i.RightArrowIcon)||iO,w=n,_=(e=>{const{classes:t}=e;return Gh({root:["root"],spacer:["spacer"],button:["button"]},cO,t)})(w);return(0,C.jsxs)(dO,bu({ref:t,className:w_(_.root,o),ownerState:w},g,{children:[(0,C.jsx)(pO,bu({as:null==i?void 0:i.LeftArrowButton,size:"small","aria-label":d,title:d,disabled:s,edge:"end",onClick:f},v,{className:w_(_.button,v.className),ownerState:bu({},w,v,{hidden:l}),children:m?(0,C.jsx)(x,{}):(0,C.jsx)(b,{})})),r?(0,C.jsx)(IS,{variant:"subtitle1",component:"span",children:r}):(0,C.jsx)(fO,{className:_.spacer,ownerState:w}),(0,C.jsx)(pO,bu({as:null==i?void 0:i.RightArrowButton,size:"small","aria-label":h,title:h,edge:"start",disabled:c,onClick:p},y,{className:w_(_.button,y.className),ownerState:bu({},w,y,{hidden:u}),children:m?(0,C.jsx)(b,{}):(0,C.jsx)(x,{})}))]}))})),gO=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,mO=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),vO=(e=!1,t)=>(n,r)=>e?t.isAfter(n,r):mO(n,t)>mO(r,t);function bO(e,t,n){const r=fj(),o=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,r),i=s.useCallback((o=>{const i=null==e?null:((e,t,n,r)=>{const o=gO(r.getHours(e),t,n);return r.setHours(e,o)})(e,o,!!t,r);n(i,"partial")}),[t,e,n,r]);return{meridiemMode:o,handleMeridiemChange:i}}const yO=e=>Jp("MuiPickersCalendarHeader",e);Xp("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);const xO=av("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),wO=av("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>bu({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),_O=av("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),SO=av(kS,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),kO=av(rO,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e,ownerState:t})=>bu({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"},"year"===t.openView&&{transform:"rotate(180deg)"}))),EO=()=>{};function CO(e){const t=Im({props:e,name:"MuiPickersCalendarHeader"}),{components:n={},componentsProps:r={},currentMonth:o,disabled:i,disableFuture:a,disablePast:l,getViewSwitchingButtonText:c,leftArrowButtonText:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:h,openView:g,reduceAnimations:m,rightArrowButtonText:v,views:b,labelId:y}=t;EO({leftArrowButtonText:u,rightArrowButtonText:v,getViewSwitchingButtonText:c});const x=hj(),w=u??x.previousMonth,_=v??x.nextMonth,S=c??x.calendarViewSwitchingButtonAriaLabel,k=fj(),E=(e=>{const{classes:t}=e;return Gh({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},yO,t)})(t),j=r.switchViewButton||{},O=function(e,{disableFuture:t,maxDate:n}){const r=fj();return s.useMemo((()=>{const o=r.date(),i=r.startOfMonth(t&&r.isBefore(o,n)?o:n);return!r.isAfter(i,e)}),[t,n,e,r])}(o,{disableFuture:a,maxDate:d}),T=function(e,{disablePast:t,minDate:n}){const r=fj();return s.useMemo((()=>{const o=r.date(),i=r.startOfMonth(t&&r.isAfter(o,n)?o:n);return!r.isBefore(i,e)}),[t,n,e,r])}(o,{disablePast:l,minDate:f});if(1===b.length&&"year"===b[0])return null;const I=t;return(0,C.jsxs)(xO,{ownerState:I,className:E.root,children:[(0,C.jsxs)(wO,{role:"presentation",onClick:()=>{if(1!==b.length&&h&&!i)if(2===b.length)h(b.find((e=>e!==g))||b[0]);else{const e=0!==b.indexOf(g)?0:1;h(b[e])}},ownerState:I,"aria-live":"polite",className:E.labelContainer,children:[(0,C.jsx)(Rj,{reduceAnimations:m,transKey:k.format(o,"monthAndYear"),children:(0,C.jsx)(_O,{id:y,ownerState:I,className:E.label,children:k.format(o,"monthAndYear")})}),b.length>1&&!i&&(0,C.jsx)(SO,bu({size:"small",as:n.SwitchViewButton,"aria-label":S(g),className:E.switchViewButton},j,{children:(0,C.jsx)(kO,{as:n.SwitchViewIcon,ownerState:I,className:E.switchViewIcon})}))]}),(0,C.jsx)(mE,{in:"day"===g,children:(0,C.jsx)(hO,{leftArrowButtonText:w,rightArrowButtonText:_,components:n,componentsProps:r,onLeftClick:()=>p(k.getPreviousMonth(o),"right"),onRightClick:()=>p(k.getNextMonth(o),"left"),isLeftDisabled:T,isRightDisabled:O})})]})}const jO=s.createContext(null);function OO(e){return Jp("PrivatePickersYear",e)}const TO=Xp("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),IO=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],RO=av("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${TO.modeDesktop}`]:t.modeDesktop},{[`&.${TO.modeMobile}`]:t.modeMobile}]})((({ownerState:e})=>bu({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==e?void 0:e.wrapperVariant)&&{flexBasis:"25%"}))),PO=av("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${TO.disabled}`]:t.disabled},{[`&.${TO.selected}`]:t.selected}]})((({theme:e})=>bu({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},[`&.${TO.disabled}`]:{color:e.palette.text.secondary},[`&.${TO.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}}))),MO=()=>{},AO=s.forwardRef((function(e,t){const{autoFocus:n,className:r,children:o,disabled:i,onClick:a,onKeyDown:l,value:c,tabIndex:u,onFocus:d=MO,onBlur:f=MO}=e,p=Au(e,IO),h=s.useRef(null),g=Oh(h,t),m=bu({},e,{wrapperVariant:s.useContext(jO)}),v=(e=>{const{wrapperVariant:t,disabled:n,selected:r,classes:o}=e;return Gh({root:["root",t&&`mode${$f(t)}`],yearButton:["yearButton",n&&"disabled",r&&"selected"]},OO,o)})(m);return s.useEffect((()=>{n&&h.current.focus()}),[n]),(0,C.jsx)(RO,{className:w_(v.root,r),ownerState:m,children:(0,C.jsx)(PO,bu({ref:g,disabled:i,type:"button",tabIndex:i?-1:u,onClick:e=>a(e,c),onKeyDown:e=>l(e,c),onFocus:e=>d(e,c),onBlur:e=>f(e,c),className:v.yearButton,ownerState:m},p,{children:o}))})}));function DO(e){return Jp("MuiYearPicker",e)}Xp("MuiYearPicker",["root"]);const FO=av("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),LO=s.forwardRef((function(e,t){const n=gj(),r=Tm(),o=fj(),i=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({disablePast:!1,disableFuture:!1},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiYearPicker"),{autoFocus:a,className:l,date:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onChange:g,readOnly:m,shouldDisableYear:v,disableHighlightToday:b,onYearFocus:y,hasFocus:x,onFocusedViewChange:w}=i,_=i,S=(e=>{const{classes:t}=e;return Gh({root:["root"]},DO,t)})(_),k=s.useMemo((()=>c??o.startOfYear(n)),[n,o,c]),E=s.useMemo((()=>null!=c?o.getYear(c):b?null:o.getYear(n)),[n,c,o,b]),j=s.useContext(jO),O=s.useRef(null),[T,I]=s.useState((()=>E||o.getYear(n))),[R,P]=Ch({name:"YearPicker",state:"hasFocus",controlled:x,default:a}),M=s.useCallback((e=>{P(e),w&&w(e)}),[P,w]),A=s.useCallback((e=>!!(f&&o.isBeforeYear(e,n)||d&&o.isAfterYear(e,n)||h&&o.isBeforeYear(e,h)||p&&o.isAfterYear(e,p)||v&&v(e))),[d,f,p,h,n,v,o]),D=(e,t,n="finish")=>{if(m)return;const r=o.setYear(k,t);g(r,n)},F=s.useCallback((e=>{A(o.setYear(k,e))||(I(e),M(!0),null==y||y(e))}),[A,o,k,M,y]);s.useEffect((()=>{I((e=>null!==E&&e!==E?E:e))}),[E]);const L="desktop"===j?4:3,N=s.useCallback(((e,t)=>{switch(e.key){case"ArrowUp":F(t-L),e.preventDefault();break;case"ArrowDown":F(t+L),e.preventDefault();break;case"ArrowLeft":F(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":F(t+("ltr"===r.direction?1:-1)),e.preventDefault()}}),[F,r.direction,L]),B=s.useCallback(((e,t)=>{F(t)}),[F]),z=s.useCallback(((e,t)=>{T===t&&M(!1)}),[T,M]),$=o.getYear(n),V=s.useRef(null),H=Oh(t,V);return s.useEffect((()=>{if(a||null===V.current)return;const e=V.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=V.current.clientHeight,o=V.current.scrollTop,i=n+t;t>r||n<o||(V.current.scrollTop=i-r/2-t/2)}),[a]),(0,C.jsx)(FO,{ref:H,className:w_(S.root,l),ownerState:_,children:o.getYearRange(h,p).map((e=>{const t=o.getYear(e),n=t===E;return(0,C.jsx)(AO,{selected:n,value:t,onClick:D,onKeyDown:N,autoFocus:R&&t===T,ref:n?O:void 0,disabled:u||A(e),tabIndex:t===T?0:-1,onFocus:B,onBlur:z,"aria-current":$===t?"date":void 0,children:o.format(e,"year")},o.format(e,"year"))}))})})),NO=av("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),BO=typeof navigator<"u"&&/(android)/i.test(navigator.userAgent),zO=e=>Jp("MuiCalendarPicker",e);Xp("MuiCalendarPicker",["root","viewTransitionContainer"]);const $O=["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"];const VO=av(NO,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),HO=av(Rj,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),KO=s.forwardRef((function(e,t){const n=fj(),r=Eh(),o=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:BO,renderLoading:()=>(0,C.jsx)("span",{children:"..."})},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiCalendarPicker"),{autoFocus:i,onViewChange:a,date:l,disableFuture:c,disablePast:u,defaultCalendarMonth:d,onChange:f,onYearChange:p,onMonthChange:h,reduceAnimations:g,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:b,view:y,views:x,openTo:w,className:_,disabled:S,readOnly:k,minDate:E,maxDate:j,disableHighlightToday:O,focusedView:T,onFocusedViewChange:I}=o,R=Au(o,$O),{openView:P,setOpenView:M,openNext:A}=nO({view:y,views:x,openTo:w,onChange:f,onViewChange:a}),{calendarState:D,changeFocusedDay:F,changeMonth:L,handleChangeMonth:N,isDateDisabled:B,onMonthSwitchingAnimationEnd:z}=Oj({date:l,defaultCalendarMonth:d,reduceAnimations:g,onMonthChange:h,minDate:E,maxDate:j,shouldDisableDate:m,disablePast:u,disableFuture:c}),$=s.useCallback(((e,t)=>{const r=n.startOfMonth(e),o=n.endOfMonth(e),i=B(e)?vj({utils:n,date:e,minDate:n.isBefore(E,r)?r:E,maxDate:n.isAfter(j,o)?o:j,disablePast:u,disableFuture:c,isDateDisabled:B}):e;i?(f(i,t),null==h||h(r)):(A(),L(r)),F(i,!0)}),[F,c,u,B,j,E,f,h,L,A,n]),V=s.useCallback(((e,t)=>{const r=n.startOfYear(e),o=n.endOfYear(e),i=B(e)?vj({utils:n,date:e,minDate:n.isBefore(E,r)?r:E,maxDate:n.isAfter(j,o)?o:j,disablePast:u,disableFuture:c,isDateDisabled:B}):e;i?(f(i,t),null==p||p(i)):(A(),L(r)),F(i,!0)}),[F,c,u,B,j,E,f,p,A,n,L]),H=s.useCallback(((e,t)=>f(l&&e?n.mergeDateAndTime(e,l):e,t)),[n,l,f]);s.useEffect((()=>{l&&L(l)}),[l]);const K=o,U=(e=>{const{classes:t}=e;return Gh({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},zO,t)})(K),G={disablePast:u,disableFuture:c,maxDate:j,minDate:E},W=S&&l||E,q=S&&l||j,Y={disableHighlightToday:O,readOnly:k,disabled:S},J=`${r}-grid-label`,[X,Z]=Ch({name:"DayPicker",state:"focusedView",controlled:T,default:i?P:null}),Q=null!==X,ee=jh((e=>t=>{I?I(e)(t):Z(t?e:t=>t===e?null:t)})),te=s.useRef(P);return s.useEffect((()=>{te.current!==P&&(te.current=P,ee(P)(!0))}),[P,ee]),(0,C.jsxs)(VO,{ref:t,className:w_(U.root,_),ownerState:K,children:[(0,C.jsx)(CO,bu({},R,{views:x,openView:P,currentMonth:D.currentMonth,onViewChange:M,onMonthChange:(e,t)=>N({newMonth:e,direction:t}),minDate:W,maxDate:q,disabled:S,disablePast:u,disableFuture:c,reduceAnimations:g,labelId:J})),(0,C.jsx)(HO,{reduceAnimations:g,className:U.viewTransitionContainer,transKey:P,ownerState:K,children:(0,C.jsxs)("div",{children:["year"===P&&(0,C.jsx)(LO,bu({},R,G,Y,{autoFocus:i,date:l,onChange:V,shouldDisableYear:b,hasFocus:Q,onFocusedViewChange:ee("year")})),"month"===P&&(0,C.jsx)(_j,bu({},G,Y,{autoFocus:i,hasFocus:Q,className:_,date:l,onChange:$,shouldDisableMonth:v,onFocusedViewChange:ee("month")})),"day"===P&&(0,C.jsx)(tO,bu({},R,D,G,Y,{autoFocus:i,onMonthSwitchingAnimationEnd:z,onFocusedDayChange:F,reduceAnimations:g,selectedDays:[l],onSelectedDaysChange:H,shouldDisableDate:m,hasFocus:Q,onFocusedViewChange:ee("day"),gridLabelId:J}))]})})]})})),UO=220,GO=36,WO={x:110,y:110},qO=WO.x-WO.x,YO=0-WO.y,JO=(e,t,n)=>{const r=t-WO.x,o=n-WO.y;let i=(e=>e*(180/Math.PI))(Math.atan2(qO,YO)-Math.atan2(r,o));i=Math.round(i/e)*e,i%=360;const a=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(a)}};function XO(e){return Jp("MuiClockPointer",e)}Xp("MuiClockPointer",["root","thumb"]);const ZO=["className","hasSelected","isInner","type","value"],QO=av("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>bu({width:2,backgroundColor:e.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),eT=av("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>bu({width:4,height:4,backgroundColor:e.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${e.palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:e.palette.primary.main})));function tT(e){const t=Im({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,value:i}=t,a=Au(t,ZO),l=s.useRef(o);s.useEffect((()=>{l.current=o}),[o]);const c=bu({},t,{shouldAnimate:l.current!==o}),u=(e=>{const{classes:t}=e;return Gh({root:["root"],thumb:["thumb"]},XO,t)})(c);return(0,C.jsx)(QO,bu({style:(()=>{let e=360/("hours"===o?12:60)*i;return"hours"===o&&i>12&&(e-=360),{height:Math.round((r?.26:.4)*UO),transform:`rotateZ(${e}deg)`}})(),className:w_(n,u.root),ownerState:c},a,{children:(0,C.jsx)(eT,{ownerState:c,className:u.thumb})}))}function nT(e){return Jp("MuiClock",e)}Xp("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const rT=av("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),oT=av("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),iT=av("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),aT=av("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>bu({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),sT=av("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:e.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),lT=av(kS,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>bu({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,left:8},"am"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}}))),cT=av(kS,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>bu({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}})));function uT(e){const t=Im({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,date:a,getClockLabelText:l,handleMeridiemChange:c,isTimeDisabled:u,meridiemMode:d,minutesStep:f=1,onChange:p,selectedId:h,type:g,value:m,disabled:v,readOnly:b,className:y}=t,x=t,w=fj(),_=s.useContext(jO),S=s.useRef(!1),k=(e=>{const{classes:t}=e;return Gh({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},nT,t)})(x),E=u(m,g),j=!n&&"hours"===g&&(m<1||m>12),O=(e,t)=>{v||b||u(e,g)||p(e,t)},T=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===g||"minutes"===g?((e,t,n=1)=>{const r=6*n;let{value:o}=JO(r,e,t);return o=o*n%60,o})(r,o,f):((e,t,n)=>{const{value:r,distance:o}=JO(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,!!n);O(i,t)},I=s.useMemo((()=>"hours"===g||m%5==0),[g,m]),R="minutes"===g?f:1,P=s.useRef(null);ch((()=>{o&&P.current.focus()}),[o]);return(0,C.jsxs)(rT,{className:w_(y,k.root),children:[(0,C.jsxs)(oT,{className:k.clock,children:[(0,C.jsx)(aT,{onTouchMove:e=>{S.current=!0,T(e,"shallow")},onTouchEnd:e=>{S.current&&(T(e,"finish"),S.current=!1)},onMouseUp:e=>{S.current&&(S.current=!1),T(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&T(e.nativeEvent,"shallow")},ownerState:{disabled:v},className:k.squareMask}),!E&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(sT,{className:k.pin}),a&&(0,C.jsx)(tT,{type:g,value:m,isInner:j,hasSelected:I})]}),(0,C.jsx)(iT,{"aria-activedescendant":h,"aria-label":l(g,a,w),ref:P,role:"listbox",onKeyDown:e=>{if(!S.current)switch(e.key){case"Home":O(0,"partial"),e.preventDefault();break;case"End":O("minutes"===g?59:23,"partial"),e.preventDefault();break;case"ArrowUp":O(m+R,"partial"),e.preventDefault();break;case"ArrowDown":O(m-R,"partial"),e.preventDefault()}},tabIndex:0,className:k.wrapper,children:i})]}),n&&("desktop"===_||r)&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(lT,{onClick:b?void 0:()=>c("am"),disabled:v||null===d,ownerState:x,className:k.amButton,children:(0,C.jsx)(IS,{variant:"caption",children:"AM"})}),(0,C.jsx)(cT,{disabled:v||null===d,onClick:b?void 0:()=>c("pm"),ownerState:x,className:k.pmButton,children:(0,C.jsx)(IS,{variant:"caption",children:"PM"})})]})]})}function dT(e){return Jp("MuiClockNumber",e)}const fT=Xp("MuiClockNumber",["root","selected","disabled"]),pT=["className","disabled","index","inner","label","selected"],hT=av("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${fT.disabled}`]:t.disabled},{[`&.${fT.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>bu({height:GO,width:GO,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:e.palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:e.palette.background.paper},[`&.${fT.selected}`]:{color:e.palette.primary.contrastText},[`&.${fT.disabled}`]:{pointerEvents:"none",color:e.palette.text.disabled}},t.inner&&bu({},e.typography.body2,{color:e.palette.text.secondary}))));function gT(e){const t=Im({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Au(t,pT),c=t,u=(e=>{const{classes:t,selected:n,disabled:r}=e;return Gh({root:["root",n&&"selected",r&&"disabled"]},dT,t)})(c),d=o%12/12*Math.PI*2-Math.PI/2,f=91*(i?.65:1),p=Math.round(Math.cos(d)*f),h=Math.round(Math.sin(d)*f);return(0,C.jsx)(hT,bu({className:w_(n,u.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${p}px, ${h+92}px`},ownerState:c},l,{children:a}))}const mT=({ampm:e,date:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=i.formatNumber(a);const u=c(t);s.push((0,C.jsx)(gT,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},vT=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map((([e,i],a)=>{const s=e===t;return(0,C.jsx)(gT,{label:i,id:s?o:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(i)},e)}))};function bT(e){return Jp("MuiClockPicker",e)}Xp("MuiClockPicker",["root","arrowSwitcher"]);const yT=av(NO,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),xT=av(hO,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),wT=()=>{},_T=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiClockPicker"}),{ampm:r=!1,ampmInClock:o=!1,autoFocus:i,components:a,componentsProps:l,date:c,disableIgnoringDatePartForTimeValidation:u,getClockLabelText:d,getHoursClockNumberText:f,getMinutesClockNumberText:p,getSecondsClockNumberText:h,leftArrowButtonText:g,maxTime:m,minTime:v,minutesStep:b=1,rightArrowButtonText:y,shouldDisableTime:x,showViewSwitcher:w,onChange:_,view:S,views:k=["hours","minutes"],openTo:E,onViewChange:j,className:O,disabled:T,readOnly:I}=n;wT({leftArrowButtonText:g,rightArrowButtonText:y,getClockLabelText:d,getHoursClockNumberText:f,getMinutesClockNumberText:p,getSecondsClockNumberText:h});const R=hj(),P=g??R.openPreviousView,M=y??R.openNextView,A=d??R.clockLabelText,D=f??R.hoursClockNumberText,F=p??R.minutesClockNumberText,L=h??R.secondsClockNumberText,{openView:N,setOpenView:B,nextView:z,previousView:$,handleChangeAndOpenNext:V}=nO({view:S,views:k,openTo:E,onViewChange:j,onChange:_}),H=gj(),K=fj(),U=s.useMemo((()=>c||K.setSeconds(K.setMinutes(K.setHours(H,0),0),0)),[c,H,K]),{meridiemMode:G,handleMeridiemChange:W}=bO(U,r,V),q=s.useCallback(((e,t)=>{const n=vO(u,K),o=({start:e,end:t})=>!(v&&n(v,t)||m&&n(e,m)),i=(e,n=1)=>e%n===0&&(!x||!x(e,t));switch(t){case"hours":{const t=gO(e,G,r),n=K.setHours(U,t);return!o({start:K.setSeconds(K.setMinutes(n,0),0),end:K.setSeconds(K.setMinutes(n,59),59)})||!i(t)}case"minutes":{const t=K.setMinutes(U,e);return!o({start:K.setSeconds(t,0),end:K.setSeconds(t,59)})||!i(e,b)}case"seconds":{const t=K.setSeconds(U,e);return!o({start:t,end:t})||!i(e)}default:throw new Error("not supported")}}),[r,U,u,m,G,v,b,x,K]),Y=Eh(),J=s.useMemo((()=>{switch(N){case"hours":{const e=(e,t)=>{const n=gO(e,G,r);V(K.setHours(U,n),t)};return{onChange:e,value:K.getHours(U),children:mT({date:c,utils:K,ampm:r,onChange:e,getClockNumberText:D,isDisabled:e=>T||q(e,"hours"),selectedId:Y})}}case"minutes":{const e=K.getMinutes(U),t=(e,t)=>{V(K.setMinutes(U,e),t)};return{value:e,onChange:t,children:vT({utils:K,value:e,onChange:t,getClockNumberText:F,isDisabled:e=>T||q(e,"minutes"),selectedId:Y})}}case"seconds":{const e=K.getSeconds(U),t=(e,t)=>{V(K.setSeconds(U,e),t)};return{value:e,onChange:t,children:vT({utils:K,value:e,onChange:t,getClockNumberText:L,isDisabled:e=>T||q(e,"seconds"),selectedId:Y})}}default:throw new Error("You must provide the type for ClockView")}}),[N,K,c,r,D,F,L,G,V,U,q,Y,T]),X=n,Z=(e=>{const{classes:t}=e;return Gh({root:["root"],arrowSwitcher:["arrowSwitcher"]},bT,t)})(X);return(0,C.jsxs)(yT,{ref:t,className:w_(Z.root,O),ownerState:X,children:[w&&(0,C.jsx)(xT,{className:Z.arrowSwitcher,leftArrowButtonText:P,rightArrowButtonText:M,components:a,componentsProps:l,onLeftClick:()=>B($),onRightClick:()=>B(z),isLeftDisabled:!$,isRightDisabled:!z,ownerState:X}),(0,C.jsx)(uT,bu({autoFocus:i,date:c,ampmInClock:o,type:N,ampm:r,getClockLabelText:A,minutesStep:b,isTimeDisabled:q,meridiemMode:G,handleMeridiemChange:W,selectedId:Y,disabled:T,readOnly:I},J))]})})),ST=e=>1===e.length&&"year"===e[0],kT=e=>2===e.length&&-1!==e.indexOf("month")&&-1!==e.indexOf("year");function ET(e,t){var n;const r=fj(),o=pj(),i=Im({props:e,name:t}),a=null!=(n=i.views)?n:["year","day"];return bu({openTo:"day",disableFuture:!1,disablePast:!1},((e,t)=>ST(e)?{inputFormat:t.formats.year}:kT(e)?{disableMaskedInput:!0,inputFormat:t.formats.monthAndYear}:{inputFormat:t.formats.keyboardDate})(a,r),i,{views:a,minDate:yj(r,i.minDate,o.minDate),maxDate:yj(r,i.maxDate,o.maxDate)})}const CT={emptyValue:null,getTodayValue:e=>e.date(),parseInput:bj,areValuesEqual:(e,t,n)=>e.isEqual(t,n)};function jT(e){return Jp("MuiPickersToolbar",e)}const OT=Xp("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),TT=av("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>bu({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),IT=av(xC,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>bu({flex:1},!e.isLandscape&&{alignItems:"center"}))),RT=av(kS,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{[`&.${OT.penIconButtonLandscape}`]:t.penIconButtonLandscape},t.penIconButton]})({}),PT=e=>"clock"===e?(0,C.jsx)(sO,{color:"inherit"}):(0,C.jsx)(aO,{color:"inherit"}),MT=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,getMobileKeyboardInputViewButtonText:i,isLandscape:a,isMobileKeyboardViewOpen:s,landscapeDirection:l="column",toggleMobileKeyboardView:c,toolbarTitle:u,viewType:d="calendar"}=n,f=n,p=hj(),h=(e=>{const{classes:t,isLandscape:n}=e;return Gh({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},jT,t)})(f);return(0,C.jsxs)(TT,{ref:t,className:w_(h.root,o),ownerState:f,children:[(0,C.jsx)(IS,{color:"text.secondary",variant:"overline",children:u}),(0,C.jsxs)(IT,{container:!0,justifyContent:"space-between",className:h.content,ownerState:f,direction:a?l:"row",alignItems:a?"flex-start":"flex-end",children:[r,(0,C.jsx)(RT,{onClick:c,className:h.penIconButton,ownerState:f,color:"inherit","aria-label":i?i(s,d):p.inputModeToggleButtonAriaLabel(s,d),children:s?PT(d):(0,C.jsx)(lO,{color:"inherit"})})]})]})}));function AT(e){return Jp("MuiDatePickerToolbar",e)}Xp("MuiDatePickerToolbar",["root","title"]);const DT=["parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],FT=av(MT,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),LT=av(IS,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((({ownerState:e})=>bu({},e.isLandscape&&{margin:"auto 16px auto auto"}))),NT=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiDatePickerToolbar"}),{parsedValue:r,isLandscape:o,isMobileKeyboardViewOpen:i,toggleMobileKeyboardView:a,toolbarFormat:l,toolbarPlaceholder:c="––",toolbarTitle:u,views:d}=n,f=Au(n,DT),p=fj(),h=hj(),g=(e=>{const{classes:t}=e;return Gh({root:["root"],title:["title"]},AT,t)})(n),m=u??h.datePickerDefaultToolbarTitle,v=s.useMemo((()=>r?l?p.formatByString(r,l):ST(d)?p.format(r,"year"):kT(d)?p.format(r,"month"):/en/.test(p.getCurrentLocaleCode())?p.format(r,"normalDateWithWeekday"):p.format(r,"normalDate"):c),[r,l,c,p,d]),b=n;return(0,C.jsx)(FT,bu({ref:t,toolbarTitle:m,isMobileKeyboardViewOpen:i,toggleMobileKeyboardView:a,isLandscape:o,className:g.root},f,{children:(0,C.jsx)(LT,{variant:"h4",align:o?"left":"center",ownerState:b,className:g.title,children:v})}))})),BT=["onAccept","onClear","onCancel","onSetToday","actions"],zT=e=>{const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Au(e,BT),l=s.useContext(jO),c=hj(),u="function"==typeof i?i(l):i;if(null==u||0===u.length)return null;const d=null==u?void 0:u.map((e=>{switch(e){case"clear":return(0,C.jsx)(IE,{onClick:n,children:c.clearButtonLabel},e);case"cancel":return(0,C.jsx)(IE,{onClick:r,children:c.cancelButtonLabel},e);case"accept":return(0,C.jsx)(IE,{onClick:t,children:c.okButtonLabel},e);case"today":return(0,C.jsx)(IE,{onClick:o,children:c.todayButtonLabel},e);default:return null}}));return(0,C.jsx)(iC,bu({},a,{children:d}))};function $T(e){return Jp("MuiPickersPopper",e)}Xp("MuiPickersPopper",["root","paper"]);const VT=["onClick","onTouchStart"],HT=av(fE,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),KT=av(tS,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>bu({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));function UT(e){var t;const n=Im({props:e,name:"MuiPickersPopper"}),{anchorEl:r,children:o,containerRef:i=null,onBlur:a,onClose:l,onClear:c,onAccept:u,onCancel:d,onSetToday:f,open:p,PopperProps:h,role:g,TransitionComponent:m=EC,TrapFocusProps:v,PaperProps:b={},components:y,componentsProps:x}=n;s.useEffect((()=>{function e(e){p&&("Escape"===e.key||"Esc"===e.key)&&l()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[l,p]);const w=s.useRef(null);s.useEffect((()=>{"tooltip"!==g&&(p?w.current=oj(document):w.current&&w.current instanceof HTMLElement&&setTimeout((()=>{w.current instanceof HTMLElement&&w.current.focus()})))}),[p,g]);const[_,S,k]=function(e,t){const n=s.useRef(!1),r=s.useRef(!1),o=s.useRef(null),i=s.useRef(!1);s.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}}),[e]);const a=jh((e=>{if(!i.current)return;const a=r.current;r.current=!1;const s=xh(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),!l&&!a&&t(e)})),l=()=>{r.current=!0};return s.useEffect((()=>{if(e){const e=xh(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}}),[e,a]),s.useEffect((()=>{if(e){const e=xh(o.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}}),[e,a]),[o,l,l]}(p,a??l),E=Oh(s.useRef(null),i),j=Oh(E,_),O=n,T=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"]},$T,t)})(O),{onClick:I,onTouchStart:R}=b,P=Au(b,VT),M=null!=(t=null==y?void 0:y.ActionBar)?t:zT,A=(null==y?void 0:y.PaperContent)||s.Fragment;return(0,C.jsx)(HT,bu({transition:!0,role:g,open:p,anchorEl:r,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),l())},className:T.root},h,{children:({TransitionProps:e,placement:t})=>(0,C.jsx)(BE,bu({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===g,isEnabled:()=>!0},v,{children:(0,C.jsx)(m,bu({},e,{children:(0,C.jsx)(KT,bu({tabIndex:-1,elevation:8,ref:j,onClick:e=>{S(e),I&&I(e)},onTouchStart:e=>{k(e),R&&R(e)},ownerState:bu({},O,{placement:t}),className:T.paper},P,{children:(0,C.jsxs)(A,bu({},null==x?void 0:x.paperContent,{children:[o,(0,C.jsx)(M,bu({onAccept:u,onClear:c,onCancel:d,onSetToday:f,actions:[]},null==x?void 0:x.actionBar))]}))}))}))}))}))}function GT(e){const{children:t,DateInputProps:n,KeyboardDateInputComponent:r,onClear:o,onDismiss:i,onCancel:a,onAccept:l,onSetToday:c,open:u,PopperProps:d,PaperProps:f,TransitionComponent:p,components:h,componentsProps:g}=e,m=s.useRef(null),v=Oh(n.inputRef,m);return(0,C.jsxs)(jO.Provider,{value:"desktop",children:[(0,C.jsx)(r,bu({},n,{inputRef:v})),(0,C.jsx)(UT,{role:"dialog",open:u,anchorEl:m.current,TransitionComponent:p,PopperProps:d,PaperProps:f,onClose:i,onCancel:a,onClear:o,onAccept:l,onSetToday:c,components:h,componentsProps:g,children:t})]})}const WT=(e,t,n)=>{const r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""},qT="_",YT="2019-11-21T22:30:00.000",JT="2019-01-01T09:00:00.000";function XT(e,t,n,r){if(!e)return!1;const o=r.formatByString(r.date(JT),t).replace(n,qT),i=r.formatByString(r.date(YT),t).replace(n,"_"),a=i===o&&e===i;return!a&&r.lib,a}const ZT=({acceptRegex:e=/[\d]/gi,disabled:t,disableMaskedInput:n,ignoreInvalidInputs:r,inputFormat:o,inputProps:i,label:a,mask:l,onChange:c,rawValue:u,readOnly:d,rifmFormatter:f,TextFieldProps:p,validationError:h})=>{const g=fj(),m=g.getFormatHelperText(o),{shouldUseMaskedInput:v,maskToUse:b}=s.useMemo((()=>{if(n)return{shouldUseMaskedInput:!1,maskToUse:""};const t=function(e,t,n,r){if(e)return e;const o=r.formatByString(r.date(JT),t).replace(n,qT);return o===r.formatByString(r.date(YT),t).replace(n,"_")?o:""}(l,o,e,g);return{shouldUseMaskedInput:XT(t,o,e,g),maskToUse:t}}),[e,n,o,l,g]),y=s.useMemo((()=>v&&b?((e,t)=>n=>{let r=0;return n.split("").map(((o,i)=>{if(t.lastIndex=0,r>e.length-1)return"";const a=e[r],s=e[r+1],l=t.test(o)?o:"",c=a===qT?l:a+l;return r+=c.length,i===n.length-1&&s&&s!==qT?c?c+s:"":c})).join("")})(b,e):e=>e),[e,b,v]),x=null===u?null:g.date(u),[w,_]=s.useState(x),[S,k]=s.useState(WT(g,u,o)),E=s.useRef(),C=s.useRef(g.locale),j=s.useRef(o);s.useEffect((()=>{const e=u!==E.current,t=g.locale!==C.current,n=o!==j.current;if(E.current=u,C.current=g.locale,j.current=o,!e&&!t&&!n)return;const r=null===u?null:g.date(u),i=null===u||g.isValid(r);let a=null===w&&null===r;if(null!==w&&null!==r){const e=g.isEqual(w,r);if(e)a=!0;else{const t=Math.abs(g.getDiff(w,r));a=0===t?e:t<1e3}}if(!t&&!n&&(!i||a))return;const s=WT(g,u,o);_(r),k(s)}),[g,u,o,w]);const O=e=>{const t=""===e||e===l?"":e;k(t);const n=null===t?null:g.parse(t,o);r&&!g.isValid(n)||(_(n),c(n,t||void 0))},T=(e=>{const[,t]=(0,s.useReducer)((e=>e+1),0),n=(0,s.useRef)(null),{replace:r,append:o}=e,i=r?r(e.format(e.value)):e.format(e.value),a=(0,s.useRef)(!1);return(0,s.useLayoutEffect)((()=>{if(null==n.current)return;let[a,s,l,c,u]=n.current;n.current=null;const d=c&&u,f=a.slice(s.selectionStart).search(e.accept||/\d/g),p=-1!==f?f:0,h=t=>(t.match(e.accept||/\d/g)||[]).join(""),g=h(a.substr(0,s.selectionStart)),m=e=>{let t=0,n=0;for(let r=0;r!==g.length;++r){let o=e.indexOf(g[r],t)+1,i=h(e).indexOf(g[r],n)+1;i-n>1&&(o=t,i=n),n=Math.max(i,n),t=Math.max(t,o)}return t};if(!0===e.mask&&l&&!u){let e=m(a);const t=h(a.substr(e))[0];e=a.indexOf(t,e),a=`${a.substr(0,e)}${a.substr(e+1)}`}let v=e.format(a);null!=o&&s.selectionStart===a.length&&!u&&(l?v=o(v):""===h(v.slice(-1))&&(v=v.slice(0,-1)));const b=r?r(v):v;return i===b?t():e.onChange(b),()=>{let t=m(v);if(null!=e.mask&&(l||c&&!d))for(;v[t]&&""===h(v[t]);)t+=1;s.selectionStart=s.selectionEnd=t+(d?1+p:0)}})),(0,s.useEffect)((()=>{const e=e=>{"Delete"===e.code&&(a.current=!0)},t=e=>{"Delete"===e.code&&(a.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),{value:null!=n.current?n.current[0]:i,onChange:r=>{const o=r.target.value;n.current=[o,r.target,o.length>i.length,a.current,i===e.format(o)],t()}}})({value:S,onChange:O,format:f||y});return bu({label:a,disabled:t,error:h,inputProps:bu({},v?T:{value:S,onChange:e=>{O(e.currentTarget.value)}},{disabled:t,placeholder:m,readOnly:d,type:v?"tel":"text"},i)},p)},QT=["className","components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],eI=s.forwardRef((function(e,t){const{className:n,components:r={},disableOpenPicker:o,getOpenDialogAriaText:i,InputAdornmentProps:a,InputProps:s,inputRef:l,openPicker:c,OpenPickerButtonProps:u,renderInput:d}=e,f=Au(e,QT),p=hj(),h=i??p.openDatePickerDialogue,g=fj(),m=ZT(f),v=(null==a?void 0:a.position)||"end",b=r.OpenPickerIcon||aO;return d(bu({ref:t,inputRef:l,className:n},m,{InputProps:bu({},s,{[`${v}Adornment`]:o?void 0:(0,C.jsx)(RC,bu({position:v},a,{children:(0,C.jsx)(kS,bu({edge:v,disabled:f.disabled||f.readOnly,"aria-label":h(f.rawValue,g)},u,{onClick:c,children:(0,C.jsx)(b,{})}))}))})}))}));function tI(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function nI(e){return Jp("MuiCalendarOrClockPicker",e)}Xp("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);const rI=["autoFocus","className","parsedValue","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","dateRangeIcon","timeIcon","hideTabs","classes"],oI=av("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),iI=av("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e})=>bu({display:"flex",flexDirection:"column"},e.isLandscape&&{flexDirection:"row"}))),aI={fullWidth:!0},sI=e=>"year"===e||"month"===e||"day"===e,lI=e=>"hours"===e||"minutes"===e||"seconds"===e;function cI(e){var t,n;const r=Im({props:e,name:"MuiCalendarOrClockPicker"}),{autoFocus:o,parsedValue:i,DateInputProps:a,isMobileKeyboardViewOpen:l,onDateChange:c,onViewChange:u,openTo:d,orientation:f,showToolbar:p,toggleMobileKeyboardView:h,ToolbarComponent:g=()=>null,toolbarFormat:m,toolbarPlaceholder:v,toolbarTitle:b,views:y,dateRangeIcon:x,timeIcon:w,hideTabs:_}=r,S=Au(r,rI),k=null==(t=S.components)?void 0:t.Tabs,E=((e,t)=>{const[n,r]=s.useState(tI);return ch((()=>{const e=()=>{r(tI())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),!nj(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(y,f),j=s.useContext(jO),O=(e=>{const{classes:t}=e;return Gh({root:["root"],mobileKeyboardInputView:["mobileKeyboardInputView"]},nI,t)})(r),T=p??"desktop"!==j,I=!_&&typeof window<"u"&&window.innerHeight>667,R=s.useCallback(((e,t)=>{c(e,j,t)}),[c,j]),P=s.useCallback((e=>{l&&h(),u&&u(e)}),[l,u,h]),{openView:M,setOpenView:A,handleChangeAndOpenNext:D}=nO({view:void 0,views:y,openTo:d,onChange:R,onViewChange:P}),{focusedView:F,setFocusedView:L}=(({autoFocus:e,openView:t})=>{const[n,r]=s.useState(e?t:null),o=s.useCallback((e=>t=>{r(t?e:t=>e===t?null:t)}),[]);return{focusedView:n,setFocusedView:o}})({autoFocus:o,openView:M});return(0,C.jsxs)(iI,{ownerState:{isLandscape:E},className:O.root,children:[T&&(0,C.jsx)(g,bu({},S,{views:y,isLandscape:E,parsedValue:i,onChange:R,setOpenView:A,openView:M,toolbarTitle:b,toolbarFormat:m,toolbarPlaceholder:v,isMobileKeyboardViewOpen:l,toggleMobileKeyboardView:h})),I&&!!k&&(0,C.jsx)(k,bu({dateRangeIcon:x,timeIcon:w,view:M,onChange:A},null==(n=S.componentsProps)?void 0:n.tabs)),(0,C.jsx)(NO,{children:l?(0,C.jsx)(oI,{className:O.mobileKeyboardInputView,children:(0,C.jsx)(eI,bu({},a,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:aI}))}):(0,C.jsxs)(s.Fragment,{children:[sI(M)&&(0,C.jsx)(KO,bu({autoFocus:o,date:i,onViewChange:A,onChange:D,view:M,views:y.filter(sI),focusedView:F,onFocusedViewChange:L},S)),lI(M)&&(0,C.jsx)(_T,bu({},S,{autoFocus:o,date:i,view:M,views:y.filter(lI),onChange:D,onViewChange:A,showViewSwitcher:"desktop"===j}))]})})]})}const uI=(e,t)=>{const{onAccept:n,onChange:r,value:o,closeOnSelect:i}=e,a=fj(),{isOpen:l,setIsOpen:c}=(({open:e,onOpen:t,onClose:n})=>{const r=s.useRef("boolean"==typeof e).current,[o,i]=s.useState(!1);s.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}}),[r,e]);const a=s.useCallback((e=>{r||i(e),e&&t&&t(),!e&&n&&n()}),[r,t,n]);return{isOpen:o,setIsOpen:a}})(e),u=s.useMemo((()=>t.parseInput(a,o)),[t,a,o]),[d,f]=s.useState(u),[p,h]=s.useState((()=>({committed:u,draft:u,resetFallback:u}))),g=s.useCallback((e=>{h((t=>{switch(e.action){case"setAll":case"acceptAndClose":return{draft:e.value,committed:e.value,resetFallback:e.value};case"setCommitted":return bu({},t,{draft:e.value,committed:e.value});case"setDraft":return bu({},t,{draft:e.value});default:return t}})),(e.forceOnChangeCall||!e.skipOnChangeCall&&!t.areValuesEqual(a,p.committed,e.value))&&r(e.value),"acceptAndClose"===e.action&&(c(!1),n&&!t.areValuesEqual(a,p.resetFallback,e.value)&&n(e.value))}),[n,r,c,p,a,t]);s.useEffect((()=>{a.isValid(u)&&f(u)}),[a,u]),s.useEffect((()=>{l&&g({action:"setAll",value:u,skipOnChangeCall:!0})}),[l]),t.areValuesEqual(a,p.committed,u)||g({action:"setCommitted",value:u,skipOnChangeCall:!0});const m=s.useMemo((()=>({open:l,onClear:()=>{g({value:t.emptyValue,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,o,t.emptyValue)})},onAccept:()=>{g({value:p.draft,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,o,u)})},onDismiss:()=>{g({value:p.committed,action:"acceptAndClose"})},onCancel:()=>{g({value:p.resetFallback,action:"acceptAndClose"})},onSetToday:()=>{g({value:t.getTodayValue(a),action:"acceptAndClose"})}})),[g,l,a,p,t,o,u]),[v,b]=s.useState(!1),y=s.useMemo((()=>({parsedValue:p.draft,isMobileKeyboardViewOpen:v,toggleMobileKeyboardView:()=>b(!v),onDateChange:(e,t,n="partial")=>{switch(n){case"shallow":return g({action:"setDraft",value:e,skipOnChangeCall:!0});case"partial":return g({action:"setDraft",value:e});case"finish":return g(i??"desktop"===t?{value:e,action:"acceptAndClose"}:{value:e,action:"setCommitted"});default:throw new Error("MUI: Invalid selectionState passed to `onDateChange`")}}})),[g,v,p.draft,i]),x=s.useCallback(((e,n)=>{const o=t.valueReducer?t.valueReducer(a,d,e):e;r(o,n)}),[r,t,d,a]),w={pickerProps:y,inputProps:s.useMemo((()=>({onChange:x,open:l,rawValue:o,openPicker:()=>c(!0)})),[x,l,o,c]),wrapperProps:m};return s.useDebugValue(w,(()=>({MuiPickerState:{dateState:p,other:w}}))),w},dI=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],fI=s.forwardRef((function(e,t){const n=ET(e,"MuiDesktopDatePicker"),r=null!==jj(n),{pickerProps:o,inputProps:i,wrapperProps:a}=uI(n,CT),{PopperProps:s,PaperProps:l,ToolbarComponent:c=NT,TransitionComponent:u,components:d,componentsProps:f}=n,p=Au(n,dI),h=bu({},i,p,{components:d,componentsProps:f,ref:t,validationError:r});return(0,C.jsx)(GT,bu({},a,{DateInputProps:h,KeyboardDateInputComponent:eI,PopperProps:s,PaperProps:l,TransitionComponent:u,components:d,componentsProps:f,children:(0,C.jsx)(cI,bu({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:h,components:d,componentsProps:f},p))}))})),pI=av(tC)({[`& .${qE.container}`]:{outline:0},[`& .${qE.paper}`]:{outline:0,minWidth:320}}),hI=av(uC)({"&:first-of-type":{padding:0}}),gI=e=>{var t;const{children:n,DialogProps:r={},onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:u,componentsProps:d}=e,f=null!=(t=null==u?void 0:u.ActionBar)?t:zT;return(0,C.jsxs)(pI,bu({open:c,onClose:a},r,{children:[(0,C.jsx)(hI,{children:n}),(0,C.jsx)(f,bu({onAccept:o,onClear:i,onCancel:s,onSetToday:l,actions:["cancel","accept"]},null==d?void 0:d.actionBar))]}))},mI=["children","DateInputProps","DialogProps","onAccept","onClear","onDismiss","onCancel","onSetToday","open","PureDateInputComponent","components","componentsProps"];function vI(e){const{children:t,DateInputProps:n,DialogProps:r,onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,PureDateInputComponent:u,components:d,componentsProps:f}=e,p=Au(e,mI);return(0,C.jsxs)(jO.Provider,{value:"mobile",children:[(0,C.jsx)(u,bu({components:d},p,n)),(0,C.jsx)(gI,{DialogProps:r,onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:d,componentsProps:f,children:t})]})}const bI=s.forwardRef((function(e,t){const{disabled:n,getOpenDialogAriaText:r,inputFormat:o,InputProps:i,inputRef:a,label:l,openPicker:c,rawValue:u,renderInput:d,TextFieldProps:f={},validationError:p,className:h}=e,g=hj(),m=r??g.openDatePickerDialogue,v=fj(),b=s.useMemo((()=>bu({},i,{readOnly:!0})),[i]),y=WT(v,u,o),x=jh((e=>{e.stopPropagation(),c()}));return d(bu({label:l,disabled:n,ref:t,inputRef:a,error:p,InputProps:b,className:h},!e.readOnly&&!e.disabled&&{onClick:x},{inputProps:bu({disabled:n,readOnly:!0,"aria-readonly":!0,"aria-label":m(u,v),value:y},!e.readOnly&&{onClick:x},{onKeyDown:rj(c)})},f))})),yI=["ToolbarComponent","value","onChange","components","componentsProps"],xI=s.forwardRef((function(e,t){const n=ET(e,"MuiMobileDatePicker"),r=null!==jj(n),{pickerProps:o,inputProps:i,wrapperProps:a}=uI(n,CT),{ToolbarComponent:s=NT,components:l,componentsProps:c}=n,u=Au(n,yI),d=bu({},i,u,{components:l,componentsProps:c,ref:t,validationError:r});return(0,C.jsx)(vI,bu({},u,a,{DateInputProps:d,PureDateInputComponent:bI,components:l,componentsProps:c,children:(0,C.jsx)(cI,bu({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:d,components:l,componentsProps:c},u))}))})),wI=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],_I=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:o,PopperProps:i,TransitionComponent:a}=n,s=Au(n,wI);return ph(r,{defaultMatches:!0})?(0,C.jsx)(fI,bu({ref:t,PopperProps:i,TransitionComponent:a},s)):(0,C.jsx)(xI,bu({ref:t,DialogProps:o},s))}));function SI(e){return Jp("PrivatePickersToolbarText",e)}const kI=Xp("PrivatePickersToolbarText",["root","selected"]),EI=["className","selected","value"],CI=av(IS,{name:"PrivatePickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${kI.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:e.palette.text.secondary,[`&.${kI.selected}`]:{color:e.palette.text.primary}}))),jI=s.forwardRef((function(e,t){const{className:n,value:r}=e,o=Au(e,EI),i=(e=>{const{classes:t,selected:n}=e;return Gh({root:["root",n&&"selected"]},SI,t)})(e);return(0,C.jsx)(CI,bu({ref:t,className:w_(n,i.root),component:"span"},o,{children:r}))}));av(IE,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"});Xp("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","separator"]);av(MT,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",[`& .${OT.penIconButton}`]:bu({position:"absolute",top:8},"rtl"===e.direction?{left:8}:{right:8})}))),av("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),av("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex"}),av(jI,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default"});Xp("MuiDateTimePickerTabs",["root"]);av(tj,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e,theme:t})=>bu({boxShadow:`0 -1px 0 0 inset ${t.palette.divider}`},"desktop"===e.wrapperVariant&&{order:1,boxShadow:`0 1px 0 0 inset ${t.palette.divider}`,[`& .${KC.indicator}`]:{bottom:"auto",top:0}})));const OI=Xp("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]);av(MT,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({[`& .${OT.penIconButtonLandscape}`]:{marginTop:"auto"}}),av(jI,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),av("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${OI.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${OI.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})((({theme:e,ownerState:t})=>bu({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},t.isLandscape&&{marginTop:"auto"},"rtl"===e.direction&&{flexDirection:"row-reverse"}))),av("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${OI.ampmLabel}`]:t.ampmLabel},{[`&.${OI.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>bu({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{[`& .${OI.ampmLabel}`]:{fontSize:17}})));function TI(e,t,n){return(t=rg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function II(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?II(Object(n),!0).forEach((function(t){TI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):II(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MI(e,t){if(e){if("string"==typeof e)return PI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?PI(e,t):void 0}}function AI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||MI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DI(e,t){if(null==e)return{};var n,r,o=Au(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var FI=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function LI(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,g=DI(e,FI),m=AI((0,s.useState)(void 0!==l?l:n),2),v=m[0],b=m[1],y=AI((0,s.useState)(void 0!==c?c:o),2),x=y[0],w=y[1],_=AI((0,s.useState)(void 0!==h?h:a),2),S=_[0],k=_[1],E=(0,s.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),C=(0,s.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),j=(0,s.useCallback)((function(){"function"==typeof p&&p(),w(!0)}),[p]),O=(0,s.useCallback)((function(){"function"==typeof f&&f(),w(!1)}),[f]),T=void 0!==l?l:v,I=void 0!==c?c:x,R=void 0!==h?h:S;return RI(RI({},g),{},{inputValue:T,menuIsOpen:I,onChange:E,onInputChange:C,onMenuClose:O,onMenuOpen:j,value:R})}function NI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rg(r.key),r)}}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BI(e)}function zI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(zI=function(){return!!e})()}function $I(e){var t=zI();return function(){var n,r=BI(e);if(t){var o=BI(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==ng(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H_(e)}(this,n)}}function VI(e){return function(e){if(Array.isArray(e))return PI(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||MI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var HI=s.useLayoutEffect,KI=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],UI=function(){};function GI(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function WI(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(GI(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var qI=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===ng(e)&&null!==e?[e]:[]},YI=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,RI({},DI(e,KI))},JI=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(n??{},i(t,e),a)}};function XI(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ZI(e){return XI(e)?window.pageYOffset:e.scrollTop}function QI(e,t){XI(e)?window.scrollTo(0,t):e.scrollTop=t}function eR(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:UI,o=ZI(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);QI(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function tR(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?QI(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&QI(e,Math.max(t.offsetTop-o,0))}function nR(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var rR=!1,oR={get passive(){return rR=!0}},iR=typeof window<"u"?window:{};iR.addEventListener&&iR.removeEventListener&&(iR.addEventListener("p",UI,oR),iR.removeEventListener("p",UI,!1));var aR=rR;function sR(e){return null!=e}function lR(e,t,n){return e?t:n}var cR=["children","innerProps"],uR=["children","innerProps"];function dR(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,p=d.height,h=d.top,g=n.offsetParent.getBoundingClientRect().top,m=a?window.innerHeight:function(e){return XI(e)?window.innerHeight:e.clientHeight}(l),v=ZI(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=g-y,w=m-h,_=x+v,S=u-v-h,k=f-m+v+b,E=v+h-y,C=160;switch(o){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!a)return i&&eR(l,k,C),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&w>=r)return i&&eR(l,k,C),{placement:"bottom",maxHeight:a?w-b:S-b};if("auto"===o||a){var j=t,O=a?x:_;return O>=r&&(j=Math.min(O-b-s,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return i&&QI(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(_>=p&&!a)return i&&eR(l,E,C),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&x>=r){var T=t;return(!a&&_>=r||a&&x>=r)&&(T=a?x-y:_-y),i&&eR(l,E,C),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var fR,pR=function(e){return"auto"===e?"bottom":e},hR=(0,s.createContext)(null),gR=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=((0,s.useContext)(hR)||{}).setPortalPlacement,u=(0,s.useRef)(null),d=AI((0,s.useState)(r),2),f=d[0],p=d[1],h=AI((0,s.useState)(null),2),g=h[0],m=h[1],v=l.spacing.controlHeight;return HI((function(){var e=u.current;if(e){var t="fixed"===i,s=dR({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});p(s.maxHeight),m(s.placement),null==c||c(s.placement)}}),[r,o,i,a,n,c,v]),t({ref:u,placerProps:RI(RI({},e),{},{placement:g||pR(o),maxHeight:f})})},mR=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return mf("div",bu({},JI(e,"menu",{menu:!0}),{ref:n},r),t)},vR=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return RI({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},bR=vR,yR=vR,xR=["size"],wR=["innerProps","isRtl","size"];var _R={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},SR=function(e){var t=e.size,n=DI(e,xR);return mf("svg",bu({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_R},n))},kR=function(e){return mf(SR,bu({size:20},e),mf("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"}))},ER=function(e){return mf(SR,bu({size:20},e),mf("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"}))},CR=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return RI({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},jR=CR,OR=CR,TR=yf(fR||(fR=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),IR=function(e){var t=e.delay,n=e.offset;return mf("span",{css:bf({animation:"".concat(TR," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},RR=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return mf("div",bu({ref:o},JI(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},PR=["data"],MR=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return mf("div",bu({},JI(e,"group",{group:!0}),s),mf(i,bu({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),mf("div",null,t))},AR=["innerRef","isDisabled","isHidden","inputClassName"],DR={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},FR={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":RI({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},DR)},LR=function(e){return RI({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},DR)},NR=function(e){var t=e.cx,n=e.value,r=YI(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=DI(r,AR);return mf("div",bu({},JI(e,"input",{"input-container":!0}),{"data-value":n||""}),mf("input",bu({className:t({input:!0},s),ref:o,style:LR(a),disabled:i},l)))},BR=function(e){var t=e.children,n=e.innerProps;return mf("div",n,t)};var zR=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return mf(l,{data:r,innerProps:RI(RI({},JI(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},mf(c,{data:r,innerProps:RI({},JI(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),mf(u,{data:r,innerProps:RI(RI({},JI(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},$R=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return mf("div",bu({},JI(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},VR=function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"placeholder",{placeholder:!0}),n),t)},HR=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return mf("div",bu({},JI(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},KR={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||mf(kR,null))},Control:RR,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||mf(ER,null))},DownChevron:ER,CrossIcon:kR,Group:MR,GroupHeading:function(e){var t=YI(e);t.data;var n=DI(t,PR);return mf("div",bu({},JI(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return mf("span",bu({},t,JI(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:NR,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=DI(e,wR);return mf("div",bu({},JI(RI(RI({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),mf(IR,{delay:0,offset:n}),mf(IR,{delay:160,offset:!0}),mf(IR,{delay:320,offset:!n}))},Menu:mR,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return mf("div",bu({},JI(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,l=(0,s.useRef)(null),c=(0,s.useRef)(null),u=AI((0,s.useState)(pR(i)),2),d=u[0],f=u[1],p=(0,s.useMemo)((function(){return{setPortalPlacement:f}}),[]),h=AI((0,s.useState)(null),2),g=h[0],m=h[1],v=(0,s.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[d]+t;(n!==(null==g?void 0:g.offset)||e.left!==(null==g?void 0:g.rect.left)||e.width!==(null==g?void 0:g.rect.width))&&m({offset:n,rect:e})}}),[r,a,d,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);HI((function(){v()}),[v]);var b=(0,s.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=zy(r,l.current,v,{elementResize:"ResizeObserver"in window}))}),[r,v]);HI((function(){b()}),[b]);var y=(0,s.useCallback)((function(e){l.current=e,b()}),[b]);if(!t&&"fixed"!==a||!g)return null;var x=mf("div",bu({ref:y},JI(RI(RI({},e),{},{offset:g.offset,position:a,rect:g.rect}),"menuPortal",{"menu-portal":!0}),o),n);return mf(hR.Provider,{value:p},t?(0,cc.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=DI(e,uR);return mf("div",bu({},JI(RI(RI({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=DI(e,cR);return mf("div",bu({},JI(RI(RI({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:zR,MultiValueContainer:BR,MultiValueLabel:BR,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({role:"button"},n),t||mf(kR,{size:14}))},Option:$R,Placeholder:VR,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return mf("div",bu({},JI(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:HR,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return mf("div",bu({},JI(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},UR=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function GR(e,t){return!!(e===t||UR(e)&&UR(t))}function WR(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!GR(e[n],t[n]))return!1;return!0}for(var qR={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"},YR=function(e){return mf("span",bu({css:qR},e))},JR={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},XR=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,g=l.isOptionDisabled,m=l.isSearchable,v=l.menuIsOpen,b=l.options,y=l.screenReaderStatus,x=l.tabSelectsValue,w=l.isLoading,_=l["aria-label"],S=l["aria-live"],k=(0,s.useMemo)((function(){return RI(RI({},JR),d||{})}),[d]),E=(0,s.useMemo)((function(){var e="";if(t&&k.onChange){var n=t.option,r=t.options,o=t.removedValue,i=t.removedValues,s=t.value,l=o||n||function(e){return Array.isArray(e)?null:e}(s),c=l?f(l):"",u=r||i||void 0,d=u?u.map(f):[],p=RI({isDisabled:l&&g(l,a),label:c,labels:d},t);e=k.onChange(p)}return e}),[t,k,g,a,f]),C=(0,s.useMemo)((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&k.onFocus){var s={focused:t,label:f(t),isDisabled:g(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=k.onFocus(s)}return e}),[n,r,f,g,k,o,a,u]),j=(0,s.useMemo)((function(){var e="";if(v&&b.length&&!w&&k.onFilter){var t=y({count:o.length});e=k.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,v,k,b,y,w]),O="initial-input-focus"===(null==t?void 0:t.action),T=(0,s.useMemo)((function(){var e="";if(k.guidance){var t=r?"value":v?"menu":"input";e=k.guidance({"aria-label":_,context:t,isDisabled:n&&g(n,a),isMulti:h,isSearchable:m,tabSelectsValue:x,isInitialFocus:O})}return e}),[_,n,r,h,g,m,v,k,a,x,O]),I=mf(s.Fragment,null,mf("span",{id:"aria-selection"},E),mf("span",{id:"aria-focused"},C),mf("span",{id:"aria-results"},j),mf("span",{id:"aria-guidance"},T));return mf(s.Fragment,null,mf(YR,{id:c},O&&I),mf(YR,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!O&&I))},ZR=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],QR=new RegExp("["+ZR.map((function(e){return e.letters})).join("")+"]","g"),eP={},tP=0;tP<ZR.length;tP++)for(var nP=ZR[tP],rP=0;rP<nP.letters.length;rP++)eP[nP.letters[rP]]=nP.base;var oP=function(e){return e.replace(QR,(function(e){return eP[e]}))},iP=function(e,t){void 0===t&&(t=WR);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(oP),aP=function(e){return e.replace(/^\s+|\s+$/g,"")},sP=function(e){return"".concat(e.label," ").concat(e.value)},lP=["innerRef"];function cP(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=AI(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=AI(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(DI(e,lP),"onExited","in","enter","exit","appear");return mf("input",bu({ref:t},n,{css:bf({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var uP=["boxSizing","height","overflow","paddingRight","position"],dP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function fP(e){e.cancelable&&e.preventDefault()}function pP(e){e.stopPropagation()}function hP(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gP(){return"ontouchstart"in window||navigator.maxTouchPoints}var mP=!!(typeof window<"u"&&window.document&&window.document.createElement),vP=0,bP={capture:!1,passive:!1};var yP=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},xP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function wP(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,s.useRef)(!1),l=(0,s.useRef)(!1),c=(0,s.useRef)(0),u=(0,s.useRef)(null),d=(0,s.useCallback)((function(e,t){if(null!==u.current){var s=u.current,c=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,g=d-f-c,m=!1;g>t&&a.current&&(r&&r(e),a.current=!1),h&&l.current&&(i&&i(e),l.current=!1),h&&t>g?(n&&!a.current&&n(e),p.scrollTop=d,m=!0,a.current=!0):!h&&-t>c&&(o&&!l.current&&o(e),p.scrollTop=0,m=!0,l.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),f=(0,s.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,s.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),h=(0,s.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,s.useCallback)((function(e){if(e){var t=!!aR&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),m=(0,s.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,s.useEffect)((function(){if(t){var e=u.current;return g(e),function(){m(e)}}}),[t,g,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,s.useRef)({}),i=(0,s.useRef)(null),a=(0,s.useCallback)((function(e){if(mP){var t=document.body,n=t&&t.style;if(r&&uP.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&vP<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(dP).forEach((function(e){var t=dP[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&gP()&&(t.addEventListener("touchmove",fP,bP),e&&(e.addEventListener("touchstart",hP,bP),e.addEventListener("touchmove",pP,bP))),vP+=1}}),[r]),l=(0,s.useCallback)((function(e){if(mP){var t=document.body,n=t&&t.style;vP=Math.max(vP-1,0),r&&vP<1&&uP.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&gP()&&(t.removeEventListener("touchmove",fP,bP),e&&(e.removeEventListener("touchstart",hP,bP),e.removeEventListener("touchmove",pP,bP)))}}),[r]);return(0,s.useEffect)((function(){if(t){var e=i.current;return a(e),function(){l(e)}}}),[t,a,l]),function(e){i.current=e}}({isEnabled:n});return mf(s.Fragment,null,n&&mf("div",{onClick:yP,css:xP}),t((function(e){o(e),i(e)})))}var _P={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},SP=function(e){var t=e.name,n=e.onFocus;return mf("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:_P,value:"",onChange:function(){}})};function kP(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function EP(){return kP(/^Mac/i)}function CP(){return kP(/^iPhone/i)||kP(/^iPad/i)||EP()&&navigator.maxTouchPoints>1}var jP={clearIndicator:OR,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return RI({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:jR,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return RI({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return RI({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return RI(RI({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},FR),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return RI({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:yR,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return RI((TI(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),TI(n,"position","absolute"),TI(n,"width","100%"),TI(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return RI({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return RI({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return RI({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return RI({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:bR,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return RI({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return RI({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return RI({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return RI({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},OP={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},TP={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:nR(),captureMenuScroll:!nR(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=RI({ignoreCase:!0,ignoreAccents:!0,stringify:sP,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?aP(n):n,u=s?aP(a(t)):a(t);return o&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=iP(c),u=oP(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function IP(e,t,n,r){return{type:"option",data:t,isDisabled:NP(e,t,n),isSelected:BP(e,t,n),label:FP(e,t),value:LP(e,t),index:r}}function RP(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return IP(e,n,t,r)})).filter((function(t){return AP(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=IP(e,n,t,r);return AP(e,i)?i:void 0})).filter(sR)}function PP(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,VI(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function MP(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,VI(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function AP(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!$P(e)||!i)&&zP(e,{label:a,value:s,data:o},r)}var DP=function(e,t){var n,r=null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id;return r||null},FP=function(e,t){return e.getOptionLabel(t)},LP=function(e,t){return e.getOptionValue(t)};function NP(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function BP(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=LP(e,t);return n.some((function(t){return LP(e,t)===r}))}function zP(e,t,n){return!e.filterOption||e.filterOption(t,n)}var $P=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},VP=1,HP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O_(e,t)}(n,e);var t=$I(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=EP()||CP(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(VI(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=lR(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(lR(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=lR(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return DP(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return MP(RP(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WI.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return FP(r.props,e)},r.getOptionValue=function(e){return LP(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=jP[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return function(e){return RI(RI({},KR),e.components)}(r.props)},r.buildCategorizedOptions=function(){return RP(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return PP(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:RI({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&XI(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return $P(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,g=p.focusedValue,m=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)r.removeValue(g);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing||e.shiftKey||!c||!d||!h||f&&r.isOptionSelected(h,m))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h||r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++VP),r.state.selectValue=qI(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=DP(o,i[a])}return r}return function(e,t,n){NI(e.prototype,t),NI(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&tR(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!o&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(tR(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(OP):RI(RI({},OP),this.props.theme):OP}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return NP(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return BP(this.props,e,t)}},{key:"filterOption",value:function(e,t){return zP(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,g=r||this.getElementId("input"),m=RI(RI(RI({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?s.createElement(u,bu({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):s.createElement(cP,bu({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:UI,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,g=u.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!d)return h?null:s.createElement(l,bu({},c,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),g);if(p)return v.map((function(t,a){var l=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return s.createElement(n,bu({},c,{components:{Container:r,Label:o,Remove:i},isFocused:l,isDisabled:f,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var x=v[0];return s.createElement(a,bu({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,bu({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return s.createElement(e,bu({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return s.createElement(n,bu({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,bu({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,g=p.inputValue,m=p.isLoading,v=p.loadingMessage,b=p.minMenuHeight,y=p.maxMenuHeight,x=p.menuIsOpen,w=p.menuPlacement,_=p.menuPosition,S=p.menuPortalTarget,k=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,C=p.noOptionsMessage,j=p.onMenuScrollToTop,O=p.onMenuScrollToBottom;if(!x)return null;var T,I=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,l=t.label,c=t.value,p=f===o,h=i?void 0:function(){return e.onOptionHover(o)},g=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:g,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return s.createElement(u,bu({},d,{innerProps:v,data:o,isDisabled:i,isSelected:a,key:m,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),c="".concat(l,"-heading");return s.createElement(n,bu({},d,{key:l,data:o,options:i,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(m){var R=v({inputValue:g});if(null===R)return null;T=s.createElement(l,d,R)}else{var P=C({inputValue:g});if(null===P)return null;T=s.createElement(c,d,P)}var M={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:_,menuShouldScrollIntoView:E},A=s.createElement(gR,bu({},d,M),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return s.createElement(o,bu({},d,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),s.createElement(wP,{captureEnabled:h,onTopArrive:j,onBottomArrive:O,lockEnabled:k},(function(t){return s.createElement(i,bu({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:l,focusedOption:f}),T)})))}));return S||"fixed"===_?s.createElement(a,bu({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:w,menuPosition:_}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,l=this.state.selectValue;if(a&&!this.hasValue()&&!r)return s.createElement(SP,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return s.createElement("input",{name:i,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return s.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):s.createElement("input",{name:i,type:"hidden",value:""});return s.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return s.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return s.createElement(XR,bu({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,l=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.createElement(r,bu({},f,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),s.createElement(t,bu({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),s.createElement(o,bu({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),s.createElement(n,bu({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=qI(u),g={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var m=d?function(e,t){return PP(RP(e,t))}(e,h):[],v=d?MP(RP(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);g={selectValue:h,focusedOption:y,focusedOptionId:DP(v,y),focusableOptionsWithIds:v,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,_=a&&s;return a&&!_&&(w={value:lR(p,h,h[0]||null),options:h,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),RI(RI(RI({},g),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:_})}}]),n}(s.Component);HP.defaultProps=TP;var KP=(0,s.forwardRef)((function(e,t){var n=LI(e);return s.createElement(HP,bu({ref:t},n))})),UP=KP,GP=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];var WP=(0,s.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,o=void 0!==r&&r,i=e.loadOptions;e.options;var a=e.isLoading,l=void 0!==a&&a,c=e.onInputChange,u=e.filterOption,d=void 0===u?null:u,f=DI(e,GP),p=f.inputValue,h=(0,s.useRef)(void 0),g=(0,s.useRef)(!1),m=AI((0,s.useState)(Array.isArray(n)?n:void 0),2),v=m[0],b=m[1],y=AI((0,s.useState)(typeof p<"u"?p:""),2),x=y[0],w=y[1],_=AI((0,s.useState)(!0===n),2),S=_[0],k=_[1],E=AI((0,s.useState)(void 0),2),C=E[0],j=E[1],O=AI((0,s.useState)([]),2),T=O[0],I=O[1],R=AI((0,s.useState)(!1),2),P=R[0],M=R[1],A=AI((0,s.useState)({}),2),D=A[0],F=A[1],L=AI((0,s.useState)(void 0),2),N=L[0],B=L[1],z=AI((0,s.useState)(void 0),2),$=z[0],V=z[1];o!==$&&(F({}),V(o)),n!==N&&(b(Array.isArray(n)?n:void 0),B(n)),(0,s.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]);var H=(0,s.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,s.useEffect)((function(){!0===n&&H(x,(function(e){g.current&&(b(e||[]),k(!!h.current))}))}),[]);var K=(0,s.useCallback)((function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,c);if(!n)return h.current=void 0,w(""),j(""),I([]),k(!1),void M(!1);if(o&&D[n])w(n),j(n),I(D[n]),k(!1),M(!1);else{var r=h.current={};w(n),k(!0),M(!C),H(n,(function(e){g&&r===h.current&&(h.current=void 0,k(!1),j(n),I(e||[]),M(!1),F(e?RI(RI({},D),{},TI({},n,e)):D))}))}}),[o,H,C,D,c]),U=P?[]:x&&C?T:v||[];return RI(RI({},f),{},{options:U,isLoading:S||l,onInputChange:K,filterOption:d})}(e),r=LI(n);return s.createElement(HP,bu({ref:t},r))})),qP=WP;var YP={exports:{}};!function(e){e.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:W(e)}function r(e){return s(e)?e:q(e)}function o(e){return l(e)?e:Y(e)}function i(e){return a(e)&&!c(e)?e:J(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[f])}function l(e){return!(!e||!e[p])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=i;var d="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",g="delete",m=5,v=1<<m,b=v-1,y={},x={value:!1},w={value:!1};function _(e){return e.value=!1,e}function S(e){e&&(e.value=!0)}function k(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(O)),e.size}function j(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function O(){return!0}function T(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function I(e,t){return P(e,t,0)}function R(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var M=0,A=1,D=2,F="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",N=F||L;function B(e){this.next=e}function z(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function $(){return{value:void 0,done:!0}}function V(e){return!!U(e)}function H(e){return e&&"function"==typeof e.next}function K(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(F&&e[F]||e[L]);if("function"==typeof t)return t}function G(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function q(e){return null==e?ae().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ae():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function J(e){return(null==e?ae():a(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=M,B.VALUES=A,B.ENTRIES=D,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[N]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return de(this,e,t,!0)},W.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(q,W),q.prototype.toKeyedSeq=function(){return this},t(Y,W),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(J,W),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},W.isSeq=ie,W.Keyed=q,W.Set=J,W.Indexed=Y;var X,Z,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ie(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():H(e)?new oe(e).fromEntrySeq():V(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return G(e)?new te(e):H(e)?new oe(e):V(e)?new re(e):void 0}function de(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new B((function(){var e=o[n?i-a:a];return a++>i?$():z(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function pe(e,t){return t?he(t,e,"",{"":e}):ge(e)}function he(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return he(e,n,r,t)}))):me(t)?e.call(r,n,q(t).map((function(n,r){return he(e,n,r,t)}))):t}function ge(e){return Array.isArray(e)?Y(e).map(ge).toList():me(e)?q(e).map(ge).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ve(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function be(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ve(o[1],e)&&(n||ve(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var d=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ve(t,e.get(r,y)):!ve(e.get(r,y),t))return d=!1,!1}));return d&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function xe(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(xe(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(Q)return Q;Q=this}}function _e(){throw TypeError("Abstract")}function Se(){}function ke(){}function Ee(){}W.prototype[ee]=!0,t(te,Y),te.prototype.get=function(e,t){return this.has(e)?this._array[j(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new B((function(){return o>r?$():z(e,o,n[t?r-o++:o++])}))},t(ne,q),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new B((function(){var a=r[t?o-i:i];return i++>o?$():z(e,a,n[a])}))},ne.prototype[h]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=K(this._iterable),r=0;if(H(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=K(this._iterable);if(!H(n))return new B($);var r=0;return new B((function(){var t=n.next();return t.done?t:z(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===e(r[o],o++,this))return o;for(var i;!(i=n.next()).done;){var a=i.value;if(r[o]=a,!1===e(a,o++,this))break}return o},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new B((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return z(e,o,r[o++])}))},t(ye,Y),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ve(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:new ye(this._value,R(t,n)-I(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ve(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ve(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new B((function(){return r<n.size?z(e,r++,n._value):$()}))},ye.prototype.equals=function(e){return e instanceof ye?ve(this._value,e._value):be(e)},t(we,Y),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+j(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return T(e,t,this.size)?this:(e=I(e,this.size),(t=R(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;return new B((function(){var a=o;return o+=t?-r:r,i>n?$():z(e,i++,a)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:be(this,e)},t(_e,n),t(Se,_e),t(ke,_e),t(Ee,_e),_e.Keyed=Se,_e.Indexed=ke,_e.Set=Ee;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function je(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e||"function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return je(n)}if("string"===t)return e.length>Be?Te(e):Ie(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Re(e);if("function"==typeof e.toString)return Ie(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Te(e){var t=Ve[e];return void 0===t&&(t=Ie(e),$e===ze&&($e=0,Ve={}),$e++,Ve[e]=t),t}function Ie(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return je(t)}function Re(e){var t;if(Fe&&void 0!==(t=De.get(e))||void 0!==(t=e[Ne])||!Me&&(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ne])||void 0!==(t=Ae(e))))return t;if(t=++Le,1073741824&Le&&(Le=0),Fe)De.set(e,t);else{if(void 0!==Pe&&!1===Pe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Me)Object.defineProperty(e,Ne,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ne]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ne]=t}}return t}var Pe=Object.isExtensible,Me=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Ae(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var De,Fe="function"==typeof WeakMap;Fe&&(De=new WeakMap);var Le=0,Ne="__immutablehash__";"function"==typeof Symbol&&(Ne=Symbol(Ne));var Be=16,ze=255,$e=0,Ve={};function He(e){xe(e!==1/0,"Cannot perform this action with an infinite size.")}function Ke(e){return null==e?ot():Ue(e)&&!u(e)?e:ot().withMutations((function(t){var n=r(e);He(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ue(e){return!(!e||!e[We])}t(Ke,Se),Ke.prototype.toString=function(){return this.__toString("Map {","}")},Ke.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ke.prototype.set=function(e,t){return it(this,e,t)},Ke.prototype.setIn=function(e,t){return this.updateIn(e,y,(function(){return t}))},Ke.prototype.remove=function(e){return it(this,e,y)},Ke.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return y}))},Ke.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ke.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=mt(this,_n(e),t,n);return r===y?void 0:r},Ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},Ke.prototype.merge=function(){return ft(this,void 0,arguments)},Ke.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ke.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ke.prototype.mergeDeep=function(){return ft(this,pt,arguments)},Ke.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,ht(t),n)},Ke.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ke.prototype.sort=function(e){return Vt(dn(this,e))},Ke.prototype.sortBy=function(e,t){return Vt(dn(this,t,e))},Ke.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ke.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new k)},Ke.prototype.asImmutable=function(){return this.__ensureOwner()},Ke.prototype.wasAltered=function(){return this.__altered},Ke.prototype.__iterator=function(e,t){return new et(this,e,t)},Ke.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ke.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ke.isMap=Ue;var Ge,We="@@__IMMUTABLE_MAP__@@",qe=Ke.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Je(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return z(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(qe);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return Ge||(Ge=rt(0))}function it(e,t,n){var r,o;if(e._root){var i=_(x),a=_(w);if(r=at(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function at(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===y?e:(S(s),S(a),new Qe(t,r,[o,i]))}function st(e){return e.constructor===Qe||e.constructor===Ze}function lt(e,t,n,r,o){if(e.keyHash===r)return new Ze(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&b,s=(0===n?r:r>>>n)&b;return new Je(t,1<<a|1<<s,a===s?[lt(e,t,n+m,r,o)]:(i=new Qe(t,r,o),a<s?[e,i]:[i,e]))}function ct(e,t,n,r){e||(e=new k);for(var o=new Qe(e,Oe(n),[n,r]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}function ut(e,t,n,r){for(var o=0,i=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,a[i++]=u)}return new Je(e,o,a)}function dt(e,t,n,r,o){for(var i=0,a=new Array(v),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new Xe(e,i+1,a)}function ft(e,t,n){for(var o=[],i=0;i<n.length;i++){var s=n[i],l=r(s);a(s)||(l=l.map((function(e){return pe(e)}))),o.push(l)}return gt(e,t,o)}function pt(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ve(e,t)?e:t}function ht(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ve(t,o)?t:o}}function gt(e,t,n){return n=n.filter((function(e){return 0!==e.size})),0===n.length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,y,(function(e){return e===y?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function mt(e,t,n,r){var o=e===y,i=t.next();if(i.done){var a=o?n:e,s=r(a);return s===a?e:s}xe(o||e&&e.set,"invalid keyPath");var l=i.value,c=o?y:e.get(l,y),u=mt(c,t,n,r);return u===c?e:u===y?e.remove(l):(o?ot():e).set(l,u)}function vt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function bt(e,t,n,r){var o=r?e:E(e);return o[t]=n,o}function yt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}function xt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}qe[We]=!0,qe[g]=qe.remove,qe.removeIn=qe.deleteIn,Ye.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ye.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===y,l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(S(a),(s||!d)&&S(i),!s||1!==l.length){if(!d&&!s&&l.length>=wt)return ct(e,l,r,o);var f=e&&e===this.ownerID,p=f?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new Ye(e,p)}},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return i&o?this.nodes[vt(i&o-1)].get(e+m,t,n,r):r},Je.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=1<<s,c=this.bitmap,u=0!==(c&l);if(!u&&o===y)return this;var d=vt(c&l-1),f=this.nodes,p=u?f[d]:void 0,h=at(p,e,t+m,n,r,o,i,a);if(h===p)return this;if(!u&&h&&f.length>=_t)return dt(e,f,c,s,h);if(u&&!h&&2===f.length&&st(f[1^d]))return f[1^d];if(u&&h&&1===f.length&&st(h))return h;var g=e&&e===this.ownerID,v=u?h?c:c^l:c|l,x=u?h?bt(f,d,h,g):xt(f,d,g):yt(f,d,h,g);return g?(this.bitmap=v,this.nodes=x,this):new Je(e,v,x)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&b,i=this.nodes[o];return i?i.get(e+m,t,n,r):r},Xe.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=o===y,c=this.nodes,u=c[s];if(l&&!u)return this;var d=at(u,e,t+m,n,r,o,i,a);if(d===u)return this;var f=this.count;if(u){if(!d&&--f<St)return ut(e,c,f,s)}else f++;var p=e&&e===this.ownerID,h=bt(c,s,d,p);return p?(this.count=f,this.nodes=h,this):new Xe(e,f,h)},Ze.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ze.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=o===y;if(n!==this.keyHash)return s?this:(S(a),S(i),lt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(S(a),(s||!d)&&S(i),s&&2===u)return new Qe(e,this.keyHash,l[1^c]);var f=e&&e===this.ownerID,p=f?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new Ze(e,this.keyHash,p)},Qe.prototype.get=function(e,t,n,r){return ve(n,this.entry[0])?this.entry[1]:r},Qe.prototype.update=function(e,t,n,r,o,i,a){var s=o===y,l=ve(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(S(a),s?void S(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new Qe(e,this.keyHash,[r,o]):(S(i),lt(this,e,t,Oe(r),[r,o])))},Ye.prototype.iterate=Ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Je.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Qe.prototype.iterate=function(e,t){return e(this.entry)},t(et,B),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return tt(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return tt(e,i.entry);t=this._stack=nt(i,t)}continue}t=this._stack=this._stack.__prev}return $()};var wt=v/4,_t=v/2,St=v/4;function kt(e){var t=At();if(null==e)return t;if(Et(e))return e;var n=o(e),r=n.size;return 0===r?t:(He(r),r>0&&r<v?Mt(0,r,m,null,new Ot(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Et(e){return!(!e||!e[Ct])}t(kt,ke),kt.of=function(){return this(arguments)},kt.prototype.toString=function(){return this.__toString("List [","]")},kt.prototype.get=function(e,t){if((e=j(this,e))>=0&&e<this.size){var n=Nt(this,e+=this._origin);return n&&n.array[e&b]}return t},kt.prototype.set=function(e,t){return Dt(this,e,t)},kt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},kt.prototype.insert=function(e,t){return this.splice(e,0,t)},kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):At()},kt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Bt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},kt.prototype.pop=function(){return Bt(this,0,-1)},kt.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Bt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},kt.prototype.shift=function(){return Bt(this,1)},kt.prototype.merge=function(){return zt(this,void 0,arguments)},kt.prototype.mergeWith=function(t){return zt(this,t,e.call(arguments,1))},kt.prototype.mergeDeep=function(){return zt(this,pt,arguments)},kt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return zt(this,ht(t),n)},kt.prototype.setSize=function(e){return Bt(this,0,e)},kt.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:Bt(this,I(e,n),R(t,n))},kt.prototype.__iterator=function(e,t){var n=0,r=Pt(this,t);return new B((function(){var t=r();return t===Rt?$():z(e,n++,t)}))},kt.prototype.__iterate=function(e,t){for(var n,r=0,o=Pt(this,t);(n=o())!==Rt&&!1!==e(n,r++,this););return r},kt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Mt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},kt.isList=Et;var Ct="@@__IMMUTABLE_LIST__@@",jt=kt.prototype;function Ot(e,t){this.array=e,this.ownerID=t}jt[Ct]=!0,jt[g]=jt.remove,jt.setIn=qe.setIn,jt.deleteIn=jt.removeIn=qe.removeIn,jt.update=qe.update,jt.updateIn=qe.updateIn,jt.mergeIn=qe.mergeIn,jt.mergeDeepIn=qe.mergeDeepIn,jt.withMutations=qe.withMutations,jt.asMutable=qe.asMutable,jt.asImmutable=qe.asImmutable,jt.wasAltered=qe.wasAltered,Ot.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&b;if(r>=this.array.length)return new Ot([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-m,n))===a&&i)return this}if(i&&!o)return this;var s=Lt(this,e);if(!i)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},Ot.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&b;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-m,n))===i&&o===this.array.length-1)return this}var a=Lt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var Tt,It,Rt={};function Pt(e,t){var n=e._origin,r=e._capacity,o=$t(r),i=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,a){var s=a===o?i&&i.array:e&&e.array,l=a>n?0:n-a,c=r-a;return c>v&&(c=v),function(){if(l===c)return Rt;var e=t?--c:l++;return s&&s[e]}}function l(e,o,i){var s,l=e&&e.array,c=i>n?0:n-i>>o,u=1+(r-i>>o);return u>v&&(u=v),function(){for(;;){if(s){var e=s();if(e!==Rt)return e;s=null}if(c===u)return Rt;var n=t?--u:c++;s=a(l&&l[n],o-m,i+(n<<o))}}}}function Mt(e,t,n,r,o,i,a){var s=Object.create(jt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function At(){return Tt||(Tt=Mt(0,0,m))}function Dt(e,t,n){if((t=j(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Bt(e,t).set(0,n):Bt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=_(w);return t>=$t(e._capacity)?r=Ft(r,e.__ownerID,0,t,n,i):o=Ft(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Mt(e._origin,e._capacity,e._level,o,r):e}function Ft(e,t,n,r,o,i){var a,s=r>>>n&b,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=Ft(c,t,n-m,r,o,i);return u===c?e:((a=Lt(e,t)).array[s]=u,a)}return l&&e.array[s]===o?e:(S(i),a=Lt(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Nt(e,t){if(t>=$t(e._capacity))return e._tail;if(t<1<<e._level+m){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&b],r-=m;return n}}function Bt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new k,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var l=e._level,c=e._root,u=0;a+u<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=m);u&&(a+=u,o+=u,s+=u,i+=u);for(var d=$t(i),f=$t(s);f>=1<<l+m;)c=new Ot(c&&c.array.length?[c]:[],r),l+=m;var p=e._tail,h=f<d?Nt(e,s-1):f>d?new Ot([],r):p;if(p&&f>d&&a<i&&p.array.length){for(var g=c=Lt(c,r),v=l;v>m;v-=m){var y=d>>>v&b;g=g.array[y]=Lt(g.array[y],r)}g.array[d>>>m&b]=p}if(s<i&&(h=h&&h.removeAfter(r,0,s)),a>=f)a-=f,s-=f,l=m,c=null,h=h&&h.removeBefore(r,0,a);else if(a>o||f<d){for(u=0;c;){var x=a>>>l&b;if(x!==f>>>l&b)break;x&&(u+=(1<<l)*x),l-=m,c=c.array[x]}c&&a>o&&(c=c.removeBefore(r,l,a-u)),c&&f<d&&(c=c.removeAfter(r,l,f-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=c,e._tail=h,e.__hash=void 0,e.__altered=!0,e):Mt(a,s,l,c,h)}function zt(e,t,n){for(var r=[],i=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>i&&(i=c.size),a(l)||(c=c.map((function(e){return pe(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),gt(e,t,r)}function $t(e){return e<v?0:e-1>>>m<<m}function Vt(e){return null==e?Ut():Ht(e)?e:Ut().withMutations((function(t){var n=r(e);He(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ht(e){return Ue(e)&&u(e)}function Kt(e,t,n,r){var o=Object.create(Vt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Ut(){return It||(It=Kt(ot(),At()))}function Gt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(n===y){if(!l)return e;a.size>=v&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Kt(r,o)}function Wt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function qt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Jt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=xn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===D){var r=e.__iterator(t,n);return new B((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===A?M:A,n)},t}function Zt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(D,o);return new B((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return z(r,s,t.call(n,a[1],s,e),o)}))},r}function Qt(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=xn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=yn(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return s++,o(e,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(D,i),s=0;return new B((function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return z(o,r?c:s++,u,i)}}))},o}function tn(e,t,n){var r=Ke().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(u(e)?Vt():Ke()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=bn(e);return o.map((function(t){return gn(e,i(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),T(t,n,o))return e;var i=I(t,o),a=R(n,o);if(i!=i||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=a-i;l==l&&(s=l<0?0:l);var c=yn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ie(e)&&s>=0&&(c.get=function(t,n){return(t=j(this,t))>=0&&t<s?e.get(t+i,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=a++<i))return c++,!1!==t(e,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),a=0,l=0;return new B((function(){for(;a++<i;)o.next();if(++l>s)return $();var e=o.next();return r||t===A?e:z(t,l-1,t===M?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(D,o),s=!0;return new B((function(){if(!s)return $();var e=a.next();if(e.done)return e;var o=e.value,l=o[0],c=o[1];return t.call(n,c,l,i)?r===D?e:z(r,l,c,e):(s=!1,$())}))},r}function an(e,t,n,r){var o=yn(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,l=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return l++,o(e,r?i:l-1,a)})),l},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(D,i),l=!0,c=0;return new B((function(){var e,i,u;do{if((e=s.next()).done)return r||o===A?e:z(o,c++,o===M?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],l&&(l=t.call(n,u,i,a))}while(l);return o===D?e:z(o,i,u,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||l(e)&&l(i))return i}var c=new te(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,o){return(!t||c<t)&&a(e)?l(e,c+1):!1===r(e,n?o:i++,u)&&(s=!0),!s}),o)}return l(e,0),i},r.__iteratorUncached=function(r,o){var i=e.__iterator(r,o),s=[],l=0;return new B((function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(r===D&&(c=c[1]),t&&!(s.length<t)||!a(c))return n?e:z(r,l++,c,e);s.push(i),i=c.__iterator(r,o)}else i=s.pop()}return $()}))},r}function cn(e,t,n){var r=bn(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}function un(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return e.__iterate((function(e,r){return(!i||!1!==n(t,i++,o))&&!1!==n(e,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=e.__iterator(A,r),a=0;return new B((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?z(n,a++,t):z(n,a++,o.value,o)}))},n}function dn(e,t,n){t||(t=wn);var r=s(e),o=0,i=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?q(i):l(e)?Y(i):J(i)}function fn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return pn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return pn(t,e,n)?n:e}))}function pn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hn(e,t,r){var o=yn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(A,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),K(o?e.reverse():e)})),a=0,s=!1;return new B((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?$():z(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function gn(e,t){return ie(e)?t:e.constructor(t)}function mn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){return He(e.size),C(e)}function bn(e){return s(e)?r:l(e)?o:i}function yn(e){return Object.create((s(e)?q:l(e)?Y:J).prototype)}function xn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function _n(e){var t=K(e);if(!t){if(!G(e))throw new TypeError("Expected iterable or array-like: "+e);t=K(n(e))}return t}function Sn(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(e);jn(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=Ke(i)},o=r.prototype=Object.create(kn);return o.constructor=r,r}t(Vt,Ke),Vt.of=function(){return this(arguments)},Vt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Vt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ut()},Vt.prototype.set=function(e,t){return Gt(this,e,t)},Vt.prototype.remove=function(e){return Gt(this,e,y)},Vt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Vt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Vt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Vt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Kt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Vt.isOrderedMap=Ht,Vt.prototype[h]=!0,Vt.prototype[g]=Vt.prototype.remove,t(Wt,q),Wt.prototype.get=function(e,t){return this._iter.get(e,t)},Wt.prototype.has=function(e){return this._iter.has(e)},Wt.prototype.valueSeq=function(){return this._iter.valueSeq()},Wt.prototype.reverse=function(){var e=this,t=Qt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Wt.prototype.map=function(e,t){var n=this,r=Zt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Wt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?vn(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Wt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(A,t),r=t?vn(this):0;return new B((function(){var o=n.next();return o.done?o:z(e,t?--r:r++,o.value,o)}))},Wt.prototype[h]=!0,t(qt,Y),qt.prototype.includes=function(e){return this._iter.includes(e)},qt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t),r=0;return new B((function(){var t=n.next();return t.done?t:z(e,r++,t.value,t)}))},t(Yt,J),Yt.prototype.has=function(e){return this._iter.includes(e)},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t);return new B((function(){var t=n.next();return t.done?t:z(e,t.value,t.value,t)}))},t(Jt,q),Jt.prototype.entrySeq=function(){return this._iter.toSeq()},Jt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){mn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t);return new B((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){mn(r);var o=a(r);return z(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},qt.prototype.cacheResult=Wt.prototype.cacheResult=Yt.prototype.cacheResult=Jt.prototype.cacheResult=xn,t(Sn,Se),Sn.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},Sn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Sn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Sn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=En(this,ot()))},Sn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:En(this,n)},Sn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:En(this,t)},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Sn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?En(this,t,e):(this.__ownerID=e,this._map=t,this)};var kn=Sn.prototype;function En(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function jn(e,t){try{t.forEach(On.bind(void 0,e))}catch{}}function On(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){xe(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Tn(e){return null==e?Fn():In(e)&&!u(e)?e:Fn().withMutations((function(t){var n=i(e);He(n.size),n.forEach((function(e){return t.add(e)}))}))}function In(e){return!(!e||!e[Pn])}kn[g]=kn.remove,kn.deleteIn=kn.removeIn=qe.removeIn,kn.merge=qe.merge,kn.mergeWith=qe.mergeWith,kn.mergeIn=qe.mergeIn,kn.mergeDeep=qe.mergeDeep,kn.mergeDeepWith=qe.mergeDeepWith,kn.mergeDeepIn=qe.mergeDeepIn,kn.setIn=qe.setIn,kn.update=qe.update,kn.updateIn=qe.updateIn,kn.withMutations=qe.withMutations,kn.asMutable=qe.asMutable,kn.asImmutable=qe.asImmutable,t(Tn,Ee),Tn.of=function(){return this(arguments)},Tn.fromKeys=function(e){return this(r(e).keySeq())},Tn.prototype.toString=function(){return this.__toString("Set {","}")},Tn.prototype.has=function(e){return this._map.has(e)},Tn.prototype.add=function(e){return An(this,this._map.set(e,!0))},Tn.prototype.remove=function(e){return An(this,this._map.remove(e))},Tn.prototype.clear=function(){return An(this,this._map.clear())},Tn.prototype.union=function(){var t=e.call(arguments,0);return t=t.filter((function(e){return 0!==e.size})),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},Tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},Tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},Tn.prototype.merge=function(){return this.union.apply(this,arguments)},Tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Tn.prototype.sort=function(e){return Ln(dn(this,e))},Tn.prototype.sortBy=function(e,t){return Ln(dn(this,t,e))},Tn.prototype.wasAltered=function(){return this._map.wasAltered()},Tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},Tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Tn.isSet=In;var Rn,Pn="@@__IMMUTABLE_SET__@@",Mn=Tn.prototype;function An(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Dn(e,t){var n=Object.create(Mn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Fn(){return Rn||(Rn=Dn(ot()))}function Ln(e){return null==e?Vn():Nn(e)?e:Vn().withMutations((function(t){var n=i(e);He(n.size),n.forEach((function(e){return t.add(e)}))}))}function Nn(e){return In(e)&&u(e)}Mn[Pn]=!0,Mn[g]=Mn.remove,Mn.mergeDeep=Mn.merge,Mn.mergeDeepWith=Mn.mergeWith,Mn.withMutations=qe.withMutations,Mn.asMutable=qe.asMutable,Mn.asImmutable=qe.asImmutable,Mn.__empty=Fn,Mn.__make=Dn,t(Ln,Tn),Ln.of=function(){return this(arguments)},Ln.fromKeys=function(e){return this(r(e).keySeq())},Ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Ln.isOrderedSet=Nn;var Bn,zn=Ln.prototype;function $n(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Vn(){return Bn||(Bn=$n(Ut()))}function Hn(e){return null==e?Yn():Kn(e)?e:Yn().unshiftAll(e)}function Kn(e){return!(!e||!e[Gn])}zn[h]=!0,zn.__empty=Vn,zn.__make=$n,t(Hn,ke),Hn.of=function(){return this(arguments)},Hn.prototype.toString=function(){return this.__toString("Stack [","]")},Hn.prototype.get=function(e,t){var n=this._head;for(e=j(this,e);n&&e--;)n=n.next;return n?n.value:t},Hn.prototype.peek=function(){return this._head&&this._head.value},Hn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):qn(e,t)},Hn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;He(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):qn(t,n)},Hn.prototype.pop=function(){return this.slice(1)},Hn.prototype.unshift=function(){return this.push.apply(this,arguments)},Hn.prototype.unshiftAll=function(e){return this.pushAll(e)},Hn.prototype.shift=function(){return this.pop.apply(this,arguments)},Hn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Hn.prototype.slice=function(e,t){if(T(e,t,this.size))return this;var n=I(e,this.size);if(R(t,this.size)!==this.size)return ke.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):qn(r,o)},Hn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Hn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Hn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new B((function(){if(r){var t=r.value;return r=r.next,z(e,n++,t)}return $()}))},Hn.isStack=Kn;var Un,Gn="@@__IMMUTABLE_STACK__@@",Wn=Hn.prototype;function qn(e,t,n,r){var o=Object.create(Wn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Un||(Un=qn(0))}function Jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Wn[Gn]=!0,Wn.withMutations=qe.withMutations,Wn.asMutable=qe.asMutable,Wn.asImmutable=qe.asImmutable,Wn.wasAltered=qe.wasAltered,n.Iterator=B,Jn(n,{toArray:function(){He(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new qt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Wt(this,!0)},toMap:function(){return Ke(this.toKeyedSeq())},toObject:function(){He(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Vt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return Tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Hn(s(this)?this.valueSeq():this)},toList:function(){return kt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return gn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ve(t,e)}))},entries:function(){return this.__iterator(D)},every:function(e,t){He(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return gn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return He(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){He(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(M)},map:function(e,t){return gn(this,Zt(this,e,t))},reduce:function(e,t,n){var r,o;return He(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return gn(this,Qt(this,!0))},slice:function(e,t){return gn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return gn(this,dn(this,e))},values:function(){return this.__iterator(A)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return be(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(O)},flatMap:function(e,t){return gn(this,cn(this,e,t))},flatten:function(e){return gn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Jt(this)},get:function(e,t){return this.find((function(t,n){return ve(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=_n(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ir)},minBy:function(e,t){return fn(this,t?nr(t):ir,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return gn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return gn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return gn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return gn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return gn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[d]=!0,Xn[N]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch{}}(),Jn(r,{flip:function(){return gn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ve(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ve(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return gn(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return gn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Zn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function or(){return E(arguments)}function ir(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0,o=e.__iterate(n?t?function(e,t){r=31*r+lr(Oe(e),Oe(t))|0}:function(e,t){r=r+lr(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0});return sr(o,r)}function sr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=je((t=Ce(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Zn[f]=!0,Zn[N]=Xn.entries,Zn.__toJS=Xn.toObject,Zn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Jn(o,{toKeyedSeq:function(){return new Wt(this,!1)},filter:function(e,t){return gn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return gn(this,Qt(this,!1))},slice:function(e,t){return gn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=I(e,e<0?this.count():this.size);var r=this.slice(0,e);return gn(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return gn(this,ln(this,e,!1))},get:function(e,t){return(e=j(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=j(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return gn(this,un(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=hn(this.toSeq(),Y.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),gn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return gn(this,an(this,e,t,!1))},zip:function(){return gn(this,hn(this,or,[this].concat(E(arguments))))},zipWith:function(e){var t=E(arguments);return t[0]=this,gn(this,hn(this,e,t))}}),o.prototype[p]=!0,o.prototype[h]=!0,Jn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Xn.includes,Jn(q,r.prototype),Jn(Y,o.prototype),Jn(J,i.prototype),Jn(Se,r.prototype),Jn(ke,o.prototype),Jn(Ee,i.prototype);var cr={Iterable:n,Seq:W,Collection:_e,Map:Ke,OrderedMap:Vt,List:kt,Stack:Hn,Set:Tn,OrderedSet:Ln,Record:Sn,Range:we,Repeat:ye,is:ve,fromJS:pe};return cr}()}(YP);var JP=YP.exports,XP=JP.OrderedMap,ZP={createFromArray:function(e){return XP(e.map((function(e){return[e.getKey(),e]})))}},QP=ZP;var eM=JP,tM=eM.Map,nM=eM.OrderedSet,rM=eM.Record,oM=nM(),iM={style:oM,entity:null},aM=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getStyle=function(){return this.get("style")},n.getEntity=function(){return this.get("entity")},n.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return sM;var n=tM({style:oM,entity:null}).merge(e),r=lM.get(n);if(r)return r;var o=new t(n);return lM=lM.set(n,o),o},t.fromJS=function(e){var n=e.style,r=e.entity;return new t({style:Array.isArray(n)?nM(n):n,entity:Array.isArray(r)?nM(r):r})},t}(rM(iM)),sM=new aM,lM=tM([[tM(iM),sM]]);aM.EMPTY=sM;var cM=aM;var uM=function(e,t,n,r){if(e.size){var o=0;e.reduce((function(e,i,a){return t(e,i)||(n(e)&&r(o,a),o=a),i})),n(e.last())&&r(o,e.count())}};var dM=cM,fM=uM,pM=JP,hM=pM.List,gM=pM.Map,mM=pM.OrderedSet,vM=pM.Record,bM=pM.Repeat,yM=mM(),xM=vM({key:"",type:"unstyled",text:"",characterList:hM(),depth:0,data:gM()}),wM=function(e){function t(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=hM(bM(dM.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():yM},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.findStyleRanges=function(e,t){fM(this.getCharacterList(),_M,e,t)},n.findEntityRanges=function(e,t){fM(this.getCharacterList(),SM,e,t)},t}(xM);function _M(e,t){return e.getStyle()===t.getStyle()}function SM(e,t){return e.getEntity()===t.getEntity()}var kM=wM;var EM=cM,CM=uM,jM=JP,OM=jM.List,TM=jM.Map,IM=jM.OrderedSet,RM=jM.Record,PM=jM.Repeat,MM=IM(),AM={parent:null,characterList:OM(),data:TM(),depth:0,key:"",text:"",type:"unstyled",children:OM(),prevSibling:null,nextSibling:null},DM=function(e,t){return e.getStyle()===t.getStyle()},FM=function(e,t){return e.getEntity()===t.getEntity()},LM=function(e){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AM;return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=OM(PM(EM.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():MM},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){CM(this.getCharacterList(),DM,e,t)},n.findEntityRanges=function(e,t){CM(this.getCharacterList(),FM,e,t)},t}(RM(AM)),NM=LM,BM=cM,zM=JP.Map,$M={add:function(e,t,n){return VM(e,t,n,!0)},remove:function(e,t,n){return VM(e,t,n,!1)}};function VM(e,t,n,r){var o=e.getBlockMap(),i=t.getStartKey(),a=t.getStartOffset(),s=t.getEndKey(),l=t.getEndOffset(),c=o.skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===s})).concat(zM([[s,o.get(s)]])).map((function(e,t){var o,c;i===s?(o=a,c=l):(o=t===i?a:0,c=t===s?l:e.getLength());for(var u,d=e.getCharacterList();o<c;)u=d.get(o),d=d.set(o,r?BM.applyStyle(u,n):BM.removeStyle(u,n)),o++;return e.set("characterList",d)}));return e.merge({blockMap:o.merge(c),selectionBefore:t,selectionAfter:t})}var HM=$M,KM=cM;var UM=function(e,t,n,r){for(var o=t,i=e.getCharacterList();o<n;)i=i.set(o,KM.applyEntity(i.get(o),r)),o++;return e.set("characterList",i)},GM=UM,WM=JP;var qM=function(e,t,n){var r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).toOrderedMap().merge(WM.OrderedMap([[a,r.get(a)]])).map((function(e,t){var r=t===o?i:0,l=t===a?s:e.getLength();return GM(e,r,l,n)}));return e.merge({blockMap:r.merge(l),selectionBefore:t,selectionAfter:t})},YM={getRemovalRange:function(e,t,n,r,o){var i=n.split(" ");i=i.map((function(e,t){if("forward"===o){if(t>0)return" "+e}else if(t<i.length-1)return e+" ";return e}));for(var a,s=r,l=null,c=null,u=0;u<i.length;u++){if(e<(a=s+i[u].length)&&s<t)null!==l||(l=s),c=a;else if(null!==l)break;s=a}var d=r+n.length,f=l===r,p=c===d;return(!f&&p||f&&!p)&&("forward"===o?c!==d&&c++:l!==r&&l--),{start:l,end:c}}},JM=function(e){};var XM=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(JM(t),!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return String(r[a++])})))).name="Invariant Violation"}throw i.framesToPop=1,i}},ZM=XM;var QM=function(e,t){var n=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){n.push({start:e,end:t})})),n.length||ZM(!1),n},eA=YM,tA=QM,nA=XM;function rA(e,t,n,r,o,i,a){var s=n.getStartOffset(),l=n.getEndOffset(),c=e.__get(o).getMutability(),u=a?s:l;if("MUTABLE"===c)return n;var d=tA(t,o).filter((function(e){return u<=e.end&&u>=e.start}));1!=d.length&&nA(!1);var f=d[0];if("IMMUTABLE"===c)return n.merge({anchorOffset:f.start,focusOffset:f.end,isBackward:!1});i||(a?l=f.end:s=f.start);var p=eA.getRemovalRange(s,l,t.getText().slice(f.start,f.end),f.start,r);return n.merge({anchorOffset:p.start,focusOffset:p.end,isBackward:!1})}var oA=function(e,t,n,r,o){var i=r.getStartOffset(),a=r.getEndOffset(),s=t.getEntityAt(i),l=n.getEntityAt(a-1);if(!s&&!l)return r;var c=r;if(s&&s===l)c=rA(e,t,c,o,s,!0,!0);else if(s&&l){var u=rA(e,t,c,o,s,!1,!0),d=rA(e,n,c,o,l,!1,!1);c=c.merge({anchorOffset:u.getAnchorOffset(),focusOffset:d.getFocusOffset(),isBackward:!1})}else if(s){var f=rA(e,t,c,o,s,!1,!0);c=c.merge({anchorOffset:f.getStartOffset(),isBackward:!1})}else if(l){var p=rA(e,n,c,o,l,!1,!1);c=c.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return c},iA={},aA=Math.pow(2,24);var sA=function(){for(var e;void 0===e||iA.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*aA).toString(32);return iA[e]=!0,e},lA=NM,cA=sA,uA=JP.OrderedMap,dA=function(e){return e.first()instanceof lA?function(e){var t,n={};return uA(e.withMutations((function(e){e.forEach((function(r,o){var i=r.getKey(),a=r.getNextSiblingKey(),s=r.getPrevSiblingKey(),l=r.getChildKeys(),c=r.getParentKey(),u=cA();if(n[i]=u,a&&(e.get(a)?e.setIn([a,"prevSibling"],u):e.setIn([i,"nextSibling"],null)),s&&(e.get(s)?e.setIn([s,"nextSibling"],u):e.setIn([i,"prevSibling"],null)),c&&e.get(c)){var d=e.get(c).getChildKeys();e.setIn([c,"children"],d.set(d.indexOf(r.getKey()),u))}else e.setIn([i,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],u),e.setIn([i,"prevSibling"],n[t.getKey()])),t=e.get(i);l.forEach((function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([i,"children"],r.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[n[e.getKey()],e.set("key",n[e.getKey()])]})))}(e):function(e){return uA(e.toArray().map((function(e){var t=cA();return[t,e.set("key",t)]})))}(e)},fA=cM,pA=uM,hA=XM;function gA(e,t,n){var r=t.getCharacterList(),o=n>0?r.get(n-1):void 0,i=n<r.count()?r.get(n):void 0,a=o?o.getEntity():void 0,s=i?i.getEntity():void 0;if(s&&s===a&&"MUTABLE"!==e.__get(s).getMutability()){for(var l,c=function(e,t,n){var r;return pA(e,(function(e,t){return e.getEntity()===t.getEntity()}),(function(e){return e.getEntity()===t}),(function(e,t){e<=n&&t>=n&&(r={start:e,end:t})})),"object"!=typeof r&&hA(!1),r}(r,s,n),u=c.start,d=c.end;u<d;)l=r.get(u),r=r.set(u,fA.applyEntity(l,null)),u++;return t.set("characterList",r)}return t}var mA=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},i=t.getStartKey(),a=t.getStartOffset(),s=n.get(i),l=gA(r,s,a);l!==s&&(o[i]=l);var c=t.getEndKey(),u=t.getEndOffset(),d=n.get(c);i===c&&(d=l);var f=gA(r,d,u);return f!==d&&(o[c]=f),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)},vA=dA,bA=mA,yA=function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=t.getEndKey(),i=t.getEndOffset(),a=bA(e,t).getBlockMap(),s=a.keySeq(),l=s.indexOf(n),c=s.indexOf(o)+1;return vA(a.slice(l,c).map((function(e,t){var a=e.getText(),s=e.getCharacterList();return n===o?e.merge({text:a.slice(r,i),characterList:s.slice(r,i)}):t===n?e.merge({text:a.slice(r),characterList:s.slice(r)}):t===o?e.merge({text:a.slice(0,i),characterList:s.slice(0,i)}):e})))};var xA=function(e,t,n){var r=e;if(n===r.count())t.forEach((function(e){r=r.push(e)}));else if(0===n)t.reverse().forEach((function(e){r=r.unshift(e)}));else{var o=r.slice(0,n),i=r.slice(n);r=o.concat(t,i).toList()}return r},wA=QP,_A=NM,SA=xA,kA=XM,EA=dA,CA=JP.List,jA=function(e,t,n,r,o,i){var a=n.first()instanceof _A,s=[],l=r.size,c=n.get(o),u=r.first(),d=r.last(),f=d.getLength(),p=d.getKey(),h=a&&(!c.getChildKeys().isEmpty()||!u.getChildKeys().isEmpty());n.forEach((function(e,t){t===o?(h?s.push(e):s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.slice(0,t),a=o.slice(0,t),s=n.first();return e.merge({text:i+s.getText(),characterList:a.concat(s.getCharacterList()),type:i?e.getType():s.getType(),data:s.getData()})}(e,i,r)),r.slice(h?0:1,l-1).forEach((function(e){return s.push(e)})),s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.length,a=r.slice(t,i),s=o.slice(t,i),l=n.last();return l.merge({text:l.getText()+a,characterList:l.getCharacterList().concat(s),data:l.getData()})}(e,i,r))):s.push(e)}));var g=wA.createFromArray(s);return a&&(g=function(e,t,n,r){return e.withMutations((function(t){var o=n.getKey(),i=r.getKey(),a=n.getNextSiblingKey(),s=n.getParentKey(),l=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(r,e),c=l[l.length-1];if(t.get(i)?(t.setIn([o,"nextSibling"],i),t.setIn([i,"prevSibling"],o)):(t.setIn([o,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],o)),t.setIn([c,"nextSibling"],a),a&&t.setIn([a,"prevSibling"],c),l.forEach((function(e){return t.setIn([e,"parent"],s)})),s){var u=e.get(s).getChildKeys(),d=u.indexOf(o)+1,f=u.toArray();f.splice.apply(f,[d,0].concat(l)),t.setIn([s,"children"],CA(f))}}))}(g,0,c,u)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:p,anchorOffset:f,focusKey:p,focusOffset:f,isBackward:!1})})},OA=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||kA(!1);var o=e.getBlockMap(),i=EA(n),a=t.getStartKey(),s=t.getStartOffset(),l=o.get(a);return l instanceof _A&&(l.getChildKeys().isEmpty()||kA(!1)),1===i.size?function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),l=s.getText(),c=s.getCharacterList(),u=o,d=i+r.getText().length,f=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":f=r.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":f=r.getData()}var p=s.getType();l&&"unstyled"===p&&(p=r.getType());var h=s.merge({text:l.slice(0,i)+r.getText()+l.slice(i),characterList:SA(c,r.getCharacterList(),i),type:p,data:f});return e.merge({blockMap:n.set(o,h),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})}(e,t,o,i.first(),a,s,r):jA(e,t,o,i,a,s)},TA=xA,IA=XM,RA=JP.Repeat;var PA=function(e,t,n,r){t.isCollapsed()||IA(!1);var o=null;if(null!=n&&(o=n.length),null==o||0===o)return e;var i=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),l=i.get(a),c=l.getText(),u=l.merge({text:c.slice(0,s)+n+c.slice(s,l.getLength()),characterList:TA(l.getCharacterList(),RA(r,o).toList(),s)}),d=s+o;return e.merge({blockMap:i.set(a,u),selectionAfter:t.merge({anchorOffset:d,focusOffset:d})})},MA=JP.Map;var AA=function(e,t,n){var r=t.getStartKey(),o=t.getEndKey(),i=e.getBlockMap(),a=i.toSeq().skipUntil((function(e,t){return t===r})).takeUntil((function(e,t){return t===o})).concat(MA([[o,i.get(o)]])).map(n);return e.merge({blockMap:i.merge(a),selectionBefore:t,selectionAfter:t})},DA=NM,FA=function(e,t){if(!(e instanceof DA))return null;var n=e.getNextSiblingKey();if(n)return n;var r=e.getParentKey();if(!r)return null;for(var o=t.get(r);o&&!o.getNextSiblingKey();){var i=o.getParentKey();o=i?t.get(i):null}return o?o.getNextSiblingKey():null},LA=NM,NA=FA,BA=JP;BA.List;var zA=BA.Map,$A=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},VA=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},HA=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},KA=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},UA=function(e,t,n,r){return e.withMutations((function(o){if($A(t.getKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})})),$A(n.getKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})})),VA(t.getKey(),r).forEach((function(e){return $A(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),$A(t.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),$A(t.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r)})})),$A(n.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:KA(e,o,r)})})),$A(n.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),VA(n.getKey(),r).forEach((function(e){$A(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=NA(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?NA(o,t):null}return n}(n,r).forEach((function(e){return $A(e,o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),null==e.get(t.getKey())&&null!=e.get(n.getKey())&&n.getParentKey()===t.getKey()&&null==n.getPrevSiblingKey()){var i=t.getPrevSiblingKey();$A(n.getKey(),o,(function(e){return e.merge({prevSibling:i})})),$A(i,o,(function(e){return e.merge({nextSibling:n.getKey()})}));var a=i?e.get(i):null,s=a?a.getParentKey():null;if(t.getChildKeys().forEach((function(e){$A(e,o,(function(e){return e.merge({parent:s})}))})),null!=s){var l=e.get(s);$A(s,o,(function(e){return e.merge({children:l.getChildKeys().concat(t.getChildKeys())})}))}$A(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),o,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))},GA=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e},WA=function(e,t){if(t.isCollapsed())return e;var n,r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.get(o),c=r.get(a),u=l instanceof LA,d=[];if(u){var f=c.getChildKeys(),p=VA(a,r);c.getNextSiblingKey()&&(d=d.concat(p)),f.isEmpty()||(d=d.concat(p.concat([a]))),d=d.concat(VA(NA(c,r),r))}n=l===c?GA(l.getCharacterList(),i,s):l.getCharacterList().slice(0,i).concat(c.getCharacterList().slice(s));var h=l.merge({text:l.getText().slice(0,i)+c.getText().slice(s),characterList:n}),g=u&&0===i&&0===s&&c.getParentKey()===o&&null==c.getPrevSiblingKey()?zA([[o,null]]):r.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).filter((function(e,t){return-1===d.indexOf(t)})).concat(zA([[a,null]])).map((function(e,t){return t===o?h:null})),m=r.merge(g).filter((function(e){return!!e}));return u&&l!==c&&(m=UA(m,l,c,r)),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:o,anchorOffset:i,focusKey:o,focusOffset:i,isBackward:!1})})},qA=NM,YA=sA,JA=JP,XA=XM,ZA=AA,QA=JA.List,eD=JA.Map,tD=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},nD=function(e,t){t.isCollapsed()||XA(!1);var n=t.getAnchorKey(),r=e.getBlockMap(),o=r.get(n),i=o.getText();if(!i){var a=o.getType();if("unordered-list-item"===a||"ordered-list-item"===a)return ZA(e,t,(function(e){return e.merge({type:"unstyled",depth:0})}))}var s=t.getAnchorOffset(),l=o.getCharacterList(),c=YA(),u=o instanceof qA,d=o.merge({text:i.slice(0,s),characterList:l.slice(0,s)}),f=d.merge({key:c,text:i.slice(s),characterList:l.slice(s),data:eD()}),p=r.toSeq().takeUntil((function(e){return e===o})),h=r.toSeq().skipUntil((function(e){return e===o})).rest(),g=p.concat([[n,d],[c,f]],h).toOrderedMap();return u&&(o.getChildKeys().isEmpty()||XA(!1),g=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),o=n.getKey();tD(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,i=t.toArray();return i.splice(n,0,o),e.merge({children:QA(i)})})),tD(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:o})})),tD(r,e,(function(e){return e.merge({nextSibling:o})})),tD(o,e,(function(e){return e.merge({prevSibling:r})}))}))}(g,d,f)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:c,anchorOffset:0,focusKey:c,focusOffset:0,isBackward:!1})})},rD=cM,oD=HM,iD=qM,aD=oA,sD=yA,lD=OA,cD=PA,uD=XM,dD=AA,fD=mA,pD=WA,hD=nD,gD=JP.OrderedSet,mD={replaceText:function(e,t,n,r,o){var i=fD(e,t),a=pD(i,t),s=rD.create({style:r||gD(),entity:o||null});return cD(a,a.getSelectionAfter(),n,s)},insertText:function(e,t,n,r,o){return t.isCollapsed()||uD(!1),mD.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=sD(e,t),o=mD.removeRange(e,t,"backward");return mD.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=fD(e,t),i=pD(o,t);return lD(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,o,i,a;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),a=e.getBlockForKey(o);var s=t.getStartOffset(),l=t.getEndOffset(),c=i.getEntityAt(s),u=a.getEntityAt(l-1);if(r===o&&c&&c===u){var d=aD(e.getEntityMap(),i,a,t,n);return pD(e,d)}var f=fD(e,t);return pD(f,t)},splitBlock:function(e,t){var n=fD(e,t),r=pD(n,t);return hD(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return oD.add(e,t,n)},removeInlineStyle:function(e,t,n){return oD.remove(e,t,n)},setBlockType:function(e,t,n){return dD(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return dD(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return dD(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=fD(e,t);return iD(r,t,n)}},vD=mD;var bD=function(e){return Object.keys(e).map((function(t){return e[t]}))};function yD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xD=uM,wD=bD,_D=JP,SD=_D.List,kD=_D.Repeat,ED=_D.Record,CD=function(){return!0},jD=ED({start:null,end:null}),OD=ED({start:null,end:null,decoratorKey:null,leaves:null}),TD={generate:function(e,t,n){var r=t.getLength();if(!r)return SD.of(new OD({start:0,end:0,decoratorKey:null,leaves:SD.of(new jD({start:0,end:0}))}));var o=[],i=n?n.getDecorations(t,e):SD(kD(null,r)),a=t.getCharacterList();return xD(i,RD,CD,(function(e,t){o.push(new OD({start:e,end:t,decoratorKey:i.get(e),leaves:ID(a.slice(e,t).toList(),e)}))})),SD(o)},fromJS:function(e){var t=e.leaves,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,["leaves"]);return new OD(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){yD(e,t,n[t])}))}return e}({},n,{leaves:null!=t?SD(Array.isArray(t)?t:wD(t)).map((function(e){return jD(e)})):null}))}};function ID(e,t){var n=[],r=e.map((function(e){return e.getStyle()})).toList();return xD(r,RD,CD,(function(e,r){n.push(new jD({start:e+t,end:r+t}))})),SD(n)}function RD(e,t){return e===t}var PD=TD;var MD=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getType=function(){return this.get("type")},n.getMutability=function(){return this.get("mutability")},n.getData=function(){return this.get("data")},t}((0,JP.Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object})),AD=MD;var DD=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LD=AD,ND=XM,BD=DD,zD=(0,JP.Map)(),$D=BD();function VD(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var HD={getLastCreatedEntityKey:function(){return VD("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),HD.__getLastCreatedEntityKey()},create:function(e,t,n){return VD("DraftEntity.create","contentState.createEntity"),HD.__create(e,t,n)},add:function(e){return VD("DraftEntity.add","contentState.addEntity"),HD.__add(e)},get:function(e){return VD("DraftEntity.get","contentState.getEntity"),HD.__get(e)},__getAll:function(){return zD},__loadWithEntities:function(e){zD=e,$D=BD()},mergeData:function(e,t){return VD("DraftEntity.mergeData","contentState.mergeEntityData"),HD.__mergeData(e,t)},replaceData:function(e,t){return VD("DraftEntity.replaceData","contentState.replaceEntityData"),HD.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return $D},__create:function(e,t,n){return HD.__add(new LD({type:e,mutability:t,data:n||{}}))},__add:function(e){return $D=BD(),zD=zD.set($D,e),$D},__get:function(e){var t=zD.get(e);return t||ND(!1),t},__mergeData:function(e,t){var n=HD.__get(e),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){FD(e,t,n[t])}))}return e}({},n.getData(),t),o=n.set("data",r);return zD=zD.set(e,o),o},__replaceData:function(e,t){var n=HD.__get(e).set("data",t);return zD=zD.set(e,n),n}},KD=HD;var UD=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},n.getAnchorKey=function(){return this.get("anchorKey")},n.getAnchorOffset=function(){return this.get("anchorOffset")},n.getFocusKey=function(){return this.get("focusKey")},n.getFocusOffset=function(){return this.get("focusOffset")},n.getIsBackward=function(){return this.get("isBackward")},n.getHasFocus=function(){return this.get("hasFocus")},n.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var i=this.getStartOffset(),a=this.getEndOffset();return t<=i&&i<=n||t<=a&&a<=n}if(e!==r&&e!==o)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},n.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},n.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},n.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},n.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},n.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,JP.Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1})),GD=UD,WD=function(e){return!!(typeof window<"u"&&window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]},qD=new RegExp("\r","g");var YD=function(e){return e.replace(qD,"")};function JD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XD(e,t,n[t])}))}return e}function XD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZD=QP,QD=cM,eF=kM,tF=NM,nF=KD,rF=GD,oF=sA,iF=bD,aF=WD,sF=JP,lF=YD,cF=sF.List,uF=sF.Record,dF=sF.Repeat,fF=sF.Map,pF=sF.OrderedMap,hF=uF({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),gF=aF("draft_tree_data_support")?tF:eF,mF=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getEntityMap=function(){return nF},n.getBlockMap=function(){return this.get("blockMap")},n.getSelectionBefore=function(){return this.get("selectionBefore")},n.getSelectionAfter=function(){return this.get("selectionAfter")},n.getBlockForKey=function(e){return this.getBlockMap().get(e)},n.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlocksAsArray=function(){return this.getBlockMap().toArray()},n.getFirstBlock=function(){return this.getBlockMap().first()},n.getLastBlock=function(){return this.getBlockMap().last()},n.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},n.getLastCreatedEntityKey=function(){return nF.__getLastCreatedEntityKey()},n.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},n.createEntity=function(e,t,n){return nF.__create(e,t,n),this},n.mergeEntityData=function(e,t){return nF.__mergeData(e,t),this},n.replaceEntityData=function(e,t){return nF.__replaceData(e,t),this},n.addEntity=function(e){return nF.__add(e),this},n.getEntity=function(e){return nF.__get(e)},n.getAllEntities=function(){return nF.__getAll()},n.loadWithEntities=function(e){return nF.__loadWithEntities(e)},t.createFromBlockArray=function(e,n){var r=Array.isArray(e)?e:e.contentBlocks,o=ZD.createFromArray(r),i=o.isEmpty()?new rF:rF.createEmpty(o.first().getKey());return new t({blockMap:o,entityMap:n||nF,selectionBefore:i,selectionAfter:i})},t.createFromText=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(n).map((function(e){return e=lF(e),new gF({key:oF(),text:e,type:"unstyled",characterList:cF(dF(QD.EMPTY,e.length))})}));return t.createFromBlockArray(r)},t.fromJS=function(e){return new t(JD({},e,{blockMap:pF(e.blockMap).map(t.createContentBlockFromJS),selectionBefore:new rF(e.selectionBefore),selectionAfter:new rF(e.selectionAfter)}))},t.createContentBlockFromJS=function(e){var t=e.characterList;return new gF(JD({},e,{data:fF(e.data),characterList:null!=t?cF((Array.isArray(t)?t:iF(t)).map((function(e){return QD.fromJS(e)}))):void 0}))},t}(hF),vF=mF,bF=XM,yF="LTR",xF=null;function wF(e){return e===yF||"RTL"===e}function _F(e){return wF(e)||bF(!1),e===yF?"ltr":"rtl"}function SF(e){xF=e}var kF={NEUTRAL:"NEUTRAL",LTR:yF,RTL:"RTL",isStrong:wF,getHTMLDir:_F,getHTMLDirIfDifferent:function(e,t){return wF(e)||bF(!1),wF(t)||bF(!1),e===t?null:_F(e)},setGlobalDir:SF,initGlobalDir:function(){SF(yF)},getGlobalDir:function(){return xF||this.initGlobalDir(),xF||bF(!1),xF}},EF=kF,CF=EF,jF=XM,OF="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",TF="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",IF=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+OF+TF+"]"),RF=new RegExp("["+OF+TF+"]");function PF(e){var t=IF.exec(e);return null==t?null:t[0]}function MF(e){var t=PF(e);return null==t?CF.NEUTRAL:RF.exec(t)?CF.RTL:CF.LTR}function AF(e,t){if(t=t||CF.NEUTRAL,!e.length)return t;var n=MF(e);return n===CF.NEUTRAL?t:n}function DF(e,t){return t||(t=CF.getGlobalDir()),CF.isStrong(t)||jF(!1),AF(e,t)}var FF={firstStrongChar:PF,firstStrongCharDir:MF,resolveBlockDir:AF,getDirection:DF,isDirectionLTR:function(e,t){return DF(e,t)===CF.LTR},isDirectionRTL:function(e,t){return DF(e,t)===CF.RTL}},LF=FF;function NF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var BF,zF=LF,$F=EF,VF=XM,HF=function(){function e(e){NF(this,"_defaultDir",void 0),NF(this,"_lastDir",void 0),e?$F.isStrong(e)||VF(!1):e=$F.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=zF.getDirection(e,this._lastDir),this._lastDir},e}(),KF=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")},UF=HF,GF=JP,WF=KF,qF=GF.OrderedMap,YF={getDirectionMap:function(e,t){BF?BF.reset():BF=new UF;var n=e.getBlockMap(),r=n.valueSeq().map((function(e){return WF(BF).getDirection(e.getText())})),o=qF(n.keySeq().zip(r));return null!=t&&GF.is(t,o)?t:o}};function JF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XF(e,t,n[t])}))}return e}function XF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZF=PD,QF=vF,eL=YF,tL=GD,nL=JP,rL=nL.OrderedSet,oL=nL.Record,iL=nL.Stack,aL=nL.OrderedMap,sL=nL.List,lL=oL({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:iL(),selection:null,treeMap:null,undoStack:iL()}),cL=function(){t.createEmpty=function(e){return this.createWithText("",e)},t.createWithText=function(e,n){return t.createWithContent(QF.createFromText(e),n)},t.createWithContent=function(e,n){if(0===e.getBlockMap().count())return t.createEmpty(n);var r=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:iL(),redoStack:iL(),decorator:n||null,selection:tL.createEmpty(r)})},t.create=function(e){var n=e.currentContent,r=JF({},e,{treeMap:dL(n,e.decorator),directionMap:eL.getDirectionMap(n)});return new t(new lL(r))},t.fromJS=function(e){return new t(new lL(JF({},e,{directionMap:null!=e.directionMap?aL(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?rL(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?QF.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?iL(e.redoStack.map((function(e){return QF.fromJS(e)}))):e.redoStack,selection:null!=e.selection?new tL(e.selection):e.selection,treeMap:null!=e.treeMap?aL(e.treeMap).map((function(e){return sL(e).map((function(e){return ZF.fromJS(e)}))})):e.treeMap,undoStack:null!=e.undoStack?iL(e.undoStack.map((function(e){return QF.fromJS(e)}))):e.undoStack,currentContent:QF.fromJS(e.currentContent)})))},t.set=function(e,n){var r=e.getImmutable().withMutations((function(t){var r=t.get("decorator"),o=r;null===n.decorator?o=null:n.decorator&&(o=n.decorator);var i=n.currentContent||e.getCurrentContent();if(o!==r){var a,s=t.get("treeMap");return a=o&&r?function(e,t,n,r,o){return n.merge(t.toSeq().filter((function(t){return r.getDecorations(t,e)!==o.getDecorations(t,e)})).map((function(t){return ZF.generate(e,t,r)})))}(i,i.getBlockMap(),s,o,r):dL(i,o),void t.merge({decorator:o,treeMap:a,nativelyRenderedContent:null})}i!==e.getCurrentContent()&&t.set("treeMap",function(e,t,n,r){var o=e.getCurrentContent().set("entityMap",n),i=o.getBlockMap(),a=e.getImmutable().get("treeMap");return a.merge(t.toSeq().filter((function(e,t){return e!==i.get(t)})).map((function(e){return ZF.generate(o,e,r)})))}(e,i.getBlockMap(),i.getEntityMap(),o)),t.merge(n)}));return new t(r)};var e=t.prototype;function t(e){XF(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,n){return t.set(e,{inlineStyleOverride:n})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r>0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):fL(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r<o.getLength()?o.getInlineStyleAt(r):r>0?o.getInlineStyleAt(r-1):fL(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return uL(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),uL(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return t.acceptSelection(e,new tL({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var i=eL.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var a=e.getSelection(),s=e.getCurrentContent(),l=e.getUndoStack(),c=n;a!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,r)?(l=l.push(s),c=c.set("selectionBefore",a)):("insert-characters"===r||"backspace-character"===r||"delete-character"===r)&&(c=c.set("selectionBefore",s.getSelectionBefore()));var u=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(u=null);var d={currentContent:c,directionMap:i,undoStack:l,redoStack:iL(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:u};return t.set(e,d)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=eL.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=eL.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:e.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function uL(e,t,n){return cL.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function dL(e,t){return e.getBlockMap().map((function(n){return ZF.generate(e,n,t)})).toOrderedMap()}function fL(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):rL()}var pL=cL,hL=JP;hL.OrderedMap,hL.List;var gL=JP;WD("draft_tree_data_support"),gL.List,gL.Repeat;JP.List;function mL(e){return e.replace(/\//g,"-")}var vL=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(mL).join(" "):Array.prototype.map.call(arguments,mL).join(" ")},bL=s,yL=vL,xL=(0,JP.Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:bL.createElement("ul",{className:yL("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:bL.createElement("ol",{className:yL("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:bL.createElement("pre",{className:yL("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}}),wL={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}},_L={exports:{}};!function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",u="name",d="type",f="vendor",p="version",h="architecture",g="console",m="mobile",v="tablet",b="smarttv",y="wearable",x="embedded",w="Amazon",_="Apple",S="ASUS",k="BlackBerry",E="Browser",C="Chrome",j="Firefox",O="Google",T="Huawei",I="LG",R="Microsoft",P="Motorola",M="Opera",A="Samsung",D="Sharp",F="Sony",L="Xiaomi",N="Zebra",B="Facebook",z="Chromium OS",$="Mac OS",V=" Browser",H=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},K=function(e,t){return typeof e===s&&-1!==U(t).indexOf(U(e))},U=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},W=function(e,t){for(var n,i,s,l,c,u,d=0;d<t.length&&!c;){var f=t[d],p=t[d+1];for(n=i=0;n<f.length&&!c&&f[n];)if(c=f[n++].exec(e))for(s=0;s<p.length;s++)u=c[++i],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):r:this[l[0]]=u?l[1].call(this,u,l[2]):r:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):r):this[l]=u||r;d+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(K(t[n][o],e))return"?"===n?r:n}else if(K(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,p],[/opios[\/ ]+([\w\.]+)/i],[p,[u,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[u,M+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[u,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[u,"UC"+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[u,"Smart Lenovo "+E]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[u,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[u,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[u,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[u,"MIUI"+V]],[/fxios\/([\w\.-]+)/i],[p,[u,j]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+V],p],[/samsungbrowser\/([\w\.]+)/i],[p,[u,A+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,B],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[u,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,C+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[u,"Android "+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[p,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[u,j+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,U]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[f,A],[d,v]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[f,A],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[f,_],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,_],[d,v]],[/(macintosh);/i],[c,[f,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[f,D],[d,m]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[f,"Honor"],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[f,T],[d,v]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[f,T],[d,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[f,L],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[f,L],[d,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[f,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[f,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[f,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[f,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[f,P],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[f,P],[d,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[f,I],[d,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[f,I],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[f,"Lenovo"],[d,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[f,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[f,O],[d,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[f,O],[d,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[f,F],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[f,F],[d,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[f,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[f,w],[d,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[f,w],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,f,[d,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[f,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[f,S],[d,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[f,S],[d,m]],[/(nexus 9)/i],[c,[f,"HTC"],[d,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[c,/_/g," "],[d,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[f,"TCL"],[d,v]],[/(itel) ((\w+))/i],[[f,U],c,[d,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[f,"Acer"],[d,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[f,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[f,"Ulefone"],[d,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[f,"Energizer"],[d,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[f,"Cat"],[d,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[f,"Smartfren"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[f,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,c,[d,m]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,c,[d,v]],[/(surface duo)/i],[c,[f,R],[d,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[f,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[f,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[f,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[f,"RCA"],[d,v]],[/\b(venue[\d ]{2,7}) b/i],[c,[f,"Dell"],[d,v]],[/\b(q(?:mv|ta)\w+) b/i],[c,[f,"Verizon"],[d,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[f,"Barnes & Noble"],[d,v]],[/\b(tm\d{3}\w+) b/i],[c,[f,"NuVision"],[d,v]],[/\b(k88) b/i],[c,[f,"ZTE"],[d,v]],[/\b(nx\d{3}j) b/i],[c,[f,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[f,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[f,"Swiss"],[d,v]],[/\b((zeki)?tb.*\b) b/i],[c,[f,"Zeki"],[d,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],c,[d,v]],[/\b(ns-?\w{0,9}) b/i],[c,[f,"Insignia"],[d,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[f,"NextBook"],[d,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[f,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[f,"Envizen"],[d,v]],[/\b(trio[-\w\. ]+) b/i],[c,[f,"MachSpeed"],[d,v]],[/\btu_(1491) b/i],[c,[f,"Rotor"],[d,v]],[/(shield[\w ]+) b/i],[c,[f,"Nvidia"],[d,v]],[/(sprint) (\w+)/i],[f,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,R],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,N],[d,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,N],[d,m]],[/smart-tv.+(samsung)/i],[f,[d,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,A],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,I],[d,b]],[/(apple) ?tv/i],[f,[c,_+" TV"],[d,b]],[/crkey/i],[[c,C+"cast"],[f,O],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[c,[f,w],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[f,D],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[f,F],[d,b]],[/(mitv-\w{5}) bui/i],[c,[f,L],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[f,c,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,G],[c,G],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,c,[d,g]],[/droid.+; (shield) bui/i],[c,[f,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[f,F],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[f,R],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[f,A],[d,y]],[/((pebble))app/i],[f,c,[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[f,_],[d,y]],[/droid.+; (glass) \d/i],[c,[f,O],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[f,N],[d,y]],[/droid.+; (glass) \d/i],[c,[f,O],[d,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,c,[d,y]],[/; (quest( \d| pro)?)/i],[c,[f,B],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,x]],[/(aeobc)\b/i],[c,[f,w],[d,x]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[p,q,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,q,Y],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,$],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,p],[/\(bb(10);/i],[p,[u,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[u,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[u,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,z],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,p],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,p]]},X=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof X))return new X(e,t).getResult();var g=typeof n!==i&&n.navigator?n.navigator:r,b=e||(g&&g.userAgent?g.userAgent:""),y=g&&g.userAgentData?g.userAgentData:r,x=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(J,t):J,w=g&&g.userAgent==b;return this.getBrowser=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[p]),w&&g&&g.brave&&typeof g.brave.isBrave==o&&(e[u]="Brave"),e},this.getCPU=function(){var e={};return e[h]=r,W.call(e,b,x.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[c]=r,e[d]=r,W.call(e,b,x.device),w&&!e[d]&&y&&y.mobile&&(e[d]=m),w&&"Macintosh"==e[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[c]="iPad",e[d]=v),e},this.getEngine=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.engine),e},this.getOS=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.os),w&&!e[u]&&y&&y.platform&&"Unknown"!=y.platform&&(e[u]=y.platform.replace(/chrome os/i,z).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(b),this};X.VERSION="0.7.40",X.BROWSER=H([u,p,l]),X.CPU=H([h]),X.DEVICE=H([c,f,d,g,m,b,v,y,x]),X.ENGINE=X.OS=H([u,p]),e.exports&&(t=e.exports=X),t.UAParser=X;var Z=typeof n!==i&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var Q=new X;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:kc)}(_L,_L.exports);var SL="Unknown",kL={"Mac OS":"Mac OS X"};var EL=(new(0,_L.exports)).getResult(),CL=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(EL.browser.version),jL={browserArchitecture:EL.cpu.architecture||SL,browserFullVersion:EL.browser.version||SL,browserMinorVersion:CL.minor||SL,browserName:EL.browser.name||SL,browserVersion:EL.browser.major||SL,deviceName:EL.device.model||SL,engineName:EL.engine.name||SL,engineVersion:EL.engine.version||SL,platformArchitecture:EL.cpu.architecture||SL,platformName:function(e){return kL[e]||e}(EL.os.name)||SL,platformVersion:EL.os.version||SL,platformFullVersion:EL.os.version||SL},OL=XM,TL=/\./,IL=/\|\|/,RL=/\s+\-\s+/,PL=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,ML=/^(\d*)(.*)/;function AL(e,t){var n=e.split(IL);return n.length>1?n.some((function(e){return UL.contains(e,t)})):function(e,t){var n=e.split(RL);if(n.length>0&&n.length<=2||OL(!1),1===n.length)return DL(n[0],t);var r=n[0],o=n[1];return zL(r)&&zL(o)||OL(!1),DL(">="+r,t)&&DL("<="+o,t)}(e=n[0].trim(),t)}function DL(e,t){if(""===(e=e.trim()))return!0;var n=t.split(TL),r=NL(e),o=r.modifier,i=r.rangeComponents;switch(o){case"<":return FL(n,i);case"<=":return function(e,t){var n=KL(e,t);return-1===n||0===n}(n,i);case">=":return LL(n,i);case">":return function(e,t){return 1===KL(e,t)}(n,i);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var o=r.length-1,i=parseInt(r[o],10);return BL(i)&&(r[o]=i+1+""),LL(e,n)&&FL(e,r)}(n,i);default:return function(e,t){return 0===KL(e,t)}(n,i)}}function FL(e,t){return-1===KL(e,t)}function LL(e,t){var n=KL(e,t);return 1===n||0===n}function NL(e){var t=e.split(TL),n=t[0].match(PL);return n||OL(!1),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function BL(e){return!isNaN(e)&&isFinite(e)}function zL(e){return!NL(e).modifier}function $L(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function VL(e,t){var n=e.match(ML)[1],r=t.match(ML)[1],o=parseInt(n,10),i=parseInt(r,10);return BL(o)&&BL(i)&&o!==i?HL(o,i):HL(e,t)}function HL(e,t){return typeof e!=typeof t&&OL(!1),e>t?1:e<t?-1:0}function KL(e,t){for(var n=function(e,t){$L(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return $L(t,e.length),[e,t]}(e,t),r=n[0],o=n[1],i=0;i<o.length;i++){var a=VL(r[i],o[i]);if(a)return a}return 0}var UL={contains:function(e,t){return AL(e.trim(),t.trim())}},GL=UL,WL=Object.prototype.hasOwnProperty;var qL=function(e,t,n){if(!e)return null;var r={};for(var o in e)WL.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r};var YL=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}},JL=jL,XL=GL;function ZL(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,XL.contains(o,t))}function QL(e){return"Windows"===JL.platformName?e.replace(/^\s*NT/,""):e}var eN={isBrowser:function(e){return ZL(JL.browserName,JL.browserFullVersion,e)},isBrowserArchitecture:function(e){return ZL(JL.browserArchitecture,null,e)},isDevice:function(e){return ZL(JL.deviceName,null,e)},isEngine:function(e){return ZL(JL.engineName,JL.engineVersion,e)},isPlatform:function(e){return ZL(JL.platformName,JL.platformFullVersion,e,QL)},isPlatformArchitecture:function(e){return ZL(JL.platformArchitecture,null,e)}},tN=qL(eN,YL);var nN=function(e){return e&&e.ownerDocument?e.ownerDocument:document};var rN=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE},oN=rN;var iN=function e(t){if(oN(t)){var n=t,r=n.getAttribute("data-offset-key");if(r)return r;for(var o=0;o<n.childNodes.length;o++){var i=e(n.childNodes[o]);if(i)return i}}return null},aN=nN,sN=iN;var lN=function(e){for(var t=e;t&&t!==aN(e).documentElement;){var n=sN(t);if(null!=n)return n;t=t.parentNode}return null};var cN=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window};function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dN=tN,fN=lN,pN=cN,hN=XM,gN=KF,mN=JP.Map,vN={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},bN=dN.isBrowser("IE <= 11"),yN=function(){function e(e){var t=this;uN(this,"observer",void 0),uN(this,"container",void 0),uN(this,"mutations",void 0),uN(this,"onCharData",void 0),this.container=e,this.mutations=mN();var n=pN(e);n.MutationObserver&&!bN?this.observer=new n.MutationObserver((function(e){return t.registerMutations(e)})):this.onCharData=function(e){e.target instanceof Node||hN(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,vN):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=mN(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return bN?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var n=gN(fN(e.target));this.mutations=this.mutations.set(n,t)}},e}(),xN="-",wN={encode:function(e,t,n){return e+xN+t+xN+n},decode:function(e){var t=e.split(xN).reverse(),n=t[0],r=t[1];return{blockKey:t.slice(2).reverse().join(xN),decoratorKey:parseInt(r,10),leafKey:parseInt(n,10)}}},_N=wN,SN={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105},kN={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}};var EN=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)},CN=XM,jN=EN;var ON=function(e){var t=e.editorContainer;return t||CN(!1),jN(t.firstChild)||CN(!1),t.firstChild},TN=_N,IN=KF;var RN=function(e,t,n,r,o){var i=IN(e.getSelection());if(!t||!r)return i;var a=TN.decode(t),s=a.blockKey,l=e.getBlockTree(s),c=l&&l.getIn([a.decoratorKey,"leaves",a.leafKey]),u=TN.decode(r),d=u.blockKey,f=e.getBlockTree(d),p=f&&f.getIn([u.decoratorKey,"leaves",u.leafKey]);if(!c||!p)return i;var h=c.get("start"),g=p.get("start"),m=c?h+n:null,v=p?g+o:null;if(i.getAnchorKey()===s&&i.getAnchorOffset()===m&&i.getFocusKey()===d&&i.getFocusOffset()===v)return i;var b=!1;if(s===d){var y=c.get("end"),x=p.get("end");b=g===h&&x===y?o<n:g<h}else{var w=e.getCurrentContent().getBlockMap().keySeq().skipUntil((function(e){return e===s||e===d})).first();b=w===d}return i.merge({anchorKey:s,anchorOffset:m,focusKey:d,focusOffset:v,isBackward:b})},PN=lN,MN=iN,AN=RN,DN=XM,FN=rN,LN=KF;function NN(e,t,n){var r=t,o=PN(r);(null!=o||e&&(e===r||e.firstChild===r)||DN(!1),e===r)&&(r=r.firstChild,FN(r)||DN(!1),"true"!==(r=r).getAttribute("data-contents")&&DN(!1),n>0&&(n=r.childNodes.length));if(0===n){var i=null;if(null!=o)i=o;else{var a=function(e){for(;e.firstChild&&(FN(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||MN(e.firstChild));)e=e.firstChild;return e}(r);i=LN(MN(a))}return{key:i,offset:0}}var s=r.childNodes[n-1],l=null,c=null;if(MN(s)){var u=function(e){for(;e.lastChild&&(FN(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||MN(e.lastChild));)e=e.lastChild;return e}(s);l=LN(MN(u)),c=BN(u)}else l=LN(o),c=BN(s);return{key:l,offset:c}}function BN(e){var t=e.textContent;return"\n"===t?0:t.length}var zN=function(e,t,n,r,o,i){var a=n.nodeType===Node.TEXT_NODE,s=o.nodeType===Node.TEXT_NODE;if(a&&s)return{selectionState:AN(e,LN(PN(n)),r,LN(PN(o)),i),needsRecovery:!1};var l=null,c=null,u=!0;return a?(l={key:LN(PN(n)),offset:r},c=NN(t,o,i)):s?(c={key:LN(PN(o)),offset:i},l=NN(t,n,r)):(l=NN(t,n,r),c=NN(t,o,i),n===o&&r===i&&(u=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:AN(e,l.key,l.offset,c.key,c.offset),needsRecovery:u}},$N=zN;var VN=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;return 0===n.rangeCount||null==r||null==i?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:$N(e,t,r,o,i,a)},HN=kN,KN=pL,UN=ON,GN=VN;var WN=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();HN.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var n=e.props.editorState,r=GN(n,UN(e)),o=r.selectionState;o!==n.getSelection()&&(n=r.needsRecovery?KN.forceSelection(n,o):KN.acceptSelection(n,o),e.update(n))}};var qN={notEmptyKey:function(e){return null!=e&&""!=e}},YN=qN.notEmptyKey;function JN(e,t){return YN(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}var XN=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),o=t.getAnchorOffset();return o>0?(n=e.getBlockForKey(r).getEntityAt(o-1))!==e.getBlockForKey(r).getEntityAt(o)?null:JN(e.getEntityMap(),n):null}var i=t.getStartKey(),a=t.getStartOffset(),s=e.getBlockForKey(i);return n=a===s.getLength()?null:s.getEntityAt(a),JN(e.getEntityMap(),n)},ZN=yN,QN=vD,eB=_N,tB=pL,nB=SN,rB=WN,oB=ON,iB=VN,aB=XN,sB=KF,lB=tN.isBrowser("IE"),cB=!1,uB=!1,dB=null;var fB,pB,hB={onCompositionStart:function(e){uB=!0,function(e){dB||(dB=new ZN(oB(e))).start()}(e)},onCompositionEnd:function(e){cB=!1,uB=!1,setTimeout((function(){cB||hB.resolveComposition(e)}),20)},onSelect:rB,onKeyDown:function(e,t){if(!uB)return hB.resolveComposition(e),void e._onKeyDown(t);(t.which===nB.RIGHT||t.which===nB.LEFT)&&t.preventDefault()},onKeyPress:function(e,t){t.which===nB.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!uB){var t=sB(dB).stopAndFlushMutations();dB=null,cB=!0;var n=tB.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),!t.size)return void e.update(n);var r=n.getCurrentContent();t.forEach((function(e,t){var o=eB.decode(t),i=o.blockKey,a=o.decoratorKey,s=o.leafKey,l=n.getBlockTree(i).getIn([a,"leaves",s]),c=l.start,u=l.end,d=n.getSelection().merge({anchorKey:i,focusKey:i,anchorOffset:c,focusOffset:u,isBackward:!1}),f=aB(r,d),p=r.getBlockForKey(i).getInlineStyleAt(c);r=QN.replaceText(r,d,e,p,f),n=tB.set(n,{currentContent:r})}));var o=iB(n,oB(e)).selectionState;e.restoreEditorDOM();var i=lB?tB.forceSelection(n,o):tB.acceptSelection(n,o);e.update(tB.push(i,r,"insert-characters"))}}},gB=hB;function mB(){if(pB)return fB;pB=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=_N,r=s,o=LF,i=EF,a=function(e){function a(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e),a.prototype.render=function(){var e=this.props,a=e.block,s=e.children,l=e.contentState,c=e.decorator,u=e.decoratorKey,d=e.direction,f=e.leafSet,p=e.text,h=a.getKey(),g=f.get("leaves"),m=c.getComponentForKey(u),v=c.getPropsForKey(u),b=n.encode(h,parseInt(u,10),0),y=p.slice(g.first().get("start"),g.last().get("end")),x=i.getHTMLDirIfDifferent(o.getDirection(y),d);return r.createElement(m,t({},v,{contentState:l,decoratedText:y,dir:x,key:b,entityKey:a.getEntityAt(f.get("start")),offsetKey:b}),s)},a}(r.Component);return fB=a}function vB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yB=s,xB=XM,wB=rN,_B=tN.isBrowser("IE <= 11");var SB=function(e){function t(t){var n;return bB(vB(n=e.call(this,t)||this),"_forceFlag",void 0),bB(vB(n),"_node",void 0),n._forceFlag=!1,n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;wB(t)||xB(!1);var r=t;return n?!function(e){return _B?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},n.componentDidMount=function(){this._forceFlag=!this._forceFlag},n.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},n.render=function(){var e=this;return""===this.props.children?this._forceFlag?function(e){return _B?yB.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):yB.createElement("br",{key:"A","data-text":"true",ref:e})}((function(t){return e._node=t})):function(e){return _B?yB.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):yB.createElement("br",{key:"B","data-text":"true",ref:e})}((function(t){return e._node=t})):yB.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(t){return e._node=t}},this.props.children)},t}(yB.Component),kB=SB,EB=rN;var CB=function(e){return!(!e||!e.ownerDocument)&&(EB(e)&&"BR"===e.nodeName)},jB={initODS:function(){},handleExtensionCausedError:function(){}};var OB=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))},TB=OB;var IB=function(e){return TB(e)&&3==e.nodeType};var RB=function e(t,n){return!(!t||!n)&&(t===n||!IB(t)&&(IB(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))};var PB=function(e){if(typeof(e=e||(typeof document<"u"?document:void 0))>"u")return null;try{return e.activeElement||e.body}catch{return e.body}},MB=jB,AB=kN,DB=RB,FB=PB,LB=nN,NB=XM,BB=rN,zB=tN.isBrowser("IE");function $B(e,t){if(!e)return"[empty]";var n=VB(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(BB(n)||NB(!1),n.outerHTML)}function VB(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return LB(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var o=e.cloneNode();1===o.nodeType&&n.length&&o.setAttribute("data-labels",n.join(", "));for(var i=e.childNodes,a=0;a<i.length;a++)o.appendChild(VB(i[a],t));return o}function HB(e,t){for(var n=e,r=n;n;){if(BB(n)&&r.hasAttribute("contenteditable"))return $B(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function KB(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function UB(e,t,n,r){var o=FB();if(e.extend&&null!=t&&DB(o,t)){n>KB(t)&&AB.logSelectionStateFailure({anonymizedDom:HB(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())});var i=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,n)}catch(a){throw AB.logSelectionStateFailure({anonymizedDom:HB(t,(function(t){var n=[];return t===o&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:i,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:n},null,2),selectionState:JSON.stringify(r.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var a=e.getRangeAt(0);a.setEnd(t,n),e.addRange(a.cloneRange())}}function GB(e,t,n,r){var o=LB(t).createRange();if(n>KB(t)&&(AB.logSelectionStateFailure({anonymizedDom:HB(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),MB.handleExtensionCausedError()),o.setStart(t,n),zB)try{e.addRange(o)}catch(e){}else e.addRange(o)}var WB=function(e,t,n,r,o){var i=LB(t);if(DB(i.documentElement,t)){var a=i.defaultView.getSelection(),s=e.getAnchorKey(),l=e.getAnchorOffset(),c=e.getFocusKey(),u=e.getFocusOffset(),d=e.getIsBackward();if(!a.extend&&d){var f=s,p=l;s=c,l=u,c=f,u=p,d=!1}var h=s===n&&r<=l&&o>=l,g=c===n&&r<=u&&o>=u;if(h&&g)return a.removeAllRanges(),GB(a,t,l-r,e),void UB(a,t,u-r,e);if(d){if(g&&(a.removeAllRanges(),GB(a,t,u-r,e)),h){var m=a.focusNode,v=a.focusOffset;a.removeAllRanges(),GB(a,t,l-r,e),UB(a,m,v,e)}}else h&&(a.removeAllRanges(),GB(a,t,l-r,e)),g&&UB(a,t,u-r,e)}},qB=Ou;var YB,JB,XB=kB,ZB=s,QB=XM,ez=CB,tz=WB,nz=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"leaf",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,r=t.start,o=t.text,i=n.getKey(),a=r+o.length;if(e.hasEdgeWithin(i,r,a)){var s=this.leaf;s||QB(!1);var l,c=s.firstChild;c||QB(!1),c.nodeType===Node.TEXT_NODE?l=c:ez(c)?l=s:(l=c.firstChild)||QB(!1),tz(e,l,i,r,a)}}},n.shouldComponentUpdate=function(e){var t=this.leaf;return t||QB(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},n.componentDidUpdate=function(){this._setSelection()},n.componentDidMount=function(){this._setSelection()},n.render=function(){var e=this,t=this.props.block,n=this.props.text;n.endsWith("\n")&&this.props.isLast&&(n+="\n");var r=this.props,o=r.customStyleMap,i=r.customStyleFn,a=r.offsetKey,s=r.styleSet,l=s.reduce((function(e,t){var n={},r=o[t];return void 0!==r&&e.textDecoration!==r.textDecoration&&(n.textDecoration=[e.textDecoration,r.textDecoration].join(" ").trim()),qB(e,r,n)}),{});if(i){var c=i(s,t);l=qB(l,c)}return ZB.createElement("span",{"data-offset-key":a,ref:function(t){return e.leaf=t},style:l},ZB.createElement(XB,null,n))},t}(ZB.Component),rz=nz;function oz(){if(JB)return YB;JB=1;var e=mB(),t=rz,n=_N,r=s,o=vL;JP.List;var i=function(i){function a(){return i.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,i),a.prototype.render=function(){var i=this.props,a=i.block,s=i.contentState,l=i.customStyleFn,c=i.customStyleMap,u=i.decorator,d=i.direction,f=i.forceSelection,p=i.hasSelection,h=i.selection,g=i.tree,m=a.getKey(),v=a.getText(),b=g.size-1,y=this.props.children||g.map((function(o,i){var g=o.get("decoratorKey"),y=o.get("leaves"),x=y.size-1,w=y.map((function(e,o){var s=n.encode(m,i,o),u=e.get("start"),d=e.get("end");return r.createElement(t,{key:s,offsetKey:s,block:a,start:u,selection:p?h:null,forceSelection:f,text:v.slice(u,d),styleSet:a.getInlineStyleAt(u),customStyleMap:c,customStyleFn:l,isLast:g===b&&o===x})})).toArray();return g&&u?r.createElement(e,{block:a,children:w,contentState:s,decorator:u,decoratorKey:g,direction:d,leafSet:o,text:v,key:i}):w})).toArray();return r.createElement("div",{"data-offset-key":n.encode(m,0,0),className:o({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===d,"public/DraftStyleDefault/rtl":"RTL"===d})},y)},a}(r.Component);return YB=i}function iz(e,t){return!!t&&(e===t.documentElement||e===t.body)}var az={getTop:function(e){var t=e.ownerDocument;return iz(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;iz(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return iz(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;iz(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}},sz=az,lz=/-(.)/g;var cz=function(e){return e.replace(lz,(function(e,t){return t.toUpperCase()}))},uz=/([A-Z])/g;var dz=cz,fz=function(e){return e.replace(uz,"-$1").toLowerCase()};function pz(e){return null==e?e:String(e)}var hz=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return pz(n.getPropertyValue(fz(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return pz(n.getPropertyValue(fz(t)));if("display"===t)return"none"}return e.currentStyle?pz("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[dz(t)]):pz(e.style&&e.style[dz(t)])};function gz(e,t){var n=mz.get(e,t);return"auto"===n||"scroll"===n}var mz={get:hz,getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(gz(e,"overflow")||gz(e,"overflowY")||gz(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}},vz=mz,bz=RB;var yz=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!bz(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}},xz=yz;var wz=function(e){var t=xz(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}},_z=typeof navigator<"u"&&navigator.userAgent.indexOf("AppleWebKit")>-1;var Sz=function(e){return(e=e||document).scrollingElement?e.scrollingElement:_z||"CSS1Compat"!==e.compatMode?e.body:e.documentElement},kz=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}};var Ez=function(e){var t=Sz(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=kz(e),r=e===t?e.ownerDocument.documentElement:e,o=e.scrollWidth-r.clientWidth,i=e.scrollHeight-r.clientHeight;return n.x=Math.max(0,Math.min(n.x,o)),n.y=Math.max(0,Math.min(n.y,i)),n};function Cz(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function jz(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function Oz(){return{width:window.innerWidth||Cz(),height:window.innerHeight||jz()}}Oz.withoutScrollbars=function(){return{width:Cz(),height:jz()}};var Tz,Iz,Rz,Pz,Mz=Oz;function Az(){if(Iz)return Tz;Iz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=oz(),i=_N,a=s,l=sz,c=vz,u=wz,d=Ez,f=Mz,p=XM,h=EN;JP.List;var g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},m=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},b=function(e,t,r,o,i,a){var s={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},l=o(e);return l&&(s.className=l),void 0!==i.customEditable&&(s=n({},s,{contentEditable:i.customEditable,suppressContentEditableWarning:!0})),s},y=function(e){function s(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this),"wrapperRef",a.createRef()),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(s,e);var y=s.prototype;return y.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,o=t.tree,i=!n.getChildKeys().isEmpty(),a=n!==e.block||o!==e.tree||r!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection;return i||a},y.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,o=c.getScrollParent(n),i=d(o);if(o===window){var a=u(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{h(n)||p(!1);var s=n;(r=s.offsetHeight+s.offsetTop-(o.offsetHeight+i.y))>0&&l.setTop(o,l.getTop(o)+r+10)}}}},y.render=function(){var e=this,r=this.props,l=r.block,c=r.blockRenderMap,u=r.blockRendererFn,d=r.blockStyleFn,f=r.contentState,p=r.decorator,h=r.editorKey,y=r.editorState,x=r.customStyleFn,w=r.customStyleMap,_=r.direction,S=r.forceSelection,k=r.selection,E=r.tree,C=null;l.children.size&&(C=l.children.reduce((function(t,r){var o=i.encode(r,0,0),l=f.getBlockForKey(r),p=v(l,u),g=p.CustomComponent||s,x=m(l,c),w=x.Element,_=x.wrapperTemplate,S=b(l,h,o,d,p,null),k=n({},e.props,{tree:y.getBlockTree(r),blockProps:p.customProps,offsetKey:o,block:l});return t.push(a.createElement(w,S,a.createElement(g,k))),!_||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(l,f)||function(e,t,n){var r=[],o=!0,s=!1,l=void 0;try{for(var c,u=n.reverse()[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=c.value;if(d.type!==t)break;r.push(d)}}catch(e){s=!0,l=e}finally{try{!o&&null!=u.return&&u.return()}finally{if(s)throw l}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),p=f[0].key;n.push(a.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":i.encode(p,0,0)},f))}(_,w,t),t}),[]));var j=l.getKey(),O=i.encode(j,0,0),T=v(l,u),I=T.CustomComponent,R=null!=I?a.createElement(I,t({},this.props,{tree:y.getBlockTree(j),blockProps:T.customProps,offsetKey:O,block:l})):a.createElement(o,{block:l,children:C,contentState:f,customStyleFn:x,customStyleMap:w,decorator:p,direction:_,forceSelection:S,hasSelection:g(k,j),selection:k,tree:E});if(l.getParentKey())return R;var P=m(l,c).Element,M=b(l,h,O,d,T,this.wrapperRef);return a.createElement(P,M,R)},s}(a.Component);return Tz=y}var Dz=Ou;function Fz(){return Fz=Dz||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fz.apply(this,arguments)}var Lz,Nz,Bz,zz,$z=rz,Vz=_N,Hz=s,Kz=sz,Uz=vz,Gz=LF,Wz=EF,qz=vL,Yz=wz,Jz=Ez,Xz=Mz,Zz=XM,Qz=EN,e$=KF,t$=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},n$=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||t$(e.selection,e.block.getKey())&&e.forceSelection},n.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,o=Uz.getScrollParent(n),i=Jz(o);if(o===window){var a=Yz(n);(r=a.y+a.height-Xz().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{Qz(n)||Zz(!1),(r=n.offsetHeight+n.offsetTop-(o.offsetTop+o.offsetHeight+i.y))>0&&Kz.setTop(o,Kz.getTop(o)+r+10)}}}}},n._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),o=this.props.tree.size-1,i=t$(this.props.selection,n);return this.props.tree.map((function(a,s){var l=a.get("leaves");if(0===l.size)return null;var c=l.size-1,u=l.map((function(a,l){var u=Vz.encode(n,s,l),d=a.get("start"),f=a.get("end");return Hz.createElement($z,{key:u,offsetKey:u,block:t,start:d,selection:i?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(d,f),styleSet:t.getInlineStyleAt(d),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:s===o&&l===c})})).toArray(),d=a.get("decoratorKey");if(null==d||!e.props.decorator)return u;var f=e$(e.props.decorator),p=f.getComponentForKey(d);if(!p)return u;var h=f.getPropsForKey(d),g=Vz.encode(n,s,0),m=l.first().get("start"),v=l.last().get("end"),b=r.slice(m,v),y=t.getEntityAt(a.get("start")),x=Wz.getHTMLDirIfDifferent(Gz.getDirection(b),e.props.direction),w={contentState:e.props.contentState,decoratedText:b,dir:x,start:m,end:v,blockKey:n,entityKey:y,offsetKey:g};return Hz.createElement(p,Fz({},h,w,{key:g}),u)})).toArray()},n.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,o=qz({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return Hz.createElement("div",{"data-offset-key":r,className:o,ref:function(t){return e._node=t}},this._renderChildren())},t}(Hz.Component),r$=n$;var o$=WD("draft_tree_data_support")?function(){if(Pz)return Rz;Pz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=Az(),r=_N,o=s,i=KF,a=function(e){function a(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e);var s=a.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,a=e.blockRenderMap,s=e.blockRendererFn,l=e.blockStyleFn,c=e.customStyleMap,u=e.customStyleFn,d=e.editorState,f=e.editorKey,p=e.textDirectionality,h=d.getCurrentContent(),g=d.getSelection(),m=d.mustForceSelection(),v=d.getDecorator(),b=i(d.getDirectionMap()),y=[],x=h.getBlocksAsArray()[0];x;){var w=x.getKey(),_={blockRenderMap:a,blockRendererFn:s,blockStyleFn:l,contentState:h,customStyleFn:u,customStyleMap:c,decorator:v,editorKey:f,editorState:d,forceSelection:m,selection:g,block:x,direction:p||b.get(w),tree:d.getBlockTree(w)},S=(a.get(x.getType())||a.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:w},_)),wrapperTemplate:S,key:w,offsetKey:r.encode(w,0,0)});var k=x.getNextSiblingKey();x=k?h.getBlockForKey(k):null}for(var E=[],C=0;C<y.length;){var j=y[C];if(j.wrapperTemplate){var O=[];do{O.push(y[C].block),C++}while(C<y.length&&y[C].wrapperTemplate===j.wrapperTemplate);var T=o.cloneElement(j.wrapperTemplate,{key:j.key+"-wrap","data-offset-key":j.offsetKey},O);E.push(T)}else E.push(j.block),C++}return o.createElement("div",{"data-contents":"true"},E)},a}(o.Component);return Rz=a}():function(){if(zz)return Bz;zz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=r$,i=_N,a=s,l=vL,c=(Nz||(Nz=1,Lz=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var o=arguments[r];o&&(t=(t?t+" ":"")+o)}return t}),Lz),u=KF,d=function(e,t,n,r){return l({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){function r(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(r,e);var s=r.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,r=e.blockRenderMap,s=e.blockRendererFn,l=e.blockStyleFn,f=e.customStyleMap,p=e.customStyleFn,h=e.editorState,g=e.editorKey,m=e.preventScroll,v=e.textDirectionality,b=h.getCurrentContent(),y=h.getSelection(),x=h.mustForceSelection(),w=h.getDecorator(),_=u(h.getDirectionMap()),S=b.getBlocksAsArray(),k=[],E=null,C=null,j=0;j<S.length;j++){var O=S[j],T=O.getKey(),I=O.getType(),R=s(O),P=void 0,M=void 0,A=void 0;R&&(P=R.component,M=R.props,A=R.editable);var D=v||_.get(T),F=i.encode(T,0,0),L={contentState:b,block:O,blockProps:M,blockStyleFn:l,customStyleMap:f,customStyleFn:p,decorator:w,direction:D,forceSelection:x,offsetKey:F,preventScroll:m,selection:y,tree:h.getBlockTree(T)},N=r.get(I)||r.get("unstyled"),B=N.wrapper,z=N.element||r.get("unstyled").element,$=O.getDepth(),V="";if(l&&(V=l(O)),"li"===z)V=c(V,d(I,$,C!==B||null===E||$>E,D));var H=P||o,K={className:V,"data-block":!0,"data-editor":g,"data-offset-key":F,key:T};void 0!==A&&(K=n({},K,{contentEditable:A,suppressContentEditableWarning:!0}));var U=a.createElement(z,K,a.createElement(H,t({},L,{key:T})));k.push({block:U,wrapperTemplate:B,key:T,offsetKey:F}),E=B?O.getDepth():null,C=B}for(var G=[],W=0;W<k.length;){var q=k[W];if(q.wrapperTemplate){var Y=[];do{Y.push(k[W].block),W++}while(W<k.length&&k[W].wrapperTemplate===q.wrapperTemplate);var J=a.cloneElement(q.wrapperTemplate,{key:q.key+"-wrap","data-offset-key":q.offsetKey},Y);G.push(J)}else G.push(q.block),W++}return a.createElement("div",{"data-contents":"true"},G)},r}(a.Component);return Bz=f}(),i$={isImage:function(e){return"image"===a$(e)[0]},isJpeg:function(e){var t=a$(e);return i$.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function a$(e){return e.split("/")}var s$=i$,l$=XM;var c$=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)||l$(!1),"number"!=typeof t&&l$(!1),0===t||t-1 in e||l$(!1),"function"==typeof e.callee&&l$(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch{}for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}(e):[e]};function u$(e){return function(){return e}}var d$=function(){};d$.thatReturns=u$,d$.thatReturnsFalse=u$(!1),d$.thatReturnsTrue=u$(!0),d$.thatReturnsNull=u$(null),d$.thatReturnsThis=function(){return this},d$.thatReturnsArgument=function(e){return e};var f$=d$,p$=s$,h$=c$,g$=f$,m$=new RegExp("\r\n","g"),v$={"text/rtf":1,"text/html":1};function b$(e){if("file"==e.kind)return e.getAsFile()}var y$=function(){function e(e){this.data=e,this.types=e.types?h$(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return v$[e]}))},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(m$,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){var e=this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")}));if(e)return!0;for(var t=this.getFiles(),n=0;n<t.length;n++){var r=t[n].type;if(!p$.isImage(r))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(b$).filter(g$.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},e}(),x$=y$,w$=XM,_$=/\.textClipping$/,S$={"text/plain":!0,"text/html":!0,"text/rtf":!0};var k$=function(e,t){var n=0,r=[];e.forEach((function(o){!function(e,t){if(!kc.FileReader||e.type&&!(e.type in S$))return void t("");if(""===e.type){var n="";return _$.test(e.name)&&(n=e.name.replace(_$,"")),void t(n)}var r=new FileReader;r.onload=function(){var e=r.result;"string"!=typeof e&&w$(!1),t(e)},r.onerror=function(){t("")},r.readAsText(e)}(o,(function(o){n++,o&&r.push(o.slice(0,5e3)),n==e.length&&t(r.join("\r"))}))}))};var E$=function(e){return"handled"===e||!0===e},C$=x$,j$=vD,O$=pL,T$=lN,I$=nN,R$=k$,P$=RN,M$=cN,A$=E$,D$=KF;var F$={onDragEnd:function(e){e.exitCurrentMode(),L$(e)},onDrop:function(e,t){var n=new C$(t.nativeEvent.dataTransfer),r=e._latestEditorState,o=function(e,t){var n=null,r=null,o=I$(e.currentTarget);if("function"==typeof o.caretRangeFromPoint){var i=o.caretRangeFromPoint(e.x,e.y);n=i.startContainer,r=i.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}n=D$(n),r=D$(r);var a=D$(T$(n));return P$(t,a,r,a,r)}(t.nativeEvent,r);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=o){var i=n.getFiles();if(i.length>0){if(e.props.handleDroppedFiles&&A$(e.props.handleDroppedFiles(o,i)))return;return void R$(i,(function(t){t&&e.update(N$(r,o,t))}))}var a=e._internalDrag?"internal":"external";e.props.handleDrop&&A$(e.props.handleDrop(o,n,a))||(e._internalDrag?e.update(function(e,t){var n=j$.moveText(e.getCurrentContent(),e.getSelection(),t);return O$.push(e,n,"insert-fragment")}(r,o)):e.update(N$(r,o,n.getText()))),L$(e)}}};function L$(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:M$(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function N$(e,t,n){var r=j$.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return O$.push(e,r,"insert-fragment")}var B$=F$;var z$=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),i=!1;return r.some((function(e){return o===e.get("start")?(i=!0,!0):o<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return o===t&&(i=!0,!0)}))})),i};!function(e){if(!e.setImmediate){var t,n=1,r={},o=!1,i=e.document,a=Object.getPrototypeOf&&Object.getPrototypeOf(e);a=a&&a.setTimeout?a:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){l(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var n="setImmediate$"+Math.random()+"$",r=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&l(+t.data.slice(n.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),t=function(t){e.postMessage(n+t,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},t=function(t){e.port2.postMessage(t)}}():i&&"onreadystatechange"in i.createElement("script")?function(){var e=i.documentElement;t=function(t){var n=i.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(l,0,e)},a.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var o=new Array(arguments.length-1),i=0;i<o.length;i++)o[i]=arguments[i+1];var a={callback:e,args:o};return r[n]=a,t(n),n++},a.clearImmediate=s}function s(e){delete r[e]}function l(e){if(o)setTimeout(l,0,e);else{var t=r[e];if(t){o=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{s(e),o=!1}}}}}(typeof self>"u"?kc:self);var $$=kc.setImmediate,V$=vD,H$=pL,K$=XN,U$=E$,G$=z$,W$=KF,q$=$$,Y$=tN.isBrowser("Firefox");function J$(e,t,n,r,o){var i=V$.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return H$.push(e,i,"insert-characters",o)}var X$=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e._latestEditorState,r=t.data;if(r){if(e.props.handleBeforeInput&&U$(e.props.handleBeforeInput(r,n,t.timeStamp)))return void t.preventDefault();var o=n.getSelection(),i=o.getStartOffset(),a=o.getAnchorKey();if(!o.isCollapsed())return t.preventDefault(),void e.update(J$(n,r,n.getCurrentInlineStyle(),K$(n.getCurrentContent(),n.getSelection()),!0));var s=J$(n,r,n.getCurrentInlineStyle(),K$(n.getCurrentContent(),n.getSelection()),!1),l=!1;if(l||(l=G$(e._latestCommittedEditorState)),!l){var c=n.getBlockTree(a),u=s.getBlockTree(a);l=c.size!==u.size||c.zip(u).some((function(e){var t=e[0],n=e[1],o=t.get("start"),a=o+(o>=i?r.length:0),s=t.get("end"),l=s+(s>=i?r.length:0),c=n.get("start"),u=n.get("end"),d=n.get("decoratorKey");return t.get("decoratorKey")!==d||t.get("leaves").size!==n.get("leaves").size||a!==c||l!==u||null!=d&&u-c!==s-o}))}if(l||(l=function(e){return Y$&&("'"==e||"/"==e)}(r)),l||(l=W$(s.getDirectionMap()).get(a)!==W$(n.getDirectionMap()).get(a)),l)return t.preventDefault(),s=H$.set(s,{forceSelection:!0}),void e.update(s);s=H$.set(s,{nativelyRenderedContent:s.getCurrentContent()}),e._pendingStateFromBeforeInput=s,q$((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}},Z$=pL,Q$=RB,eV=PB;var tV=function(e,t){var n=t.currentTarget.ownerDocument;if(!e.props.preserveSelectionOnBlur&&eV(n)===n.body){var r=n.defaultView.getSelection(),o=e.editor;1===r.rangeCount&&Q$(o,r.anchorNode)&&Q$(o,r.focusNode)&&r.removeAllRanges()}var i=e._latestEditorState,a=i.getSelection();if(a.getHasFocus()){var s=a.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(Z$.acceptSelection(i,s))}},nV=pL;var rV=function(e,t){e.setMode("composite"),e.update(nV.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)},oV=yA;var iV=function(e){var t=e.getSelection();return t.isCollapsed()?null:oV(e.getCurrentContent(),t)},aV=iV;var sV=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(aV(e._latestEditorState))};var lV=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1},cV=vD,uV=pL,dV=vz,fV=iV,pV=Ez,hV=lV;var gV=function(e,t){var n,r=e._latestEditorState,o=r.getSelection(),i=t.target;if(o.isCollapsed())t.preventDefault();else{if(hV(i)){var a=i;n=pV(dV.getScrollParent(a))}var s=fV(r);e.setClipboard(s),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(n),e.exitCurrentMode(),e.update(function(e){var t=cV.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return uV.push(e,t,"remove-range")}(r))}),0)}};var mV=function(e,t){e.setMode("drag"),t.preventDefault()};var vV=function(e){e._internalDrag=!0,e.setMode("drag")},bV=pL,yV=tN;var xV=function(e,t){var n=e._latestEditorState,r=n.getSelection();if(!r.getHasFocus()){var o=r.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),yV.isBrowser("Chrome < 60.0.3081.0")?e.update(bV.forceSelection(n,o)):e.update(bV.acceptSelection(n,o))}},wV=XM,_V=/[\uD800-\uDFFF]/;function SV(e){return 55296<=e&&e<=57343}function kV(e){return _V.test(e)}function EV(e,t){return 1+SV(e.charCodeAt(t))}function CV(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!kV(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o<r;t--)o+=EV(e,o);if(o>=r)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=EV(e,o-1);o<0&&(o=0)}var i=r;if(n<r)for(i=o;n>0&&i<r;n--)i+=EV(e,i);return e.substring(o,i)}var jV={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=EV(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:EV,hasSurrogateUnit:kV,isCodeUnitInSurrogateRange:SV,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||wV(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),r=e.charCodeAt(t+1);return 55296<=n&&n<=56319&&56320<=r&&r<=57343},strlen:function(e){if(!kV(e))return e.length;for(var t=0,n=0;n<e.length;n+=EV(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return CV(e,t=t<n?t:n,r)},substr:CV},OV=jV;var TV=function(e,t){var n=e.getSelection(),r=e.getCurrentContent(),o=n.getStartKey(),i=n.getStartOffset(),a=o,s=0;if(t>i){var l=r.getKeyBefore(o);if(null==l)a=o;else a=l,s=r.getBlockForKey(l).getText().length}else s=i-t;return n.merge({focusKey:a,focusOffset:s,isBackward:!0})},IV=vD,RV=WD("draft_tree_data_support");var PV=function(e,t,n){var r=e.getSelection(),o=e.getCurrentContent(),i=r,a=r.getAnchorKey(),s=r.getFocusKey(),l=o.getBlockForKey(a);if(RV&&"forward"===n&&a!==s)return o;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return o;if(RV)if(r.getAnchorOffset()===o.getBlockForKey(a).getLength()){var c=o.getBlockForKey(l.nextSibling);if(!c||0===c.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((i=t(e))===r)return o}return IV.removeRange(o,i,n)},MV=pL,AV=OV,DV=TV,FV=PV;var LV=function(e){var t=FV(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o-1];return DV(e,i?AV.getUTF16Length(i,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return MV.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")},NV=vD,BV=_N,zV=pL,$V=qN.notEmptyKey,VV=lN,HV=LV,KV=KF,UV=tN.isEngine("Gecko");var GV=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.isCollapsed,i=(null==r?void 0:r.nodeType)!==Node.TEXT_NODE&&(null==r?void 0:r.nodeType)!==Node.ELEMENT_NODE;if(null!=r&&!i){if(r.nodeType===Node.TEXT_NODE&&(null!==r.previousSibling||null!==r.nextSibling)){var a=r.parentNode;if(null==a)return;r.nodeValue=a.textContent;for(var s=a.firstChild;null!=s;s=s.nextSibling)s!==r&&a.removeChild(s)}var l=r.textContent,c=e._latestEditorState,u=KV(VV(r)),d=BV.decode(u),f=d.blockKey,p=d.decoratorKey,h=d.leafKey,g=c.getBlockTree(f).getIn([p,"leaves",h]),m=g.start,v=g.end,b=c.getCurrentContent(),y=b.getBlockForKey(f),x=y.getText().slice(m,v);if(l.endsWith("\n\n")&&(l=l.slice(0,-1)),l===x){var w=t.nativeEvent.inputType;if(w){var _=function(e,t){return"deleteContentBackward"===e?HV(t):t}(w,c);if(_!==c)return e.restoreEditorDOM(),void e.update(_)}return}var S,k,E,C,j=c.getSelection(),O=j.merge({anchorOffset:m,focusOffset:v,isBackward:!1}),T=y.getEntityAt(m),I=$V(T)?b.getEntity(T):null,R="MUTABLE"===(null!=I?I.getMutability():null),P=R?"spellcheck-change":"apply-entity",M=NV.replaceText(b,O,l,y.getInlineStyleAt(m),R?y.getEntityAt(m):null);if(UV)S=n.anchorOffset,k=n.focusOffset,C=(E=m+Math.min(S,k))+Math.abs(S-k),S=E,k=C;else{var A=l.length-x.length;E=j.getStartOffset(),C=j.getEndOffset(),S=o?C+A:E,k=C+A}var D=M.merge({selectionBefore:b.getSelectionAfter(),selectionAfter:j.merge({anchorOffset:S,focusOffset:k})});e.update(zV.push(c,D,P))}},WV=SN;var qV=function(e){return e.which===WV.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))},YV=tN.isPlatform("Mac OS X"),JV={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return YV&&e.altKey},usesMacOSHeuristics:function(){return YV},hasCommandModifier:function(e){return YV?!!e.metaKey&&!e.altKey:JV.isCtrlKeyCommand(e)},isSoftNewlineEvent:qV},XV=JV,ZV=vD,QV=pL,eH=yA,tH=KF,nH=null,rH={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),r=null;if(n.isCollapsed()){var o=n.getAnchorKey(),i=t.getBlockForKey(o).getLength();if(i===n.getAnchorOffset()){var a=t.getKeyAfter(o);if(null==a)return e;r=n.set("focusKey",a).set("focusOffset",0)}else r=n.set("focusOffset",i)}else r=n;r=tH(r),nH=eH(t,r);var s=ZV.removeRange(t,r,"forward");return s===t?e:QV.push(e,s,"remove-range")},paste:function(e){if(!nH)return e;var t=ZV.replaceWithFragment(e.getCurrentContent(),e.getSelection(),nH);return QV.push(e,t,"insert-fragment")}},oH=rH,iH=XM;var aH=tN.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer;o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var i,a=Array.from(t.getClientRects());if(n.push(a),o)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}iH(!1)}:function(e){return Array.from(e.getClientRects())},sH=aH,lH=OV,cH=nN,uH=sH,dH=XM;function fH(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<e.length;a++){var s=e[a];0===s.width||1===s.width||(n=Math.min(n,s.top),r=Math.min(r,s.bottom),o=Math.max(o,s.top),i=Math.max(i,s.bottom))}return o<=r&&o-n<t&&i-r<t}function pH(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}var hH=function(e){e.collapsed||dH(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var n=function(e){var t=getComputedStyle(e),n=cH(e),r=n.createElement("div");r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.fontStyle=t.fontStyle,r.style.fontWeight=t.fontWeight,r.style.lineHeight=t.lineHeight,r.style.position="absolute",r.textContent="M";var o=n.body;o||dH(!1),o.appendChild(r);var i=r.getBoundingClientRect();return o.removeChild(r),i.height}(t),r=e.endContainer,o=e.endOffset;for(e.setStart(e.startContainer,0);fH(uH(e),n)&&(r=e.startContainer,o=e.startOffset,r.parentNode||dH(!1),e.setStartBefore(r),1!==r.nodeType||"inline"===getComputedStyle(r).display););for(var i=r,a=o-1;;){for(var s=i.nodeValue,l=a;l>=0;l--)if(!(null!=s&&l>0&&lH.isSurrogatePair(s,l-1))){if(e.setStart(i,l),!fH(uH(e),n))break;r=i,o=l}if(-1===l||0===i.childNodes.length)break;a=pH(i=i.childNodes[l])}return e.setStart(r,o),e},gH=pL,mH=hH,vH=zN,bH=TV,yH=PV;var xH=function(e,t){var n=yH(e,(function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return bH(e,1);var r=t.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return r=mH(r),vH(e,null,r.endContainer,r.endOffset,r.startContainer,r.startOffset).selectionState}),"backward");return n===e.getCurrentContent()?e:gH.push(e,n,"remove-range")},wH="['‘’]",_H="\\s|(?![_])"+{getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}.getPunctuation(),SH=new RegExp("^(?:"+_H+")*(?:"+wH+"|(?!"+_H+").)*(?:(?!"+_H+").)"),kH=new RegExp("(?:(?!"+_H+").)(?:"+wH+"|(?!"+_H+").)*(?:"+_H+")*$");function EH(e,t){var n=t?kH.exec(e):SH.exec(e);return n?n[0]:e}var CH={getBackward:function(e){return EH(e,!0)},getForward:function(e){return EH(e,!1)}},jH=CH,OH=pL,TH=TV,IH=PV;var RH=function(e){var t=IH(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return TH(e,1);var r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(0,n),i=jH.getBackward(o);return TH(e,i.length||1)}),"backward");return t===e.getCurrentContent()?e:OH.push(e,t,"remove-range")};var PH=function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getStartOffset(),a=e.getCurrentContent(),s=o;return t>a.getBlockForKey(o).getText().length-i?(s=a.getKeyAfter(o),n=0):n=i+t,r.merge({focusKey:s,focusOffset:n})},MH=CH,AH=pL,DH=PH,FH=PV;var LH=function(e){var t=FH(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(n),i=MH.getForward(o);return DH(e,i.length||1)}),"forward");return t===e.getCurrentContent()?e:AH.push(e,t,"remove-range")},NH=vD,BH=pL;var zH=function(e){var t=NH.splitBlock(e.getCurrentContent(),e.getSelection());return BH.push(e,t,"split-block")},$H=pL;var VH=function(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent().getBlockForKey(n).getLength();return $H.set(e,{selection:t.merge({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}),forceSelection:!0})},HH=pL;var KH=function(e){var t=e.getSelection(),n=t.getStartKey();return HH.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})},UH=pL,GH=OV,WH=PH,qH=PV;var YH=function(e){var t=qH(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o];return WH(e,i?GH.getUTF16Length(i,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return UH.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")},JH=vD,XH=pL,ZH=yA;var QH=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var r,o,i=t.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i).getLength();if(s<=1)return e;n===s?(r=t.set("anchorOffset",n-1),o=t):o=(r=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var l=ZH(a,r),c=JH.removeRange(a,r,"backward"),u=c.getSelectionAfter(),d=u.getAnchorOffset()-1,f=u.merge({anchorOffset:d,focusOffset:d}),p=JH.replaceWithFragment(c,f,l),h=XH.push(e,p,"insert-fragment");return XH.acceptSelection(h,o)},eK=pL;var tK=function(e,t,n){var r=eK.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(eK.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(r)}),0)):n(r);else{var o=r.getCurrentContent();n(eK.set(r,{nativelyRenderedContent:o}))}},nK=vD,rK=pL,oK=SN,iK=oH,aK=tN,sK=E$,lK=xH,cK=RH,uK=LH,dK=zH,fK=VH,pK=KH,hK=LV,gK=YH,mK=QH,vK=tK,bK=XV.isOptionKeyCommand,yK=aK.isBrowser("Chrome");var xK=function(e,t){var n=t.which,r=e._latestEditorState;function o(n){var r=e.props[n];return!!r&&(r(t),!0)}switch(n){case oK.RETURN:if(t.preventDefault(),e.props.handleReturn&&sK(e.props.handleReturn(t,r)))return;break;case oK.ESC:if(t.preventDefault(),o("onEscape"))return;break;case oK.TAB:if(o("onTab"))return;break;case oK.UP:if(o("onUpArrow"))return;break;case oK.RIGHT:if(o("onRightArrow"))return;break;case oK.DOWN:if(o("onDownArrow"))return;break;case oK.LEFT:if(o("onLeftArrow"))return;break;case oK.SPACE:yK&&bK(t)&&t.preventDefault()}var i=e.props.keyBindingFn(t);if(null!=i&&""!==i)if("undo"!==i){if(t.preventDefault(),!e.props.handleKeyCommand||!sK(e.props.handleKeyCommand(i,r,t.timeStamp))){var a=function(e,t,n){switch(e){case"redo":return rK.redo(t);case"delete":return gK(t);case"delete-word":return uK(t);case"backspace":return hK(t);case"backspace-word":return cK(t);case"backspace-to-start-of-line":return lK(t,n);case"split-block":return dK(t);case"transpose-characters":return mK(t);case"move-selection-to-start-of-block":return pK(t);case"move-selection-to-end-of-block":return fK(t);case"secondary-cut":return iK.cut(t);case"secondary-paste":return iK.paste(t);default:return t}}(i,r,t);a!==r&&e.update(a)}}else vK(t,r,e.update);else if(n===oK.SPACE&&yK&&bK(t)){var s=nK.replaceText(r.getCurrentContent(),r.getSelection()," ");e.update(rK.push(r,s,"insert-characters"))}};var wK=function(){function e(e){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}(),_K=wK,SK=XM,kK=tN.isBrowser("IE <= 9");var EK=function(e){var t,n=null;return!kK&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||SK(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n},CK=rN;var jK=function(e){return!(!e||!e.ownerDocument)&&(CK(e)&&"A"===e.nodeName)},OK=rN;var TK,IK=function(e){return!(!e||!e.ownerDocument)&&(OK(e)&&"IMG"===e.nodeName)};function RK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){PK(e,t,n[t])}))}return e}function PK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MK=cM,AK=kM,DK=NM,FK=xL,LK=KD,NK=_K,BK=vL,zK=sA,$K=EK,VK=WD,HK=JP,KK=HK.List,UK=HK.Map,GK=HK.OrderedSet,WK=jK,qK=CB,YK=EN,JK=IK,XK=VK("draft_tree_data_support"),ZK=new RegExp("\r","g"),QK=new RegExp("\n","g"),eU=new RegExp("^\n","g"),tU=new RegExp("&nbsp;","g"),nU=new RegExp("&#13;?","g"),rU=new RegExp("&#8203;?","g"),oU=["bold","bolder","500","600","700","800","900"],iU=["light","lighter","normal","100","200","300","400"],aU=["className","href","rel","target","title"],sU=["alt","className","height","src","width"],lU=(PK(TK={},BK("public/DraftStyleDefault/depth0"),0),PK(TK,BK("public/DraftStyleDefault/depth1"),1),PK(TK,BK("public/DraftStyleDefault/depth2"),2),PK(TK,BK("public/DraftStyleDefault/depth3"),3),PK(TK,BK("public/DraftStyleDefault/depth4"),4),TK),cU=UK({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),uU=function(e){if(YK(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},dU=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(lU).some((function(n){e.classList.contains(n)&&(t=lU[n])})),t},fU=function(e){if(!WK(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new NK(t.href);return!0}catch{return!1}},pU=function(e){if(!JK(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},hU=function(e,t){if(!YK(e))return t;var n=e,r=n.style.fontWeight,o=n.style.fontStyle,i=n.style.textDecoration;return t.withMutations((function(e){oU.indexOf(r)>=0?e.add("BOLD"):iU.indexOf(r)>=0&&e.remove("BOLD"),"italic"===o?e.add("ITALIC"):"normal"===o&&e.remove("ITALIC"),"underline"===i&&e.add("UNDERLINE"),"line-through"===i&&e.add("STRIKETHROUGH"),"none"===i&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},gU=function(e){return"ul"===e||"ol"===e},mU=function(){function e(e,t){PK(this,"characterList",KK()),PK(this,"currentBlockType","unstyled"),PK(this,"currentDepth",0),PK(this,"currentEntity",null),PK(this,"currentText",""),PK(this,"wrapper",null),PK(this,"blockConfigs",[]),PK(this,"contentBlocks",[]),PK(this,"entityMap",LK),PK(this,"blockTypeMap",void 0),PK(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=KK(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=LK,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],GK())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(XK?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=RK({key:e.key||zK(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:KK(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=KK(),this.currentBlockType="unstyled",this.currentText="",t},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=o.nodeName.toLowerCase();if("body"===i||gU(i)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,s=this.wrapper;gU(i)&&(this.wrapper=i,gU(s)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),t)),this.currentDepth=a,this.wrapper=s}else{var l=this.blockTypeMap.get(i);if(void 0===l)if("#text"!==i)if("br"!==i)if(pU(o))this._addImgNode(o,t);else if(fU(o))this._addAnchorNode(o,n,t);else{var c=t;cU.has(i)&&(c=c.add(cU.get(i))),c=hU(o,c);var u=uU(o);null!=u&&(c=c.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),c))}else this._addBreakNode(o,t);else this._addTextNode(o,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var d=this.currentDepth,f=this.wrapper;if(this.wrapper="pre"===i?"pre":this.wrapper,"string"!=typeof l&&(l=this.disambiguate(i,this.wrapper)||l[0]||"unstyled"),!XK&&YK(o)&&("unordered-list-item"===l||"ordered-list-item"===l)){var p=o;this.currentDepth=dU(p,this.currentDepth)}var h=zK(),g=this._toBlockConfigs(Array.from(o.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:h,childConfigs:g,type:l})),this.currentDepth=d,this.wrapper=f}}}return n},t._appendText=function(e,t){var n;this.currentText+=e;var r=MK.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(r))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry((function(e){return null!==e.getEntity()}));t=void 0!==r?Math.min(t,r[0]):t,r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})),t>(n=void 0!==r?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=KK()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(eU,"")).replace(QK," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){qK(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(JK(e)){var n=e,r={};sU.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),VK("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(WK(e)){var r=e,o={};aU.forEach((function(e){var t=r.getAttribute(e);t&&(o[e]=t)})),o.url=new NK(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=r>0?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=KK(o.childConfigs.map((function(e){return e.key}))),this.contentBlocks.push(new DK(RK({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this,n=KK(e).flatMap((function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)}));return n},t._toFlatContentBlocks=function(e){var t=this;this._hoistContainersInBlockConfigs(e).forEach((function(e){var n=t._extractTextFromBlockConfigs(e.childConfigs),r=n.text,o=n.characterList;t.contentBlocks.push(new AK(RK({},e,{text:e.text+r,characterList:e.characterList.concat(o)})))}))},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=KK(),o=0;o<=t;o++){var i=e[o];n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(i.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}(),vU=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FK,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:$K)(e=e.trim().replace(ZK,"").replace(tU," ").replace(nU,"").replace(rU,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys((function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach((function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)}))})),UK(t)}(t);return new mU(r,(function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null})).addDOMNode(n).getContentBlocks()};function bU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yU=kM,xU=NM,wU=vU,_U=sA,SU=EK,kU=WD,EU=JP,CU=YD,jU=EU.List,OU=EU.Repeat,TU=kU("draft_tree_data_support"),IU=TU?xU:yU,RU={processHTML:function(e,t){return wU(e,SU,t)},processText:function(e,t,n){return e.reduce((function(e,r,o){r=CU(r);var i=_U(),a={key:i,type:n,text:r,characterList:jU(OU(t,r.length))};if(TU&&0!==o){var s=o-1;a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bU(e,t,n[t])}))}return e}({},a,{prevSibling:(e[s]=e[s].merge({nextSibling:i})).getKey()})}return e.push(new IU(a)),e}),[])}};var PU=function(e,t,n,r){var o=t.getStartKey(),i=t.getEndKey(),a=e.getBlockMap(),s=a.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===i})).concat([[i,a.get(i)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return a=a.merge(s),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})},MU=vD,AU=pL,DU=PU,FU=KF,LU={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return LU.toggleInlineStyle(e,"BOLD");case"italic":return LU.toggleInlineStyle(e,"ITALIC");case"underline":return LU.toggleInlineStyle(e,"UNDERLINE");case"code":return LU.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return LU.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return LU.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=MU.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=AU.push(e,t,"insert-characters");return AU.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockBefore(r);if(o&&"atomic"===o.getType()){var i=n.getBlockMap().delete(o.getKey()),a=n.merge({blockMap:i,selectionAfter:t});if(a!==n)return AU.push(e,a,"remove-range")}var s=LU.tryToRemoveBlockStyle(e);return s?AU.push(e,s,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;var i=n.getBlockAfter(r);if(!i||"atomic"!==i.getType())return null;var a=t.merge({focusKey:i.getKey(),focusOffset:i.getLength()}),s=MU.removeRange(n,a,"forward");return s!==n?AU.push(e,s,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),o=r.getAnchorKey();if(o!==r.getFocusKey())return t;var i=t.getCurrentContent(),a=i.getBlockForKey(o),s=a.getType();if("unordered-list-item"!==s&&"ordered-list-item"!==s)return t;e.preventDefault();var l=a.getDepth();if(!e.shiftKey&&l===n)return t;var c=DU(i,r,e.shiftKey?-1:1,n);return AU.push(t,c,"adjust-depth")},toggleBlockType:function(e,t){var n=e.getSelection(),r=n.getStartKey(),o=n.getEndKey(),i=e.getCurrentContent(),a=n;if(r!==o&&0===n.getEndOffset()){var s=FU(i.getBlockBefore(o));o=s.getKey(),a=a.merge({anchorKey:r,anchorOffset:n.getStartOffset(),focusKey:o,focusOffset:s.getLength(),isBackward:!1})}var l=i.getBlockMap().skipWhile((function(e,t){return t!==r})).reverse().skipWhile((function(e,t){return t!==o})).some((function(e){return"atomic"===e.getType()}));if(l)return e;var c=i.getBlockForKey(r).getType()===t?"unstyled":t;return AU.push(e,MU.setBlockType(i,a,c),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?LU.toggleBlockType(e,"code-block"):LU.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),r=e.getCurrentInlineStyle();if(n.isCollapsed())return AU.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o,i=e.getCurrentContent();return o=r.has(t)?MU.removeInlineStyle(i,n,t):MU.applyInlineStyle(i,n,t),AU.push(e,o,"change-inline-style")},toggleLink:function(e,t,n){var r=MU.applyEntity(e.getCurrentContent(),t,n);return AU.push(e,r,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var r=t.getAnchorKey(),o=e.getCurrentContent(),i=o.getBlockForKey(r).getType(),a=o.getBlockBefore(r);if("code-block"===i&&a&&"code-block"===a.getType()&&0!==a.getLength())return null;if("unstyled"!==i)return MU.setBlockType(o,t,"unstyled")}return null}},NU=LU,BU=/\r\n?|\n/g;var zU=QP,$U=cM,VU=x$,HU=vD,KU=RU,UU=pL,GU=NU,WU=XN,qU=k$,YU=E$,JU=function(e){return e.split(BU)};function XU(e,t,n){var r=HU.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return UU.push(e,r.set("entityMap",n),"insert-fragment")}var ZU=function(e,t){t.preventDefault();var n=new VU(t.clipboardData);if(!n.isRichText()){var r=n.getFiles(),o=n.getText();if(r.length>0){if(e.props.handlePastedFiles&&YU(e.props.handlePastedFiles(r)))return;return void qU(r,(function(t){if(t=t||o){var n=e._latestEditorState,r=JU(t),i=$U.create({style:n.getCurrentInlineStyle(),entity:WU(n.getCurrentContent(),n.getSelection())}),a=GU.getCurrentBlockType(n),s=KU.processText(r,i,a),l=zU.createFromArray(s),c=HU.replaceWithFragment(n.getCurrentContent(),n.getSelection(),l);e.update(UU.push(n,c,"insert-fragment"))}}))}}var i=[],a=n.getText(),s=n.getHTML(),l=e._latestEditorState;if(e.props.formatPastedText){var c=e.props.formatPastedText(a,s);a=c.text,s=c.html}if(!e.props.handlePastedText||!YU(e.props.handlePastedText(a,s,l))){if(a&&(i=JU(a)),!e.props.stripPastedStyles){var u,d=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&d){if(-1!==(null===(u=s)||void 0===u?void 0:u.indexOf(e.getEditorKey()))||1===i.length&&1===d.size&&d.first().getText()===a)return void e.update(XU(e._latestEditorState,d))}else if(d&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(i,d))return void e.update(XU(e._latestEditorState,d));if(s){var f=KU.processHTML(s,e.props.blockRenderMap);if(f){var p=f.contentBlocks,h=f.entityMap;if(p){var g=zU.createFromArray(p);return void e.update(XU(e._latestEditorState,g,h))}}}e.setClipboard(null)}if(i.length){var m=$U.create({style:l.getCurrentInlineStyle(),entity:WU(l.getCurrentContent(),l.getSelection())}),v=GU.getCurrentBlockType(l),b=KU.processText(i,m,v),y=zU.createFromArray(b);e.update(XU(e._latestEditorState,y))}}},QU=tN,eG=X$,tG=tV,nG=rV,rG=sV,oG=gV,iG=mV,aG=vV,sG=xV,lG=GV,cG=xK,uG=ZU,dG=WN,fG=QU.isBrowser("Chrome"),pG=QU.isBrowser("Firefox"),hG=fG||pG?dG:function(e){},gG={onBeforeInput:eG,onBlur:tG,onCompositionStart:nG,onCopy:rG,onCut:oG,onDragOver:iG,onDragStart:aG,onFocus:sG,onInput:lG,onKeyDown:cG,onPaste:uG,onSelect:dG,onMouseUp:hG,onKeyUp:hG},mG=cc.unstable_flushControlled;var vG=s,bG=vL,yG=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},n.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=bG({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return vG.createElement("div",{className:t},vG.createElement("div",{className:bG("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},t}(vG.Component),xG=yG,wG=XV,_G=SN,SG=tN,kG=SG.isPlatform("Mac OS X"),EG=kG&&SG.isBrowser("Firefox < 29"),CG=wG.hasCommandModifier,jG=wG.isCtrlKeyCommand;function OG(e){return kG&&e.altKey||jG(e)}var TG=function(e){switch(e.keyCode){case 66:return CG(e)?"bold":null;case 68:return jG(e)?"delete":null;case 72:return jG(e)?"backspace":null;case 73:return CG(e)?"italic":null;case 74:return CG(e)?"code":null;case 75:return kG&&jG(e)?"secondary-cut":null;case 77:case 79:return jG(e)?"split-block":null;case 84:return kG&&jG(e)?"transpose-characters":null;case 85:return CG(e)?"underline":null;case 87:return kG&&jG(e)?"backspace-word":null;case 89:return jG(e)?kG?"secondary-paste":"redo":null;case 90:return function(e){return CG(e)?e.shiftKey?"redo":"undo":null}(e)||null;case _G.RETURN:return"split-block";case _G.DELETE:return function(e){return!kG&&e.shiftKey?null:OG(e)?"delete-word":"delete"}(e);case _G.BACKSPACE:return function(e){return CG(e)&&kG?"backspace-to-start-of-line":OG(e)?"backspace-word":"backspace"}(e);case _G.LEFT:return EG&&CG(e)?"move-selection-to-start-of-block":null;case _G.RIGHT:return EG&&CG(e)?"move-selection-to-end-of-block":null;default:return null}},IG=Ou;function RG(){return RG=IG||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RG.apply(this,arguments)}function PG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AG(e,t,n[t])}))}return e}function MG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DG(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var FG=xL,LG=wL,NG=gB,BG=o$,zG=B$,$G=gG,VG=mG,HG=xG,KG=jB,UG=pL,GG=s,WG=sz,qG=vz,YG=vL,JG=sA,XG=TG,ZG=Ez,QG=WD,eW=XM,tW=EN,nW=KF,rW=tN.isBrowser("IE"),oW=!rW,iW={edit:$G,composite:NG,drag:zG,cut:null,render:null},aW=!1,sW=function(e){function t(){return e.apply(this,arguments)||this}DG(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(GG.Component),lW=function(e){function t(t){var n;return AG(MG(n=e.call(this,t)||this),"_blockSelectEvents",void 0),AG(MG(n),"_clipboard",void 0),AG(MG(n),"_handler",void 0),AG(MG(n),"_dragCount",void 0),AG(MG(n),"_internalDrag",void 0),AG(MG(n),"_editorKey",void 0),AG(MG(n),"_placeholderAccessibilityID",void 0),AG(MG(n),"_latestEditorState",void 0),AG(MG(n),"_latestCommittedEditorState",void 0),AG(MG(n),"_pendingStateFromBeforeInput",void 0),AG(MG(n),"_onBeforeInput",void 0),AG(MG(n),"_onBlur",void 0),AG(MG(n),"_onCharacterData",void 0),AG(MG(n),"_onCompositionEnd",void 0),AG(MG(n),"_onCompositionStart",void 0),AG(MG(n),"_onCopy",void 0),AG(MG(n),"_onCut",void 0),AG(MG(n),"_onDragEnd",void 0),AG(MG(n),"_onDragOver",void 0),AG(MG(n),"_onDragStart",void 0),AG(MG(n),"_onDrop",void 0),AG(MG(n),"_onInput",void 0),AG(MG(n),"_onFocus",void 0),AG(MG(n),"_onKeyDown",void 0),AG(MG(n),"_onKeyPress",void 0),AG(MG(n),"_onKeyUp",void 0),AG(MG(n),"_onMouseDown",void 0),AG(MG(n),"_onMouseUp",void 0),AG(MG(n),"_onPaste",void 0),AG(MG(n),"_onSelect",void 0),AG(MG(n),"editor",void 0),AG(MG(n),"editorContainer",void 0),AG(MG(n),"focus",void 0),AG(MG(n),"blur",void 0),AG(MG(n),"setMode",void 0),AG(MG(n),"exitCurrentMode",void 0),AG(MG(n),"restoreEditorDOM",void 0),AG(MG(n),"setClipboard",void 0),AG(MG(n),"getClipboard",void 0),AG(MG(n),"getEditorKey",void 0),AG(MG(n),"update",void 0),AG(MG(n),"onDragEnter",void 0),AG(MG(n),"onDragLeave",void 0),AG(MG(n),"_handleEditorContainerRef",(function(e){n.editorContainer=e,n.editor=null!==e?e.firstChild:null})),AG(MG(n),"focus",(function(e){var t=n.props.editorState,r=t.getSelection().getHasFocus(),o=n.editor;if(o){var i=qG.getScrollParent(o),a=e||ZG(i),s=a.x,l=a.y;tW(o)||eW(!1),o.focus(),i===window?window.scrollTo(s,l):WG.setTop(i,l),r||n.update(UG.forceSelection(t,t.getSelection()))}})),AG(MG(n),"blur",(function(){var e=n.editor;e&&(tW(e)||eW(!1),e.blur())})),AG(MG(n),"setMode",(function(e){var t=n.props,r=t.onPaste,o=t.onCut,i=t.onCopy,a=PG({},iW.edit);r&&(a.onPaste=r),o&&(a.onCut=o),i&&(a.onCopy=i);var s=PG({},iW,{edit:a});n._handler=s[e]})),AG(MG(n),"exitCurrentMode",(function(){n.setMode("edit")})),AG(MG(n),"restoreEditorDOM",(function(e){n.setState({contentsKey:n.state.contentsKey+1},(function(){n.focus(e)}))})),AG(MG(n),"setClipboard",(function(e){n._clipboard=e})),AG(MG(n),"getClipboard",(function(){return n._clipboard})),AG(MG(n),"update",(function(e){n._latestEditorState=e,n.props.onChange(e)})),AG(MG(n),"onDragEnter",(function(){n._dragCount++})),AG(MG(n),"onDragLeave",(function(){n._dragCount--,0===n._dragCount&&n.exitCurrentMode()})),n._blockSelectEvents=!1,n._clipboard=null,n._handler=null,n._dragCount=0,n._editorKey=t.editorKey||JG(),n._placeholderAccessibilityID="placeholder-"+n._editorKey,n._latestEditorState=t.editorState,n._latestCommittedEditorState=t.editorState,n._onBeforeInput=n._buildHandler("onBeforeInput"),n._onBlur=n._buildHandler("onBlur"),n._onCharacterData=n._buildHandler("onCharacterData"),n._onCompositionEnd=n._buildHandler("onCompositionEnd"),n._onCompositionStart=n._buildHandler("onCompositionStart"),n._onCopy=n._buildHandler("onCopy"),n._onCut=n._buildHandler("onCut"),n._onDragEnd=n._buildHandler("onDragEnd"),n._onDragOver=n._buildHandler("onDragOver"),n._onDragStart=n._buildHandler("onDragStart"),n._onDrop=n._buildHandler("onDrop"),n._onInput=n._buildHandler("onInput"),n._onFocus=n._buildHandler("onFocus"),n._onKeyDown=n._buildHandler("onKeyDown"),n._onKeyPress=n._buildHandler("onKeyPress"),n._onKeyUp=n._buildHandler("onKeyUp"),n._onMouseDown=n._buildHandler("onMouseDown"),n._onMouseUp=n._buildHandler("onMouseUp"),n._onPaste=n._buildHandler("onPaste"),n._onSelect=n._buildHandler("onSelect"),n.getEditorKey=function(){return n._editorKey},n.state={contentsKey:0},n}DG(t,e);var n=t.prototype;return n._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(VG?VG((function(){return r(t,n)})):r(t,n))}}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:nW(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return GG.createElement(HG,e)}return null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleFn,i=e.customStyleMap,a=e.editorState,s=e.preventScroll,l=e.readOnly,c=e.textAlignment,u=e.textDirectionality,d=YG({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===c,"DraftEditor/alignRight":"right"===c,"DraftEditor/alignCenter":"center"===c}),f=this.props.role||"textbox",p="combobox"===f?!!this.props.ariaExpanded:null,h={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:PG({},LG,i),customStyleFn:o,editorKey:this._editorKey,editorState:a,preventScroll:s,textDirectionality:u};return GG.createElement("div",{className:d},this._renderPlaceholder(),GG.createElement("div",{className:YG("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},GG.createElement("div",{"aria-activedescendant":l?null:this.props.ariaActiveDescendantID,"aria-autocomplete":l?null:this.props.ariaAutoComplete,"aria-controls":l?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":l?null:p,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":l?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:YG({notranslate:!l,"public/DraftEditor/content":!0}),contentEditable:!l,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:l?null:f,spellCheck:oW&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},GG.createElement(sW,{editor:this,editorState:a}),GG.createElement(BG,RG({},h,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!aW&&QG("draft_ods_enabled")&&(aW=!0,KG.initODS()),this.setMode("edit"),rW&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):kc.execCommand("AutoUrlDetect",!1,!1))},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},t}(GG.Component);AG(lW,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:FG,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:XG,readOnly:!1,spellCheck:!1,stripPastedStyles:!1});JP.List;var cW=JP.OrderedSet;cW();var uW=JP;WD("draft_tree_data_support"),uW.List,uW.Map,uW.OrderedMap;var dW=Object.create,fW=Object.defineProperty,pW=Object.getPrototypeOf,hW=Object.prototype.hasOwnProperty,gW=Object.getOwnPropertyNames,mW=Object.getOwnPropertyDescriptor,vW=Object.assign,bW=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yW=(e,t,n)=>{if((e=>{fW(e,"__esModule",{value:!0})})(e),t&&"object"==typeof t||"function"==typeof t)for(let r of gW(t))!hW.call(e,r)&&"default"!==r&&fW(e,r,{get:()=>t[r],enumerable:!(n=mW(t,r))||n.enumerable});return e},xW=e=>e&&e.__esModule?e:yW(fW(null!=e?dW(pW(e)):{},"default",{value:e,enumerable:!0}),e),wW=bW(((e,t)=>{var n={BOLD:"__",ITALIC:"*"},r={"unordered-list-item":"- ","header-one":"# ","header-two":"## ","header-three":"### ","header-four":"#### ","header-five":"##### ","header-six":"###### ",blockquote:"> "},o={"code-block":"```"};function i(e,t){let{symbol:n}=t,r=e.slice(0,t.range.start),o=e.slice(t.range.start,t.range.end),i=o.trim(),a=e.slice(t.range.end),s=t.range.start+o.indexOf(i),l=e.slice(t.range.start,s),c=e.slice(s+i.length,t.range.end);return`${r}${i}${a}`.replace(`${n}${i}${n}`,`${l}${n}${i}${n}${c}`)}t.exports=function(e,t){let a=vW(vW({},n),t),s=[];return e.blocks.map((t=>{let n=0,l="";l+=((e,t)=>"ordered-list-item"===e?`${t.reduce(((e,t)=>"ordered-list-item"===t?e+1:e),1)}. `:r[e]||"")(t.type,s),s.push(t.type);let c=[];return l+=Array.from(t.text).reduce(((r,o,s)=>{let l=r;for(function(e){return[...e].sort(((e,t)=>t.length-e.length))}(t.inlineStyleRanges).filter((e=>e.offset===s)).filter((e=>a[e.style])).forEach((e=>{let t=a[e.style].length;l+=a[e.style],n+=t,c.push({symbol:a[e.style],range:{start:e.offset+n,end:e.offset+e.length+n},end:e.offset+(e.length-1)})})),t.entityRanges.filter((e=>e.offset===s)).forEach((t=>{l+=(e=>"LINK"===e.type?"[":"")(e.entityMap[t.key])})),l+=o,t.entityRanges.filter((e=>e.offset+e.length-1===s)).forEach((t=>{l+=(e=>"LINK"===e.type?`](${e.data.url})`:"")(e.entityMap[t.key])}));0!==c.length&&c[c.length-1].end===s;){let e=c.pop();l+=e.symbol,l=i(l,e),n+=e.symbol.length}return l}),""),l=((e,t)=>{if(e in o){let n=o[e];return`${n}\n${t}\n${n}`}return t})(t.type,l),l=((e,t,n)=>{if("atomic"!==e.type)return n;let r=n.substring(0,n.length-e.text.length),o=e.entityRanges[0].key,i=t[o].type,a=t[o].data;return"draft-js-video-plugin-video"===i?`${r}[[ embed url=${a.url||a.src} ]]`:`${r}![${a.fileName||""}](${a.url||a.src})`})(t,e.entityMap,l),l})).join("\n")}})),_W=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ASTNodeTypes=void 0,function(e){e.Document="Document",e.DocumentExit="Document:exit",e.Paragraph="Paragraph",e.ParagraphExit="Paragraph:exit",e.BlockQuote="BlockQuote",e.BlockQuoteExit="BlockQuote:exit",e.ListItem="ListItem",e.ListItemExit="ListItem:exit",e.List="List",e.ListExit="List:exit",e.Header="Header",e.HeaderExit="Header:exit",e.CodeBlock="CodeBlock",e.CodeBlockExit="CodeBlock:exit",e.HtmlBlock="HtmlBlock",e.HtmlBlockExit="HtmlBlock:exit",e.HorizontalRule="HorizontalRule",e.HorizontalRuleExit="HorizontalRule:exit",e.Comment="Comment",e.CommentExit="Comment:exit",e.ReferenceDef="ReferenceDef",e.ReferenceDefExit="ReferenceDef:exit",e.Str="Str",e.StrExit="Str:exit",e.Break="Break",e.BreakExit="Break:exit",e.Emphasis="Emphasis",e.EmphasisExit="Emphasis:exit",e.Strong="Strong",e.StrongExit="Strong:exit",e.Html="Html",e.HtmlExit="Html:exit",e.Link="Link",e.LinkExit="Link:exit",e.Image="Image",e.ImageExit="Image:exit",e.Code="Code",e.CodeExit="Code:exit",e.Delete="Delete",e.DeleteExit="Delete:exit"}(e.ASTNodeTypes||(e.ASTNodeTypes={}))})),SW=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SyntaxMap=void 0;var t=_W();e.SyntaxMap={root:t.ASTNodeTypes.Document,paragraph:t.ASTNodeTypes.Paragraph,blockquote:t.ASTNodeTypes.BlockQuote,listItem:t.ASTNodeTypes.ListItem,list:t.ASTNodeTypes.List,Bullet:"Bullet",heading:t.ASTNodeTypes.Header,code:t.ASTNodeTypes.CodeBlock,HtmlBlock:t.ASTNodeTypes.HtmlBlock,thematicBreak:t.ASTNodeTypes.HorizontalRule,text:t.ASTNodeTypes.Str,break:t.ASTNodeTypes.Break,emphasis:t.ASTNodeTypes.Emphasis,strong:t.ASTNodeTypes.Strong,html:t.ASTNodeTypes.Html,link:t.ASTNodeTypes.Link,image:t.ASTNodeTypes.Image,inlineCode:t.ASTNodeTypes.Code,delete:t.ASTNodeTypes.Delete,yaml:"Yaml",table:"Table",tableRow:"TableRow",tableCell:"TableCell",linkReference:"LinkReference",imageReference:"ImageReference",footnoteReference:"FootnoteReference",definition:"Definition",ReferenceDef:t.ASTNodeTypes.ReferenceDef}})),kW=bW(((e,t)=>{var n=t.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(d){var f=n?i(d):d,p={},h=!0,g={node:f,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){g.isRoot||(g.parent.node[g.key]=e),g.node=e,t&&(h=!1)},delete:function(e){delete g.parent.node[g.key],e&&(h=!1)},remove:function(e){l(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],e&&(h=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){s=!1},block:function(){h=!1}};if(!s)return g;function m(){if("object"==typeof g.node&&null!==g.node){(!g.keys||g.node_!==g.node)&&(g.keys=a(g.node)),g.isLeaf=0==g.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){g.circular=o[e];break}}else g.isLeaf=!0,g.keys=null;g.notLeaf=!g.isLeaf,g.notRoot=!g.isRoot}m();var v=t.call(g,g.node);return void 0!==v&&g.update&&g.update(v),p.before&&p.before.call(g,g.node),h&&("object"==typeof g.node&&null!==g.node&&!g.circular&&(o.push(g),m(),c(g.keys,(function(t,o){r.push(t),p.pre&&p.pre.call(g,g.node[t],t);var i=e(g.node[t]);n&&u.call(g.node,t)&&(g.node[t]=i.node),i.isLast=o==g.keys.length-1,i.isFirst=0==o,p.post&&p.post.call(g,i),r.pop()})),o.pop()),p.after&&p.after.call(g,g.node)),g}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if(function(e){return"[object Date]"===s(e)}(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===s(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===s(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===s(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===s(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===s(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return c(a(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){(!this.isRoot||!n)&&(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var s=i(r);return e.push(r),t.push(s),c(a(r),(function(e){s[e]=n(r[e])})),e.pop(),t.pop(),s}return r}(this.value)};var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function s(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};c(a(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}})),EW=bW(((e,t)=>{var n=1e3,r=60*n,o=60*r,i=24*o,a=7*i,s=365.25*i;function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}t.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*a;case"days":case"day":case"d":return l*i;case"hours":case"hour":case"hrs":case"hr":case"h":return l*o;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=i?l(e,t,i,"day"):t>=o?l(e,t,o,"hour"):t>=r?l(e,t,r,"minute"):t>=n?l(e,t,n,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}})),CW=bW(((e,t)=>{t.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;let n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;let i=t.formatters[o];if("function"==typeof i){let t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){let r=t(this.namespace+(typeof n>"u"?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n,r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)!r[n]||("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=EW(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}})),jW=bW(((e,t)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=CW()(e);var{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),OW=bW(((e,t)=>{t.exports=function(e){if(e)throw e}})),TW=bW(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),IW=bW(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};t.exports=function e(){var t,n,r,o,i,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,o)})):typeof o<"u"&&l(d,{name:n,newValue:o}));return d}})),RW=bW(((e,t)=>{t.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}})),PW=bW(((e,t)=>{var n=[].slice;t.exports=function(e,t){var r;return function(){var t,a=n.call(arguments,0),s=e.length>a.length;s&&a.push(o);try{t=e.apply(null,a)}catch(e){if(s&&r)throw e;return o(e)}s||(t&&"function"==typeof t.then?t.then(i,o):t instanceof Error?o(t):i(t))};function o(){r||(r=!0,t.apply(null,arguments))}function i(e){o(null,e)}}})),MW=bW(((e,t)=>{var n=PW();t.exports=o,o.wrap=n;var r=[].slice;function o(){var e=[],t={run:function(){var t=-1,o=r.call(arguments,0,-1),i=arguments[arguments.length-1];if("function"!=typeof i)throw new Error("Expected function as last argument, not "+i);(function a(s){var l=e[++t],c=r.call(arguments,0).slice(1),u=o.length,d=-1;if(s)i(s);else{for(;++d<u;)(null===c[d]||void 0===c[d])&&(c[d]=o[d]);o=c,l?n(l,a).apply(null,o):i.apply(null,[null].concat(o))}}).apply(null,[null].concat(o))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}})),AW=bW(((e,t)=>{var n={}.hasOwnProperty;function r(e){return(!e||"object"!=typeof e)&&(e={}),i(e.line)+":"+i(e.column)}function o(e){return(!e||"object"!=typeof e)&&(e={}),r(e.start)+"-"+r(e.end)}function i(e){return e&&"number"==typeof e?e:1}t.exports=function(e){return e&&"object"==typeof e?n.call(e,"position")||n.call(e,"type")?o(e.position):n.call(e,"start")||n.call(e,"end")?o(e):n.call(e,"line")||n.call(e,"column")?r(e):"":""}})),DW=bW(((e,t)=>{var n=AW();function r(){}t.exports=i,r.prototype=Error.prototype,i.prototype=new r;var o=i.prototype;function i(e,t,r){var o,i,a;"string"==typeof t&&(r=t,t=null),o=function(e){var t,n=[null,null];return"string"==typeof e&&(t=e.indexOf(":"),-1===t?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1))),n}(r),i=n(t)||"1:1",a={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(a=t,t=t.start):a.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=i,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=a,this.source=o[0],this.ruleId=o[1]}o.file="",o.name="",o.reason="",o.message="",o.stack="",o.fatal=null,o.column=null,o.line=null})),FW=bW((e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}e.basename=function(e,n){var r,o,i,a,s=0,l=-1;if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');if(t(e),r=e.length,void 0===n||!n.length||n.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else l<0&&(i=!0,l=r+1);return l<0?"":e.slice(s,l)}if(n===e)return"";for(o=-1,a=n.length-1;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else o<0&&(i=!0,o=r+1),a>-1&&(e.charCodeAt(r)===n.charCodeAt(a--)?a<0&&(l=r):(a=-1,l=o));return s===l?l=o:l<0&&(l=e.length),e.slice(s,l)},e.dirname=function(e){var n,r,o;if(t(e),!e.length)return".";for(n=-1,o=e.length;--o;)if(47===e.charCodeAt(o)){if(r){n=o;break}}else r||(r=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},e.extname=function(e){var n,r,o,i=-1,a=0,s=-1,l=0;for(t(e),o=e.length;o--;)if(47!==(r=e.charCodeAt(o)))s<0&&(n=!0,s=o+1),46===r?i<0?i=o:1!==l&&(l=1):i>-1&&(l=-1);else if(n){a=o+1;break}return i<0||s<0||0===l||1===l&&i===s-1&&i===a+1?"":e.slice(i,s)},e.join=function(){for(var e,n=-1;++n<arguments.length;)t(arguments[n]),arguments[n]&&(e=void 0===e?arguments[n]:e+"/"+arguments[n]);return void 0===e?".":function(e){var n,r;return t(e),n=47===e.charCodeAt(0),r=function(e,t){for(var n,r,o="",i=0,a=-1,s=0,l=-1;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a!==l-1&&1!==s)if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",i=0):i=(o=o.slice(0,r)).length-1-o.lastIndexOf("/"),a=l,s=0;continue}}else if(o.length){o="",i=0,a=l,s=0;continue}t&&(o=o.length?o+"/..":"..",i=2)}else o.length?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!n),!r.length&&!n&&(r="."),r.length&&47===e.charCodeAt(e.length-1)&&(r+="/"),n?"/"+r:r}(e)},e.sep="/"})),LW=bW((e=>{e.cwd=function(){return"/"}})),NW=bW(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),BW=bW(((e,t)=>{var n=FW(),r=LW(),o=NW();t.exports=s;var i={}.hasOwnProperty,a=["history","path","basename","stem","extname","dirname"];function s(e){var t,n;if(e){if("string"==typeof e||o(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof s))return new s(e);for(this.data={},this.messages=[],this.history=[],this.cwd=r.cwd(),n=-1;++n<a.length;)t=a[n],i.call(e,t)&&(this[t]=e[t]);for(t in e)a.indexOf(t)<0&&(this[t]=e[t])}function l(e,t){if(e&&e.indexOf(n.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function c(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}s.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(s.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){c(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(s.prototype,"dirname",{get:function(){return"string"==typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(s.prototype,"basename",{get:function(){return"string"==typeof this.path?n.basename(this.path):void 0},set:function(e){c(e,"basename"),l(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(s.prototype,"extname",{get:function(){return"string"==typeof this.path?n.extname(this.path):void 0},set:function(e){if(l(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(s.prototype,"stem",{get:function(){return"string"==typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){c(e,"stem"),l(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})})),zW=bW(((e,t)=>{var n=DW(),r=BW();t.exports=r,r.prototype.message=function(e,t,r){var o=new n(e,t,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o},r.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},r.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}})),$W=bW(((e,t)=>{t.exports=zW()})),VW=bW(((e,t)=>{var n=OW(),r=TW(),o=IW(),i=RW(),a=MW(),s=$W();t.exports=function e(){var t,r=[],v=a(),b={},y=-1;return x.data=function(e,n){return"string"==typeof e?2===arguments.length?(h("data",t),b[e]=n,x):c.call(b,e)&&b[e]||null:e?(h("data",t),b=e,x):b},x.freeze=w,x.attachers=r,x.use=function(e){var n;if(h("use",t),null!=e)if("function"==typeof e)u.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):a(e)}return n&&(b.settings=o(b.settings||{},n)),x;function a(e){c(e.plugins),e.settings&&(n=o(n||{},e.settings))}function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):a(e)}}function c(e){var t=-1;if(null!=e){if("object"!=typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function u(e,t){var n=function(e){for(var t=-1;++t<r.length;)if(r[t][0]===e)return r[t]}(e);n?(i(n[1])&&i(t)&&(t=o(!0,n[1],t)),n[1]=t):r.push(l.call(arguments))}},x.parse=function(e){var t,n=s(e);return w(),t=x.Parser,f("parse",t),d(t,"parse")?new t(String(n),n).parse():t(String(n),n)},x.stringify=function(e,t){var n,r=s(t);return w(),n=x.Compiler,p("stringify",n),g(e),d(n,"compile")?new n(e,r).compile():n(e,r)},x.run=_,x.runSync=function(e,t){var r,o;return _(e,t,i),m("runSync","run",o),r;function i(e,t){o=!0,r=t,n(e)}},x.process=S,x.processSync=function(e){var t,r;return w(),f("processSync",x.Parser),p("processSync",x.Compiler),t=s(e),S(t,o),m("processSync","process",r),t;function o(e){r=!0,n(e)}},x;function x(){for(var t=e(),n=-1;++n<r.length;)t.use.apply(null,r[n]);return t.data(o(!0,{},b)),t}function w(){var e,n;if(t)return x;for(;++y<r.length;)!1!==(e=r[y])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(n=e[0].apply(x,e.slice(1)))&&v.use(n));return t=!0,y=1/0,x}function _(e,t,n){if(g(e),w(),!n&&"function"==typeof t&&(n=t,t=null),!n)return new Promise(r);function r(r,o){v.run(e,s(t),(function(t,i,a){i=i||e,t?o(t):r?r(i):n(null,i,a)}))}r(null,n)}function S(e,t){if(w(),f("process",x.Parser),p("process",x.Compiler),!t)return new Promise(n);function n(n,r){var o=s(e);u.run(x,{file:o},(function(e){e?r(e):n?n(o):t(null,o)}))}n(null,t)}}().freeze();var l=[].slice,c={}.hasOwnProperty,u=a().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,o){e?n(e):(t.tree=r,t.file=o,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||r(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}));function d(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function f(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function p(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function h(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function g(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function m(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}})),HW=bW(((e,t)=>{t.exports=function(e,t){var n,r=String(e),o=0;if("string"!=typeof t)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)o++,n=r.indexOf(t,n+t.length);return o}})),KW=bW(((e,t)=>{function n(e){if(null==e)return r;if("string"==typeof e)return function(e){return t;function t(t){return!(!t||t.type!==e)}}(e);if("object"==typeof e)return"length"in e?function(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return o;function o(){for(var e=-1;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return t;function t(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function r(){return!0}t.exports=n})),UW=bW(((e,t)=>{t.exports=function(e){return e}})),GW=bW(((e,t)=>{t.exports=s;var n=KW(),r=UW(),o=!0,i="skip",a=!1;function s(e,t,s,l){var c,u;"function"==typeof t&&"function"!=typeof s&&(l=s,s=t,t=null),u=n(t),c=l?-1:1,function e(n,d,f){var p,h="object"==typeof n&&null!==n?n:{};return"string"==typeof h.type&&(p="string"==typeof h.tagName?h.tagName:"string"==typeof h.name?h.name:void 0,g.displayName="node ("+r(h.type+(p?"<"+p+">":""))+")"),g;function g(){var r,p,h=f.concat(n),g=[];if((!t||u(n,d,f[f.length-1]||null))&&(g=function(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[o,e]:[e]}(s(n,f)),g[0]===a))return g;if(n.children&&g[0]!==i)for(p=(l?n.children.length:-1)+c;p>-1&&p<n.children.length;){if((r=e(n.children[p],p,h)())[0]===a)return r;p="number"==typeof r[1]?r[1]:p+c}return g}}(e,null,[])()}s.CONTINUE=o,s.SKIP=i,s.EXIT=a})),WW=bW(((e,t)=>{t.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}})),qW=bW(((e,t)=>{t.exports=function(e,t,n,r){var o,c;return"string"==typeof t||t&&"function"==typeof t.exec?c=[[t,n]]:(c=t,r=n),o=r||{},a(e,o,function e(t){var n=t[0];return r;function r(r,s){var l,c,u,d,f=n[0],p=n[1],h=[],g=0,m=s.children.indexOf(r);for(f.lastIndex=0,c=f.exec(r.value);c&&(l=c.index,!1!==(d=p.apply(null,[].concat(c,{index:c.index,input:c.input})))&&(g!==l&&h.push({type:"text",value:r.value.slice(g,l)}),"string"==typeof d&&d.length>0&&(d={type:"text",value:d}),d&&(h=[].concat(h,d)),g=l+c[0].length),f.global);)c=f.exec(r.value);if(void 0===l?(h=[r],m--):(g<r.value.length&&h.push({type:"text",value:r.value.slice(g)}),h.unshift(m,1),i.apply(s.children,h)),t.length>1)for(u=e(t.slice(1)),l=-1;++l<h.length;)"text"===(r=h[l]).type?u(r,s):a(r,o,u);return m+h.length+1}}(function(e){var t,n,r=[];if("object"!=typeof e)throw new Error("Expected array or object as schema");if("length"in e)for(n=-1;++n<e.length;)r.push([s(e[n][0]),l(e[n][1])]);else for(t in e)r.push([s(t),l(e[t])]);return r}(c))),e};var n=GW(),r=KW(),o=WW(),i=[].splice;function a(e,t,o){var i=r(t.ignore||[]);return n(e,"text",(function(e,t){for(var n,r,a=-1;++a<t.length;){if(n=t[a],i(n,r?r.children.indexOf(n):void 0,r))return;r=n}return o(e,r)})),[]}function s(e){return"string"==typeof e?new RegExp(o(e),"g"):e}function l(e){return"function"==typeof e?e:function(){return e}}})),YW=bW(((e,t)=>{t.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/})),JW=bW(((e,t)=>{var n=String.fromCharCode;t.exports=n})),XW=bW(((e,t)=>{var n=JW();t.exports=function(e){return function(t){return e.test(n(t))}}})),ZW=bW(((e,t)=>{var n=YW(),r=XW()(n);t.exports=r})),QW=bW(((e,t)=>{var n=XW()(/\s/);t.exports=n})),eq=bW((e=>{var t=HW(),n=qW(),r=ZW(),o=QW();function i(e){this.config.enter.autolinkProtocol.call(this,e)}function a(e,n,r,o,i){var a,s,c="";return!!(l(i)&&(/^w/i.test(n)&&(r=n+r,n="",c="http://"),function(e){var t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(r))&&(a=function(e){var n,r,o,i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(i)for(e=e.slice(0,i.index),i=i[0],n=i.indexOf(")"),r=t(e,"("),o=t(e,")");-1!==n&&r>o;)e+=i.slice(0,n+1),i=i.slice(n+1),n=i.indexOf(")"),o++;return[e,i]}(r+o),a[0]))&&(s={type:"link",title:null,url:c+n+a[0],children:[{type:"text",value:n+a[0]}]},a[1]&&(s=[s,{type:"text",value:a[1]}]),s)}function s(e,t,n,r){return!(!l(r,!0)||/[_-]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l(e,t){var n=e.input.charCodeAt(e.index-1);return(n!=n||o(n)||r(n))&&(!t||47!==n)}e.transforms=[function(e){n(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i,a],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/,s]],{ignore:["link","linkReference"]})}],e.enter={literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:i,literalAutolinkHttp:i,literalAutolinkWww:i},e.exit={literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}})),tq=bW(((e,t)=>{var n={}.hasOwnProperty;t.exports=n})),nq=bW(((e,t)=>{var n=[].splice;t.exports=n})),rq=bW(((e,t)=>{var n=nq();t.exports=function(e,t,r,o){var i,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,r=r>0?r:0,o.length<1e4)(i=Array.from(o)).unshift(t,r),n.apply(e,i);else for(r&&n.apply(e,[t,r]);s<o.length;)(i=o.slice(s,s+1e4)).unshift(t,0),n.apply(e,i),s+=1e4,t+=1e4}})),oq=bW(((e,t)=>{t.exports=function(e){return null==e?[]:"length"in e?e:[e]}})),iq=bW(((e,t)=>{var n=tq(),r=rq(),o=oq();function i(e,t){var r,i,s,l;for(r in t)for(l in i=n.call(e,r)?e[r]:e[r]={},s=t[r])i[l]=a(o(s[l]),n.call(i,l)?i[l]:[])}function a(e,t){for(var n=-1,o=[];++n<e.length;)("after"===e[n].add?t:o).push(e[n]);return r(t,0,0,o),t}t.exports=function(e){for(var t={},n=-1;++n<e.length;)i(t,e[n]);return t}})),aq=bW(((e,t)=>{var n=XW()(/[A-Za-z]/);t.exports=n})),sq=bW(((e,t)=>{var n=XW()(/[\dA-Za-z]/);t.exports=n})),lq=bW(((e,t)=>{t.exports=function(e){return e<32||127===e}})),cq=bW(((e,t)=>{t.exports=function(e){return e<-2}})),uq=bW((e=>{var t=aq(),n=sq(),r=lq(),o=cq(),i=ZW(),a=QW(),s={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 87===t||t-32==87?(e.consume(t),i):n(t)}function i(t){return 87===t||t-32==87?(e.consume(t),a):n(t)}function a(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||o(e)?n(e):t(e)}},partial:!0},l={tokenize:function(e,t,n){var o,s;return l;function l(t){return 38===t?e.check(d,f,c)(t):46===t||95===t?e.check(u,f,c)(t):r(t)||a(t)||45!==t&&i(t)?f(t):(e.consume(t),l)}function c(t){return 46===t?(s=o,o=void 0,e.consume(t),l):(95===t&&(o=!0),e.consume(t),l)}function f(e){return s||o?n(e):t(e)}},partial:!0},c={tokenize:function(e,t){var n=0;return r;function r(a){return 38===a?e.check(d,t,o)(a):(40===a&&n++,41===a?e.check(u,i,o)(a):b(a)?t(a):v(a)?e.check(u,t,o)(a):(e.consume(a),r))}function o(t){return e.consume(t),r}function i(e){return--n<0?t(e):o(e)}},partial:!0},u={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(o){return v(o)?(e.consume(o),r):b(o)?t(o):n(o)}},partial:!0},d={tokenize:function(e,n,r){return function(t){return e.consume(t),o};function o(n){return t(n)?(e.consume(n),o):59===n?(e.consume(n),i):r(n)}function i(e){return b(e)?n(e):r(e)}},partial:!0},f={tokenize:function(e,t,n){var r=this;return function(t){return 87!==t&&t-32!=87||!x(r.previous)||S(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s,e.attempt(l,e.attempt(c,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:x},p={tokenize:function(e,t,n){var o=this;return function(t){return 72!==t&&t-32!=72||!w(o.previous)||S(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),s)};function s(t){return 84===t||t-32==84?(e.consume(t),u):n(t)}function u(t){return 84===t||t-32==84?(e.consume(t),d):n(t)}function d(t){return 80===t||t-32==80?(e.consume(t),f):n(t)}function f(t){return 83===t||t-32==83?(e.consume(t),p):p(t)}function p(t){return 58===t?(e.consume(t),h):n(t)}function h(t){return 47===t?(e.consume(t),g):n(t)}function g(t){return 47===t?(e.consume(t),m):n(t)}function m(t){return r(t)||a(t)||i(t)?n(t):e.attempt(l,e.attempt(c,v),n)(t)}function v(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:w},h={tokenize:function(e,t,r){var o,i=this;return function(t){return y(t)&&_(i.previous)&&!S(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):r(t)};function a(t){return y(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(u,f,l)(t):45===t||95===t?e.check(u,r,c)(t):n(t)?(e.consume(t),s):f(t)}function l(t){return e.consume(t),o=!0,s}function c(t){return e.consume(t),d}function d(t){return 46===t?e.check(u,r,l)(t):s(t)}function f(n){return o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:_},g={};e.text=g;for(var m=48;m<123;)g[m]=h,58===++m?m=65:91===m&&(m=97);function v(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function b(e){return null===e||e<0||32===e||60===e}function y(e){return 43===e||45===e||46===e||95===e||n(e)}function x(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}function w(e){return null===e||!t(e)}function _(e){return 47!==e&&w(e)}function S(e){for(var t=e.length;t--;)if(("labelLink"===e[t][1].type||"labelImage"===e[t][1].type)&&!e[t][1]._balanced)return!0}g[43]=h,g[45]=h,g[46]=h,g[95]=h,g[72]=[h,p],g[104]=[h,p],g[87]=[h,f],g[119]=[h,f]})),dq=bW(((e,t)=>{t.exports=uq()})),fq=bW(((e,t)=>{t.exports=function(e){return e<0||32===e}})),pq=bW(((e,t)=>{var n=fq(),r=ZW(),o=QW();t.exports=function(e){return null===e||n(e)||o(e)?1:r(e)?2:void 0}})),hq=bW(((e,t)=>{t.exports=function(e,t,n){for(var r,o=[],i=-1;++i<e.length;)(r=e[i].resolveAll)&&o.indexOf(r)<0&&(t=r(t,n),o.push(r));return t}})),gq=bW(((e,t)=>{var n=Object.assign;t.exports=n})),mq=bW(((e,t)=>{var n=gq();t.exports=function(e){return n({},e)}})),vq=bW(((e,t)=>{t.exports=function(e){var t=e||{},a=t.singleTilde,s={tokenize:function(e,t,r){var o=this.previous,i=this.events,s=0;return l;function l(t){return 126!==t||126===o&&"characterEscape"!==i[i.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),c(t))}function c(i){var l,u,d=n(o);return 126===i?s>1?r(i):(e.consume(i),s++,c):s<2&&!a?r(i):(l=e.exit("strikethroughSequenceTemporary"),u=n(i),l._open=!u||2===u&&d,l._close=!d||2===d&&u,t(i))}},resolveAll:function(e,t){for(var n,a,s,l,c=-1;++c<e.length;)if("enter"===e[c][0]&&"strikethroughSequenceTemporary"===e[c][1].type&&e[c][1]._close)for(s=c;s--;)if("exit"===e[s][0]&&"strikethroughSequenceTemporary"===e[s][1].type&&e[s][1]._open&&e[c][1].end.offset-e[c][1].start.offset==e[s][1].end.offset-e[s][1].start.offset){e[c][1].type="strikethroughSequence",e[s][1].type="strikethroughSequence",n={type:"strikethrough",start:i(e[s][1].start),end:i(e[c][1].end)},a={type:"strikethroughText",start:i(e[s][1].end),end:i(e[c][1].start)},l=[["enter",n,t],["enter",e[s][1],t],["exit",e[s][1],t],["enter",a,t]],r(l,l.length,0,o(t.parser.constructs.insideSpan.null,e.slice(s+1,c),t)),r(l,l.length,0,[["exit",a,t],["enter",e[c][1],t],["exit",e[c][1],t],["exit",n,t]]),r(e,s-1,c-s+3,l),c=s+l.length-2;break}return function(e){for(var t=-1,n=e.length;++t<n;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}(e)}};return null==a&&(a=!0),{text:{126:s},insideSpan:{null:s}}};var n=pq(),r=rq(),o=hq(),i=mq()})),bq=bW(((e,t)=>{t.exports=function(e){return-2===e||-1===e||32===e}})),yq=bW(((e,t)=>{var n=bq();t.exports=function(e,t,r,o){var i=o?o-1:1/0,a=0;return function(o){return n(o)?(e.enter(r),s(o)):t(o)};function s(o){return n(o)&&a++<i?(e.consume(o),s):(e.exit(r),t(o))}}})),xq=bW((e=>{e.flow={null:{tokenize:function(e,o,i){var a,s,l=[],c=0;return function(t){return null===t||-5===t||-4===t||-3===t?i(t):(e.enter("table")._align=l,e.enter("tableHead"),e.enter("tableRow"),124===t?u(t):(c++,e.enter("temporaryTableCellContent"),p(t)))};function u(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,d}function d(r){return null===r||-5===r||-4===r||-3===r?function(r){return null===r?i(r):(e.exit("tableRow"),e.exit("tableHead"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.check(n,i,t(e,g,"linePrefix",4)))}(r):-2===r||-1===r||32===r?(e.enter("whitespace"),e.consume(r),f):(a&&(a=void 0,c++),124===r?u(r):(e.enter("temporaryTableCellContent"),p(r)))}function f(t){return-2===t||-1===t||32===t?(e.consume(t),f):(e.exit("whitespace"),d(t))}function p(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),d(t)):(e.consume(t),92===t?h:p)}function h(t){return 92===t||124===t?(e.consume(t),p):p(t)}function g(t){return null===t||t<0||32===t?i(t):(e.enter("tableDelimiterRow"),m(t))}function m(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,l.push(null),b):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l.push("left"),y):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):i(t)}function v(t){return-2===t||-1===t||32===t?(e.consume(t),v):(e.exit("whitespace"),m(t))}function b(t){return 45===t?(e.consume(t),b):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l[l.length-1]="left"===l[l.length-1]?"center":"right",x):m(t))}function y(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,b):i(t)}function x(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):i(t)}function w(t){return e.exit("tableDelimiterRow"),s&&c===l.length?null===t?_(t):e.check(r,_,S)(t):i(t)}function _(t){return e.exit("table"),o(t)}function S(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,k,"linePrefix",4)}function k(t){return e.enter("tableBody"),E(t)}function E(t){return e.enter("tableRow"),124===t?C(t):(e.enter("temporaryTableCellContent"),T(t))}function C(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),j}function j(t){return null===t||-5===t||-4===t||-3===t?function(t){return e.exit("tableRow"),null===t?R(t):e.check(r,R,P)(t)}(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),O):124===t?C(t):(e.enter("temporaryTableCellContent"),T(t))}function O(t){return-2===t||-1===t||32===t?(e.consume(t),O):(e.exit("whitespace"),j(t))}function T(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),j(t)):(e.consume(t),92===t?I:T)}function I(t){return 92===t||124===t?(e.consume(t),T):T(t)}function R(t){return e.exit("tableBody"),_(t)}function P(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,E,"linePrefix",4)}},resolve:function(e,t){for(var n,r,o,i,a,s,l,c,u,d,f=e.length,p=-1;++p<f;)n=e[p][1],i&&("temporaryTableCellContent"===n.type&&(c=c||p,u=p),("tableCellDivider"===n.type||"tableRow"===n.type)&&u&&(s={type:"tableContent",start:e[c][1].start,end:e[u][1].end},l={type:"chunkText",start:s.start,end:s.end,contentType:"text"},e.splice(c,u-c+1,["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]),p-=u-c-3,f=e.length,c=void 0,u=void 0)),"exit"===e[p][0]&&d&&d+1<p&&("tableCellDivider"===n.type||"tableRow"===n.type&&(d+3<p||"whitespace"!==e[d][1].type))&&(a={type:o?"tableDelimiter":r?"tableHeader":"tableData",start:e[d][1].start,end:e[p][1].end},e.splice(p+("tableCellDivider"===n.type?1:0),0,["exit",a,t]),e.splice(d,0,["enter",a,t]),p+=2,f=e.length,d=p+1),"tableRow"===n.type&&(i="enter"===e[p][0])&&(d=p+1),"tableDelimiterRow"===n.type&&(o="enter"===e[p][0])&&(d=p+1),"tableHead"===n.type&&(r="enter"===e[p][0]);return e},interruptible:!0}};var t=yq(),n={tokenize:function(e,t,n){return function(t){return 45!==t?n(t):(e.enter("setextUnderline"),r(t))};function r(t){return 45===t?(e.consume(t),r):o(t)}function o(r){return-2===r||-1===r||32===r?(e.consume(r),o):null===r||-5===r||-4===r||-3===r?t(r):n(r)}},partial:!0},r={tokenize:function(e,t,n){var r=0;return function(t){return e.enter("check"),e.consume(t),o};function o(i){return-1===i||32===i?(e.consume(i),4===++r?t:o):null===i||i<0?t(i):n(i)}},partial:!0}})),wq=bW(((e,t)=>{t.exports=xq()})),_q=bW(((e,t)=>{t.exports=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n}})),Sq=bW(((e,t)=>{var n=_q();t.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}})),kq=bW((e=>{var t=fq(),n=yq(),r=Sq(),o={tokenize:function(e,t,n){var r=this;return function(t){return 91===t&&null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return-2===t||32===t?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(r){return 93===r?(e.enter("taskListCheckMarker"),e.consume(r),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:i},t,n)):n(r)}}};function i(e,o,i){var a=this;return n(e,(function(e){return r(a.events,"whitespace")&&null!==e&&!t(e)?o(e):i(e)}),"whitespace")}e.text={91:o}})),Eq=bW(((e,t)=>{t.exports=kq()})),Cq=bW(((e,t)=>{var n=iq(),r=dq(),o=vq(),i=wq(),a=Eq();t.exports=function(e){return n([r,o(e),i,a])}})),jq=bW(((e,t)=>{t.exports=Cq()})),Oq=bW((e=>{e.canContainEols=["delete"],e.enter={strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},e.exit={strikethrough:function(e){this.exit(e)}}})),Tq=bW((e=>{function t(e){this.exit(e)}function n(e){this.enter({type:"tableCell",children:[]},e)}function r(e,t){return"|"===t?t:e}e.enter={table:function(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)},tableData:n,tableHeader:n,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},e.exit={codeText:function(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,r)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:t,tableHeader:t,tableRow:t}})),Iq=bW((e=>{function t(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}e.exit={taskListCheckValueChecked:t,taskListCheckValueUnchecked:t,paragraph:function(e){var t,n=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],o=n.children,i=r.children[0],a=-1;if(n&&"listItem"===n.type&&"boolean"==typeof n.checked&&i&&"text"===i.type){for(;++a<o.length;)if("paragraph"===o[a].type){t=o[a];break}t===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}})),Rq=bW(((e,t)=>{var n=eq(),r=Oq(),o=Tq(),i=Iq(),a={}.hasOwnProperty;function s(e,t){var n,r,o;for(n in t)r=a.call(e,n)?e[n]:e[n]={},o=t[n],"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,o):Object.assign(r,o)}t.exports=function(e){for(var t={transforms:[],canContainEols:[]},n=e.length,r=-1;++r<n;)s(t,e[r]);return t}([n,r,o,i])})),Pq=bW((e=>{var t="phrasing",n=["autolink","link","image","label"];e.unsafe=[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:":",before:"[ps]",after:"\\/",inConstruct:t,notInConstruct:n}]})),Mq=bW(((e,t)=>{t.exports=function(e,t,n){for(var r,o,i,a=e.children||[],s=[],l=-1,c=n.before;++l<a.length;)i=a[l],l+1<a.length?((o=t.handle.handlers[a[l+1].type])&&o.peek&&(o=o.peek),r=o?o(a[l+1],e,t,{before:"",after:""}).charAt(0):""):r=n.after,s.length>0&&("\r"===c||"\n"===c)&&"html"===i.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),c=" "),s.push(t.handle(i,e,t,{before:c,after:r})),c=s[s.length-1].slice(-1);return s.join("")}})),Aq=bW((e=>{var t=Mq();function n(e,n,r){var o=r.enter("emphasis"),i=t(e,r,{before:"~",after:"~"});return o(),"~~"+i+"~~"}e.unsafe=[{character:"~",inConstruct:"phrasing"}],e.handlers={delete:n},n.peek=function(){return"~"}})),Dq=bW(((e,t)=>{t.exports=function(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}})),Fq=bW(((e,t)=>{t.exports=r,r.peek=function(){return"`"};var n=Dq();function r(e,t,r){for(var o,i,a,s,l=e.value||"",c="`",u=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(l);)c+="`";for(/[^ \r\n]/.test(l)&&(/[ \r\n`]/.test(l.charAt(0))||/[ \r\n`]/.test(l.charAt(l.length-1)))&&(l=" "+l+" ");++u<r.unsafe.length;)if((o=r.unsafe[u]).atBreak)for(i=n(o);a=i.exec(l);)s=a.index,10===l.charCodeAt(s)&&13===l.charCodeAt(s-1)&&s--,l=l.slice(0,s)+" "+l.slice(a.index+1);return c+l+c}})),Lq=bW(((e,t)=>{var n,r="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var o=e.length*t;if(n!==e||typeof n>"u")n=e,r="";else if(r.length>=o)return r.substr(0,o);for(;o>r.length&&t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+=e,r=r.substr(0,o),r}})),Nq=bW(((e,t)=>{var n=Lq();t.exports=function(e,t){for(var c,u,d,f,y,x,w,_,S,k,E,C=t||{},j=!1!==C.padding,O=!1!==C.delimiterStart,T=!1!==C.delimiterEnd,I=(C.align||[]).concat(),R=!1!==C.alignDelimiters,P=[],M=C.stringLength||v,A=-1,D=e.length,F=[],L=[],N=[],B=[],z=[],$=0;++A<D;){for(u=-1,N=[],B=[],(d=(c=e[A]).length)>$&&($=d);++u<d;)x=m(c[u]),!0===R&&(y=M(x),B[u]=y,(void 0===(f=z[u])||y>f)&&(z[u]=y)),N.push(x);F[A]=N,L[A]=B}if(u=-1,d=$,"object"==typeof I&&"length"in I)for(;++u<d;)P[u]=b(I[u]);else for(E=b(I);++u<d;)P[u]=E;for(u=-1,d=$,N=[],B=[];++u<d;)E=P[u],S="",k="",E===h?S=s:E===g?k=s:E===p&&(S=s,k=s),y=R?Math.max(1,z[u]-S.length-k.length):1,x=S+n(a,y)+k,!0===R&&((y=S.length+y+k.length)>z[u]&&(z[u]=y),B[u]=y),N[u]=x;for(F.splice(1,0,N),L.splice(1,0,B),A=-1,D=F.length,w=[];++A<D;){for(N=F[A],B=L[A],u=-1,d=$,_=[];++u<d;)x=N[u]||"",S="",k="",!0===R&&(y=z[u]-(B[u]||0),(E=P[u])===g?S=n(o,y):E===p?y%2==0?k=S=n(o,y/2):(S=n(o,y/2+.5),k=n(o,y/2-.5)):k=n(o,y)),!0===O&&0===u&&_.push(l),!0===j&&!(!1===R&&""===x)&&(!0===O||0!==u)&&_.push(o),!0===R&&_.push(S),_.push(x),!0===R&&_.push(k),!0===j&&_.push(o),(!0===T||u!==d-1)&&_.push(l);_=_.join(""),!1===T&&(_=_.replace(r,"")),w.push(_)}return w.join(i)};var r=/ +$/,o=" ",i="\n",a="-",s=":",l="|",c=0,u=67,d=76,f=82,p=99,h=108,g=114;function m(e){return null==e?"":String(e)}function v(e){return e.length}function b(e){var t="string"==typeof e?e.charCodeAt(0):c;return t===d||t===h?h:t===f||t===g?g:t===u||t===p?p:c}})),Bq=bW(((e,t)=>{var n=Mq(),r=Fq(),o=Nq();t.exports=function(e){var t=e||{},i=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n){return u(function(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("table");++r<o;)i[r]=d(n[r],t);return a(),i}(e,n),e.align)},tableRow:function(e,t,n){var r=d(e,n),o=u([r]);return o.slice(0,o.indexOf("\n"))},tableCell:c,inlineCode:function(e,t,n){var o=r(e,t,n);return-1!==n.stack.indexOf("tableCell")&&(o=o.replace(/\|/g,"\\$&")),o}}};function c(e,t,r){var o=r.enter("tableCell"),i=n(e,r,{before:l,after:l});return o(),i}function u(e,t){return o(e,{align:t,alignDelimiters:a,padding:i,stringLength:s})}function d(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("tableRow");++r<o;)i[r]=c(n[r],0,t);return a(),i}}})),zq=bW(((e,t)=>{t.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}})),$q=bW(((e,t)=>{t.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}})),Vq=bW(((e,t)=>{t.exports=function(e,t){for(var r,o=e.children||[],i=[],a=-1;++a<o.length;)r=o[a],i.push(t.handle(r,e,t,{before:"\n",after:"\n"})),a+1<o.length&&i.push(s(r,o[a+1]));return i.join("");function s(r,o){for(var i,a=-1;++a<t.join.length&&(!0!==(i=t.join[a](r,o,e,t))&&1!==i);){if("number"==typeof i)return n("\n",1+Number(i));if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}};var n=Lq()})),Hq=bW(((e,t)=>{t.exports=function(e,t){for(var r,o=[],i=0,a=0;r=n.exec(e);)s(e.slice(i,r.index)),o.push(r[0]),i=r.index+r[0].length,a++;return s(e.slice(i)),o.join("");function s(e){o.push(t(e,a,!e))}};var n=/\r?\n|\r/g})),Kq=bW(((e,t)=>{t.exports=function(e,t,s){var l,c,u,d=r(s),f=o(s);return t&&t.ordered&&(d=(t.start>-1?t.start:1)+(!1===s.options.incrementListMarker?0:t.children.indexOf(e))+"."),l=d.length+1,("tab"===f||"mixed"===f&&(t&&t.spread||e.spread))&&(l=4*Math.ceil(l/4)),u=s.enter("listItem"),c=a(i(e,s),(function(e,t,r){return t?(r?"":n(" ",l))+e:(r?d:d+n(" ",l-d.length))+e})),u(),c};var n=Lq(),r=zq(),o=$q(),i=Vq(),a=Hq()})),Uq=bW((e=>{var t=Kq();e.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}],e.handlers={listItem:function(e,n,r){var o=t(e,n,r),i=e.children[0];return"boolean"==typeof e.checked&&i&&"paragraph"===i.type&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "}))),o}}})),Gq=bW(((e,t)=>{t.exports=function e(t,n){var r,o=-1;if(n.extensions)for(;++o<n.extensions.length;)e(t,n.extensions[o]);for(r in n)"extensions"===r||("unsafe"===r||"join"===r?t[r]=t[r].concat(n[r]||[]):"handlers"===r?t[r]=Object.assign(t[r],n[r]||{}):t.options[r]=n[r]);return t}})),Wq=bW(((e,t)=>{var n=Pq(),r=Aq(),o=Bq(),i=Uq(),a=Gq();t.exports=function(e){var t=a({handlers:{},join:[],unsafe:[],options:{}},{extensions:[n,r,o(e),i]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}})),qq=bW(((e,t)=>{var n,r=jq(),o=Rq(),i=Wq();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i(e))}})),Yq=bW(((e,t)=>{function n(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return t.join("")}t.exports=n})),Jq=bW(((e,t)=>{t.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}})),Xq=bW(((e,t)=>{var n=JW();t.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||65534==(65535&r)||r>1114111?"�":n(r)}})),Zq=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cq(),n=yq(),r=function(e){var r,o=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n(e,o,"linePrefix")}),(function(t){return e.enter("paragraph"),i(t)}));return o;function i(t){var n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,a(t)}function a(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):t(n)?(e.consume(n),e.exit("chunkText"),i):(e.consume(n),a)}};e.tokenize=r})),Qq=bW(((e,t)=>{var n=cq(),r=yq(),o={tokenize:function(e,t,o){return r(e,(function(e){return null===e||n(e)?t(e):o(e)}),"linePrefix")},partial:!0};t.exports=o})),eY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cq(),n=yq(),r=Qq(),o=function(e){var n,o,s,l=this,c=[],u=0,d={tokenize:function(e,t){var s=0;return n={},u;function u(t){return s<c.length?(l.containerState=c[s][1],e.attempt(c[s][0].continuation,d,f)(t)):o.currentConstruct&&o.currentConstruct.concrete?(n.flowContinue=!0,g(t)):(l.interrupt=o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,h,g)(t))}function d(e){return s++,l.containerState._closeFlow?h(e):u(e)}function f(t){return o.currentConstruct&&o.currentConstruct.lazy?(l.containerState={},e.attempt(i,h,e.attempt(a,h,e.check(r,h,p)))(t)):h(t)}function p(e){return s=c.length,n.lazy=!0,n.flowContinue=!0,g(e)}function h(e){return n.flowEnd=!0,g(e)}function g(e){return n.continued=s,l.interrupt=l.containerState=void 0,t(e)}},partial:!0};return f;function f(t){return u<c.length?(l.containerState=c[u][1],e.attempt(c[u][0].continuation,p,h)(t)):h(t)}function p(e){return u++,f(e)}function h(t){return n&&n.flowContinue?m(t):(l.interrupt=o&&o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,g,m)(t))}function g(e){return c.push([l.currentConstruct,l.containerState]),l.containerState=void 0,h(e)}function m(t){return null===t?(x(0,!0),void e.consume(t)):(o=o||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:o}),v(t))}function v(n){return null===n?(y(e.exit("chunkFlow")),m(n)):t(n)?(e.consume(n),y(e.exit("chunkFlow")),e.check(d,b)):(e.consume(n),v)}function b(e){return x(n.continued,n&&n.flowEnd),u=0,f(e)}function y(e){s&&(s.next=e),s=e,o.lazy=n&&n.lazy,o.defineSkip(e.start),o.write(l.sliceStream(e))}function x(t,n){var r=c.length;for(o&&n&&(o.write([null]),s=o=void 0);r-- >t;)l.containerState=c[r][1],c[r][0].exit.call(l,e);c.length=t}},i={tokenize:function(e,t,r){return n(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},a={tokenize:function(e,t,r){return n(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};e.tokenize=o})),tY=bW(((e,t)=>{var n=gq(),r=rq(),o=mq();function i(e,t){for(var n,o,i,a,s,l,c=e[t][1],u=e[t][2],d=t-1,f=[],p=c._tokenizer||u.parser[c.contentType](c.start),h=p.events,g=[],m={};c;){for(;e[++d][1]!==c;);f.push(d),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),o&&p.defineSkip(c.start),c.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(n),c.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),o=c,c=c.next}for(c=o,i=h.length;i--;)"enter"===h[i][0]?a=!0:a&&h[i][1].type===h[i-1][1].type&&h[i][1].start.line!==h[i][1].end.line&&(v(h.slice(i+1,s)),c._tokenizer=c.next=void 0,c=c.previous,s=i+1);for(p.events=c._tokenizer=c.next=void 0,v(h.slice(0,s)),i=-1,l=0;++i<g.length;)m[l+g[i][0]]=l+g[i][1],l+=g[i][1]-g[i][0]-1;return m;function v(t){var n=f.pop();g.unshift([n,n+t.length-1]),r(e,n,2,t)}}t.exports=function(e){for(var t,a,s,l,c,u,d,f={},p=-1;++p<e.length;){for(;p in f;)p=f[p];if(t=e[p],p&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[p-1][1].type&&((s=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[s][1].type&&(s+=2),s<u.length&&"content"===u[s][1].type))for(;++s<u.length&&"content"!==u[s][1].type;)"chunkText"===u[s][1].type&&(u[s][1].isInFirstContentOfListItem=!0,s++);if("enter"===t[0])t[1].contentType&&(n(f,i(e,p)),p=f[p],d=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(s=p,a=void 0;s--&&("lineEnding"===(l=e[s])[1].type||"lineEndingBlank"===l[1].type);)"enter"===l[0]&&(a&&(e[a][1].type="lineEndingBlank"),l[1].type="lineEnding",a=s);a&&(t[1].end=o(e[a][1].start),(c=e.slice(a,p)).unshift(t),r(e,a,p-a+1,c))}}return!d}})),nY=bW(((e,t)=>{var n=cq(),r=Sq(),o=tY(),i=yq(),a={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?i(t):n(t)?e.check(s,a,i)(t):(e.consume(t),o)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),o}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0},s={tokenize:function(e,t,o){var a=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,s,"linePrefix")};function s(i){return null===i||n(i)?o(i):a.parser.constructs.disable.null.indexOf("codeIndented")>-1||r(a.events,"linePrefix")<4?e.interrupt(a.parser.constructs.flow,o,t)(i):t(i)}},partial:!0};t.exports=a})),rY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nY(),n=yq(),r=Qq(),o=function(e){var o=this,i=e.attempt(r,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEndingBlank"),e.consume(t),e.exit("lineEndingBlank"),o.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,a,n(e,e.attempt(this.parser.constructs.flow,a,e.attempt(t,a)),"linePrefix")));return i;function a(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o.currentConstruct=void 0,i;e.consume(t)}};e.tokenize=o})),oY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gq(),n=mq(),r=a("text"),o=a("string"),i={resolveAll:s()};function a(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){var t=r[e],o=-1;if(null===e)return!0;if(t)for(;++o<t.length;)if(!t[o].previous||t[o].previous.call(n,n.previous))return!0}},resolveAll:s("text"===e?l:void 0)}}function s(e){return function(t,n){for(var r,o=-1;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function l(e,r){for(var o,i,a,s,l,c,u,d,f=-1;++f<=e.length;)if((f===e.length||"lineEnding"===e[f][1].type)&&"data"===e[f-1][1].type){for(i=e[f-1][1],s=(o=r.sliceStream(i)).length,l=-1,c=0,u=void 0;s--;)if("string"==typeof(a=o[s])){for(l=a.length;32===a.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===a)u=!0,c++;else if(-1!==a){s++;break}c&&(d={type:f===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-c,offset:i.end.offset-c,_index:i.start._index+s,_bufferIndex:s?l:i.start._bufferIndex+l},end:n(i.end)},i.end=n(d.start),i.start.offset===i.end.offset?t(i,d):(e.splice(f,0,["enter",d,r],["exit",d,r]),f+=2)),f++}return e}e.resolver=i,e.string=o,e.text=r})),iY=bW(((e,t)=>{var n=rq();t.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}})),aY=bW(((e,t)=>{var n=JW();t.exports=function(e){for(var t,r,o,i=-1,a=[];++i<e.length;){if("string"==typeof(t=e[i]))r=t;else if(-5===t)r="\r";else if(-4===t)r="\n";else if(-3===t)r="\r\n";else if(-2===t)r="\t";else if(-1===t){if(o)continue;r=" "}else r=n(t);o=-2===t,a.push(r)}return a.join("")}})),sY=bW(((e,t)=>{t.exports=function(e,t){var n,r=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;return r===i?n=[e[r].slice(o,a)]:(n=e.slice(r,i),o>-1&&(n[0]=n[0].slice(o)),a>0&&n.push(e[i].slice(0,a))),n}})),lY=bW(((e,t)=>{var n=gq(),r=cq(),o=iY(),i=rq(),a=oq(),s=hq(),l=aY(),c=mq(),u=sY();t.exports=function(e,t,d){var f=d?c(d):{line:1,column:1,offset:0},p={},h=[],g=[],m=[],v={consume:function(e){r(e)?(f.line++,f.column=1,f.offset+=-3===e?2:1,C()):-1!==e&&(f.column++,f.offset++),f._bufferIndex<0?f._index++:(f._bufferIndex++,f._bufferIndex===g[f._index].length&&(f._bufferIndex=-1,f._index++)),b.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=w(),b.events.push(["enter",n,b]),m.push(n),n},exit:function(e){var t=m.pop();return t.end=w(),b.events.push(["exit",t,b]),t},attempt:k((function(e,t){E(e,t.from)})),check:k(S),interrupt:k(S,{interrupt:!0}),lazy:k(S,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:x,sliceSerialize:function(e){return l(x(e))},now:w,defineSkip:function(e){p[e.line]=e.column,C()},write:function(e){return g=o(g,e),function(){for(var e,t;f._index<g.length;)if("string"==typeof(t=g[f._index]))for(e=f._index,f._bufferIndex<0&&(f._bufferIndex=0);f._index===e&&f._bufferIndex<t.length;)_(t.charCodeAt(f._bufferIndex));else _(t)}(),null!==g[g.length-1]?[]:(E(t,0),b.events=s(h,b.events,b),b.events)}},y=t.tokenize.call(b,v);return t.resolveAll&&h.push(t),f._index=0,f._bufferIndex=-1,b;function x(e){return u(g,e)}function w(){return c(f)}function _(e){y=y(e)}function S(e,t){t.restore()}function k(e,t){return function(r,o,i){var s,l,c,u;return r.tokenize||"length"in r?d(a(r)):function(e){return e in r||null in r?d(r.null?a(r[e]).concat(a(r.null)):r[e])(e):i(e)};function d(e){return s=e,p(e[l=0])}function p(e){return function(r){return u=function(){var e=w(),t=b.previous,n=b.currentConstruct,r=b.events.length,o=Array.from(m);return{restore:i,from:r};function i(){f=e,b.previous=t,b.currentConstruct=n,b.events.length=r,m=o,C()}}(),c=e,e.partial||(b.currentConstruct=e),e.name&&b.parser.constructs.disable.null.indexOf(e.name)>-1?g():e.tokenize.call(t?n({},b,t):b,v,h,g)(r)}}function h(t){return e(c,u),o}function g(e){return u.restore(),++l<s.length?p(s[l]):i}}}function E(e,t){e.resolveAll&&h.indexOf(e)<0&&h.push(e),e.resolve&&i(b.events,t,b.events.length-t,e.resolve(b.events.slice(t),b)),e.resolveTo&&(b.events=e.resolveTo(b.events,b))}function C(){f.line in p&&f.column<2&&(f.column=p[f.line],f.offset+=p[f.line]-1)}}})),cY=bW(((e,t)=>{t.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}})),uY=bW(((e,t)=>{var n=iY(),r=rq(),o=pq(),i=cY(),a=hq(),s=mq(),l={name:"attention",tokenize:function(e,t){var n,r=o(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(a){var s,l,c,u;return a===n?(e.consume(a),i):(s=e.exit("attentionSequence"),c=!(l=o(a))||2===l&&r,u=!r||2===r&&l,s._open=42===n?c:c&&(r||!u),s._close=42===n?u:u&&(l||!c),t(a))}},resolveAll:function(e,t){for(var o,l,c,u,d,f,p,h,g=-1;++g<e.length;)if("enter"===e[g][0]&&"attentionSequence"===e[g][1].type&&e[g][1]._close)for(o=g;o--;)if("exit"===e[o][0]&&"attentionSequence"===e[o][1].type&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[g][1]).charCodeAt(0)){if((e[o][1]._close||e[g][1]._open)&&(e[g][1].end.offset-e[g][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[g][1].end.offset-e[g][1].start.offset)%3))continue;u={type:(f=e[o][1].end.offset-e[o][1].start.offset>1&&e[g][1].end.offset-e[g][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(s(e[o][1].end),-f),end:s(e[o][1].end)},d={type:f>1?"strongSequence":"emphasisSequence",start:s(e[g][1].start),end:i(s(e[g][1].start),f)},c={type:f>1?"strongText":"emphasisText",start:s(e[o][1].end),end:s(e[g][1].start)},l={type:f>1?"strong":"emphasis",start:s(u.start),end:s(d.end)},e[o][1].end=s(u.start),e[g][1].start=s(d.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=n(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=n(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",c,t]]),p=n(p,a(t.parser.constructs.insideSpan.null,e.slice(o+1,g),t)),p=n(p,[["exit",c,t],["enter",d,t],["exit",d,t],["exit",l,t]]),e[g][1].end.offset-e[g][1].start.offset?(h=2,p=n(p,[["enter",e[g][1],t],["exit",e[g][1],t]])):h=0,r(e,o-1,g-o+3,p),g=o+p.length-h-2;break}for(g=-1;++g<e.length;)"attentionSequence"===e[g][1].type&&(e[g][1].type="data");return e}};t.exports=l})),dY=bW(((e,t)=>{var n=XW()(/[#-'*+\--9=?A-Z^-~]/);t.exports=n})),fY=bW(((e,t)=>{var n=aq(),r=sq(),o=dY(),i=lq(),a={name:"autolink",tokenize:function(e,t,a){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return n(t)?(e.consume(t),c):o(t)?f(t):a(t)}function c(e){return 43===e||45===e||46===e||r(e)?u(e):f(e)}function u(t){return 58===t?(e.consume(t),d):(43===t||45===t||46===t||r(t))&&s++<32?(e.consume(t),u):f(t)}function d(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||i(t)?a(t):(e.consume(t),d)}function f(t){return 64===t?(e.consume(t),s=0,p):o(t)?(e.consume(t),f):a(t)}function p(e){return r(e)?h(e):a(e)}function h(t){return 46===t?(e.consume(t),s=0,p):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):g(t)}function g(t){return(45===t||r(t))&&s++<63?(e.consume(t),45===t?g:h):a(t)}function m(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};t.exports=a})),pY=bW(((e,t)=>{var n=bq(),r=yq(),o={name:"blockQuote",tokenize:function(e,t,r){var o=this;return function(t){return 62===t?(o.containerState.open||(e.enter("blockQuote",{_container:!0}),o.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i):r(t)};function i(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,n){return r(e,e.attempt(o,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};t.exports=o})),hY=bW(((e,t)=>{var n=XW()(/[!-/:-@[-`{-~]/);t.exports=n})),gY=bW(((e,t)=>{var n=hY(),r={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return n(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}};t.exports=r})),mY=bW(((e,t)=>{var n;t.exports=function(e){var t,r="&"+e+";";return(n=n||document.createElement("i")).innerHTML=r,t=n.textContent,(59!==t.charCodeAt(t.length-1)||"semi"===e)&&t!==r&&t}})),vY=bW(((e,t)=>{var n=XW()(/\d/);t.exports=n})),bY=bW(((e,t)=>{var n=XW()(/[\dA-Fa-f]/);t.exports=n})),yY=bW(((e,t)=>{var n=mY(),r=sq(),o=vY(),i=bY();var a=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(n),s={name:"characterReference",tokenize:function(e,t,n){var s,l,c=this,u=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),d};function d(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,l=r,p(t))}function f(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=i,p):(e.enter("characterReferenceValue"),s=7,l=o,p(t))}function p(o){var i;return 59===o&&u?(i=e.exit("characterReferenceValue"),l!==r||a.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)):l(o)&&u++<s?(e.consume(o),p):n(o)}}};t.exports=s})),xY=bW(((e,t)=>{var n=cq(),r=fq(),o=Sq(),i=yq(),a={name:"codeFenced",tokenize:function(e,t,a){var s,l=this,c={tokenize:function(e,t,r){var o=0;return i(e,a,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function a(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}function l(t){return t===s?(e.consume(t),o++,l):o<d?r(t):(e.exit("codeFencedFenceSequence"),i(e,c,"whitespace")(t))}function c(o){return null===o||n(o)?(e.exit("codeFencedFence"),t(o)):r(o)}},partial:!0},u=o(this.events,"linePrefix"),d=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,f(t)};function f(t){return t===s?(e.consume(t),d++,f):(e.exit("codeFencedFenceSequence"),d<3?a(t):i(e,p,"whitespace")(t))}function p(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||r(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),i(e,g,"whitespace")(t)):96===t&&t===s?a(t):(e.consume(t),h)}function g(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||n(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===s?a(t):(e.consume(t),m)}function v(n){return e.exit("codeFencedFence"),l.interrupt?t(n):b(n)}function b(t){return null===t?x(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(c,x,u?i(e,b,"linePrefix",u+1):b)):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||n(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),y)}function x(n){return e.exit("codeFenced"),t(n)}},concrete:!0};t.exports=a})),wY=bW(((e,t)=>{var n=cq(),r=rq(),o=Sq(),i=yq(),a={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(s,o,r);function o(r){return null===r?t(r):n(r)?e.attempt(s,o,t)(r):(e.enter("codeFlowValue"),i(r))}function i(t){return null===t||n(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return r(e,0,0,[["enter",n,t]]),r(e,e.length,0,[["exit",n,t]]),e}},s={tokenize:function(e,t,r){var a=this;return i(e,(function s(l){return n(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i(e,s,"linePrefix",5)):o(a.events,"linePrefix")<4?r(l):t(l)}),"linePrefix",5)},partial:!0};t.exports=a})),_Y=bW(((e,t)=>{var n=cq(),r={name:"codeText",tokenize:function(e,t,r){var o,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),o++,u):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[o][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};t.exports=r})),SY=bW(((e,t)=>{var n=lq(),r=fq(),o=cq();t.exports=function(e,t,i,a,s,l,c,u,d){var f=d||1/0,p=0;return function(t){return 60===t?(e.enter(a),e.enter(s),e.enter(l),e.consume(t),e.exit(l),h):n(t)||41===t?i(t):(e.enter(a),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(t))};function h(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(n))}function g(t){return 62===t?(e.exit("chunkString"),e.exit(u),h(t)):null===t||60===t||o(t)?i(t):(e.consume(t),92===t?m:g)}function m(t){return 60===t||62===t||92===t?(e.consume(t),g):g(t)}function v(o){return 40===o?++p>f?i(o):(e.consume(o),v):41===o?p--?(e.consume(o),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):null===o||r(o)?p?i(o):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):n(o)?i(o):(e.consume(o),92===o?b:v)}function b(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}}})),kY=bW(((e,t)=>{var n=cq(),r=bq();t.exports=function(e,t,o,i,a,s){var l,c=this,u=0;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),e.enter(s),d};function d(r){return null===r||91===r||93===r&&!l||94===r&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?o(r):93===r?(e.exit(s),e.enter(a),e.consume(r),e.exit(a),e.exit(i),t):n(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(r))}function f(t){return null===t||91===t||93===t||n(t)||u++>999?(e.exit("chunkString"),d(t)):(e.consume(t),l=l||!r(t),92===t?p:f)}function p(t){return 91===t||92===t||93===t?(e.consume(t),u++,f):f(t)}}})),EY=bW(((e,t)=>{var n=cq(),r=bq(),o=yq();t.exports=function(e,t){var i;return function a(s){return n(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,a):r(s)?o(e,a,i?"linePrefix":"lineSuffix")(s):t(s)}}})),CY=bW(((e,t)=>{var n=cq(),r=yq();t.exports=function(e,t,o,i,a,s){var l;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,c};function c(n){return n===l?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?o(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===l||null===t||n(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?f:d)}function f(t){return t===l||92===t?(e.consume(t),d):d(t)}}})),jY=bW(((e,t)=>{var n=cq(),r=fq(),o=Jq(),i=SY(),a=kY(),s=yq(),l=EY(),c=CY(),u={name:"definition",tokenize:function(e,t,r){var c,u=this;return function(t){return e.enter("definition"),a.call(u,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function f(t){return c=o(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l(e,i(e,e.attempt(d,s(e,p,"whitespace"),s(e,p,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function p(o){return null===o||n(o)?(e.exit("definition"),u.parser.defined.indexOf(c)<0&&u.parser.defined.push(c),t(o)):r(o)}}},d={tokenize:function(e,t,o){return function(t){return r(t)?l(e,i)(t):o(t)};function i(t){return 34===t||39===t||40===t?c(e,s(e,a,"whitespace"),o,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):o(t)}function a(e){return null===e||n(e)?t(e):o(e)}},partial:!0};t.exports=u})),OY=bW(((e,t)=>{var n=cq(),r={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),o};function o(o){return n(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):r(o)}}};t.exports=r})),TY=bW(((e,t)=>{var n=cq(),r=fq(),o=bq(),i=rq(),a=yq(),s={name:"headingAtx",tokenize:function(e,t,i){var s=this,l=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&l++<6?(e.consume(n),c):null===n||r(n)?(e.exit("atxHeadingSequence"),s.interrupt?t(n):u(n)):i(n)}function u(r){return 35===r?(e.enter("atxHeadingSequence"),d(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):o(r)?a(e,u,"whitespace")(r):(e.enter("atxHeadingText"),f(r))}function d(t){return 35===t?(e.consume(t),d):(e.exit("atxHeadingSequence"),u(t))}function f(t){return null===t||35===t||r(t)?(e.exit("atxHeadingText"),u(t)):(e.consume(t),f)}},resolve:function(e,t){var n,r,o=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),o-2>a&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4),o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},i(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}};t.exports=s})),IY=bW(((e,t)=>{t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]})),RY=bW(((e,t)=>{t.exports=["pre","script","style","textarea"]})),PY=bW(((e,t)=>{var n=aq(),r=sq(),o=cq(),i=fq(),a=bq(),s=JW(),l=IY(),c=RY(),u=Qq(),d={name:"htmlFlow",tokenize:function(e,t,u){var d,p,h,g,m,v=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(r){return 33===r?(e.consume(r),y):47===r?(e.consume(r),_):63===r?(e.consume(r),d=3,v.interrupt?t:V):n(r)?(e.consume(r),h=s(r),p=!0,S):u(r)}function y(r){return 45===r?(e.consume(r),d=2,x):91===r?(e.consume(r),d=5,h="CDATA[",g=0,w):n(r)?(e.consume(r),d=4,v.interrupt?t:V):u(r)}function x(n){return 45===n?(e.consume(n),v.interrupt?t:V):u(n)}function w(n){return n===h.charCodeAt(g++)?(e.consume(n),g===h.length?v.interrupt?t:D:w):u(n)}function _(t){return n(t)?(e.consume(t),h=s(t),S):u(t)}function S(n){return null===n||47===n||62===n||i(n)?47!==n&&p&&c.indexOf(h.toLowerCase())>-1?(d=1,v.interrupt?t(n):D(n)):l.indexOf(h.toLowerCase())>-1?(d=6,47===n?(e.consume(n),k):v.interrupt?t(n):D(n)):(d=7,v.interrupt?u(n):p?C(n):E(n)):45===n||r(n)?(e.consume(n),h+=s(n),S):u(n)}function k(n){return 62===n?(e.consume(n),v.interrupt?t:D):u(n)}function E(t){return a(t)?(e.consume(t),E):M(t)}function C(t){return 47===t?(e.consume(t),M):58===t||95===t||n(t)?(e.consume(t),j):a(t)?(e.consume(t),C):M(t)}function j(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),j):O(t)}function O(t){return 61===t?(e.consume(t),T):a(t)?(e.consume(t),O):C(t)}function T(t){return null===t||60===t||61===t||62===t||96===t?u(t):34===t||39===t?(e.consume(t),m=t,I):a(t)?(e.consume(t),T):(m=void 0,R(t))}function I(t){return t===m?(e.consume(t),P):null===t||o(t)?u(t):(e.consume(t),I)}function R(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?O(t):(e.consume(t),R)}function P(e){return 47===e||62===e||a(e)?C(e):u(e)}function M(t){return 62===t?(e.consume(t),A):u(t)}function A(t){return a(t)?(e.consume(t),A):null===t||o(t)?D(t):u(t)}function D(t){return 45===t&&2===d?(e.consume(t),N):60===t&&1===d?(e.consume(t),B):62===t&&4===d?(e.consume(t),H):63===t&&3===d?(e.consume(t),V):93===t&&5===d?(e.consume(t),$):!o(t)||6!==d&&7!==d?null===t||o(t)?F(t):(e.consume(t),D):e.check(f,H,F)(t)}function F(t){return e.exit("htmlFlowData"),L(t)}function L(t){return null===t?K(t):o(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L):(e.enter("htmlFlowData"),D(t))}function N(t){return 45===t?(e.consume(t),V):D(t)}function B(t){return 47===t?(e.consume(t),h="",z):D(t)}function z(t){return 62===t&&c.indexOf(h.toLowerCase())>-1?(e.consume(t),H):n(t)&&h.length<8?(e.consume(t),h+=s(t),z):D(t)}function $(t){return 93===t?(e.consume(t),V):D(t)}function V(t){return 62===t?(e.consume(t),H):D(t)}function H(t){return null===t||o(t)?(e.exit("htmlFlowData"),K(t)):(e.consume(t),H)}function K(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},f={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(u,t,n)}},partial:!0};t.exports=d})),MY=bW(((e,t)=>{var n=aq(),r=sq(),o=cq(),i=fq(),a=bq(),s=yq(),l={name:"htmlText",tokenize:function(e,t,l){var c,u,d,f,p=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),h};function h(t){return 33===t?(e.consume(t),g):47===t?(e.consume(t),O):63===t?(e.consume(t),C):n(t)?(e.consume(t),R):l(t)}function g(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),u="CDATA[",d=0,w):n(t)?(e.consume(t),E):l(t)}function m(t){return 45===t?(e.consume(t),v):l(t)}function v(t){return null===t||62===t?l(t):45===t?(e.consume(t),b):y(t)}function b(e){return null===e||62===e?l(e):y(e)}function y(t){return null===t?l(t):45===t?(e.consume(t),x):o(t)?(f=y,B(t)):(e.consume(t),y)}function x(t){return 45===t?(e.consume(t),$):y(t)}function w(t){return t===u.charCodeAt(d++)?(e.consume(t),d===u.length?_:w):l(t)}function _(t){return null===t?l(t):93===t?(e.consume(t),S):o(t)?(f=_,B(t)):(e.consume(t),_)}function S(t){return 93===t?(e.consume(t),k):_(t)}function k(t){return 62===t?$(t):93===t?(e.consume(t),k):_(t)}function E(t){return null===t||62===t?$(t):o(t)?(f=E,B(t)):(e.consume(t),E)}function C(t){return null===t?l(t):63===t?(e.consume(t),j):o(t)?(f=C,B(t)):(e.consume(t),C)}function j(e){return 62===e?$(e):C(e)}function O(t){return n(t)?(e.consume(t),T):l(t)}function T(t){return 45===t||r(t)?(e.consume(t),T):I(t)}function I(t){return o(t)?(f=I,B(t)):a(t)?(e.consume(t),I):$(t)}function R(t){return 45===t||r(t)?(e.consume(t),R):47===t||62===t||i(t)?P(t):l(t)}function P(t){return 47===t?(e.consume(t),$):58===t||95===t||n(t)?(e.consume(t),M):o(t)?(f=P,B(t)):a(t)?(e.consume(t),P):$(t)}function M(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),M):A(t)}function A(t){return 61===t?(e.consume(t),D):o(t)?(f=A,B(t)):a(t)?(e.consume(t),A):P(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?l(t):34===t||39===t?(e.consume(t),c=t,F):o(t)?(f=D,B(t)):a(t)?(e.consume(t),D):(e.consume(t),c=void 0,N)}function F(t){return t===c?(e.consume(t),L):null===t?l(t):o(t)?(f=F,B(t)):(e.consume(t),F)}function L(e){return 62===e||47===e||i(e)?P(e):l(e)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?l(t):62===t||i(t)?P(t):(e.consume(t),N)}function B(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s(e,z,"linePrefix",p.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function z(t){return e.enter("htmlTextData"),f(t)}function $(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):l(n)}}};t.exports=l})),AY=bW(((e,t)=>{var n=fq(),r=iY(),o=rq(),i=Jq(),a=hq(),s=mq(),l=SY(),c=kY(),u=CY(),d=EY(),f={name:"labelEnd",tokenize:function(e,t,n){for(var r,o,a=this,s=a.events.length;s--;)if(("labelImage"===a.events[s][1].type||"labelLink"===a.events[s][1].type)&&!a.events[s][1]._balanced){r=a.events[s][1];break}return function(t){return r?r._inactive?c(t):(o=a.parser.defined.indexOf(i(a.sliceSerialize({start:r.end,end:a.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(p,t,o?t:c)(n):91===n?e.attempt(h,t,o?e.attempt(g,t,c):c)(n):o?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){for(var n,i,l,c,u,d,f,p=e.length,h=0;p--;)if(c=e[p][1],u){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[p][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(d){if("enter"===e[p][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(u=p,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(d=p);return n={type:"labelLink"===e[u][1].type?"link":"image",start:s(e[u][1].start),end:s(e[e.length-1][1].end)},i={type:"label",start:s(e[u][1].start),end:s(e[d][1].end)},l={type:"labelText",start:s(e[u+h+2][1].end),end:s(e[d-2][1].start)},f=[["enter",n,t],["enter",i,t]],f=r(f,e.slice(u+1,u+h+3)),f=r(f,[["enter",l,t]]),f=r(f,a(t.parser.constructs.insideSpan.null,e.slice(u+h+4,d-3),t)),f=r(f,[["exit",l,t],e[d-2],e[d-1],["exit",i,t]]),f=r(f,e.slice(d+1)),f=r(f,[["exit",n,t]]),o(e,u,e.length,f),e},resolveAll:function(e){for(var t,n=-1;++n<e.length;)!(t=e[n][1])._used&&("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},p={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),d(e,o)};function o(t){return 41===t?s(t):l(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return n(t)?d(e,a)(t):s(t)}function a(t){return 34===t||39===t||40===t?u(e,d(e,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},h={tokenize:function(e,t,n){var r=this;return function(t){return c.call(r,e,o,n,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.indexOf(i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},g={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};t.exports=f})),DY=bW(((e,t)=>{var n={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:AY().resolveAll};t.exports=n})),FY=bW(((e,t)=>{var n={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:AY().resolveAll};t.exports=n})),LY=bW(((e,t)=>{var n=yq(),r={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};t.exports=r})),NY=bW(((e,t)=>{var n=cq(),r=bq(),o=yq(),i={name:"thematicBreak",tokenize:function(e,t,i){var a,s=0;return function(t){return e.enter("thematicBreak"),a=t,l(t)};function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):r(u)?o(e,l,"whitespace")(u):s<3||null!==u&&!n(u)?i(u):(e.exit("thematicBreak"),t(u))}function c(t){return t===a?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),l(t))}}};t.exports=i})),BY=bW(((e,t)=>{var n=vY(),r=bq(),o=Sq(),i=_q(),a=yq(),s=Qq(),l=NY(),c={name:"list",tokenize:function(e,t,a){var c=this,d=o(c.events,"linePrefix"),f=0;return function(t){var r=c.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!c.containerState.marker||t===c.containerState.marker:n(t)){if(c.containerState.type||(c.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(l,a,h)(t):h(t);if(!c.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(t)}return a(t)};function p(t){return n(t)&&++f<10?(e.consume(t),p):(!c.interrupt||f<2)&&(c.containerState.marker?t===c.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),h(t)):a(t)}function h(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),c.containerState.marker=c.containerState.marker||t,e.check(s,c.interrupt?a:g,e.attempt(u,v,m))}function g(e){return c.containerState.initialBlankLine=!0,d++,v(e)}function m(t){return r(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),v):a(t)}function v(n){return c.containerState.size=d+i(c.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var o=this;return o.containerState._closeFlow=void 0,e.check(s,(function(n){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,a(e,t,"listItemIndent",o.containerState.size+1)(n)}),(function(n){return o.containerState.furtherBlankLines||!r(n)?(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,i(n)):(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,e.attempt(d,t,i)(n))}));function i(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,a(e,e.attempt(c,t,n),"linePrefix",o.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,n){var i=this;return a(e,(function(e){return r(e)||!o(i.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",i.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},d={tokenize:function(e,t,n){var r=this;return a(e,(function(e){return o(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};t.exports=c})),zY=bW(((e,t)=>{var n=cq(),r=mq(),o=yq(),i={name:"setextUnderline",tokenize:function(e,t,r){for(var i,a,s=this,l=s.events.length;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){a="paragraph"===s.events[l][1].type;break}return function(t){return s.lazy||!s.interrupt&&!a?r(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,c(t))};function c(t){return t===i?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),o(e,u,"lineSuffix")(t))}function u(o){return null===o||n(o)?(e.exit("setextHeadingLine"),t(o)):r(o)}},resolveTo:function(e,t){for(var n,o,i,a,s=e.length;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(o=s)}else"content"===e[s][1].type&&e.splice(s,1),!i&&"definition"===e[s][1].type&&(i=s);return a={type:"setextHeading",start:r(e[o][1].start),end:r(e[e.length-1][1].end)},e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=r(e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}};t.exports=i})),$Y=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oY(),n=uY(),r=fY(),o=pY(),i=gY(),a=yY(),s=xY(),l=wY(),c=_Y(),u=jY(),d=OY(),f=TY(),p=PY(),h=MY(),g=AY(),m=DY(),v=FY(),b=LY(),y=BY(),x=zY(),w=NY(),_={42:y,43:y,45:y,48:y,49:y,50:y,51:y,52:y,53:y,54:y,55:y,56:y,57:y,62:o},S={91:u},k={"-2":l,"-1":l,32:l},E={35:f,42:w,45:[x,w],60:p,61:x,95:w,96:s,126:s},C={38:a,92:i},j={"-5":b,"-4":b,"-3":b,33:m,38:a,42:n,60:[r,h],91:v,92:[d,i],93:g,95:n,96:c},O={null:[n,t.resolver]};e.contentInitial=S,e.disable={null:[]},e.document=_,e.flow=E,e.flowInitial=k,e.insideSpan=O,e.string=C,e.text=j})),VY=bW(((e,t)=>{var n=Zq(),r=eY(),o=rY(),i=oY(),a=iq(),s=lY(),l=oq(),c=$Y();t.exports=function(e){var t={defined:[],constructs:a([c].concat(l((e||{}).extensions))),content:u(n),document:u(r),flow:u(o),string:u(i.string),text:u(i.text)};return t;function u(e){return function(n){return s(t,e,n)}}}})),HY=bW(((e,t)=>{var n=/[\0\t\n\r]/g;t.exports=function(){var e,t=!0,r=1,o="";return function(i,a,s){var l,c,u,d,f,p=[];for(i=o+i.toString(a),u=0,o="",t&&(65279===i.charCodeAt(0)&&u++,t=void 0);u<i.length;){if(n.lastIndex=u,d=(l=n.exec(i))?l.index:i.length,f=i.charCodeAt(d),!l){o=i.slice(u);break}if(10===f&&u===d&&e)p.push(-3),e=void 0;else if(e&&(p.push(-5),e=void 0),u<d&&(p.push(i.slice(u,d)),r+=d-u),0===f)p.push(65533),r++;else if(9===f)for(c=4*Math.ceil(r/4),p.push(-2);r++<c;)p.push(-1);else 10===f?(p.push(-4),r=1):(e=!0,r=1);u=d+1}return s&&(e&&p.push(-5),o&&p.push(o),p.push(null)),p}}})),KY=bW(((e,t)=>{var n=tY();t.exports=function(e){for(;!n(e););return e}})),UY=bW(((e,t)=>{t.exports=function(e,t,p){return"string"!=typeof t&&(p=t,t=void 0),function(e){var t=e||{},s=function(e,t){for(var n=-1;++n<t.length;)f(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(fe),autolinkProtocol:L,autolinkEmail:L,atxHeading:v(le),blockQuote:v(re),characterEscape:L,characterReference:L,codeFenced:v(oe),codeFencedFenceInfo:b,codeFencedFenceMeta:b,codeIndented:v(oe,b),codeText:v(ie,b),codeTextData:L,data:L,codeFlowValue:L,definition:v(ae),definitionDestinationString:b,definitionLabelString:b,definitionTitleString:b,emphasis:v(se),hardBreakEscape:v(ce),hardBreakTrailing:v(ce),htmlFlow:v(ue,b),htmlFlowData:L,htmlText:v(ue,b),htmlTextData:L,image:v(de),label:b,link:v(fe),listItem:v(he),listItemValue:k,listOrdered:v(pe,S),listUnordered:v(pe),paragraph:v(ge),reference:X,referenceString:b,resourceDestinationString:b,resourceTitleString:b,setextHeading:v(le),strong:v(me),thematicBreak:v(be)},exit:{atxHeading:x(),atxHeadingSequence:M,autolink:x(),autolinkEmail:ne,autolinkProtocol:te,blockQuote:x(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:ee,codeFenced:x(O),codeFencedFence:j,codeFencedFenceInfo:E,codeFencedFenceMeta:C,codeFlowValue:N,codeIndented:x(T),codeText:x(H),codeTextData:N,data:N,definition:x(),definitionDestinationString:P,definitionLabelString:I,definitionTitleString:R,emphasis:x(),hardBreakEscape:x(z),hardBreakTrailing:x(z),htmlFlow:x($),htmlFlowData:N,htmlText:x(V),htmlTextData:N,image:x(U),label:W,labelText:G,lineEnding:B,link:x(K),listItem:x(),listOrdered:x(),listUnordered:x(),paragraph:x(),referenceString:Z,resourceDestinationString:q,resourceTitleString:Y,resource:J,setextHeading:x(F),setextHeadingLineSequence:D,setextHeadingText:A,strong:x(),thematicBreak:x()}},t.mdastExtensions||[]),l={};return c;function c(e){for(var t,n={type:"root",children:[]},i=[],a=[],l=-1,c={stack:[n],tokenStack:i,config:s,enter:y,exit:w,buffer:b,resume:_,setData:h,getData:g};++l<e.length;)("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)&&("enter"===e[l][0]?a.push(l):l=p(e,a.pop(l),l));for(l=-1;++l<e.length;)t=s[e[l][0]],o.call(t,e[l][1].type)&&t[e[l][1].type].call(r({sliceSerialize:e[l][2].sliceSerialize},c),e[l][1]);if(i.length)throw new Error("Cannot close document, a token (`"+i[i.length-1].type+"`, "+d({start:i[i.length-1].start,end:i[i.length-1].end})+") is still open");for(n.position={start:m(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:m(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<s.transforms.length;)n=s.transforms[l](n)||n;return n}function p(e,t,n){for(var r,o,i,a,s,l,c,u=t-1,d=-1,f=!1;++u<=n;)if("listUnordered"===(s=e[u])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,c=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(r&&!c&&!d&&!l&&(l=u),c=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(c=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(o=u,i=void 0;o--;)if("lineEnding"===(a=e[o])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;i&&(e[i][1].type="lineEndingBlank",f=!0),a[1].type="lineEnding",i=o}else if("linePrefix"!==a[1].type&&"blockQuotePrefix"!==a[1].type&&"blockQuotePrefixWhitespace"!==a[1].type&&"blockQuoteMarker"!==a[1].type&&"listItemIndent"!==a[1].type)break;l&&(!i||l<i)&&(r._spread=!0),r.end=m(i?e[i][1].start:s[1].end),e.splice(i||u,0,["exit",r,s[2]]),u++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:m(s[1].start)},e.splice(u,0,["enter",r,s[2]]),u++,n++,l=void 0,c=!0)}return e[t][1]._spread=f,n}function h(e,t){l[e]=t}function g(e){return l[e]}function m(e){return{line:e.line,column:e.column,offset:e.offset}}function v(e,t){return n;function n(n){y.call(this,e(n),n),t&&t.call(this,n)}}function b(){this.stack.push({type:"fragment",children:[]})}function y(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:m(t.start)},e}function x(e){return t;function t(t){e&&e.call(this,t),w.call(this,t)}}function w(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): it’s not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+d({start:n.start,end:n.end})+") is open");return t.position.end=m(e.end),t}function _(){return n(this.stack.pop())}function S(){h("expectingFirstListItemValue",!0)}function k(e){g("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),h("expectingFirstListItemValue"))}function E(){var e=this.resume();this.stack[this.stack.length-1].lang=e}function C(){var e=this.resume();this.stack[this.stack.length-1].meta=e}function j(){g("flowCodeInside")||(this.buffer(),h("flowCodeInside",!0))}function O(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h("flowCodeInside")}function T(){var e=this.resume();this.stack[this.stack.length-1].value=e}function I(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase()}function R(){var e=this.resume();this.stack[this.stack.length-1].title=e}function P(){var e=this.resume();this.stack[this.stack.length-1].url=e}function M(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)}function A(){h("setextHeadingSlurpLineEnding",!0)}function D(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function F(){h("setextHeadingSlurpLineEnding")}function L(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||"text"!==n.type)&&((n=ve()).position={start:m(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function N(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=m(e.end)}function B(e){var t=this.stack[this.stack.length-1];if(g("atHardBreak"))return t.children[t.children.length-1].position.end=m(e.end),void h("atHardBreak");!g("setextHeadingSlurpLineEnding")&&s.canContainEols.indexOf(t.type)>-1&&(L.call(this,e),N.call(this,e))}function z(){h("atHardBreak",!0)}function $(){var e=this.resume();this.stack[this.stack.length-1].value=e}function V(){var e=this.resume();this.stack[this.stack.length-1].value=e}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function K(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function U(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function G(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function W(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,h("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function q(){var e=this.resume();this.stack[this.stack.length-1].url=e}function Y(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){h("inReference")}function X(){h("referenceType","collapsed")}function Z(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),h("referenceType","full")}function Q(e){h("characterReferenceType",e.type)}function ee(e){var t,n,r=this.sliceSerialize(e),o=g("characterReferenceType");o?(t=a(r,"characterReferenceMarkerNumeric"===o?10:16),h("characterReferenceType")):t=u(r),(n=this.stack.pop()).value+=t,n.position.end=m(e.end)}function te(e){N.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function ne(e){N.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function re(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function ie(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function ue(){return{type:"html",value:""}}function de(){return{type:"image",title:null,url:"",alt:null}}function fe(){return{type:"link",title:null,url:"",children:[]}}function pe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function he(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ge(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}(p)(c(s(p).document().write(l()(e,t,!0))))};var n=Yq(),r=gq(),o=tq(),i=Jq(),a=Xq(),s=VY(),l=HY(),c=KY(),u=mY(),d=AW();function f(e,t){var n,r;for(n in t)r=o.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}})),GY=bW(((e,t)=>{t.exports=UY()})),WY=bW(((e,t)=>{t.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=GY()})),qY=bW(((e,t)=>{!function(){var e;function n(e){for(var t,n,r,o,i=1,a=[].slice.call(arguments),s=0,l=e.length,c="",u=!1,d=!1,f=function(){return a[i++]},p=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<l;++s)if(t=e[s],u)switch(u=!1,"."==t?(d=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(d=!0,s+=2,t=e[s]):d=!0,o=p(),t){case"b":c+=parseInt(f(),10).toString(2);break;case"c":c+="string"==typeof(n=f())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(f(),10);break;case"f":r=String(parseFloat(f()).toFixed(o||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(f());break;case"o":c+="0"+parseInt(f(),10).toString(8);break;case"s":c+=f();break;case"x":c+="0x"+parseInt(f(),10).toString(16);break;case"X":c+="0x"+parseInt(f(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(e=typeof t<"u"?t.exports=n:function(){return this||(0,eval)("this")}()).format=n,e.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},typeof console<"u"&&"function"==typeof console.log&&(e.printf=function(){console.log(n.apply(null,arguments))})}()})),YY=bW(((e,t)=>{var n=qY(),r=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=n.apply(null,arguments)),new e(t)}}t.exports=r,r.eval=o(EvalError),r.range=o(RangeError),r.reference=o(ReferenceError),r.syntax=o(SyntaxError),r.type=o(TypeError),r.uri=o(URIError),r.create=o})),JY=bW(((e,t)=>{t.exports=function(e){var t,n=e||"yaml",r=[],o=-1;for((("string"==typeof n||!("length"in n))&&(n=[n]),t=n.length);++o<t;)r[o]=i(n[o]);return r};var n=YY(),r={}.hasOwnProperty,o={yaml:"-",toml:"+"};function i(e){var t=e;if("string"==typeof t){if(!r.call(o,t))throw n("Missing matter definition for `%s`",t);t={type:t,marker:o[t]}}else if("object"!=typeof t)throw n("Expected matter to be an object, not `%j`",t);if(!r.call(t,"type"))throw n("Missing `type` in matter `%j`",t);if(!r.call(t,"fence")&&!r.call(t,"marker"))throw n("Missing `marker` or `fence` in matter `%j`",t);return t}})),XY=bW(((e,t)=>{t.exports=function(e){for(var t,i,a=n(e),s=a.length,l=-1,c={};++l<s;)t=a[l],(i=o(t,"open").charCodeAt(0))in c?c[i].push(r(t)):c[i]=[r(t)];return{flow:c}};var n=JY();function r(e){var t,n=e.type,r=e.anywhere,i=n+"Value",a=n+"Fence",s=a+"Sequence",l={tokenize:function(e,n,r){var o=0;return function(n){return n===t.charCodeAt(o)?(e.enter(a),e.enter(s),i(n)):r(n)};function i(n){return o===t.length?(e.exit(s),-2===n||-1===n||32===n?(e.enter("whitespace"),l(n)):c(n)):n===t.charCodeAt(o)?(e.consume(n),o++,i):r(n)}function l(t){return-2===t||-1===t||32===t?(e.consume(t),l):(e.exit("whitespace"),c(t))}function c(t){return-5===t||-4===t||-3===t||null===t?(e.exit(a),n(t)):r(t)}},partial:!0};return{tokenize:function(a,s,c){var u=this;return function(i){var s=u.now();return 1!==s.column||!r&&1!==s.line?c(i):(a.enter(n),t=o(e,"open"),a.attempt(l,d,c)(i))};function d(n){return t=o(e,"close"),h(n)}function f(e){return-5===e||-4===e||-3===e||null===e?h(e):(a.enter(i),p(e))}function p(e){return-5===e||-4===e||-3===e||null===e?(a.exit(i),h(e)):(a.consume(e),p)}function h(e){return null===e?c(e):(a.enter("lineEnding"),a.consume(e),a.exit("lineEnding"),a.attempt(l,g,f))}function g(e){return a.exit(n),s(e)}},concrete:!0}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),ZY=bW(((e,t)=>{t.exports=XY()})),QY=bW(((e,t)=>{t.exports=function(e){for(var t,a=n(e),s=a.length,l=-1,c={},u={};++l<s;)t=a[l],c[t.type]=r(t),u[t.type]=o,u[t.type+"Value"]=i;return{enter:c,exit:u}};var n=JY();function r(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function o(e){var t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function i(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}})),eJ=bW(((e,t)=>{t.exports=function(e){for(var t,i=[],a={},s=n(e),l=s.length,c=-1;++c<l;)t=s[c],a[t.type]=r(t),i.push({atBreak:!0,character:o(t,"open").charAt(0)});return{unsafe:i,handlers:a}};var n=JY();function r(e){var t=o(e,"open"),n=o(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+n}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),tJ=bW(((e,t)=>{var n=ZY(),r=QY(),o=eJ();t.exports=function(e){var t=this.data();function i(e,n){t[e]?t[e].push(n):t[e]=[n]}i("micromarkExtensions",n(e)),i("fromMarkdownExtensions",r(e)),i("toMarkdownExtensions",o(e))}})),nJ=bW(((e,t)=>{t.exports=function(e){var t=e||{},n={tokenize:f},r={tokenize:p,resolveAll:u},o={add:"after",tokenize:h,resolveAll:u,resolveTo:d},i={tokenize:g,continuation:{tokenize:m},exit:v},a={91:n};return t.inlineNotes&&(a[93]=o,a[94]=r),{_hiddenFootnoteSupport:{},document:{91:i},text:a}};var n=Jq(),r=Qq(),o=yq(),i=rq(),a=Sq(),s=mq(),l=hq(),c={tokenize:function(e,t,n){var r=this;return o(e,(function(e){return 4===a(r.events,"footnoteDefinitionIndent")?t(e):n(e)}),"footnoteDefinitionIndent",5)},partial:!0};function u(e){for(var t,n=e.length,r=-1;++r<n;)t=e[r][1],"enter"===e[r][0]&&"inlineNoteStart"===t.type&&(t.type="data",e.splice(r+1,4),n-=4);return e}function d(e,t){for(var n,r,o,a,c,u=e.length-4;u--;)if(o=e[u][1],"enter"===e[u][0]&&"inlineNoteStart"===o.type){c=u,a="inlineNote";break}n={type:a,start:s(e[c][1].start),end:s(e[e.length-1][1].end)},r={type:"inlineNoteText",start:s(e[c+4][1].end),end:s(e[e.length-3][1].start)};var d=[["enter",n,t],e[c+1],e[c+2],e[c+3],e[c+4],["enter",r,t]];return i(d,d.length,0,l(t.parser.constructs.insideSpan.null,e.slice(c+6,-4),t)),d.push(["exit",r,t],e[e.length-2],e[e.length-3],["exit",n,t]),i(e,u,e.length-u,d),e}function f(e,t,r){var o,i=this,a=i.parser.footnotes||(i.parser.footnotes=[]),s=0;return function(t){return 91!==t?r(t):(e.enter("footnoteCall"),e.enter("footnoteCallLabelMarker"),e.consume(t),e.exit("footnoteCallLabelMarker"),l)};function l(t){return 94!==t?r(t):(e.enter("footnoteCallMarker"),e.consume(t),e.exit("footnoteCallMarker"),e.enter("footnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(l){var d;return null===l||91===l||s++>999?r(l):93===l?o?(e.exit("chunkString"),d=e.exit("footnoteCallString"),a.indexOf(n(i.sliceSerialize(d)))<0?r(l):function(n){return e.enter("footnoteCallLabelMarker"),e.consume(n),e.exit("footnoteCallLabelMarker"),e.exit("footnoteCall"),t}(l)):r(l):(e.consume(l),l<0||32===l||(o=!0),92===l?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function p(e,t,n){return function(t){return 94!==t?n(t):(e.enter("inlineNoteStart"),e.enter("inlineNoteMarker"),e.consume(t),e.exit("inlineNoteMarker"),r)};function r(r){return 91!==r?n(r):(e.enter("inlineNoteStartMarker"),e.consume(r),e.exit("inlineNoteStartMarker"),e.exit("inlineNoteStart"),t)}}function h(e,t,n){var r=this;return function(o){for(var i,a=r.events.length;a--;)if("inlineNoteStart"===r.events[a][1].type){i=!0;break}return 93===o&&i?(e.enter("inlineNoteEnd"),e.enter("inlineNoteEndMarker"),e.consume(o),e.exit("inlineNoteEndMarker"),e.exit("inlineNoteEnd"),t):n(o)}}function g(e,t,o){var i,a,s=this,l=s.parser.footnotes||(s.parser.footnotes=[]),c=0;return function(t){return 91!==t?o(t):(e.enter("footnoteDefinition")._container=!0,e.enter("footnoteDefinitionLabel"),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),u)};function u(t){return 94!==t?o(t):(e.enter("footnoteDefinitionMarker"),e.consume(t),e.exit("footnoteDefinitionMarker"),e.enter("footnoteDefinitionLabelString"),d)}function d(t){var r;return null===t||91===t||c>999?o(t):93===t?a?(r=e.exit("footnoteDefinitionLabelString"),i=n(s.sliceSerialize(r)),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),e.exit("footnoteDefinitionLabel"),h):o(t):-5===t||-4===t||-3===t?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c++,d):(e.enter("chunkString").contentType="string",f(t))}function f(t){return null===t||-5===t||-4===t||-3===t||91===t||93===t||c>999?(e.exit("chunkString"),d(t)):(t<0||32===t||(a=!0),c++,e.consume(t),92===t?p:f)}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,f):f(t)}function h(t){return 58!==t?o(t):(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),e.check(r,g,m))}function g(e){return s.containerState.initialBlankLine=!0,v(e)}function m(t){return(-2===t||-1===t||32===t)&&(e.enter("footnoteDefinitionWhitespace"),e.consume(t),e.exit("footnoteDefinitionWhitespace")),v(t)}function v(e){return l.indexOf(i)<0&&l.push(i),t(e)}}function m(e,t,n){var o=this;return e.check(r,(function(e){return o.containerState.initialBlankLine&&(o.containerState.furtherBlankLines=!0),t(e)}),(function(r){return o.containerState.furtherBlankLines||-2!==r&&-1!==r&&32!==r?n(r):(o.containerState.initialBlankLine=void 0,o.containerState.furtherBlankLines=void 0,e.attempt(c,t,n)(r))}))}function v(e){e.exit("footnoteDefinition")}})),rJ=bW((e=>{var t=Jq();e.canContainEols=["footnote"],e.enter={footnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},footnoteDefinitionLabelString:function(){this.buffer()},footnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},footnoteCallString:function(){this.buffer()},inlineNote:function(e){this.enter({type:"footnote",children:[]},e)}},e.exit={footnoteDefinition:function(e){this.exit(e)},footnoteDefinitionLabelString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},footnoteCall:function(e){this.exit(e)},footnoteCallString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},inlineNote:function(e){this.exit(e)}}})),oJ=bW(((e,t)=>{t.exports=function(e){return e.label||!e.identifier?e.label||"":e.identifier.replace(r,"$1").replace(o,i)};var n=mY(),r=/\\([!-/:-@[-`{-~])/g,o=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}})),iJ=bW(((e,t)=>{function n(e,t,n){var r;if(!t)return n;for("string"==typeof t&&(t=[t]),r=-1;++r<t.length;)if(-1!==e.indexOf(t[r]))return!0;return!1}t.exports=function(e,t){return n(e,t.inConstruct,!0)&&!n(e,t.notInConstruct)}})),aJ=bW(((e,t)=>{t.exports=function(e,t,a){for(var s,l,c,u,d,f,p,h,g=(a.before||"")+(t||"")+(a.after||""),m=[],v=[],b={},y=-1;++y<e.unsafe.length;)if(u=e.unsafe[y],r(e.stack,u))for(d=n(u);f=d.exec(g);)s="before"in u||u.atBreak,l="after"in u,c=f.index+(s?f[1].length:0),-1===m.indexOf(c)?(m.push(c),b[c]={before:s,after:l}):(b[c].before&&!s&&(b[c].before=!1),b[c].after&&!l&&(b[c].after=!1));for(m.sort(o),p=a.before?a.before.length:0,h=g.length-(a.after?a.after.length:0),y=-1;++y<m.length;)!((c=m[y])<p||c>=h)&&(c+1<h&&m[y+1]===c+1&&b[c].after&&!b[c+1].before&&!b[c+1].after||(p!==c&&v.push(i(g.slice(p,c),"\\")),p=c,!/[!-/:-@[-`{-~]/.test(g.charAt(c))||a.encode&&-1!==a.encode.indexOf(g.charAt(c))?(v.push("&#x"+g.charCodeAt(c).toString(16).toUpperCase()+";"),p++):v.push("\\")));return v.push(i(g.slice(p,h),a.after)),v.join("")};var n=Dq(),r=iJ();function o(e,t){return e-t}function i(e,t){for(var n,r=/\\(?=[!-/:-@[-`{-~])/g,o=[],i=[],a=-1,s=0,l=e+t;n=r.exec(l);)o.push(n.index);for(;++a<o.length;)s!==o[a]&&i.push(e.slice(s,o[a])),i.push("\\"),s=o[a];return i.push(e.slice(s)),i.join("")}})),sJ=bW((e=>{e.unsafe=[{character:"[",inConstruct:["phrasing","label","reference"]}],e.handlers={footnote:s,footnoteDefinition:function(e,n,a){var s,l=a.enter("footnoteDefinition"),c=a.enter("label"),u="[^"+i(a,t(e),{before:"^",after:"]"})+"]:";return c(),s=o(r(e,a),(function(e,t,n){return t?(n?"":" ")+e:(n?u:u+" ")+e})),l(),s},footnoteReference:a};var t=oJ(),n=Mq(),r=Vq(),o=Hq(),i=aJ();function a(e,n,r){var o=r.enter("footnoteReference"),a=r.enter("reference"),s=i(r,t(e),{before:"^",after:"]"});return a(),o(),"[^"+s+"]"}function s(e,t,r){var o=r.enter("footnote"),i=r.enter("label"),a="^["+n(e,r,{before:"[",after:"]"})+"]";return i(),o(),a}a.peek=function(){return"["},s.peek=function(){return"^"}})),lJ=bW(((e,t)=>{var n,r=nJ(),o=rJ(),i=sJ();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-footnotes] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i)}})),cJ=bW((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkdown=void 0;var n=t(VW());t(eq()).default.transforms=[];var r=t(qq()),o=t(WY()),i=t(tJ()),a=t(lJ()),s=n.default().use(o.default).use(i.default,["yaml"]).use(r.default).use(a.default,{inlineNotes:!0});e.parseMarkdown=e=>s.parse(e)})),uJ=bW((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.Syntax=void 0;var n=SW(),r=_W();Object.defineProperty(e,"Syntax",{enumerable:!0,get:function(){return r.ASTNodeTypes}});var o=t(kW()),i=t(jW()),a=cJ(),s=i.default("@textlint/markdown-to-ast");e.parse=function(e){let t=65279===e.charCodeAt(0)?e.slice(1):e,r=a.parseMarkdown(t);return o.default(r).forEach((function(e){if(this.notLeaf){if(e.type){let t=n.SyntaxMap[e.type];t?e.type=t:s(`replacedType : ${t} , node.type: ${e.type}`)}if(e.position){let n=e.position,r={start:{line:n.start.line,column:Math.max(n.start.column-1,0)},end:{line:n.end.line,column:Math.max(n.end.column-1,0)}},o=[n.start.offset,n.end.offset];e.loc=r,e.range=o,e.raw=t.slice(o[0],o[1]),Object.defineProperty(e,"position",{enumerable:!1,configurable:!1,writable:!1,value:n})}}})),r}})),dJ=bW(((e,t)=>{var n=uJ().parse,r={Strong:{type:"BOLD",symbol:"__"},Emphasis:{type:"ITALIC",symbol:"*"}},o={List:"unordered-list-item",Header1:"header-one",Header2:"header-two",Header3:"header-three",Header4:"header-four",Header5:"header-five",Header6:"header-six",CodeBlock:"code-block",BlockQuote:"blockquote"},i=e=>{let t=e.indexOf("```"),n=e.indexOf("```",t+1);if(t>=0&&n>=0){let r=e.slice(t,n+1).join("\n"),o=[...e.slice(0,t),r,...e.slice(n+1)];return i(o)}return e},a=(e,t,i={})=>{let a=vW(vW({},r),i.inlineStyles),s=vW(vW({},o),i.blockStyles),l=n(e),c="",u=[],d=[],f=t,p=(e,t,n)=>{u.push({offset:e,length:t,style:n})},h=e=>e.reduce(((e,t)=>t.value?e+t.value.length:t.children&&t.children.length?e+h(t.children):e),0),g=(e,t)=>{let n=/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/;switch(e.type){case"Link":(e=>{let t=Object.keys(f).length;f[t]={type:"LINK",mutability:"MUTABLE",data:{url:e.url}},d.push({key:t,length:h(e.children),offset:c.length})})(e);break;case"Image":(e=>{let t=Object.keys(f).length;f[t]={type:"IMAGE",mutability:"IMMUTABLE",data:{url:e.url,src:e.url,fileName:e.alt||""}},d.push({key:t,length:1,offset:c.length})})(e);break;case"Paragraph":n.test(e.raw)&&(e=>{let t=e.raw.match(/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/)[1],n=Object.keys(f).length;f[n]={type:"draft-js-video-plugin-video",mutability:"IMMUTABLE",data:{src:t}},d.push({key:n,length:1,offset:c.length})})(e)}if(!n.test(e.raw)&&e.children&&t){let n=h(e.children);p(c.length,n,t.type);let r=a[e.type];e.children.forEach((e=>{g(e,r)}))}else if(!n.test(e.raw)&&e.children){let t=a[e.type];e.children.forEach((e=>{g(e,t)}))}else t&&p(c.length,e.value.length,t.type),a[e.type]&&p(c.length,e.value.length,a[e.type].type),c=`${c}${"Image"===e.type||n.test(e.raw)?" ":e.value}`};l.children.forEach((e=>{let t=a[e.type];g(e,t)}));let m="unstyled";if(l.children[0]){let e=((e,t)=>{let n=e.type,r=e.ordered,o=e.depth;return"List"===n&&r?"ordered-list-item":"Header"===n?t[`${n}${o}`]:"Paragraph"===e.type&&e.children&&e.children[0]&&"Image"===e.children[0].type||"Paragraph"===e.type&&e.raw&&e.raw.match(/^\[\[\s\S+\s.*\S+\s\]\]/)?"atomic":t[n]})(l.children[0],s);e&&(m=e)}return{text:c,inlineStyleRanges:u,entityRanges:d,blockStyle:m,entityMap:f}};t.exports=function(e,t){let n=(e=>{let t=e.split("\n");return i(t)})(e),r=[],o={};return n.forEach((e=>{let n=a(e,o,t);r.push({text:n.text,type:n.blockStyle,depth:0,inlineStyleRanges:n.inlineStyleRanges,entityRanges:n.entityRanges}),o=n.entityMap})),0===Object.keys(o).length&&(o={data:"",mutability:"",type:""}),{blocks:r,entityMap:o}}})),fJ=xW(wW()),pJ=xW(dJ());fJ.default,pJ.default;function hJ(e,t){return"function"==typeof e?e(t):e}function gJ(e,t){return n=>{t.setState((t=>({...t,[e]:hJ(n,t[e])})))}}function mJ(e){return e instanceof Function}function vJ(e,t,n){let r,o=[];return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(s.length===o.length&&!s.some(((e,t)=>o[t]!==e)))return r;let l;if(o=s,n.key&&n.debug&&(l=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function bJ(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const yJ="debugHeaders";function xJ(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const wJ={createTable:e=>{e.getHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,a;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],l=null!=(a=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],c=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))));return _J(t,[...s,...c,...l],e)}),bJ(e.options,yJ)),e.getCenterHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>(n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),_J(t,n,e,"center"))),bJ(e.options,yJ)),e.getLeftHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return _J(t,i,e,"left")}),bJ(e.options,yJ)),e.getRightHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return _J(t,i,e,"right")}),bJ(e.options,yJ)),e.getFooterGroups=vJ((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getLeftFooterGroups=vJ((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getCenterFooterGroups=vJ((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getRightFooterGroups=vJ((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getFlatHeaders=vJ((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getLeftFlatHeaders=vJ((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getCenterFlatHeaders=vJ((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getRightFlatHeaders=vJ((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getCenterLeafHeaders=vJ((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getLeftLeafHeaders=vJ((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getRightLeafHeaders=vJ((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getLeafHeaders=vJ((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,a,s,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),bJ(e.options,yJ))}};function _J(e,t,n,r){var o,i;let a=0;const s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)}),0)};s(e);let l=[];const c=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let s,l=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,l=!0),a&&(null==a?void 0:a.column)===s)a.subHeaders.push(e);else{const o=xJ(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(i,t-1)},u=t.map(((e,t)=>xJ(n,e,{depth:a,index:t})));c(u,a-1),l.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}const SJ=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>function(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}(s.subRows,(e=>e.subRows)),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:vJ((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:vJ((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),bJ(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),bJ(e.options,"debugRows")),_getAllCellsByColumnId:vJ((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),bJ(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},kJ={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},EJ=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(i))};EJ.autoRemove=e=>DJ(e);const CJ=(e,t,n)=>{var r;return!(null==(r=e.getValue(t))||null==(r=r.toString())||!r.includes(n))};CJ.autoRemove=e=>DJ(e);const jJ=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};jJ.autoRemove=e=>DJ(e);const OJ=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};OJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const TJ=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));TJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const IJ=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));IJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const RJ=(e,t,n)=>e.getValue(t)===n;RJ.autoRemove=e=>DJ(e);const PJ=(e,t,n)=>e.getValue(t)==n;PJ.autoRemove=e=>DJ(e);const MJ=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};MJ.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},MJ.autoRemove=e=>DJ(e)||DJ(e[0])&&DJ(e[1]);const AJ={includesString:EJ,includesStringSensitive:CJ,equalsString:jJ,arrIncludes:OJ,arrIncludesAll:TJ,arrIncludesSome:IJ,equals:RJ,weakEquals:PJ,inNumberRange:MJ};function DJ(e){return null==e||""===e}const FJ={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:gJ("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?AJ.includesString:"number"==typeof r?AJ.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?AJ.equals:Array.isArray(r)?AJ.arrIncludes:AJ.weakEquals},e.getFilterFn=()=>{var n,r;return mJ(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:AJ[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=hJ(n,o?o.value:void 0);var a;if(LJ(r,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const s={id:e.id,value:i};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?l:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=hJ(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(LJ(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function LJ(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const NJ={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))})),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const r=Math.floor(n.length/2),o=n.sort(((e,t)=>e-t));return n.length%2!=0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},BJ={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:gJ("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?NJ.sum:"[object Date]"===Object.prototype.toString.call(r)?NJ.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return mJ(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:NJ[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const zJ={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:gJ("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=vJ((e=>[WJ(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),bJ(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=WJ(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=WJ(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=vJ((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),bJ(e.options,"debugTable"))}},$J={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:gJ("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,a,s,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...t??[],...n??[]];return e.filter((e=>!r.includes(e.column.id)))}),bJ(t.options,"debugRows")),e.getLeftVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),bJ(t.options,"debugRows")),e.getRightVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),bJ(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?!(null==(n=r[t])||!n.length):!!(null!=(o=r.left)&&o.length||null!=(i=r.right)&&i.length)},e.getLeftLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),bJ(e.options,"debugColumns")),e.getRightLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),bJ(e.options,"debugColumns")),e.getCenterLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...t??[],...n??[]];return e.filter((e=>!r.includes(e.id)))}),bJ(e.options,"debugColumns"))}},VJ={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},HJ={getDefaultColumnDef:()=>VJ,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:gJ("columnSizing",e),onColumnSizingInfoChange:gJ("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:VJ.minSize,null!=(r=i??e.columnDef.size)?r:VJ.size),null!=(o=e.columnDef.maxSize)?o:VJ.maxSize)},e.getStart=vJ((e=>[e,WJ(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),bJ(t.options,"debugColumns")),e.getAfter=vJ((e=>[e,WJ(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),bJ(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o||(null==i.persist||i.persist(),UJ(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=UJ(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*s,0))/100})),{...e,deltaOffset:a,deltaPercentage:s}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...c}))))},d=e=>u("move",e),f=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||typeof document<"u"?document:null,h={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",h.moveHandler),null==p||p.removeEventListener("mouseup",h.upHandler),f(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",g.moveHandler),null==p||p.removeEventListener("touchend",g.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof KJ)return KJ;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return KJ=e,KJ}()&&{passive:!1};UJ(i)?(null==p||p.addEventListener("touchmove",g.moveHandler,m),null==p||p.addEventListener("touchend",g.upHandler,m)):(null==p||p.addEventListener("mousemove",h.moveHandler,m),null==p||p.addEventListener("mouseup",h.upHandler,m)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let KJ=null;function UJ(e){return"touchstart"===e.type}const GJ={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:gJ("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=vJ((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),bJ(t.options,"debugRows")),e.getVisibleCells=vJ((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),bJ(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>vJ((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),bJ(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function WJ(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const qJ={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:gJ("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>AJ.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return mJ(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:AJ[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},YJ={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:gJ("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const i=!0===r||!(null==r||!r[e.id]);let a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||null!=r&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},JJ={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:gJ("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>hJ(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=hJ(t,n.pageIndex);const o=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,hJ(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=hJ(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=vJ((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),bJ(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},XJ={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:gJ("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,a,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=r??o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?!(null==(n=r[t])||!n.length):!!(null!=(o=r.top)&&o.length||null!=(i=r.bottom)&&i.length)},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(n??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(n??[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),bJ(e.options,"debugRows")),e.getBottomRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),bJ(e.options,"debugRows")),e.getCenterRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...t??[],...n??[]]);return e.filter((e=>!r.has(e.id)))}),bJ(e.options,"debugRows"))}},ZJ={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:gJ("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{QJ(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getFilteredSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getGroupedSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!(!t.length||!Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return QJ(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return tX(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===nX(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===nX(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},QJ=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach((t=>QJ(e,t.id,n,r,o)))};function eX(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const a=tX(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function tX(e,t){var n;return null!=(n=t[e.id])&&n}function nX(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(tX(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=nX(e,t);"all"===n?i=!0:("some"===n&&(i=!0),o=!1)}})),o?"all":!!i&&"some"}const rX=/([0-9]+)/gm;function oX(e,t){return e===t?0:e>t?1:-1}function iX(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function aX(e,t){const n=e.split(rX).filter(Boolean),r=t.split(rX).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const sX={alphanumeric:(e,t,n)=>aX(iX(e.getValue(n)).toLowerCase(),iX(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>aX(iX(e.getValue(n)),iX(t.getValue(n))),text:(e,t,n)=>oX(iX(e.getValue(n)).toLowerCase(),iX(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>oX(iX(e.getValue(n)),iX(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>oX(e.getValue(n),t.getValue(n))},lX={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:gJ("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return sX.datetime;if("string"==typeof n&&(r=!0,n.split(rX).length>1))return sX.alphanumeric}return r?sX.text:sX.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return mJ(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:sX[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((a=>{const s=null==a?void 0:a.find((t=>t.id===e.id)),l=null==a?void 0:a.findIndex((t=>t.id===e.id));let c,u=[],d=i?n:"desc"===o;var f;(c=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&l!==a.length-1?"replace":s?"toggle":"replace","toggle"===c&&(i||o||(c="remove")),"add"===c)?(u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):u="toggle"===c?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===c?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return u}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},cX=[wJ,GJ,zJ,$J,kJ,FJ,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},qJ,lX,BJ,YJ,JJ,XJ,ZJ,HJ];function uX(e){var t,n;const r=[...cX,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let a={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a}));const s=[];let l=!1;const c={_features:r,options:{...i,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=hJ(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:vJ((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),bJ(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:vJ((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},s=a.accessorKey;let l,c=null!=(o=null!=(i=a.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?l=a.accessorFn:s&&(l=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[a.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:l,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:vJ((()=>[!0]),(()=>{var e;return[u,...null==(e=u.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),bJ(e.options,"debugColumns")),getLeafColumns:vJ((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=u.columns)&&t.length){let t=u.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[u]}),bJ(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(u,e);return u}(o,e,r,n),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),bJ(e,"debugColumns")),getAllFlatColumns:vJ((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),bJ(e,"debugColumns")),_getAllFlatColumnsById:vJ((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),bJ(e,"debugColumns")),getAllLeafColumns:vJ((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>{let n=e.flatMap((e=>e.getLeafColumns()));return t(n)}),bJ(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,c);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function dX(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function fX(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var r;const o=[],i={},a=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const l=[];for(let u=0;u<e.length;u++){var c;let d=e[u];const f=SJ(n,d.id,d.original,d.index,d.depth,0,d.parentId);if(f.columnFilters=d.columnFilters,null!=(c=d.subRows)&&c.length&&r<a){if(f.subRows=s(d.subRows,r+1),d=f,t(d)&&!f.subRows.length){l.push(d),i[d.id]=d,o.push(d);continue}if(t(d)||f.subRows.length){l.push(d),i[d.id]=d,o.push(d);continue}}else d=f,t(d)&&(l.push(d),i[d.id]=d,o.push(d))}return l};return{rows:s(e),flatRows:o,rowsById:i}}(e,t,n):function(e,t,n){var r;const o=[],i={},a=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const l=[];for(let u=0;u<e.length;u++){let d=e[u];if(t(d)){var c;if(null!=(c=d.subRows)&&c.length&&r<a){const e=SJ(n,d.id,d.original,d.index,d.depth,0,d.parentId);e.subRows=s(d.subRows,r+1),d=e}l.push(d),o.push(d),i[d.id]=d}}return l};return{rows:s(e),flatRows:o,rowsById:i}}(e,t,n)}function pX(e,t){return e?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(e)?s.createElement(e,t):e:null}var hX=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===gX}(e)}(e)};var gX="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function mX(e,t){return!1!==t.clone&&t.isMergeableObject(e)?bX(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function vX(e,t,n){return e.concat(t).map((function(e){return mX(e,n)}))}function bX(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||vX,n.isMergeableObject=n.isMergeableObject||hX;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=mX(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=bX(e[o],t[o],n):r[o]=mX(t[o],n)})),r}(e,t,n):mX(t,n)}bX.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return bX(e,n,t)}),{})};var yX=bX;function xX(e,t){return function(n){return e(t(n))}}var wX=xX(Object.getPrototypeOf,Object),_X=Function.prototype,SX=Object.prototype,kX=_X.toString,EX=SX.hasOwnProperty,CX=kX.call(Object);function jX(e){if(!Uc(e)||"[object Object]"!=Kc(e))return!1;var t=wX(e);if(null===t)return!0;var n=EX.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&kX.call(n)==CX}function OX(e,t){return e===t||e!=e&&t!=t}function TX(e,t){for(var n=e.length;n--;)if(OX(e[n][0],t))return n;return-1}var IX=Array.prototype.splice;function RX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RX.prototype.clear=function(){this.__data__=[],this.size=0},RX.prototype.delete=function(e){var t=this.__data__,n=TX(t,e);return!(n<0)&&(n==t.length-1?t.pop():IX.call(t,n,1),--this.size,!0)},RX.prototype.get=function(e){var t=this.__data__,n=TX(t,e);return n<0?void 0:t[n][1]},RX.prototype.has=function(e){return TX(this.__data__,e)>-1},RX.prototype.set=function(e,t){var n=this.__data__,r=TX(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function PX(e){if(!Tc(e))return!1;var t=Kc(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var MX=Pc["__core-js_shared__"],AX=function(){var e=/[^.]+$/.exec(MX&&MX.keys&&MX.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var DX=Function.prototype.toString;function FX(e){if(null!=e){try{return DX.call(e)}catch{}try{return e+""}catch{}}return""}var LX=/^\[object .+?Constructor\]$/,NX=Function.prototype,BX=Object.prototype,zX=NX.toString,$X=BX.hasOwnProperty,VX=RegExp("^"+zX.call($X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HX(e){return!(!Tc(e)||function(e){return!!AX&&AX in e}(e))&&(PX(e)?VX:LX).test(FX(e))}function KX(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return HX(n)?n:void 0}var UX=KX(Pc,"Map"),GX=KX(Object,"create");var WX=Object.prototype.hasOwnProperty;var qX=Object.prototype.hasOwnProperty;function YX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function JX(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function XX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YX.prototype.clear=function(){this.__data__=GX?GX(null):{},this.size=0},YX.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},YX.prototype.get=function(e){var t=this.__data__;if(GX){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return WX.call(t,e)?t[e]:void 0},YX.prototype.has=function(e){var t=this.__data__;return GX?void 0!==t[e]:qX.call(t,e)},YX.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=GX&&void 0===t?"__lodash_hash_undefined__":t,this},XX.prototype.clear=function(){this.size=0,this.__data__={hash:new YX,map:new(UX||RX),string:new YX}},XX.prototype.delete=function(e){var t=JX(this,e).delete(e);return this.size-=t?1:0,t},XX.prototype.get=function(e){return JX(this,e).get(e)},XX.prototype.has=function(e){return JX(this,e).has(e)},XX.prototype.set=function(e,t){var n=JX(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ZX(e){var t=this.__data__=new RX(e);this.size=t.size}ZX.prototype.clear=function(){this.__data__=new RX,this.size=0},ZX.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ZX.prototype.get=function(e){return this.__data__.get(e)},ZX.prototype.has=function(e){return this.__data__.has(e)},ZX.prototype.set=function(e,t){var n=this.__data__;if(n instanceof RX){var r=n.__data__;if(!UX||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new XX(r)}return n.set(e,t),this.size=n.size,this};var QX=function(){try{var e=KX(Object,"defineProperty");return e({},"",{}),e}catch{}}();function eZ(e,t,n){"__proto__"==t&&QX?QX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tZ=Object.prototype.hasOwnProperty;function nZ(e,t,n){var r=e[t];(!tZ.call(e,t)||!OX(r,n)||void 0===n&&!(t in e))&&eZ(e,t,n)}function rZ(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=void 0;void 0===l&&(l=e[s]),o?eZ(n,s,l):nZ(n,s,l)}return n}function oZ(e){return Uc(e)&&"[object Arguments]"==Kc(e)}var iZ=Object.prototype,aZ=iZ.hasOwnProperty,sZ=iZ.propertyIsEnumerable,lZ=oZ(function(){return arguments}())?oZ:function(e){return Uc(e)&&aZ.call(e,"callee")&&!sZ.call(e,"callee")},cZ=Array.isArray;var uZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,dZ=uZ&&"object"==typeof module&&module&&!module.nodeType&&module,fZ=dZ&&dZ.exports===uZ?Pc.Buffer:void 0,pZ=(fZ?fZ.isBuffer:void 0)||function(){return!1},hZ=/^(?:0|[1-9]\d*)$/;function gZ(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&hZ.test(e))&&e>-1&&e%1==0&&e<t}function mZ(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var vZ={};function bZ(e){return function(t){return e(t)}}vZ["[object Float32Array]"]=vZ["[object Float64Array]"]=vZ["[object Int8Array]"]=vZ["[object Int16Array]"]=vZ["[object Int32Array]"]=vZ["[object Uint8Array]"]=vZ["[object Uint8ClampedArray]"]=vZ["[object Uint16Array]"]=vZ["[object Uint32Array]"]=!0,vZ["[object Arguments]"]=vZ["[object Array]"]=vZ["[object ArrayBuffer]"]=vZ["[object Boolean]"]=vZ["[object DataView]"]=vZ["[object Date]"]=vZ["[object Error]"]=vZ["[object Function]"]=vZ["[object Map]"]=vZ["[object Number]"]=vZ["[object Object]"]=vZ["[object RegExp]"]=vZ["[object Set]"]=vZ["[object String]"]=vZ["[object WeakMap]"]=!1;var yZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,xZ=yZ&&"object"==typeof module&&module&&!module.nodeType&&module,wZ=xZ&&xZ.exports===yZ&&Ic.process,_Z=function(){try{return xZ&&xZ.require&&xZ.require("util").types||wZ&&wZ.binding&&wZ.binding("util")}catch{}}(),SZ=_Z&&_Z.isTypedArray,kZ=SZ?bZ(SZ):function(e){return Uc(e)&&mZ(e.length)&&!!vZ[Kc(e)]},EZ=Object.prototype.hasOwnProperty;function CZ(e,t){var n=cZ(e),r=!n&&lZ(e),o=!n&&!r&&pZ(e),i=!n&&!r&&!o&&kZ(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||EZ.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gZ(c,l)))&&s.push(c);return s}var jZ=Object.prototype;function OZ(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||jZ)}var TZ=xX(Object.keys,Object),IZ=Object.prototype.hasOwnProperty;function RZ(e){return null!=e&&mZ(e.length)&&!PX(e)}function PZ(e){return RZ(e)?CZ(e):function(e){if(!OZ(e))return TZ(e);var t=[];for(var n in Object(e))IZ.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var MZ=Object.prototype.hasOwnProperty;function AZ(e){if(!Tc(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=OZ(e),n=[];for(var r in e)"constructor"==r&&(t||!MZ.call(e,r))||n.push(r);return n}function DZ(e){return RZ(e)?CZ(e,!0):AZ(e)}var FZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,LZ=FZ&&"object"==typeof module&&module&&!module.nodeType&&module,NZ=LZ&&LZ.exports===FZ?Pc.Buffer:void 0,BZ=NZ?NZ.allocUnsafe:void 0;function zZ(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $Z(){return[]}var VZ=Object.prototype.propertyIsEnumerable,HZ=Object.getOwnPropertySymbols,KZ=HZ?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(HZ(e),(function(t){return VZ.call(e,t)})))}:$Z;function UZ(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var GZ=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)UZ(t,KZ(e)),e=wX(e);return t}:$Z;function WZ(e,t,n){var r=t(e);return cZ(e)?r:UZ(r,n(e))}function qZ(e){return WZ(e,PZ,KZ)}function YZ(e){return WZ(e,DZ,GZ)}var JZ=KX(Pc,"DataView"),XZ=KX(Pc,"Promise"),ZZ=KX(Pc,"Set"),QZ=KX(Pc,"WeakMap"),eQ="[object Map]",tQ="[object Promise]",nQ="[object Set]",rQ="[object WeakMap]",oQ="[object DataView]",iQ=FX(JZ),aQ=FX(UX),sQ=FX(XZ),lQ=FX(ZZ),cQ=FX(QZ),uQ=Kc;(JZ&&uQ(new JZ(new ArrayBuffer(1)))!=oQ||UX&&uQ(new UX)!=eQ||XZ&&uQ(XZ.resolve())!=tQ||ZZ&&uQ(new ZZ)!=nQ||QZ&&uQ(new QZ)!=rQ)&&(uQ=function(e){var t=Kc(e),n="[object Object]"==t?e.constructor:void 0,r=n?FX(n):"";if(r)switch(r){case iQ:return oQ;case aQ:return eQ;case sQ:return tQ;case lQ:return nQ;case cQ:return rQ}return t});var dQ=Object.prototype.hasOwnProperty;var fQ=Pc.Uint8Array;function pQ(e){var t=new e.constructor(e.byteLength);return new fQ(t).set(new fQ(e)),t}var hQ=/\w*$/;var gQ=Lc?Lc.prototype:void 0,mQ=gQ?gQ.valueOf:void 0;function vQ(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return pQ(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return function(e,t){var n=t?pQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?pQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,hQ.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return function(e){return mQ?Object(mQ.call(e)):{}}(e)}}var bQ=Object.create,yQ=function(){function e(){}return function(t){if(!Tc(t))return{};if(bQ)return bQ(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var xQ=_Z&&_Z.isMap,wQ=xQ?bZ(xQ):function(e){return Uc(e)&&"[object Map]"==uQ(e)};var _Q=_Z&&_Z.isSet,SQ=_Q?bZ(_Q):function(e){return Uc(e)&&"[object Set]"==uQ(e)},kQ="[object Arguments]",EQ="[object Function]",CQ="[object Object]",jQ={};function OQ(e,t,n,r,o,i){var a,s=1&t,l=2&t,c=4&t;if(void 0!==a)return a;if(!Tc(e))return e;var u=cZ(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&dQ.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return zZ(e,a)}else{var d=uQ(e),f=d==EQ||"[object GeneratorFunction]"==d;if(pZ(e))return function(e,t){if(t)return e.slice();var n=e.length,r=BZ?BZ(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==CQ||d==kQ||f&&!o){if(a=l||f?{}:function(e){return"function"!=typeof e.constructor||OZ(e)?{}:yQ(wX(e))}(e),!s)return l?function(e,t){return rZ(e,GZ(e),t)}(e,function(e,t){return e&&rZ(t,DZ(t),e)}(a,e)):function(e,t){return rZ(e,KZ(e),t)}(e,function(e,t){return e&&rZ(t,PZ(t),e)}(a,e))}else{if(!jQ[d])return o?e:{};a=vQ(e,d,s)}}i||(i=new ZX);var p=i.get(e);if(p)return p;i.set(e,a),SQ(e)?e.forEach((function(r){a.add(OQ(r,t,n,r,e,i))})):wQ(e)&&e.forEach((function(r,o){a.set(o,OQ(r,t,n,o,e,i))}));var h=u?void 0:(c?l?YZ:qZ:l?DZ:PZ)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(h||e,(function(r,o){h&&(r=e[o=r]),nZ(a,o,OQ(r,t,n,o,e,i))})),a}jQ[kQ]=jQ["[object Array]"]=jQ["[object ArrayBuffer]"]=jQ["[object DataView]"]=jQ["[object Boolean]"]=jQ["[object Date]"]=jQ["[object Float32Array]"]=jQ["[object Float64Array]"]=jQ["[object Int8Array]"]=jQ["[object Int16Array]"]=jQ["[object Int32Array]"]=jQ["[object Map]"]=jQ["[object Number]"]=jQ[CQ]=jQ["[object RegExp]"]=jQ["[object Set]"]=jQ["[object String]"]=jQ["[object Symbol]"]=jQ["[object Uint8Array]"]=jQ["[object Uint8ClampedArray]"]=jQ["[object Uint16Array]"]=jQ["[object Uint32Array]"]=!0,jQ["[object Error]"]=jQ[EQ]=jQ["[object WeakMap]"]=!1;function TQ(e){return OQ(e,5)}var IQ=Array.isArray,RQ=Object.keys,PQ=Object.prototype.hasOwnProperty,MQ=typeof Element<"u";function AQ(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,o,i=IQ(e),a=IQ(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(!AQ(e[n],t[n]))return!1;return!0}if(i!=a)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,u=t instanceof RegExp;if(c!=u)return!1;if(c&&u)return e.toString()==t.toString();var d=RQ(e);if((r=d.length)!==RQ(t).length)return!1;for(n=r;0!==n--;)if(!PQ.call(t,d[n]))return!1;if(MQ&&e instanceof Element&&t instanceof Element)return e===t;for(n=r;0!==n--;)if(!("_owner"===(o=d[n])&&e.$$typeof||AQ(e[o],t[o])))return!1;return!0}return e!=e&&t!=t}var DQ=function(e,t){try{return AQ(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}};const FQ=Ec(DQ);function LQ(e){return OQ(e,4)}function NQ(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function BQ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(BQ.Cache||XX),n}BQ.Cache=XX;var zQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Q=/\\(\\)?/g,VQ=function(e){var t=BQ(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zQ,(function(e,n,r,o){t.push(r?o.replace($Q,"$1"):n||e)})),t}));function HQ(e){if("string"==typeof e||Gc(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var KQ=Lc?Lc.prototype:void 0,UQ=KQ?KQ.toString:void 0;function GQ(e){if("string"==typeof e)return e;if(cZ(e))return NQ(e,GQ)+"";if(Gc(e))return UQ?UQ.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function WQ(e){return cZ(e)?NQ(e,HQ):Gc(e)?[e]:zZ(VQ(function(e){return null==e?"":GQ(e)}(e)))}function qQ(){return qQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qQ.apply(this,arguments)}function YQ(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var JQ=(0,s.createContext)(void 0);JQ.displayName="FormikContext",JQ.Provider,JQ.Consumer;var XQ=function(e){return"function"==typeof e},ZQ=function(e){return null!==e&&"object"==typeof e},QQ=function(e){return String(Math.floor(Number(e)))===e},e0=function(e){return"[object String]"===Object.prototype.toString.call(e)},t0=function(e){return ZQ(e)&&XQ(e.then)};function n0(e,t,n,r){void 0===r&&(r=0);for(var o=WQ(t);e&&r<o.length;)e=e[o[r++]];return r!==o.length&&!e||void 0===e?n:e}function r0(e,t,n){for(var r=LQ(e),o=r,i=0,a=WQ(t);i<a.length-1;i++){var s=a[i],l=n0(e,a.slice(0,i+1));if(l&&(ZQ(l)||Array.isArray(l)))o=o[s]=LQ(l);else{var c=a[i+1];o=o[s]=QQ(c)&&Number(c)>=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)}function o0(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],s=e[a];ZQ(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},o0(s,t,n,r[a])):r[a]=t}return r}var i0={},a0={};function s0(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,o=void 0===r||r,i=e.validateOnMount,a=void 0!==i&&i,l=e.isInitialValid,c=e.enableReinitialize,u=void 0!==c&&c,d=e.onSubmit,f=YQ(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=qQ({validateOnChange:n,validateOnBlur:o,validateOnMount:a,onSubmit:d},f),h=(0,s.useRef)(p.initialValues),g=(0,s.useRef)(p.initialErrors||i0),m=(0,s.useRef)(p.initialTouched||a0),v=(0,s.useRef)(p.initialStatus),b=(0,s.useRef)(!1),y=(0,s.useRef)({});(0,s.useEffect)((function(){return b.current=!0,function(){b.current=!1}}),[]);var x=(0,s.useState)(0)[1],w=(0,s.useRef)({values:TQ(p.initialValues),errors:TQ(p.initialErrors)||i0,touched:TQ(p.initialTouched)||a0,status:TQ(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=w.current,S=(0,s.useCallback)((function(e){var t=w.current;w.current=function(e,t){switch(t.type){case"SET_VALUES":return qQ({},e,{values:t.payload});case"SET_TOUCHED":return qQ({},e,{touched:t.payload});case"SET_ERRORS":return FQ(e.errors,t.payload)?e:qQ({},e,{errors:t.payload});case"SET_STATUS":return qQ({},e,{status:t.payload});case"SET_ISSUBMITTING":return qQ({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qQ({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qQ({},e,{values:r0(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qQ({},e,{touched:r0(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qQ({},e,{errors:r0(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qQ({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qQ({},e,{touched:o0(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return qQ({},e,{isSubmitting:!1});default:return e}}(t,e),t!==w.current&&x((function(e){return e+1}))}),[]),k=(0,s.useCallback)((function(e,t){return new Promise((function(n,r){var o=p.validate(e,t);null==o?n(i0):t0(o)?o.then((function(e){n(e||i0)}),(function(e){r(e)})):n(o)}))}),[p.validate]),E=(0,s.useCallback)((function(e,t){var n=p.validationSchema,r=XQ(n)?n(t):n,o=t&&r.validateAt?r.validateAt(t,e):function(e,t,n){void 0===n&&(n=!1);var r=l0(e);return t[n?"validateSync":"validate"](r,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){o.then((function(){e(i0)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return r0(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var a=i;n0(t,a.path)||(t=r0(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),C=(0,s.useCallback)((function(e,t){return new Promise((function(n){return n(y.current[e].validate(t))}))}),[]),j=(0,s.useCallback)((function(e){var t=Object.keys(y.current).filter((function(e){return XQ(y.current[e].validate)})),n=t.length>0?t.map((function(t){return C(t,n0(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=r0(e,t[r],n)),e}),{})}))}),[C]),O=(0,s.useCallback)((function(e){return Promise.all([j(e),p.validationSchema?E(e):{},p.validate?k(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return yX.all([t,n,r],{arrayMerge:c0})}))}),[p.validate,p.validationSchema,j,k,E]),T=d0((function(e){return void 0===e&&(e=_.values),S({type:"SET_ISVALIDATING",payload:!0}),O(e).then((function(e){return b.current&&(S({type:"SET_ISVALIDATING",payload:!1}),S({type:"SET_ERRORS",payload:e})),e}))}));(0,s.useEffect)((function(){a&&!0===b.current&&FQ(h.current,p.initialValues)&&T(h.current)}),[a,T]);var I=(0,s.useCallback)((function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:g.current?g.current:p.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:p.initialTouched||{},o=e&&e.status?e.status:v.current?v.current:p.initialStatus;h.current=t,g.current=n,m.current=r,v.current=o;var i=function(){S({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var a=p.onReset(_.values,Y);t0(a)?a.then(i):i()}else i()}),[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,s.useEffect)((function(){!0===b.current&&!FQ(h.current,p.initialValues)&&u&&(h.current=p.initialValues,I(),a&&T(h.current))}),[u,p.initialValues,I,a,T]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(g.current,p.initialErrors)&&(g.current=p.initialErrors||i0,S({type:"SET_ERRORS",payload:p.initialErrors||i0}))}),[u,p.initialErrors]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(m.current,p.initialTouched)&&(m.current=p.initialTouched||a0,S({type:"SET_TOUCHED",payload:p.initialTouched||a0}))}),[u,p.initialTouched]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(v.current,p.initialStatus)&&(v.current=p.initialStatus,S({type:"SET_STATUS",payload:p.initialStatus}))}),[u,p.initialStatus,p.initialTouched]);var R=d0((function(e){if(y.current[e]&&XQ(y.current[e].validate)){var t=n0(_.values,e),n=y.current[e].validate(t);return t0(n)?(S({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),S({type:"SET_ISVALIDATING",payload:!1})}))):(S({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(S({type:"SET_ISVALIDATING",payload:!0}),E(_.values,e).then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:n0(t,e)}}),S({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),P=(0,s.useCallback)((function(e,t){var n=t.validate;y.current[e]={validate:n}}),[]),M=(0,s.useCallback)((function(e){delete y.current[e]}),[]),A=d0((function(e,t){return S({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?T(_.values):Promise.resolve()})),D=(0,s.useCallback)((function(e){S({type:"SET_ERRORS",payload:e})}),[]),F=d0((function(e,t){var r=XQ(e)?e(_.values):e;return S({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?T(r):Promise.resolve()})),L=(0,s.useCallback)((function(e,t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),N=d0((function(e,t,r){return S({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?T(r0(_.values,e,t)):Promise.resolve()})),B=(0,s.useCallback)((function(e,t){var n,r=t,o=e;if(!e0(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,s=i.name,l=i.id,c=i.value,u=i.checked,d=(i.outerHTML,i.options),f=i.multiple;r=t||s||l,o=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"==typeof e)return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||"true"==n||"false"==n)return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}(n0(_.values,r),u,c):d&&f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):c}r&&N(r,o)}),[N,_.values]),z=d0((function(e){if(e0(e))return function(t){return B(t,e)};B(e)})),$=d0((function(e,t,n){return void 0===t&&(t=!0),S({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?T(_.values):Promise.resolve()})),V=(0,s.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||r||o);$(i,!0)}),[$]),H=d0((function(e){if(e0(e))return function(t){return V(t,e)};V(e)})),K=(0,s.useCallback)((function(e){XQ(e)?S({type:"SET_FORMIK_STATE",payload:e}):S({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),U=(0,s.useCallback)((function(e){S({type:"SET_STATUS",payload:e})}),[]),G=(0,s.useCallback)((function(e){S({type:"SET_ISSUBMITTING",payload:e})}),[]),W=d0((function(){return S({type:"SUBMIT_ATTEMPT"}),T().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=J()))return}catch(e){throw e}return Promise.resolve(n).then((function(e){return b.current&&S({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(b.current)throw S({type:"SUBMIT_FAILURE"}),e}))}if(b.current&&(S({type:"SUBMIT_FAILURE"}),t))throw e}))})),q=d0((function(e){e&&e.preventDefault&&XQ(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&XQ(e.stopPropagation)&&e.stopPropagation(),W().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:I,validateForm:T,validateField:R,setErrors:D,setFieldError:L,setFieldTouched:$,setFieldValue:N,setStatus:U,setSubmitting:G,setTouched:A,setValues:F,setFormikState:K,submitForm:W},J=d0((function(){return d(_.values,Y)})),X=d0((function(e){e&&e.preventDefault&&XQ(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&XQ(e.stopPropagation)&&e.stopPropagation(),I()})),Z=(0,s.useCallback)((function(e){return{value:n0(_.values,e),error:n0(_.errors,e),touched:!!n0(_.touched,e),initialValue:n0(h.current,e),initialTouched:!!n0(m.current,e),initialError:n0(g.current,e)}}),[_.errors,_.touched,_.values]),Q=(0,s.useCallback)((function(e){return{setValue:function(t,n){return N(e,t,n)},setTouched:function(t,n){return $(e,t,n)},setError:function(t){return L(e,t)}}}),[N,$,L]),ee=(0,s.useCallback)((function(e){var t=ZQ(e),n=t?e.name:e,r=n0(_.values,n),o={name:n,value:r,onChange:z,onBlur:H};if(t){var i=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===i?void 0===a?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(a)),o.value=a):"radio"===i?(o.checked=r===a,o.value=a):"select"===s&&l&&(o.value=o.value||[],o.multiple=!0)}return o}),[H,z,_.values]),te=(0,s.useMemo)((function(){return!FQ(h.current,_.values)}),[h.current,_.values]),ne=(0,s.useMemo)((function(){return typeof l<"u"?te?_.errors&&0===Object.keys(_.errors).length:!1!==l&&XQ(l)?l(p):l:_.errors&&0===Object.keys(_.errors).length}),[l,te,_.errors,p]);return qQ({},_,{initialValues:h.current,initialErrors:g.current,initialTouched:m.current,initialStatus:v.current,handleBlur:H,handleChange:z,handleReset:X,handleSubmit:q,resetForm:I,setErrors:D,setFormikState:K,setFieldTouched:$,setFieldValue:N,setFieldError:L,setStatus:U,setSubmitting:G,setTouched:A,setValues:F,submitForm:W,validateForm:T,validateField:R,isValid:ne,dirty:te,unregisterField:M,registerField:P,getFieldProps:ee,getFieldMeta:Z,getFieldHelpers:Q,validateOnBlur:o,validateOnChange:n,validateOnMount:a})}function l0(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||jX(e)?l0(e):""!==e?e:void 0})):jX(e[r])?t[r]=l0(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function c0(e,t,n){var r=e.slice();return t.forEach((function(t,o){if(typeof r[o]>"u"){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?yX(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=yX(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var u0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?s.useLayoutEffect:s.useEffect;function d0(e){var t=(0,s.useRef)(e);return u0((function(){t.current=e})),(0,s.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}var f0=(0,s.forwardRef)((function(e,t){var n=e.action,r=YQ(e,["action"]),o=n??"#",i=function(){var e=(0,s.useContext)(JQ);return e}(),a=i.handleReset,l=i.handleSubmit;return(0,s.createElement)("form",qQ({onSubmit:l,ref:t,onReset:a,action:o},r))}));function p0(e){this._maxSize=e,this.clear()}f0.displayName="Form",p0.prototype.clear=function(){this._size=0,this._values=Object.create(null)},p0.prototype.get=function(e){return this._values[e]},p0.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var h0=/[^.^\]^[]+|(?=\[\]|\.\.)/g,g0=/^\d+$/,m0=/^\d/,v0=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,b0=/^\s*(['"]?)(.*?)(\1)\s*$/,y0=new p0(512),x0=new p0(512),w0=new p0(512),_0={Cache:p0,split:k0,normalizePath:S0,setter:function(e){var t=S0(e);return x0.get(e)||x0.set(e,(function(e,n){for(var r=0,o=t.length,i=e;r<o-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;i=i[t[r++]]}i[t[r]]=n}))},getter:function(e,t){var n=S0(e);return w0.get(e)||w0.set(e,(function(e){for(var r=0,o=n.length;r<o;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(E0(t)||g0.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,o,i,a,s=e.length;for(o=0;o<s;o++)(r=e[o])&&(C0(r)&&(r='"'+r+'"'),a=E0(r),i=!a&&/^\d+$/.test(r),t.call(n,r,a,i,o,e))}(Array.isArray(e)?e:k0(e),t,n)}};function S0(e){return y0.get(e)||y0.set(e,k0(e).map((function(e){return e.replace(b0,"$2")})))}function k0(e){return e.match(h0)||[""]}function E0(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function C0(e){return!E0(e)&&(function(e){return e.match(m0)&&!e.match(g0)}(e)||function(e){return v0.test(e)}(e))}const j0=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,O0=e=>e.match(j0)||[],T0=(e,t)=>O0(e).join(t).toLowerCase(),I0=e=>O0(e).reduce(((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`),"");var R0=I0,P0=e=>T0(e,"_"),M0={exports:{}};function A0(e,t){var n=e.length,r=new Array(n),o={},i=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)o[i]||l(e[i],i,new Set);return r;function l(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch{c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var u=a.get(e)||new Set;if(t=(u=Array.from(u)).length){i.add(e);do{var d=u[--t];l(d,s.get(d),i)}while(t);i.delete(e)}r[--n]=e}}}M0.exports=function(e){return A0(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}(e),e)},M0.exports.array=A0;const D0=Ec(M0.exports),F0=Object.prototype.toString,L0=Error.prototype.toString,N0=RegExp.prototype.toString,B0=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",z0=/^Symbol\((.*)\)(.*)$/;function $0(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return B0.call(e).replace(z0,"Symbol($1)");const r=F0.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+L0.call(e)+"]":"RegExp"===r?N0.call(e):null}function V0(e,t){let n=$0(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=$0(this[e],t);return null!==r?r:n}),2)}function H0(e){return null==e?[]:[].concat(e)}let K0,U0,G0,W0=/\$\{\s*(\w+)\s*\}/g;K0=Symbol.toStringTag;class q0{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[K0]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],H0(e).forEach((e=>{if(Y0.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}U0=Symbol.hasInstance,G0=Symbol.toStringTag;class Y0 extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(W0,((e,n)=>V0(t[n]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,o){const i=new q0(e,t,n,r);if(o)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[G0]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Y0)}static[U0](e){return q0[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let J0={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=null!=r&&r!==n?` (cast from the value \`${V0(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${V0(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${V0(n,!0)}\``+o}},X0={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Z0={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Q0={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},e1={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${V0(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${V0(n,!0)}\``}return Y0.formatError(J0.notType,e)}};Object.assign(Object.create(null),{mixed:J0,string:X0,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Z0,object:Q0,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:e1});const t1=e=>e&&e.__isYupSchema__;class n1{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:o}=t,i="function"==typeof n?n:(...e)=>e.every((e=>e===n));return new n1(e,((e,t)=>{var n;let a=i(...e)?r:o;return null!=(n=null==a?void 0:a(t))?n:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!t1(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const r1="$",o1=".";class i1{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===r1,this.isValue=this.key[0]===o1,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?r1:this.isValue?o1:"";this.path=this.key.slice(n.length),this.getter=this.path&&_0.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}i1.prototype.__isYupRef=!0;const a1=e=>null==e;function s1(e){function t({value:t,path:n="",options:r,originalValue:o,schema:i},a,s){const{name:l,test:c,params:u,message:d,skipAbsent:f}=e;let{parent:p,context:h,abortEarly:g=i.spec.abortEarly,disableStackTrace:m=i.spec.disableStackTrace}=r;function v(e){return i1.isRef(e)?e.getValue(t,p,h):e}function b(e={}){const r=Object.assign({value:t,originalValue:o,label:i.spec.label,path:e.path||n,spec:i.spec,disableStackTrace:e.disableStackTrace||m},u,e.params);for(const e of Object.keys(r))r[e]=v(r[e]);const a=new Y0(Y0.formatError(e.message||d,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const y=g?a:s;let x={path:n,parent:p,type:l,from:r.from,createError:b,resolve:v,options:r,originalValue:o,schema:i};const w=e=>{Y0.isError(e)?y(e):e?s(null):y(b())},_=e=>{Y0.isError(e)?y(e):a(e)};if(f&&a1(t))return w(!0);let S;try{var k;if(S=c.call(x,t,x),"function"==typeof(null==(k=S)?void 0:k.then)){if(r.sync)throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(S).then(w,_)}}catch(e){return void _(e)}w(S)}return t.OPTIONS=e,t}function l1(e,t,n,r=n){let o,i,a;return t?(_0.forEach(t,((s,l,c)=>{let u=l?s.slice(1,s.length-1):s,d="tuple"===(e=e.resolve({context:r,parent:o,value:n})).type,f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s})),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class c1 extends Set{describe(){const e=[];for(const t of this.values())e.push(i1.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new c1(this.values())}merge(e,t){const n=this.clone();return e.forEach((e=>n.add(e))),t.forEach((e=>n.delete(e))),n}}function u1(e,t=new Map){if(t1(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=u1(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,u1(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(u1(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=u1(o,t)}return n}class d1{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new c1,this._blacklist=new c1,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(J0.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=u1(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!!(this.spec.nullable&&null===e||this.spec.optional&&void 0===e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce(((t,n)=>n.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,o;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(o=e.disableStackTrace)?o:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,o=n._cast(e,t);if(!1!==t.assert&&!n.isType(o)){if(r&&a1(o))return o;let i=V0(e),a=V0(o);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return o}_cast(e,t){let n=void 0===e?e:this.transforms.reduce(((t,n)=>n.call(this,t,e,this)),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:o,originalValue:i=e,strict:a=this.spec.strict}=t,s=e;a||(s=this._cast(s,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:o,value:s,originalValue:i,options:t,tests:l},n,(e=>{if(e.length)return r(e,s);this.runTests({path:o,value:s,originalValue:i,options:t,tests:this.tests},n,r)}))}runTests(e,t,n){let r=!1,{tests:o,value:i,originalValue:a,path:s,options:l}=e,c=e=>{r||(r=!0,t(e,i))},u=e=>{r||(r=!0,n(e,i))},d=o.length,f=[];if(!d)return u([]);let p={value:i,originalValue:a,path:s,options:l,schema:this};for(let e=0;e<o.length;e++){(0,o[e])(p,c,(function(e){e&&(Array.isArray(e)?f.push(...e):f.push(e)),--d<=0&&u(f)}))}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:o,options:i}){const a=e??t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const s="number"==typeof a;let l=n[a];const c=Object.assign({},i,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[s?"index":"key"]:a,path:s||a.includes(".")?`${r||""}[${s?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(c)._validate(l,c,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise(((n,i)=>r._validate(e,t,((e,t)=>{Y0.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new Y0(e,t,void 0,void 0,o)):n(t)}))))}validateSync(e,t){var n;let r,o=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw Y0.isError(e)&&(e.value=t),e}),((t,n)=>{if(t.length)throw new Y0(t,e,void 0,void 0,i);r=n})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(Y0.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Y0.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):u1(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=s1({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=s1({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=J0.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=J0.notNull){return this.nullability(!1,e)}required(e=J0.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=J0.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=s1(t),o=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter((e=>!(e.OPTIONS.name===t.name&&(o||e.OPTIONS.test===r.OPTIONS.test)))),n.tests.push(r),n}when(e,t){!Array.isArray(e)&&"string"!=typeof e&&(t=e,e=".");let n=this.clone(),r=H0(e).map((e=>new i1(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push("function"==typeof t?new n1(r,t):n1.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=s1({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=J0.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n.internalTests.whiteList=s1({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=J0.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n.internalTests.blacklist=s1({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:o,nullable:i}=t.spec;return{meta:r,label:n,optional:o,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t))}}}d1.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])d1.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=l1(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])d1.prototype[e]=d1.prototype.oneOf;for(const e of["not","nope"])d1.prototype[e]=d1.prototype.notOneOf;const f1=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function p1(e){var t,n;const r=f1.exec(e);return r?{year:h1(r[1]),month:h1(r[2],1)-1,day:h1(r[3],1),hour:h1(r[4]),minute:h1(r[5]),second:h1(r[6]),millisecond:r[7]?h1(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:h1(r[10]),minuteOffset:h1(r[11])}:null}function h1(e,t=0){return Number(e)||t}let g1=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m1=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,v1=/^(?:[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,b1=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),y1=e=>a1(e)||e===e.trim(),x1={}.toString();function w1(){return new _1}class _1 extends d1{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===x1?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||J0.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=X0.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=X0.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=X0.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,o=!1;return t&&("object"==typeof t?({excludeEmptyString:o=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||X0.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&o||-1!==t.search(e)})}email(e=X0.email){return this.matches(g1,{name:"email",message:e,excludeEmptyString:!0})}url(e=X0.url){return this.matches(m1,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=X0.uuid){return this.matches(v1,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(b1,{name:"datetime",message:r||X0.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||X0.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=p1(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||X0.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=p1(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=X0.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:y1})}lowercase(e=X0.lowercase){return this.transform((e=>a1(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>a1(e)||e===e.toLowerCase()})}uppercase(e=X0.uppercase){return this.transform((e=>a1(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>a1(e)||e===e.toUpperCase()})}}w1.prototype=_1.prototype;let S1=new Date("");class k1 extends d1{constructor(){super({type:"date",check:e=>(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}),this.withMutation((()=>{this.transform(((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=p1(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?k1.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let n;if(i1.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Z0.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Z0.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function E1(e,t){let n=1/0;return e.some(((e,r)=>{var o;if(null!=(o=t.path)&&o.includes(e))return n=r,!0})),n}function C1(e){return(t,n)=>E1(e,t)-E1(e,n)}k1.INVALID_DATE=S1,k1.prototype;const j1=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function O1(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=O1(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=O1(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(O1)}):"optional"in e?e.optional():e}let T1=e=>"[object Object]"===Object.prototype.toString.call(e);function I1(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===n.indexOf(e)))}const R1=C1([]);function P1(e){return new M1(e)}class M1 extends d1{constructor(e){super({type:"object",check:e=>T1(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=R1,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let o=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),s={},l=Object.assign({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of a){let n=o[e],a=e in r;if(n){let o,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:s});let a=n instanceof d1?n.spec:void 0,u=null==a?void 0:a.strict;if(null!=a&&a.strip){c=c||e in r;continue}o=t.__validating&&u?r[e]:n.cast(r[e],l),void 0!==o&&(s[e]=o)}else a&&!i&&(s[e]=r[e]);(a!==e in s||s[e]!==r[e])&&(c=!0)}return c?s:r}_validate(e,t={},n,r){let{from:o=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...o],t.__validating=!0,t.originalValue=i,super._validate(e,t,n,((e,o)=>{if(!a||!T1(o))return void r(e,o);i=i||o;let s=[];for(let e of this._nodes){let n=this.fields[e];!n||i1.isRef(n)||s.push(n.asNestedTest({options:t,key:e,parent:o,parentPath:t.path,originalParent:i}))}this.runTests({tests:s,value:o,originalValue:i,options:t},n,(t=>{r(t.sort(this._sortErrors).concat(e),o)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((n=>{var r;const o=this.fields[n];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),t[n]=o&&"getDefault"in o?o.getDefault(i):void 0})),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,o=new Set(t.map((([e,t])=>`${e}-${t}`)));function i(e,t){let i=_0.split(e)[0];r.add(i),o.has(`${t}-${i}`)||n.push([t,i])}for(const t of Object.keys(e)){let n=e[t];r.add(t),i1.isRef(n)&&n.isSibling?i(n.path,t):t1(n)&&"deps"in n&&n.deps.forEach((e=>i(e,t)))}return D0.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=C1(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation((n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)}))}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return O1(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter((([t,n])=>e.includes(t)&&e.includes(n))))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=_0.getter(e,!0);return this.transform((o=>{if(!o)return o;let i=o;return((e,t)=>{const n=[..._0.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),o=_0.getter(_0.join(n),!0)(e);return!(!o||!(r in o))})(o,e)&&(i=Object.assign({},o),n||delete i[e],i[t]=r(o)),i}))}json(){return this.transform(j1)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Q0.exact,test(e){if(null==e)return!0;const t=I1(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Q0.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=I1(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Q0.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n}))}camelCase(){return this.transformKeys(R0)}snakeCase(){return this.transformKeys(P0)}constantCase(){return this.transformKeys((e=>P0(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[o]})),n.fields[o]=i.describe(t)}return n}}P1.prototype=M1.prototype;const A1=e=>{const{scrollOnMatch:t=!0,onMatch:n,id:r,children:o}=e,i=(0,s.useRef)(!0);return(0,s.useEffect)((()=>{const e=()=>{if(-1!==window.location.hash.split("/").filter((e=>0!==e.indexOf("?")&&1!==e.length&&0!==e.length)).map((e=>"#"===e.charAt(0)?e.substring(1):e)).indexOf(r)){n&&n(r);const e=document.getElementById(r);t&&e&&!function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)&&e.scrollIntoView(i.current?{behavior:"instant"}:{behavior:"smooth",block:"center"})}};return i.current&&(e(),i.current=!1),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}}),[r,n,t]),(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{id:r}):(0,C.jsx)("div",{id:r,children:o})},D1={"tedi-textarea__input":"tedi-textarea__input-8c740e37","tedi-textarea__character-count":"tedi-textarea__character-count-c5b62b38"},F1=(0,s.forwardRef)(((e,t)=>{const{className:n,helper:r=[],characterLimit:o,onChange:i,onChangeEvent:a,value:l,defaultValue:c,...u}=e,[d,f]=s.useState(c??""),p=s.useCallback((e=>{!l&&!(i||a)&&f(e),null==i||i(e)}),[l,i,a]),h=s.useMemo((()=>l??d),[l,d]),g=h.length,m=o?`${g}/${o}`:"",v=[...Array.isArray(r)?r:[r],...o?[{type:g>o?"error":"hint",text:m,position:"right",className:lc(D1["tedi-textarea__character-count"])}]:[]];return(0,C.jsx)(y_,{...u,ref:t,"data-name":"textarea",inputClassName:D1["tedi-textarea__input"],isTextArea:!0,className:lc(D1["tedi-textarea"],n),value:h,onChange:p,onChangeEvent:a,helper:v})}));F1.displayName="TextArea";const L1={"tedi-number-field":"tedi-number-field-dd7196c9","tedi-number-field--disabled":"tedi-number-field--disabled-f19e7ff7","tedi-number-field__button":"tedi-number-field__button-e276fac1","tedi-number-field__input-wrapper":"tedi-number-field__input-wrapper-400bdcf6","tedi-number-field__button__disabled":"tedi-number-field__button__disabled-c7b3b631","tedi-number-field__button--decrement":"tedi-number-field__button--decrement-152a6e1b","tedi-number-field__button--increment":"tedi-number-field__button--increment-8bd8e08f","tedi-number-field--invalid":"tedi-number-field--invalid-0c9ed153","tedi-number-field__input":"tedi-number-field__input-1b10ec1e","tedi-number-field--small":"tedi-number-field--small-e0a3a881","tedi-number-field__input-wrapper--full-width":"tedi-number-field__input-wrapper--full-width-1847e7b8","tedi-number-field__input-wrapper--with-suffix":"tedi-number-field__input-wrapper--with-suffix-81f89bd3","tedi-number-field__suffix":"tedi-number-field__suffix-eb5be3bc"};(e=>{const{getCurrentBreakpointProps:t}=iu(),{id:n,label:r,hideLabel:o,required:i,className:a,size:l,inputMode:c="numeric",decimalPlaces:u,min:d,max:f,step:p=1,defaultValue:h,value:g,onChange:m,suffix:v,fullWidth:b=!1,disabled:y=!1,invalid:x=!1,helper:w,input:_}=t(e),{getLabel:S}=jv(),k=(0,s.useRef)(null),[E,j]=(0,s.useState)(""),[O,T]=(0,s.useState)(h??0),I=(0,s.useMemo)((()=>m&&typeof g<"u"?g:O),[m,g,O]),R=w?(null==w?void 0:w.id)??`${n}-helper`:void 0,P=(0,s.useCallback)((e=>x||void 0!==d&&e<d||void 0!==f&&e>f||"error"===(null==w?void 0:w.type)),[x,w,f,d]),M=e=>Math.min(f??1/0,Math.max(d??-1/0,e)),A=e=>{let t=I;"increment"===e&&(t+=p),"decrement"===e&&(t-=p),t=M(t),t=(e=>void 0!==u?parseFloat(e.toFixed(u)):e)(t),(e=>{const t=S("numberField.quantityUpdated"),n="string"==typeof t?t:t(e);j(n),setTimeout((()=>{j("")}),5e3)})(t),null==m||m(t),T(t)},D=({currentTarget:{value:e}})=>{null==m||m(M(+e)),T(M(+e))},F=e=>{const t="increment"===e?void 0!==f&&I>=f:void 0!==d&&I<=d,n=lc(L1["tedi-number-field__button"],L1[`tedi-number-field__button--${e}`],{[L1["tedi-number-field__button--disabled"]]:t||y}),r=S(`numberField.${e}`),o="string"==typeof r?r:r(p);return(0,C.jsx)(Zw,{"aria-label":o,onClick:()=>A(e),disabled:t||y,visualType:"secondary",className:n,icon:{name:"increment"===e?"add":"remove"},children:"increment"===e?"+":"-"})},L=lc(L1["tedi-number-field"],{[L1["tedi-number-field--invalid"]]:P(I)},{[L1["tedi-number-field--disabled"]]:y},{[L1["tedi-number-field--small"]]:"small"===l},a);return(0,C.jsxs)("div",{"data-name":"number-field",className:a,children:[(0,C.jsx)(v_,{id:n,label:r,required:i,hideLabel:o,size:l}),(0,C.jsxs)("div",{className:L,children:[F("decrement"),(()=>{const e=lc(L1["tedi-number-field__input-wrapper"],{[L1["tedi-number-field__input-wrapper--with-suffix"]]:v,[L1["tedi-number-field__input-wrapper--full-width"]]:b}),t=lc(L1["tedi-number-field__input"],null==_?void 0:_.className);return(0,C.jsxs)("div",{className:e,onClick:()=>{var e;return null==(e=null==k?void 0:k.current)?void 0:e.focus()},children:[(0,C.jsx)("input",{ref:k,id:n,"aria-describedby":R,"aria-invalid":x,type:"number",inputMode:c,value:I,min:d,max:f,required:i,step:p,disabled:y,onChange:D,className:t,..._}),v&&(0,C.jsx)(Yv,{element:"span",modifiers:"small",color:"tertiary",className:L1["tedi-number-field__suffix"],children:v})]})})(),F("increment")]}),w&&(0,C.jsx)(Ww,{...w,id:R}),(0,C.jsx)("div",{"aria-live":"polite",className:"visually-hidden",children:E})]})}).displayName="NumberField";const N1="tedi-search__wrapper-92d6f11f",B1="tedi-search__input-94d53b76",z1="tedi-search__input--has-button-d8e073e7",$1="tedi-search__button-cbb4df17",V1=(0,s.forwardRef)((({placeholder:e,isClearable:t=!0,searchIcon:n="search",onSearch:r,onChange:o,button:i,...a},s)=>{const l={...a,ref:s,inputClassName:lc(B1,i&&z1),placeholder:e,isClearable:t,onKeyPress:e=>{"Enter"===e.key&&(null==r||r(a.value))},onChange:o,...i?{}:{icon:n}};return(0,C.jsxs)("div",{className:lc(N1,a.className),children:[(0,C.jsx)(y_,{...l}),i&&(0,C.jsx)(Zw,{...i,onClick:()=>{null==r||r(a.value)},className:lc($1,i.className),children:i.children})]})}));V1.displayName="Search";function H1(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=H1(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function K1(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=H1(e))&&(r&&(r+=" "),r+=t);return r}const U1=e=>"number"==typeof e&&!isNaN(e),G1=e=>"string"==typeof e,W1=e=>"function"==typeof e,q1=e=>G1(e)||W1(e)?e:null,Y1=e=>(0,s.isValidElement)(e)||G1(e)||W1(e)||U1(e);function J1(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(e){let{children:a,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:f}=e;const p=r?`${t}--${l}`:t,h=r?`${n}--${l}`:n,g=(0,s.useRef)(0);return(0,s.useLayoutEffect)((()=>{const e=d.current,t=p.split(" "),n=r=>{r.target===d.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)}),[]),(0,s.useEffect)((()=>{const e=d.current,t=()=>{e.removeEventListener("animationend",t),o?function(e,t,n){void 0===n&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame((()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)}))}))}(e,u,i):u()};f||(c?t():(g.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))}),[f]),s.createElement(s.Fragment,null,a)}}function X1(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Z1={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter((e=>e!==t));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach((t=>{const n=setTimeout((()=>{t(...[].slice.call(arguments,1))}),0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)}))}},Q1=e=>{let{theme:t,type:n,...r}=e;return s.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...r})},e2={info:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return s.createElement("div",{className:"Toastify__spinner"})}};function t2(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function n2(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function r2(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return s.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":r},s.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},s.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function o2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:l,controlledProgress:c,progress:u,rtl:d,isIn:f,theme:p}=e;const h=i||c&&0===u,g={...l,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1};c&&(g.transform=`scaleX(${u})`);const m=K1("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":d}),v=W1(a)?a({rtl:d,type:o,defaultClassName:m}):K1(m,a);return s.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:v,style:g,[c&&u>=1?"onTransitionEnd":"onAnimationEnd"]:c&&u<1?null:()=>{f&&r()}})}const i2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=function(e){const[t,n]=(0,s.useState)(!1),[r,o]=(0,s.useState)(!1),i=(0,s.useRef)(null),a=(0,s.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=(0,s.useRef)(e),{autoClose:c,pauseOnHover:u,closeToast:d,onClick:f,closeOnClick:p}=e;function h(t){if(e.draggable){"touchstart"===t.nativeEvent.type&&t.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",y),document.addEventListener("touchmove",b),document.addEventListener("touchend",y);const n=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=n.getBoundingClientRect(),n.style.transition="",a.x=t2(t.nativeEvent),a.y=n2(t.nativeEvent),"x"===e.draggableDirection?(a.start=a.x,a.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function g(t){if(a.boundingRect){const{top:n,bottom:r,left:o,right:i}=a.boundingRect;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&a.x>=o&&a.x<=i&&a.y>=n&&a.y<=r?v():m()}}function m(){n(!0)}function v(){n(!1)}function b(n){const r=i.current;a.canDrag&&r&&(a.didMove=!0,t&&v(),a.x=t2(n),a.y=n2(n),a.delta="x"===e.draggableDirection?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),r.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,r.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",y);const t=i.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity="1"}}(0,s.useEffect)((()=>{l.current=e})),(0,s.useEffect)((()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),W1(e.onOpen)&&e.onOpen((0,s.isValidElement)(e.children)&&e.children.props),()=>{const e=l.current;W1(e.onClose)&&e.onClose((0,s.isValidElement)(e.children)&&e.children.props)})),[]),(0,s.useEffect)((()=>(e.pauseOnFocusLoss&&(document.hasFocus()||v(),window.addEventListener("focus",m),window.addEventListener("blur",v)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",v))})),[e.pauseOnFocusLoss]);const x={onMouseDown:h,onTouchStart:h,onMouseUp:g,onTouchEnd:g};return c&&u&&(x.onMouseEnter=v,x.onMouseLeave=m),p&&(x.onClick=e=>{f&&f(e),a.canCloseOnClick&&d()}),{playToast:m,pauseToast:v,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:x}}(e),{closeButton:i,children:a,autoClose:l,onClick:c,type:u,hideProgressBar:d,closeToast:f,transition:p,position:h,className:g,style:m,bodyClassName:v,bodyStyle:b,progressClassName:y,progressStyle:x,updateId:w,role:_,progress:S,rtl:k,toastId:E,deleteToast:C,isIn:j,isLoading:O,iconOut:T,closeOnClick:I,theme:R}=e,P=K1("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":I}),M=W1(g)?g({rtl:k,position:h,type:u,defaultClassName:P}):K1(P,g),A=!!S||!l,D={closeToast:f,type:u,theme:R};let F=null;return!1===i||(F=W1(i)?i(D):(0,s.isValidElement)(i)?(0,s.cloneElement)(i,D):r2(D)),s.createElement(p,{isIn:j,done:C,position:h,preventExitTransition:n,nodeRef:r},s.createElement("div",{id:E,onClick:c,className:M,...o,style:m,ref:r},s.createElement("div",{...j&&{role:_},className:W1(v)?v({type:u}):K1("Toastify__toast-body",v),style:b},null!=T&&s.createElement("div",{className:K1("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},T),s.createElement("div",null,a)),F,s.createElement(o2,{...w&&!A?{key:`pb-${w}`}:{},rtl:k,theme:R,delay:l,isRunning:t,isIn:j,closeToast:f,hide:d,type:u,style:x,className:y,controlledProgress:A,progress:S||0})))},a2=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},s2=J1(a2("bounce",!0));J1(a2("slide",!0));J1(a2("zoom")),J1(a2("flip"));const l2=(0,s.forwardRef)(((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=function(e){const[,t]=(0,s.useReducer)((e=>e+1),0),[n,r]=(0,s.useState)([]),o=(0,s.useRef)(null),i=(0,s.useRef)(new Map).current,a=e=>-1!==n.indexOf(e),l=(0,s.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:e=>i.get(e)}).current;function c(e){let{containerId:t}=e;const{limit:n}=l.props;!n||t&&l.containerId!==t||(l.count-=l.queue.length,l.queue=[])}function u(e){r((t=>null==e?[]:t.filter((t=>t!==e))))}function d(){const{toastContent:e,toastProps:t,staleId:n}=l.queue.shift();p(e,t,n)}function f(e,n){let{delay:r,staleId:a,...c}=n;if(!Y1(e)||function(e){return!o.current||l.props.enableMultiContainer&&e.containerId!==l.props.containerId||i.has(e.toastId)&&null==e.updateId}(c))return;const{toastId:f,updateId:h,data:g}=c,{props:m}=l,v=()=>u(f),b=null==h;b&&l.count++;const y={...m,style:m.toastStyle,key:l.toastKey++,...Object.fromEntries(Object.entries(c).filter((e=>{let[t,n]=e;return null!=n}))),toastId:f,updateId:h,data:g,closeToast:v,isIn:!1,className:q1(c.className||m.toastClassName),bodyClassName:q1(c.bodyClassName||m.bodyClassName),progressClassName:q1(c.progressClassName||m.progressClassName),autoClose:!c.isLoading&&(x=c.autoClose,w=m.autoClose,!1===x||U1(x)&&x>0?x:w),deleteToast(){const e=X1(i.get(f),"removed");i.delete(f),Z1.emit(4,e);const n=l.queue.length;if(l.count=null==f?l.count-l.displayedToast:l.count-1,l.count<0&&(l.count=0),n>0){const e=null==f?l.props.limit:1;if(1===n||1===e)l.displayedToast++,d();else{const t=e>n?n:e;l.displayedToast=t;for(let e=0;e<t;e++)d()}}else t()}};var x,w;y.iconOut=function(e){let{theme:t,type:n,isLoading:r,icon:o}=e,i=null;const a={theme:t,type:n};return!1===o||(W1(o)?i=o(a):(0,s.isValidElement)(o)?i=(0,s.cloneElement)(o,a):G1(o)||U1(o)?i=o:r?i=e2.spinner():(e=>e in e2)(n)&&(i=e2[n](a))),i}(y),W1(c.onOpen)&&(y.onOpen=c.onOpen),W1(c.onClose)&&(y.onClose=c.onClose),y.closeButton=m.closeButton,!1===c.closeButton||Y1(c.closeButton)?y.closeButton=c.closeButton:!0===c.closeButton&&(y.closeButton=!Y1(m.closeButton)||m.closeButton);let _=e;(0,s.isValidElement)(e)&&!G1(e.type)?_=(0,s.cloneElement)(e,{closeToast:v,toastProps:y,data:g}):W1(e)&&(_=e({closeToast:v,toastProps:y,data:g})),m.limit&&m.limit>0&&l.count>m.limit&&b?l.queue.push({toastContent:_,toastProps:y,staleId:a}):U1(r)?setTimeout((()=>{p(_,y,a)}),r):p(_,y,a)}function p(e,t,n){const{toastId:o}=t;n&&i.delete(n);const a={content:e,props:t};i.set(o,a),r((e=>[...e,o].filter((e=>e!==n)))),Z1.emit(4,X1(a,null==a.props.updateId?"added":"updated"))}return(0,s.useEffect)((()=>(l.containerId=e.containerId,Z1.cancelEmit(3).on(0,f).on(1,(e=>o.current&&u(e))).on(5,c).emit(2,l),()=>{i.clear(),Z1.emit(3,l)})),[]),(0,s.useEffect)((()=>{l.props=e,l.isToastActive=a,l.displayedToast=n.length})),{getToastToRender:function(t){const n=new Map,r=Array.from(i.values());return e.newestOnTop&&r.reverse(),r.forEach((e=>{const{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(e=>t(e[0],e[1])))},containerRef:o,isToastActive:a}}(e),{className:i,style:a,rtl:l,containerId:c}=e;function u(e){const t=K1("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":l});return W1(i)?i({position:e,rtl:l,defaultClassName:t}):K1(t,q1(i))}return(0,s.useEffect)((()=>{t&&(t.current=r.current)}),[]),s.createElement("div",{ref:r,className:"Toastify",id:c},n(((e,t)=>{const n=t.length?{...a}:{...a,pointerEvents:"none"};return s.createElement("div",{className:u(e),style:n,key:`container-${e}`},t.map(((e,n)=>{let{content:r,props:i}=e;return s.createElement(i2,{...i,isIn:o(i.toastId),style:{...i.style,"--nth":n+1,"--len":t.length},key:`toast-${i.key}`},r)})))})))}));l2.displayName="ToastContainer",l2.defaultProps={position:"top-right",transition:s2,autoClose:5e3,closeButton:r2,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let c2,u2=new Map,d2=[],f2=1;function p2(){return""+f2++}function h2(e){return e&&(G1(e.toastId)||U1(e.toastId))?e.toastId:p2()}function g2(e,t){return u2.size>0?Z1.emit(0,e,t):d2.push({content:e,options:t}),t.toastId}function m2(e,t){return{...t,type:t&&t.type||e,toastId:h2(t)}}function v2(e){return(t,n)=>g2(t,m2(e,n))}function b2(e,t){return g2(e,m2("default",t))}b2.loading=(e,t)=>g2(e,m2("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),b2.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=G1(o)?b2.loading(o,n):b2.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(e,t,o)=>{if(null==t)return void b2.dismiss(r);const i={type:e,...s,...n,data:o},a=G1(t)?{render:t}:t;return r?b2.update(r,{...i,...a}):b2(a.render,{...i,...a}),o},c=W1(e)?e():e;return c.then((e=>l("success",a,e))).catch((e=>l("error",i,e))),c},b2.success=v2("success"),b2.info=v2("info"),b2.error=v2("error"),b2.warning=v2("warning"),b2.warn=b2.warning,b2.dark=(e,t)=>g2(e,m2("default",{theme:"dark",...t})),b2.dismiss=e=>{u2.size>0?Z1.emit(1,e):d2=d2.filter((t=>null!=e&&t.options.toastId!==e))},b2.clearWaitingQueue=function(e){return void 0===e&&(e={}),Z1.emit(5,e)},b2.isActive=e=>{let t=!1;return u2.forEach((n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},b2.update=function(e,t){void 0===t&&(t={}),setTimeout((()=>{const n=function(e,t){let{containerId:n}=t;const r=u2.get(n||c2);return r&&r.getToast(e)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:p2()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,g2(a,i)}}),0)},b2.done=e=>{b2.update(e,{progress:1})},b2.onChange=e=>(Z1.on(4,e),()=>{Z1.off(4,e)}),b2.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},b2.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Z1.on(2,(e=>{c2=e.containerId||e,u2.set(c2,e),d2.forEach((e=>{Z1.emit(0,e.content,e.options)})),d2=[]})).on(3,(e=>{u2.delete(e.containerId||e),0===u2.size&&Z1.off(0).off(1).off(5)}));const y2=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=iu(),{getLabel:r}=jv(),{visualType:o="link",underline:i=!0,as:a,children:s,...l}=n(e);return(0,C.jsxs)(Jw,{"data-name":"link",...l,ref:t,as:a||"a",visualType:o,underline:i,children:[s,"_blank"===l.target&&(0,C.jsxs)("span",{className:"sr-only",children:["(",r("anchor.new-tab"),")"]})]})}));y2.displayName="Link";const x2=y2,w2={"tedi-card":"tedi-card-6773201e","tedi-card--background--accent":"tedi-card--background--accent-a0ccccbf","tedi-card--border--accent":"tedi-card--border--accent-16076fd7","tedi-card--background--brand-primary":"tedi-card--background--brand-primary-2e729236","tedi-card--border--brand-primary":"tedi-card--border--brand-primary-0ebff366","tedi-card--background--brand-secondary":"tedi-card--background--brand-secondary-e0935065","tedi-card--border--brand-secondary":"tedi-card--border--brand-secondary-c8f172e4","tedi-card--background--brand-tertiary":"tedi-card--background--brand-tertiary-8d2f79f4","tedi-card--border--brand-tertiary":"tedi-card--border--brand-tertiary-cc06323c","tedi-card--background--brand-quaternary":"tedi-card--background--brand-quaternary-e35ff683","tedi-card--border--brand-quaternary":"tedi-card--border--brand-quaternary-fdf175e9","tedi-card--background--primary":"tedi-card--background--primary-6f518b6a","tedi-card--border--primary":"tedi-card--border--primary-3ee7b649","tedi-card--background--secondary":"tedi-card--background--secondary-402019fb","tedi-card--border--secondary":"tedi-card--border--secondary-b0de1d8c","tedi-card--background--tertiary":"tedi-card--background--tertiary-d57f4e16","tedi-card--border--tertiary":"tedi-card--border--tertiary-1846869a","tedi-card--background--info-primary":"tedi-card--background--info-primary-981c7808","tedi-card--border--info-primary":"tedi-card--border--info-primary-d73b0349","tedi-card--background--info-secondary":"tedi-card--background--info-secondary-118ce8d4","tedi-card--border--info-secondary":"tedi-card--border--info-secondary-25075005","tedi-card--background--neutral-primary":"tedi-card--background--neutral-primary-8b4fa913","tedi-card--border--neutral-primary":"tedi-card--border--neutral-primary-3c442023","tedi-card--background--neutral-secondary":"tedi-card--background--neutral-secondary-77a1899a","tedi-card--border--neutral-secondary":"tedi-card--border--neutral-secondary-2dd2db0a","tedi-card--background--success-primary":"tedi-card--background--success-primary-2e50333d","tedi-card--border--success-primary":"tedi-card--border--success-primary-167796e5","tedi-card--background--success-secondary":"tedi-card--background--success-secondary-5ef8094d","tedi-card--border--success-secondary":"tedi-card--border--success-secondary-5d3c8168","tedi-card--background--danger-primary":"tedi-card--background--danger-primary-a701ed87","tedi-card--border--danger-primary":"tedi-card--border--danger-primary-f0b990dd","tedi-card--background--danger-secondary":"tedi-card--background--danger-secondary-cbde6da8","tedi-card--border--danger-secondary":"tedi-card--border--danger-secondary-29b9cdf0","tedi-card--background--warning-primary":"tedi-card--background--warning-primary-92facd8b","tedi-card--border--warning-primary":"tedi-card--border--warning-primary-60cabe9b","tedi-card--background--warning-secondary":"tedi-card--background--warning-secondary-01e1cafe","tedi-card--border--warning-secondary":"tedi-card--border--warning-secondary-e4339e73","tedi-card--border-left":"tedi-card--border-left-d2bbe0cd","tedi-card--border-top":"tedi-card--border-top-4199f286","tedi-card--borderless":"tedi-card--borderless-8f44bb3f","tedi-card--no-border-radius-top":"tedi-card--no-border-radius-top-d8b0071d","tedi-card__content":"tedi-card__content-a40bc648","tedi-card--no-border-radius-right":"tedi-card--no-border-radius-right-52a78320","tedi-card--no-border-radius-bottom":"tedi-card--no-border-radius-bottom-59e75b25","tedi-card--no-border-radius-left":"tedi-card--no-border-radius-left-ff9938cb","tedi-card__content--separator":"tedi-card__content--separator-0019d413","tedi-card__header":"tedi-card__header-f7a4ed63"},_2=s.createContext({}),S2=e=>{if("number"==typeof e)return{"--card-content-padding-top":`${e}rem`,"--card-content-padding-right":`${e}rem`,"--card-content-padding-bottom":`${e}rem`,"--card-content-padding-left":`${e}rem`};if((e=>"object"==typeof e&&"vertical"in e&&"horizontal"in e)(e)){const{vertical:t,horizontal:n}=e;return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${n}rem`,"--card-content-padding-bottom":`${t}rem`,"--card-content-padding-left":`${n}rem`}}const{top:t=0,right:n=0,bottom:r=0,left:o=0}=e||{};return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${n}rem`,"--card-content-padding-bottom":`${r}rem`,"--card-content-padding-left":`${o}rem`}},k2=e=>{const{padding:t,background:n}=s.useContext(_2),{getCurrentBreakpointProps:r}=iu(),{children:o,className:i,padding:a,background:l,backgroundImage:c,backgroundPosition:u,backgroundSize:d,backgroundRepeat:f,hasSeparator:p,role:h,style:g,...m}=r(e,{padding:t,background:n}),v=l?w2[`tedi-card--background--${l}`]:"",b={backgroundImage:c?`url(${c})`:void 0,backgroundPosition:u,backgroundSize:d,backgroundRepeat:f};return(0,C.jsx)("button"===h?"button":"div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,className:lc(w2["tedi-card__content"],v,i,{[w2["tedi-card__content--separator"]]:p}),style:{...S2(a),...b,...g},...m,children:o})},E2="tedi-card__notification-content-2a22e902",C2="tedi-card__notification-d5a264e6",j2=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=iu(),{children:r,className:o,padding:i,background:a,borderRadius:s,borderless:l,border:c,...u}=n(e,{padding:1}),[d,f]=(e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]})(c),p=lc(w2["tedi-card"],{[w2[`tedi-card--border-${d}`]]:d,[w2[`tedi-card--border--${f}`]]:f,[w2["tedi-card--borderless"]]:l,[w2["tedi-card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[w2["tedi-card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[w2["tedi-card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[w2["tedi-card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)},o);return(0,C.jsx)(_2.Provider,{value:{padding:i,background:a},children:(0,C.jsx)("div",{"data-name":"card","data-testid":"tedi-card",...u,className:p,ref:t,children:r})})}));j2.displayName="Card";const O2=Object.assign(j2,{Content:k2,Header:e=>{const{className:t,...n}=e;return(0,C.jsx)(k2,{className:lc(w2["tedi-card__header"],t),...n})},Notification:e=>{const{children:t,padding:n,className:r,...o}=e,i=lc(C2,r);return(0,C.jsx)(k2,{"data-name":"card-notification",padding:n,className:E2,children:(0,C.jsx)(Zv,{className:i,noSideBorders:!0,...o,children:t})})}}),T2=e=>{const{children:t}=e;return(0,C.jsx)(C.Fragment,{children:t})},I2=["xs","sm","md","lg","xl","xxl"],R2=()=>{const[e,t]=(0,s.useState)(P2());return(0,s.useEffect)((()=>{const e=eu((()=>{t(P2())}),20);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),e},P2=()=>{let e=null;return typeof window<"u"&&(e=window.matchMedia("(min-width: 1400px)").matches?"xxl":window.matchMedia("(min-width: 1200px)").matches?"xl":window.matchMedia("(min-width: 992px)").matches?"lg":window.matchMedia("(min-width: 768px)").matches?"md":window.matchMedia("(min-width: 576px)").matches?"sm":"xs"),e},M2=()=>{const e=R2(),t=s.useMemo((()=>e?I2.slice(0,I2.indexOf(e)+1):[]),[e]);return{getCurrentBreakpointProps:s.useCallback(((e,n={})=>{const{sm:r,md:o,lg:i,xl:a,xxl:s,...l}=e,c=[...t.map((t=>sc("xs"===t?l:e[t],(e=>void 0!==e))))].filter(Boolean);return Object.assign(n,...c)}),[t])}},A2=["xs","sm"],D2=["md"],F2=["lg","xl","xxl"],L2=e=>{const t=R2(),n=null==e?void 0:e.reduce(((e,t)=>{switch(t){case"desktop":return[...e,...F2];case"tablet":return[...e,...D2];case"mobile":return[...e,...A2];default:return[...e,t]}}),[]);return!!t&&n.includes(t)},N2={"primary-main":"primary-main-ea0565ff","primary-active":"primary-active-d24cbc9e","primary-active-subtle":"primary-active-subtle-c2ab8b5f","primary-highlight":"primary-highlight-212d11b7","primary-highlight-subtle":"primary-highlight-subtle-715c2641","accent-main":"accent-main-f55c9be5","accent-highlight":"accent-highlight-6810179d","bg-default":"bg-default-099a281c","bg-muted":"bg-muted-13732b1c","bg-subtle":"bg-subtle-e7130c61","bg-disabled":"bg-disabled-eed0584e","bg-inverted":"bg-inverted-2bf8047e","bg-inverted-contrast":"bg-inverted-contrast-304e2c10",black:"black-d9cad7d6",white:"white-5992ce1a","positive-main":"positive-main-dfc533f2","positive-active":"positive-active-f4288715","positive-highlight":"positive-highlight-6594b5a8","important-main":"important-main-67d03aad","important-active":"important-active-5ebf547d","important-highlight":"important-highlight-aa19e975","info-main":"info-main-80c1cd50","info-active":"info-active-5f165e38","info-highlight":"info-highlight-578939bc","warning-main":"warning-main-2fae5383","warning-highlight":"warning-highlight-f87e48b3",transparent:"transparent-74d01799"},B2=e=>e?N2[e]:"",z2=e=>{const{getCurrentBreakpointProps:t}=M2(),{children:n,className:r,tabIndex:o,element:i="p",modifiers:a,color:s,...l}=t(e,{tabIndex:e.id?-1:void 0}),c="string"==typeof a?[a]:a,u=lc(r,null==c?void 0:c.map((e=>`text-${e}`)),{[`text-${s}`]:s});return(0,C.jsx)(i,{className:u,...l,tabIndex:o,children:n})},$2=e=>{const{children:t,element:n="h1",...r}=e;return(0,C.jsx)(z2,{element:n,...r,children:t})},V2={icon:"icon-8081be27","icon--block":"icon--block-4aa6379d","icon--inline":"icon--inline-5d045b85"},H2=(0,s.forwardRef)(((e,t)=>{const{className:n,name:r,filled:o=!1,label:i,type:a="outlined",size:s=24,display:l="block",color:c,...u}=e,d=lc("notranslate","material-symbols",V2.icon,V2[`icon--${l}`],{[`material-symbols--${a}`]:a,[`text-${c}`]:c},n),f={...s?{"--icon-internal-variation-size":s/16+"rem"}:{},...o?{"--icon-internal-variation-fill":1}:{}};return(0,C.jsx)("span",{"data-name":"icon",role:"img","aria-hidden":!i,...u,className:d,style:f,ref:t,"aria-label":i,children:r})}));H2.displayName="Icon";const K2={btn:"btn-a9ce955b","btn--small":"btn--small-5daaaf3d","btn--icon-only":"btn--icon-only-375cfc7d","btn--tertiary":"btn--tertiary-c1cc08ad","btn--default":"btn--default-eca73b71","btn--primary":"btn--primary-22126c0a","btn--is-active":"btn--is-active-a0b6b950","btn--is-hovered":"btn--is-hovered-4a27da20","btn--secondary":"btn--secondary-a76a0864","btn--important":"btn--important-1a53be26","btn--positive":"btn--positive-46a2598e","btn--inverted":"btn--inverted-3fc5447d","btn--link":"btn--link-92dffb55","btn--text-color":"btn--text-color-2cc027f7",btn__text:"btn__text-7d9d1a13","btn--is-loading":"btn--is-loading-00320401","btn--icon":"btn--icon-456b539f",btn__inner:"btn__inner-804ab13a","btn__icon--left":"btn__icon--left-50b31870","btn__icon--right":"btn__icon--right-9b9e8607",btn__icon:"btn__icon-738969c8",btn__spinner:"btn__spinner-5ad34e4e","btn--underline":"btn--underline-e2d2c82b","btn--no-style":"btn--no-style-ed081476","btn--full-width":"btn--full-width-9809b856"},U2=(0,s.forwardRef)((({children:e,as:t,text:n,className:r,visualType:o="primary",color:i="default",size:a,icon:s,iconLeft:l,iconRight:c,underline:u=!1,isHovered:d,isActive:f,isLoading:p=!1,noStyle:h,renderWrapperElement:g,fullWidth:m,onClick:v,...b},y)=>{const x=t||"button",w=s||l||c,_=h?lc(K2["btn--no-style"],r,{[K2["btn--full-width"]]:m}):lc(K2.btn,K2[`btn--${o}`],K2[`btn--${i}`],r,{[K2[`btn--${a}`]]:a},{[K2["btn--underline"]]:u},{[K2["btn--is-hovered"]]:d},{[K2["btn--is-active"]]:f},{[K2["btn--is-loading"]]:p},{[K2["btn--icon-only"]]:s},{[K2["btn--icon"]]:w},{[K2["btn--full-width"]]:m}),S=(e,t)=>{const n={size:16,className:lc(K2.btn__icon,K2[`btn__icon--${e}`],{[K2.btn__spinner]:p})},r="string"==typeof t?{...n,name:t}:{...n,...t,className:lc(n.className,null==t?void 0:t.className)};return p?(0,C.jsx)(Tv,{className:r.className}):(0,C.jsx)(H2,{...r})};return(0,C.jsx)(tu,{visibility:"hide",children:(0,C.jsx)(x,{"data-name":"button-content",...b,"aria-disabled":p||b["aria-disabled"],onClick:e=>{v&&!p&&v(e)},ref:y,className:_,children:h?e:(0,C.jsxs)("span",{className:K2.btn__inner,children:[s&&S("centre",s),l&&S("left",l),(0,C.jsx)("span",{className:K2.btn__text,children:e}),p&&!w&&(0,C.jsx)(Tv,{position:"absolute",className:K2.btn__spinner}),c&&S("right",c)]})})})}));U2.displayName="ButtonContent";const G2=U2,W2=(0,s.forwardRef)(((e,t)=>{const{children:n,as:r,type:o,formNoValidate:i,visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:f,isHovered:p,isActive:h,noStyle:g,...m}=e;return(0,C.jsx)(G2,{"data-name":"button",...m,type:o||"button",formNoValidate:!!(i??"submit"===o)||void 0,ref:t,as:r||"button",visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:f,isHovered:p,isActive:h,noStyle:g,children:n})}));W2.displayName="Button";const q2=W2,Y2={collapse__title:"collapse__title-8b98d783",collapse__icon:"collapse__icon-6cfc1cff","collapse--is-open":"collapse--is-open-67cf3662",collapse__content:"collapse__content-c7ea2935"},J2=e=>{const{getLabel:t}=jv(),{id:n,children:r,className:o,openText:i=t("open"),closeText:a=t("close"),hideCollapseText:l=!1,title:c,titleRowProps:u,defaultOpen:d,open:f,onToggle:p,...h}=e,[g,m]=s.useState(d),v=au(),b=v||(void 0!==f?f:g),y=lc(Y2.collapse,o,{[Y2["collapse--is-open"]]:b}),x=()=>{m((e=>!e)),null==p||p(!b)},w=(0,C.jsx)("div",{className:Y2.collapse__content,children:r});return(0,C.jsxs)("div",{"data-name":"collapse",...h,className:y,children:[(0,C.jsx)("button",{type:"button","data-name":"collapse-trigger",className:Y2.collapse__title,"aria-expanded":b,"aria-controls":n,onKeyDown:e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),x())},onClick:x,children:(0,C.jsxs)(Bv,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...u,element:"span",children:[c&&(0,C.jsx)(zv,{children:c}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(Bv,{element:"span",alignItems:"center",gutter:1,children:[(0,C.jsx)(tu,{visibility:"hide",children:(0,C.jsx)(zv,{width:"auto",className:lc({"visually-hidden":l}),children:(0,C.jsx)(z2,{element:"span",color:"primary",children:b?a:i})})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(H2,{className:Y2.collapse__icon,name:"expand_more"})})]})})]})}),v?w:(0,C.jsx)(Dv,{duration:300,id:n,height:b?"auto":0,"data-testid":"collapse-inner",children:w})]})},X2=(0,s.forwardRef)(((e,t)=>{const{getLabel:n}=jv(),{visualType:r="link",as:o,children:i,...a}=e;return(0,C.jsxs)(G2,{"data-name":"anchor",...a,ref:t,as:o||"a",visualType:r,children:[i,"_blank"===a.target&&(0,C.jsxs)("span",{className:"sr-only",children:["(",n("anchor.new-tab"),")"]})]})}));X2.displayName="Anchor";const Z2=s.createContext({menuOpen:!1,toggleMenu:()=>null,headerType:"system",reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),context:{},y:null,headerElement:null,headerBottomElement:null,headerBottomSize:void 0}),Q2={card:"card-1dcacf64","card--borderless":"card--borderless-32e5f5c2","card--no-border-radius-top":"card--no-border-radius-top-b4365e4f",card__content:"card__content-815d48ff","card--no-border-radius-right":"card--no-border-radius-right-3ceb8758","card--no-border-radius-bottom":"card--no-border-radius-bottom-63f3360b","card--no-border-radius-left":"card--no-border-radius-left-a3acce4a","card--border-left":"card--border-left-e9b3151f","card--border-top":"card--border-top-e2a66b39","card__header--default":"card__header--default-90734e02","card__header--primary-main":"card__header--primary-main-8de91e10","card__header--primary-active":"card__header--primary-active-6877b9af","card__header--white":"card__header--white-9243bce2","card__header--bg-muted":"card__header--bg-muted-7904d086",card__header:"card__header-5d78acc3"},e3=s.createContext({}),t3=e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]},n3=e=>{const t=e=>"object"==typeof e&&"vertical"in e&&"horizontal"in e;return{"--card-content-padding-top":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.top}rem`,"--card-content-padding-right":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.right}rem`,"--card-content-padding-bottom":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.bottom}rem`,"--card-content-padding-left":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.left}rem`}},r3=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=M2(),{children:r,className:o,padding:i,background:a="bg-default",borderRadius:s,borderless:l,border:c="border-default",...u}=n(e,{padding:1}),[d,f]=t3(c),p=lc(Q2.card,o,{[Q2[`card--border-${d}`]]:d,[Q2["card--borderless"]]:l,[Q2["card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[Q2["card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[Q2["card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[Q2["card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)});return(0,C.jsx)(e3.Provider,{value:{padding:i,background:a},children:(0,C.jsx)("div",{"data-name":"card",...u,className:p,ref:t,style:f?{"--card-border-color":`var(--color-${f})`}:void 0,children:r})})}));r3.displayName="Card";const o3=e=>{const{variant:t,...n}=e,{getCurrentBreakpointProps:r}=M2(),{padding:o}=s.useContext(e3),{children:i,className:a,background:l,padding:c,...u}=r(n,{background:t??"default",padding:o}),d=lc(Q2.card__header,Q2[`card__header--${l}`],a);return(0,C.jsx)("div",{"data-name":"card-header",style:n3(c),...u,className:d,children:i})};o3.displayName="CardHeader";const i3=e=>{const{padding:t,background:n}=s.useContext(e3),{getCurrentBreakpointProps:r}=M2(),{children:o,className:i,padding:a,background:l,...c}=r(e,{padding:t,background:n}),u=lc(Q2.card__content,{[B2(l)]:l},i);return(0,C.jsx)("div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,style:n3(a),...c,className:u,children:o})};i3.displayName="CardContent";const a3="card__notification-content-4c89a40e",s3="card__notification-b07a1cfd",l3=e=>{const{children:t,padding:n,className:r,...o}=e,i=lc(s3,r);return(0,C.jsx)(i3,{"data-name":"card-notification",padding:n,className:a3,children:(0,C.jsx)(Zv,{className:i,...o,children:t})})},c3=({children:e})=>(0,C.jsx)(C.Fragment,{children:e});c3.displayName="HeaderContent";const u3={tooltip:"tooltip-413196ab","tooltip--none":"tooltip--none-01bd521a","tooltip--small":"tooltip--small-f23b2c64","tooltip--medium":"tooltip--medium-33ed6e9a","tooltip--large":"tooltip--large-84d7b683",tooltip__arrow:"tooltip__arrow-7d8214bc","tooltip__arrow--stroke":"tooltip__arrow--stroke-092e3c3e",tooltip__trigger:"tooltip__trigger-f6422045","tooltip__trigger--click":"tooltip__trigger--click-bb6703b1"},d3=10,f3=s.createContext({open:!1,isMounted:!1,openWith:"hover",reference:()=>null,floating:()=>null,focusManager:{},arrowRef:{current:null},x:null,y:null,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{x:0,y:0,centerOffset:0},placement:"top",context:{}}),p3=e=>{const{getLabel:t}=jv(),n=su(),{children:r,placement:o="bottom",openWith:i=(n?"click":"hover"),defaultOpen:a=!1,open:l,onToggle:c,role:u="tooltip",offset:d=d3}=e,{order:f=["reference","content"],modal:p=!1,initialFocus:h=-1,...g}=e.focusManager??{},{visuallyHiddenDismiss:m=!!p&&t("close")}=g??{},[v,b]=s.useState(a),y=s.useRef(null),x=c&&typeof l<"u"?l:v,w=nu(),{x:_,y:S,refs:k,strategy:E,context:j,middlewareData:O,placement:T}=_w({placement:o,open:x,onOpenChange:e=>{typeof l>"u"&&b(e),null==c||c(e)},middleware:[Zy(d),ex(),Qy({padding:8}),tx({element:y,padding:4})],whileElementsMounted:zy}),{getReferenceProps:I,getFloatingProps:R}=jw([Mx(j,{handleClose:Lw(),enabled:"hover"===i}),mw(j),Sw(j,{enabled:"hover"===i}),Dw(j,{role:u}),xw(j,{outsidePressEvent:"click"===i?"mousedown":"pointerdown"})]);return(0,C.jsx)(f3.Provider,{value:{open:x,isMounted:w,openWith:i,reference:k.setReference,floating:k.setFloating,arrowRef:y,focusManager:{order:f,initialFocus:h,modal:p,visuallyHiddenDismiss:m,...g},x:_,y:S,strategy:E,getReferenceProps:I,getFloatingProps:R,arrow:{...O.arrow},context:j,placement:T},children:r})},h3=e=>{const{children:t,maxWidth:n="medium",cardProps:r,className:o}=e,{open:i,x:a,y:l,strategy:c,focusManager:u,floating:d,arrowRef:f,getFloatingProps:p,placement:h,context:g}=s.useContext(f3),[m,v]=t3(null==r?void 0:r.border),b=()=>m&&v?`var(--color-${v})`:"none",y="none"!==b();return(0,C.jsx)(nw,{"data-name":"tooltip",children:(()=>{const e=(0,C.jsx)(uw,{...u,context:g,children:(0,C.jsxs)("div",{...p({ref:d,style:{position:c,left:a??0,top:l??0},className:lc(u3.tooltip,o,{[u3[`tooltip--${n}`]]:n})}),"data-placement":h,children:[(0,C.jsx)(kx,{ref:e=>f.current=e,context:g,fill:null!=r&&r.background?`var(--color-${null==r?void 0:r.background})`:"var(--color-bg-default)",stroke:b(),strokeWidth:y?4:0,className:lc(u3.tooltip__arrow,{[u3["tooltip__arrow--stroke"]]:y}),height:7,width:14}),(0,C.jsx)(r3,{padding:.5,borderless:!0,...r,children:(0,C.jsx)(i3,{children:t})})]})});return i?e:null})()})},g3=e=>{const{children:t}=e,{getLabel:n}=jv(),{getReferenceProps:r,reference:o,openWith:i}=s.useContext(f3),a=nx([o,t.ref]);return s.cloneElement(t,r({ref:a,tabIndex:0,label:t.type===H2?n("tooltip.icon-trigger"):void 0,...t.props,className:lc(u3.tooltip__trigger,{[u3["tooltip__trigger--click"]]:"click"===i},t.props.className)}))},m3="header__dropdown-cb8faff9",v3="header__dropdown--open-03680708",b3=e=>{const{children:t,triggerProps:n,defaultOpen:r,open:o,onToggle:i,shouldAnimate:a,tooltipProps:l}=e,[c,u]=s.useState(r),[d,f]=s.useState(d3),{headerElement:p}=s.useContext(Z2),h=s.useRef(null);s.useEffect((()=>{if(null!=p&&p.current&&null!=h&&h.current){const e=p.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),n=e.bottom-t.bottom;f(n)}}),[p,h,t]);const g=void 0!==o?o:c;return(0,C.jsxs)(p3,{offset:d,openWith:"click",role:"dialog",onToggle:e=>{u(e),null==i||i(e)},open:g,children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{...n,ref:h,className:lc(m3,n.className,{[v3]:a&&g})})}),(0,C.jsx)(h3,{...l,cardProps:{...null==l?void 0:l.cardProps,border:"top-primary-active-subtle",borderless:!1,background:"bg-muted"},children:t})]})},y3={modal:"modal-11cfca5e","modal--center":"modal--center-b671c09c","modal--no-overlay":"modal--no-overlay-a990d10a",modal__inner:"modal__inner-10a95cee","modal--right":"modal--right-d7b9213c","modal--bottom":"modal--bottom-b9033478","modal--10":"modal--10-bc4c5908","modal--8":"modal--8-46477dbb","modal--6":"modal--6-cd8246bc",modal__card:"modal__card-f5ca2013","close-button":"close-button-9544f148"},x3=s.createContext({isOpen:!1,reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),closeModal:()=>null,context:{},isDismissable:!0,escapeKey:!0,outsidePress:!0}),w3=e=>{const{children:t,defaultOpen:n=!1,onToggle:r,isDismissable:o=!0,escapeKey:i=!0,outsidePress:a=!0}=e,[l,c]=s.useState(n),u=r&&typeof e.open<"u"?e.open:l,{refs:d,context:f}=_w({open:u,onOpenChange:e=>e?m():g()}),{getReferenceProps:p,getFloatingProps:h}=jw([mw(f),Dw(f),xw(f,{enabled:o,escapeKey:i,outsidePress:a})]),g=()=>{typeof e.open>"u"&&c(!1),null==r||r(!1)},m=()=>{typeof e.open>"u"&&c(!0),null==r||r(!0)};return(0,C.jsx)(x3.Provider,{value:{isOpen:u,reference:d.setReference,floating:d.setFloating,getReferenceProps:p,getFloatingProps:h,closeModal:g,context:f,isDismissable:o,escapeKey:i,outsidePress:a},children:t})},_3=e=>{const{children:t}=e,{closeModal:n}=s.useContext(x3);return s.cloneElement(t,{onClick:()=>{var e,r;null==(r=(e=t.props).onClick)||r.call(e),n()}})},S3=e=>{const{children:t,size:n=6,cardProps:r={},hideCloseButton:o,position:i,lockScroll:a=!0,trapFocus:l=!0,returnFocus:c=!0,overlay:u,visuallyHiddenDismiss:d=!1}=e,{getLabel:f}=jv(),p=e["aria-labelledby"],h=e["aria-describedby"],{isOpen:g,floating:m,getFloatingProps:v,context:b,isDismissable:y}=s.useContext(x3),x=s.useMemo((()=>{let e=!1;const n=e=>e.type.displayName;return o?t:s.Children.map(t,((t,r)=>e||!s.isValidElement(t)||"CardHeader"!==n(t)&&"CardContent"!==n(t)?t:(e=!0,s.cloneElement(t,{...t.props,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(_3,{children:(0,C.jsx)(qv,{size:"large",className:y3["close-button"]})}),t.props.children]})}))))}),[t,f,o]);return(0,C.jsx)(nw,{"data-name":"modal",children:g&&(0,C.jsx)(pw,{lockScroll:a,className:lc(y3.modal,y3[`modal--${n}`],y3[`modal--${i}`],{[y3["modal--no-overlay"]]:"none"===u}),children:(0,C.jsx)(uw,{context:b,closeOnFocusOut:!l&&y,visuallyHiddenDismiss:d?f("modal.close"):void 0,returnFocus:c,modal:l,children:(0,C.jsx)("div",{...v({ref:m,className:y3.modal__inner,"aria-labelledby":p,"aria-describedby":h,"aria-modal":l}),children:(0,C.jsx)(r3,{...r,className:lc(y3.modal__card,null==r?void 0:r.className),children:x})})})})})},k3=e=>{const{children:t}=e,{getReferenceProps:n,reference:r}=s.useContext(x3);return s.cloneElement(t,n({ref:r,...t.props}))},E3="header-modal__close-824b7dc8",C3=e=>{const{triggerProps:t,defaultOpen:n,open:r,onToggle:o,children:i,ariaLabelledby:a}=e,{getLabel:s}=jv();return(0,C.jsxs)(w3,{defaultOpen:n,open:r,onToggle:o,children:[(0,C.jsx)(k3,{children:(0,C.jsx)(q2,{...t})}),(0,C.jsx)(S3,{"aria-labelledby":a,hideCloseButton:!0,position:"right",children:(0,C.jsxs)(i3,{padding:0,children:[(0,C.jsx)(r3,{borderless:!0,background:"primary-highlight-subtle",padding:.5,borderRadius:!1,children:(0,C.jsx)(i3,{children:(0,C.jsx)(z2,{element:"div",modifiers:"right",children:(0,C.jsx)(_3,{children:(0,C.jsx)(qv,{title:s("modal.close"),size:"large",className:E3})})})})}),(0,C.jsx)(r3,{border:"top-border-default",borderRadius:!1,padding:0,children:(0,C.jsx)(i3,{children:i})})]})})]})},j3=e=>{const{languages:t}=e,n=L2(["desktop","tablet"]),{getLabel:r}=jv(),[o,i]=s.useState(!1),a=null==t?void 0:t.find((e=>e.isSelected)),l={children:null==a?void 0:a.label,"aria-label":`${r("header.select-lang")} ${(null==a?void 0:a["aria-label"])??(null==a?void 0:a.label)}`,visualType:n?"link":"tertiary",iconRight:n?{name:"expand_more",color:"primary",size:24}:void 0},c=({isSelected:e,onClick:t,label:n,"aria-label":r},o=!0)=>(0,C.jsx)(q2,{visualType:o?"link":e?"primary":"tertiary","aria-current":e,"aria-label":r,onClick:()=>(e=>{null==e||e({onToggle:i})})(t),children:n}),u=(0,C.jsxs)("div",{children:[(0,C.jsx)(z2,{color:"muted",modifiers:"small",children:r("header.select-lang")}),(0,C.jsx)(b3,{shouldAnimate:!0,open:o,onToggle:i,tooltipProps:{cardProps:{padding:1}},triggerProps:l,children:(0,C.jsx)(tb,{verticalSpacing:{size:.75},element:"ul",children:(null==t?void 0:t.map((e=>(0,C.jsx)(eb,{children:c(e)},e.label))))||[]})})]}),d=(0,C.jsx)(C3,{ariaLabelledby:"header-language-modal-label",open:o,onToggle:i,triggerProps:l,children:(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsxs)(i3,{children:[(0,C.jsx)($2,{id:"header-language-modal-label",className:"sr-only",children:r("header.select-lang")}),(0,C.jsx)(Bv,{alignItems:"center",element:"ul",children:null==t?void 0:t.map((e=>(0,C.jsx)(zv,{width:"auto",children:c(e,!1)},e.label)))})]})})});return n?u:d};j3.displayName="HeaderLanguage";const O3={tag:"tag-de7cd582","tag--default":"tag--default-77443d27","tag--type-ghost":"tag--type-ghost-80dfabdb","tag--large":"tag--large-81928b3e","tag--color-default":"tag--color-default-9aabde81","tag--type-default":"tag--type-default-328f991f","tag--type-secondary":"tag--type-secondary-495a8ed8","tag--color-accent":"tag--color-accent-798040f8","tag--type-borderless":"tag--type-borderless-1c5fcca7","tag--type-invisible":"tag--type-invisible-c8d11eb5","tag--icon-only":"tag--icon-only-1f412944","tag--disabled":"tag--disabled-06b14065","tag--with-arrow":"tag--with-arrow-a7d0d694","tag--color-primary":"tag--color-primary-d4a64cd4","tag--color-positive":"tag--color-positive-f823c0df","tag--color-warning":"tag--color-warning-3efdfe52","tag--color-important":"tag--color-important-81499159","tag--status-error":"tag--status-error-30c88b17","tag--status-success":"tag--status-success-e31be3e2","tag--status-inactive":"tag--status-inactive-09947563","tag--rounded":"tag--rounded-e9419f54"},T3=(0,s.forwardRef)(((e,t)=>{const{children:n,size:r,className:o,title:i,color:a="default",status:s,type:l="default",rounded:c=!1,hasArrow:u=!1,isLoading:d=!1,isDisabled:f=!1,iconOnly:p=!1,id:h}=e,g=d?Hw:i?"abbr":"div",m=lc(O3.tag,o,{[O3[`tag--${r}`]]:r},{[O3[`tag--type-${l}`]]:l},{[O3[`tag--color-${a}`]]:a},{[O3[`tag--status-${s}`]]:s},{[O3["tag--rounded"]]:c},{[O3["tag--icon-only"]]:p},{[O3["tag--disabled"]]:f},{[O3["tag--with-arrow"]]:u&&!c});return(0,C.jsx)(g,{id:h,"data-name":"tag",className:m,title:i,ref:t,children:n})}));T3.displayName="Tag";const I3="header-role-collapse-7664165f",R3="header-role-wrapper-c65bcd63",P3="header-role-children-3fdd2c2c",M3=e=>{const{renderModal:t=!1,...n}=e,[r,o]=s.useState(!1);return t?(0,C.jsx)(D3,{...n,open:r,onToggle:o}):(0,C.jsx)(A3,{...n,open:r,onToggle:o})};M3.displayName="HeaderRole";const A3=e=>{const{getLabel:t}=jv(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l="function"==typeof n?n({onToggle:o}):n,c=(0,C.jsx)(b3,{shouldAnimate:!0,open:r,onToggle:o,tooltipProps:{cardProps:{padding:0},maxWidth:"medium"},triggerProps:{children:i,"aria-label":`${s??""} ${a??""} ${i??""}`,visualType:"link",iconRight:{name:"expand_more",color:"primary",size:24}},children:(0,C.jsx)("div",{className:R3,children:(0,C.jsx)(Bw,{fadeSize:0,children:(0,C.jsx)("div",{className:P3,children:l})})})});return(0,C.jsxs)("div",{children:[s===t("header.role-label")?(0,C.jsx)("div",{children:(0,C.jsx)(T3,{color:"primary",type:"secondary",children:s})}):(0,C.jsxs)(z2,{color:"muted",modifiers:["bold","small"],children:[s,!!a&&(0,C.jsxs)(C.Fragment,{children:[" ",(0,C.jsxs)(z2,{element:"span",modifiers:["small","normal"],children:[(0,C.jsx)("span",{style:{color:"var(--color-border-default)"},children:"|"})," ",a]})]})]}),l?c:i]})},D3=e=>{const{getLabel:t}=jv(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l=(0,C.jsxs)(z2,{element:"span",color:"muted",modifiers:"bold",children:[s," ",i,a&&(0,C.jsx)(z2,{element:"span",modifiers:"normal",children:` | ${a}`})]}),c="function"==typeof n?n({onToggle:o}):n;return(0,C.jsx)(r3,{background:"bg-muted",borderRadius:!1,borderless:!0,children:(0,C.jsx)(i3,{padding:0,children:c?(0,C.jsx)(J2,{id:"role-collapse",open:r,onToggle:o,className:I3,hideCollapseText:!0,title:l,children:(0,C.jsx)("div",{className:R3,children:(0,C.jsx)(Bw,{fadeSize:0,children:(0,C.jsx)("div",{className:P3,children:c})})})}):(0,C.jsx)("div",{className:P3,children:l})})})},F3=e=>{const{children:t,onActionClick:n,closeOnAction:r=!0,iconName:o}=e,[i,a]=s.useState(!1),l=L2(["desktop"]),c=L2(["mobile"]),{getLabel:u}=jv(),{headerType:d}=s.useContext(Z2),f={children:u("header.settings"),visualType:"tertiary",icon:{name:o||"account_circle",color:"primary",size:36}};if("public"===d)return(0,C.jsx)(q2,{icon:c?{name:"login",color:"primary",size:24}:void 0,visualType:c?"tertiary":"primary",onClick:n,children:u("header.login")});const p="function"==typeof t?t({onToggle:a}):t;if(!p)return(0,C.jsx)(q2,{icon:{name:"logout",color:"primary",size:24},visualType:"tertiary",onClick:n,children:u("header.logout")});const h=()=>(0,C.jsx)(q2,{onClick:()=>{n(),r&&a(!1)},iconLeft:"logout",visualType:"link",children:u("header.logout")}),g=(0,C.jsx)(b3,{open:i,onToggle:a,tooltipProps:{cardProps:{padding:1}},triggerProps:f,children:(0,C.jsxs)(Kv,{size:1,children:[p,(0,C.jsx)(Uw,{isStretched:!0}),(0,C.jsx)(h,{})]})}),m=(0,C.jsxs)(C3,{open:i,onToggle:a,ariaLabelledby:"header-settings-modal-label",triggerProps:f,children:[(0,C.jsx)($2,{id:"header-settings-modal-label",className:"sr-only",children:u("header.settings")}),p,(0,C.jsx)(Uw,{isStretched:!0}),(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsx)(i3,{children:(0,C.jsx)(h,{})})}),(0,C.jsx)(Uw,{isStretched:!0})]});return l?g:m};F3.displayName="HeaderSettings";const L3="dropdown-fc86e9ac",N3="dropdown__item-bc9999d8",B3="dropdown__item--active-c49b11d2",z3="dropdown__item--disabled-c66020d7",$3=e=>{const{getLabel:t}=jv(),{button:n,items:r,onItemClick:o,closeMenuOnClick:i=!0,...a}=e,{initialFocus:l=-1,modal:c=!1,...u}=e.focusManager??{},{visuallyHiddenDismiss:d=!!c&&t("close")}=u??{},f=function(){const e=Sx(),t=Ox(),n=jx();return bx((()=>{const r={id:e,parentId:n};return null==t||t.addNode(r),()=>{null==t||t.removeNode(r)}}),[t,e,n]),e}(),p=s.useRef([]),[h,g]=s.useState(!1),[m,v]=s.useState(null),{x:b,y,strategy:x,refs:w,placement:_,context:S}=_w({placement:"bottom-start",nodeId:f,open:h,onOpenChange:g,middleware:[ex(),Qy()],whileElementsMounted:zy}),k=r.findIndex((e=>e.isActive)),{getReferenceProps:E,getFloatingProps:j,getItemProps:O}=jw([mw(S),Mw(S,{listRef:p,activeIndex:m,selectedIndex:k,onNavigate:v,loop:!0}),Dw(S,{role:"listbox"}),xw(S)]),T=e=>lc(N3,{[B3]:e.isActive,[z3]:e.isDisabled}),I=(e,t,n)=>{var r;null==o||o(e,t,n),null==(r=null==e?void 0:e.onClick)||r.call(e,n),i&&g(!1)},R=(e,t)=>(0,C.jsx)("button",{...O({disabled:e.isDisabled,tabIndex:m===t?0:-1,role:"option",className:T(e),onClick:n=>I(e,t,n),onKeyDown(n){"Enter"===n.key&&I(e,t,n)},ref(e){p.current[t]=e}}),children:e.children},t);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(q2,{"data-name":"dropdown",...a,...n,...E({ref:w.setReference,tabIndex:0})}),(0,C.jsx)(nw,{children:(()=>{const e=(0,C.jsx)(uw,{context:S,initialFocus:l,visuallyHiddenDismiss:d,modal:c,...u,children:(0,C.jsx)("div",{...j({ref:w.setFloating,style:{position:x,left:b??0,top:y??0},className:L3,onKeyDown(e){"Tab"===e.key&&g(!1)}}),"data-placement":_,children:r.map(((e,t)=>R(e,t)))})});return h?e:null})()})]})},V3=(s.createContext({activeStep:0,allowStepLabelClick:!0,handleActiveStepChange:()=>null}),e=>{var t,n,r,o,i;const{muiTextfieldProps:a,textfieldProps:l,inputFormat:c,onChangeHandler:u,type:d="date"}=e,{ref:f,inputRef:p,inputProps:h,InputProps:g,value:m,size:v,onChange:b,error:y,disabled:x,...w}=a,{readOnly:_,id:S,input:k,...E}=l,j=s.useRef({inner:null,input:null});return s.useEffect((()=>{j.current.input&&(null==p||p(j.current.input))}),[p]),(0,C.jsx)(y_,{id:S,...w,disabled:x,readOnly:_,...E,value:null==h?void 0:h.value,onChangeEvent:e=>{var t;null==(t=null==h?void 0:h.onChange)||t.call(h,e)},placeholder:(null==l?void 0:l.placeholder)||(null==h?void 0:h.placeholder),defaultValue:void 0,ref:j,input:{...h,...k},invalid:y,icon:{name:"date"===d?"today":"schedule",label:null==(i=null==(o=null==(r=null==(n=null==(t=null==a?void 0:a.InputProps)?void 0:t.endAdornment)?void 0:n.props)?void 0:r.children)?void 0:o.props)?void 0:i["aria-label"]},onBlur:e=>{var t,n,r;null==(t=E.onBlur)||t.call(E,e),null==(n=w.onBlur)||n.call(w,e),Sc(e.currentTarget.value,c,!0).isValid()||(u(null),null==(r=null==h?void 0:h.onChange)||r.call(h,{...e,target:{...e.target,value:""}}))}})}),H3=e=>{const{value:t,defaultValue:n,onChange:r,minDate:o,maxDate:i,disabled:a,readOnly:l,toolbarTitle:c,disableFuture:u,disablePast:d,shouldDisableDate:f,shouldDisableMonth:p,shouldDisableYear:h,disableHighlightToday:g,referenceDate:m,inputFormat:v="DD.MM.YYYY",views:b=["year","day"],onError:y,loading:x,onClose:w,..._}=e,[S,k]=s.useState(n||null),[E,j]=s.useState(!1),O=s.useMemo((()=>r&&typeof t<"u"?t:S),[S,r,t]),T=e=>{(null==e||!e.isValid())&&null!==e||(typeof t>"u"&&k(e),null==r||r(e))};return(0,C.jsx)(_I,{"data-name":"datepicker",value:O,onChange:T,renderInput:e=>(0,C.jsx)(V3,{muiTextfieldProps:e,inputFormat:v,onChangeHandler:T,textfieldProps:{..._,onClear:()=>T(null),onIconClick:l?void 0:()=>j((e=>!e))}}),open:E,inputFormat:v,onOpen:()=>j(!0),onClose:()=>{j(!1),null==w||w()},defaultCalendarMonth:m,disabled:a,disableFuture:u,disablePast:d,shouldDisableDate:f,shouldDisableMonth:p,shouldDisableYear:h,disableHighlightToday:g,readOnly:l,minDate:o,maxDate:i,toolbarTitle:c,onError:y,loading:x,views:b})},K3="check-48c1869b",U3="check--disabled-3f793e27",G3="check__input-92dff7a9",W3="check__indicator-0ac86462",q3="check__indicator--hover-c4064110",Y3="check__indicator--indeterminate-33c0c00a",J3="check__icon-e76c1b87",X3="check__icon--check-e0ab9856",Z3="check__icon--indeterminate-dc93d769",Q3="check__tooltip-icon-e8045891",e5="check__extra-content-7ade4e97",t5=e=>{const{id:t,label:n,value:r,className:o,disabled:i=!1,onChange:a,hideLabel:l=!1,extraContent:c,checked:u,defaultChecked:d,indeterminate:f,hover:p,name:h,tooltip:g,...m}=e,[v,b]=s.useState(d||!1),y=s.useRef(null),x=s.useMemo((()=>f?"mixed":a&&typeof u<"u"?u:v),[f,a,u,v]),w=lc(K3,{[U3]:i});return(0,C.jsxs)("div",{"data-name":"check",className:o,...m,children:[(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsxs)(zv,{width:"auto",children:[(0,C.jsx)("input",{id:t,value:r,name:h,type:"checkbox",disabled:i,checked:"mixed"!==x&&x,"aria-checked":x,onChange:e=>{typeof u>"u"&&b(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:G3}),(0,C.jsxs)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=y.current)?void 0:e.click()},className:lc(W3,{[q3]:p,[Y3]:f}),children:[(0,C.jsx)(Gv,{size:16,name:"remove",className:lc(J3,Z3)}),(0,C.jsx)(Gv,{size:16,name:"check",className:lc(J3,X3)})]})]}),(0,C.jsx)(zv,{children:(0,C.jsxs)("label",{ref:y,className:w,htmlFor:t,children:[(0,C.jsx)("span",{className:lc({"visually-hidden":l}),children:n}),g&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{name:"info",color:"brand",size:16,display:"inline",className:Q3})}),(0,C.jsx)(h3,{children:g})]})]})})]}),c&&(0,C.jsx)("div",{className:e5,children:c})]})},n5={select__control:"select__control-c52fb518","select--invalid":"select--invalid-a28d479c","select__control--focused":"select__control--focused-666f5665",select__arrow:"select__arrow-f088db27","select__menu-portal":"select__menu-portal-83a0138d",select__menu:"select__menu-36546a54","select__menu-list":"select__menu-list-1db27a34","select__menu-list-inner":"select__menu-list-inner-65d1bbd0","select__menu-list-footer":"select__menu-list-footer-8ebb4c1b",select__option:"select__option-a57e0e71","select__option--focused":"select__option--focused-421543c0","select__option--selected":"select__option--selected-3d192b35","select__option--disabled":"select__option--disabled-ffe87ec9","select--small":"select--small-9131190c",select__input:"select__input-ff08a918","select__multi-value-item":"select__multi-value-item-0ca3b242",select__checkbox:"select__checkbox-2412f21a",select:"select-40793e72",select__group:"select__group-4bbb5fe8","select__group-heading":"select__group-heading-e20b5f3f","select__multi-value-clear":"select__multi-value-clear-3603e9b1","select--tags-row":"select--tags-row-8b3eeef0","select--searchable":"select--searchable-c0c07c33","select--tags-stack":"select--tags-stack-8ee56ad9"},r5=e=>{const t=lc(n5.select__control,e.className,{[n5["select__control--focused"]]:e.isFocused});return(0,C.jsx)(KR.Control,{...e,className:t})},o5=e=>(0,C.jsx)(KR.Input,{...e,className:lc(e.className,n5.select__input),isHidden:void 0!==e.selectProps.inputIsHidden?e.selectProps.inputIsHidden:e.isHidden}),i5=e=>(0,C.jsx)(KR.Menu,{...e,className:lc(e.className,n5.select__menu)}),a5=e=>(0,C.jsx)(KR.MenuPortal,{...e,className:lc(e.className,n5["select__menu-portal"])}),s5=(0,s.forwardRef)(((e,t)=>{const{options:n,defaultOptions:r,id:o,name:i,iconName:a="arrow_drop_down",label:l,required:c,value:u,defaultValue:d,tagsDirection:f="row",onChange:p,onInputChange:h,inputValue:g,loadOptions:m,isLoading:v,isTagRemovable:b=!1,openMenuOnFocus:y=!1,openMenuOnClick:x=!0,tabSelectsValue:w=!1,disabled:_=!1,className:S,hideLabel:k=!1,helper:E,placeholder:j,invalid:O,size:T,async:I=!1,renderOption:R,renderMessageListFooter:P,noOptionsMessage:M,loadingMessage:A,multiple:D=!1,closeMenuOnSelect:F=!D,blurInputOnSelect:L=!1,autoFocus:N=!1,isClearable:B=!0,isClearIndicatorVisible:z=!1,isSearchable:$=!0,menuIsOpen:V,onMenuClose:H,onMenuOpen:K,onBlur:U,inputIsHidden:G,optionGroupHeadingText:W={modifiers:"small",color:"subtle"},optionGroupBackgroundColor:q,cacheOptions:Y=!0,...J}=e,X=E?(null==E?void 0:E.id)??`${o}-helper`:void 0,Z=s.useRef(null),{getLabel:Q}=jv();s.useImperativeHandle(t,(()=>Z.current));const ee=e=>{var t;null==p||p(e),!L&&Z.current&&(null==(t=Z.current.inputRef)||t.focus())},te=()=>(0,C.jsx)(H2,{name:a,size:24,className:n5.select__arrow}),ne=e=>(0,C.jsx)(KR.Placeholder,{...e,className:lc(e.className,"inline-block")}),re=s.useCallback((e=>(0,C.jsxs)("div",{className:n5["select__menu-list-wrapper"],children:[(0,C.jsx)(KR.MenuList,{...e,className:lc(e.className,n5["select__menu-list"]),children:e.children}),P&&(0,C.jsx)("div",{className:n5["select__menu-list-footer"],children:P(e)})]})),[P]),oe=e=>D?(e=>{const t=lc(n5.select__option,{[n5["select__option--disabled"]]:e.isDisabled},{[n5["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,C.jsx)(KR.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:R?R(e):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{className:"sr-only",children:e.label}),(0,C.jsx)(t5,{id:e.data.value,label:e.label,"aria-hidden":!0,className:n5.select__checkbox,value:e.data.value,name:e.data.value,checked:e.isSelected,onChange:(e,t)=>null,disabled:e.isDisabled,hover:e.isFocused})]})})})(e):(e=>{const t=lc(n5.select__option,{[n5["select__option--disabled"]]:e.isDisabled},{[n5["select__option--selected"]]:e.isSelected},{[n5["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,C.jsx)(KR.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:R?R(e):e.children})})(e),ie=({children:e,components:{Remove:t},data:n,selectProps:r,removeProps:o,...i})=>(0,C.jsxs)(T3,{color:"default",type:"secondary",className:lc(n5["select__multi-value-item"],{[n5["select__multi-value-item--big"]]:"small"!==T}),children:[e,b&&(0,C.jsx)(t,{data:n,selectProps:r,innerProps:o})]}),ae=({data:e,innerProps:t})=>(0,C.jsx)(q2,{icon:{name:"clear",color:"muted"},className:n5["select__multi-value-clear"],visualType:"link",tabIndex:-1,...t,children:`${Q("remove")} ${e.label}`}),se=({innerProps:{ref:e,...t}})=>z?(0,C.jsx)(q2,{icon:{name:"clear",color:"muted"},visualType:"link",tabIndex:-1,ref:e,...t,children:Q("clear")}):null,le=e=>{const t=lc(n5.select__group);return(0,C.jsx)(KR.Group,{...e,className:t,children:e.children})},ce=e=>{const t=lc(n5["select__group-heading"],B2(e.data.backgroundColor||q||"transparent")),n=e.data.text||W;return(0,C.jsx)(KR.GroupHeading,{...e,className:t,children:(0,C.jsx)(z2,{...n,children:e.data.label})})},ue=lc(n5.select,S,{[n5["select--invalid"]]:O||"error"===(null==E?void 0:E.type)},{[n5[`select--${T}`]]:T},{[n5[`select--tags-${f}`]]:f},{[n5["select--searchable"]]:$});return(0,C.jsxs)("div",{"data-name":"select",...J,className:ue,children:[(0,C.jsxs)("div",{className:n5.select__inner,children:[(0,C.jsx)(v_,{id:`${o}-input`,label:l,required:c,hideLabel:k,size:T}),(()=>{const e={ClearIndicator:se,DropdownIndicator:te,IndicatorSeparator:()=>null,MenuPortal:a5,Menu:i5,MenuList:re,Option:oe,Control:r5,Input:o5,MultiValue:ie,MultiValueRemove:ae,Placeholder:ne,Group:le,GroupHeading:ce},t=I?qP:UP;return(0,C.jsx)(t,{id:o,"aria-describedby":X,autoFocus:N,ref:Z,instanceId:o,className:"select__wrapper",name:i,options:n,defaultOptions:r,value:u,defaultValue:d,cacheOptions:Y,onChange:ee,onInputChange:h,onBlur:U,inputValue:g,inputId:`${o}-input`,loadOptions:m,isLoading:v,noOptionsMessage:M||(()=>Q("select.no-options")),loadingMessage:A||(()=>Q("select.loading")),classNamePrefix:"select",components:e,isDisabled:_,isSearchable:$,menuIsOpen:V,openMenuOnFocus:y,openMenuOnClick:x,tabSelectsValue:w,onMenuClose:H,onMenuOpen:K,placeholder:j||"",isClearable:B,backspaceRemovesValue:!0,menuShouldScrollIntoView:!0,isMulti:D,hideSelectedOptions:!1,closeMenuOnSelect:F,blurInputOnSelect:L,menuPosition:"fixed",menuPlacement:"auto",inputIsHidden:G,required:c,theme:e=>({...e,colors:{...e.colors,primary:"#005aa3",danger:"#b50000",dangerLight:"#fceeee"}}),styles:{input:e=>({...e,gridTemplateColumns:"0fr"})}})})()]}),E&&(0,C.jsx)(Ww,{...E,id:X})]})}));s5.displayName="Select";const l5={"choice-group":"choice-group-7127bc4c","choice-group__inner--indented":"choice-group__inner--indented-095d03f8","choice-group__item--extra-padding":"choice-group__item--extra-padding-defa3089"},c5=s.createContext({name:"",inputType:"radio",onChange:()=>null,currentValue:[]}),u5=e=>{const{id:t,label:n,value:r,className:o,direction:i="column",disabled:a,colProps:l=("column"===i?{width:12}:{width:"auto",grow:1}),onChange:c,hideLabel:u,extraContent:d,tooltip:f}=e,{currentValue:p,inputType:h,name:g,onChange:m}=s.useContext(c5),v=!!p&&("checkbox"===h?r===p||-1!==p.indexOf(r):r===p);return(0,C.jsx)(zv,{...l,children:(0,C.jsx)(t5,{id:t,label:n,value:r,name:g,className:o,disabled:a,checked:v,onChange:(e,t)=>{null==m||m(e,t),null==c||c(e,t)},hideLabel:u,extraContent:d,tooltip:f})})},d5="radio-4b3e1d44",f5="radio--disabled-8a5be211",p5="radio__input-c3c0efa1",h5="radio__indicator-cb82800d",g5="radio__indicator--hover-a273c5aa",m5="radio__tooltip-icon-dc07bb33",v5="radio__extra-content-465c7a50",b5=e=>{const{id:t,label:n,value:r,className:o,disabled:i,onChange:a,hideLabel:l,extraContent:c,checked:u,defaultChecked:d,hover:f,name:p,tooltip:h,...g}=e,[m,v]=s.useState(d||!1),b=s.useRef(null),y=s.useMemo((()=>a&&typeof u<"u"?u:m),[a,m,u]),x=lc(d5,{[f5]:i});return(0,C.jsxs)("div",{"data-name":"radio",className:o,...g,children:[(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsxs)(zv,{width:"auto",children:[(0,C.jsx)("input",{id:t,value:r,name:p,type:"radio",disabled:i,checked:y,onChange:e=>{typeof u>"u"&&v(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:p5}),(0,C.jsx)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=b.current)?void 0:e.click()},className:lc(h5,{[g5]:f})})]}),(0,C.jsx)(zv,{children:(0,C.jsxs)("label",{ref:b,className:x,htmlFor:t,children:[(0,C.jsx)("span",{className:lc({"visually-hidden":l}),children:n}),h&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{name:"info",color:"brand",size:16,display:"inline",className:m5})}),(0,C.jsx)(h3,{children:h})]})]})})]}),c&&(0,C.jsx)("div",{className:v5,children:c})]})},y5=e=>{const{id:t,label:n,value:r,className:o,direction:i="column",disabled:a,colProps:l=("column"===i?{width:12}:{width:"auto",grow:1}),onChange:c,hideLabel:u,extraContent:d,tooltip:f}=e,{currentValue:p,inputType:h,name:g,onChange:m}=s.useContext(c5),v=!!p&&("checkbox"===h?r===p||-1!==p.indexOf(r):r===p);return(0,C.jsx)(zv,{...l,children:(0,C.jsx)(b5,{id:t,label:n,value:r,name:g,className:o,disabled:a,checked:v,onChange:(e,t)=>{null==m||m(e,t),null==c||c(e,t)},hideLabel:u,extraContent:d,tooltip:f})})},x5={"filter-item__input":"filter-item__input-7c8ed8cf","filter-item__label":"filter-item__label-057b50f5","filter-item--disabled":"filter-item--disabled-ad10dc42","filter-item--checked":"filter-item--checked-9af66168","filter-item--positive-main":"filter-item--positive-main-a40378b9","filter-item--important-main":"filter-item--important-main-f57d26aa","filter-item--warning-main":"filter-item--warning-main-5629af6e"},w5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i,background:a}=e,{currentValue:l,inputType:c,name:u,onChange:d}=s.useContext(c5),f=!!l&&("checkbox"===c?r===l||-1!==l.indexOf(r):r===l),p=lc(x5["filter-item"],null==i?void 0:i.className,{[x5["filter-item--disabled"]]:o},{[x5["filter-item--checked"]]:f},{[x5[`filter-item--${a}`]]:!!a});return(0,C.jsxs)(zv,{...i,className:p,children:[(0,C.jsx)("input",{id:t,value:r,name:u,type:c,disabled:o,checked:f,onChange:e=>d(r,null==e?void 0:e.target.checked),className:x5["filter-item__input"]}),(0,C.jsx)("label",{htmlFor:t,className:x5["filter-item__label"],children:n})]})},_5="light-item__input-db1bda86",S5="light-item__label-4502df50",k5="light-item--disabled-ea5955c3",E5="light-item--checked-19c9facc",C5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i}=e,{currentValue:a,inputType:l,name:c,onChange:u}=s.useContext(c5),d=!!a&&("checkbox"===l?r===a||-1!==a.indexOf(r):r===a),f=lc(null==i?void 0:i.className,{[k5]:o},{[E5]:d});return(0,C.jsxs)(zv,{...i,className:f,children:[(0,C.jsx)("input",{id:t,value:r,name:c,type:l,disabled:o,checked:d,onChange:e=>u(r,null==e?void 0:e.target.checked),className:_5}),(0,C.jsx)("label",{htmlFor:t,className:S5,children:n})]})},j5={"selector-item":"selector-item-afa6036a","selector-item__input":"selector-item__input-d671bb71","selector-item__label":"selector-item__label-15347301","selector-item--disabled":"selector-item--disabled-133d2c07","selector-item--checked":"selector-item--checked-3caf6414","selector-item--column":"selector-item--column-cb724fe9","selector-item--column-reverse":"selector-item--column-reverse-1d916d7a","selector-item--row":"selector-item--row-733fd28b","selector-item--row-reverse":"selector-item--row-reverse-89fd4a76"},O5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i,direction:a}=e,{currentValue:l,inputType:c,name:u,onChange:d}=s.useContext(c5),f=!!l&&("checkbox"===c?r===l||-1!==l.indexOf(r):r===l),p=lc(j5["selector-item"],null==i?void 0:i.className,j5[`selector-item--${a}`],{[j5["selector-item--disabled"]]:o},{[j5["selector-item--checked"]]:f});return(0,C.jsxs)(zv,{...i,className:p,children:[(0,C.jsx)("input",{id:t,value:r,name:u,type:c,disabled:o,checked:f,onChange:e=>{null==d||d(r,null==e?void 0:e.target.checked)},className:j5["selector-item__input"]}),(0,C.jsx)("label",{htmlFor:t,className:j5["selector-item__label"],children:n})]})},T5=e=>{const{getLabel:t}=jv(),{id:n,className:r,label:o,required:i,helper:a,items:l,type:c="default",direction:u=("default"===c?"column":"row"),rowProps:d,name:f,inputType:p="radio",value:h,defaultValue:g,onChange:m,hideLabel:v,indeterminateCheck:b,indeterminateCheckProps:y={},...x}=e,{indented:w,..._}=y,S=(null==y?void 0:y.indented)??!0,k=a?(null==a?void 0:a.id)??`${n}-helper`:void 0,E=b&&"default"===c&&"checkbox"===p,[j,O]=s.useState((()=>g||("checkbox"===p?[]:null))),T=(t=e.value)=>!!m&&typeof t<"u",I=T(h)?h:j,R=s.useMemo((()=>0===(null==I?void 0:I.length)),[null==I?void 0:I.length]),P=s.useMemo((()=>{var e;return(null==I?void 0:I.length)===(null==(e=null==l?void 0:l.filter((e=>!e.disabled)))?void 0:e.length)}),[null==I?void 0:I.length,l]),M=s.useMemo((()=>!R&&!P),[P,R]),A=s.useMemo((()=>{const e=P?"all":R?"none":"some";return"string"==typeof b?b:"function"==typeof b?b(e):b?t("all"===e?"table.filter.remove-all":"table.filter.select-all"):""}),[t,b,P,R]),D={name:f,inputType:p,onChange:(e,t)=>{let n=I;n="checkbox"===p&&n?Array.isArray(n)?t?[...n,e]:n.filter((t=>t!==e)):t?[n,e]:[n].filter((t=>t!==e)):e,T()||O(Array.isArray(n)?[...n]:n),null==m||m(n)},currentValue:I};let F,L,N=C5;switch(c){case"default":F=2,L=1,N="checkbox"===p?u5:y5;break;case"selector":F=0,L=0,N=O5;break;case"filter":F=2,L=2,N=w5;break;case"light":F=1,L=1,N=C5}const B=lc(l5["choice-group"],r),z=lc(l5["choice-group__inner"],null==d?void 0:d.className,{[l5["choice-group__inner--indented"]]:E&&S});return(0,C.jsx)(c5.Provider,{value:D,children:(0,C.jsxs)("fieldset",{"data-name":"choice-group",...x,className:B,id:n,name:f,"aria-describedby":k,children:[(0,C.jsx)("legend",{children:(0,C.jsx)(v_,{id:n,label:o,required:i,hideLabel:v,renderWithoutLabel:!0})}),null!=l&&l.length?(0,C.jsxs)(C.Fragment,{children:[E&&(0,C.jsx)(t5,{id:`${n}-indeterminate`,value:"indeterminate",name:"indeterminate",..._,label:A,indeterminate:M,checked:P,onChange:(e,t)=>{var n;const r=P?[]:null==(n=null==l?void 0:l.filter((e=>!e.disabled)))?void 0:n.map((e=>e.value));T()||O([...r]),null==m||m(r)}}),(0,C.jsx)(Bv,{direction:u,gutterX:F,gutterY:L,...d,className:z,children:l.map(((e,t)=>(0,s.createElement)(N,{...e,className:lc(e.className,{[l5["choice-group__item--extra-padding"]]:e.extraContent&&t!==l.length-1}),direction:u,key:e.id})))})]}):(0,C.jsx)("p",{children:t("table.filter.no-options")}),a&&(0,C.jsx)(Ww,{...a,id:k})]})})},I5={"toggle-wrapper":"toggle-wrapper-35cb3798",toggle:"toggle-b7a0206b","toggle--disabled":"toggle--disabled-086a40c0","toggle--active":"toggle--active-f8d436cc","toggle--ghost":"toggle--ghost-b8136f68",toggle__dot:"toggle__dot-6c85a2a2",toggle__icon:"toggle__icon-4a0f4e6c",toggle__spinner:"toggle__spinner-d4f2ba79","toggle--medium":"toggle--medium-ce9bfb2e","toggle--large":"toggle--large-acae3dd1","toggle--alternative":"toggle--alternative-07ba3fde",toggle__label:"toggle__label-cdb29c78","toggle__extra-content":"toggle__extra-content-4f8dda6c"},R5=(0,s.forwardRef)(((e,t)=>{const{ariaLabel:n,className:r,checked:o,defaultChecked:i,onChange:a,size:l=(e.icon?"large":"medium"),color:c="default",type:u,icon:d,disabled:f=!1,isLoading:p=!1,extraContent:h,label:g,...m}=e,[v,b]=s.useState(i||!1),y=s.useMemo((()=>a&&typeof o<"u"?o:v),[a,v,o]),x=lc(I5.toggle,I5[`toggle--${l}`],I5[`toggle--${c}`],{[I5["toggle--active"]]:y,[I5["toggle--disabled"]]:f,[I5[`toggle--${u}`]]:u},r),w=()=>{if(p)return;const e=!y;typeof o>"u"&&b(e),null==a||a(e)},_={noStyle:!0,type:"button","aria-label":n,"aria-pressed":y,disabled:f,"aria-disabled":p,...m,onClick:w};return(0,C.jsxs)("div",{className:I5["toggle-wrapper"],children:[(0,C.jsx)(q2,{..._,onClick:e=>{var t;null==(t=null==m?void 0:m.onClick)||t.call(m,e),w()},ref:t,"data-name":"toggle",className:x,children:(0,C.jsx)("span",{className:I5.toggle__dot,children:p?(0,C.jsx)(Tv,{size:"large"===l?16:10,className:lc(I5.toggle__icon,I5.toggle__spinner)}):d?(0,C.jsx)(H2,{className:I5.toggle__icon,name:y?"lock_open_right":"lock",size:16}):null})}),g&&(0,C.jsx)(q2,{..._,className:I5.toggle__label,"aria-hidden":!0,tabIndex:-1,children:g}),h&&(0,C.jsx)("div",{className:I5["toggle__extra-content"],children:h})]})}));R5.displayName="Toggle";const P5={table:"table-95e2ce2d","th--sortable":"th--sortable-e9907825",sort__button:"sort__button-98f3f530",sort__icon:"sort__icon-1c37fdff",filter__icon:"filter__icon-a6408ada","sort__icon--active":"sort__icon--active-ed6767d3","filter__icon--active":"filter__icon--active-d14db408","sort__icon--asc":"sort__icon--asc-9ed20154","sort__icon--desc":"sort__icon--desc-24ef5b2b","table__row--border-hidden":"table__row--border-hidden-35904e21","table__row--clickable":"table__row--clickable-43b04ec0","table--vertical-align-base-line":"table--vertical-align-base-line-85bbb2f6","table--hidden-bottom-border":"table--hidden-bottom-border-4334c76e","table--footer-bottom-border":"table--footer-bottom-border-d33045fd","table--small":"table--small-1ae7cbce",table__expand:"table__expand-19801588","table__row--group-header":"table__row--group-header-70657dcd","table__row--group-item":"table__row--group-item-d18f21ab","table__row--last-group-item":"table__row--last-group-item-7b3a8250",filter__content:"filter__content-e28d0f6a",filter__button:"filter__button-0c3bdad8",filter__indeterminate:"filter__indeterminate-f266331a","sticky-column":"sticky-column-c4a00eca","sticky-column--left":"sticky-column--left-4e599e4b","sticky-column--right":"sticky-column--right-3dfd1c9b"};function M5(e="row-selection",t){return{id:e,header:({table:n})=>t?(0,C.jsx)(Ev.Consumer,{children:({getLabel:t})=>{const r=t("table.select-all"),o="string"==typeof r?r:r(n.getIsAllRowsSelected());return(0,C.jsx)(t5,{id:`${e}-header`,label:o,hideLabel:!0,value:"row-expander-header",name:`${e}-header`,checked:n.getIsAllRowsSelected(),indeterminate:n.getIsSomeRowsSelected(),onChange:()=>n.toggleAllRowsSelected()})}}):null,cell:({row:t})=>(0,C.jsx)(Ev.Consumer,{children:({getLabel:n})=>{const r=n("table.select-row"),o="string"==typeof r?r:r(t.getIsSelected());return t.getCanSelect()?(0,C.jsx)(t5,{id:`${e}-${t.id}`,name:`${e}-${t.id}`,label:o,hideLabel:!0,value:`${e}-${t.id}`,checked:t.getIsSelected(),onChange:()=>t.toggleSelected()}):null}}),size:18,maxSize:18,minSize:18}}const A5=(e,t)=>"string"!=typeof t&&"number"!=typeof t||(null==e?void 0:e.toLowerCase().includes(String(t).toLowerCase())),D5=(e,t)=>e===t,F5=(e,t)=>null==e?void 0:e.some((e=>e===t)),L5=(e,t)=>{const n=t?Sc(t):null,r=null!=e&&e.from?Sc(e.from):null,o=null!=e&&e.to?Sc(e.to):null;return!((r||o)&&!n)&&(r&&!o?r.isSameOrBefore(n,"day"):!r&&o?o.isSameOrAfter(n,"day"):!r||!o||r.isSameOrBefore(n,"day")&&o.isSameOrAfter(n,"day"))},N5=(e,t)=>{if("object"!=typeof t||!Object.keys(t).includes("from")||!Object.keys(t).includes("to"))return console.error("Accessor function should return an object { from: Dayjs | Date | string | null | undefined, to: Dayjs | Date | string | null | undefined }"),!0;const n=t,r=null!=e&&e.from?Sc(e.from):null,o=null!=e&&e.to?Sc(e.to):null,i=null==n?void 0:n.from,a=null==n?void 0:n.to;return r&&o?i&&a?r.isSameOrBefore(i,"day")&&o.isSameOrAfter(i,"day")||o.isSameOrAfter(a,"day")&&r.isSameOrBefore(a,"day"):i?r.isSameOrBefore(i,"day")&&o.isSameOrAfter(i,"day"):!!a&&(r.isSameOrBefore(a,"day")&&o.isSameOrAfter(a,"day")):r&&!o?a?r.isSameOrBefore(a,"day"):!!i&&r.isSameOrBefore(i,"day"):!(!r&&o)||(i?o.isSameOrAfter(i,"day"):!!a&&o.isSameOrAfter(a,"day"))},B5=(e,t,n,r)=>{var o;return r(n,null==(o=null==e?void 0:e.getValue)?void 0:o.call(e,t))},z5=s.createContext({isLoading:!1,isError:!1,table:null,id:"",hideRowBorder:!1}),$5={pagination__wrapper:"pagination__wrapper-017154aa",pagination__pages:"pagination__pages-29b0da46",pagination__page:"pagination__page-8588d7aa","pagination__page--current":"pagination__page--current-db7cb2cd","pagination__arrow-item":"pagination__arrow-item-e073424c",pagination__arrow:"pagination__arrow-f7602a28"},V5=({type:e})=>{const{table:t}=s.useContext(z5),{getLabel:n}=jv(),{getCanPreviousPage:r,getCanNextPage:o,nextPage:i,previousPage:a,toggleAllRowsExpanded:l}=t,c="next"===e;return(0,C.jsx)("li",{className:$5["pagination__arrow-item"],children:(0,C.jsxs)("button",{type:"button",className:$5.pagination__arrow,disabled:c?!o():!r(),onClick:()=>{c?i():a(),l(!1)},children:[(0,C.jsx)("span",{className:"visually-hidden",children:n(`pagination.${c?"next":"prev"}-page`)}),(0,C.jsx)(H2,{name:c?"arrow_forward":"arrow_back",size:16})]})})},H5=({item:e})=>{const{table:t}=s.useContext(z5),{getLabel:n}=jv(),r=n("pagination.page"),{setPageIndex:o,toggleAllRowsExpanded:i}=t,a=e.page||0;return(0,C.jsx)("li",{children:(0,C.jsx)("button",{...e,type:"button",className:lc($5.pagination__page,{[$5["pagination__page--current"]]:e.selected}),"aria-label":"string"==typeof r?r:r(a,e.selected),onClick:()=>{o(a-1),i(!1)},children:a})})},K5=e=>{const{getLabel:t}=jv(),{table:n,id:r}=s.useContext(z5),o=t("pagination.results"),{setPageSize:i,getState:a,getPageCount:l}=n,{pageIndex:c,pageSize:u}=a().pagination,d=[{value:"5",label:"5"},{value:"10",label:"10"},{value:"20",label:"20"},{value:"50",label:"50"},{value:"100",label:"100"}],f=Math.ceil(e.totalRows/u),{paginationItems:p}=(e=>{const{boundaryCount:t=1,count:n=5,page:r,siblingCount:o=1}=e,i=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},a=i(1,Math.min(t,n)),s=i(Math.max(n-t+1,t+1),n),l=Math.max(Math.min(r-o,n-t-2*o-1),t+2),c=Math.min(Math.max(r+o,t+2*o+2),s.length>0?s[0]-2:n-1),u=["previous",...a,...l>t+2?["ellipsis"]:t+1<n-t?[t+1]:[],...i(l,c),...c<n-t-1?["ellipsis"]:n-t>t?[n-t]:[],...s,"next"],d=e=>{switch(e){case"previous":return r-1;case"next":return r+1;default:return null}};return{paginationItems:u.map((e=>"number"==typeof e?{type:"page",page:e,selected:e===r,"aria-current":e===r?"true":void 0}:{type:e,page:d(e),selected:!1}))}})({page:c+1,count:f}),h=d.find((e=>e.value===String(u)))??{value:String(u),label:String(u)};return(0,C.jsxs)("div",{className:$5.pagination__wrapper,children:[(0,C.jsxs)(z2,{color:"muted",modifiers:"small",children:[e.totalRows," ","string"==typeof o?o:o(e.totalRows)]}),l()>1&&(0,C.jsx)("nav",{role:"navigation","aria-label":t("pagination.title"),className:$5.pagination,children:(0,C.jsx)("ul",{className:$5.pagination__pages,children:p.map(((e,t)=>((e,t)=>"previous"===e.type||"next"===e.type?(0,C.jsx)(V5,{type:e.type},t):"ellipsis"===e.type?(0,C.jsx)("li",{className:lc($5.pagination__page),children:"..."},t):(0,C.jsx)(H5,{item:e},t))(e,t)))})}),(0,C.jsx)(s5,{id:`page-size-${r}`,label:t("pagination.page-size"),hideLabel:!0,isSearchable:!1,isClearable:!1,onChange:e=>(e=>{const t=parseInt((null==e?void 0:e.value)||"10");i(t)})(e),value:h,size:"small",options:d})]})},U5=e=>{const{icon:t="spa",className:n,children:r,cardProps:o,isNested:i,rowProps:a,...l}=e,c=L2(["mobile","tablet"]),{padding:u=(i?0:c?1:1.5),background:d=(i?void 0:c?"bg-subtle":"white"),...f}=o??{};return(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)(r3,{"data-name":"placeholder",...l,className:n,borderless:i,padding:u,background:d,...f,children:(0,C.jsx)(i3,{children:(0,C.jsxs)(Bv,{direction:"column",alignItems:"center",gutter:2,...a,children:[t&&(0,C.jsx)(zv,{width:"auto",children:(e=>{const t={size:36,className:lc("text-primary")},n="string"==typeof e?{...t,name:e}:"object"!=typeof e||s.isValidElement(e)?void 0:{...t,...e,className:lc(t.className,null==e?void 0:e.className)};return n?(0,C.jsx)(H2,{...n}):e})(t)}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(z2,{color:"muted",modifiers:"center",element:"div",children:r})})]})})})})},G5=s.createContext({column:null,rows:null,values:null,open:!1,setOpen:null}),W5=()=>{var e,t,n,r,o;const{getLabel:i}=jv(),{column:a,open:l,setOpen:c,values:u}=s.useContext(G5),d={dateRangeField:null==u?void 0:u.dateRange},f=null==(e=null==a?void 0:a.columnDef)?void 0:e.meta,p=(null==f?void 0:f.startDatePicker)??{},h=(null==f?void 0:f.endDatePicker)??{},g=i("table.filter"),m=i("table.filter.from"),v=i("table.filter.to"),b=`filter-date-${null==a?void 0:a.id}-from`,y=`filter-date-${null==a?void 0:a.id}-to`,x=i("table.filter.validation.to-before-from"),w=P1().shape({dateRangeField:P1().shape({from:w1().defined().nullable(),to:w1().defined().nullable().test("to-before-from",x,(function(e){const{from:t}=this.parent;return!(e&&t&&Sc(e).isBefore(Sc(t),"day"))}))})}),{values:_,errors:S,setFieldValue:k,handleReset:E,handleSubmit:j}=s0({initialValues:d,validationSchema:w,onSubmit:e=>{null==a||a.setFilterValue(e.dateRangeField),null==c||c(!1)},onReset:()=>{null==a||a.setFilterValue(""),null==c||c(!1)}});return s.useEffect((()=>{var e;if(l&&!_.dateRangeField){const t=document.getElementById(b);null==(e=null==t?void 0:t.focus)||e.call(t,{preventScroll:!0})}}),[null==a?void 0:a.id,_.dateRangeField,l,b]),(0,C.jsx)("form",{onSubmit:j,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)(z2,{modifiers:"h5",children:g}),(0,C.jsx)(H3,{id:b,label:m,...p,name:m,value:null!=(t=_.dateRangeField)&&t.from?Sc(_.dateRangeField.from):null,input:{autoComplete:"off"},onChange:e=>{var t,n;k("dateRangeField.from",(null==e?void 0:e.toISOString())??null),e&&null!=(t=_.dateRangeField)&&t.to&&Sc(e).isAfter(Sc(null==(n=_.dateRangeField)?void 0:n.to),"day")&&k("dateRangeField.to",null)}}),(0,C.jsx)(H3,{id:y,label:v,shouldDisableDate:e=>{var t,n;return!(null==(t=_.dateRangeField)||!t.from||!Sc(e).isBefore(Sc(null==(n=_.dateRangeField)?void 0:n.from),"day"))},...h,name:v,value:null!=(n=_.dateRangeField)&&n.to?Sc(null==(r=_.dateRangeField)?void 0:r.to):null,input:{autoComplete:"off"},onChange:e=>k("dateRangeField.to",(null==e?void 0:e.toISOString())??null),helper:null!=(o=S.dateRangeField)&&o.to?{text:S.dateRangeField.to,type:"error"}:void 0}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:E,children:i("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:i("table.filter")})})]})]})})},q5=e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.filter(Boolean))?void 0:t.filter(((e,t,n)=>(null==n?void 0:n.indexOf(e))===t)))?void 0:n.sort(((e,t)=>{var n;return"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?null==(n=null==e?void 0:e.localeCompare)?void 0:n.call(e,t):0}))},Y5=()=>{var e,t,n,r;const{getLabel:o}=jv(),{column:i,rows:a,setOpen:l,values:c}=s.useContext(G5),u=o("table.filter"),d=null==(e=null==i?void 0:i.columnDef)?void 0:e.filterFn,f="select"===d?"selectFilter":"multiSelectFilter",p={inputType:d,selectFilter:null==c?void 0:c.selectField,multiSelectFilter:null==c?void 0:c.multiSelectField},h=null==(t=null==i?void 0:i.columnDef)?void 0:t.meta,g=null==h?void 0:h.filterOptions,m=e=>"object"==typeof e&&null!==e&&"id"in e&&"label"in e&&"value"in e,v=null!=a&&a.length&&"string"==typeof(null==(n=null==i?void 0:i.columnDef)?void 0:n.id)?a.map((e=>{var t,n;return null==(n=null==e?void 0:e.getValue)?void 0:n.call(e,null==(t=null==i?void 0:i.columnDef)?void 0:t.id)})):[],b=null!=g&&g.length?m(g[0])?g:q5(g):q5(v),y=null==b?void 0:b.map(((e,t)=>{var n;return m(e)?e:{id:`${null==(n=null==i?void 0:i.columnDef)?void 0:n.id}-choice-${t}`,label:String(e),value:String(e)}})),{values:x,setFieldValue:w,handleReset:_,handleSubmit:S,errors:k}=s0({initialValues:p,onSubmit:e=>{var t;null==i||i.setFilterValue(null!=(t=e[f])&&t.length?e[f]:""),null==l||l(!1)},onReset:()=>{null==i||i.setFilterValue(""),null==l||l(!1)}});return(0,C.jsx)("form",{onSubmit:S,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)($2,{element:"h6",children:o("table.filter")}),(0,C.jsx)(r3,{className:P5.filter__content,children:(0,C.jsx)(i3,{children:(0,C.jsx)(T5,{id:`filter-${f}-${null==i?void 0:i.id}`,name:u,label:u,hideLabel:!0,inputType:"select"===d?"radio":"checkbox",size:"small",value:x[f],indeterminateCheck:!0,indeterminateCheckProps:{indented:!1,className:P5.filter__indeterminate},items:y,onChange:e=>w(f,e),helper:0!==(null==(r=k[f])?void 0:r.length)?{text:k[f],type:"error"}:{text:""}})})}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:_,children:o("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:o("table.filter")})})]})]})})},J5=()=>{const{getLabel:e}=jv(),{column:t,open:n,setOpen:r,values:o}=s.useContext(G5),i={filter:null==o?void 0:o.filter},a=`text-filter-${null==t?void 0:t.id}`,l=e("table.filter"),c=e("search"),u=e("table.filter.validation.min-length"),d="string"==typeof u?u:u(3),f=P1().shape({filter:w1().notRequired().matches(/^(?!\s+$).*/,e("table.filter.validation.no-spaces")).min(3,d).nullable().transform((e=>e||null))}),{values:p,setFieldValue:h,handleReset:g,handleSubmit:m,touched:v,errors:b}=s0({initialValues:i,validationSchema:f,onSubmit:e=>{null==t||t.setFilterValue(e.filter),null==r||r(!1)},onReset:()=>{null==t||t.setFilterValue(""),null==r||r(!1)}});return s.useEffect((()=>{var e;if(n&&!p.filter){const t=document.getElementById(a);null==(e=null==t?void 0:t.focus)||e.call(t,{preventScroll:!0})}}),[null==t?void 0:t.id,p.filter,n,a]),(0,C.jsx)("form",{onSubmit:m,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)(y_,{id:a,label:l,placeholder:c,icon:"close",onIconClick:g,value:p.filter||"",onChange:e=>h("filter",e),helper:v.filter&&b.filter?{text:b.filter,type:"error"}:{text:d},input:{autoComplete:"off"}}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:g,children:e("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:e("table.filter")})})]})]})})},X5=e=>{const{column:t,rows:n}=e,[r,o]=s.useState(!1),{getLabel:i}=jv(),a=t.columnDef.filterFn,l=t.getFilterValue(),c=e=>"string"==typeof e,u=e=>Array.isArray(e),d=e=>"object"==typeof e&&null!==e&&("from"in e||"to"in e),f=s.useMemo((()=>({filter:"auto"!==a&&"text"!==a||!c(l)?"":l,selectField:"select"===a&&c(l)?l:"",multiSelectField:"multi-select"===a&&u(l)?l:[],dateRange:["date-range","date-range-period"].includes(a)&&d(l)?l:{from:null,to:null}})),[a,l]);return(0,C.jsx)(G5.Provider,{value:{column:t,rows:n,values:f,open:r,setOpen:o},children:(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(p3,{openWith:"click",open:r,onToggle:o,focusManager:{order:["content"],initialFocus:0,modal:!0},children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{visualType:"link",icon:{name:"filter_alt",className:lc(P5.filter__icon,{[P5["filter__icon--active"]]:!!t.getFilterValue()||r})},className:lc(P5.filter__button,"show-print"),children:(0,C.jsx)("span",{className:"sr-only",children:i("table.filter")})})}),(0,C.jsx)(h3,{maxWidth:"large",cardProps:{padding:{horizontal:1,vertical:.5}},children:(()=>{switch(a){case"date-range":case"date-range-period":return(0,C.jsx)(W5,{});case"multi-select":case"select":return(0,C.jsx)(Y5,{});default:return(0,C.jsx)(J5,{})}})()})]})})})},Z5=()=>{const{table:e,loadingLabel:t}=s.useContext(z5),n=(null==e?void 0:e.getState().pagination.pageSize)||10,r=n===e4?10:n;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("tr",{className:"sr-only",children:(0,C.jsx)("td",{children:t})}),Array.from(Array(r).keys()).map((t=>(0,C.jsx)("tr",{"aria-hidden":!0,children:Array.from(Array(null==e?void 0:e.getAllColumns().length).keys()).map((e=>(0,C.jsx)("td",{children:(0,C.jsx)(Hw,{width:100,height:21})},e)))},t)))]})},Q5=()=>{var e;const{getLabel:t}=jv(),{table:n,id:r,caption:o,renderSubComponent:i,isFooterVisible:a,renderGroupHeading:l,onRowClick:c,isLoading:u,isError:d,hideRowBorder:f,placeholder:p,errorPlaceholder:h,size:g}=s.useContext(z5);if(null===n)return null;const{getHeaderGroups:m,getFooterGroups:v,getRowModel:b}=n,y=t("table.sort"),x=(e,t)=>{const n=lc(P5.sort__icon,{[P5["sort__icon--active"]]:!!e,[P5["sort__icon--desc"]]:"desc"===e,[P5["sort__icon--asc"]]:"asc"===e});return(0,C.jsx)(tu,{visibility:"show",children:(0,C.jsx)(q2,{visualType:"link",icon:{name:e?"expand_more":"unfold_more",className:n},className:lc(P5.sort__button),onClick:t,children:(0,C.jsx)("span",{className:"sr-only",children:"string"==typeof y?y:y(e)})})})},w=e=>{const t=null==e?void 0:e.findIndex((e=>e.column.columnDef.footer));return(-1!==t?t:null==e?void 0:e.length)+1},_=()=>{let e;return b().rows.map(((t,n)=>{const{rowGroupKey:r,...o}=t.original,i=r=>{var o;return{...t,original:{...r,rowClassName:lc(r.rowClassName,P5["table__row--group-item"],{[P5["table__row--last-group-item"]]:(null==(o=b().rows[n+1])?void 0:o.original.rowGroupKey)!==e})}}};return r&&e!==r?(e=r,i(t.original)):r?i(o):(e=r,t)}))},S=e=>{var t;return(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(Bv,{justifyContent:"end",alignItems:"center",gutter:1,children:[e.column.getCanFilter()?(0,C.jsx)(X5,{column:e.column,rows:null==(t=null==n?void 0:n.getCoreRowModel())?void 0:t.rows}):null,e.column.getCanSort()&&(0,C.jsx)(zv,{align:"center",width:"auto",children:x(e.column.getIsSorted(),e.column.getToggleSortingHandler())})]})})},k=e=>{var t;const n=e.original.CustomRowComponent;return(0,C.jsxs)(s.Fragment,{children:[e.original.rowGroupKey&&(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsx)("tr",{className:lc(null==(t=e.original.rowClassName)?void 0:t.replace(P5["table__row--group-item"],"").replace(P5["table__row--last-group-item"],""),P5["table__row--group-header"],{[P5["table__row--border-hidden"]]:f}),children:l?l(e):(0,C.jsx)("td",{colSpan:e.getVisibleCells().length,children:e.original.rowGroupKey})})}),n?(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)(n,{...e})}):(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)("tr",{className:lc(e.original.rowClassName,{[P5["table__row--clickable"]]:!!e.original.onClick||!!c,[P5["table__row--border-hidden"]]:f}),onClick:()=>(e=>{var t,n;null==(n=(t=e.original).onClick)||n.call(t,e.original),null==c||c(e.original)})(e),children:e.getVisibleCells().map((e=>(0,C.jsx)("td",{style:{width:e.column.getSize()},className:lc({[P5["sticky-column"]]:e.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===e.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===e.column.getIsPinned()}),children:pX(e.column.columnDef.cell,e.getContext())},e.id)))})}),e.getIsExpanded()&&i?(0,C.jsx)(tu,{breakBefore:"avoid",children:null==i?void 0:i(e)}):null]},e.id)};return(0,C.jsxs)("table",{id:r,children:[o&&(0,C.jsx)("caption",{className:"sr-only",children:o}),(0,C.jsx)("thead",{children:m().map((e=>(0,C.jsx)("tr",{children:e.headers.map((e=>(0,C.jsx)("th",{scope:"col",style:{width:e.getSize()},className:lc({[P5["th--sortable"]]:e.column.getCanSort(),[P5["sticky-column"]]:e.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===e.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===e.column.getIsPinned()}),"aria-sort":"asc"===e.column.getIsSorted()?"ascending":"desc"===e.column.getIsSorted()?"descending":void 0,children:e.isPlaceholder?null:(0,C.jsxs)(Bv,{gutter:"small"===g?2:void 0,alignItems:"center",justifyContent:"between",wrap:"nowrap",children:[(0,C.jsx)(zv,{onClick:e.column.getToggleSortingHandler(),children:pX(e.column.columnDef.header,e.getContext())}),(e.column.getCanFilter()||e.column.getCanSort())&&S(e)]})},e.id)))},e.id)))}),(0,C.jsx)("tbody",{children:u?(0,C.jsx)(Z5,{}):null!=(e=_())&&e.length?_().map((e=>k(e))):(()=>{const e=d?(0,C.jsx)(U5,{...h}):(0,C.jsx)(U5,{...p});return(0,C.jsx)("tr",{children:(0,C.jsx)("td",{colSpan:null==n?void 0:n.getAllColumns().length,children:e})})})()}),a&&(0,C.jsx)("tfoot",{children:v().map((e=>(0,C.jsx)("tr",{children:e.headers.map(((t,n)=>t.column.columnDef.footer?(0,C.jsx)("th",{scope:"col",colSpan:w(e.headers.slice(n+1)),className:lc({[P5["sticky-column"]]:t.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===t.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===t.column.getIsPinned()}),children:t.isPlaceholder?null:pX(t.column.columnDef.footer,t.getContext())},t.id):null))},e.id)))})]})},e4=1e4,t4=[];function n4(e){const{getLabel:t}=jv(),{id:n,data:r,columns:o,caption:i,columnFilters:a,onColumnFiltersChange:l,cardProps:{padding:c=0,...u}={},hidePagination:d,defaultPagination:f={pageIndex:0,pageSize:d?e4:10},pagination:p,manualPagination:h=!!e.pagination,manualSorting:g=!!e.sorting,manualFiltering:m=!!e.columnFilters,sorting:v,defaultSorting:b=[],defaultExpanded:y={},autoResetPageIndex:x,onPaginationChange:w,onSortingChange:_,rowSelection:S,onRowSelectionChange:k,enableRowSelection:E,defaultColumnVisibility:j={},columnVisibility:O,onColumnVisibilityChange:T,columnPinning:I,onColumnPinningChange:R,getRowId:P,onRowClick:M,defaultRowSelection:A,totalRows:D,renderSubComponent:F,getRowCanExpand:L,groupRowsBy:N,renderGroupHeading:B,isLoading:z=!1,isError:$=!1,placeholder:V,errorPlaceholder:H,loadingLabel:K=t("table.loading"),verticalAlign:U="middle",enableFilters:G=!1,enableSorting:W=!0,hideRowBorder:q=!1,size:Y="medium",hideCardBorder:J,...X}=e,Z=s.useMemo((()=>(null!=r&&r.length?r:t4)??t4),[r]),Q=au(),[{pageIndex:ee,pageSize:te},ne]=s.useState(f),[re,oe]=s.useState(b),[ie,ae]=s.useState(y),[se,le]=s.useState(A||{}),[ce,ue]=s.useState([]),[de,fe]=s.useState(j),[pe,he]=s.useState({left:[],right:[]}),ge=s.useMemo((()=>!!Q||ie),[ie,Q]),me=s.useMemo((()=>p||{pageIndex:ee,pageSize:te}),[ee,te,p]),ve=s.useMemo((()=>v||re),[re,v]),be=s.useMemo((()=>a||ce),[ce,a]),ye=s.useMemo((()=>S||se),[se,S]),xe=s.useMemo((()=>O||de),[de,O]),we=s.useMemo((()=>I||pe),[pe,I]),_e=s.useMemo((()=>{const e=(null==Z?void 0:Z.map((e=>"string"==typeof N?{...e,rowGroupKey:e[N]}:N?{...e,rowGroupKey:N(e)}:e)))??[];return e.reduce(((t,n)=>(n.rowGroupKey&&t.keys.includes(n.rowGroupKey)||(n.rowGroupKey?(t.keys=[...t.keys,n.rowGroupKey],t.list=[...t.list,...e.filter((e=>e.rowGroupKey===n.rowGroupKey))]):t.list=[...t.list,n]),t)),{keys:[],list:[]}).list}),[Z,N]),Se=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=s.useState((()=>({current:uX(t)}))),[r,o]=s.useState((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:_e,columns:o,state:{rowSelection:ye,columnFilters:be,pagination:me,sorting:ve,expanded:ge,columnVisibility:xe,columnPinning:we},manualSorting:g,manualFiltering:m,pageCount:p&&D?Math.ceil(D/p.pageSize):void 0,autoResetPageIndex:x,onRowSelectionChange:e=>{if("function"!=typeof e)return;const t=e(ye);S&&k?k(t):le(t)},enableRowSelection:E,onExpandedChange:ae,onPaginationChange:e=>{if("function"!=typeof e)return;const t=e(me);p&&w?w(t):ne(t)},onSortingChange:e=>{if("function"!=typeof e)return;const t=e(ve);v&&_?_(t):oe(t)},onColumnFiltersChange:e=>{if("function"!=typeof e)return;const t=e(be);a&&l?l(t):ue(t)},onColumnVisibilityChange:e=>{if("function"!=typeof e)return;const t=e(xe);O&&T?T(t):fe(t)},onColumnPinningChange:e=>{if("function"!=typeof e)return;const t=e(we);I&&R?R(t):he(t)},getCoreRowModel:e=>vJ((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;l<t.length;l++){const c=SJ(e,e._getRowId(t[l],l,i),t[l],l,o,0,null==i?void 0:i.id);var s;n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=c.originalSubRows)&&s.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return a};return n.rows=r(t),n}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>vJ((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r<i.length;r+=1){var n;const o=i[r],s=a[o.id],l=s.sortUndefined,c=null!=(n=null==o?void 0:o.desc)&&n;let u=0;if(l){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;u=n&&r?0:n?l:-l}}if(0===u&&(u=s.sortingFn(e,t,o.id)),0!==u)return c&&(u*=-1),s.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>vJ((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:i,flatRows:a,rowsById:s}=n;const l=r*o,c=l+r;let u;i=i.slice(l,c),u=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:s}:dX({rows:i,flatRows:a,rowsById:s}),u.flatRows=[];const d=e=>{u.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return u.rows.forEach(d),u}),bJ(e.options,"debugTable")),getFilteredRowModel:e=>vJ((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach((t=>{var n;const r=e.getColumn(t.id);if(!r)return;const i=r.getFilterFn();i&&o.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value})}));const a=(n??[]).map((e=>e.id)),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,u;r&&s&&l.length&&(a.push("__global__"),l.forEach((e=>{var t;i.push({id:e.id,filterFn:s,resolvedValue:null!=(t=null==s.resolveFilterValue?void 0:s.resolveFilterValue(r))?t:r})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){c=o[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){u=i[e];const t=u.id;if(u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return fX(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[t]])return!1;return!0}),e)}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getExpandedRowModel:e=>vJ((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?dX(t):t),bJ(e.options,"debugTable")),getRowCanExpand:L,getSubRows:e=>e.subRows,manualPagination:h,enableFilters:G,enableSorting:W,getRowId:P,filterFns:{text:(e,t,n)=>B5(e,t,n,A5),select:(e,t,n)=>B5(e,t,n,D5),"multi-select":(e,t,n)=>B5(e,t,n,F5),"date-range":(e,t,n)=>B5(e,t,n,L5),"date-range-period":(e,t,n)=>B5(e,t,n,N5)}}),ke=!!Se.getFooterGroups().find((e=>!!e.headers.find((e=>e.column.columnDef.footer)))),Ee=!(J||!d||ke),Ce=!q&&ke&&!d,je=lc(P5.table,P5[`table--vertical-align-${U}`],P5[`table--${Y}`],{[P5["table--hidden-bottom-border"]]:Ee,[P5["table--footer-bottom-border"]]:Ce}),Oe=(e,n)=>{const{children:r=t(`table.${e}`),isNested:o=!0,icon:i=("error"===e?"error":void 0),cardProps:{padding:a=1,...s}={},...l}=n||{cardProps:{}};return{children:r,isNested:o,icon:i,cardProps:{padding:a,...s},...l}};return(0,C.jsx)(z5.Provider,{value:{table:Se,id:n,caption:i,onRowClick:M,renderSubComponent:F,isFooterVisible:ke,renderGroupHeading:B,placeholder:Oe("empty",V),errorPlaceholder:Oe("error",H),loadingLabel:K,isLoading:z,isError:$,hideRowBorder:q,size:Y},children:(0,C.jsx)(r3,{"data-name":"table",...X,borderless:J,padding:c,...u,children:(0,C.jsxs)(i3,{children:[(0,C.jsx)("div",{className:je,children:(0,C.jsx)(Q5,{})}),!d&&Se&&(0,C.jsx)(K5,{totalRows:D||Se.getFilteredRowModel().rows.length})]})})})}s.createContext({openItems:void 0,showIcons:void 0}),s.createContext({currentTab:"",setCurrentTab:()=>null}),s.createContext({onItemOpen:()=>null}),s.createContext({index:0,title:null});const r4={"accordion__item-wrapping-heading":"accordion__item-wrapping-heading-45345260","accordion__item-header":"accordion__item-header-26962561","accordion__item--open":"accordion__item--open-52bf4ec2",accordion__item:"accordion__item-c7a360bc","accordion__item--disabled":"accordion__item--disabled-ca60e759","accordion__item-content":"accordion__item-content-4c915498"},o4=s.createContext({isOpen:()=>!0,onToggle:()=>null}),i4=e=>{const{children:t,className:n,openItem:r,gutter:o=.5,onToggleItem:i,defaultOpenItem:a=[],...l}=e,c=r||a,[u,d]=s.useState(c);return(0,C.jsx)(o4.Provider,{value:{isOpen:e=>(i&&typeof r<"u"?r:u).includes(e),onToggle:t=>{if(i)return i(t);((t=e.openItem)=>!!i&&typeof t<"u")(r)||d((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))}},children:(0,C.jsx)("div",{"data-name":"accordion",...l,className:lc(r4.accordion,n),children:(0,C.jsx)(Kv,{size:o,children:t})})})},a4=s.createContext({id:"",disabled:!1}),s4=e=>{const{children:t,className:n,id:r,disabled:o=!1,borderType:i,selected:a=!1,border:l="border-default",...c}=e,{onToggle:u,isOpen:d}=s.useContext(o4),f=lc(r4.accordion__item,n,{[r4["accordion__item--disabled"]]:o,[r4["accordion__item--open"]]:d(r)}),p=a||"primary"===i?"primary-main":l;return(0,C.jsx)(a4.Provider,{value:{id:r,disabled:o},children:(0,C.jsx)(A1,{id:r,onMatch:e=>{o||u(e)},children:(0,C.jsx)(r3,{"data-name":"accordion-item",border:p,className:f,...c,children:t})})})},l4=e=>{const{children:t,className:n,...r}=e,{isOpen:o}=s.useContext(o4),{id:i,disabled:a}=s.useContext(a4),l=au(),c=lc(r4["accordion__item-content"],n),u=(0,C.jsx)(i3,{"data-name":"accordion-item-content",...r,className:c,children:t});return l&&!a?u:(0,C.jsx)(Dv,{duration:300,height:o(i)?"auto":0,role:"region","aria-labelledby":i,id:`${i}-content`,children:u})},c4="toggle--open-31d6b84d",u4="toggle--close-8f1101e9",d4=({openText:e,closeText:t,isOpen:n,iconRight:r,...o})=>{const i=lc({[c4]:n},{[u4]:!n},null==r?void 0:r.className);return(0,C.jsx)(q2,{"data-name":"button",iconRight:{...r,className:i,name:"expand_more"},...o,children:n?t:e})},f4=e=>{var t;const{children:n,className:r,background:o="white",openText:i,closeText:a,...l}=e,[c,u]=s.useState(!1),{onToggle:d,isOpen:f}=s.useContext(o4),{id:p,disabled:h}=s.useContext(a4),g=()=>{h||d(p)},m=e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),g())},v=e=>{h||u(e)},b=lc(r4["accordion__item-header"],r),y=1===(null==(t=s.Children.toArray(n))?void 0:t.length)?s.Children.toArray(n).find((e=>s.isValidElement(e)&&(e.type===$2||e.type===z2&&["h1","h2","h3","h4","h5","h6"].includes(e.props.element)))):void 0,x=s.useMemo((()=>{switch(o){case"primary":return f(p)?"primary-active":"primary-main";case"white/primary":return f(p)?"primary-active":"white";case"muted/primary":return f(p)?"primary-active":"bg-muted";default:return o}}),[o,p,f]),w="white"===x||"bg-muted"===x?void 0:"inverted",_=e=>(0,C.jsx)(o3,{"data-name":"accordion-item-header",role:"button",tabIndex:h?-1:0,"aria-disabled":h,className:b,onClick:g,onKeyDown:m,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),"aria-expanded":f(p),"aria-controls":`${p}-content`,background:x,...l,children:i&&a&&!h?(0,C.jsxs)(Bv,{justifyContent:"between",alignItems:"center",children:[(0,C.jsx)(zv,{children:e}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(d4,{openText:i,closeText:a,isActive:c,isOpen:f(p),color:w,visualType:"link","aria-hidden":!0,tabIndex:-1})})]}):e});return y?(()=>{const{element:e,children:t,...n}=(null==y?void 0:y.props)??{};return(0,C.jsx)($2,{element:e,modifiers:"normal",className:r4["accordion__item-wrapping-heading"],children:_((0,C.jsx)(z2,{element:"span",...n,children:t}))})})():_(n)},p4=require("@tanstack/react-table"),h4=e=>{var t;let{visible:n,toggleVisible:r,title:o,size:i,primaryText:a,secondaryText:s,tertiaryText:l,onPrimary:c,onSecondary:u,onTertiary:d,children:f,primaryDisabled:p=!1,tertiaryDisabled:h=!1,tertiaryIconLeft:g,primaryColor:m,cardProps:v,withoutCardHeader:b=!1,tertiaryColor:y,tertiaryVisualType:x,notification:w,isLoading:_}=e;const S=(0,N.useIntl)();return(0,C.jsx)(w3,{open:n,onToggle:r,children:(0,C.jsxs)(S3,{"aria-labelledby":"label",hideCloseButton:!0,size:null!=i?i:6,cardProps:v,children:[!b&&(0,C.jsx)(o3,{background:"white",children:(0,C.jsx)($2,{element:"h2",modifiers:"h3",color:"default",children:S.formatMessage({id:o})})}),w&&(0,C.jsx)(l3,{title:w.title,type:w.type,children:null!==(t=null==w?void 0:w.children)&&void 0!==t?t:""}),(0,C.jsx)(i3,{children:(0,C.jsxs)(C.Fragment,{children:[b&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)($2,{element:"h2",modifiers:"h3",color:"default",children:S.formatMessage({id:o})}),(0,C.jsx)("br",{})]}),_?(0,C.jsx)(Tv,{color:"primary",label:"Loading...",size:16}):(0,C.jsx)(C.Fragment,{children:f}),(0,C.jsx)(Uw,{spacing:1}),(0,C.jsxs)(Bv,{justifyContent:"between",gutter:0,children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(Bv,{gutter:0,children:!!s&&!!u&&(0,C.jsx)(q2,{visualType:"secondary",onClick:()=>u(),children:S.formatMessage({id:s})})})}),(0,C.jsx)(zv,{grow:1,children:(0,C.jsxs)(Bv,{justifyContent:"end",gap:3,gutter:0,children:[!!l&&!!d&&(0,C.jsx)(q2,{iconLeft:g,visualType:null!=x?x:"primary",color:null!=y?y:"default",onClick:()=>d(),disabled:h,children:S.formatMessage({id:l})}),!!a&&!!c&&(0,C.jsx)(q2,{disabled:p,visualType:"primary",color:null!=m?m:"positive",onClick:()=>c(),children:S.formatMessage({id:a})})]})})]})]})})]})})},g4=()=>(0,C.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,C.jsxs)("g",{"clip-path":"url(#clip0_28747_2860)",children:[(0,C.jsx)("path",{d:"M28.8511 26.8C28.1722 27.9772 27.0884 28.8674 25.8017 29.3048C24.515 29.7422 23.1132 29.6969 21.8574 29.1773C20.6016 28.6578 19.5776 27.6994 18.9761 26.4808C18.3745 25.2621 18.2365 23.8664 18.5878 22.5536C18.9391 21.2407 19.7557 20.1004 20.8854 19.345C22.0151 18.5896 23.3809 18.2707 24.7283 18.4477C26.0758 18.6246 27.3129 19.2854 28.2093 20.3069C29.1056 21.3284 29.6 22.641 29.6003 24H18.4003",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M24.0049 8V10.4",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M10.1465 15.9954L12.225 17.1954",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M10.1406 31.9954L12.2191 30.7954",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M23.9951 40V37.6",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M37.8539 32.0046L35.7754 30.8046",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M37.8588 16.0045L35.7803 17.2045",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M28 46.8493C33.8841 45.8139 39.1414 42.5469 42.6753 37.7296C46.2092 32.9123 47.7468 26.9166 46.9675 20.9932C46.1882 15.0697 43.1521 9.67575 38.4925 5.9364C33.8329 2.19704 27.9095 0.40098 21.9578 0.922824C16.0061 1.44467 10.4857 4.24412 6.54787 8.7373C2.61007 13.2305 0.558967 19.0705 0.822366 25.0392C1.08576 31.0079 3.64332 36.6445 7.96161 40.7733C12.2799 44.9022 18.0255 47.2044 24 47.2",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"clip0_28747_2860",children:(0,C.jsx)("rect",{width:"48",height:"48",fill:"white"})})})]}),m4=e=>{let{togglePopup:t,isOpen:n,signState:r,addAlert:o,projectId:i,enableSignPopup:a,unlockContainer:l,permissions:c,downloadProjektiOsaContainer:u,isBlockingRequestInProgress:d}=e;const f=(0,N.useIntl)(),{projectTypes:p,projectContainer:{signers:h,revision:g,signed:m}}=r,v=h.length>0,b=e=>{var t;let{row:n}=e;return(null==n||null===(t=n.subRows)||void 0===t?void 0:t.length)>0?(0,C.jsx)(d4,{openText:"",closeText:"",onClick:n.getToggleExpandedHandler(),isOpen:n.getIsExpanded(),size:"small",visualType:"link"}):(0,C.jsx)(C.Fragment,{})},y=e=>{let{onClick:t}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:"download",visualType:"secondary",onClick:()=>t(),children:f.formatMessage({id:"download"})})}),(0,C.jsx)(h3,{children:f.formatMessage({id:"download.tooltip"})})]})},x=e=>{let{onClick:t}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:"delete",size:"small",color:"important",onClick:()=>t(),children:f.formatMessage({id:"showSignersPopup.fullProject.remove"})})}),(0,C.jsx)(h3,{children:f.formatMessage({id:"showSignersPopup.fullProject.remove"})})]})},w=e=>{let{onClick:t}=e;return(0,C.jsx)(q2,{visualType:"primary",size:"small",onClick:()=>t(),iconLeft:"add",children:f.formatMessage({id:"showSignersPopup.containerName.sign"})})},_=e=>{var t;const n=e.original.part,r=!v&&!n.signed&&c.canSign;return(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsxs)("tr",{className:B2("bg-muted"),children:[(0,C.jsx)("td",{colSpan:2,children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"start",gutterX:2,children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(b,{row:e})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(Yv,{modifiers:"bold",children:(0,C.jsx)(H,{code:n.type})})})]})}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"end",gutterX:2,children:[(null==e||null===(t=e.subRows)||void 0===t?void 0:t.length)>0&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(y,{onClick:()=>u(n.type)})}),r&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(w,{onClick:()=>a(n.revision,n.type)})})]})})]})})},S=e=>{const n=!m&&c.canSign;return(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsxs)("tr",{className:B2("bg-muted"),children:[(0,C.jsx)("td",{colSpan:2,children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"start",gutterX:2,children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(b,{row:e})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(Yv,{modifiers:"bold",children:e.original.customRowLabel})})]})}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"end",gutterX:2,children:[v&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(y,{onClick:()=>u()})}),c.canSign&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(x,{onClick:()=>{l((()=>{o({title:f.formatMessage({id:"alert.containerUnlocked"}),message:void 0}),t(!1)}))}})})]}),n&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(w,{onClick:()=>a(g,"SIGN_CONTAINER")})})]})})]})})},k=(0,s.useMemo)((()=>[...p.map((e=>({CustomRowComponent:_,customRowLabel:e.type,subRows:O(e.signers),part:e}))),...v||c.canSign&&p.length>1?[{CustomRowComponent:S,customRowLabel:f.formatMessage({id:"showSignersPopup.fullProject"}),subRows:O(h)}]:[]]),[p]);const E=(0,p4.createColumnHelper)(),j=[E.accessor("name",{id:"type",header:()=>f.formatMessage({id:"projectType"}),cell:()=>(0,C.jsx)(C.Fragment,{})}),E.accessor("name",{id:"name",header:()=>f.formatMessage({id:"showSignersPopup.header.signer"})}),E.accessor("date",{id:"date",header:()=>f.formatMessage({id:"showSignersPopup.header.date"})})];function O(e){return null==e?void 0:e.map((e=>({name:e.name,date:U(e.date)})))}return(0,C.jsx)(h4,{toggleVisible:()=>t(!1),secondaryText:"button.close",onSecondary:()=>t(!1),size:8,visible:n,title:f.formatMessage({id:"showSignersPopup.title"}),cardProps:{border:"top-positive-main"},children:d?(0,C.jsx)(Bv,{justifyContent:"center",className:"mx-2",children:(0,C.jsx)(Tv,{label:f.formatMessage({id:"common.spinner.text"})})}):(0,C.jsx)(n4,{className:"sb-unstyled",columns:j,data:k,defaultExpanded:{0:!0},hidePagination:!0,id:"customExpandRow",placeholder:{icon:(0,C.jsx)(g4,{})}})})};const v4=(0,E.connect)((function(e){return{isOpen:e.uiState.signDocumentListOpen,signState:e.signState,projectId:e.projectState.projectId,permissions:e.permissions.permissions,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0}}),(function(e){return{togglePopup:t=>{e(P(t))},addAlert:t=>{e(M(t))},enableSignPopup:(t,n)=>{e(_t(t,n))},unlockContainer:t=>{e(ht(void 0,t))},downloadProjektiOsaContainer:t=>{e(mt(t))}}}))(m4),b4=require("moment");var y4=o.n(b4);function x4(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const w4=["label","tooltip","required","children"],_4=e=>{let{label:t,tooltip:n,required:r,children:o}=e,i=x4(e,w4);const s=!!n,l="string"==typeof n;return(0,C.jsxs)("div",a(a({},i),{},{children:[(0,C.jsxs)(Bv,{gutter:0,gap:1,alignItems:"center",children:[(0,C.jsx)(g_,{required:r,tooltip:s&&l?n:void 0,children:t}),s&&!l&&(0,C.jsx)(zv,{children:(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{size:18,color:"brand",name:"info"})}),(0,C.jsx)(h3,{maxWidth:"large",children:"string"==typeof n?(0,C.jsx)(Yv,{children:n}):(0,C.jsxs)(C.Fragment,{children:[" ",n]})})]})})]}),(0,C.jsx)("div",{children:o})]}))},S4=e=>{let{closePopup:t,files:n,requestRestrictFiles:r,requestsInProgress:o}=e;const i=(0,N.useIntl)(),[a,l]=(0,s.useState)(),[c,u]=(0,s.useState)(),[d,f]=(0,s.useState)();return(0,C.jsx)(h4,{toggleVisible:()=>t(),secondaryText:"button.close",onSecondary:()=>t(),primaryText:"button.save",onPrimary:function(){if(!(null!=n&&n.length&&a&&c&&d)||o)return;const e=y4()(d).format("YYYY-MM-DD");r(n,a,c,e)},size:8,visible:!(null==n||!n.length),title:i.formatMessage({id:"popupRestrictAccess.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.overview"}),children:(0,C.jsx)(tb,{style:"styled",children:null==n?void 0:n.map((e=>(0,C.jsx)(tb.Item,{children:e.failiNimetus},e.id)))})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.basis"}),tooltip:i.formatMessage({id:"popupRestrictAccess.basis.label"}),required:!0,children:(0,C.jsx)(F1,{id:"popupRestrictAccessBasis",label:"",hideLabel:!0,renderWithoutLabel:!0,placeholder:i.formatMessage({id:"popupRestrictAccess.basis.placeholder"}),value:a,onChange:e=>l(e),characterLimit:4e3})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.explanation"}),tooltip:i.formatMessage({id:"popupRestrictAccess.explanation.label"}),required:!0,children:(0,C.jsx)(F1,{id:"popupRestrictAccessExplanation",label:"",hideLabel:!0,renderWithoutLabel:!0,placeholder:i.formatMessage({id:"popupRestrictAccess.explanation.placeholder"}),value:c,onChange:e=>u(e),characterLimit:4e3})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.endDate"}),tooltip:i.formatMessage({id:"popupRestrictAccess.endDate.label"}),required:!0,children:(0,C.jsx)(H3,{id:"popupRestrictAccessEndDate",label:"",placeholder:i.formatMessage({id:"common.date.placeholder"}),hideLabel:!0,renderWithoutLabel:!0,value:void 0,onChange:e=>{var t;return f(null!==(t=null==e?void 0:e.toString())&&void 0!==t?t:"")}})})})]})})};const k4=(0,E.connect)((function(e){const t=new Set(e.restrictFilesState.fileIds);return{files:t&&e.projectState.projectFiles.filter((e=>t.has(e.id))),requestsInProgress:e.restrictFilesState.requestsInProgress}}),(function(e){return{closePopup:()=>{e(It(void 0))},requestRestrictFiles:(t,n,r,o)=>{e(Mt(t,n,r,o))}}}))(S4),E4=["text","name"],C4=e=>{let{text:t,name:n}=e,r=x4(e,E4);return(0,C.jsxs)(Bv,{gap:2,gutterX:2,alignItems:"center",children:[(0,C.jsx)(H2,a({name:null!=n?n:"add",size:16,color:"primary"},r)),t]})};var j4=o(543);const O4=(e,t)=>!e&&t,T4=e=>{const{getCurrentBreakpointProps:t}=M2(),{isBreakpoint:n}=t({isBreakpoint:!0,[e]:{isBreakpoint:!1}},{isBreakpoint:!1});return n};let I4=function(e){return e.Show="Show",e.Text="Text",e.Delete="Delete",e.Edit="Edit",e.More="More",e.Download="Download",e}({});const R4=e=>{let{onDownload:t,onView:n,onEdit:r,onDelete:o,textButton:i,collapseButtonsBreakPoint:a="lg",buttonsShown:l}=e;const c=(0,N.useIntl)(),[u,d]=(0,s.useState)([]),[f,p]=(0,s.useState)({dropdownButtons:[],actionButtons:[]}),h=T4(a);if((0,s.useEffect)((()=>{d(((e,t,n,r,o,i)=>{if(e)return e;const a=O4(e,t),s=O4(e,n),l=O4(e,r),c=O4(e,o),u=O4(e,i),d={[I4.Download]:a,[I4.Show]:s,[I4.Edit]:l,[I4.Delete]:c,[I4.Text]:u};return(0,j4.keys)((0,j4.pickBy)(d))})(l,t,n,r,o,i))}),[l,t,n,o,r,i]),(0,s.useEffect)((()=>{p(((e,t,n,r,o,i,a,s)=>{var l;const c={[I4.Download]:{icon:"download",text:t.formatMessage({id:"common.button.download"}),onClick:r,visualType:"secondary",color:"default"},[I4.Edit]:{icon:"edit",text:t.formatMessage({id:"common.button.change"}),onClick:o,visualType:"primary"},[I4.Delete]:{icon:"delete",text:t.formatMessage({id:"common.button.delete"}),onClick:i,color:"important",visualType:"primary"},[I4.Text]:{icon:null!==(l=null==s?void 0:s.icon)&&void 0!==l?l:"add",text:null==s?void 0:s.text,onClick:null==s?void 0:s.onClick},[I4.Show]:{icon:"visibility",text:t.formatMessage({id:"common.button.view"}),onClick:a,visualType:"secondary"}},u=Object.keys(c),d=e.sort(((e,t)=>u.indexOf(e)-u.indexOf(t)));if(n)return{dropdownButtons:d.map((e=>c[e])),actionButtons:[]};{let t=[],n=[...d];if(d.includes(I4.Text)&&(n.length>2&&e.includes(I4.Show)&&(t.push(I4.Show),n=n.filter((e=>e!==I4.Show))),t.push(I4.Text),n=n.filter((e=>e!==I4.Text))),n.length>3){let e=[...n];const r=[];u.forEach((t=>{d.includes(t)&&r.length<=3&&(r.push(t),e=e.filter((e=>e!==t)))})),t=e,n=r}return{dropdownButtons:t.map((e=>c[e])),actionButtons:n.map((e=>c[e]))}}})(u,c,h,t,r,o,n,i))}),[u,h]),!f.actionButtons.length&&!f.dropdownButtons.length)return(0,C.jsx)(C.Fragment,{});return(0,C.jsx)(Bv,{gutter:0,children:(0,C.jsx)(zv,{style:{minWidth:"".concat((()=>{let e=f.actionButtons.length;return f.dropdownButtons.length&&(e+=1),42*e})(),"px")},children:(0,C.jsxs)(Bv,{gap:2,gutter:0,justifyContent:"end",children:[!!f.actionButtons.length&&f.actionButtons.map((e=>{let{icon:t,text:n,onClick:r,color:o,visualType:i}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:t,visualType:i,color:o,onClick:r,children:n})}),(0,C.jsx)(h3,{children:n})]},t)})),!!f.dropdownButtons.length&&(0,C.jsx)($3,{button:{children:"",icon:"more_vert",size:"small",visualType:"secondary",style:{width:"2.5rem",height:"2.5rem"}},items:f.dropdownButtons.map((e=>{let{text:t,icon:n,onClick:r}=e;return{children:(0,C.jsx)(C4,{text:t,name:n}),onClick:r}}))})]})})})},P4=e=>{let{isVisible:t,toggleDeleteModal:n,handleDelete:r,title:o,primaryText:i,description:a,withoutCardHeader:s}=e;const l=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:n,primaryText:i,secondaryText:"button.cancel",onPrimary:r,onSecondary:n,primaryColor:"important",size:6,visible:t,title:o,cardProps:{border:"top-important-main"},withoutCardHeader:s,children:a?(0,C.jsxs)(Bv,{gutter:2,children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{label:"Example icon",name:"warning",size:24,color:"important"})}),(0,C.jsx)(zv,{children:(0,C.jsx)(Yv,{children:l.formatMessage({id:a})})})]}):(0,C.jsx)(C.Fragment,{})})};function M4(e,t){const n=e.filter((e=>e.code===t))[0];return n?n.text:""}const A4=e=>{let{code:t,codes:n}=e;return(0,C.jsxs)(C.Fragment,{children:[t&&(0,C.jsx)("span",{children:M4(n,t)}),!t&&(0,C.jsx)("span",{})]})};const D4=(0,E.connect)((function(e,t){return{codes:e.codeToTextState[t.type],code:t.code}}),(function(e){return{}}))(A4),F4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"grupp",code:t})},L4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"projektiOsa",code:t})},N4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"projektiStaadium",code:t})},B4=e=>{let{isVisible:t,toggleConfirmationModal:n,headerText:r,subText:o,positiveButtonText:i,onSubmit:a,withoutCardHeader:s}=e;const l=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:n,primaryText:i,secondaryText:"button.cancel",onPrimary:()=>{n(),a()},onSecondary:()=>{n()},size:6,visible:t,title:r,cardProps:{border:"top-positive-main"},withoutCardHeader:s,children:(0,C.jsx)(Bv,{gutter:3,children:(0,C.jsx)(zv,{xs:12,children:l.formatMessage({id:o})})})})},z4=e=>{let{file:t,className:n}=e;return t.akPiirang?(0,C.jsxs)("div",{className:n,children:[(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.owner",values:{owner:t.akPiirang.teabeValdaja}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.reason",values:{reason:t.akPiirang.juriidilineAlus}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.description"}),(0,C.jsx)("br",{}),t.akPiirang.pohjendus?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(N.FormattedMessage,{id:t.akPiirang.pohjendus}),(0,C.jsx)("br",{})]}):null,(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.start",values:{dateTime:U(new Date(t.akPiirang.piirangAlgus))}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.end",values:{dateTime:U(new Date(t.akPiirang.piirangLopp))}})]}):null},$4=e=>{let{files:t,loadFiles:n,deselectFile:r,selectFile:o,setEditFile:i,requestDeleteFile:a,downloadFiles:l,applicationId:u,isAudit:d,toggleRestrictAccessPopupWith:f,toggleReleaseAccessPopupWith:p,selectedFilesIds:h,permissions:g,unlockFile:m,isProjectContainerSignedByAnyone:v,isBlockingRequestInProgress:b,isLegacy:y}=e;const x=(0,N.useIntl)(),[w,_]=(0,s.useState)({visible:!1,fileId:void 0}),[S,k]=(0,s.useState)([]),[E,j]=(0,s.useState)({visible:!1,file:void 0});(0,s.useEffect)((()=>{u&&n()}),[u,n]),(0,s.useEffect)((()=>{k([...t])}),[t]);const O=e=>{j((t=>({visible:!t.visible,file:e})))},T=e=>{let t=[I4.Download];e.locked||!g.canWrite||v||t.push(I4.Edit),g.canWrite&&t.push(I4.Delete),(g.canCreateRestrictions&&(!e.akPiirang||e.akPiirang)||e.locked&&!v)&&t.push(I4.Text);return(0,C.jsx)(R4,{buttonsShown:t,onDownload:()=>function(e){return l([e])}(e),onEdit:()=>i(e),onDelete:()=>_({visible:!0,fileId:e.id}),textButton:{onClick:()=>g.canCreateRestrictions?e.akPiirang?p([e.id]):f([e.id]):e.locked&&!v?O(e):void 0,text:g.canCreateRestrictions?x.formatMessage({id:e.akPiirang?"editPopover.liftRestriction":"editPopover.restrictAccess"}):e.locked&&!v?x.formatMessage({id:"label.unlock_container"}):"",icon:g.canCreateRestrictions?x.formatMessage({id:e.akPiirang?"remove":"add"}):e.locked?x.formatMessage({id:"lock_open"}):void 0}})},[I,R]=c().useState({}),P=(0,p4.createColumnHelper)(),M=[P.accessor((e=>e.failiNimetus),{id:"failiNimetus",header:()=>x.formatMessage({id:"document.fileName"}),cell:e=>e.renderValue()}),P.accessor((e=>e.projTunnus),{id:"projTunnus",header:()=>x.formatMessage({id:d?"document.auditId":"document.projectId"}),cell:e=>e.renderValue()}),P.accessor((e=>e.projOsa),{id:"projOsa",header:()=>x.formatMessage({id:d?"document.auditType":"document.projectType"}),cell:e=>(0,C.jsx)(L4,{code:e.row.original.projOsa})}),P.accessor((e=>e.grupp),{id:"grupp",header:()=>x.formatMessage({id:"document.groupName"}),cell:e=>(0,C.jsx)(F4,{code:e.row.original.grupp})}),P.accessor((e=>e.jrkNr),{id:"jrkNr",header:()=>x.formatMessage({id:"document.jrkNr"}),cell:e=>e.renderValue()}),P.accessor((e=>e.errorMessages),{id:"errorMessages",header:()=>x.formatMessage({id:"document.hasErrorMessagesTitle"}),cell:e=>((e,t)=>{var n;let r=(0,C.jsx)(H2,{name:"check_circle",color:"positive"});if((null===(n=e.errorMessages)||void 0===n?void 0:n.length)>0&&(r=t?(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"error",color:"warning"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"document.signedInvalidFileInfo"})})]}):(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)("span",{children:(0,C.jsx)(H2,{name:"error",color:"important"})})}),(0,C.jsx)(h3,{children:(0,C.jsx)(tb,{style:e.errorMessages.length>1?"styled":"none",children:e.errorMessages.map((t=>(0,C.jsx)(tb.Item,{children:t},"".concat(e.id,"-").concat(t))))})})]})),e.akPiirang&&(r=(0,C.jsxs)(C.Fragment,{children:[r,(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)("span",{children:(0,C.jsx)(T3,{color:"important",type:"secondary",children:(0,C.jsx)(N.FormattedMessage,{id:"restricted.message.tag"})})})}),(0,C.jsx)(h3,{maxWidth:"none",children:(0,C.jsx)(z4,{file:e,className:"restricted-message"})})]})]})),e.locked){let e;e=t?(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"lock",color:"disabled"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"unlockDocument.disabled"})})]}):(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"lock"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"unlockDocument.tooltip"})})]}),r=(0,C.jsxs)(Bv,{gap:2,alignItems:"center",children:[r,e]})}return r})(e.row.original,v)}),P.accessor((e=>e.hasChanged),{id:"hasChanged",header:()=>x.formatMessage({id:"document.hasChangedTitle"}),cell:e=>{const t=e.row.original;return t.hasChanged&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"info",color:"primary"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"document.hasChanged"})})]})}}),P.accessor((e=>"".concat(e.id)),{id:"actions",cell:e=>T(e.row.original),header:()=>(0,C.jsx)("span",{className:"visually-hidden",children:x.formatMessage({id:"placeholder.actions"})}),enableSorting:!1})];if(!d){const e=P.accessor((e=>e.projStaadium),{id:"projStaadium",header:()=>x.formatMessage({id:"document.projectStage"}),cell:e=>(0,C.jsx)(N4,{code:e.row.original.projStaadium})});M.splice(2,0,e)}return(0,C.jsxs)(C.Fragment,{children:[!y||S&&0!==S.length?(0,C.jsx)(n4,{columns:[M5("test-2",!0),...M],data:S,enableRowSelection:!0,getRowId:e=>e.id,id:"row-selection-table-outside",onRowSelectionChange:e=>{R(e),function(e){const t=new Set(h),n=new Set(e);for(const e of h)n.has(e)||r(e);for(const n of e)t.has(n)||o(n)}(Object.keys(e)),console.log("state",e)},rowSelection:I,placeholder:{icon:(0,C.jsx)(g4,{})}}):(0,C.jsx)("div",{className:"legacy-project-no-files-block",children:(0,C.jsx)(Yv,{children:x.formatMessage({id:"documents.cannotShowLegacyFiles"})})}),b&&(0,C.jsx)("div",{className:"doc2--loading-overlay--indicator--visible",children:(0,C.jsx)(Bv,{justifyContent:"center",children:(0,C.jsx)(Tv,{color:"primary",label:"Loading...",size:18})})}),(0,C.jsx)(P4,{isVisible:w.visible,toggleDeleteModal:()=>_({visible:!1,fileId:void 0}),handleDelete:()=>(w.fileId&&a([w.fileId]),void _({visible:!1,fileId:void 0})),title:"file.delete.modal.title",description:"file.delete.modal.content",primaryText:"common.confirmation.modal.yes",withoutCardHeader:!0}),(0,C.jsx)(B4,{toggleConfirmationModal:()=>O(void 0),isVisible:E.visible,onSubmit:()=>(e=>{if(e.projOsa)return m(e.projOsa)})(E.file),headerText:"unlockDocument.title",positiveButtonText:"unlockDocument.open",subText:"unlockDocument.content"})]})};const V4=(0,E.connect)((function(e){return{files:e.projectState.projectFiles,openPopoverId:e.projectState.openPopoverId,applicationId:e.projectState.applicationId,isAudit:"AUDIT"===e.projectState.applicationType,projektiOsa:e.codeToTextState.projektiOsa,selectedFilesIds:e.projectState.selectedFilesIds,permissions:e.permissions.permissions,isProjectContainerSignedByAnyone:e.signState.projectContainer.signers.length>0,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0,isLegacy:e.projectState.legacy}}),(function(e){return{loadFiles:()=>{e(it())},deselectFile:t=>{e(Ke(t))},selectFile:t=>{e(He(t))},setEditFile:t=>{e(An({id:t.id})),e(Bn())},requestDeleteFile:t=>{e(gt(t))},toggleRestrictAccessPopupWith:t=>{e(It(t))},toggleReleaseAccessPopupWith:t=>{e(Rt(t))},downloadFiles:t=>{e(vt(t))},unlockFile:t=>{e(ht(t))}}}))($4),H4=e=>{e.stopPropagation(),window.open("https://e-ehitus.taskugiid.eu/failid/ehitusprojekti-failid","_blank")};let K4=o(501);"default"in K4&&(K4=K4.default);const U4=e=>{let{setUploadedFile:t,uploadedFile:n,setDropzoneHasErrors:r,allowedExtensions:o,maxSizeBytes:i,hasErrors:l}=e;const[c,u]=(0,s.useState)([]),d=e=>{var t;const n=(null!==(t=e.name.split(".").pop())&&void 0!==t?t:"").toLowerCase();return o.includes("."+n)};return(0,C.jsxs)(Kv,{size:1,children:[n&&(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsx)(i3,{background:"bg-muted",children:(0,C.jsx)("span",{children:(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsxs)(z2,{modifiers:"bold",children:[(0,C.jsx)(N.FormattedMessage,{id:"file.transfer.selected"}),":"]})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(z2,{modifiers:"break-all",children:n.name})})]})})})}),(0,C.jsx)(K4,{onDrop:e=>{if(1===e.length){const n=e[0],o=[];d(n)||o.push({title:"documents.modal.file.upload.error.unsupported.format.1",link:"documents.modal.file.upload.error.unsupported.format.2"}),i&&n.size>i&&o.push({title:"documents.modal.file.upload.error.too.big"}),n.name.length>130&&o.push({title:"documents.modal.file.upload.error.filename.too.long"}),u(o),l&&l((null==o?void 0:o.length)>0),r&&r(o.length>0),t(n)}},children:e=>{let{getRootProps:t,getInputProps:n}=e;return(0,C.jsx)("section",{children:(0,C.jsx)("div",a(a({},t()),{},{style:{padding:"20px",cursor:"pointer",userSelect:"none",border:"1px solid #E1E2E5",borderRadius:"4px"},children:(0,C.jsxs)(Bv,{alignItems:"center",gap:2,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)("input",a({},n()))}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Bv,{alignItems:"center",justifyContent:"center",children:(0,C.jsxs)(z2,{children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.drop.message.1"}),(0,C.jsx)(x2,{children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.drop.message.2"})}),"."]})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Bv,{alignItems:"center",justifyContent:"center",children:(0,C.jsx)(q2,{icon:"attach_file",visualType:"secondary",children:(0,C.jsx)(N.FormattedMessage,{id:"common.file_upload.add"})})})})]})}))})}}),(0,C.jsxs)(Zv,{icon:"info",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.1"}),(0,C.jsx)(x2,{onClick:H4,tabIndex:0,children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.2"})}),"."]}),n&&c.length>0&&(0,C.jsxs)(Zv,{icon:"error",type:"danger",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.unable.to.attach"}),(0,C.jsxs)(z2,{modifiers:"break-all",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.file"}),null==n?void 0:n.name]}),(0,C.jsx)(tb,{element:"ul",style:"styled",children:c.map((e=>(0,C.jsxs)(eb,{children:[(0,C.jsx)(N.FormattedMessage,{id:e.title}),!d(n)&&(0,C.jsx)(x2,{onClick:H4,tabIndex:0,children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.3"})}),"."]})))}),(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.retry"})]})]})},G4=require("yup"),W4=G4.object({file:G4.mixed().required("common.file.required")}),q4=(e,t)=>Object.keys(e).filter((e=>e===t||e.includes(".")&&e.split(".")[0]===t)),Y4=e=>{const t=(0,N.useIntl)(),[n,r]=(0,s.useState)({});return{validate:(t,n,o)=>e.validate(t,{abortEarly:!1,context:o}).then((()=>{r({}),n(t)}),(e=>{r((e=>{var t;let n={};return null===(t=e.inner)||void 0===t||t.forEach(((t,r)=>{n[t.path]=e.errors[r]})),n})(e))})),getErrorMessagesByFieldName:e=>{let r=[];r=Array.isArray(e)?e.map((e=>q4(n,e))).flatMap((e=>e)):q4(n,e);const o=[];for(const e of r)n[e]&&o.push(t.formatMessage({id:n[e]}));return o.length>0?(0,j4.uniq)(o).join(", "):void 0},clearErrors:e=>{r(e?t=>((e,t)=>{let n=a({},e);const r=q4(e,t);for(const e of r)delete n[e];return n})(t,e):{})},errors:n,getErrorMessagesWithIntlShape:()=>Object.keys(n).reduce(((e,r)=>(e[r]=Array.from(new Set([t.formatMessage({id:n[r]})])).join(", "),e)),{})}},J4=e=>{let{isVisible:t,onConfirm:n,toggleVisible:r,extraInfoNotification:o,onFileUpload:i,errorMessage:a,allowedExtensions:l,maxSizeBytes:c}=e;const u=(0,N.useIntl)(),[d,f]=(0,s.useState)(void 0),[p,h]=(0,s.useState)(!1),{validate:g,clearErrors:m,getErrorMessagesByFieldName:v}=Y4(W4),b=()=>{f(void 0),m(),r()};return(0,C.jsx)(h4,{toggleVisible:()=>b(),primaryText:"button.add",secondaryText:"button.cancel",onPrimary:()=>{g({file:d},(()=>{p||a||(n([d]),f(void 0),r())}))},onSecondary:()=>b(),primaryColor:"positive",size:6,visible:t,title:"documents.modal.file.upload.adding",cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Bv,{gap:3,children:[v("file")&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"danger",icon:"error",children:v("file")})}),!!a&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"danger",icon:"error",children:u.formatMessage({id:a})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(U4,{uploadedFile:d,setUploadedFile:e=>{f(e),i&&i(e),m()},setDropzoneHasErrors:h,allowedExtensions:l,maxSizeBytes:c})}),o&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"warning",icon:"warning",children:u.formatMessage({id:o})})})]})})},X4=e=>{let{isVisible:t,toggleModal:n,handleOpenProject:r,title:o,primaryText:i,description:a}=e;return(0,C.jsx)(P4,{isVisible:t,toggleDeleteModal:n,handleDelete:r,title:o,description:a,primaryText:i})},Z4=e=>{let{requestDeleteProject:t,toggleSignDocumentListPopup:n,toggleRestrictAccessPopupWith:r,toggleReleaseAccessPopupWith:o,requestsInProgress:i,uploadFiles:l,deletionPending:c,allowedExtensions:u,selectedFileIds:d,requestDeleteFile:f,isLegacyProject:p,isAudit:h,permissions:g,downloadFiles:m,downloadLegacyContainer:v,clearSelectedFiles:b,createProject:y,cloneReferencedForEditing:x,isBlockingRequestInProgress:w,isRestrictedFileSelected:_,isNonRestrictedFilesSelected:S,hasRestrictedFiles:k,buttonConfig:E,fileCount:j}=e;const O=(0,N.useIntl)(),[T,I]=(0,s.useState)(!1),[R,P]=(0,s.useState)(!1),[M,A]=(0,s.useState)(!1),[D,F]=(0,s.useState)(0),[L,B]=(0,s.useState)({});(0,s.useEffect)((()=>{i||(F((e=>e+1)),P(!1))}),[i]),(0,s.useEffect)((()=>{if(!E)return;const e={};E.filter((e=>!!e.popover)).forEach((t=>{e[t.popover.id]=!1})),B(e)}),[E]);const z=O.formatMessage({id:"fileUpload.largeFileWarning",defaultMessage:"Laetavate failide hulgas esineb suuri faile. Failide laadimine ja töötlemine võib võtta aega. Palun ärge sulgege akent."});const $=[g.canWrite&&{text:O.formatMessage({id:"tableFooter.manage.delete"}),icon:"delete",isDisabled:!d.length,onClick:()=>{f(b)}},(g.canAccessFiles&&(g.canRead||g.canAccessRestrictedFiles)||_&&g.canAccessRestrictedFiles)&&{text:O.formatMessage({id:"tableFooter.manage.download"}),icon:"download",isDisabled:!d.length,onClick:()=>{m(b)}},g.canCreateRestrictions&&(!_||S)&&{text:O.formatMessage({id:"tableFooter.manage.restrictAccess"}),icon:"add",isDisabled:!d.length,onClick:()=>r([...d])},g.canCreateRestrictions&&(_||!S)&&{text:O.formatMessage({id:"tableFooter.manage.releaseRestriction"}),icon:"remove",isDisabled:!d.length,onClick:()=>o([...d])}].filter(Boolean);function V(e){const t=L[e];B(a(a({},L),{},{[e]:!t}))}return(0,C.jsxs)(Bv,{gutter:0,justifyContent:"between",children:[(0,C.jsx)(zv,{children:(0,C.jsx)(Bv,{gutter:0,gap:2,children:g.canDelete&&!w&&(0,C.jsx)(q2,{id:"delete-building-project-button",visualType:"primary",color:"important",size:"small",onClick:()=>I((e=>!e)),children:(0,C.jsx)(N.FormattedMessage,{id:h?"tableFooter.delete.audit":"tableFooter.delete"})})})}),(0,C.jsx)(zv,{xs:8,children:(0,C.jsxs)(Bv,{justifyContent:"end",gutter:0,gap:2,children:[p?(0,C.jsx)(C.Fragment,{children:g.canAccessFiles&&(!k||g.canAccessRestrictedFiles)&&!w&&(0,C.jsx)(q2,{iconLeft:"download",onClick:function(){v()},children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.downloadContainer"})})}):(0,C.jsxs)(C.Fragment,{children:[!w&&g.canWrite&&(0,C.jsx)(q2,{id:"upload-building-project-button",iconLeft:"add",visualType:"primary",onClick:()=>P((e=>!e)),size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.upload"})}),(0,C.jsx)(J4,{isVisible:R,onConfirm:function(e){e&&l(e,z)},toggleVisible:()=>P((e=>!e)),allowedExtensions:u,maxSizeBytes:2e9},D)]}),function(){if(E)return E.map((e=>e.popover?function(e){var t,n,r,o,i;return(0,C.jsxs)(C.Fragment,{children:[!e.disabled&&(0,C.jsx)(q2,{id:e.id,color:null!==(t=e.theme)&&void 0!==t?t:"default",onClick:()=>V(e.popover.id),size:"small",children:e.text}),(0,C.jsx)(h4,{toggleVisible:()=>V(e.popover.id),secondaryText:null===(n=e.popover)||void 0===n?void 0:n.cancelText,onSecondary:()=>V(e.popover.id),primaryText:null===(r=e.popover)||void 0===r?void 0:r.confirmText,onPrimary:()=>{var t;null===(t=e.popover)||void 0===t||t.onConfirm(),V(e.popover.id)},size:6,visible:L[e.popover.id],title:O.formatMessage({id:null===(o=e.popover)||void 0===o?void 0:o.title}),cardProps:{border:"top-positive-main"},children:(0,C.jsx)("p",{children:null===(i=e.popover)||void 0===i?void 0:i.text})})]})}(e):function(e){var t;return(0,C.jsx)(q2,{id:e.id,className:"ml-1 mt-1",color:null!==(t=e.theme)&&void 0!==t?t:"default",onClick:e.onClick,disabled:e.disabled,size:"small",children:e.text})}(e)))}(),(!w||j>0)&&(0,C.jsx)(q2,{id:"signed-documents-list-button",iconLeft:g.canSign?"edit":void 0,visualType:"primary",onClick:()=>n(!0),size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.openSigners"})}),(!p||g.canCreateRestrictions)&&!w&&(g.canRead||g.canWrite)&&j>0&&(0,C.jsx)($3,{button:{children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.manage"}),size:"small",visualType:"secondary"},items:$.map((e=>{let{text:t,icon:n,isDisabled:r,onClick:o}=e;return{children:(0,C.jsx)(C4,{text:t,name:n}),isDisabled:null!=r&&r,onClick:o}}))}),g.canCreateNewVersion&&!w&&(0,C.jsx)(q2,{onClick:y,children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.makeChangeable"})}),g.canCloneForEditing&&!w&&(0,C.jsx)(q2,{onClick:()=>A((e=>!e)),children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.makeChangeable"})})]})}),(0,C.jsx)(X4,{isVisible:M,toggleModal:()=>A((e=>!e)),handleOpenProject:function(){x(),A((e=>!e))},title:"popupEditReferenced.title",description:"popupEditReferenced.overview",primaryText:"button.verify"}),(0,C.jsx)(P4,{isVisible:T,toggleDeleteModal:()=>I((e=>!e)),handleDelete:()=>{t()},title:"buildingProject.delete.modal.header",description:"buildingProject.delete.modal.description",primaryText:"common.confirmation.modal.yes",withoutCardHeader:!0})]})};const Q4=(0,E.connect)((function(e){const t=new Set(e.projectState.selectedFilesIds),n=e.projectState.projectFiles.filter((e=>!!e.akPiirang)).length>0,r=e.projectState.projectFiles.filter((e=>t.has(e.id)&&!!e.akPiirang)).length>0,o=e.projectState.projectFiles.filter((e=>t.has(e.id)&&!e.akPiirang)).length>0;return{selectedFileIds:e.projectState.selectedFilesIds,requestsInProgress:e.projectState.requestsInProgress,deletionPending:e.projectState.deletionPending,allowedExtensions:e.projectState.allowedExtensions,isLegacyProject:e.projectState.legacy,isAudit:"AUDIT"===e.projectState.applicationType,permissions:e.permissions.permissions,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0,isRestrictedFileSelected:r,isNonRestrictedFilesSelected:o,hasRestrictedFiles:n,fileCount:e.projectState.projectFiles.length}}),(function(e){return{toggleSignRefusalPopup:t=>{e(R(t))},toggleSignDocumentListPopup:t=>{e(P(t))},toggleRestrictAccessPopupWith:t=>{e(It(t))},toggleReleaseAccessPopupWith:t=>{e(Rt(t))},requestDeleteProject:()=>{e({type:I.CLEAR_ALL_ALERTS,payload:{}}),e(nt())},uploadFiles:(t,n)=>{e(pt(t,n))},requestDeleteFile:t=>{e(gt(void 0,t))},downloadFiles:t=>{e(vt(void 0,t))},downloadLegacyContainer:t=>{e(dt(t))},clearSelectedFiles:()=>{e(Xe())},createProject:()=>{e(et())},cloneReferencedForEditing:()=>{e(Ae())}}}))(Z4),e6=e=>{let{canAddAudit:t,canReferenceBaseProject:n,baseProjectInfo:r,navigateForwardNormal:o,navigateForwardLegacy:i,navigateForwardReferenceBase:a,navigateForwardAudit:l,isDisabled:c}=e;const u=(0,N.useIntl)(),[d,f]=(0,s.useState)(er.NORMAL);(0,s.useEffect)((()=>{r&&!r.disabled&&f(er.REFERENCE)}),[r]);return(0,C.jsxs)(Kv,{size:1,children:[(0,C.jsx)(_4,{label:u.formatMessage({id:"intro.buildingProject.text"}),tooltip:u.formatMessage({id:"intro.buildingProject.text"}),required:!c||!(null!=r&&r.disabled),children:(0,C.jsxs)(Kv,{size:0,children:[n&&r&&(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-reference",name:"doc2--project-creation-type-selector",disabled:c||(null==r?void 0:r.disabled),checked:d===er.REFERENCE,value:er.REFERENCE,onChange:e=>f(e),label:(0,C.jsxs)(Bv,{gutter:0,gap:1,children:[u.formatMessage({id:"intro.reference.title"}),(0,C.jsxs)("a",{className:"link-gray cursor-pointer",href:"".concat(window.REACT_APP_URL).concat(window.REACT_APP_ENDING,"/document?docNr=").concat(r.nr),target:"_blank",rel:"noopener noreferrer",children:[r.documentTypeName," nr ",r.nr]}),"(".concat(null==r?void 0:r.signatureDate,")")]})}),(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-normal",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.NORMAL,value:er.NORMAL,onChange:e=>f(e),label:u.formatMessage({id:"intro.normal.title"})}),(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-legacy",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.LEGACY,value:er.LEGACY,onChange:e=>f(e),label:u.formatMessage({id:"intro.container.title"})}),t&&(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-audit",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.AUDIT,value:er.AUDIT,onChange:e=>f(e),label:u.formatMessage({id:"intro.audit.title"})})]})}),(0,C.jsx)(Zv,{icon:"info",children:(0,C.jsx)(N.FormattedMessage,{id:(e=>{switch(e){case er.REFERENCE:return"intro.reference.text";case er.NORMAL:return"intro.normal.text";case er.LEGACY:return"intro.container.text";case er.AUDIT:return"intro.audit.text"}})(d)})}),!c&&(0,C.jsx)(Bv,{justifyContent:"end",children:(0,C.jsx)(q2,{color:"positive",onClick:function(e){switch(e.preventDefault(),d){case er.REFERENCE:a();break;case er.NORMAL:o();break;case er.LEGACY:i();break;case er.AUDIT:l()}},size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"intro.button.verifyBuildingProject"})})})]})},t6=e=>{let{navigateBackward:t,navigateForward:n,allowedExtensions:r,uploadFile:o,uploadInProgress:i,isDisabled:a}=e;const l=(0,N.useIntl)(),[c,u]=(0,s.useState)(void 0),[d,f]=(0,s.useState)(!1);return(0,C.jsx)("div",{id:"doc2--project-creation-legacy",children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(U4,{uploadedFile:c,setUploadedFile:e=>u(e),allowedExtensions:r,hasErrors:e=>f(e)}),!(a||i)&&(0,C.jsxs)(Bv,{justifyContent:"between",gap:3,gutter:0,children:[(0,C.jsx)(q2,{visualType:"secondary",onClick:t,size:"small",children:l.formatMessage({id:"button.close"})}),c&&!d&&(0,C.jsx)(q2,{visualType:"primary",onClick:function(){c&&o(c,(()=>{n()}))},color:"positive",size:"small",id:"add-old-file-button",children:l.formatMessage({id:"button.add"})})]})]})})},n6=e=>{let{step:t,endProjectCreation:n,sendCreateProject:r,sendCreateAudit:o,requestsInProgress:i,applicationId:a,canCreateNewVersion:l,baseProjectInfo:c,canAddAudit:u,canReferenceBaseProject:d,type:f,setProjectCreationType:p,uploadContainer:h,loadCreateProjectOptions:g,referenceBaseProject:m}=e;const v=(0,N.useIntl)();(0,s.useEffect)((()=>{g()}),[a]),(0,s.useEffect)((()=>{f!==er.NORMAL&&f!==er.AUDIT||1!==t||n()}),[f,t]);const b=v.formatMessage({id:"fileUpload.largeFileWarning",defaultMessage:"Laetavate failide hulgas esineb suuri faile. Failide laadimine ja töötlemine võib võtta aega. Palun ärge sulgege akent."});return(0,C.jsxs)(C.Fragment,{children:[!f&&(0,C.jsx)(e6,{navigateForwardNormal:function(){p(er.NORMAL),r()},navigateForwardLegacy:function(){p(er.LEGACY)},navigateForwardReferenceBase:function(){p(er.REFERENCE),m().then((()=>n()))},navigateForwardAudit:function(){p(er.AUDIT),o()},canAddAudit:u,canReferenceBaseProject:d,baseProjectInfo:c,isDisabled:!l}),f===er.LEGACY&&(0,C.jsx)(t6,{navigateForward:n,navigateBackward:function(){p(void 0)},allowedExtensions:[".asice",".ddoc",".bdoc"],uploadFile:(e,t)=>h(e,b,t),uploadInProgress:!!i,isDisabled:!l})]})};const r6=(0,E.connect)((function(e){return{applicationId:e.projectState.applicationId,step:e.projectState.projectCreationStep,requestsInProgress:e.projectState.requestsInProgress,type:e.projectState.projectCreationType,canCreateNewVersion:!e.projectState.isProceeding,baseProjectInfo:e.baseProjectState.info,canAddAudit:e.projectState.canAddAudit,canReferenceBaseProject:e.projectState.canReferenceBaseProject}}),(function(e){return{endProjectCreation:()=>{e(Le(!1)),e(Ze(void 0)),e(D(!0))},sendCreateProject:()=>{e(et())},sendCreateAudit:()=>{e(tt())},setProjectCreationType:t=>{e(Ze(t))},uploadContainer:(t,n,r)=>{e(ut(t,n,r))},loadCreateProjectOptions:()=>{e(bt())},referenceBaseProject:()=>e(Me())}}))(n6),o6=e=>{let{alerts:t,removeAlert:n}=e;const r=e=>"title"in e?e.title:"intlTitle"in e?e.intlTitle:"template"in e&&e.props.file.akPiirang?"document.isRestricted":"common.error.unknown",o=e=>e.message?e.message:e.intlMessage?e.intlMessage:"";return null!=t&&t.length?(0,C.jsx)(Kv,{size:.5,children:t.map((e=>(0,C.jsx)(Zv,{type:e.error?"danger":"success",icon:e.error?"error":"check_circle",onClose:()=>n(e.id),title:r(e)?(0,C.jsx)(N.FormattedMessage,{id:r(e)}):void 0,children:(0,C.jsxs)(C.Fragment,{children:[o(e)&&(0,C.jsx)(N.FormattedMessage,{id:o(e)}),"template"in e&&e.template===je.FileRestricted&&(0,C.jsx)(z4,{file:e.props.file})]})},"doc2--alert-"+e.id)))}):null};const i6=(0,E.connect)((function(e){return{alerts:e.uiState.alerts}}),(function(e){return{removeAlert:t=>{e(A(t))}}}))(o6),a6=E.useStore;let s6;const l6=e=>{let{applicationId:t,projectCreation:n,projectFiles:r,onFilesChange:o,loadCurrentProject:i,isCurrentProjectLoading:a,loadClassifiers:l,permissions:c,buttonConfig:u}=e;const{keycloak:d}=a6().getState();return(0,s.useEffect)((()=>{t&&(i(),l())}),[t,i,l,d.authenticated]),(0,s.useEffect)((()=>{if(void 0===o)return;if(r===tr)return;const e=JSON.stringify(r);if(e===s6)return;s6=e;const t=JSON.parse(e),n=Object.freeze(t);o(n)}),[r]),(0,C.jsxs)(Kv,{size:.5,children:[c.canRead&&!n&&!a&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i6,{}),(0,C.jsx)(Q4,{buttonConfig:u}),(0,C.jsx)(V4,{})]}),n&&!a&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i6,{}),(0,C.jsx)(r6,{})]})]})};const c6=(0,E.connect)((function(e){return{applicationId:e.projectState.applicationId,projectCreation:e.projectState.projectCreation,projectFiles:e.projectState.projectFiles,isCurrentProjectLoading:e.projectState.isLoadingCurrentProject,permissions:e.permissions.permissions}}),(function(e){return{loadCurrentProject:()=>{e(Qe())},loadClassifiers:()=>{e(rt()),e(ot())}}}))(l6),u6=e=>{let{error:t}=e;return(0,C.jsx)(Zv,{type:"danger",icon:"error",children:(0,C.jsxs)(C.Fragment,{children:["message"in t&&(0,C.jsx)(Yv,{children:t.message}),"intlMessage"in t&&(0,C.jsx)(N.FormattedMessage,{id:t.intlMessage})]})})},d6=e=>{let{file:t,errors:n,setFile:r,sendFile:o,clearFile:i,addError:l,clearErrors:c,grupp:u,projektiOsa:d,projektiStaadium:f,ehitised:p,responsePending:h,isAudit:g}=e;const m=(0,N.useIntl)();let v=!1,b=!0;if(t&&t.fileName){let e=t.fileName.split(".").pop();"ifc"===(null==e?void 0:e.toLowerCase())&&(v=!0,b=!1)}function y(e,n){if(!t)return;const o=a({},t);o[e]=n,r(o)}function x(e){return e.map((e=>({value:e.code,label:e.text})))}function w(e,t){return e.find((e=>{if(e.value===t)return{value:e.value,label:e.label}}))}const _=(0,s.useMemo)((()=>x(f)),[f]),S=(0,s.useMemo)((()=>x(d)),[d]),k=(0,s.useMemo)((()=>x(u)),[u]),E=(0,s.useMemo)((()=>[{value:"",label:"-"},{value:"Kõik",label:"Kõik"}].concat(x(p))),[p]);return(0,C.jsx)(h4,{toggleVisible:()=>i(),secondaryText:"button.close",onSecondary:function(){c(),i()},primaryText:"button.save",onPrimary:function(){(function(){if(!t)return!0;c();let e=!1;!b||void 0!==t.grupp&&null!==t.grupp&&0!==t.grupp.length||(l({field:"grupp",intlMessage:"popupEditFile.error.groupName"}),e=!0);!v||null!=t.ehitiseSeos&&""!=t.ehitiseSeos||(l({field:"ehitiseSeos",intlMessage:"popupEditFile.error.buildingRelation"}),e=!0);void 0!==t.projektiOsa&&null!==t.projektiOsa&&0!==t.projektiOsa.length||(l({field:"projektiOsa",intlMessage:"popupEditFile.error.projectType"}),e=!0);g||void 0!==t.projektiStaadium&&null!==t.projektiStaadium&&0!==t.projektiStaadium.length||(l({field:"projektiStaadium",intlMessage:"popupEditFile.error.projectStage"}),e=!0);return e})()||o()},size:8,visible:!!t,title:m.formatMessage({id:"popupEditFile.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Kv,{size:1,children:[n.map(((e,t)=>(0,C.jsx)(u6,{error:e},"doc2--edit-error-".concat(t)))),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.fileName"}),tooltip:m.formatMessage({id:"popupEditFile.fileName.label"}),children:null==t?void 0:t.fileName})}),v&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.ehitiseSeosEhrKood"}),tooltip:m.formatMessage({id:"popupEditFile.ehitiseSeosEhrKood.label"}),required:v,children:(0,C.jsx)(s5,{id:"buildingConnection",label:"",options:E,onChange:e=>y("ehitiseSeos",e.value),value:w(E,null==t?void 0:t.ehitiseSeos),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:g?"popupEditFile.auditID":"popupEditFile.projectID"}),tooltip:m.formatMessage({id:g?"popupEditFile.auditID.label":"popupEditFile.projectID.label"}),children:(0,C.jsx)(y_,{id:"projektiTunnus",value:null==t?void 0:t.projektiTunnus,renderWithoutLabel:!0,hideLabel:!0,label:"",onChange:e=>y("projektiTunnus",e)})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.projectStage"}),tooltip:m.formatMessage({id:"popupEditFile.projectStage.label"}),required:!g,children:(0,C.jsx)(s5,{id:"projectStage",label:"",options:_,onChange:e=>y("projektiStaadium",e.value),value:w(_,null==t?void 0:t.projektiStaadium),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:g?"popupEditFile.auditType":"popupEditFile.projectType"}),tooltip:m.formatMessage({id:g?"popupEditFile.auditType.label":"popupEditFile.projectType.label"}),required:!0,children:(0,C.jsx)(s5,{id:"projectPart",label:"",options:S,onChange:e=>y("projektiOsa",e.value),value:w(S,null==t?void 0:t.projektiOsa),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.groupName"}),tooltip:m.formatMessage({id:"popupEditFile.groupName.label"}),required:b,children:(0,C.jsx)(s5,{id:"group",label:"",options:k,onChange:e=>y("grupp",e.value),value:w(k,null==t?void 0:t.grupp),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.jrkNr"}),tooltip:m.formatMessage({id:"popupEditFile.jrkNr.label"}),children:(0,C.jsx)(y_,{id:"jrkNr",value:(null==t?void 0:t.jrkNr)||"",renderWithoutLabel:!0,hideLabel:!0,label:"",onChange:e=>y("jrkNr",e)})})})]})})};const f6=(0,E.connect)((function(e){return{file:e.editFileState.editFile,errors:e.editFileState.errors,projektiOsa:e.codeToTextState.projektiOsa,projektiStaadium:e.codeToTextState.projektiStaadium,grupp:e.codeToTextState.grupp,grupiMarksona:e.codeToTextState.grupiMarksona,ehitised:e.codeToTextState.ehitised,responsePending:e.editFileState.responsePending,isAudit:"AUDIT"===e.projectState.applicationType}}),(function(e){return{setFile:t=>{e(An(t))},clearFile:()=>{e(Dn())},sendFile:()=>{e(zn())},addError:t=>{e(Fn(t))},clearErrors:()=>{e(Ln())}}}))(d6);let p6=function(e){return e.ENABLE_SIGN_PROJEKTI_OSA="ENABLE_SIGN_PROJEKTI_OSA",e.SET_SIGN_CHALLENGE="SET_SIGN_CHALLENGE",e.SET_SIGN_SESSION="SET_SIGN_SESSION",e.COMPLETE_SIGNING="COMPLETE_SIGNING",e.TOGGLE_SIGN_IN_PROGRESS="TOGGLE_SIGN_IN_PROGRESS",e.CANCEL_SIGN_PROJEKTI_OSA="CANCEL_SIGN_PROJEKTI_OSA",e.SET_SIGN_METHOD="SET_SIGN_METHOD",e.SET_MOBILE_NUMBER="SET_MOBILE_NUMBER",e}({});function h6(e){return{type:p6.SET_SIGN_SESSION,payload:{text:e}}}function g6(){return{type:p6.COMPLETE_SIGNING,payload:{}}}function m6(e){return{type:p6.TOGGLE_SIGN_IN_PROGRESS,payload:{toggled:e}}}function v6(){return(e,t)=>{const{method:n}=t().signPopup;switch(n){case se.ID_CARD:e((async(e,t)=>{const{applicationId:n,projectId:r}=t().projectState,{projektiOsa:o,revision:i}=t().signPopup;if(n&&r&&o&&i)try{console.log("start signing with ID card"),e(m6(!0));const t={revision:i,projektiOsa:"SIGN_CONTAINER"===o?null:o},a=window.hwcrypto;if(!a)throw new TypeError("Could not find hwcrypto");const s=await a.getCertificate({lang:"et"});t.signingCertificate=Array.prototype.slice.call(s.encoded);const l="".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_ID_CARD,{applicationNumber:n,projectId:r}));console.log("posting body",t);const c=await ue()({method:"POST",url:l,headers:{"Content-Type":"application/json"},data:JSON.stringify(t)});if(200!==c.status)throw new RangeError("Unexpected response status code, expected 200, got ".concat(c.status));console.log("got response data",c.data),e(h6(c.data.sessionId));const u=new Uint8Array(xt.bg(c.data.dataToSign));let d=c.data.digestAlgorithm;d.startsWith("SHA")&&!d.startsWith("SHA-")&&(d=d.replace("SHA","SHA-"));const f={type:d,value:u};console.log("trying to sign",f);const p=await a.sign(s,f,{lang:"et"});console.log("got signature data",p);const h={signatureValue:xt.iI(p.value),sessionId:c.data.sessionId},g="".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_ID_CARD,{applicationNumber:n,projectId:r}));console.log("posting body",h);const m=await ue()({method:"POST",url:g,headers:{"Content-Type":"application/json"},data:JSON.stringify(h)});if(204!==m.status)throw new RangeError("Unexpected response status code, expected 200, got ".concat(c.status));console.log("successfully signed, got response data",m.data),e(be()),e(it()),e(g6())}catch(t){console.error(t),e(m6(!1)),e(g6()),he(t,e)}}));break;case se.MOBILE_ID:e(b6(se.MOBILE_ID));break;case se.SMART_ID:e(b6(se.SMART_ID))}}}function b6(e){return async(t,n)=>{const{applicationId:r,projectId:o}=n().projectState,{projektiOsa:i,revision:a,mobileNumber:s}=n().signPopup;if(!r||!o||!i||!a||e===se.MOBILE_ID&&!s)return;const l=e===se.MOBILE_ID?"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_MOBILE_ID,{applicationNumber:r,projectId:o})):"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_SMART_ID,{applicationNumber:r,projectId:o})),c={revision:a,projektiOsa:"SIGN_CONTAINER"===i?null:i};t(m6(!0)),e===se.MOBILE_ID&&(c.phoneNumber=s),ue()({method:"POST",url:l,headers:{"Content-Type":"application/json"},data:JSON.stringify(c)}).then((n=>{var r;200===n.status&&(t(h6(n.data.sessionId)),t((r=n.data.challenge,{type:p6.SET_SIGN_CHALLENGE,payload:{text:r}})),t(function(e){return async(t,n)=>{const{applicationId:r,projectId:o}=n().projectState,{sessionId:i}=n().signPopup;if(!r||!o||!i)return;const a=e===se.MOBILE_ID?"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_MOBILE_ID,{applicationNumber:r,projectId:o})):"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_SMART_ID,{applicationNumber:r,projectId:o})),s={sessionId:i};ue()({method:"POST",url:a,headers:{"Content-Type":"application/json"},data:JSON.stringify(s)}).catch((e=>{t(m6(!1)),he(e,t)})).finally((()=>{t(be()),t(it()),t(g6())}))}}(e)))})).catch((e=>{t(m6(!1)),t(g6()),he(e,t)}))}}const y6={hash:"",containerId:"",challengeId:"",signatureId:"",certificate:[],signature:[],newDoFailId:void 0,phoneNr:"+372",personIdentifier:"",doFailId:void 0,doDokuNr:"",addToExisting:!1};let x6=function(e){return e.SIGN_TYPE_ID_CARD="ID-kaart",e.SIGN_TYPE_MOBILE_ID="Mobiil-ID",e.SIGN_TYPE_SMART_ID="Smart-ID",e}({}),w6=function(e){return e.Hint="hint",e.Valid="valid",e.Error="error",e}({});const _6=function(e){if(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return a({text:e,type:w6.Error},n)}},S6=e=>{let{yupErrors:t,responseError:n,setSignType:r,signData:o,cleanError:i,setSignData:s,signType:l}=e;const c=(0,N.useIntl)();return(0,C.jsxs)(Bv,{gutter:0,gap:3,children:[n&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{icon:"warning",type:"danger",children:c.formatMessage({id:n.id},n.values)})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(T5,{id:"signing-type",inputType:"radio",items:[{id:x6.SIGN_TYPE_ID_CARD,label:x6.SIGN_TYPE_ID_CARD,value:x6.SIGN_TYPE_ID_CARD},{id:x6.SIGN_TYPE_MOBILE_ID,label:x6.SIGN_TYPE_MOBILE_ID,value:x6.SIGN_TYPE_MOBILE_ID},{id:x6.SIGN_TYPE_SMART_ID,label:x6.SIGN_TYPE_SMART_ID,value:x6.SIGN_TYPE_SMART_ID}],type:"filter",label:"",hideLabel:!0,renderWithoutLabel:!0,name:"signing",value:l,onChange:e=>{r(e)}})}),(0,C.jsx)(zv,{children:(0,C.jsx)(r3,{borderless:!0,padding:.5,children:(0,C.jsx)(i3,{children:(0,C.jsxs)(Bv,{gap:2,children:[l===x6.SIGN_TYPE_ID_CARD&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"id_card",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.id_card"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.id_card"})})]})})]}),l===x6.SIGN_TYPE_MOBILE_ID&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"sim_card",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.mobile_id"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.mobile_id.without_idCode"})}),(0,C.jsx)(y_,{id:"phone-number",label:c.formatMessage({id:"document.persons.phone"}),value:o.phoneNr,onChange:e=>(e=>{i("signData.phoneNr"),s(a(a({},o),{},{phoneNr:e}))})(e),required:!0,helper:_6((e=>{if(t)return t[e]?c.formatMessage({id:t[e]}):void 0})("signData.phoneNr")),placeholder:c.formatMessage({id:"document.persons.phone.placeholder"}),defaultValue:"+372"})]})})]}),l===x6.SIGN_TYPE_SMART_ID&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"smartphone",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.smart_id"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.smart_id.without_idCode"})})]})})]})]})})})})]})},k6=G4.object({signData:G4.object({phoneNr:G4.string().test("validate-phoneNr","validate.phoneNr",(function(e){const t=this.options.context;return(null==t?void 0:t.signType)!==x6.SIGN_TYPE_MOBILE_ID||!!(n=e)&&/^\+372\d{7,10}$/.test(n);var n}))})}),E6=e=>{let{challenge:t,revision:n,onContinue:r,onCancel:o,setSignMethod:i,setMobileNumber:a}=e;const[l,c]=(0,s.useState)(y6),[u,d]=(0,s.useState)(x6.SIGN_TYPE_ID_CARD),{validate:f,errors:p,clearErrors:h}=Y4(k6),g=e=>{h(),m(),d(e),(e=>{switch(e){case x6.SIGN_TYPE_ID_CARD:i(se.ID_CARD);break;case x6.SIGN_TYPE_MOBILE_ID:i(se.MOBILE_ID);break;case x6.SIGN_TYPE_SMART_ID:i(se.SMART_ID)}})(e)},m=()=>{c(y6)};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(h4,{toggleVisible:()=>o(),primaryText:"button.sign",secondaryText:"button.cancel",onPrimary:()=>{f({signData:l},(()=>{r()}),{signType:u})},onSecondary:()=>{h(),m(),d(x6.SIGN_TYPE_ID_CARD),o()},primaryColor:"positive",size:6,visible:!!n,title:"signing",cardProps:{border:"top-positive-main"},children:(0,C.jsx)(Kv,{size:1,children:(0,C.jsx)(S6,{setSignData:e=>{return a((t=e).phoneNr),void c(t);var t},signData:l,yupErrors:p,cleanError:e=>h(e),setSignType:e=>g(e),signType:u})})}),u!==x6.SIGN_TYPE_ID_CARD&&t&&(0,C.jsx)(h4,{visible:!!t,toggleVisible:()=>o(),secondaryText:"button.cancel",onSecondary:()=>o(),title:u===x6.SIGN_TYPE_MOBILE_ID?"signing.modal.header.mobile_id.step2":"signing.modal.header.smart_id.step2",withoutCardHeader:!0,children:(0,C.jsx)(O2,{children:(0,C.jsx)(O2.Content,{background:"secondary",children:(0,C.jsx)(Yv,{modifiers:["bold","center"],element:"h3",children:t})})})})]})};const C6=(0,E.connect)((function(e){return{challenge:e.signPopup.challenge,revision:e.signPopup.revision}}),(function(e){return{onContinue:()=>{e(v6())},onCancel:()=>{e({type:p6.CANCEL_SIGN_PROJEKTI_OSA,payload:{}})},setSignMethod:t=>{e(function(e){return{type:p6.SET_SIGN_METHOD,payload:{method:e}}}(t))},setMobileNumber:t=>{var n;e((n=t,{type:p6.SET_MOBILE_NUMBER,payload:{text:n}}))}}}))(E6),j6=e=>{let{closePopup:t,files:n,requestReleaseFiles:r,requestsInProgress:o}=e;const i=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:()=>t(),secondaryText:"button.close",onSecondary:()=>t(),primaryText:"button.save",onPrimary:function(){null!=n&&n.length&&r(n)},size:8,visible:!(null==n||!n.length),title:i.formatMessage({id:"popupReleaseAccess.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupReleaseAccess.overview"}),children:(0,C.jsx)(tb,{style:"styled",children:null==n?void 0:n.map((e=>(0,C.jsx)(eb,{children:e.failiNimetus},e.id)))})})})})};const O6=(0,E.connect)((function(e){const t=new Set(e.restrictFilesState.releaseFileIds);return{files:t&&e.projectState.projectFiles.filter((e=>t.has(e.id))),requestsInProgress:e.restrictFilesState.requestsInProgress}}),(function(e){return{closePopup:()=>{e(Rt(void 0))},requestReleaseFiles:t=>{e(At(t))}}}))(j6),T6=e=>{let{applicationId:t,onFilesChange:n,buttonConfig:r,isProceeding:o}=e;const i=(0,N.useIntl)(),[a,l]=(0,s.useState)(!1);(0,s.useEffect)((()=>{Ci.dispatch({type:Fe.INITIALIZATION,payload:{value:{applicationId:t,isProceeding:null!=o&&o}}})}),[t,o]);const[c,u]=(0,s.useState)("buildingProject.header.default");return(0,s.useEffect)((()=>{Ci.subscribe((()=>{var e;const t=i.formatMessage({id:"AUDIT"===(null===(n=Ci.getState().projectState)||void 0===n?void 0:n.applicationType)?"buildingProject.header.audit":"buildingProject.header.default"});var n;const r=null!==(e=Ci.getState().projectState)&&void 0!==e&&e.isReference?" (".concat(i.formatMessage({id:"buildingProject.header.reference"}),")"):"";u(t+r),l(Ci.getState().keycloak.authenticated)}))}),[]),(0,C.jsx)(T2,{children:(0,C.jsx)(Cv,{locale:"et",children:(0,C.jsxs)("div",{id:"doc2",children:[(0,C.jsx)(i4,{defaultOpenItem:["ProjectFilePageSection"],"data-testid":"project-file-accordion",children:(0,C.jsxs)(s4,{id:"ProjectFilePageSection",children:[(0,C.jsx)(f4,{background:"primary",closeText:" ",openText:" ",children:c}),(0,C.jsx)(l4,{children:(0,C.jsx)(c6,{onFilesChange:n,buttonConfig:r})})]})}),(0,C.jsx)(f6,{}),(0,C.jsx)(v4,{}),(0,C.jsx)(k4,{}),(0,C.jsx)(O6,{}),(0,C.jsx)(C6,{})]})})})},I6=e=>{let t=Ii({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,C.jsx)(E.Provider,{store:Ci,children:(0,C.jsx)(T6,a({},t))})}})(),module.exports=i})();
75
+ `),nS.rippleVisible,cS,550,(({theme:e})=>e.transitions.easing.easeInOut),nS.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),nS.child,nS.childLeaving,uS,550,(({theme:e})=>e.transitions.easing.easeInOut),nS.childPulsate,dS,(({theme:e})=>e.transitions.easing.easeInOut)),hS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=Au(n,rS),[l,c]=s.useState([]),u=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=s.useRef(!1),p=Ph(),h=s.useRef(null),g=s.useRef(null),m=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,(0,C.jsx)(pS,{classes:{ripple:qp(o.ripple,nS.ripple),rippleVisible:qp(o.rippleVisible,nS.rippleVisible),ripplePulsate:qp(o.ripplePulsate,nS.ripplePulsate),child:qp(o.child,nS.child),childLeaving:qp(o.childLeaving,nS.childLeaving),childPulsate:qp(o.childPulsate,nS.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),v=s.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&f.current)return void(f.current=!1);"touchstart"===(null==e?void 0:e.type)&&(f.current=!0);const s=a?null:g.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,m,p]),b=s.useCallback((()=>{v({},{pulsate:!0})}),[v]),y=s.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{y(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return s.useImperativeHandle(t,(()=>({pulsate:b,start:v,stop:y})),[b,v,y]),(0,C.jsx)(fS,bu({className:qp(nS.root,o.root,i),ref:g},a,{children:(0,C.jsx)(Y_,{component:null,exit:!0,children:l})}))}));function gS(e){return Jp("MuiButtonBase",e)}const mS=Xp("MuiButtonBase",["root","disabled","focusVisible"]),vS=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bS=av("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${mS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),yS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:p="a",onBlur:h,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:b,onFocusVisible:y,onKeyDown:x,onKeyUp:w,onMouseDown:_,onMouseLeave:S,onMouseUp:k,onTouchEnd:E,onTouchMove:j,onTouchStart:O,tabIndex:T=0,TouchRippleProps:I,touchRippleRef:R,type:P}=n,M=Au(n,vS),A=s.useRef(null),D=s.useRef(null),F=Oh(D,R),{isFocusVisibleRef:L,onFocus:N,onBlur:B,ref:z}=$h(),[$,V]=s.useState(!1);c&&$&&V(!1),s.useImperativeHandle(r,(()=>({focusVisible:()=>{V(!0),A.current.focus()}})),[]);const[H,K]=s.useState(!1);s.useEffect((()=>{K(!0)}),[]);const U=H&&!u&&!c;function G(e,t,n=d){return jh((r=>(t&&t(r),!n&&D.current&&D.current[e](r),!0)))}s.useEffect((()=>{$&&f&&!u&&H&&D.current.pulsate()}),[u,f,$,H]);const W=G("start",_),q=G("stop",m),Y=G("stop",v),J=G("stop",k),X=G("stop",(e=>{$&&e.preventDefault(),S&&S(e)})),Z=G("start",O),Q=G("stop",E),ee=G("stop",j),te=G("stop",(e=>{B(e),!1===L.current&&V(!1),h&&h(e)}),!1),ne=jh((e=>{A.current||(A.current=e.currentTarget),N(e),!0===L.current&&(V(!0),y&&y(e)),b&&b(e)})),re=()=>{const e=A.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},oe=s.useRef(!1),ie=jh((e=>{f&&!oe.current&&$&&D.current&&" "===e.key&&(oe.current=!0,D.current.stop(e,(()=>{D.current.start(e)}))),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),ae=jh((e=>{f&&" "===e.key&&D.current&&$&&!e.defaultPrevented&&(oe.current=!1,D.current.stop(e,(()=>{D.current.pulsate(e)}))),w&&w(e),g&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let se=l;"button"===se&&(M.href||M.to)&&(se=p);const le={};"button"===se?(le.type=void 0===P?"button":P,le.disabled=c):(!M.href&&!M.to&&(le.role="button"),c&&(le["aria-disabled"]=c));const ce=Oh(t,z,A),ue=bu({},n,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:T,focusVisible:$}),de=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Gh({root:["root",t&&"disabled",n&&"focusVisible"]},gS,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return(0,C.jsxs)(bS,bu({as:se,className:qp(de.root,a),ownerState:ue,onBlur:te,onClick:g,onContextMenu:q,onFocus:ne,onKeyDown:ie,onKeyUp:ae,onMouseDown:W,onMouseLeave:X,onMouseUp:J,onDragLeave:Y,onTouchEnd:Q,onTouchMove:ee,onTouchStart:Z,ref:ce,tabIndex:c?-1:T,type:P},le,M,{children:[i,U?(0,C.jsx)(hS,bu({ref:F,center:o},I)):null]}))}));function xS(e){return Jp("MuiIconButton",e)}const wS=Xp("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),_S=["edge","children","className","color","disabled","disableFocusRipple","size"],SS=av(yS,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${$f(n.color)}`],n.edge&&t[`edge${$f(n.edge)}`],t[`size${$f(n.size)}`]]}})((({theme:e,ownerState:t})=>bu({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return bu({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&bu({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":bu({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${wS.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),kS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=Au(n,_S),d=bu({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),f=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Gh({root:["root",n&&"disabled","default"!==r&&`color${$f(r)}`,o&&`edge${$f(o)}`,`size${$f(i)}`]},xS,t)})(d);return(0,C.jsx)(SS,bu({className:qp(f.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:o}))}));function ES(e){return Jp("MuiTypography",e)}Xp("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const CS=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],jS=av("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${$f(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>bu({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),OS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},TS={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},IS=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTypography"}),r=(e=>TS[e]||e)(n.color),o=Hp(bu({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=OS}=o,p=Au(o,CS),h=bu({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),g=s||(u?"p":f[d]||OS[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Gh({root:["root",i,"inherit"!==e.align&&`align${$f(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},ES,a)})(h);return(0,C.jsx)(jS,bu({as:g,ref:t,ownerState:h,className:qp(m.root,a)},p))}));var RS={};Object.defineProperty(RS,"__esModule",{value:!0});var PS=RS.default=void 0,MS=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=DS(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(s),AS=Dm;function DS(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(DS=function(e){return e?n:t})(e)}PS=RS.default=function(e=null){const t=MS.useContext(AS.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t};var FS="top",LS="bottom",NS="right",BS="left",zS="auto",$S=[FS,LS,NS,BS],VS="start",HS="end",KS="viewport",US="popper",GS=$S.reduce((function(e,t){return e.concat([t+"-"+VS,t+"-"+HS])}),[]),WS=[].concat($S,[zS]).reduce((function(e,t){return e.concat([t,t+"-"+VS,t+"-"+HS])}),[]),qS=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function YS(e){return e?(e.nodeName||"").toLowerCase():null}function JS(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function XS(e){return e instanceof JS(e).Element||e instanceof Element}function ZS(e){return e instanceof JS(e).HTMLElement||e instanceof HTMLElement}function QS(e){return!(typeof ShadowRoot>"u")&&(e instanceof JS(e).ShadowRoot||e instanceof ShadowRoot)}const ek={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!ZS(o)||!YS(o)||(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});!ZS(r)||!YS(r)||(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function tk(e){return e.split("-")[0]}var nk=Math.max,rk=Math.min,ok=Math.round;function ik(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function ak(){return!/^((?!chrome|android).)*safari/i.test(ik())}function sk(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&ZS(e)&&(o=e.offsetWidth>0&&ok(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ok(r.height)/e.offsetHeight||1);var a=(XS(e)?JS(e):window).visualViewport,s=!ak()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function lk(e){var t=sk(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ck(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&QS(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function uk(e){return JS(e).getComputedStyle(e)}function dk(e){return["table","td","th"].indexOf(YS(e))>=0}function fk(e){return((XS(e)?e.ownerDocument:e.document)||window.document).documentElement}function pk(e){return"html"===YS(e)?e:e.assignedSlot||e.parentNode||(QS(e)?e.host:null)||fk(e)}function hk(e){return ZS(e)&&"fixed"!==uk(e).position?e.offsetParent:null}function gk(e){for(var t=JS(e),n=hk(e);n&&dk(n)&&"static"===uk(n).position;)n=hk(n);return n&&("html"===YS(n)||"body"===YS(n)&&"static"===uk(n).position)?t:n||function(e){var t=/firefox/i.test(ik());if(/Trident/i.test(ik())&&ZS(e)&&"fixed"===uk(e).position)return null;var n=pk(e);for(QS(n)&&(n=n.host);ZS(n)&&["html","body"].indexOf(YS(n))<0;){var r=uk(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function mk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vk(e,t,n){return nk(e,rk(t,n))}function bk(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function yk(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const xk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=tk(n.placement),l=mk(s),c=[BS,NS].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return bk("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:yk(e,$S))}(o.padding,n),d=lk(i),f="y"===l?FS:BS,p="y"===l?LS:NS,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=gk(i),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=h/2-g/2,y=u[f],x=v-d[c]-u[p],w=v/2-d[c]/2+b,_=vk(y,w,x),S=l;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||ck(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wk(e){return e.split("-")[1]}var _k={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sk(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,g=void 0===h?0:h,m="function"==typeof u?u({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=BS,x=FS,w=window;if(c){var _=gk(n),S="clientHeight",k="clientWidth";if(_===JS(n)&&("static"!==uk(_=fk(n)).position&&"absolute"===s&&(S="scrollHeight",k="scrollWidth")),o===FS||(o===BS||o===NS)&&i===HS)x=LS,g-=(d&&_===w&&w.visualViewport?w.visualViewport.height:_[S])-r.height,g*=l?1:-1;if(o===BS||(o===FS||o===LS)&&i===HS)y=NS,p-=(d&&_===w&&w.visualViewport?w.visualViewport.width:_[k])-r.width,p*=l?1:-1}var E,C=Object.assign({position:s},c&&_k),j=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:ok(n*o)/o||0,y:ok(r*o)/o||0}}({x:p,y:g},JS(n)):{x:p,y:g};return p=j.x,g=j.y,l?Object.assign({},C,((E={})[x]=b?"0":"",E[y]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},C,((t={})[x]=b?g+"px":"",t[y]=v?p+"px":"",t.transform="",t))}const kk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:tk(t.placement),variation:wk(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Sk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Ek={passive:!0};const Ck={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=JS(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ek)})),s&&l.addEventListener("resize",n.update,Ek),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ek)})),s&&l.removeEventListener("resize",n.update,Ek)}},data:{}};var jk={left:"right",right:"left",bottom:"top",top:"bottom"};function Ok(e){return e.replace(/left|right|bottom|top/g,(function(e){return jk[e]}))}var Tk={start:"end",end:"start"};function Ik(e){return e.replace(/start|end/g,(function(e){return Tk[e]}))}function Rk(e){var t=JS(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Pk(e){return sk(fk(e)).left+Rk(e).scrollLeft}function Mk(e){var t=uk(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ak(e){return["html","body","#document"].indexOf(YS(e))>=0?e.ownerDocument.body:ZS(e)&&Mk(e)?e:Ak(pk(e))}function Dk(e,t){var n;void 0===t&&(t=[]);var r=Ak(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=JS(r),a=o?[i].concat(i.visualViewport||[],Mk(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Dk(pk(a)))}function Fk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lk(e,t,n){return t===KS?Fk(function(e,t){var n=JS(e),r=fk(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=ak();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Pk(e),y:l}}(e,n)):XS(t)?function(e,t){var n=sk(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Fk(function(e){var t,n=fk(e),r=Rk(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=nk(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=nk(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Pk(e),l=-r.scrollTop;return"rtl"===uk(o||n).direction&&(s+=nk(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(fk(e)))}function Nk(e,t,n,r){var o="clippingParents"===t?function(e){var t=Dk(pk(e)),n=["absolute","fixed"].indexOf(uk(e).position)>=0&&ZS(e)?gk(e):e;return XS(n)?t.filter((function(e){return XS(e)&&ck(e,n)&&"body"!==YS(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=Lk(e,n,r);return t.top=nk(o.top,t.top),t.right=rk(o.right,t.right),t.bottom=rk(o.bottom,t.bottom),t.left=nk(o.left,t.left),t}),Lk(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Bk(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?tk(o):null,a=o?wk(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case FS:t={x:s,y:n.y-r.height};break;case LS:t={x:s,y:n.y+n.height};break;case NS:t={x:n.x+n.width,y:l};break;case BS:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?mk(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case VS:t[c]=t[c]-(n[u]/2-r[u]/2);break;case HS:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function zk(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?KS:c,d=n.elementContext,f=void 0===d?US:d,p=n.altBoundary,h=void 0!==p&&p,g=n.padding,m=void 0===g?0:g,v=bk("number"!=typeof m?m:yk(m,$S)),b=f===US?"reference":US,y=e.rects.popper,x=e.elements[h?b:f],w=Nk(XS(x)?x:x.contextElement||fk(e.elements.popper),l,u,a),_=sk(e.elements.reference),S=Bk({reference:_,element:y,strategy:"absolute",placement:o}),k=Fk(Object.assign({},y,S)),E=f===US?k:_,C={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},j=e.modifiersData.offset;if(f===US&&j){var O=j[o];Object.keys(C).forEach((function(e){var t=[NS,LS].indexOf(e)>=0?1:-1,n=[FS,LS].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}const $k={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,g=n.allowedAutoPlacements,m=t.options.placement,v=tk(m),b=l||(v===m||!h?[Ok(m)]:function(e){if(tk(e)===zS)return[];var t=Ok(e);return[Ik(e),t,Ik(t)]}(m)),y=[m].concat(b).reduce((function(e,n){return e.concat(tk(n)===zS?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?WS:l,u=wk(r),d=u?s?GS:GS.filter((function(e){return wk(e)===u})):$S,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=zk(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[tk(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):n)}),[]),x=t.rects.reference,w=t.rects.popper,_=new Map,S=!0,k=y[0],E=0;E<y.length;E++){var C=y[E],j=tk(C),O=wk(C)===VS,T=[FS,LS].indexOf(j)>=0,I=T?"width":"height",R=zk(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=T?O?NS:BS:O?LS:FS;x[I]>w[I]&&(P=Ok(P));var M=Ok(P),A=[];if(i&&A.push(R[j]<=0),s&&A.push(R[P]<=0,R[M]<=0),A.every((function(e){return e}))){k=C,S=!1;break}_.set(C,A)}if(S)for(var D=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},F=h?3:1;F>0;F--){if("break"===D(F))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Vk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Hk(e){return[FS,NS,LS,BS].some((function(t){return e[t]>=0}))}const Kk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zk(t,{elementContext:"reference"}),s=zk(t,{altBoundary:!0}),l=Vk(a,r),c=Vk(s,o,i),u=Hk(l),d=Hk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const Uk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=WS.reduce((function(e,n){return e[n]=function(e,t,n){var r=tk(e),o=[BS,FS].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[BS,NS].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};const Gk={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Bk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Wk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,g=void 0===h?0:h,m=zk(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=tk(t.placement),b=wk(t.placement),y=!b,x=mk(v),w=function(e){return"x"===e?"y":"x"}(x),_=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(_){if(i){var T,I="y"===x?FS:BS,R="y"===x?LS:NS,P="y"===x?"height":"width",M=_[x],A=M+m[I],D=M-m[R],F=p?-k[P]/2:0,L=b===VS?S[P]:k[P],N=b===VS?-k[P]:-S[P],B=t.elements.arrow,z=p&&B?lk(B):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=$[I],H=$[R],K=vk(0,S[P],z[P]),U=y?S[P]/2-F-K-V-C.mainAxis:L-K-V-C.mainAxis,G=y?-S[P]/2+F+K+H+C.mainAxis:N+K+H+C.mainAxis,W=t.elements.arrow&&gk(t.elements.arrow),q=W?"y"===x?W.clientTop||0:W.clientLeft||0:0,Y=null!=(T=null==j?void 0:j[x])?T:0,J=M+G-Y,X=vk(p?rk(A,M+U-Y-q):A,M,p?nk(D,J):D);_[x]=X,O[x]=X-M}if(s){var Z,Q="x"===x?FS:BS,ee="x"===x?LS:NS,te=_[w],ne="y"===w?"height":"width",re=te+m[Q],oe=te-m[ee],ie=-1!==[FS,BS].indexOf(v),ae=null!=(Z=null==j?void 0:j[w])?Z:0,se=ie?re:te-S[ne]-k[ne]-ae+C.altAxis,le=ie?te+S[ne]+k[ne]-ae-C.altAxis:oe,ce=p&&ie?function(e,t,n){var r=vk(e,t,n);return r>n?n:r}(se,te,le):vk(p?se:re,te,p?le:oe);_[w]=ce,O[w]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function qk(e,t,n){void 0===n&&(n=!1);var r=ZS(t),o=ZS(t)&&function(e){var t=e.getBoundingClientRect(),n=ok(t.width)/e.offsetWidth||1,r=ok(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=fk(t),a=sk(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==YS(t)||Mk(i))&&(s=function(e){return e!==JS(e)&&ZS(e)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):Rk(e)}(t)),ZS(t)?((l=sk(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Pk(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Yk(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Jk(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Xk={placement:"bottom",modifiers:[],strategy:"absolute"};function Zk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Qk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Xk:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xk,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:XS(e)?Dk(e):e.contextElement?Dk(e.contextElement):[],popper:Dk(t)};var u=function(e){var t=Yk(e);return qS.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Zk(t,n)){o.rects={reference:qk(t,gk(n),"fixed"===o.options.strategy),popper:lk(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:Jk((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Zk(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var eE=Qk({defaultModifiers:[Ck,Gk,kk,ek,Uk,$k,Wk,xk,Kk]});const tE=s.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=s.useState(null),l=Oh(s.isValidElement(n)?Xh(n):null,t);if(ch((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),ch((()=>{if(i&&!o)return _h(t,i),()=>{_h(t,null)}}),[t,i,o]),o){if(s.isValidElement(n)){const e={ref:l};return s.cloneElement(n,e)}return(0,C.jsx)(s.Fragment,{children:n})}return(0,C.jsx)(s.Fragment,{children:i&&cc.createPortal(n,i)})}));function nE(e){return Jp("MuiPopper",e)}Xp("MuiPopper",["root"]);const rE=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],oE=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function iE(e){return"function"==typeof e?e():e}function aE(e){return void 0!==e.nodeType}const sE={},lE=s.forwardRef((function(e,t){var n;const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:p={},slots:h={},TransitionProps:g}=e,m=Au(e,rE),v=s.useRef(null),b=Oh(v,t),y=s.useRef(null),x=Oh(y,f),w=s.useRef(x);ch((()=>{w.current=x}),[x]),s.useImperativeHandle(f,(()=>y.current),[]);const _=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,i),[S,k]=s.useState(_),[E,j]=s.useState(iE(r));s.useEffect((()=>{y.current&&y.current.forceUpdate()})),s.useEffect((()=>{r&&j(iE(r))}),[r]),ch((()=>{if(!E||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{(e=>{k(e.placement)})(e)}}];null!=l&&(e=e.concat(l)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=eE(E,v.current,bu({placement:_},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[E,a,l,c,d,_]);const O={placement:S};null!==g&&(O.TransitionProps=g);const T=(e=>{const{classes:t}=e;return Gh({root:["root"]},nE,t)})(e),I=null!=(n=h.root)?n:"div",R=Jh({elementType:I,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:T.root});return(0,C.jsx)(I,bu({},R,{children:"function"==typeof o?o(O):o}))})),cE=s.forwardRef((function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=sE,popperRef:p,style:h,transition:g=!1,slotProps:m={},slots:v={}}=e,b=Au(e,oE),[y,x]=s.useState(!0);if(!l&&!u&&(!g||y))return null;let w;if(o)w=o;else if(n){const e=iE(n);w=e&&aE(e)?xh(e).body:xh(null).body}const _=u||!l||g&&!y?void 0:"none",S=g?{in:u,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return(0,C.jsx)(tE,{disablePortal:a,container:w,children:(0,C.jsx)(lE,bu({anchorEl:n,direction:i,disablePortal:a,modifiers:c,ref:t,open:g?!y:u,placement:d,popperOptions:f,popperRef:p,slotProps:m,slots:v},b,{style:bu({position:"fixed",top:0,left:0,display:_},h),TransitionProps:S,children:r}))})})),uE=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],dE=av(cE,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fE=s.forwardRef((function(e,t){var n;const r=PS(),o=__({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:g,popperRef:m,transition:v,slots:b,slotProps:y}=o,x=Au(o,uE),w=null!=(n=null==b?void 0:b.root)?n:null==s?void 0:s.Root,_=bu({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:h,popperOptions:g,popperRef:m,transition:v},x);return(0,C.jsx)(dE,bu({as:a,direction:null==r?void 0:r.direction,slots:{root:w},slotProps:y??l},_,{ref:t}))})),pE=s.createContext(void 0);const hE=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],gE={entering:{opacity:1},entered:{opacity:1}},mE=s.forwardRef((function(e,t){const n=Tm(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:g,style:m,timeout:v=r,TransitionComponent:b=B_}=e,y=Au(e,hE),x=s.useRef(null),w=Oh(x,Xh(a),t),_=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=_(f),k=_(((e,t)=>{J_(e);const r=X_({style:m,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),E=_(d),j=_(g),O=_((e=>{const t=X_({style:m,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),T=_(h);return(0,C.jsx)(b,bu({appear:i,in:c,nodeRef:x,onEnter:k,onEntered:E,onEntering:S,onExit:O,onExited:T,onExiting:j,addEndListener:e=>{o&&o(x.current,e)},timeout:v},y,{children:(e,t)=>s.cloneElement(a,bu({style:bu({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},gE[e],m,a.props.style),ref:w},t))}))}));function vE(e){return Jp("MuiBackdrop",e)}Xp("MuiBackdrop",["root","invisible"]);const bE=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],yE=av("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>bu({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),xE=s.forwardRef((function(e,t){var n,r,o;const i=__({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:p={},slots:h={},TransitionComponent:g=mE,transitionDuration:m}=i,v=Au(i,bE),b=bu({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return Gh({root:["root",n&&"invisible"]},vE,t)})(b),x=null!=(n=p.root)?n:u.root;return(0,C.jsx)(g,bu({in:f,timeout:m},v,{children:(0,C.jsx)(yE,bu({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:qp(y.root,s,null==x?void 0:x.className),ownerState:bu({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}));function wE(e){return Jp("MuiButton",e)}const _E=Xp("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),SE=s.createContext({}),kE=s.createContext(void 0),EE=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],CE=e=>bu({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),jE=av(yS,{shouldForwardProp:e=>iv(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${$f(n.color)}`],t[`size${$f(n.size)}`],t[`${n.variant}Size${$f(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return bu({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":bu({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dg(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":bu({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${_E.focusVisible}`]:bu({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${_E.disabled}`]:bu({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${dg(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_E.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_E.disabled}`]:{boxShadow:"none"}})),OE=av("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${$f(n.size)}`]]}})((({ownerState:e})=>bu({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},CE(e)))),TE=av("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${$f(n.size)}`]]}})((({ownerState:e})=>bu({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},CE(e)))),IE=s.forwardRef((function(e,t){const n=s.useContext(SE),r=s.useContext(kE),o=__({props:sh(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:f=!1,endIcon:p,focusVisibleClassName:h,fullWidth:g=!1,size:m="medium",startIcon:v,type:b,variant:y="text"}=o,x=Au(o,EE),w=bu({},o,{color:a,component:l,disabled:u,disableElevation:d,disableFocusRipple:f,fullWidth:g,size:m,type:b,variant:y}),_=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return bu({},a,Gh({root:["root",i,`${i}${$f(t)}`,`size${$f(o)}`,`${i}Size${$f(o)}`,`color${$f(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${$f(o)}`],endIcon:["icon","endIcon",`iconSize${$f(o)}`]},wE,a))})(w),S=v&&(0,C.jsx)(OE,{className:_.startIcon,ownerState:w,children:v}),k=p&&(0,C.jsx)(TE,{className:_.endIcon,ownerState:w,children:p}),E=r||"";return(0,C.jsxs)(jE,bu({ownerState:w,className:qp(n.className,_.root,c,E),component:l,disabled:u,focusRipple:!f,focusVisibleClassName:qp(_.focusVisible,h),ref:t,type:b},x,{classes:_,children:[S,i,k]}))}));function RE(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function PE(e){return parseInt(wh(e).getComputedStyle(e).paddingRight,10)||0}function ME(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&RE(e,o)}))}function AE(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function DE(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=xh(e);return t.body===e?wh(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(xh(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${PE(r)+e}px`;const t=xh(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${PE(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=xh(r).body;else{const t=r.parentElement,n=wh(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const FE=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function LE(e){const t=[],n=[];return Array.from(e.querySelectorAll(FE)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1===o||!function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)||(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function NE(){return!0}function BE(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=LE,isEnabled:a=NE,open:l}=e,c=s.useRef(!1),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=s.useRef(!1),g=s.useRef(null),m=Oh(Xh(t),g),v=s.useRef(null);s.useEffect((()=>{!l||!g.current||(h.current=!n)}),[n,l]),s.useEffect((()=>{if(!l||!g.current)return;const e=xh(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),h.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}}),[l]),s.useEffect((()=>{if(!l||!g.current)return;const e=xh(g.current),t=t=>{v.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!a()||c.current)return void(c.current=!1);if(t.contains(e.activeElement)||r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if((e.activeElement===u.current||e.activeElement===d.current)&&(n=i(g.current)),n.length>0){var o,s;const e=!(null==(o=v.current)||!o.shiftKey||"Tab"!==(null==(s=v.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,i]);const b=e=>{null===f.current&&(f.current=e.relatedTarget),h.current=!0};return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),s.cloneElement(t,{ref:m,onFocus:e=>{null===f.current&&(f.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,C.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const zE=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&RE(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ME(t,e.mount,e.modalRef,r,!0);const o=AE(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=AE(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=DE(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=AE(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&RE(e.modalRef,t),ME(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&RE(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function $E(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=zE,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:f}=e,p=s.useRef({}),h=s.useRef(null),g=s.useRef(null),m=Oh(g,f),[v,b]=s.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(x=!1);const w=()=>(p.current.modalRef=g.current,p.current.mount=h.current,p.current),_=()=>{o.mount(w(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},S=jh((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||xh(h.current).body;o.add(w(),e),g.current&&_()})),k=s.useCallback((()=>o.isTopModal(w())),[o]),E=jh((e=>{h.current=e,e&&(d&&k()?_():g.current&&RE(g.current,x))})),C=s.useCallback((()=>{o.remove(w(),x)}),[x,o]);s.useEffect((()=>()=>{C()}),[C]),s.useEffect((()=>{d?S():(!y||!i)&&C()}),[d,C,y,i,S]);const j=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},O=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Wh(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=bu({},n,t);return bu({role:"presentation"},r,{onKeyDown:j(r),ref:m})},getBackdropProps:(e={})=>bu({"aria-hidden":!0},e,{onClick:O(e),open:d}),getTransitionProps:()=>({onEnter:bh((()=>{b(!1),a&&a()}),null==c?void 0:c.props.onEnter),onExited:bh((()=>{b(!0),l&&l(),i&&C()}),null==c?void 0:c.props.onExited)}),rootRef:m,portalRef:E,isTopModal:k,exited:v,hasTransition:y}}function VE(e){return Jp("MuiModal",e)}Xp("MuiModal",["root","hidden","backdrop"]);const HE=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],KE=av("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>bu({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),UE=av(xE,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),GE=s.forwardRef((function(e,t){var n,r,o,i,a,l;const c=__({name:"MuiModal",props:e}),{BackdropComponent:u=UE,BackdropProps:d,className:f,closeAfterTransition:p=!1,children:h,container:g,component:m,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:_=!1,disableRestoreFocus:S=!1,disableScrollLock:k=!1,hideBackdrop:E=!1,keepMounted:j=!1,onBackdropClick:O,open:T,slotProps:I,slots:R}=c,P=Au(c,HE),M=bu({},c,{closeAfterTransition:p,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:_,disableRestoreFocus:S,disableScrollLock:k,hideBackdrop:E,keepMounted:j}),{getRootProps:A,getBackdropProps:D,getTransitionProps:F,portalRef:L,isTopModal:N,exited:B,hasTransition:z}=$E(bu({},M,{rootRef:t})),$=bu({},M,{exited:B}),V=(e=>{const{open:t,exited:n,classes:r}=e;return Gh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},VE,r)})($),H={};if(void 0===h.props.tabIndex&&(H.tabIndex="-1"),z){const{onEnter:e,onExited:t}=F();H.onEnter=e,H.onExited=t}const K=null!=(n=null!=(r=null==R?void 0:R.root)?r:v.Root)?n:KE,U=null!=(o=null!=(i=null==R?void 0:R.backdrop)?i:v.Backdrop)?o:u,G=null!=(a=null==I?void 0:I.root)?a:b.root,W=null!=(l=null==I?void 0:I.backdrop)?l:b.backdrop,q=Jh({elementType:K,externalSlotProps:G,externalForwardedProps:P,getSlotProps:A,additionalProps:{ref:t,as:m},ownerState:$,className:qp(f,null==G?void 0:G.className,null==V?void 0:V.root,!$.open&&$.exited&&(null==V?void 0:V.hidden))}),Y=Jh({elementType:U,externalSlotProps:W,additionalProps:d,getSlotProps:e=>D(bu({},e,{onClick:t=>{O&&O(t),null!=e&&e.onClick&&e.onClick(t)}})),className:qp(null==W?void 0:W.className,null==d?void 0:d.className,null==V?void 0:V.backdrop),ownerState:$});return j||T||z&&!B?(0,C.jsx)(tE,{ref:L,container:g,disablePortal:_,children:(0,C.jsxs)(K,bu({},q,{children:[!E&&u?(0,C.jsx)(U,bu({},Y)):null,(0,C.jsx)(BE,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:S,isEnabled:N,open:T,children:s.cloneElement(h,H)})]}))}):null}));function WE(e){return Jp("MuiDialog",e)}const qE=Xp("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),YE=s.createContext({}),JE=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],XE=av(xE,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ZE=av(GE,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),QE=av("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${$f(n.scroll)}`]]}})((({ownerState:e})=>bu({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),eC=av(tS,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${$f(n.scroll)}`],t[`paperWidth${$f(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>bu({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${qE.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${qE.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${qE.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),tC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialog"}),r=Tm(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:m,onClick:v,onClose:b,open:y,PaperComponent:x=tS,PaperProps:w={},scroll:_="paper",TransitionComponent:S=mE,transitionDuration:k=o,TransitionProps:E}=n,j=Au(n,JE),O=bu({},n,{disableEscapeKeyDown:f,fullScreen:p,fullWidth:h,maxWidth:g,scroll:_}),T=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Gh({root:["root"],container:["container",`scroll${$f(n)}`],paper:["paper",`paperScroll${$f(n)}`,`paperWidth${$f(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},WE,t)})(O),I=s.useRef(),R=Eh(a),P=s.useMemo((()=>({titleId:R})),[R]);return(0,C.jsx)(ZE,bu({className:qp(T.root,d),closeAfterTransition:!0,components:{Backdrop:XE},componentsProps:{backdrop:bu({transitionDuration:k,as:l},c)},disableEscapeKeyDown:f,onClose:b,open:y,ref:t,onClick:e=>{v&&v(e),I.current&&(I.current=null,m&&m(e),b&&b(e,"backdropClick"))},ownerState:O},j,{children:(0,C.jsx)(S,bu({appear:!0,in:y,timeout:k,role:"presentation"},E,{children:(0,C.jsx)(QE,{className:qp(T.container),onMouseDown:e=>{I.current=e.target===e.currentTarget},ownerState:O,children:(0,C.jsx)(eC,bu({as:x,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":R},w,{className:qp(T.paper,w.className),ownerState:O,children:(0,C.jsx)(YE.Provider,{value:P,children:u})}))})}))}))}));function nC(e){return Jp("MuiDialogActions",e)}Xp("MuiDialogActions",["root","spacing"]);const rC=["className","disableSpacing"],oC=av("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>bu({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}}))),iC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,i=Au(n,rC),a=bu({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e;return Gh({root:["root",!n&&"spacing"]},nC,t)})(a);return(0,C.jsx)(oC,bu({className:qp(s.root,r),ownerState:a,ref:t},i))}));function aC(e){return Jp("MuiDialogContent",e)}Xp("MuiDialogContent",["root","dividers"]);const sC=Xp("MuiDialogTitle",["root"]),lC=["className","dividers"],cC=av("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>bu({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${sC.root} + &`]:{paddingTop:0}}))),uC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,i=Au(n,lC),a=bu({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Gh({root:["root",n&&"dividers"]},aC,t)})(a);return(0,C.jsx)(cC,bu({className:qp(s.root,r),ownerState:a,ref:t},i))})),dC=s.createContext();function fC(e){return Jp("MuiGrid",e)}const pC=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],hC=Xp("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...pC.map((e=>`grid-xs-${e}`)),...pC.map((e=>`grid-sm-${e}`)),...pC.map((e=>`grid-md-${e}`)),...pC.map((e=>`grid-lg-${e}`)),...pC.map((e=>`grid-xl-${e}`))]),gC=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function mC(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function vC({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const bC=av("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>bu({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return Bf({theme:e},zf({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${hC.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=zf({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=vC({breakpoints:e.breakpoints.values,values:t})),o=Bf({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${mC(i)}`,[`& > .${hC.item}`]:{paddingTop:mC(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${hC.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=zf({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=vC({breakpoints:e.breakpoints.values,values:t})),o=Bf({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${mC(i)})`,marginLeft:`-${mC(i)}`,[`& > .${hC.item}`]:{paddingLeft:mC(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${hC.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=zf({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${mC(n)})`;c={flexBasis:e,maxWidth:e}}}i=bu({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const yC=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Gh({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},fC,t)},xC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiGrid"}),{breakpoints:r}=Tm(),o=Hp(n),{className:i,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:f=!1,rowSpacing:p,spacing:h=0,wrap:g="wrap",zeroMinWidth:m=!1}=o,v=Au(o,gC),b=p||h,y=l||h,x=s.useContext(dC),w=u?a||12:x,_={},S=bu({},v);r.keys.forEach((e=>{null!=v[e]&&(_[e]=v[e],delete S[e])}));const k=bu({},o,{columns:w,container:u,direction:d,item:f,rowSpacing:b,columnSpacing:y,wrap:g,zeroMinWidth:m,spacing:h},_,{breakpoints:r.keys}),E=yC(k);return(0,C.jsx)(dC.Provider,{value:w,children:(0,C.jsx)(bC,bu({ownerState:k,className:qp(E.root,i),as:c,ref:t},S))})}));const wC=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function _C(e){return`scale(${e}, ${e**2})`}const SC={entering:{opacity:1,transform:_C(1)},entered:{opacity:1,transform:"none"}},kC=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),EC=s.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:g="auto",TransitionComponent:m=B_}=e,v=Au(e,wC),b=Ph(),y=s.useRef(),x=Tm(),w=s.useRef(null),_=Oh(w,Xh(o),t),S=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},k=S(u),E=S(((e,t)=>{J_(e);const{duration:n,delay:r,easing:o}=X_({style:h,timeout:g,easing:i},{mode:"enter"});let a;"auto"===g?(a=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:r}),x.transitions.create("transform",{duration:kC?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),j=S(c),O=S(p),T=S((e=>{const{duration:t,delay:n,easing:r}=X_({style:h,timeout:g,easing:i},{mode:"exit"});let o;"auto"===g?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:kC?o:.666*o,delay:kC?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=_C(.75),d&&d(e)})),I=S(f);return(0,C.jsx)(m,bu({appear:r,in:a,nodeRef:w,onEnter:E,onEntered:j,onEntering:k,onExit:T,onExited:I,onExiting:O,addEndListener:e=>{"auto"===g&&b.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===g?null:g},v,{children:(e,t)=>s.cloneElement(o,bu({style:bu({opacity:0,transform:_C(.75),visibility:"exited"!==e||a?void 0:"hidden"},SC[e],h,o.props.style),ref:_},t))}))}));function CC(e){return Jp("MuiInputAdornment",e)}EC.muiSupportAuto=!0;const jC=Xp("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var OC;const TC=["children","className","component","disablePointerEvents","disableTypography","position","variant"],IC=av("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${$f(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>bu({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${jC.positionStart}&:not(.${jC.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),RC=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:c,variant:u}=n,d=Au(n,TC),f=s.useContext(pE)||{};let p=u;u&&f.variant,p||(p=f.variant);const h=bu({},n,{hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:a,position:c,variant:p}),g=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Gh({root:["root",n&&"disablePointerEvents",o&&`position${$f(o)}`,a,r&&"hiddenLabel",i&&`size${$f(i)}`]},CC,t)})(h);return(0,C.jsx)(pE.Provider,{value:null,children:(0,C.jsx)(IC,bu({as:i,ownerState:h,className:qp(g.root,o),ref:t},d,{children:"string"!=typeof r||l?(0,C.jsxs)(s.Fragment,{children:["start"===c?OC||(OC=(0,C.jsx)("span",{className:"notranslate",children:"​"})):null,r]}):(0,C.jsx)(IS,{color:"text.secondary",children:r})}))})}));const PC=Xp("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),MC=(av(yS,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${$f(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${PC.iconWrapper}`]:t.iconWrapper}]}})((({theme:e,ownerState:t})=>bu({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${PC.iconWrapper}`]:bu({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${PC.selected}`]:{opacity:1},[`&.${PC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${PC.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${PC.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${PC.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${PC.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),j_((0,C.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")),AC=j_((0,C.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function DC(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const FC=["onChange"],LC={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function NC(e){return Jp("MuiTabScrollButton",e)}const BC=Xp("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zC=["className","slots","slotProps","direction","orientation","disabled"],$C=av(yS,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((({ownerState:e})=>bu({width:40,flexShrink:0,opacity:.8,[`&.${BC.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),VC=s.forwardRef((function(e,t){var n,r;const o=__({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=Au(o,zC),u=bu({isRtl:Qh()},o),d=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Gh({root:["root",n,r&&"disabled"]},NC,t)})(u),f=null!=(n=a.StartScrollButtonIcon)?n:MC,p=null!=(r=a.EndScrollButtonIcon)?r:AC,h=Jh({elementType:f,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),g=Jh({elementType:p,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return(0,C.jsx)($C,bu({component:"div",className:qp(d.root,i),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?(0,C.jsx)(f,bu({},h)):(0,C.jsx)(p,bu({},g))}))}));function HC(e){return Jp("MuiTabs",e)}const KC=Xp("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),UC=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],GC=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,WC=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},YC=av("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${KC.scrollButtons}`]:t.scrollButtons},{[`& .${KC.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>bu({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${KC.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),JC=av("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((({ownerState:e})=>bu({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),XC=av("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((({ownerState:e})=>bu({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),ZC=av("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>bu({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),QC=av((function(e){const{onChange:t}=e,n=Au(e,FC),r=s.useRef(),o=s.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return ch((()=>{const e=yh((()=>{const e=r.current;i(),e!==r.current&&t(r.current)})),n=wh(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),s.useEffect((()=>{i(),t(r.current)}),[t]),(0,C.jsx)("div",bu({style:LC},n,{ref:o}))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ej={};const tj=s.forwardRef((function(e,t){const n=__({props:e,name:"MuiTabs"}),r=Tm(),o=Qh(),{"aria-label":i,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:g,orientation:m="horizontal",ScrollButtonComponent:v=VC,scrollButtons:b="auto",selectionFollowsFocus:y,slots:x={},slotProps:w={},TabIndicatorProps:_={},TabScrollButtonProps:S={},textColor:k="primary",value:E,variant:j="standard",visibleScrollbar:O=!1}=n,T=Au(n,UC),I="scrollable"===j,R="vertical"===m,P=R?"scrollTop":"scrollLeft",M=R?"top":"left",A=R?"bottom":"right",D=R?"clientHeight":"clientWidth",F=R?"height":"width",L=bu({},n,{component:f,allowScrollButtonsMobile:p,indicatorColor:h,orientation:m,vertical:R,scrollButtons:b,textColor:k,variant:j,visibleScrollbar:O,fixed:!I,hideScrollbar:I&&!O,scrollableX:I&&!R,scrollableY:I&&R,centered:c&&!I,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Gh({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},HC,l)})(L),B=Jh({elementType:x.StartScrollButtonIcon,externalSlotProps:w.startScrollButtonIcon,ownerState:L}),z=Jh({elementType:x.EndScrollButtonIcon,externalSlotProps:w.endScrollButtonIcon,ownerState:L}),[$,V]=s.useState(!1),[H,K]=s.useState(ej),[U,G]=s.useState(!1),[W,q]=s.useState(!1),[Y,J]=s.useState(!1),[X,Z]=s.useState({overflow:"hidden",scrollbarWidth:0}),Q=new Map,ee=s.useRef(null),te=s.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Kh(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==E){const e=te.current.children;if(e.length>0){const t=e[Q.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=jh((()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(R)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[F]:t?t[F]:0};if(isNaN(H[n])||isNaN(H[F]))K(i);else{const e=Math.abs(H[n]-i[n]),t=Math.abs(H[F]-i[F]);(e>=1||t>=1)&&K(i)}})),oe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=DC,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=i(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(P,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[P]=e},ie=e=>{let t=ee.current[P];R?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Hh()?-1:1),oe(t)},ae=()=>{const e=ee.current[D];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[D]>e){0===r&&(t=e);break}t+=o[D]}return t},se=()=>{ie(-1*ae())},le=()=>{ie(ae())},ce=s.useCallback((e=>{Z({overflow:null,scrollbarWidth:e})}),[]),ue=jh((e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[M]<t[M]){const r=t[P]+(n[M]-t[M]);oe(r,{animation:e})}else if(n[A]>t[A]){const r=t[P]+(n[A]-t[A]);oe(r,{animation:e})}})),de=jh((()=>{I&&!1!==b&&J(!Y)}));s.useEffect((()=>{const e=yh((()=>{ee.current&&re()}));let t;const n=wh(ee.current);let r;return n.addEventListener("resize",e),typeof ResizeObserver<"u"&&(t=new ResizeObserver(e),Array.from(te.current.children).forEach((e=>{t.observe(e)}))),typeof MutationObserver<"u"&&(r=new MutationObserver((n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),de()})),r.observe(te.current,{childList:!0})),()=>{var o,i;e.clear(),n.removeEventListener("resize",e),null==(o=r)||o.disconnect(),null==(i=t)||i.disconnect()}}),[re,de]),s.useEffect((()=>{const e=Array.from(te.current.children),t=e.length;if(typeof IntersectionObserver<"u"&&t>0&&I&&!1!==b){const n=e[0],r=e[t-1],o={root:ee.current,threshold:.99},i=e=>{G(!e[0].isIntersecting)},a=new IntersectionObserver(i,o);a.observe(n);const s=e=>{q(!e[0].isIntersecting)},l=new IntersectionObserver(s,o);return l.observe(r),()=>{a.disconnect(),l.disconnect()}}}),[I,b,Y,null==u?void 0:u.length]),s.useEffect((()=>{V(!0)}),[]),s.useEffect((()=>{re()})),s.useEffect((()=>{ue(ej!==H)}),[ue,H]),s.useImperativeHandle(l,(()=>({updateIndicator:re,updateScrollButtons:de})),[re,de]);const fe=(0,C.jsx)(ZC,bu({},_,{className:qp(N.indicator,_.className),ownerState:L,style:bu({},H,_.style)}));let pe=0;const he=s.Children.map(u,(e=>{if(!s.isValidElement(e))return null;const t=void 0===e.props.value?pe:e.props.value;Q.set(t,pe);const n=t===E;return pe+=1,s.cloneElement(e,bu({fullWidth:"fullWidth"===j,indicator:n&&!$&&fe,selected:n,selectionFollowsFocus:y,onChange:g,textColor:k,value:t},1!==pe||!1!==E||e.props.tabIndex?{}:{tabIndex:0}))})),ge=(()=>{const e={};e.scrollbarSizeListener=I?(0,C.jsx)(QC,{onChange:ce,className:qp(N.scrollableX,N.hideScrollbar)}):null;const t=I&&("auto"===b&&(U||W)||!0===b);return e.scrollButtonStart=t?(0,C.jsx)(v,bu({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:B},orientation:m,direction:o?"right":"left",onClick:se,disabled:!U},S,{className:qp(N.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?(0,C.jsx)(v,bu({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:z},orientation:m,direction:o?"left":"right",onClick:le,disabled:!W},S,{className:qp(N.scrollButtons,S.className)})):null,e})();return(0,C.jsxs)(YC,bu({className:qp(N.root,d),ownerState:L,ref:t,as:f},T,{children:[ge.scrollButtonStart,ge.scrollbarSizeListener,(0,C.jsxs)(JC,{className:N.scroller,ownerState:L,style:{overflow:X.overflow,[R?"margin"+(o?"Left":"Right"):"marginBottom"]:O?void 0:-X.scrollbarWidth},ref:ee,children:[(0,C.jsx)(XC,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:L,onKeyDown:e=>{const t=te.current,n=xh(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),qC(t,n,WC);break;case i:e.preventDefault(),qC(t,n,GC);break;case"Home":e.preventDefault(),qC(t,null,GC);break;case"End":e.preventDefault(),qC(t,null,WC)}},ref:te,role:"tablist",children:he}),$&&fe]}),ge.scrollButtonEnd]}))}));function nj(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}const rj=(e,t)=>t=>{("Enter"===t.key||" "===t.key)&&(e(t),t.preventDefault(),t.stopPropagation())},oj=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?oj(t.shadowRoot):t:null};function ij(e){return Jp("PrivatePickersMonth",e)}const aj=Xp("PrivatePickersMonth",["root","selected"]),sj=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],lj=av(IS,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${aj.selected}`]:t.selected}]})((({theme:e})=>bu({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:e.palette.text.secondary},[`&.${aj.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}}))),cj=()=>{},uj=e=>{const{disabled:t,onSelect:n,selected:r,value:o,tabIndex:i,hasFocus:a,onFocus:l=cj,onBlur:c=cj}=e,u=Au(e,sj),d=(e=>{const{classes:t,selected:n}=e;return Gh({root:["root",n&&"selected"]},ij,t)})(e),f=()=>{n(o)},p=s.useRef(null);return ch((()=>{var e;a&&(null==(e=p.current)||e.focus())}),[a]),(0,C.jsx)(lj,bu({ref:p,component:"button",type:"button",className:d.root,tabIndex:i,onClick:f,onKeyDown:rj(f),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>l(e,o),onBlur:e=>c(e,o)},u))},dj=()=>{const e=s.useContext(uv);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},fj=()=>dj().utils,pj=()=>dj().defaultDates,hj=()=>dj().localeText,gj=()=>{const e=fj();return s.useRef(e.date()).current};function mj(e){return Jp("MuiMonthPicker",e)}Xp("MuiMonthPicker",["root"]);const vj=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a})=>{const s=a.startOfDay(a.date());n&&a.isBefore(o,s)&&(o=s),t&&a.isAfter(r,s)&&(r=s);let l=e,c=e;for(a.isBefore(e,o)&&(l=a.date(o),c=null),a.isAfter(e,r)&&(c&&(c=a.date(r)),l=null);l||c;){if(l&&a.isAfter(l,r)&&(l=null),c&&a.isBefore(c,o)&&(c=null),l){if(!i(l))return l;l=a.addDays(l,1)}if(c){if(!i(c))return c;c=a.addDays(c,-1)}}return null},bj=(e,t)=>{const n=e.date(t);return e.isValid(n)?n:null},yj=(e,t,n)=>{if(null==t)return n;const r=e.date(t);return e.isValid(r)?r:n},xj=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"];const wj=av("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),_j=s.forwardRef((function(e,t){const n=fj(),r=gj(),o=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({disableFuture:!1,disablePast:!1},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiMonthPicker"),{className:i,date:a,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:h,readOnly:g,disableHighlightToday:m,autoFocus:v=!1,onMonthFocus:b,hasFocus:y,onFocusedViewChange:x}=o,w=Au(o,xj),_=o,S=(e=>{const{classes:t}=e;return Gh({root:["root"]},mj,t)})(_),k=$p(),E=s.useMemo((()=>a??n.startOfMonth(r)),[r,n,a]),j=s.useMemo((()=>null!=a?n.getMonth(a):m?null:n.getMonth(r)),[r,a,n,m]),[O,T]=s.useState((()=>j||n.getMonth(r))),I=s.useCallback((e=>{const t=n.startOfMonth(u&&n.isAfter(r,f)?r:f),o=n.startOfMonth(c&&n.isBefore(r,d)?r:d);return!(!n.isBefore(e,t)&&!n.isAfter(e,o))||!!h&&h(e)}),[c,u,d,f,r,h,n]),R=e=>{if(g)return;const t=n.setMonth(E,e);p(t,"finish")},[P,M]=Ch({name:"MonthPicker",state:"hasFocus",controlled:y,default:v}),A=s.useCallback((e=>{M(e),x&&x(e)}),[M,x]),D=s.useCallback((e=>{I(n.setMonth(E,e))||(T(e),A(!0),b&&b(e))}),[I,n,E,A,b]);s.useEffect((()=>{T((e=>null!==j&&e!==j?j:e))}),[j]);const F=jh((e=>{switch(e.key){case"ArrowUp":D((12+O-3)%12),e.preventDefault();break;case"ArrowDown":D((12+O+3)%12),e.preventDefault();break;case"ArrowLeft":D((12+O+("ltr"===k.direction?-1:1))%12),e.preventDefault();break;case"ArrowRight":D((12+O+("ltr"===k.direction?1:-1))%12),e.preventDefault()}})),L=s.useCallback(((e,t)=>{D(t)}),[D]),N=s.useCallback((()=>{A(!1)}),[A]),B=n.getMonth(r);return(0,C.jsx)(wj,bu({ref:t,className:w_(S.root,i),ownerState:_,onKeyDown:F},w,{children:n.getMonthArray(E).map((e=>{const t=n.getMonth(e),r=n.format(e,"monthShort"),o=l||I(e);return(0,C.jsx)(uj,{value:t,selected:t===j,tabIndex:t!==O||o?-1:0,hasFocus:P&&t===O,onSelect:R,onFocus:L,onBlur:N,disabled:o,"aria-current":B===t?"date":void 0,children:r},r)}))}))}));function Sj(e,t,n){const{value:r,onError:o}=e,i=dj(),a=s.useRef(null),l=t({adapter:i,value:r,props:e});return s.useEffect((()=>{o&&!n(l,a.current)&&o(l,r),a.current=l}),[n,o,a,l,r]),l}const kj=({props:e,value:t,adapter:n})=>{const r=n.utils.date(),o=n.utils.date(t),i=yj(n.utils,e.minDate,n.defaultDates.minDate),a=yj(n.utils,e.maxDate,n.defaultDates.maxDate);if(null===o)return null;switch(!0){case!n.utils.isValid(t):return"invalidDate";case!(!e.shouldDisableDate||!e.shouldDisableDate(o)):return"shouldDisableDate";case!(!e.disableFuture||!n.utils.isAfterDay(o,r)):return"disableFuture";case!(!e.disablePast||!n.utils.isBeforeDay(o,r)):return"disablePast";case!(!i||!n.utils.isBeforeDay(o,i)):return"minDate";case!(!a||!n.utils.isAfterDay(o,a)):return"maxDate";default:return null}},Ej=({shouldDisableDate:e,minDate:t,maxDate:n,disableFuture:r,disablePast:o})=>{const i=dj();return s.useCallback((a=>null!==kj({adapter:i,value:a,props:{shouldDisableDate:e,minDate:t,maxDate:n,disableFuture:r,disablePast:o}})),[i,e,t,n,r,o])},Cj=(e,t)=>e===t,jj=e=>Sj(e,kj,Cj),Oj=({date:e,defaultCalendarMonth:t,disableFuture:n,disablePast:r,disableSwitchToMonthOnDayFocus:o=!1,maxDate:i,minDate:a,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u})=>{var d;const f=gj(),p=fj(),h=s.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return bu({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return bu({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return bu({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(!!c,o,p)).current,[g,m]=s.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:e||f,currentMonth:p.startOfMonth(null!=(d=e??t)?d:f),slideDirection:"left"}),v=s.useCallback((e=>{m(bu({type:"changeMonth"},e)),l&&l(e.newMonth)}),[l]),b=s.useCallback((e=>{const t=e??f;p.isSameMonth(t,g.currentMonth)||v({newMonth:p.startOfMonth(t),direction:p.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,v,f,p]),y=Ej({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:n,disablePast:r}),x=s.useCallback((()=>{m({type:"finishMonthSwitchingAnimation"})}),[]),w=s.useCallback(((e,t)=>{y(e)||m({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),[y]);return{calendarState:g,changeMonth:b,changeFocusedDay:w,isDateDisabled:y,onMonthSwitchingAnimationEnd:x,handleChangeMonth:v}},Tj=e=>Jp("MuiPickersFadeTransitionGroup",e);Xp("MuiPickersFadeTransitionGroup",["root"]);const Ij=av(Y_,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Rj(e){const t=Im({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=(e=>{const{classes:t}=e;return Gh({root:["root"]},Tj,t)})(t);return o?n:(0,C.jsx)(Ij,{className:w_(a.root,r),children:(0,C.jsx)(mE,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},i)})}function Pj(e){return Jp("MuiPickersDay",e)}const Mj=Xp("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Aj=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],Dj=({theme:e,ownerState:t})=>bu({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,"&:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},"&:focus":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity),[`&.${Mj.selected}`]:{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${Mj.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${Mj.disabled}`]:{color:e.palette.text.disabled}},!t.disableMargin&&{margin:"0 2px"},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:e.palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${Mj.selected})`]:{border:`1px solid ${e.palette.text.secondary}`}}),Fj=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Lj=av(yS,{name:"MuiPickersDay",slot:"Root",overridesResolver:Fj})(Dj),Nj=av("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Fj})((({theme:e,ownerState:t})=>bu({},Dj({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"}))),Bj=()=>{},zj=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:o,day:i,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=Bj,onBlur:h=Bj,onKeyDown:g=Bj,onMouseDown:m,outsideCurrentMonth:v,selected:b=!1,showDaysOutsideCurrentMonth:y=!1,children:x,today:w=!1}=n,_=Au(n,Aj),S=bu({},n,{autoFocus:r,disabled:a,disableHighlightToday:l,disableMargin:c,selected:b,showDaysOutsideCurrentMonth:y,today:w}),k=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e;return Gh({root:["root",t&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",a&&!s&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Pj,l)})(S),E=fj(),j=s.useRef(null),O=Oh(j,t);ch((()=>{r&&!a&&!u&&!v&&j.current.focus()}),[r,a,u,v]);return v&&!y?(0,C.jsx)(Nj,{className:w_(k.root,k.hiddenDaySpacingFiller,o),ownerState:S,role:_.role}):(0,C.jsx)(Lj,bu({className:w_(k.root,o),ownerState:S,ref:O,centerRipple:!0,disabled:a,tabIndex:b?0:-1,onKeyDown:e=>g(e,i),onFocus:e=>p(e,i),onBlur:e=>h(e,i),onClick:e=>{a||f(i,"finish"),v&&e.currentTarget.focus(),d&&d(e)},onMouseDown:e=>{m&&m(e),v&&e.preventDefault()}},_,{children:x||E.format(i,"dayOfMonth")}))})),$j=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,Vj=s.memo(zj,$j),Hj=e=>Jp("PrivatePickersSlideTransition",e),Kj=Xp("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Uj=["children","className","reduceAnimations","slideDirection","transKey"],Gj=av(Y_,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Kj["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Kj["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Kj.slideEnterActive}`]:t.slideEnterActive},{[`.${Kj.slideExit}`]:t.slideExit},{[`.${Kj["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Kj["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Kj["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Kj["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Kj.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Kj.slideExit}`]:{transform:"translate(0%)"},[`& .${Kj["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Kj["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}})),Wj=e=>Jp("MuiDayPicker",e);Xp("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]);const qj=e=>e.charAt(0).toUpperCase(),Yj=av("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Jj=av(IS,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.secondary}))),Xj=av("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Zj=av((e=>{const{children:t,className:n,reduceAnimations:r,slideDirection:o,transKey:i}=e,a=Au(e,Uj),l=(e=>{const{classes:t}=e;return Gh({root:["root"]},Hj,t)})(e);if(r)return(0,C.jsx)("div",{className:w_(l.root,n),children:t});const c={exit:Kj.slideExit,enterActive:Kj.slideEnterActive,enter:Kj[`slideEnter-${o}`],exitActive:Kj[`slideExitActiveLeft-${o}`]};return(0,C.jsx)(Gj,{className:w_(l.root,n),childFactory:e=>s.cloneElement(e,{classNames:c}),role:"presentation",children:(0,C.jsx)(V_,bu({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:c},a,{children:t}),i)})}),{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Qj=av("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),eO=av("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function tO(e){const t=gj(),n=fj(),r=Im({props:e,name:"MuiDayPicker"}),o=(e=>{const{classes:t}=e;return Gh({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},Wj,t)})(r),{onFocusedDayChange:i,className:a,currentMonth:l,selectedDays:c,disabled:u,disableHighlightToday:d,focusedDay:f,isMonthSwitchingAnimating:p,loading:h,onSelectedDaysChange:g,onMonthSwitchingAnimationEnd:m,readOnly:v,reduceAnimations:b,renderDay:y,renderLoading:x=()=>(0,C.jsx)("span",{children:"..."}),showDaysOutsideCurrentMonth:w,slideDirection:_,TransitionProps:S,disablePast:k,disableFuture:E,minDate:j,maxDate:O,shouldDisableDate:T,dayOfWeekFormatter:I=qj,hasFocus:R,onFocusedViewChange:P,gridLabelId:M}=r,A=Ej({shouldDisableDate:T,minDate:j,maxDate:O,disablePast:k,disableFuture:E}),[D,F]=s.useState((()=>f||t)),L=s.useCallback((e=>{P&&P(e)}),[P]),N=s.useCallback(((e,t="finish")=>{v||g(e,t)}),[g,v]),B=s.useCallback((e=>{A(e)||(i(e),F(e),L(!0))}),[A,i,L]),z=Tm();function $(e,t){switch(e.key){case"ArrowUp":B(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":B(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,"ltr"===z.direction?-1:1),o="ltr"===z.direction?n.getPreviousMonth(t):n.getNextMonth(t),i=vj({utils:n,date:r,minDate:"ltr"===z.direction?n.startOfMonth(o):r,maxDate:"ltr"===z.direction?r:n.endOfMonth(o),isDateDisabled:A});B(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,"ltr"===z.direction?1:-1),o="ltr"===z.direction?n.getNextMonth(t):n.getPreviousMonth(t),i=vj({utils:n,date:r,minDate:"ltr"===z.direction?r:n.startOfMonth(o),maxDate:"ltr"===z.direction?n.endOfMonth(o):r,isDateDisabled:A});B(i||r),e.preventDefault();break}case"Home":B(n.startOfWeek(t)),e.preventDefault();break;case"End":B(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":B(n.getNextMonth(t)),e.preventDefault();break;case"PageDown":B(n.getPreviousMonth(t)),e.preventDefault()}}function V(e,t){B(t)}function H(e,t){R&&n.isSameDay(D,t)&&L(!1)}const K=n.getMonth(l),U=c.filter((e=>!!e)).map((e=>n.startOfDay(e))),G=K,W=s.useMemo((()=>s.createRef()),[G]),q=n.startOfWeek(t),Y=s.useMemo((()=>{const e=n.startOfMonth(l),t=n.endOfMonth(l);return A(D)||n.isAfterDay(D,t)||n.isBeforeDay(D,e)?vj({utils:n,date:D,minDate:e,maxDate:t,disablePast:k,disableFuture:E,isDateDisabled:A}):D}),[l,E,k,D,A,n]);return(0,C.jsxs)("div",{role:"grid","aria-labelledby":M,children:[(0,C.jsx)(Yj,{role:"row",className:o.header,children:n.getWeekdays().map(((e,t)=>{var r;return(0,C.jsx)(Jj,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(q,t),"weekday"),className:o.weekDayLabel,children:null!=(r=null==I?void 0:I(e))?r:e},e+t.toString())}))}),h?(0,C.jsx)(Xj,{className:o.loadingContainer,children:x()}):(0,C.jsx)(Zj,bu({transKey:G,onExited:m,reduceAnimations:b,slideDirection:_,className:w_(a,o.slideTransition)},S,{nodeRef:W,children:(0,C.jsx)(Qj,{ref:W,role:"rowgroup",className:o.monthContainer,children:n.getWeekArray(l).map((e=>(0,C.jsx)(eO,{role:"row",className:o.weekContainer,children:e.map((e=>{const r=null!==Y&&n.isSameDay(e,Y),o=U.some((t=>n.isSameDay(t,e))),i=n.isSameDay(e,t),a={key:null==e?void 0:e.toString(),day:e,isAnimating:p,disabled:u||A(e),autoFocus:R&&r,today:i,outsideCurrentMonth:n.getMonth(e)!==K,selected:o,disableHighlightToday:d,showDaysOutsideCurrentMonth:w,onKeyDown:$,onFocus:V,onBlur:H,onDaySelect:N,tabIndex:r?0:-1,role:"gridcell","aria-selected":o};return i&&(a["aria-current"]="date"),y?y(e,U,a):(0,s.createElement)(Vj,bu({},a,{key:a.key}))}))},`week-${e[0]}`)))})}))]})}function nO({onChange:e,onViewChange:t,openTo:n,view:r,views:o}){var i,a;const[l,c]=Ch({name:"Picker",state:"view",controlled:r,default:n&&nj(o,n)?n:o[0]}),u=null!=(i=o[o.indexOf(l)-1])?i:null,d=null!=(a=o[o.indexOf(l)+1])?a:null,f=s.useCallback((e=>{c(e),t&&t(e)}),[c,t]),p=s.useCallback((()=>{d&&f(d)}),[d,f]);return{handleChangeAndOpenNext:s.useCallback(((t,n)=>{const r="finish"===n;e(t,r&&d?"partial":n),r&&p()}),[d,e,p]),nextView:d,previousView:u,openNext:p,openView:l,setOpenView:f}}const rO=j_((0,C.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),oO=j_((0,C.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),iO=j_((0,C.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),aO=j_((0,C.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),sO=j_((0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,C.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),lO=(j_((0,C.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),j_((0,C.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));j_((0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,C.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function cO(e){return Jp("MuiPickersArrowSwitcher",e)}Xp("MuiPickersArrowSwitcher",["root","spacer","button"]);const uO=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],dO=av("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),fO=av("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),pO=av(kS,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>bu({},e.hidden&&{visibility:"hidden"}))),hO=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:o,components:i,componentsProps:a,isLeftDisabled:s,isLeftHidden:l,isRightDisabled:c,isRightHidden:u,leftArrowButtonText:d,onLeftClick:f,onRightClick:p,rightArrowButtonText:h}=n,g=Au(n,uO),m="rtl"===Tm().direction,v=(null==a?void 0:a.leftArrowButton)||{},b=(null==i?void 0:i.LeftArrowIcon)||oO,y=(null==a?void 0:a.rightArrowButton)||{},x=(null==i?void 0:i.RightArrowIcon)||iO,w=n,_=(e=>{const{classes:t}=e;return Gh({root:["root"],spacer:["spacer"],button:["button"]},cO,t)})(w);return(0,C.jsxs)(dO,bu({ref:t,className:w_(_.root,o),ownerState:w},g,{children:[(0,C.jsx)(pO,bu({as:null==i?void 0:i.LeftArrowButton,size:"small","aria-label":d,title:d,disabled:s,edge:"end",onClick:f},v,{className:w_(_.button,v.className),ownerState:bu({},w,v,{hidden:l}),children:m?(0,C.jsx)(x,{}):(0,C.jsx)(b,{})})),r?(0,C.jsx)(IS,{variant:"subtitle1",component:"span",children:r}):(0,C.jsx)(fO,{className:_.spacer,ownerState:w}),(0,C.jsx)(pO,bu({as:null==i?void 0:i.RightArrowButton,size:"small","aria-label":h,title:h,edge:"start",disabled:c,onClick:p},y,{className:w_(_.button,y.className),ownerState:bu({},w,y,{hidden:u}),children:m?(0,C.jsx)(b,{}):(0,C.jsx)(x,{})}))]}))})),gO=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,mO=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),vO=(e=!1,t)=>(n,r)=>e?t.isAfter(n,r):mO(n,t)>mO(r,t);function bO(e,t,n){const r=fj(),o=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,r),i=s.useCallback((o=>{const i=null==e?null:((e,t,n,r)=>{const o=gO(r.getHours(e),t,n);return r.setHours(e,o)})(e,o,!!t,r);n(i,"partial")}),[t,e,n,r]);return{meridiemMode:o,handleMeridiemChange:i}}const yO=e=>Jp("MuiPickersCalendarHeader",e);Xp("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);const xO=av("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),wO=av("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>bu({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),_O=av("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),SO=av(kS,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),kO=av(rO,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e,ownerState:t})=>bu({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"},"year"===t.openView&&{transform:"rotate(180deg)"}))),EO=()=>{};function CO(e){const t=Im({props:e,name:"MuiPickersCalendarHeader"}),{components:n={},componentsProps:r={},currentMonth:o,disabled:i,disableFuture:a,disablePast:l,getViewSwitchingButtonText:c,leftArrowButtonText:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:h,openView:g,reduceAnimations:m,rightArrowButtonText:v,views:b,labelId:y}=t;EO({leftArrowButtonText:u,rightArrowButtonText:v,getViewSwitchingButtonText:c});const x=hj(),w=u??x.previousMonth,_=v??x.nextMonth,S=c??x.calendarViewSwitchingButtonAriaLabel,k=fj(),E=(e=>{const{classes:t}=e;return Gh({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},yO,t)})(t),j=r.switchViewButton||{},O=function(e,{disableFuture:t,maxDate:n}){const r=fj();return s.useMemo((()=>{const o=r.date(),i=r.startOfMonth(t&&r.isBefore(o,n)?o:n);return!r.isAfter(i,e)}),[t,n,e,r])}(o,{disableFuture:a,maxDate:d}),T=function(e,{disablePast:t,minDate:n}){const r=fj();return s.useMemo((()=>{const o=r.date(),i=r.startOfMonth(t&&r.isAfter(o,n)?o:n);return!r.isBefore(i,e)}),[t,n,e,r])}(o,{disablePast:l,minDate:f});if(1===b.length&&"year"===b[0])return null;const I=t;return(0,C.jsxs)(xO,{ownerState:I,className:E.root,children:[(0,C.jsxs)(wO,{role:"presentation",onClick:()=>{if(1!==b.length&&h&&!i)if(2===b.length)h(b.find((e=>e!==g))||b[0]);else{const e=0!==b.indexOf(g)?0:1;h(b[e])}},ownerState:I,"aria-live":"polite",className:E.labelContainer,children:[(0,C.jsx)(Rj,{reduceAnimations:m,transKey:k.format(o,"monthAndYear"),children:(0,C.jsx)(_O,{id:y,ownerState:I,className:E.label,children:k.format(o,"monthAndYear")})}),b.length>1&&!i&&(0,C.jsx)(SO,bu({size:"small",as:n.SwitchViewButton,"aria-label":S(g),className:E.switchViewButton},j,{children:(0,C.jsx)(kO,{as:n.SwitchViewIcon,ownerState:I,className:E.switchViewIcon})}))]}),(0,C.jsx)(mE,{in:"day"===g,children:(0,C.jsx)(hO,{leftArrowButtonText:w,rightArrowButtonText:_,components:n,componentsProps:r,onLeftClick:()=>p(k.getPreviousMonth(o),"right"),onRightClick:()=>p(k.getNextMonth(o),"left"),isLeftDisabled:T,isRightDisabled:O})})]})}const jO=s.createContext(null);function OO(e){return Jp("PrivatePickersYear",e)}const TO=Xp("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),IO=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],RO=av("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${TO.modeDesktop}`]:t.modeDesktop},{[`&.${TO.modeMobile}`]:t.modeMobile}]})((({ownerState:e})=>bu({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==e?void 0:e.wrapperVariant)&&{flexBasis:"25%"}))),PO=av("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${TO.disabled}`]:t.disabled},{[`&.${TO.selected}`]:t.selected}]})((({theme:e})=>bu({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:vh(e.palette.action.active,e.palette.action.hoverOpacity)},[`&.${TO.disabled}`]:{color:e.palette.text.secondary},[`&.${TO.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}}))),MO=()=>{},AO=s.forwardRef((function(e,t){const{autoFocus:n,className:r,children:o,disabled:i,onClick:a,onKeyDown:l,value:c,tabIndex:u,onFocus:d=MO,onBlur:f=MO}=e,p=Au(e,IO),h=s.useRef(null),g=Oh(h,t),m=bu({},e,{wrapperVariant:s.useContext(jO)}),v=(e=>{const{wrapperVariant:t,disabled:n,selected:r,classes:o}=e;return Gh({root:["root",t&&`mode${$f(t)}`],yearButton:["yearButton",n&&"disabled",r&&"selected"]},OO,o)})(m);return s.useEffect((()=>{n&&h.current.focus()}),[n]),(0,C.jsx)(RO,{className:w_(v.root,r),ownerState:m,children:(0,C.jsx)(PO,bu({ref:g,disabled:i,type:"button",tabIndex:i?-1:u,onClick:e=>a(e,c),onKeyDown:e=>l(e,c),onFocus:e=>d(e,c),onBlur:e=>f(e,c),className:v.yearButton,ownerState:m},p,{children:o}))})}));function DO(e){return Jp("MuiYearPicker",e)}Xp("MuiYearPicker",["root"]);const FO=av("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),LO=s.forwardRef((function(e,t){const n=gj(),r=Tm(),o=fj(),i=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({disablePast:!1,disableFuture:!1},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiYearPicker"),{autoFocus:a,className:l,date:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onChange:g,readOnly:m,shouldDisableYear:v,disableHighlightToday:b,onYearFocus:y,hasFocus:x,onFocusedViewChange:w}=i,_=i,S=(e=>{const{classes:t}=e;return Gh({root:["root"]},DO,t)})(_),k=s.useMemo((()=>c??o.startOfYear(n)),[n,o,c]),E=s.useMemo((()=>null!=c?o.getYear(c):b?null:o.getYear(n)),[n,c,o,b]),j=s.useContext(jO),O=s.useRef(null),[T,I]=s.useState((()=>E||o.getYear(n))),[R,P]=Ch({name:"YearPicker",state:"hasFocus",controlled:x,default:a}),M=s.useCallback((e=>{P(e),w&&w(e)}),[P,w]),A=s.useCallback((e=>!!(f&&o.isBeforeYear(e,n)||d&&o.isAfterYear(e,n)||h&&o.isBeforeYear(e,h)||p&&o.isAfterYear(e,p)||v&&v(e))),[d,f,p,h,n,v,o]),D=(e,t,n="finish")=>{if(m)return;const r=o.setYear(k,t);g(r,n)},F=s.useCallback((e=>{A(o.setYear(k,e))||(I(e),M(!0),null==y||y(e))}),[A,o,k,M,y]);s.useEffect((()=>{I((e=>null!==E&&e!==E?E:e))}),[E]);const L="desktop"===j?4:3,N=s.useCallback(((e,t)=>{switch(e.key){case"ArrowUp":F(t-L),e.preventDefault();break;case"ArrowDown":F(t+L),e.preventDefault();break;case"ArrowLeft":F(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":F(t+("ltr"===r.direction?1:-1)),e.preventDefault()}}),[F,r.direction,L]),B=s.useCallback(((e,t)=>{F(t)}),[F]),z=s.useCallback(((e,t)=>{T===t&&M(!1)}),[T,M]),$=o.getYear(n),V=s.useRef(null),H=Oh(t,V);return s.useEffect((()=>{if(a||null===V.current)return;const e=V.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=V.current.clientHeight,o=V.current.scrollTop,i=n+t;t>r||n<o||(V.current.scrollTop=i-r/2-t/2)}),[a]),(0,C.jsx)(FO,{ref:H,className:w_(S.root,l),ownerState:_,children:o.getYearRange(h,p).map((e=>{const t=o.getYear(e),n=t===E;return(0,C.jsx)(AO,{selected:n,value:t,onClick:D,onKeyDown:N,autoFocus:R&&t===T,ref:n?O:void 0,disabled:u||A(e),tabIndex:t===T?0:-1,onFocus:B,onBlur:z,"aria-current":$===t?"date":void 0,children:o.format(e,"year")},o.format(e,"year"))}))})})),NO=av("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),BO=typeof navigator<"u"&&/(android)/i.test(navigator.userAgent),zO=e=>Jp("MuiCalendarPicker",e);Xp("MuiCalendarPicker",["root","viewTransitionContainer"]);const $O=["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"];const VO=av(NO,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),HO=av(Rj,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),KO=s.forwardRef((function(e,t){const n=fj(),r=Eh(),o=function(e,t){const n=fj(),r=pj(),o=Im({props:e,name:t});return bu({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:BO,renderLoading:()=>(0,C.jsx)("span",{children:"..."})},o,{minDate:yj(n,o.minDate,r.minDate),maxDate:yj(n,o.maxDate,r.maxDate)})}(e,"MuiCalendarPicker"),{autoFocus:i,onViewChange:a,date:l,disableFuture:c,disablePast:u,defaultCalendarMonth:d,onChange:f,onYearChange:p,onMonthChange:h,reduceAnimations:g,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:b,view:y,views:x,openTo:w,className:_,disabled:S,readOnly:k,minDate:E,maxDate:j,disableHighlightToday:O,focusedView:T,onFocusedViewChange:I}=o,R=Au(o,$O),{openView:P,setOpenView:M,openNext:A}=nO({view:y,views:x,openTo:w,onChange:f,onViewChange:a}),{calendarState:D,changeFocusedDay:F,changeMonth:L,handleChangeMonth:N,isDateDisabled:B,onMonthSwitchingAnimationEnd:z}=Oj({date:l,defaultCalendarMonth:d,reduceAnimations:g,onMonthChange:h,minDate:E,maxDate:j,shouldDisableDate:m,disablePast:u,disableFuture:c}),$=s.useCallback(((e,t)=>{const r=n.startOfMonth(e),o=n.endOfMonth(e),i=B(e)?vj({utils:n,date:e,minDate:n.isBefore(E,r)?r:E,maxDate:n.isAfter(j,o)?o:j,disablePast:u,disableFuture:c,isDateDisabled:B}):e;i?(f(i,t),null==h||h(r)):(A(),L(r)),F(i,!0)}),[F,c,u,B,j,E,f,h,L,A,n]),V=s.useCallback(((e,t)=>{const r=n.startOfYear(e),o=n.endOfYear(e),i=B(e)?vj({utils:n,date:e,minDate:n.isBefore(E,r)?r:E,maxDate:n.isAfter(j,o)?o:j,disablePast:u,disableFuture:c,isDateDisabled:B}):e;i?(f(i,t),null==p||p(i)):(A(),L(r)),F(i,!0)}),[F,c,u,B,j,E,f,p,A,n,L]),H=s.useCallback(((e,t)=>f(l&&e?n.mergeDateAndTime(e,l):e,t)),[n,l,f]);s.useEffect((()=>{l&&L(l)}),[l]);const K=o,U=(e=>{const{classes:t}=e;return Gh({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},zO,t)})(K),G={disablePast:u,disableFuture:c,maxDate:j,minDate:E},W=S&&l||E,q=S&&l||j,Y={disableHighlightToday:O,readOnly:k,disabled:S},J=`${r}-grid-label`,[X,Z]=Ch({name:"DayPicker",state:"focusedView",controlled:T,default:i?P:null}),Q=null!==X,ee=jh((e=>t=>{I?I(e)(t):Z(t?e:t=>t===e?null:t)})),te=s.useRef(P);return s.useEffect((()=>{te.current!==P&&(te.current=P,ee(P)(!0))}),[P,ee]),(0,C.jsxs)(VO,{ref:t,className:w_(U.root,_),ownerState:K,children:[(0,C.jsx)(CO,bu({},R,{views:x,openView:P,currentMonth:D.currentMonth,onViewChange:M,onMonthChange:(e,t)=>N({newMonth:e,direction:t}),minDate:W,maxDate:q,disabled:S,disablePast:u,disableFuture:c,reduceAnimations:g,labelId:J})),(0,C.jsx)(HO,{reduceAnimations:g,className:U.viewTransitionContainer,transKey:P,ownerState:K,children:(0,C.jsxs)("div",{children:["year"===P&&(0,C.jsx)(LO,bu({},R,G,Y,{autoFocus:i,date:l,onChange:V,shouldDisableYear:b,hasFocus:Q,onFocusedViewChange:ee("year")})),"month"===P&&(0,C.jsx)(_j,bu({},G,Y,{autoFocus:i,hasFocus:Q,className:_,date:l,onChange:$,shouldDisableMonth:v,onFocusedViewChange:ee("month")})),"day"===P&&(0,C.jsx)(tO,bu({},R,D,G,Y,{autoFocus:i,onMonthSwitchingAnimationEnd:z,onFocusedDayChange:F,reduceAnimations:g,selectedDays:[l],onSelectedDaysChange:H,shouldDisableDate:m,hasFocus:Q,onFocusedViewChange:ee("day"),gridLabelId:J}))]})})]})})),UO=220,GO=36,WO={x:110,y:110},qO=WO.x-WO.x,YO=0-WO.y,JO=(e,t,n)=>{const r=t-WO.x,o=n-WO.y;let i=(e=>e*(180/Math.PI))(Math.atan2(qO,YO)-Math.atan2(r,o));i=Math.round(i/e)*e,i%=360;const a=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(a)}};function XO(e){return Jp("MuiClockPointer",e)}Xp("MuiClockPointer",["root","thumb"]);const ZO=["className","hasSelected","isInner","type","value"],QO=av("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>bu({width:2,backgroundColor:e.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),eT=av("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>bu({width:4,height:4,backgroundColor:e.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${e.palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:e.palette.primary.main})));function tT(e){const t=Im({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,value:i}=t,a=Au(t,ZO),l=s.useRef(o);s.useEffect((()=>{l.current=o}),[o]);const c=bu({},t,{shouldAnimate:l.current!==o}),u=(e=>{const{classes:t}=e;return Gh({root:["root"],thumb:["thumb"]},XO,t)})(c);return(0,C.jsx)(QO,bu({style:(()=>{let e=360/("hours"===o?12:60)*i;return"hours"===o&&i>12&&(e-=360),{height:Math.round((r?.26:.4)*UO),transform:`rotateZ(${e}deg)`}})(),className:w_(n,u.root),ownerState:c},a,{children:(0,C.jsx)(eT,{ownerState:c,className:u.thumb})}))}function nT(e){return Jp("MuiClock",e)}Xp("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const rT=av("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),oT=av("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),iT=av("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),aT=av("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>bu({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),sT=av("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:e.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),lT=av(kS,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>bu({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,left:8},"am"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}}))),cT=av(kS,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>bu({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}})));function uT(e){const t=Im({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,date:a,getClockLabelText:l,handleMeridiemChange:c,isTimeDisabled:u,meridiemMode:d,minutesStep:f=1,onChange:p,selectedId:h,type:g,value:m,disabled:v,readOnly:b,className:y}=t,x=t,w=fj(),_=s.useContext(jO),S=s.useRef(!1),k=(e=>{const{classes:t}=e;return Gh({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},nT,t)})(x),E=u(m,g),j=!n&&"hours"===g&&(m<1||m>12),O=(e,t)=>{v||b||u(e,g)||p(e,t)},T=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===g||"minutes"===g?((e,t,n=1)=>{const r=6*n;let{value:o}=JO(r,e,t);return o=o*n%60,o})(r,o,f):((e,t,n)=>{const{value:r,distance:o}=JO(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,!!n);O(i,t)},I=s.useMemo((()=>"hours"===g||m%5==0),[g,m]),R="minutes"===g?f:1,P=s.useRef(null);ch((()=>{o&&P.current.focus()}),[o]);return(0,C.jsxs)(rT,{className:w_(y,k.root),children:[(0,C.jsxs)(oT,{className:k.clock,children:[(0,C.jsx)(aT,{onTouchMove:e=>{S.current=!0,T(e,"shallow")},onTouchEnd:e=>{S.current&&(T(e,"finish"),S.current=!1)},onMouseUp:e=>{S.current&&(S.current=!1),T(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&T(e.nativeEvent,"shallow")},ownerState:{disabled:v},className:k.squareMask}),!E&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(sT,{className:k.pin}),a&&(0,C.jsx)(tT,{type:g,value:m,isInner:j,hasSelected:I})]}),(0,C.jsx)(iT,{"aria-activedescendant":h,"aria-label":l(g,a,w),ref:P,role:"listbox",onKeyDown:e=>{if(!S.current)switch(e.key){case"Home":O(0,"partial"),e.preventDefault();break;case"End":O("minutes"===g?59:23,"partial"),e.preventDefault();break;case"ArrowUp":O(m+R,"partial"),e.preventDefault();break;case"ArrowDown":O(m-R,"partial"),e.preventDefault()}},tabIndex:0,className:k.wrapper,children:i})]}),n&&("desktop"===_||r)&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(lT,{onClick:b?void 0:()=>c("am"),disabled:v||null===d,ownerState:x,className:k.amButton,children:(0,C.jsx)(IS,{variant:"caption",children:"AM"})}),(0,C.jsx)(cT,{disabled:v||null===d,onClick:b?void 0:()=>c("pm"),ownerState:x,className:k.pmButton,children:(0,C.jsx)(IS,{variant:"caption",children:"PM"})})]})]})}function dT(e){return Jp("MuiClockNumber",e)}const fT=Xp("MuiClockNumber",["root","selected","disabled"]),pT=["className","disabled","index","inner","label","selected"],hT=av("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${fT.disabled}`]:t.disabled},{[`&.${fT.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>bu({height:GO,width:GO,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:e.palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:e.palette.background.paper},[`&.${fT.selected}`]:{color:e.palette.primary.contrastText},[`&.${fT.disabled}`]:{pointerEvents:"none",color:e.palette.text.disabled}},t.inner&&bu({},e.typography.body2,{color:e.palette.text.secondary}))));function gT(e){const t=Im({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Au(t,pT),c=t,u=(e=>{const{classes:t,selected:n,disabled:r}=e;return Gh({root:["root",n&&"selected",r&&"disabled"]},dT,t)})(c),d=o%12/12*Math.PI*2-Math.PI/2,f=91*(i?.65:1),p=Math.round(Math.cos(d)*f),h=Math.round(Math.sin(d)*f);return(0,C.jsx)(hT,bu({className:w_(n,u.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${p}px, ${h+92}px`},ownerState:c},l,{children:a}))}const mT=({ampm:e,date:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=i.formatNumber(a);const u=c(t);s.push((0,C.jsx)(gT,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},vT=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map((([e,i],a)=>{const s=e===t;return(0,C.jsx)(gT,{label:i,id:s?o:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(i)},e)}))};function bT(e){return Jp("MuiClockPicker",e)}Xp("MuiClockPicker",["root","arrowSwitcher"]);const yT=av(NO,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),xT=av(hO,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),wT=()=>{},_T=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiClockPicker"}),{ampm:r=!1,ampmInClock:o=!1,autoFocus:i,components:a,componentsProps:l,date:c,disableIgnoringDatePartForTimeValidation:u,getClockLabelText:d,getHoursClockNumberText:f,getMinutesClockNumberText:p,getSecondsClockNumberText:h,leftArrowButtonText:g,maxTime:m,minTime:v,minutesStep:b=1,rightArrowButtonText:y,shouldDisableTime:x,showViewSwitcher:w,onChange:_,view:S,views:k=["hours","minutes"],openTo:E,onViewChange:j,className:O,disabled:T,readOnly:I}=n;wT({leftArrowButtonText:g,rightArrowButtonText:y,getClockLabelText:d,getHoursClockNumberText:f,getMinutesClockNumberText:p,getSecondsClockNumberText:h});const R=hj(),P=g??R.openPreviousView,M=y??R.openNextView,A=d??R.clockLabelText,D=f??R.hoursClockNumberText,F=p??R.minutesClockNumberText,L=h??R.secondsClockNumberText,{openView:N,setOpenView:B,nextView:z,previousView:$,handleChangeAndOpenNext:V}=nO({view:S,views:k,openTo:E,onViewChange:j,onChange:_}),H=gj(),K=fj(),U=s.useMemo((()=>c||K.setSeconds(K.setMinutes(K.setHours(H,0),0),0)),[c,H,K]),{meridiemMode:G,handleMeridiemChange:W}=bO(U,r,V),q=s.useCallback(((e,t)=>{const n=vO(u,K),o=({start:e,end:t})=>!(v&&n(v,t)||m&&n(e,m)),i=(e,n=1)=>e%n===0&&(!x||!x(e,t));switch(t){case"hours":{const t=gO(e,G,r),n=K.setHours(U,t);return!o({start:K.setSeconds(K.setMinutes(n,0),0),end:K.setSeconds(K.setMinutes(n,59),59)})||!i(t)}case"minutes":{const t=K.setMinutes(U,e);return!o({start:K.setSeconds(t,0),end:K.setSeconds(t,59)})||!i(e,b)}case"seconds":{const t=K.setSeconds(U,e);return!o({start:t,end:t})||!i(e)}default:throw new Error("not supported")}}),[r,U,u,m,G,v,b,x,K]),Y=Eh(),J=s.useMemo((()=>{switch(N){case"hours":{const e=(e,t)=>{const n=gO(e,G,r);V(K.setHours(U,n),t)};return{onChange:e,value:K.getHours(U),children:mT({date:c,utils:K,ampm:r,onChange:e,getClockNumberText:D,isDisabled:e=>T||q(e,"hours"),selectedId:Y})}}case"minutes":{const e=K.getMinutes(U),t=(e,t)=>{V(K.setMinutes(U,e),t)};return{value:e,onChange:t,children:vT({utils:K,value:e,onChange:t,getClockNumberText:F,isDisabled:e=>T||q(e,"minutes"),selectedId:Y})}}case"seconds":{const e=K.getSeconds(U),t=(e,t)=>{V(K.setSeconds(U,e),t)};return{value:e,onChange:t,children:vT({utils:K,value:e,onChange:t,getClockNumberText:L,isDisabled:e=>T||q(e,"seconds"),selectedId:Y})}}default:throw new Error("You must provide the type for ClockView")}}),[N,K,c,r,D,F,L,G,V,U,q,Y,T]),X=n,Z=(e=>{const{classes:t}=e;return Gh({root:["root"],arrowSwitcher:["arrowSwitcher"]},bT,t)})(X);return(0,C.jsxs)(yT,{ref:t,className:w_(Z.root,O),ownerState:X,children:[w&&(0,C.jsx)(xT,{className:Z.arrowSwitcher,leftArrowButtonText:P,rightArrowButtonText:M,components:a,componentsProps:l,onLeftClick:()=>B($),onRightClick:()=>B(z),isLeftDisabled:!$,isRightDisabled:!z,ownerState:X}),(0,C.jsx)(uT,bu({autoFocus:i,date:c,ampmInClock:o,type:N,ampm:r,getClockLabelText:A,minutesStep:b,isTimeDisabled:q,meridiemMode:G,handleMeridiemChange:W,selectedId:Y,disabled:T,readOnly:I},J))]})})),ST=e=>1===e.length&&"year"===e[0],kT=e=>2===e.length&&-1!==e.indexOf("month")&&-1!==e.indexOf("year");function ET(e,t){var n;const r=fj(),o=pj(),i=Im({props:e,name:t}),a=null!=(n=i.views)?n:["year","day"];return bu({openTo:"day",disableFuture:!1,disablePast:!1},((e,t)=>ST(e)?{inputFormat:t.formats.year}:kT(e)?{disableMaskedInput:!0,inputFormat:t.formats.monthAndYear}:{inputFormat:t.formats.keyboardDate})(a,r),i,{views:a,minDate:yj(r,i.minDate,o.minDate),maxDate:yj(r,i.maxDate,o.maxDate)})}const CT={emptyValue:null,getTodayValue:e=>e.date(),parseInput:bj,areValuesEqual:(e,t,n)=>e.isEqual(t,n)};function jT(e){return Jp("MuiPickersToolbar",e)}const OT=Xp("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),TT=av("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>bu({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),IT=av(xC,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>bu({flex:1},!e.isLandscape&&{alignItems:"center"}))),RT=av(kS,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{[`&.${OT.penIconButtonLandscape}`]:t.penIconButtonLandscape},t.penIconButton]})({}),PT=e=>"clock"===e?(0,C.jsx)(sO,{color:"inherit"}):(0,C.jsx)(aO,{color:"inherit"}),MT=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,getMobileKeyboardInputViewButtonText:i,isLandscape:a,isMobileKeyboardViewOpen:s,landscapeDirection:l="column",toggleMobileKeyboardView:c,toolbarTitle:u,viewType:d="calendar"}=n,f=n,p=hj(),h=(e=>{const{classes:t,isLandscape:n}=e;return Gh({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},jT,t)})(f);return(0,C.jsxs)(TT,{ref:t,className:w_(h.root,o),ownerState:f,children:[(0,C.jsx)(IS,{color:"text.secondary",variant:"overline",children:u}),(0,C.jsxs)(IT,{container:!0,justifyContent:"space-between",className:h.content,ownerState:f,direction:a?l:"row",alignItems:a?"flex-start":"flex-end",children:[r,(0,C.jsx)(RT,{onClick:c,className:h.penIconButton,ownerState:f,color:"inherit","aria-label":i?i(s,d):p.inputModeToggleButtonAriaLabel(s,d),children:s?PT(d):(0,C.jsx)(lO,{color:"inherit"})})]})]})}));function AT(e){return Jp("MuiDatePickerToolbar",e)}Xp("MuiDatePickerToolbar",["root","title"]);const DT=["parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],FT=av(MT,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),LT=av(IS,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((({ownerState:e})=>bu({},e.isLandscape&&{margin:"auto 16px auto auto"}))),NT=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiDatePickerToolbar"}),{parsedValue:r,isLandscape:o,isMobileKeyboardViewOpen:i,toggleMobileKeyboardView:a,toolbarFormat:l,toolbarPlaceholder:c="––",toolbarTitle:u,views:d}=n,f=Au(n,DT),p=fj(),h=hj(),g=(e=>{const{classes:t}=e;return Gh({root:["root"],title:["title"]},AT,t)})(n),m=u??h.datePickerDefaultToolbarTitle,v=s.useMemo((()=>r?l?p.formatByString(r,l):ST(d)?p.format(r,"year"):kT(d)?p.format(r,"month"):/en/.test(p.getCurrentLocaleCode())?p.format(r,"normalDateWithWeekday"):p.format(r,"normalDate"):c),[r,l,c,p,d]),b=n;return(0,C.jsx)(FT,bu({ref:t,toolbarTitle:m,isMobileKeyboardViewOpen:i,toggleMobileKeyboardView:a,isLandscape:o,className:g.root},f,{children:(0,C.jsx)(LT,{variant:"h4",align:o?"left":"center",ownerState:b,className:g.title,children:v})}))})),BT=["onAccept","onClear","onCancel","onSetToday","actions"],zT=e=>{const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Au(e,BT),l=s.useContext(jO),c=hj(),u="function"==typeof i?i(l):i;if(null==u||0===u.length)return null;const d=null==u?void 0:u.map((e=>{switch(e){case"clear":return(0,C.jsx)(IE,{onClick:n,children:c.clearButtonLabel},e);case"cancel":return(0,C.jsx)(IE,{onClick:r,children:c.cancelButtonLabel},e);case"accept":return(0,C.jsx)(IE,{onClick:t,children:c.okButtonLabel},e);case"today":return(0,C.jsx)(IE,{onClick:o,children:c.todayButtonLabel},e);default:return null}}));return(0,C.jsx)(iC,bu({},a,{children:d}))};function $T(e){return Jp("MuiPickersPopper",e)}Xp("MuiPickersPopper",["root","paper"]);const VT=["onClick","onTouchStart"],HT=av(fE,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),KT=av(tS,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>bu({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));function UT(e){var t;const n=Im({props:e,name:"MuiPickersPopper"}),{anchorEl:r,children:o,containerRef:i=null,onBlur:a,onClose:l,onClear:c,onAccept:u,onCancel:d,onSetToday:f,open:p,PopperProps:h,role:g,TransitionComponent:m=EC,TrapFocusProps:v,PaperProps:b={},components:y,componentsProps:x}=n;s.useEffect((()=>{function e(e){p&&("Escape"===e.key||"Esc"===e.key)&&l()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[l,p]);const w=s.useRef(null);s.useEffect((()=>{"tooltip"!==g&&(p?w.current=oj(document):w.current&&w.current instanceof HTMLElement&&setTimeout((()=>{w.current instanceof HTMLElement&&w.current.focus()})))}),[p,g]);const[_,S,k]=function(e,t){const n=s.useRef(!1),r=s.useRef(!1),o=s.useRef(null),i=s.useRef(!1);s.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}}),[e]);const a=jh((e=>{if(!i.current)return;const a=r.current;r.current=!1;const s=xh(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),!l&&!a&&t(e)})),l=()=>{r.current=!0};return s.useEffect((()=>{if(e){const e=xh(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}}),[e,a]),s.useEffect((()=>{if(e){const e=xh(o.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}}),[e,a]),[o,l,l]}(p,a??l),E=Oh(s.useRef(null),i),j=Oh(E,_),O=n,T=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"]},$T,t)})(O),{onClick:I,onTouchStart:R}=b,P=Au(b,VT),M=null!=(t=null==y?void 0:y.ActionBar)?t:zT,A=(null==y?void 0:y.PaperContent)||s.Fragment;return(0,C.jsx)(HT,bu({transition:!0,role:g,open:p,anchorEl:r,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),l())},className:T.root},h,{children:({TransitionProps:e,placement:t})=>(0,C.jsx)(BE,bu({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===g,isEnabled:()=>!0},v,{children:(0,C.jsx)(m,bu({},e,{children:(0,C.jsx)(KT,bu({tabIndex:-1,elevation:8,ref:j,onClick:e=>{S(e),I&&I(e)},onTouchStart:e=>{k(e),R&&R(e)},ownerState:bu({},O,{placement:t}),className:T.paper},P,{children:(0,C.jsxs)(A,bu({},null==x?void 0:x.paperContent,{children:[o,(0,C.jsx)(M,bu({onAccept:u,onClear:c,onCancel:d,onSetToday:f,actions:[]},null==x?void 0:x.actionBar))]}))}))}))}))}))}function GT(e){const{children:t,DateInputProps:n,KeyboardDateInputComponent:r,onClear:o,onDismiss:i,onCancel:a,onAccept:l,onSetToday:c,open:u,PopperProps:d,PaperProps:f,TransitionComponent:p,components:h,componentsProps:g}=e,m=s.useRef(null),v=Oh(n.inputRef,m);return(0,C.jsxs)(jO.Provider,{value:"desktop",children:[(0,C.jsx)(r,bu({},n,{inputRef:v})),(0,C.jsx)(UT,{role:"dialog",open:u,anchorEl:m.current,TransitionComponent:p,PopperProps:d,PaperProps:f,onClose:i,onCancel:a,onClear:o,onAccept:l,onSetToday:c,components:h,componentsProps:g,children:t})]})}const WT=(e,t,n)=>{const r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""},qT="_",YT="2019-11-21T22:30:00.000",JT="2019-01-01T09:00:00.000";function XT(e,t,n,r){if(!e)return!1;const o=r.formatByString(r.date(JT),t).replace(n,qT),i=r.formatByString(r.date(YT),t).replace(n,"_"),a=i===o&&e===i;return!a&&r.lib,a}const ZT=({acceptRegex:e=/[\d]/gi,disabled:t,disableMaskedInput:n,ignoreInvalidInputs:r,inputFormat:o,inputProps:i,label:a,mask:l,onChange:c,rawValue:u,readOnly:d,rifmFormatter:f,TextFieldProps:p,validationError:h})=>{const g=fj(),m=g.getFormatHelperText(o),{shouldUseMaskedInput:v,maskToUse:b}=s.useMemo((()=>{if(n)return{shouldUseMaskedInput:!1,maskToUse:""};const t=function(e,t,n,r){if(e)return e;const o=r.formatByString(r.date(JT),t).replace(n,qT);return o===r.formatByString(r.date(YT),t).replace(n,"_")?o:""}(l,o,e,g);return{shouldUseMaskedInput:XT(t,o,e,g),maskToUse:t}}),[e,n,o,l,g]),y=s.useMemo((()=>v&&b?((e,t)=>n=>{let r=0;return n.split("").map(((o,i)=>{if(t.lastIndex=0,r>e.length-1)return"";const a=e[r],s=e[r+1],l=t.test(o)?o:"",c=a===qT?l:a+l;return r+=c.length,i===n.length-1&&s&&s!==qT?c?c+s:"":c})).join("")})(b,e):e=>e),[e,b,v]),x=null===u?null:g.date(u),[w,_]=s.useState(x),[S,k]=s.useState(WT(g,u,o)),E=s.useRef(),C=s.useRef(g.locale),j=s.useRef(o);s.useEffect((()=>{const e=u!==E.current,t=g.locale!==C.current,n=o!==j.current;if(E.current=u,C.current=g.locale,j.current=o,!e&&!t&&!n)return;const r=null===u?null:g.date(u),i=null===u||g.isValid(r);let a=null===w&&null===r;if(null!==w&&null!==r){const e=g.isEqual(w,r);if(e)a=!0;else{const t=Math.abs(g.getDiff(w,r));a=0===t?e:t<1e3}}if(!t&&!n&&(!i||a))return;const s=WT(g,u,o);_(r),k(s)}),[g,u,o,w]);const O=e=>{const t=""===e||e===l?"":e;k(t);const n=null===t?null:g.parse(t,o);r&&!g.isValid(n)||(_(n),c(n,t||void 0))},T=(e=>{const[,t]=(0,s.useReducer)((e=>e+1),0),n=(0,s.useRef)(null),{replace:r,append:o}=e,i=r?r(e.format(e.value)):e.format(e.value),a=(0,s.useRef)(!1);return(0,s.useLayoutEffect)((()=>{if(null==n.current)return;let[a,s,l,c,u]=n.current;n.current=null;const d=c&&u,f=a.slice(s.selectionStart).search(e.accept||/\d/g),p=-1!==f?f:0,h=t=>(t.match(e.accept||/\d/g)||[]).join(""),g=h(a.substr(0,s.selectionStart)),m=e=>{let t=0,n=0;for(let r=0;r!==g.length;++r){let o=e.indexOf(g[r],t)+1,i=h(e).indexOf(g[r],n)+1;i-n>1&&(o=t,i=n),n=Math.max(i,n),t=Math.max(t,o)}return t};if(!0===e.mask&&l&&!u){let e=m(a);const t=h(a.substr(e))[0];e=a.indexOf(t,e),a=`${a.substr(0,e)}${a.substr(e+1)}`}let v=e.format(a);null!=o&&s.selectionStart===a.length&&!u&&(l?v=o(v):""===h(v.slice(-1))&&(v=v.slice(0,-1)));const b=r?r(v):v;return i===b?t():e.onChange(b),()=>{let t=m(v);if(null!=e.mask&&(l||c&&!d))for(;v[t]&&""===h(v[t]);)t+=1;s.selectionStart=s.selectionEnd=t+(d?1+p:0)}})),(0,s.useEffect)((()=>{const e=e=>{"Delete"===e.code&&(a.current=!0)},t=e=>{"Delete"===e.code&&(a.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),{value:null!=n.current?n.current[0]:i,onChange:r=>{const o=r.target.value;n.current=[o,r.target,o.length>i.length,a.current,i===e.format(o)],t()}}})({value:S,onChange:O,format:f||y});return bu({label:a,disabled:t,error:h,inputProps:bu({},v?T:{value:S,onChange:e=>{O(e.currentTarget.value)}},{disabled:t,placeholder:m,readOnly:d,type:v?"tel":"text"},i)},p)},QT=["className","components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],eI=s.forwardRef((function(e,t){const{className:n,components:r={},disableOpenPicker:o,getOpenDialogAriaText:i,InputAdornmentProps:a,InputProps:s,inputRef:l,openPicker:c,OpenPickerButtonProps:u,renderInput:d}=e,f=Au(e,QT),p=hj(),h=i??p.openDatePickerDialogue,g=fj(),m=ZT(f),v=(null==a?void 0:a.position)||"end",b=r.OpenPickerIcon||aO;return d(bu({ref:t,inputRef:l,className:n},m,{InputProps:bu({},s,{[`${v}Adornment`]:o?void 0:(0,C.jsx)(RC,bu({position:v},a,{children:(0,C.jsx)(kS,bu({edge:v,disabled:f.disabled||f.readOnly,"aria-label":h(f.rawValue,g)},u,{onClick:c,children:(0,C.jsx)(b,{})}))}))})}))}));function tI(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function nI(e){return Jp("MuiCalendarOrClockPicker",e)}Xp("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);const rI=["autoFocus","className","parsedValue","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","dateRangeIcon","timeIcon","hideTabs","classes"],oI=av("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),iI=av("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e})=>bu({display:"flex",flexDirection:"column"},e.isLandscape&&{flexDirection:"row"}))),aI={fullWidth:!0},sI=e=>"year"===e||"month"===e||"day"===e,lI=e=>"hours"===e||"minutes"===e||"seconds"===e;function cI(e){var t,n;const r=Im({props:e,name:"MuiCalendarOrClockPicker"}),{autoFocus:o,parsedValue:i,DateInputProps:a,isMobileKeyboardViewOpen:l,onDateChange:c,onViewChange:u,openTo:d,orientation:f,showToolbar:p,toggleMobileKeyboardView:h,ToolbarComponent:g=()=>null,toolbarFormat:m,toolbarPlaceholder:v,toolbarTitle:b,views:y,dateRangeIcon:x,timeIcon:w,hideTabs:_}=r,S=Au(r,rI),k=null==(t=S.components)?void 0:t.Tabs,E=((e,t)=>{const[n,r]=s.useState(tI);return ch((()=>{const e=()=>{r(tI())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),!nj(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(y,f),j=s.useContext(jO),O=(e=>{const{classes:t}=e;return Gh({root:["root"],mobileKeyboardInputView:["mobileKeyboardInputView"]},nI,t)})(r),T=p??"desktop"!==j,I=!_&&typeof window<"u"&&window.innerHeight>667,R=s.useCallback(((e,t)=>{c(e,j,t)}),[c,j]),P=s.useCallback((e=>{l&&h(),u&&u(e)}),[l,u,h]),{openView:M,setOpenView:A,handleChangeAndOpenNext:D}=nO({view:void 0,views:y,openTo:d,onChange:R,onViewChange:P}),{focusedView:F,setFocusedView:L}=(({autoFocus:e,openView:t})=>{const[n,r]=s.useState(e?t:null),o=s.useCallback((e=>t=>{r(t?e:t=>e===t?null:t)}),[]);return{focusedView:n,setFocusedView:o}})({autoFocus:o,openView:M});return(0,C.jsxs)(iI,{ownerState:{isLandscape:E},className:O.root,children:[T&&(0,C.jsx)(g,bu({},S,{views:y,isLandscape:E,parsedValue:i,onChange:R,setOpenView:A,openView:M,toolbarTitle:b,toolbarFormat:m,toolbarPlaceholder:v,isMobileKeyboardViewOpen:l,toggleMobileKeyboardView:h})),I&&!!k&&(0,C.jsx)(k,bu({dateRangeIcon:x,timeIcon:w,view:M,onChange:A},null==(n=S.componentsProps)?void 0:n.tabs)),(0,C.jsx)(NO,{children:l?(0,C.jsx)(oI,{className:O.mobileKeyboardInputView,children:(0,C.jsx)(eI,bu({},a,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:aI}))}):(0,C.jsxs)(s.Fragment,{children:[sI(M)&&(0,C.jsx)(KO,bu({autoFocus:o,date:i,onViewChange:A,onChange:D,view:M,views:y.filter(sI),focusedView:F,onFocusedViewChange:L},S)),lI(M)&&(0,C.jsx)(_T,bu({},S,{autoFocus:o,date:i,view:M,views:y.filter(lI),onChange:D,onViewChange:A,showViewSwitcher:"desktop"===j}))]})})]})}const uI=(e,t)=>{const{onAccept:n,onChange:r,value:o,closeOnSelect:i}=e,a=fj(),{isOpen:l,setIsOpen:c}=(({open:e,onOpen:t,onClose:n})=>{const r=s.useRef("boolean"==typeof e).current,[o,i]=s.useState(!1);s.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}}),[r,e]);const a=s.useCallback((e=>{r||i(e),e&&t&&t(),!e&&n&&n()}),[r,t,n]);return{isOpen:o,setIsOpen:a}})(e),u=s.useMemo((()=>t.parseInput(a,o)),[t,a,o]),[d,f]=s.useState(u),[p,h]=s.useState((()=>({committed:u,draft:u,resetFallback:u}))),g=s.useCallback((e=>{h((t=>{switch(e.action){case"setAll":case"acceptAndClose":return{draft:e.value,committed:e.value,resetFallback:e.value};case"setCommitted":return bu({},t,{draft:e.value,committed:e.value});case"setDraft":return bu({},t,{draft:e.value});default:return t}})),(e.forceOnChangeCall||!e.skipOnChangeCall&&!t.areValuesEqual(a,p.committed,e.value))&&r(e.value),"acceptAndClose"===e.action&&(c(!1),n&&!t.areValuesEqual(a,p.resetFallback,e.value)&&n(e.value))}),[n,r,c,p,a,t]);s.useEffect((()=>{a.isValid(u)&&f(u)}),[a,u]),s.useEffect((()=>{l&&g({action:"setAll",value:u,skipOnChangeCall:!0})}),[l]),t.areValuesEqual(a,p.committed,u)||g({action:"setCommitted",value:u,skipOnChangeCall:!0});const m=s.useMemo((()=>({open:l,onClear:()=>{g({value:t.emptyValue,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,o,t.emptyValue)})},onAccept:()=>{g({value:p.draft,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,o,u)})},onDismiss:()=>{g({value:p.committed,action:"acceptAndClose"})},onCancel:()=>{g({value:p.resetFallback,action:"acceptAndClose"})},onSetToday:()=>{g({value:t.getTodayValue(a),action:"acceptAndClose"})}})),[g,l,a,p,t,o,u]),[v,b]=s.useState(!1),y=s.useMemo((()=>({parsedValue:p.draft,isMobileKeyboardViewOpen:v,toggleMobileKeyboardView:()=>b(!v),onDateChange:(e,t,n="partial")=>{switch(n){case"shallow":return g({action:"setDraft",value:e,skipOnChangeCall:!0});case"partial":return g({action:"setDraft",value:e});case"finish":return g(i??"desktop"===t?{value:e,action:"acceptAndClose"}:{value:e,action:"setCommitted"});default:throw new Error("MUI: Invalid selectionState passed to `onDateChange`")}}})),[g,v,p.draft,i]),x=s.useCallback(((e,n)=>{const o=t.valueReducer?t.valueReducer(a,d,e):e;r(o,n)}),[r,t,d,a]),w={pickerProps:y,inputProps:s.useMemo((()=>({onChange:x,open:l,rawValue:o,openPicker:()=>c(!0)})),[x,l,o,c]),wrapperProps:m};return s.useDebugValue(w,(()=>({MuiPickerState:{dateState:p,other:w}}))),w},dI=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],fI=s.forwardRef((function(e,t){const n=ET(e,"MuiDesktopDatePicker"),r=null!==jj(n),{pickerProps:o,inputProps:i,wrapperProps:a}=uI(n,CT),{PopperProps:s,PaperProps:l,ToolbarComponent:c=NT,TransitionComponent:u,components:d,componentsProps:f}=n,p=Au(n,dI),h=bu({},i,p,{components:d,componentsProps:f,ref:t,validationError:r});return(0,C.jsx)(GT,bu({},a,{DateInputProps:h,KeyboardDateInputComponent:eI,PopperProps:s,PaperProps:l,TransitionComponent:u,components:d,componentsProps:f,children:(0,C.jsx)(cI,bu({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:h,components:d,componentsProps:f},p))}))})),pI=av(tC)({[`& .${qE.container}`]:{outline:0},[`& .${qE.paper}`]:{outline:0,minWidth:320}}),hI=av(uC)({"&:first-of-type":{padding:0}}),gI=e=>{var t;const{children:n,DialogProps:r={},onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:u,componentsProps:d}=e,f=null!=(t=null==u?void 0:u.ActionBar)?t:zT;return(0,C.jsxs)(pI,bu({open:c,onClose:a},r,{children:[(0,C.jsx)(hI,{children:n}),(0,C.jsx)(f,bu({onAccept:o,onClear:i,onCancel:s,onSetToday:l,actions:["cancel","accept"]},null==d?void 0:d.actionBar))]}))},mI=["children","DateInputProps","DialogProps","onAccept","onClear","onDismiss","onCancel","onSetToday","open","PureDateInputComponent","components","componentsProps"];function vI(e){const{children:t,DateInputProps:n,DialogProps:r,onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,PureDateInputComponent:u,components:d,componentsProps:f}=e,p=Au(e,mI);return(0,C.jsxs)(jO.Provider,{value:"mobile",children:[(0,C.jsx)(u,bu({components:d},p,n)),(0,C.jsx)(gI,{DialogProps:r,onAccept:o,onClear:i,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:d,componentsProps:f,children:t})]})}const bI=s.forwardRef((function(e,t){const{disabled:n,getOpenDialogAriaText:r,inputFormat:o,InputProps:i,inputRef:a,label:l,openPicker:c,rawValue:u,renderInput:d,TextFieldProps:f={},validationError:p,className:h}=e,g=hj(),m=r??g.openDatePickerDialogue,v=fj(),b=s.useMemo((()=>bu({},i,{readOnly:!0})),[i]),y=WT(v,u,o),x=jh((e=>{e.stopPropagation(),c()}));return d(bu({label:l,disabled:n,ref:t,inputRef:a,error:p,InputProps:b,className:h},!e.readOnly&&!e.disabled&&{onClick:x},{inputProps:bu({disabled:n,readOnly:!0,"aria-readonly":!0,"aria-label":m(u,v),value:y},!e.readOnly&&{onClick:x},{onKeyDown:rj(c)})},f))})),yI=["ToolbarComponent","value","onChange","components","componentsProps"],xI=s.forwardRef((function(e,t){const n=ET(e,"MuiMobileDatePicker"),r=null!==jj(n),{pickerProps:o,inputProps:i,wrapperProps:a}=uI(n,CT),{ToolbarComponent:s=NT,components:l,componentsProps:c}=n,u=Au(n,yI),d=bu({},i,u,{components:l,componentsProps:c,ref:t,validationError:r});return(0,C.jsx)(vI,bu({},u,a,{DateInputProps:d,PureDateInputComponent:bI,components:l,componentsProps:c,children:(0,C.jsx)(cI,bu({},o,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:d,components:l,componentsProps:c},u))}))})),wI=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],_I=s.forwardRef((function(e,t){const n=Im({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:o,PopperProps:i,TransitionComponent:a}=n,s=Au(n,wI);return ph(r,{defaultMatches:!0})?(0,C.jsx)(fI,bu({ref:t,PopperProps:i,TransitionComponent:a},s)):(0,C.jsx)(xI,bu({ref:t,DialogProps:o},s))}));function SI(e){return Jp("PrivatePickersToolbarText",e)}const kI=Xp("PrivatePickersToolbarText",["root","selected"]),EI=["className","selected","value"],CI=av(IS,{name:"PrivatePickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${kI.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:e.palette.text.secondary,[`&.${kI.selected}`]:{color:e.palette.text.primary}}))),jI=s.forwardRef((function(e,t){const{className:n,value:r}=e,o=Au(e,EI),i=(e=>{const{classes:t,selected:n}=e;return Gh({root:["root",n&&"selected"]},SI,t)})(e);return(0,C.jsx)(CI,bu({ref:t,className:w_(n,i.root),component:"span"},o,{children:r}))}));av(IE,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"});Xp("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","separator"]);av(MT,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",[`& .${OT.penIconButton}`]:bu({position:"absolute",top:8},"rtl"===e.direction?{left:8}:{right:8})}))),av("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),av("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex"}),av(jI,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default"});Xp("MuiDateTimePickerTabs",["root"]);av(tj,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e,theme:t})=>bu({boxShadow:`0 -1px 0 0 inset ${t.palette.divider}`},"desktop"===e.wrapperVariant&&{order:1,boxShadow:`0 1px 0 0 inset ${t.palette.divider}`,[`& .${KC.indicator}`]:{bottom:"auto",top:0}})));const OI=Xp("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]);av(MT,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({[`& .${OT.penIconButtonLandscape}`]:{marginTop:"auto"}}),av(jI,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),av("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${OI.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${OI.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})((({theme:e,ownerState:t})=>bu({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},t.isLandscape&&{marginTop:"auto"},"rtl"===e.direction&&{flexDirection:"row-reverse"}))),av("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${OI.ampmLabel}`]:t.ampmLabel},{[`&.${OI.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>bu({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{[`& .${OI.ampmLabel}`]:{fontSize:17}})));function TI(e,t,n){return(t=rg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function II(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?II(Object(n),!0).forEach((function(t){TI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):II(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MI(e,t){if(e){if("string"==typeof e)return PI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?PI(e,t):void 0}}function AI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||MI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DI(e,t){if(null==e)return{};var n,r,o=Au(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var FI=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function LI(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,g=DI(e,FI),m=AI((0,s.useState)(void 0!==l?l:n),2),v=m[0],b=m[1],y=AI((0,s.useState)(void 0!==c?c:o),2),x=y[0],w=y[1],_=AI((0,s.useState)(void 0!==h?h:a),2),S=_[0],k=_[1],E=(0,s.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),C=(0,s.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),j=(0,s.useCallback)((function(){"function"==typeof p&&p(),w(!0)}),[p]),O=(0,s.useCallback)((function(){"function"==typeof f&&f(),w(!1)}),[f]),T=void 0!==l?l:v,I=void 0!==c?c:x,R=void 0!==h?h:S;return RI(RI({},g),{},{inputValue:T,menuIsOpen:I,onChange:E,onInputChange:C,onMenuClose:O,onMenuOpen:j,value:R})}function NI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rg(r.key),r)}}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BI(e)}function zI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(zI=function(){return!!e})()}function $I(e){var t=zI();return function(){var n,r=BI(e);if(t){var o=BI(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==ng(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H_(e)}(this,n)}}function VI(e){return function(e){if(Array.isArray(e))return PI(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||MI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var HI=s.useLayoutEffect,KI=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],UI=function(){};function GI(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function WI(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(GI(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var qI=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===ng(e)&&null!==e?[e]:[]},YI=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,RI({},DI(e,KI))},JI=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(n??{},i(t,e),a)}};function XI(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ZI(e){return XI(e)?window.pageYOffset:e.scrollTop}function QI(e,t){XI(e)?window.scrollTo(0,t):e.scrollTop=t}function eR(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:UI,o=ZI(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);QI(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function tR(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?QI(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&QI(e,Math.max(t.offsetTop-o,0))}function nR(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var rR=!1,oR={get passive(){return rR=!0}},iR=typeof window<"u"?window:{};iR.addEventListener&&iR.removeEventListener&&(iR.addEventListener("p",UI,oR),iR.removeEventListener("p",UI,!1));var aR=rR;function sR(e){return null!=e}function lR(e,t,n){return e?t:n}var cR=["children","innerProps"],uR=["children","innerProps"];function dR(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,p=d.height,h=d.top,g=n.offsetParent.getBoundingClientRect().top,m=a?window.innerHeight:function(e){return XI(e)?window.innerHeight:e.clientHeight}(l),v=ZI(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=g-y,w=m-h,_=x+v,S=u-v-h,k=f-m+v+b,E=v+h-y,C=160;switch(o){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!a)return i&&eR(l,k,C),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&w>=r)return i&&eR(l,k,C),{placement:"bottom",maxHeight:a?w-b:S-b};if("auto"===o||a){var j=t,O=a?x:_;return O>=r&&(j=Math.min(O-b-s,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return i&&QI(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(_>=p&&!a)return i&&eR(l,E,C),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&x>=r){var T=t;return(!a&&_>=r||a&&x>=r)&&(T=a?x-y:_-y),i&&eR(l,E,C),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var fR,pR=function(e){return"auto"===e?"bottom":e},hR=(0,s.createContext)(null),gR=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=((0,s.useContext)(hR)||{}).setPortalPlacement,u=(0,s.useRef)(null),d=AI((0,s.useState)(r),2),f=d[0],p=d[1],h=AI((0,s.useState)(null),2),g=h[0],m=h[1],v=l.spacing.controlHeight;return HI((function(){var e=u.current;if(e){var t="fixed"===i,s=dR({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});p(s.maxHeight),m(s.placement),null==c||c(s.placement)}}),[r,o,i,a,n,c,v]),t({ref:u,placerProps:RI(RI({},e),{},{placement:g||pR(o),maxHeight:f})})},mR=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return mf("div",bu({},JI(e,"menu",{menu:!0}),{ref:n},r),t)},vR=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return RI({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},bR=vR,yR=vR,xR=["size"],wR=["innerProps","isRtl","size"];var _R={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},SR=function(e){var t=e.size,n=DI(e,xR);return mf("svg",bu({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_R},n))},kR=function(e){return mf(SR,bu({size:20},e),mf("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"}))},ER=function(e){return mf(SR,bu({size:20},e),mf("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"}))},CR=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return RI({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},jR=CR,OR=CR,TR=yf(fR||(fR=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),IR=function(e){var t=e.delay,n=e.offset;return mf("span",{css:bf({animation:"".concat(TR," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},RR=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return mf("div",bu({ref:o},JI(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},PR=["data"],MR=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return mf("div",bu({},JI(e,"group",{group:!0}),s),mf(i,bu({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),mf("div",null,t))},AR=["innerRef","isDisabled","isHidden","inputClassName"],DR={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},FR={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":RI({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},DR)},LR=function(e){return RI({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},DR)},NR=function(e){var t=e.cx,n=e.value,r=YI(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=DI(r,AR);return mf("div",bu({},JI(e,"input",{"input-container":!0}),{"data-value":n||""}),mf("input",bu({className:t({input:!0},s),ref:o,style:LR(a),disabled:i},l)))},BR=function(e){var t=e.children,n=e.innerProps;return mf("div",n,t)};var zR=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return mf(l,{data:r,innerProps:RI(RI({},JI(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},mf(c,{data:r,innerProps:RI({},JI(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),mf(u,{data:r,innerProps:RI(RI({},JI(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},$R=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return mf("div",bu({},JI(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},VR=function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"placeholder",{placeholder:!0}),n),t)},HR=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return mf("div",bu({},JI(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},KR={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||mf(kR,null))},Control:RR,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||mf(ER,null))},DownChevron:ER,CrossIcon:kR,Group:MR,GroupHeading:function(e){var t=YI(e);t.data;var n=DI(t,PR);return mf("div",bu({},JI(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({},JI(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return mf("span",bu({},t,JI(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:NR,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=DI(e,wR);return mf("div",bu({},JI(RI(RI({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),mf(IR,{delay:0,offset:n}),mf(IR,{delay:160,offset:!0}),mf(IR,{delay:320,offset:!n}))},Menu:mR,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return mf("div",bu({},JI(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,l=(0,s.useRef)(null),c=(0,s.useRef)(null),u=AI((0,s.useState)(pR(i)),2),d=u[0],f=u[1],p=(0,s.useMemo)((function(){return{setPortalPlacement:f}}),[]),h=AI((0,s.useState)(null),2),g=h[0],m=h[1],v=(0,s.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[d]+t;(n!==(null==g?void 0:g.offset)||e.left!==(null==g?void 0:g.rect.left)||e.width!==(null==g?void 0:g.rect.width))&&m({offset:n,rect:e})}}),[r,a,d,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);HI((function(){v()}),[v]);var b=(0,s.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=zy(r,l.current,v,{elementResize:"ResizeObserver"in window}))}),[r,v]);HI((function(){b()}),[b]);var y=(0,s.useCallback)((function(e){l.current=e,b()}),[b]);if(!t&&"fixed"!==a||!g)return null;var x=mf("div",bu({ref:y},JI(RI(RI({},e),{},{offset:g.offset,position:a,rect:g.rect}),"menuPortal",{"menu-portal":!0}),o),n);return mf(hR.Provider,{value:p},t?(0,cc.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=DI(e,uR);return mf("div",bu({},JI(RI(RI({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=DI(e,cR);return mf("div",bu({},JI(RI(RI({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:zR,MultiValueContainer:BR,MultiValueLabel:BR,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return mf("div",bu({role:"button"},n),t||mf(kR,{size:14}))},Option:$R,Placeholder:VR,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return mf("div",bu({},JI(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:HR,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return mf("div",bu({},JI(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},UR=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function GR(e,t){return!!(e===t||UR(e)&&UR(t))}function WR(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!GR(e[n],t[n]))return!1;return!0}for(var qR={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"},YR=function(e){return mf("span",bu({css:qR},e))},JR={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},XR=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,g=l.isOptionDisabled,m=l.isSearchable,v=l.menuIsOpen,b=l.options,y=l.screenReaderStatus,x=l.tabSelectsValue,w=l.isLoading,_=l["aria-label"],S=l["aria-live"],k=(0,s.useMemo)((function(){return RI(RI({},JR),d||{})}),[d]),E=(0,s.useMemo)((function(){var e="";if(t&&k.onChange){var n=t.option,r=t.options,o=t.removedValue,i=t.removedValues,s=t.value,l=o||n||function(e){return Array.isArray(e)?null:e}(s),c=l?f(l):"",u=r||i||void 0,d=u?u.map(f):[],p=RI({isDisabled:l&&g(l,a),label:c,labels:d},t);e=k.onChange(p)}return e}),[t,k,g,a,f]),C=(0,s.useMemo)((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&k.onFocus){var s={focused:t,label:f(t),isDisabled:g(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=k.onFocus(s)}return e}),[n,r,f,g,k,o,a,u]),j=(0,s.useMemo)((function(){var e="";if(v&&b.length&&!w&&k.onFilter){var t=y({count:o.length});e=k.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,v,k,b,y,w]),O="initial-input-focus"===(null==t?void 0:t.action),T=(0,s.useMemo)((function(){var e="";if(k.guidance){var t=r?"value":v?"menu":"input";e=k.guidance({"aria-label":_,context:t,isDisabled:n&&g(n,a),isMulti:h,isSearchable:m,tabSelectsValue:x,isInitialFocus:O})}return e}),[_,n,r,h,g,m,v,k,a,x,O]),I=mf(s.Fragment,null,mf("span",{id:"aria-selection"},E),mf("span",{id:"aria-focused"},C),mf("span",{id:"aria-results"},j),mf("span",{id:"aria-guidance"},T));return mf(s.Fragment,null,mf(YR,{id:c},O&&I),mf(YR,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!O&&I))},ZR=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],QR=new RegExp("["+ZR.map((function(e){return e.letters})).join("")+"]","g"),eP={},tP=0;tP<ZR.length;tP++)for(var nP=ZR[tP],rP=0;rP<nP.letters.length;rP++)eP[nP.letters[rP]]=nP.base;var oP=function(e){return e.replace(QR,(function(e){return eP[e]}))},iP=function(e,t){void 0===t&&(t=WR);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(oP),aP=function(e){return e.replace(/^\s+|\s+$/g,"")},sP=function(e){return"".concat(e.label," ").concat(e.value)},lP=["innerRef"];function cP(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=AI(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=AI(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(DI(e,lP),"onExited","in","enter","exit","appear");return mf("input",bu({ref:t},n,{css:bf({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var uP=["boxSizing","height","overflow","paddingRight","position"],dP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function fP(e){e.cancelable&&e.preventDefault()}function pP(e){e.stopPropagation()}function hP(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gP(){return"ontouchstart"in window||navigator.maxTouchPoints}var mP=!!(typeof window<"u"&&window.document&&window.document.createElement),vP=0,bP={capture:!1,passive:!1};var yP=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},xP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function wP(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,s.useRef)(!1),l=(0,s.useRef)(!1),c=(0,s.useRef)(0),u=(0,s.useRef)(null),d=(0,s.useCallback)((function(e,t){if(null!==u.current){var s=u.current,c=s.scrollTop,d=s.scrollHeight,f=s.clientHeight,p=u.current,h=t>0,g=d-f-c,m=!1;g>t&&a.current&&(r&&r(e),a.current=!1),h&&l.current&&(i&&i(e),l.current=!1),h&&t>g?(n&&!a.current&&n(e),p.scrollTop=d,m=!0,a.current=!0):!h&&-t>c&&(o&&!l.current&&o(e),p.scrollTop=0,m=!0,l.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),f=(0,s.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,s.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),h=(0,s.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,s.useCallback)((function(e){if(e){var t=!!aR&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),m=(0,s.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,s.useEffect)((function(){if(t){var e=u.current;return g(e),function(){m(e)}}}),[t,g,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,s.useRef)({}),i=(0,s.useRef)(null),a=(0,s.useCallback)((function(e){if(mP){var t=document.body,n=t&&t.style;if(r&&uP.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&vP<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(dP).forEach((function(e){var t=dP[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&gP()&&(t.addEventListener("touchmove",fP,bP),e&&(e.addEventListener("touchstart",hP,bP),e.addEventListener("touchmove",pP,bP))),vP+=1}}),[r]),l=(0,s.useCallback)((function(e){if(mP){var t=document.body,n=t&&t.style;vP=Math.max(vP-1,0),r&&vP<1&&uP.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&gP()&&(t.removeEventListener("touchmove",fP,bP),e&&(e.removeEventListener("touchstart",hP,bP),e.removeEventListener("touchmove",pP,bP)))}}),[r]);return(0,s.useEffect)((function(){if(t){var e=i.current;return a(e),function(){l(e)}}}),[t,a,l]),function(e){i.current=e}}({isEnabled:n});return mf(s.Fragment,null,n&&mf("div",{onClick:yP,css:xP}),t((function(e){o(e),i(e)})))}var _P={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},SP=function(e){var t=e.name,n=e.onFocus;return mf("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:_P,value:"",onChange:function(){}})};function kP(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function EP(){return kP(/^Mac/i)}function CP(){return kP(/^iPhone/i)||kP(/^iPad/i)||EP()&&navigator.maxTouchPoints>1}var jP={clearIndicator:OR,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return RI({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:jR,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return RI({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return RI({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return RI(RI({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},FR),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return RI({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:yR,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return RI((TI(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),TI(n,"position","absolute"),TI(n,"width","100%"),TI(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return RI({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return RI({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return RI({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return RI({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:bR,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return RI({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return RI({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return RI({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return RI({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},OP={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},TP={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:nR(),captureMenuScroll:!nR(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=RI({ignoreCase:!0,ignoreAccents:!0,stringify:sP,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?aP(n):n,u=s?aP(a(t)):a(t);return o&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=iP(c),u=oP(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function IP(e,t,n,r){return{type:"option",data:t,isDisabled:NP(e,t,n),isSelected:BP(e,t,n),label:FP(e,t),value:LP(e,t),index:r}}function RP(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return IP(e,n,t,r)})).filter((function(t){return AP(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=IP(e,n,t,r);return AP(e,i)?i:void 0})).filter(sR)}function PP(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,VI(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function MP(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,VI(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function AP(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!$P(e)||!i)&&zP(e,{label:a,value:s,data:o},r)}var DP=function(e,t){var n,r=null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id;return r||null},FP=function(e,t){return e.getOptionLabel(t)},LP=function(e,t){return e.getOptionValue(t)};function NP(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function BP(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=LP(e,t);return n.some((function(t){return LP(e,t)===r}))}function zP(e,t,n){return!e.filterOption||e.filterOption(t,n)}var $P=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},VP=1,HP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O_(e,t)}(n,e);var t=$I(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=EP()||CP(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(VI(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=lR(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(lR(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=lR(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return DP(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return MP(RP(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WI.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return FP(r.props,e)},r.getOptionValue=function(e){return LP(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=jP[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return function(e){return RI(RI({},KR),e.components)}(r.props)},r.buildCategorizedOptions=function(){return RP(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return PP(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:RI({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&XI(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return $P(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,g=p.focusedValue,m=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)r.removeValue(g);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing||e.shiftKey||!c||!d||!h||f&&r.isOptionSelected(h,m))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h||r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++VP),r.state.selectValue=qI(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=DP(o,i[a])}return r}return function(e,t,n){NI(e.prototype,t),NI(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&tR(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!o&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(tR(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(OP):RI(RI({},OP),this.props.theme):OP}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return NP(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return BP(this.props,e,t)}},{key:"filterOption",value:function(e,t){return zP(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,g=r||this.getElementId("input"),m=RI(RI(RI({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?s.createElement(u,bu({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):s.createElement(cP,bu({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:UI,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,g=u.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!d)return h?null:s.createElement(l,bu({},c,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),g);if(p)return v.map((function(t,a){var l=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return s.createElement(n,bu({},c,{components:{Container:r,Label:o,Remove:i},isFocused:l,isDisabled:f,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var x=v[0];return s.createElement(a,bu({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,bu({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return s.createElement(e,bu({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return s.createElement(n,bu({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return s.createElement(e,bu({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,g=p.inputValue,m=p.isLoading,v=p.loadingMessage,b=p.minMenuHeight,y=p.maxMenuHeight,x=p.menuIsOpen,w=p.menuPlacement,_=p.menuPosition,S=p.menuPortalTarget,k=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,C=p.noOptionsMessage,j=p.onMenuScrollToTop,O=p.onMenuScrollToBottom;if(!x)return null;var T,I=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,l=t.label,c=t.value,p=f===o,h=i?void 0:function(){return e.onOptionHover(o)},g=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:g,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return s.createElement(u,bu({},d,{innerProps:v,data:o,isDisabled:i,isSelected:a,key:m,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),c="".concat(l,"-heading");return s.createElement(n,bu({},d,{key:l,data:o,options:i,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(m){var R=v({inputValue:g});if(null===R)return null;T=s.createElement(l,d,R)}else{var P=C({inputValue:g});if(null===P)return null;T=s.createElement(c,d,P)}var M={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:_,menuShouldScrollIntoView:E},A=s.createElement(gR,bu({},d,M),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return s.createElement(o,bu({},d,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),s.createElement(wP,{captureEnabled:h,onTopArrive:j,onBottomArrive:O,lockEnabled:k},(function(t){return s.createElement(i,bu({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:l,focusedOption:f}),T)})))}));return S||"fixed"===_?s.createElement(a,bu({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:w,menuPosition:_}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,l=this.state.selectValue;if(a&&!this.hasValue()&&!r)return s.createElement(SP,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return s.createElement("input",{name:i,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return s.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):s.createElement("input",{name:i,type:"hidden",value:""});return s.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return s.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return s.createElement(XR,bu({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,l=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.createElement(r,bu({},f,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),s.createElement(t,bu({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),s.createElement(o,bu({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),s.createElement(n,bu({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=qI(u),g={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var m=d?function(e,t){return PP(RP(e,t))}(e,h):[],v=d?MP(RP(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);g={selectValue:h,focusedOption:y,focusedOptionId:DP(v,y),focusableOptionsWithIds:v,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,_=a&&s;return a&&!_&&(w={value:lR(p,h,h[0]||null),options:h,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),RI(RI(RI({},g),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:_})}}]),n}(s.Component);HP.defaultProps=TP;var KP=(0,s.forwardRef)((function(e,t){var n=LI(e);return s.createElement(HP,bu({ref:t},n))})),UP=KP,GP=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];var WP=(0,s.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,o=void 0!==r&&r,i=e.loadOptions;e.options;var a=e.isLoading,l=void 0!==a&&a,c=e.onInputChange,u=e.filterOption,d=void 0===u?null:u,f=DI(e,GP),p=f.inputValue,h=(0,s.useRef)(void 0),g=(0,s.useRef)(!1),m=AI((0,s.useState)(Array.isArray(n)?n:void 0),2),v=m[0],b=m[1],y=AI((0,s.useState)(typeof p<"u"?p:""),2),x=y[0],w=y[1],_=AI((0,s.useState)(!0===n),2),S=_[0],k=_[1],E=AI((0,s.useState)(void 0),2),C=E[0],j=E[1],O=AI((0,s.useState)([]),2),T=O[0],I=O[1],R=AI((0,s.useState)(!1),2),P=R[0],M=R[1],A=AI((0,s.useState)({}),2),D=A[0],F=A[1],L=AI((0,s.useState)(void 0),2),N=L[0],B=L[1],z=AI((0,s.useState)(void 0),2),$=z[0],V=z[1];o!==$&&(F({}),V(o)),n!==N&&(b(Array.isArray(n)?n:void 0),B(n)),(0,s.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]);var H=(0,s.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,s.useEffect)((function(){!0===n&&H(x,(function(e){g.current&&(b(e||[]),k(!!h.current))}))}),[]);var K=(0,s.useCallback)((function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,c);if(!n)return h.current=void 0,w(""),j(""),I([]),k(!1),void M(!1);if(o&&D[n])w(n),j(n),I(D[n]),k(!1),M(!1);else{var r=h.current={};w(n),k(!0),M(!C),H(n,(function(e){g&&r===h.current&&(h.current=void 0,k(!1),j(n),I(e||[]),M(!1),F(e?RI(RI({},D),{},TI({},n,e)):D))}))}}),[o,H,C,D,c]),U=P?[]:x&&C?T:v||[];return RI(RI({},f),{},{options:U,isLoading:S||l,onInputChange:K,filterOption:d})}(e),r=LI(n);return s.createElement(HP,bu({ref:t},r))})),qP=WP;var YP={exports:{}};!function(e){e.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:W(e)}function r(e){return s(e)?e:q(e)}function o(e){return l(e)?e:Y(e)}function i(e){return a(e)&&!c(e)?e:J(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[f])}function l(e){return!(!e||!e[p])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=i;var d="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",g="delete",m=5,v=1<<m,b=v-1,y={},x={value:!1},w={value:!1};function _(e){return e.value=!1,e}function S(e){e&&(e.value=!0)}function k(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(O)),e.size}function j(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function O(){return!0}function T(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function I(e,t){return P(e,t,0)}function R(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var M=0,A=1,D=2,F="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",N=F||L;function B(e){this.next=e}function z(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function $(){return{value:void 0,done:!0}}function V(e){return!!U(e)}function H(e){return e&&"function"==typeof e.next}function K(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(F&&e[F]||e[L]);if("function"==typeof t)return t}function G(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function q(e){return null==e?ae().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ae():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function J(e){return(null==e?ae():a(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=M,B.VALUES=A,B.ENTRIES=D,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[N]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return de(this,e,t,!0)},W.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(q,W),q.prototype.toKeyedSeq=function(){return this},t(Y,W),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(J,W),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},W.isSeq=ie,W.Keyed=q,W.Set=J,W.Indexed=Y;var X,Z,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ie(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():H(e)?new oe(e).fromEntrySeq():V(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return G(e)?new te(e):H(e)?new oe(e):V(e)?new re(e):void 0}function de(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new B((function(){var e=o[n?i-a:a];return a++>i?$():z(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function pe(e,t){return t?he(t,e,"",{"":e}):ge(e)}function he(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return he(e,n,r,t)}))):me(t)?e.call(r,n,q(t).map((function(n,r){return he(e,n,r,t)}))):t}function ge(e){return Array.isArray(e)?Y(e).map(ge).toList():me(e)?q(e).map(ge).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ve(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function be(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ve(o[1],e)&&(n||ve(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var d=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ve(t,e.get(r,y)):!ve(e.get(r,y),t))return d=!1,!1}));return d&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function xe(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(xe(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(Q)return Q;Q=this}}function _e(){throw TypeError("Abstract")}function Se(){}function ke(){}function Ee(){}W.prototype[ee]=!0,t(te,Y),te.prototype.get=function(e,t){return this.has(e)?this._array[j(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new B((function(){return o>r?$():z(e,o,n[t?r-o++:o++])}))},t(ne,q),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new B((function(){var a=r[t?o-i:i];return i++>o?$():z(e,a,n[a])}))},ne.prototype[h]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=K(this._iterable),r=0;if(H(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=K(this._iterable);if(!H(n))return new B($);var r=0;return new B((function(){var t=n.next();return t.done?t:z(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===e(r[o],o++,this))return o;for(var i;!(i=n.next()).done;){var a=i.value;if(r[o]=a,!1===e(a,o++,this))break}return o},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new B((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return z(e,o,r[o++])}))},t(ye,Y),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ve(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:new ye(this._value,R(t,n)-I(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ve(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ve(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new B((function(){return r<n.size?z(e,r++,n._value):$()}))},ye.prototype.equals=function(e){return e instanceof ye?ve(this._value,e._value):be(e)},t(we,Y),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+j(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return T(e,t,this.size)?this:(e=I(e,this.size),(t=R(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;return new B((function(){var a=o;return o+=t?-r:r,i>n?$():z(e,i++,a)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:be(this,e)},t(_e,n),t(Se,_e),t(ke,_e),t(Ee,_e),_e.Keyed=Se,_e.Indexed=ke,_e.Set=Ee;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function je(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e||"function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return je(n)}if("string"===t)return e.length>Be?Te(e):Ie(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Re(e);if("function"==typeof e.toString)return Ie(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Te(e){var t=Ve[e];return void 0===t&&(t=Ie(e),$e===ze&&($e=0,Ve={}),$e++,Ve[e]=t),t}function Ie(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return je(t)}function Re(e){var t;if(Fe&&void 0!==(t=De.get(e))||void 0!==(t=e[Ne])||!Me&&(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ne])||void 0!==(t=Ae(e))))return t;if(t=++Le,1073741824&Le&&(Le=0),Fe)De.set(e,t);else{if(void 0!==Pe&&!1===Pe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Me)Object.defineProperty(e,Ne,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ne]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ne]=t}}return t}var Pe=Object.isExtensible,Me=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Ae(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var De,Fe="function"==typeof WeakMap;Fe&&(De=new WeakMap);var Le=0,Ne="__immutablehash__";"function"==typeof Symbol&&(Ne=Symbol(Ne));var Be=16,ze=255,$e=0,Ve={};function He(e){xe(e!==1/0,"Cannot perform this action with an infinite size.")}function Ke(e){return null==e?ot():Ue(e)&&!u(e)?e:ot().withMutations((function(t){var n=r(e);He(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ue(e){return!(!e||!e[We])}t(Ke,Se),Ke.prototype.toString=function(){return this.__toString("Map {","}")},Ke.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ke.prototype.set=function(e,t){return it(this,e,t)},Ke.prototype.setIn=function(e,t){return this.updateIn(e,y,(function(){return t}))},Ke.prototype.remove=function(e){return it(this,e,y)},Ke.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return y}))},Ke.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ke.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=mt(this,_n(e),t,n);return r===y?void 0:r},Ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},Ke.prototype.merge=function(){return ft(this,void 0,arguments)},Ke.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ke.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ke.prototype.mergeDeep=function(){return ft(this,pt,arguments)},Ke.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,ht(t),n)},Ke.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ke.prototype.sort=function(e){return Vt(dn(this,e))},Ke.prototype.sortBy=function(e,t){return Vt(dn(this,t,e))},Ke.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ke.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new k)},Ke.prototype.asImmutable=function(){return this.__ensureOwner()},Ke.prototype.wasAltered=function(){return this.__altered},Ke.prototype.__iterator=function(e,t){return new et(this,e,t)},Ke.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ke.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ke.isMap=Ue;var Ge,We="@@__IMMUTABLE_MAP__@@",qe=Ke.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Je(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return z(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(qe);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return Ge||(Ge=rt(0))}function it(e,t,n){var r,o;if(e._root){var i=_(x),a=_(w);if(r=at(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function at(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===y?e:(S(s),S(a),new Qe(t,r,[o,i]))}function st(e){return e.constructor===Qe||e.constructor===Ze}function lt(e,t,n,r,o){if(e.keyHash===r)return new Ze(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&b,s=(0===n?r:r>>>n)&b;return new Je(t,1<<a|1<<s,a===s?[lt(e,t,n+m,r,o)]:(i=new Qe(t,r,o),a<s?[e,i]:[i,e]))}function ct(e,t,n,r){e||(e=new k);for(var o=new Qe(e,Oe(n),[n,r]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}function ut(e,t,n,r){for(var o=0,i=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,a[i++]=u)}return new Je(e,o,a)}function dt(e,t,n,r,o){for(var i=0,a=new Array(v),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new Xe(e,i+1,a)}function ft(e,t,n){for(var o=[],i=0;i<n.length;i++){var s=n[i],l=r(s);a(s)||(l=l.map((function(e){return pe(e)}))),o.push(l)}return gt(e,t,o)}function pt(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ve(e,t)?e:t}function ht(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ve(t,o)?t:o}}function gt(e,t,n){return n=n.filter((function(e){return 0!==e.size})),0===n.length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,y,(function(e){return e===y?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function mt(e,t,n,r){var o=e===y,i=t.next();if(i.done){var a=o?n:e,s=r(a);return s===a?e:s}xe(o||e&&e.set,"invalid keyPath");var l=i.value,c=o?y:e.get(l,y),u=mt(c,t,n,r);return u===c?e:u===y?e.remove(l):(o?ot():e).set(l,u)}function vt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function bt(e,t,n,r){var o=r?e:E(e);return o[t]=n,o}function yt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}function xt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}qe[We]=!0,qe[g]=qe.remove,qe.removeIn=qe.deleteIn,Ye.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ye.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===y,l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(S(a),(s||!d)&&S(i),!s||1!==l.length){if(!d&&!s&&l.length>=wt)return ct(e,l,r,o);var f=e&&e===this.ownerID,p=f?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new Ye(e,p)}},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return i&o?this.nodes[vt(i&o-1)].get(e+m,t,n,r):r},Je.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=1<<s,c=this.bitmap,u=0!==(c&l);if(!u&&o===y)return this;var d=vt(c&l-1),f=this.nodes,p=u?f[d]:void 0,h=at(p,e,t+m,n,r,o,i,a);if(h===p)return this;if(!u&&h&&f.length>=_t)return dt(e,f,c,s,h);if(u&&!h&&2===f.length&&st(f[1^d]))return f[1^d];if(u&&h&&1===f.length&&st(h))return h;var g=e&&e===this.ownerID,v=u?h?c:c^l:c|l,x=u?h?bt(f,d,h,g):xt(f,d,g):yt(f,d,h,g);return g?(this.bitmap=v,this.nodes=x,this):new Je(e,v,x)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&b,i=this.nodes[o];return i?i.get(e+m,t,n,r):r},Xe.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=o===y,c=this.nodes,u=c[s];if(l&&!u)return this;var d=at(u,e,t+m,n,r,o,i,a);if(d===u)return this;var f=this.count;if(u){if(!d&&--f<St)return ut(e,c,f,s)}else f++;var p=e&&e===this.ownerID,h=bt(c,s,d,p);return p?(this.count=f,this.nodes=h,this):new Xe(e,f,h)},Ze.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ze.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=o===y;if(n!==this.keyHash)return s?this:(S(a),S(i),lt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(S(a),(s||!d)&&S(i),s&&2===u)return new Qe(e,this.keyHash,l[1^c]);var f=e&&e===this.ownerID,p=f?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new Ze(e,this.keyHash,p)},Qe.prototype.get=function(e,t,n,r){return ve(n,this.entry[0])?this.entry[1]:r},Qe.prototype.update=function(e,t,n,r,o,i,a){var s=o===y,l=ve(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(S(a),s?void S(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new Qe(e,this.keyHash,[r,o]):(S(i),lt(this,e,t,Oe(r),[r,o])))},Ye.prototype.iterate=Ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Je.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Qe.prototype.iterate=function(e,t){return e(this.entry)},t(et,B),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return tt(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return tt(e,i.entry);t=this._stack=nt(i,t)}continue}t=this._stack=this._stack.__prev}return $()};var wt=v/4,_t=v/2,St=v/4;function kt(e){var t=At();if(null==e)return t;if(Et(e))return e;var n=o(e),r=n.size;return 0===r?t:(He(r),r>0&&r<v?Mt(0,r,m,null,new Ot(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Et(e){return!(!e||!e[Ct])}t(kt,ke),kt.of=function(){return this(arguments)},kt.prototype.toString=function(){return this.__toString("List [","]")},kt.prototype.get=function(e,t){if((e=j(this,e))>=0&&e<this.size){var n=Nt(this,e+=this._origin);return n&&n.array[e&b]}return t},kt.prototype.set=function(e,t){return Dt(this,e,t)},kt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},kt.prototype.insert=function(e,t){return this.splice(e,0,t)},kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):At()},kt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Bt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},kt.prototype.pop=function(){return Bt(this,0,-1)},kt.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Bt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},kt.prototype.shift=function(){return Bt(this,1)},kt.prototype.merge=function(){return zt(this,void 0,arguments)},kt.prototype.mergeWith=function(t){return zt(this,t,e.call(arguments,1))},kt.prototype.mergeDeep=function(){return zt(this,pt,arguments)},kt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return zt(this,ht(t),n)},kt.prototype.setSize=function(e){return Bt(this,0,e)},kt.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:Bt(this,I(e,n),R(t,n))},kt.prototype.__iterator=function(e,t){var n=0,r=Pt(this,t);return new B((function(){var t=r();return t===Rt?$():z(e,n++,t)}))},kt.prototype.__iterate=function(e,t){for(var n,r=0,o=Pt(this,t);(n=o())!==Rt&&!1!==e(n,r++,this););return r},kt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Mt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},kt.isList=Et;var Ct="@@__IMMUTABLE_LIST__@@",jt=kt.prototype;function Ot(e,t){this.array=e,this.ownerID=t}jt[Ct]=!0,jt[g]=jt.remove,jt.setIn=qe.setIn,jt.deleteIn=jt.removeIn=qe.removeIn,jt.update=qe.update,jt.updateIn=qe.updateIn,jt.mergeIn=qe.mergeIn,jt.mergeDeepIn=qe.mergeDeepIn,jt.withMutations=qe.withMutations,jt.asMutable=qe.asMutable,jt.asImmutable=qe.asImmutable,jt.wasAltered=qe.wasAltered,Ot.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&b;if(r>=this.array.length)return new Ot([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-m,n))===a&&i)return this}if(i&&!o)return this;var s=Lt(this,e);if(!i)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},Ot.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&b;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-m,n))===i&&o===this.array.length-1)return this}var a=Lt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var Tt,It,Rt={};function Pt(e,t){var n=e._origin,r=e._capacity,o=$t(r),i=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,a){var s=a===o?i&&i.array:e&&e.array,l=a>n?0:n-a,c=r-a;return c>v&&(c=v),function(){if(l===c)return Rt;var e=t?--c:l++;return s&&s[e]}}function l(e,o,i){var s,l=e&&e.array,c=i>n?0:n-i>>o,u=1+(r-i>>o);return u>v&&(u=v),function(){for(;;){if(s){var e=s();if(e!==Rt)return e;s=null}if(c===u)return Rt;var n=t?--u:c++;s=a(l&&l[n],o-m,i+(n<<o))}}}}function Mt(e,t,n,r,o,i,a){var s=Object.create(jt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function At(){return Tt||(Tt=Mt(0,0,m))}function Dt(e,t,n){if((t=j(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Bt(e,t).set(0,n):Bt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=_(w);return t>=$t(e._capacity)?r=Ft(r,e.__ownerID,0,t,n,i):o=Ft(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Mt(e._origin,e._capacity,e._level,o,r):e}function Ft(e,t,n,r,o,i){var a,s=r>>>n&b,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=Ft(c,t,n-m,r,o,i);return u===c?e:((a=Lt(e,t)).array[s]=u,a)}return l&&e.array[s]===o?e:(S(i),a=Lt(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Nt(e,t){if(t>=$t(e._capacity))return e._tail;if(t<1<<e._level+m){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&b],r-=m;return n}}function Bt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new k,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var l=e._level,c=e._root,u=0;a+u<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=m);u&&(a+=u,o+=u,s+=u,i+=u);for(var d=$t(i),f=$t(s);f>=1<<l+m;)c=new Ot(c&&c.array.length?[c]:[],r),l+=m;var p=e._tail,h=f<d?Nt(e,s-1):f>d?new Ot([],r):p;if(p&&f>d&&a<i&&p.array.length){for(var g=c=Lt(c,r),v=l;v>m;v-=m){var y=d>>>v&b;g=g.array[y]=Lt(g.array[y],r)}g.array[d>>>m&b]=p}if(s<i&&(h=h&&h.removeAfter(r,0,s)),a>=f)a-=f,s-=f,l=m,c=null,h=h&&h.removeBefore(r,0,a);else if(a>o||f<d){for(u=0;c;){var x=a>>>l&b;if(x!==f>>>l&b)break;x&&(u+=(1<<l)*x),l-=m,c=c.array[x]}c&&a>o&&(c=c.removeBefore(r,l,a-u)),c&&f<d&&(c=c.removeAfter(r,l,f-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=c,e._tail=h,e.__hash=void 0,e.__altered=!0,e):Mt(a,s,l,c,h)}function zt(e,t,n){for(var r=[],i=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>i&&(i=c.size),a(l)||(c=c.map((function(e){return pe(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),gt(e,t,r)}function $t(e){return e<v?0:e-1>>>m<<m}function Vt(e){return null==e?Ut():Ht(e)?e:Ut().withMutations((function(t){var n=r(e);He(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ht(e){return Ue(e)&&u(e)}function Kt(e,t,n,r){var o=Object.create(Vt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Ut(){return It||(It=Kt(ot(),At()))}function Gt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(n===y){if(!l)return e;a.size>=v&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Kt(r,o)}function Wt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function qt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Jt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=xn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===D){var r=e.__iterator(t,n);return new B((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===A?M:A,n)},t}function Zt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(D,o);return new B((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return z(r,s,t.call(n,a[1],s,e),o)}))},r}function Qt(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=xn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=yn(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return s++,o(e,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(D,i),s=0;return new B((function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return z(o,r?c:s++,u,i)}}))},o}function tn(e,t,n){var r=Ke().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(u(e)?Vt():Ke()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=bn(e);return o.map((function(t){return gn(e,i(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),T(t,n,o))return e;var i=I(t,o),a=R(n,o);if(i!=i||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=a-i;l==l&&(s=l<0?0:l);var c=yn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ie(e)&&s>=0&&(c.get=function(t,n){return(t=j(this,t))>=0&&t<s?e.get(t+i,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=a++<i))return c++,!1!==t(e,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),a=0,l=0;return new B((function(){for(;a++<i;)o.next();if(++l>s)return $();var e=o.next();return r||t===A?e:z(t,l-1,t===M?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(D,o),s=!0;return new B((function(){if(!s)return $();var e=a.next();if(e.done)return e;var o=e.value,l=o[0],c=o[1];return t.call(n,c,l,i)?r===D?e:z(r,l,c,e):(s=!1,$())}))},r}function an(e,t,n,r){var o=yn(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,l=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return l++,o(e,r?i:l-1,a)})),l},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(D,i),l=!0,c=0;return new B((function(){var e,i,u;do{if((e=s.next()).done)return r||o===A?e:z(o,c++,o===M?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],l&&(l=t.call(n,u,i,a))}while(l);return o===D?e:z(o,i,u,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||l(e)&&l(i))return i}var c=new te(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,o){return(!t||c<t)&&a(e)?l(e,c+1):!1===r(e,n?o:i++,u)&&(s=!0),!s}),o)}return l(e,0),i},r.__iteratorUncached=function(r,o){var i=e.__iterator(r,o),s=[],l=0;return new B((function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(r===D&&(c=c[1]),t&&!(s.length<t)||!a(c))return n?e:z(r,l++,c,e);s.push(i),i=c.__iterator(r,o)}else i=s.pop()}return $()}))},r}function cn(e,t,n){var r=bn(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}function un(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return e.__iterate((function(e,r){return(!i||!1!==n(t,i++,o))&&!1!==n(e,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=e.__iterator(A,r),a=0;return new B((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?z(n,a++,t):z(n,a++,o.value,o)}))},n}function dn(e,t,n){t||(t=wn);var r=s(e),o=0,i=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?q(i):l(e)?Y(i):J(i)}function fn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return pn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return pn(t,e,n)?n:e}))}function pn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hn(e,t,r){var o=yn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(A,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),K(o?e.reverse():e)})),a=0,s=!1;return new B((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?$():z(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function gn(e,t){return ie(e)?t:e.constructor(t)}function mn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){return He(e.size),C(e)}function bn(e){return s(e)?r:l(e)?o:i}function yn(e){return Object.create((s(e)?q:l(e)?Y:J).prototype)}function xn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function _n(e){var t=K(e);if(!t){if(!G(e))throw new TypeError("Expected iterable or array-like: "+e);t=K(n(e))}return t}function Sn(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(e);jn(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=Ke(i)},o=r.prototype=Object.create(kn);return o.constructor=r,r}t(Vt,Ke),Vt.of=function(){return this(arguments)},Vt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Vt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ut()},Vt.prototype.set=function(e,t){return Gt(this,e,t)},Vt.prototype.remove=function(e){return Gt(this,e,y)},Vt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Vt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Vt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Vt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Kt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Vt.isOrderedMap=Ht,Vt.prototype[h]=!0,Vt.prototype[g]=Vt.prototype.remove,t(Wt,q),Wt.prototype.get=function(e,t){return this._iter.get(e,t)},Wt.prototype.has=function(e){return this._iter.has(e)},Wt.prototype.valueSeq=function(){return this._iter.valueSeq()},Wt.prototype.reverse=function(){var e=this,t=Qt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Wt.prototype.map=function(e,t){var n=this,r=Zt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Wt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?vn(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Wt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(A,t),r=t?vn(this):0;return new B((function(){var o=n.next();return o.done?o:z(e,t?--r:r++,o.value,o)}))},Wt.prototype[h]=!0,t(qt,Y),qt.prototype.includes=function(e){return this._iter.includes(e)},qt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t),r=0;return new B((function(){var t=n.next();return t.done?t:z(e,r++,t.value,t)}))},t(Yt,J),Yt.prototype.has=function(e){return this._iter.includes(e)},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t);return new B((function(){var t=n.next();return t.done?t:z(e,t.value,t.value,t)}))},t(Jt,q),Jt.prototype.entrySeq=function(){return this._iter.toSeq()},Jt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){mn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(A,t);return new B((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){mn(r);var o=a(r);return z(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},qt.prototype.cacheResult=Wt.prototype.cacheResult=Yt.prototype.cacheResult=Jt.prototype.cacheResult=xn,t(Sn,Se),Sn.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},Sn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Sn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Sn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=En(this,ot()))},Sn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:En(this,n)},Sn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:En(this,t)},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Sn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?En(this,t,e):(this.__ownerID=e,this._map=t,this)};var kn=Sn.prototype;function En(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function jn(e,t){try{t.forEach(On.bind(void 0,e))}catch{}}function On(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){xe(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Tn(e){return null==e?Fn():In(e)&&!u(e)?e:Fn().withMutations((function(t){var n=i(e);He(n.size),n.forEach((function(e){return t.add(e)}))}))}function In(e){return!(!e||!e[Pn])}kn[g]=kn.remove,kn.deleteIn=kn.removeIn=qe.removeIn,kn.merge=qe.merge,kn.mergeWith=qe.mergeWith,kn.mergeIn=qe.mergeIn,kn.mergeDeep=qe.mergeDeep,kn.mergeDeepWith=qe.mergeDeepWith,kn.mergeDeepIn=qe.mergeDeepIn,kn.setIn=qe.setIn,kn.update=qe.update,kn.updateIn=qe.updateIn,kn.withMutations=qe.withMutations,kn.asMutable=qe.asMutable,kn.asImmutable=qe.asImmutable,t(Tn,Ee),Tn.of=function(){return this(arguments)},Tn.fromKeys=function(e){return this(r(e).keySeq())},Tn.prototype.toString=function(){return this.__toString("Set {","}")},Tn.prototype.has=function(e){return this._map.has(e)},Tn.prototype.add=function(e){return An(this,this._map.set(e,!0))},Tn.prototype.remove=function(e){return An(this,this._map.remove(e))},Tn.prototype.clear=function(){return An(this,this._map.clear())},Tn.prototype.union=function(){var t=e.call(arguments,0);return t=t.filter((function(e){return 0!==e.size})),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},Tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},Tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},Tn.prototype.merge=function(){return this.union.apply(this,arguments)},Tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Tn.prototype.sort=function(e){return Ln(dn(this,e))},Tn.prototype.sortBy=function(e,t){return Ln(dn(this,t,e))},Tn.prototype.wasAltered=function(){return this._map.wasAltered()},Tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},Tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Tn.isSet=In;var Rn,Pn="@@__IMMUTABLE_SET__@@",Mn=Tn.prototype;function An(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Dn(e,t){var n=Object.create(Mn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Fn(){return Rn||(Rn=Dn(ot()))}function Ln(e){return null==e?Vn():Nn(e)?e:Vn().withMutations((function(t){var n=i(e);He(n.size),n.forEach((function(e){return t.add(e)}))}))}function Nn(e){return In(e)&&u(e)}Mn[Pn]=!0,Mn[g]=Mn.remove,Mn.mergeDeep=Mn.merge,Mn.mergeDeepWith=Mn.mergeWith,Mn.withMutations=qe.withMutations,Mn.asMutable=qe.asMutable,Mn.asImmutable=qe.asImmutable,Mn.__empty=Fn,Mn.__make=Dn,t(Ln,Tn),Ln.of=function(){return this(arguments)},Ln.fromKeys=function(e){return this(r(e).keySeq())},Ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Ln.isOrderedSet=Nn;var Bn,zn=Ln.prototype;function $n(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Vn(){return Bn||(Bn=$n(Ut()))}function Hn(e){return null==e?Yn():Kn(e)?e:Yn().unshiftAll(e)}function Kn(e){return!(!e||!e[Gn])}zn[h]=!0,zn.__empty=Vn,zn.__make=$n,t(Hn,ke),Hn.of=function(){return this(arguments)},Hn.prototype.toString=function(){return this.__toString("Stack [","]")},Hn.prototype.get=function(e,t){var n=this._head;for(e=j(this,e);n&&e--;)n=n.next;return n?n.value:t},Hn.prototype.peek=function(){return this._head&&this._head.value},Hn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):qn(e,t)},Hn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;He(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):qn(t,n)},Hn.prototype.pop=function(){return this.slice(1)},Hn.prototype.unshift=function(){return this.push.apply(this,arguments)},Hn.prototype.unshiftAll=function(e){return this.pushAll(e)},Hn.prototype.shift=function(){return this.pop.apply(this,arguments)},Hn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Hn.prototype.slice=function(e,t){if(T(e,t,this.size))return this;var n=I(e,this.size);if(R(t,this.size)!==this.size)return ke.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):qn(r,o)},Hn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Hn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Hn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new B((function(){if(r){var t=r.value;return r=r.next,z(e,n++,t)}return $()}))},Hn.isStack=Kn;var Un,Gn="@@__IMMUTABLE_STACK__@@",Wn=Hn.prototype;function qn(e,t,n,r){var o=Object.create(Wn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Un||(Un=qn(0))}function Jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Wn[Gn]=!0,Wn.withMutations=qe.withMutations,Wn.asMutable=qe.asMutable,Wn.asImmutable=qe.asImmutable,Wn.wasAltered=qe.wasAltered,n.Iterator=B,Jn(n,{toArray:function(){He(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new qt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Wt(this,!0)},toMap:function(){return Ke(this.toKeyedSeq())},toObject:function(){He(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Vt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return Tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Hn(s(this)?this.valueSeq():this)},toList:function(){return kt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return gn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ve(t,e)}))},entries:function(){return this.__iterator(D)},every:function(e,t){He(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return gn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return He(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){He(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(M)},map:function(e,t){return gn(this,Zt(this,e,t))},reduce:function(e,t,n){var r,o;return He(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return gn(this,Qt(this,!0))},slice:function(e,t){return gn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return gn(this,dn(this,e))},values:function(){return this.__iterator(A)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return be(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(O)},flatMap:function(e,t){return gn(this,cn(this,e,t))},flatten:function(e){return gn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Jt(this)},get:function(e,t){return this.find((function(t,n){return ve(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=_n(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ir)},minBy:function(e,t){return fn(this,t?nr(t):ir,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return gn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return gn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return gn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return gn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return gn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[d]=!0,Xn[N]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch{}}(),Jn(r,{flip:function(){return gn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ve(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ve(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return gn(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return gn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Zn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function or(){return E(arguments)}function ir(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0,o=e.__iterate(n?t?function(e,t){r=31*r+lr(Oe(e),Oe(t))|0}:function(e,t){r=r+lr(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0});return sr(o,r)}function sr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=je((t=Ce(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Zn[f]=!0,Zn[N]=Xn.entries,Zn.__toJS=Xn.toObject,Zn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Jn(o,{toKeyedSeq:function(){return new Wt(this,!1)},filter:function(e,t){return gn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return gn(this,Qt(this,!1))},slice:function(e,t){return gn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=I(e,e<0?this.count():this.size);var r=this.slice(0,e);return gn(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return gn(this,ln(this,e,!1))},get:function(e,t){return(e=j(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=j(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return gn(this,un(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=hn(this.toSeq(),Y.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),gn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return gn(this,an(this,e,t,!1))},zip:function(){return gn(this,hn(this,or,[this].concat(E(arguments))))},zipWith:function(e){var t=E(arguments);return t[0]=this,gn(this,hn(this,e,t))}}),o.prototype[p]=!0,o.prototype[h]=!0,Jn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Xn.includes,Jn(q,r.prototype),Jn(Y,o.prototype),Jn(J,i.prototype),Jn(Se,r.prototype),Jn(ke,o.prototype),Jn(Ee,i.prototype);var cr={Iterable:n,Seq:W,Collection:_e,Map:Ke,OrderedMap:Vt,List:kt,Stack:Hn,Set:Tn,OrderedSet:Ln,Record:Sn,Range:we,Repeat:ye,is:ve,fromJS:pe};return cr}()}(YP);var JP=YP.exports,XP=JP.OrderedMap,ZP={createFromArray:function(e){return XP(e.map((function(e){return[e.getKey(),e]})))}},QP=ZP;var eM=JP,tM=eM.Map,nM=eM.OrderedSet,rM=eM.Record,oM=nM(),iM={style:oM,entity:null},aM=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getStyle=function(){return this.get("style")},n.getEntity=function(){return this.get("entity")},n.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return sM;var n=tM({style:oM,entity:null}).merge(e),r=lM.get(n);if(r)return r;var o=new t(n);return lM=lM.set(n,o),o},t.fromJS=function(e){var n=e.style,r=e.entity;return new t({style:Array.isArray(n)?nM(n):n,entity:Array.isArray(r)?nM(r):r})},t}(rM(iM)),sM=new aM,lM=tM([[tM(iM),sM]]);aM.EMPTY=sM;var cM=aM;var uM=function(e,t,n,r){if(e.size){var o=0;e.reduce((function(e,i,a){return t(e,i)||(n(e)&&r(o,a),o=a),i})),n(e.last())&&r(o,e.count())}};var dM=cM,fM=uM,pM=JP,hM=pM.List,gM=pM.Map,mM=pM.OrderedSet,vM=pM.Record,bM=pM.Repeat,yM=mM(),xM=vM({key:"",type:"unstyled",text:"",characterList:hM(),depth:0,data:gM()}),wM=function(e){function t(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=hM(bM(dM.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():yM},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.findStyleRanges=function(e,t){fM(this.getCharacterList(),_M,e,t)},n.findEntityRanges=function(e,t){fM(this.getCharacterList(),SM,e,t)},t}(xM);function _M(e,t){return e.getStyle()===t.getStyle()}function SM(e,t){return e.getEntity()===t.getEntity()}var kM=wM;var EM=cM,CM=uM,jM=JP,OM=jM.List,TM=jM.Map,IM=jM.OrderedSet,RM=jM.Record,PM=jM.Repeat,MM=IM(),AM={parent:null,characterList:OM(),data:TM(),depth:0,key:"",text:"",type:"unstyled",children:OM(),prevSibling:null,nextSibling:null},DM=function(e,t){return e.getStyle()===t.getStyle()},FM=function(e,t){return e.getEntity()===t.getEntity()},LM=function(e){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AM;return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=OM(PM(EM.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():MM},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){CM(this.getCharacterList(),DM,e,t)},n.findEntityRanges=function(e,t){CM(this.getCharacterList(),FM,e,t)},t}(RM(AM)),NM=LM,BM=cM,zM=JP.Map,$M={add:function(e,t,n){return VM(e,t,n,!0)},remove:function(e,t,n){return VM(e,t,n,!1)}};function VM(e,t,n,r){var o=e.getBlockMap(),i=t.getStartKey(),a=t.getStartOffset(),s=t.getEndKey(),l=t.getEndOffset(),c=o.skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===s})).concat(zM([[s,o.get(s)]])).map((function(e,t){var o,c;i===s?(o=a,c=l):(o=t===i?a:0,c=t===s?l:e.getLength());for(var u,d=e.getCharacterList();o<c;)u=d.get(o),d=d.set(o,r?BM.applyStyle(u,n):BM.removeStyle(u,n)),o++;return e.set("characterList",d)}));return e.merge({blockMap:o.merge(c),selectionBefore:t,selectionAfter:t})}var HM=$M,KM=cM;var UM=function(e,t,n,r){for(var o=t,i=e.getCharacterList();o<n;)i=i.set(o,KM.applyEntity(i.get(o),r)),o++;return e.set("characterList",i)},GM=UM,WM=JP;var qM=function(e,t,n){var r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).toOrderedMap().merge(WM.OrderedMap([[a,r.get(a)]])).map((function(e,t){var r=t===o?i:0,l=t===a?s:e.getLength();return GM(e,r,l,n)}));return e.merge({blockMap:r.merge(l),selectionBefore:t,selectionAfter:t})},YM={getRemovalRange:function(e,t,n,r,o){var i=n.split(" ");i=i.map((function(e,t){if("forward"===o){if(t>0)return" "+e}else if(t<i.length-1)return e+" ";return e}));for(var a,s=r,l=null,c=null,u=0;u<i.length;u++){if(e<(a=s+i[u].length)&&s<t)null!==l||(l=s),c=a;else if(null!==l)break;s=a}var d=r+n.length,f=l===r,p=c===d;return(!f&&p||f&&!p)&&("forward"===o?c!==d&&c++:l!==r&&l--),{start:l,end:c}}},JM=function(e){};var XM=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(JM(t),!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return String(r[a++])})))).name="Invariant Violation"}throw i.framesToPop=1,i}},ZM=XM;var QM=function(e,t){var n=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){n.push({start:e,end:t})})),n.length||ZM(!1),n},eA=YM,tA=QM,nA=XM;function rA(e,t,n,r,o,i,a){var s=n.getStartOffset(),l=n.getEndOffset(),c=e.__get(o).getMutability(),u=a?s:l;if("MUTABLE"===c)return n;var d=tA(t,o).filter((function(e){return u<=e.end&&u>=e.start}));1!=d.length&&nA(!1);var f=d[0];if("IMMUTABLE"===c)return n.merge({anchorOffset:f.start,focusOffset:f.end,isBackward:!1});i||(a?l=f.end:s=f.start);var p=eA.getRemovalRange(s,l,t.getText().slice(f.start,f.end),f.start,r);return n.merge({anchorOffset:p.start,focusOffset:p.end,isBackward:!1})}var oA=function(e,t,n,r,o){var i=r.getStartOffset(),a=r.getEndOffset(),s=t.getEntityAt(i),l=n.getEntityAt(a-1);if(!s&&!l)return r;var c=r;if(s&&s===l)c=rA(e,t,c,o,s,!0,!0);else if(s&&l){var u=rA(e,t,c,o,s,!1,!0),d=rA(e,n,c,o,l,!1,!1);c=c.merge({anchorOffset:u.getAnchorOffset(),focusOffset:d.getFocusOffset(),isBackward:!1})}else if(s){var f=rA(e,t,c,o,s,!1,!0);c=c.merge({anchorOffset:f.getStartOffset(),isBackward:!1})}else if(l){var p=rA(e,n,c,o,l,!1,!1);c=c.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return c},iA={},aA=Math.pow(2,24);var sA=function(){for(var e;void 0===e||iA.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*aA).toString(32);return iA[e]=!0,e},lA=NM,cA=sA,uA=JP.OrderedMap,dA=function(e){return e.first()instanceof lA?function(e){var t,n={};return uA(e.withMutations((function(e){e.forEach((function(r,o){var i=r.getKey(),a=r.getNextSiblingKey(),s=r.getPrevSiblingKey(),l=r.getChildKeys(),c=r.getParentKey(),u=cA();if(n[i]=u,a&&(e.get(a)?e.setIn([a,"prevSibling"],u):e.setIn([i,"nextSibling"],null)),s&&(e.get(s)?e.setIn([s,"nextSibling"],u):e.setIn([i,"prevSibling"],null)),c&&e.get(c)){var d=e.get(c).getChildKeys();e.setIn([c,"children"],d.set(d.indexOf(r.getKey()),u))}else e.setIn([i,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],u),e.setIn([i,"prevSibling"],n[t.getKey()])),t=e.get(i);l.forEach((function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([i,"children"],r.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[n[e.getKey()],e.set("key",n[e.getKey()])]})))}(e):function(e){return uA(e.toArray().map((function(e){var t=cA();return[t,e.set("key",t)]})))}(e)},fA=cM,pA=uM,hA=XM;function gA(e,t,n){var r=t.getCharacterList(),o=n>0?r.get(n-1):void 0,i=n<r.count()?r.get(n):void 0,a=o?o.getEntity():void 0,s=i?i.getEntity():void 0;if(s&&s===a&&"MUTABLE"!==e.__get(s).getMutability()){for(var l,c=function(e,t,n){var r;return pA(e,(function(e,t){return e.getEntity()===t.getEntity()}),(function(e){return e.getEntity()===t}),(function(e,t){e<=n&&t>=n&&(r={start:e,end:t})})),"object"!=typeof r&&hA(!1),r}(r,s,n),u=c.start,d=c.end;u<d;)l=r.get(u),r=r.set(u,fA.applyEntity(l,null)),u++;return t.set("characterList",r)}return t}var mA=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},i=t.getStartKey(),a=t.getStartOffset(),s=n.get(i),l=gA(r,s,a);l!==s&&(o[i]=l);var c=t.getEndKey(),u=t.getEndOffset(),d=n.get(c);i===c&&(d=l);var f=gA(r,d,u);return f!==d&&(o[c]=f),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)},vA=dA,bA=mA,yA=function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=t.getEndKey(),i=t.getEndOffset(),a=bA(e,t).getBlockMap(),s=a.keySeq(),l=s.indexOf(n),c=s.indexOf(o)+1;return vA(a.slice(l,c).map((function(e,t){var a=e.getText(),s=e.getCharacterList();return n===o?e.merge({text:a.slice(r,i),characterList:s.slice(r,i)}):t===n?e.merge({text:a.slice(r),characterList:s.slice(r)}):t===o?e.merge({text:a.slice(0,i),characterList:s.slice(0,i)}):e})))};var xA=function(e,t,n){var r=e;if(n===r.count())t.forEach((function(e){r=r.push(e)}));else if(0===n)t.reverse().forEach((function(e){r=r.unshift(e)}));else{var o=r.slice(0,n),i=r.slice(n);r=o.concat(t,i).toList()}return r},wA=QP,_A=NM,SA=xA,kA=XM,EA=dA,CA=JP.List,jA=function(e,t,n,r,o,i){var a=n.first()instanceof _A,s=[],l=r.size,c=n.get(o),u=r.first(),d=r.last(),f=d.getLength(),p=d.getKey(),h=a&&(!c.getChildKeys().isEmpty()||!u.getChildKeys().isEmpty());n.forEach((function(e,t){t===o?(h?s.push(e):s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.slice(0,t),a=o.slice(0,t),s=n.first();return e.merge({text:i+s.getText(),characterList:a.concat(s.getCharacterList()),type:i?e.getType():s.getType(),data:s.getData()})}(e,i,r)),r.slice(h?0:1,l-1).forEach((function(e){return s.push(e)})),s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.length,a=r.slice(t,i),s=o.slice(t,i),l=n.last();return l.merge({text:l.getText()+a,characterList:l.getCharacterList().concat(s),data:l.getData()})}(e,i,r))):s.push(e)}));var g=wA.createFromArray(s);return a&&(g=function(e,t,n,r){return e.withMutations((function(t){var o=n.getKey(),i=r.getKey(),a=n.getNextSiblingKey(),s=n.getParentKey(),l=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(r,e),c=l[l.length-1];if(t.get(i)?(t.setIn([o,"nextSibling"],i),t.setIn([i,"prevSibling"],o)):(t.setIn([o,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],o)),t.setIn([c,"nextSibling"],a),a&&t.setIn([a,"prevSibling"],c),l.forEach((function(e){return t.setIn([e,"parent"],s)})),s){var u=e.get(s).getChildKeys(),d=u.indexOf(o)+1,f=u.toArray();f.splice.apply(f,[d,0].concat(l)),t.setIn([s,"children"],CA(f))}}))}(g,0,c,u)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:p,anchorOffset:f,focusKey:p,focusOffset:f,isBackward:!1})})},OA=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||kA(!1);var o=e.getBlockMap(),i=EA(n),a=t.getStartKey(),s=t.getStartOffset(),l=o.get(a);return l instanceof _A&&(l.getChildKeys().isEmpty()||kA(!1)),1===i.size?function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),l=s.getText(),c=s.getCharacterList(),u=o,d=i+r.getText().length,f=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":f=r.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":f=r.getData()}var p=s.getType();l&&"unstyled"===p&&(p=r.getType());var h=s.merge({text:l.slice(0,i)+r.getText()+l.slice(i),characterList:SA(c,r.getCharacterList(),i),type:p,data:f});return e.merge({blockMap:n.set(o,h),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})}(e,t,o,i.first(),a,s,r):jA(e,t,o,i,a,s)},TA=xA,IA=XM,RA=JP.Repeat;var PA=function(e,t,n,r){t.isCollapsed()||IA(!1);var o=null;if(null!=n&&(o=n.length),null==o||0===o)return e;var i=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),l=i.get(a),c=l.getText(),u=l.merge({text:c.slice(0,s)+n+c.slice(s,l.getLength()),characterList:TA(l.getCharacterList(),RA(r,o).toList(),s)}),d=s+o;return e.merge({blockMap:i.set(a,u),selectionAfter:t.merge({anchorOffset:d,focusOffset:d})})},MA=JP.Map;var AA=function(e,t,n){var r=t.getStartKey(),o=t.getEndKey(),i=e.getBlockMap(),a=i.toSeq().skipUntil((function(e,t){return t===r})).takeUntil((function(e,t){return t===o})).concat(MA([[o,i.get(o)]])).map(n);return e.merge({blockMap:i.merge(a),selectionBefore:t,selectionAfter:t})},DA=NM,FA=function(e,t){if(!(e instanceof DA))return null;var n=e.getNextSiblingKey();if(n)return n;var r=e.getParentKey();if(!r)return null;for(var o=t.get(r);o&&!o.getNextSiblingKey();){var i=o.getParentKey();o=i?t.get(i):null}return o?o.getNextSiblingKey():null},LA=NM,NA=FA,BA=JP;BA.List;var zA=BA.Map,$A=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},VA=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},HA=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},KA=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},UA=function(e,t,n,r){return e.withMutations((function(o){if($A(t.getKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})})),$A(n.getKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})})),VA(t.getKey(),r).forEach((function(e){return $A(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),$A(t.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),$A(t.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:HA(e,o,r)})})),$A(n.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:KA(e,o,r)})})),$A(n.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),VA(n.getKey(),r).forEach((function(e){$A(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=NA(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?NA(o,t):null}return n}(n,r).forEach((function(e){return $A(e,o,(function(e){return e.merge({nextSibling:HA(e,o,r),prevSibling:KA(e,o,r)})}))})),null==e.get(t.getKey())&&null!=e.get(n.getKey())&&n.getParentKey()===t.getKey()&&null==n.getPrevSiblingKey()){var i=t.getPrevSiblingKey();$A(n.getKey(),o,(function(e){return e.merge({prevSibling:i})})),$A(i,o,(function(e){return e.merge({nextSibling:n.getKey()})}));var a=i?e.get(i):null,s=a?a.getParentKey():null;if(t.getChildKeys().forEach((function(e){$A(e,o,(function(e){return e.merge({parent:s})}))})),null!=s){var l=e.get(s);$A(s,o,(function(e){return e.merge({children:l.getChildKeys().concat(t.getChildKeys())})}))}$A(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),o,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))},GA=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e},WA=function(e,t){if(t.isCollapsed())return e;var n,r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.get(o),c=r.get(a),u=l instanceof LA,d=[];if(u){var f=c.getChildKeys(),p=VA(a,r);c.getNextSiblingKey()&&(d=d.concat(p)),f.isEmpty()||(d=d.concat(p.concat([a]))),d=d.concat(VA(NA(c,r),r))}n=l===c?GA(l.getCharacterList(),i,s):l.getCharacterList().slice(0,i).concat(c.getCharacterList().slice(s));var h=l.merge({text:l.getText().slice(0,i)+c.getText().slice(s),characterList:n}),g=u&&0===i&&0===s&&c.getParentKey()===o&&null==c.getPrevSiblingKey()?zA([[o,null]]):r.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).filter((function(e,t){return-1===d.indexOf(t)})).concat(zA([[a,null]])).map((function(e,t){return t===o?h:null})),m=r.merge(g).filter((function(e){return!!e}));return u&&l!==c&&(m=UA(m,l,c,r)),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:o,anchorOffset:i,focusKey:o,focusOffset:i,isBackward:!1})})},qA=NM,YA=sA,JA=JP,XA=XM,ZA=AA,QA=JA.List,eD=JA.Map,tD=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},nD=function(e,t){t.isCollapsed()||XA(!1);var n=t.getAnchorKey(),r=e.getBlockMap(),o=r.get(n),i=o.getText();if(!i){var a=o.getType();if("unordered-list-item"===a||"ordered-list-item"===a)return ZA(e,t,(function(e){return e.merge({type:"unstyled",depth:0})}))}var s=t.getAnchorOffset(),l=o.getCharacterList(),c=YA(),u=o instanceof qA,d=o.merge({text:i.slice(0,s),characterList:l.slice(0,s)}),f=d.merge({key:c,text:i.slice(s),characterList:l.slice(s),data:eD()}),p=r.toSeq().takeUntil((function(e){return e===o})),h=r.toSeq().skipUntil((function(e){return e===o})).rest(),g=p.concat([[n,d],[c,f]],h).toOrderedMap();return u&&(o.getChildKeys().isEmpty()||XA(!1),g=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),o=n.getKey();tD(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,i=t.toArray();return i.splice(n,0,o),e.merge({children:QA(i)})})),tD(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:o})})),tD(r,e,(function(e){return e.merge({nextSibling:o})})),tD(o,e,(function(e){return e.merge({prevSibling:r})}))}))}(g,d,f)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:c,anchorOffset:0,focusKey:c,focusOffset:0,isBackward:!1})})},rD=cM,oD=HM,iD=qM,aD=oA,sD=yA,lD=OA,cD=PA,uD=XM,dD=AA,fD=mA,pD=WA,hD=nD,gD=JP.OrderedSet,mD={replaceText:function(e,t,n,r,o){var i=fD(e,t),a=pD(i,t),s=rD.create({style:r||gD(),entity:o||null});return cD(a,a.getSelectionAfter(),n,s)},insertText:function(e,t,n,r,o){return t.isCollapsed()||uD(!1),mD.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=sD(e,t),o=mD.removeRange(e,t,"backward");return mD.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=fD(e,t),i=pD(o,t);return lD(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,o,i,a;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),a=e.getBlockForKey(o);var s=t.getStartOffset(),l=t.getEndOffset(),c=i.getEntityAt(s),u=a.getEntityAt(l-1);if(r===o&&c&&c===u){var d=aD(e.getEntityMap(),i,a,t,n);return pD(e,d)}var f=fD(e,t);return pD(f,t)},splitBlock:function(e,t){var n=fD(e,t),r=pD(n,t);return hD(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return oD.add(e,t,n)},removeInlineStyle:function(e,t,n){return oD.remove(e,t,n)},setBlockType:function(e,t,n){return dD(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return dD(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return dD(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=fD(e,t);return iD(r,t,n)}},vD=mD;var bD=function(e){return Object.keys(e).map((function(t){return e[t]}))};function yD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xD=uM,wD=bD,_D=JP,SD=_D.List,kD=_D.Repeat,ED=_D.Record,CD=function(){return!0},jD=ED({start:null,end:null}),OD=ED({start:null,end:null,decoratorKey:null,leaves:null}),TD={generate:function(e,t,n){var r=t.getLength();if(!r)return SD.of(new OD({start:0,end:0,decoratorKey:null,leaves:SD.of(new jD({start:0,end:0}))}));var o=[],i=n?n.getDecorations(t,e):SD(kD(null,r)),a=t.getCharacterList();return xD(i,RD,CD,(function(e,t){o.push(new OD({start:e,end:t,decoratorKey:i.get(e),leaves:ID(a.slice(e,t).toList(),e)}))})),SD(o)},fromJS:function(e){var t=e.leaves,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,["leaves"]);return new OD(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){yD(e,t,n[t])}))}return e}({},n,{leaves:null!=t?SD(Array.isArray(t)?t:wD(t)).map((function(e){return jD(e)})):null}))}};function ID(e,t){var n=[],r=e.map((function(e){return e.getStyle()})).toList();return xD(r,RD,CD,(function(e,r){n.push(new jD({start:e+t,end:r+t}))})),SD(n)}function RD(e,t){return e===t}var PD=TD;var MD=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getType=function(){return this.get("type")},n.getMutability=function(){return this.get("mutability")},n.getData=function(){return this.get("data")},t}((0,JP.Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object})),AD=MD;var DD=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LD=AD,ND=XM,BD=DD,zD=(0,JP.Map)(),$D=BD();function VD(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var HD={getLastCreatedEntityKey:function(){return VD("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),HD.__getLastCreatedEntityKey()},create:function(e,t,n){return VD("DraftEntity.create","contentState.createEntity"),HD.__create(e,t,n)},add:function(e){return VD("DraftEntity.add","contentState.addEntity"),HD.__add(e)},get:function(e){return VD("DraftEntity.get","contentState.getEntity"),HD.__get(e)},__getAll:function(){return zD},__loadWithEntities:function(e){zD=e,$D=BD()},mergeData:function(e,t){return VD("DraftEntity.mergeData","contentState.mergeEntityData"),HD.__mergeData(e,t)},replaceData:function(e,t){return VD("DraftEntity.replaceData","contentState.replaceEntityData"),HD.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return $D},__create:function(e,t,n){return HD.__add(new LD({type:e,mutability:t,data:n||{}}))},__add:function(e){return $D=BD(),zD=zD.set($D,e),$D},__get:function(e){var t=zD.get(e);return t||ND(!1),t},__mergeData:function(e,t){var n=HD.__get(e),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){FD(e,t,n[t])}))}return e}({},n.getData(),t),o=n.set("data",r);return zD=zD.set(e,o),o},__replaceData:function(e,t){var n=HD.__get(e).set("data",t);return zD=zD.set(e,n),n}},KD=HD;var UD=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},n.getAnchorKey=function(){return this.get("anchorKey")},n.getAnchorOffset=function(){return this.get("anchorOffset")},n.getFocusKey=function(){return this.get("focusKey")},n.getFocusOffset=function(){return this.get("focusOffset")},n.getIsBackward=function(){return this.get("isBackward")},n.getHasFocus=function(){return this.get("hasFocus")},n.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var i=this.getStartOffset(),a=this.getEndOffset();return t<=i&&i<=n||t<=a&&a<=n}if(e!==r&&e!==o)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},n.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},n.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},n.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},n.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},n.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,JP.Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1})),GD=UD,WD=function(e){return!!(typeof window<"u"&&window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]},qD=new RegExp("\r","g");var YD=function(e){return e.replace(qD,"")};function JD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XD(e,t,n[t])}))}return e}function XD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZD=QP,QD=cM,eF=kM,tF=NM,nF=KD,rF=GD,oF=sA,iF=bD,aF=WD,sF=JP,lF=YD,cF=sF.List,uF=sF.Record,dF=sF.Repeat,fF=sF.Map,pF=sF.OrderedMap,hF=uF({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),gF=aF("draft_tree_data_support")?tF:eF,mF=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getEntityMap=function(){return nF},n.getBlockMap=function(){return this.get("blockMap")},n.getSelectionBefore=function(){return this.get("selectionBefore")},n.getSelectionAfter=function(){return this.get("selectionAfter")},n.getBlockForKey=function(e){return this.getBlockMap().get(e)},n.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlocksAsArray=function(){return this.getBlockMap().toArray()},n.getFirstBlock=function(){return this.getBlockMap().first()},n.getLastBlock=function(){return this.getBlockMap().last()},n.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},n.getLastCreatedEntityKey=function(){return nF.__getLastCreatedEntityKey()},n.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},n.createEntity=function(e,t,n){return nF.__create(e,t,n),this},n.mergeEntityData=function(e,t){return nF.__mergeData(e,t),this},n.replaceEntityData=function(e,t){return nF.__replaceData(e,t),this},n.addEntity=function(e){return nF.__add(e),this},n.getEntity=function(e){return nF.__get(e)},n.getAllEntities=function(){return nF.__getAll()},n.loadWithEntities=function(e){return nF.__loadWithEntities(e)},t.createFromBlockArray=function(e,n){var r=Array.isArray(e)?e:e.contentBlocks,o=ZD.createFromArray(r),i=o.isEmpty()?new rF:rF.createEmpty(o.first().getKey());return new t({blockMap:o,entityMap:n||nF,selectionBefore:i,selectionAfter:i})},t.createFromText=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(n).map((function(e){return e=lF(e),new gF({key:oF(),text:e,type:"unstyled",characterList:cF(dF(QD.EMPTY,e.length))})}));return t.createFromBlockArray(r)},t.fromJS=function(e){return new t(JD({},e,{blockMap:pF(e.blockMap).map(t.createContentBlockFromJS),selectionBefore:new rF(e.selectionBefore),selectionAfter:new rF(e.selectionAfter)}))},t.createContentBlockFromJS=function(e){var t=e.characterList;return new gF(JD({},e,{data:fF(e.data),characterList:null!=t?cF((Array.isArray(t)?t:iF(t)).map((function(e){return QD.fromJS(e)}))):void 0}))},t}(hF),vF=mF,bF=XM,yF="LTR",xF=null;function wF(e){return e===yF||"RTL"===e}function _F(e){return wF(e)||bF(!1),e===yF?"ltr":"rtl"}function SF(e){xF=e}var kF={NEUTRAL:"NEUTRAL",LTR:yF,RTL:"RTL",isStrong:wF,getHTMLDir:_F,getHTMLDirIfDifferent:function(e,t){return wF(e)||bF(!1),wF(t)||bF(!1),e===t?null:_F(e)},setGlobalDir:SF,initGlobalDir:function(){SF(yF)},getGlobalDir:function(){return xF||this.initGlobalDir(),xF||bF(!1),xF}},EF=kF,CF=EF,jF=XM,OF="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",TF="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",IF=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+OF+TF+"]"),RF=new RegExp("["+OF+TF+"]");function PF(e){var t=IF.exec(e);return null==t?null:t[0]}function MF(e){var t=PF(e);return null==t?CF.NEUTRAL:RF.exec(t)?CF.RTL:CF.LTR}function AF(e,t){if(t=t||CF.NEUTRAL,!e.length)return t;var n=MF(e);return n===CF.NEUTRAL?t:n}function DF(e,t){return t||(t=CF.getGlobalDir()),CF.isStrong(t)||jF(!1),AF(e,t)}var FF={firstStrongChar:PF,firstStrongCharDir:MF,resolveBlockDir:AF,getDirection:DF,isDirectionLTR:function(e,t){return DF(e,t)===CF.LTR},isDirectionRTL:function(e,t){return DF(e,t)===CF.RTL}},LF=FF;function NF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var BF,zF=LF,$F=EF,VF=XM,HF=function(){function e(e){NF(this,"_defaultDir",void 0),NF(this,"_lastDir",void 0),e?$F.isStrong(e)||VF(!1):e=$F.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=zF.getDirection(e,this._lastDir),this._lastDir},e}(),KF=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")},UF=HF,GF=JP,WF=KF,qF=GF.OrderedMap,YF={getDirectionMap:function(e,t){BF?BF.reset():BF=new UF;var n=e.getBlockMap(),r=n.valueSeq().map((function(e){return WF(BF).getDirection(e.getText())})),o=qF(n.keySeq().zip(r));return null!=t&&GF.is(t,o)?t:o}};function JF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XF(e,t,n[t])}))}return e}function XF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZF=PD,QF=vF,eL=YF,tL=GD,nL=JP,rL=nL.OrderedSet,oL=nL.Record,iL=nL.Stack,aL=nL.OrderedMap,sL=nL.List,lL=oL({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:iL(),selection:null,treeMap:null,undoStack:iL()}),cL=function(){t.createEmpty=function(e){return this.createWithText("",e)},t.createWithText=function(e,n){return t.createWithContent(QF.createFromText(e),n)},t.createWithContent=function(e,n){if(0===e.getBlockMap().count())return t.createEmpty(n);var r=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:iL(),redoStack:iL(),decorator:n||null,selection:tL.createEmpty(r)})},t.create=function(e){var n=e.currentContent,r=JF({},e,{treeMap:dL(n,e.decorator),directionMap:eL.getDirectionMap(n)});return new t(new lL(r))},t.fromJS=function(e){return new t(new lL(JF({},e,{directionMap:null!=e.directionMap?aL(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?rL(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?QF.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?iL(e.redoStack.map((function(e){return QF.fromJS(e)}))):e.redoStack,selection:null!=e.selection?new tL(e.selection):e.selection,treeMap:null!=e.treeMap?aL(e.treeMap).map((function(e){return sL(e).map((function(e){return ZF.fromJS(e)}))})):e.treeMap,undoStack:null!=e.undoStack?iL(e.undoStack.map((function(e){return QF.fromJS(e)}))):e.undoStack,currentContent:QF.fromJS(e.currentContent)})))},t.set=function(e,n){var r=e.getImmutable().withMutations((function(t){var r=t.get("decorator"),o=r;null===n.decorator?o=null:n.decorator&&(o=n.decorator);var i=n.currentContent||e.getCurrentContent();if(o!==r){var a,s=t.get("treeMap");return a=o&&r?function(e,t,n,r,o){return n.merge(t.toSeq().filter((function(t){return r.getDecorations(t,e)!==o.getDecorations(t,e)})).map((function(t){return ZF.generate(e,t,r)})))}(i,i.getBlockMap(),s,o,r):dL(i,o),void t.merge({decorator:o,treeMap:a,nativelyRenderedContent:null})}i!==e.getCurrentContent()&&t.set("treeMap",function(e,t,n,r){var o=e.getCurrentContent().set("entityMap",n),i=o.getBlockMap(),a=e.getImmutable().get("treeMap");return a.merge(t.toSeq().filter((function(e,t){return e!==i.get(t)})).map((function(e){return ZF.generate(o,e,r)})))}(e,i.getBlockMap(),i.getEntityMap(),o)),t.merge(n)}));return new t(r)};var e=t.prototype;function t(e){XF(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,n){return t.set(e,{inlineStyleOverride:n})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r>0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):fL(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r<o.getLength()?o.getInlineStyleAt(r):r>0?o.getInlineStyleAt(r-1):fL(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return uL(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),uL(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return t.acceptSelection(e,new tL({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var i=eL.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var a=e.getSelection(),s=e.getCurrentContent(),l=e.getUndoStack(),c=n;a!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,r)?(l=l.push(s),c=c.set("selectionBefore",a)):("insert-characters"===r||"backspace-character"===r||"delete-character"===r)&&(c=c.set("selectionBefore",s.getSelectionBefore()));var u=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(u=null);var d={currentContent:c,directionMap:i,undoStack:l,redoStack:iL(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:u};return t.set(e,d)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=eL.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=eL.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:e.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function uL(e,t,n){return cL.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function dL(e,t){return e.getBlockMap().map((function(n){return ZF.generate(e,n,t)})).toOrderedMap()}function fL(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):rL()}var pL=cL,hL=JP;hL.OrderedMap,hL.List;var gL=JP;WD("draft_tree_data_support"),gL.List,gL.Repeat;JP.List;function mL(e){return e.replace(/\//g,"-")}var vL=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(mL).join(" "):Array.prototype.map.call(arguments,mL).join(" ")},bL=s,yL=vL,xL=(0,JP.Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:bL.createElement("ul",{className:yL("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:bL.createElement("ol",{className:yL("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:bL.createElement("pre",{className:yL("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}}),wL={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}},_L={exports:{}};!function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",u="name",d="type",f="vendor",p="version",h="architecture",g="console",m="mobile",v="tablet",b="smarttv",y="wearable",x="embedded",w="Amazon",_="Apple",S="ASUS",k="BlackBerry",E="Browser",C="Chrome",j="Firefox",O="Google",T="Huawei",I="LG",R="Microsoft",P="Motorola",M="Opera",A="Samsung",D="Sharp",F="Sony",L="Xiaomi",N="Zebra",B="Facebook",z="Chromium OS",$="Mac OS",V=" Browser",H=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},K=function(e,t){return typeof e===s&&-1!==U(t).indexOf(U(e))},U=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},W=function(e,t){for(var n,i,s,l,c,u,d=0;d<t.length&&!c;){var f=t[d],p=t[d+1];for(n=i=0;n<f.length&&!c&&f[n];)if(c=f[n++].exec(e))for(s=0;s<p.length;s++)u=c[++i],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):r:this[l[0]]=u?l[1].call(this,u,l[2]):r:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):r):this[l]=u||r;d+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(K(t[n][o],e))return"?"===n?r:n}else if(K(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,p],[/opios[\/ ]+([\w\.]+)/i],[p,[u,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[u,M+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[u,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[u,"UC"+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[u,"Smart Lenovo "+E]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[u,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[u,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[u,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[u,"MIUI"+V]],[/fxios\/([\w\.-]+)/i],[p,[u,j]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+V],p],[/samsungbrowser\/([\w\.]+)/i],[p,[u,A+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,B],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[u,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,C+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[u,"Android "+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[p,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[u,j+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,U]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[f,A],[d,v]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[f,A],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[f,_],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,_],[d,v]],[/(macintosh);/i],[c,[f,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[f,D],[d,m]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[f,"Honor"],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[f,T],[d,v]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[f,T],[d,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[f,L],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[f,L],[d,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[f,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[f,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[f,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[f,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[f,P],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[f,P],[d,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[f,I],[d,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[f,I],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[f,"Lenovo"],[d,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[f,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[f,O],[d,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[f,O],[d,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[f,F],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[f,F],[d,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[f,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[f,w],[d,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[f,w],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,f,[d,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[f,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[f,S],[d,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[f,S],[d,m]],[/(nexus 9)/i],[c,[f,"HTC"],[d,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[c,/_/g," "],[d,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[f,"TCL"],[d,v]],[/(itel) ((\w+))/i],[[f,U],c,[d,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[f,"Acer"],[d,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[f,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[f,"Ulefone"],[d,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[f,"Energizer"],[d,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[f,"Cat"],[d,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[f,"Smartfren"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[f,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,c,[d,m]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,c,[d,v]],[/(surface duo)/i],[c,[f,R],[d,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[f,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[f,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[f,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[f,"RCA"],[d,v]],[/\b(venue[\d ]{2,7}) b/i],[c,[f,"Dell"],[d,v]],[/\b(q(?:mv|ta)\w+) b/i],[c,[f,"Verizon"],[d,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[f,"Barnes & Noble"],[d,v]],[/\b(tm\d{3}\w+) b/i],[c,[f,"NuVision"],[d,v]],[/\b(k88) b/i],[c,[f,"ZTE"],[d,v]],[/\b(nx\d{3}j) b/i],[c,[f,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[f,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[f,"Swiss"],[d,v]],[/\b((zeki)?tb.*\b) b/i],[c,[f,"Zeki"],[d,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],c,[d,v]],[/\b(ns-?\w{0,9}) b/i],[c,[f,"Insignia"],[d,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[f,"NextBook"],[d,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[f,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[f,"Envizen"],[d,v]],[/\b(trio[-\w\. ]+) b/i],[c,[f,"MachSpeed"],[d,v]],[/\btu_(1491) b/i],[c,[f,"Rotor"],[d,v]],[/(shield[\w ]+) b/i],[c,[f,"Nvidia"],[d,v]],[/(sprint) (\w+)/i],[f,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,R],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,N],[d,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,N],[d,m]],[/smart-tv.+(samsung)/i],[f,[d,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,A],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,I],[d,b]],[/(apple) ?tv/i],[f,[c,_+" TV"],[d,b]],[/crkey/i],[[c,C+"cast"],[f,O],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[c,[f,w],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[f,D],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[f,F],[d,b]],[/(mitv-\w{5}) bui/i],[c,[f,L],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[f,c,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,G],[c,G],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,c,[d,g]],[/droid.+; (shield) bui/i],[c,[f,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[f,F],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[f,R],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[f,A],[d,y]],[/((pebble))app/i],[f,c,[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[f,_],[d,y]],[/droid.+; (glass) \d/i],[c,[f,O],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[f,N],[d,y]],[/droid.+; (glass) \d/i],[c,[f,O],[d,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,c,[d,y]],[/; (quest( \d| pro)?)/i],[c,[f,B],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,x]],[/(aeobc)\b/i],[c,[f,w],[d,x]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[p,q,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,q,Y],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,$],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,p],[/\(bb(10);/i],[p,[u,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[u,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[u,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,z],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,p],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,p]]},X=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof X))return new X(e,t).getResult();var g=typeof n!==i&&n.navigator?n.navigator:r,b=e||(g&&g.userAgent?g.userAgent:""),y=g&&g.userAgentData?g.userAgentData:r,x=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(J,t):J,w=g&&g.userAgent==b;return this.getBrowser=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[p]),w&&g&&g.brave&&typeof g.brave.isBrave==o&&(e[u]="Brave"),e},this.getCPU=function(){var e={};return e[h]=r,W.call(e,b,x.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[c]=r,e[d]=r,W.call(e,b,x.device),w&&!e[d]&&y&&y.mobile&&(e[d]=m),w&&"Macintosh"==e[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[c]="iPad",e[d]=v),e},this.getEngine=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.engine),e},this.getOS=function(){var e={};return e[u]=r,e[p]=r,W.call(e,b,x.os),w&&!e[u]&&y&&y.platform&&"Unknown"!=y.platform&&(e[u]=y.platform.replace(/chrome os/i,z).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(b),this};X.VERSION="0.7.40",X.BROWSER=H([u,p,l]),X.CPU=H([h]),X.DEVICE=H([c,f,d,g,m,b,v,y,x]),X.ENGINE=X.OS=H([u,p]),e.exports&&(t=e.exports=X),t.UAParser=X;var Z=typeof n!==i&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var Q=new X;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:kc)}(_L,_L.exports);var SL="Unknown",kL={"Mac OS":"Mac OS X"};var EL=(new(0,_L.exports)).getResult(),CL=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(EL.browser.version),jL={browserArchitecture:EL.cpu.architecture||SL,browserFullVersion:EL.browser.version||SL,browserMinorVersion:CL.minor||SL,browserName:EL.browser.name||SL,browserVersion:EL.browser.major||SL,deviceName:EL.device.model||SL,engineName:EL.engine.name||SL,engineVersion:EL.engine.version||SL,platformArchitecture:EL.cpu.architecture||SL,platformName:function(e){return kL[e]||e}(EL.os.name)||SL,platformVersion:EL.os.version||SL,platformFullVersion:EL.os.version||SL},OL=XM,TL=/\./,IL=/\|\|/,RL=/\s+\-\s+/,PL=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,ML=/^(\d*)(.*)/;function AL(e,t){var n=e.split(IL);return n.length>1?n.some((function(e){return UL.contains(e,t)})):function(e,t){var n=e.split(RL);if(n.length>0&&n.length<=2||OL(!1),1===n.length)return DL(n[0],t);var r=n[0],o=n[1];return zL(r)&&zL(o)||OL(!1),DL(">="+r,t)&&DL("<="+o,t)}(e=n[0].trim(),t)}function DL(e,t){if(""===(e=e.trim()))return!0;var n=t.split(TL),r=NL(e),o=r.modifier,i=r.rangeComponents;switch(o){case"<":return FL(n,i);case"<=":return function(e,t){var n=KL(e,t);return-1===n||0===n}(n,i);case">=":return LL(n,i);case">":return function(e,t){return 1===KL(e,t)}(n,i);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var o=r.length-1,i=parseInt(r[o],10);return BL(i)&&(r[o]=i+1+""),LL(e,n)&&FL(e,r)}(n,i);default:return function(e,t){return 0===KL(e,t)}(n,i)}}function FL(e,t){return-1===KL(e,t)}function LL(e,t){var n=KL(e,t);return 1===n||0===n}function NL(e){var t=e.split(TL),n=t[0].match(PL);return n||OL(!1),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function BL(e){return!isNaN(e)&&isFinite(e)}function zL(e){return!NL(e).modifier}function $L(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function VL(e,t){var n=e.match(ML)[1],r=t.match(ML)[1],o=parseInt(n,10),i=parseInt(r,10);return BL(o)&&BL(i)&&o!==i?HL(o,i):HL(e,t)}function HL(e,t){return typeof e!=typeof t&&OL(!1),e>t?1:e<t?-1:0}function KL(e,t){for(var n=function(e,t){$L(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return $L(t,e.length),[e,t]}(e,t),r=n[0],o=n[1],i=0;i<o.length;i++){var a=VL(r[i],o[i]);if(a)return a}return 0}var UL={contains:function(e,t){return AL(e.trim(),t.trim())}},GL=UL,WL=Object.prototype.hasOwnProperty;var qL=function(e,t,n){if(!e)return null;var r={};for(var o in e)WL.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r};var YL=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}},JL=jL,XL=GL;function ZL(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,XL.contains(o,t))}function QL(e){return"Windows"===JL.platformName?e.replace(/^\s*NT/,""):e}var eN={isBrowser:function(e){return ZL(JL.browserName,JL.browserFullVersion,e)},isBrowserArchitecture:function(e){return ZL(JL.browserArchitecture,null,e)},isDevice:function(e){return ZL(JL.deviceName,null,e)},isEngine:function(e){return ZL(JL.engineName,JL.engineVersion,e)},isPlatform:function(e){return ZL(JL.platformName,JL.platformFullVersion,e,QL)},isPlatformArchitecture:function(e){return ZL(JL.platformArchitecture,null,e)}},tN=qL(eN,YL);var nN=function(e){return e&&e.ownerDocument?e.ownerDocument:document};var rN=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE},oN=rN;var iN=function e(t){if(oN(t)){var n=t,r=n.getAttribute("data-offset-key");if(r)return r;for(var o=0;o<n.childNodes.length;o++){var i=e(n.childNodes[o]);if(i)return i}}return null},aN=nN,sN=iN;var lN=function(e){for(var t=e;t&&t!==aN(e).documentElement;){var n=sN(t);if(null!=n)return n;t=t.parentNode}return null};var cN=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window};function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dN=tN,fN=lN,pN=cN,hN=XM,gN=KF,mN=JP.Map,vN={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},bN=dN.isBrowser("IE <= 11"),yN=function(){function e(e){var t=this;uN(this,"observer",void 0),uN(this,"container",void 0),uN(this,"mutations",void 0),uN(this,"onCharData",void 0),this.container=e,this.mutations=mN();var n=pN(e);n.MutationObserver&&!bN?this.observer=new n.MutationObserver((function(e){return t.registerMutations(e)})):this.onCharData=function(e){e.target instanceof Node||hN(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,vN):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=mN(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return bN?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var n=gN(fN(e.target));this.mutations=this.mutations.set(n,t)}},e}(),xN="-",wN={encode:function(e,t,n){return e+xN+t+xN+n},decode:function(e){var t=e.split(xN).reverse(),n=t[0],r=t[1];return{blockKey:t.slice(2).reverse().join(xN),decoratorKey:parseInt(r,10),leafKey:parseInt(n,10)}}},_N=wN,SN={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105},kN={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}};var EN=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)},CN=XM,jN=EN;var ON=function(e){var t=e.editorContainer;return t||CN(!1),jN(t.firstChild)||CN(!1),t.firstChild},TN=_N,IN=KF;var RN=function(e,t,n,r,o){var i=IN(e.getSelection());if(!t||!r)return i;var a=TN.decode(t),s=a.blockKey,l=e.getBlockTree(s),c=l&&l.getIn([a.decoratorKey,"leaves",a.leafKey]),u=TN.decode(r),d=u.blockKey,f=e.getBlockTree(d),p=f&&f.getIn([u.decoratorKey,"leaves",u.leafKey]);if(!c||!p)return i;var h=c.get("start"),g=p.get("start"),m=c?h+n:null,v=p?g+o:null;if(i.getAnchorKey()===s&&i.getAnchorOffset()===m&&i.getFocusKey()===d&&i.getFocusOffset()===v)return i;var b=!1;if(s===d){var y=c.get("end"),x=p.get("end");b=g===h&&x===y?o<n:g<h}else{var w=e.getCurrentContent().getBlockMap().keySeq().skipUntil((function(e){return e===s||e===d})).first();b=w===d}return i.merge({anchorKey:s,anchorOffset:m,focusKey:d,focusOffset:v,isBackward:b})},PN=lN,MN=iN,AN=RN,DN=XM,FN=rN,LN=KF;function NN(e,t,n){var r=t,o=PN(r);(null!=o||e&&(e===r||e.firstChild===r)||DN(!1),e===r)&&(r=r.firstChild,FN(r)||DN(!1),"true"!==(r=r).getAttribute("data-contents")&&DN(!1),n>0&&(n=r.childNodes.length));if(0===n){var i=null;if(null!=o)i=o;else{var a=function(e){for(;e.firstChild&&(FN(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||MN(e.firstChild));)e=e.firstChild;return e}(r);i=LN(MN(a))}return{key:i,offset:0}}var s=r.childNodes[n-1],l=null,c=null;if(MN(s)){var u=function(e){for(;e.lastChild&&(FN(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||MN(e.lastChild));)e=e.lastChild;return e}(s);l=LN(MN(u)),c=BN(u)}else l=LN(o),c=BN(s);return{key:l,offset:c}}function BN(e){var t=e.textContent;return"\n"===t?0:t.length}var zN=function(e,t,n,r,o,i){var a=n.nodeType===Node.TEXT_NODE,s=o.nodeType===Node.TEXT_NODE;if(a&&s)return{selectionState:AN(e,LN(PN(n)),r,LN(PN(o)),i),needsRecovery:!1};var l=null,c=null,u=!0;return a?(l={key:LN(PN(n)),offset:r},c=NN(t,o,i)):s?(c={key:LN(PN(o)),offset:i},l=NN(t,n,r)):(l=NN(t,n,r),c=NN(t,o,i),n===o&&r===i&&(u=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:AN(e,l.key,l.offset,c.key,c.offset),needsRecovery:u}},$N=zN;var VN=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;return 0===n.rangeCount||null==r||null==i?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:$N(e,t,r,o,i,a)},HN=kN,KN=pL,UN=ON,GN=VN;var WN=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();HN.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var n=e.props.editorState,r=GN(n,UN(e)),o=r.selectionState;o!==n.getSelection()&&(n=r.needsRecovery?KN.forceSelection(n,o):KN.acceptSelection(n,o),e.update(n))}};var qN={notEmptyKey:function(e){return null!=e&&""!=e}},YN=qN.notEmptyKey;function JN(e,t){return YN(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}var XN=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),o=t.getAnchorOffset();return o>0?(n=e.getBlockForKey(r).getEntityAt(o-1))!==e.getBlockForKey(r).getEntityAt(o)?null:JN(e.getEntityMap(),n):null}var i=t.getStartKey(),a=t.getStartOffset(),s=e.getBlockForKey(i);return n=a===s.getLength()?null:s.getEntityAt(a),JN(e.getEntityMap(),n)},ZN=yN,QN=vD,eB=_N,tB=pL,nB=SN,rB=WN,oB=ON,iB=VN,aB=XN,sB=KF,lB=tN.isBrowser("IE"),cB=!1,uB=!1,dB=null;var fB,pB,hB={onCompositionStart:function(e){uB=!0,function(e){dB||(dB=new ZN(oB(e))).start()}(e)},onCompositionEnd:function(e){cB=!1,uB=!1,setTimeout((function(){cB||hB.resolveComposition(e)}),20)},onSelect:rB,onKeyDown:function(e,t){if(!uB)return hB.resolveComposition(e),void e._onKeyDown(t);(t.which===nB.RIGHT||t.which===nB.LEFT)&&t.preventDefault()},onKeyPress:function(e,t){t.which===nB.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!uB){var t=sB(dB).stopAndFlushMutations();dB=null,cB=!0;var n=tB.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),!t.size)return void e.update(n);var r=n.getCurrentContent();t.forEach((function(e,t){var o=eB.decode(t),i=o.blockKey,a=o.decoratorKey,s=o.leafKey,l=n.getBlockTree(i).getIn([a,"leaves",s]),c=l.start,u=l.end,d=n.getSelection().merge({anchorKey:i,focusKey:i,anchorOffset:c,focusOffset:u,isBackward:!1}),f=aB(r,d),p=r.getBlockForKey(i).getInlineStyleAt(c);r=QN.replaceText(r,d,e,p,f),n=tB.set(n,{currentContent:r})}));var o=iB(n,oB(e)).selectionState;e.restoreEditorDOM();var i=lB?tB.forceSelection(n,o):tB.acceptSelection(n,o);e.update(tB.push(i,r,"insert-characters"))}}},gB=hB;function mB(){if(pB)return fB;pB=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=_N,r=s,o=LF,i=EF,a=function(e){function a(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e),a.prototype.render=function(){var e=this.props,a=e.block,s=e.children,l=e.contentState,c=e.decorator,u=e.decoratorKey,d=e.direction,f=e.leafSet,p=e.text,h=a.getKey(),g=f.get("leaves"),m=c.getComponentForKey(u),v=c.getPropsForKey(u),b=n.encode(h,parseInt(u,10),0),y=p.slice(g.first().get("start"),g.last().get("end")),x=i.getHTMLDirIfDifferent(o.getDirection(y),d);return r.createElement(m,t({},v,{contentState:l,decoratedText:y,dir:x,key:b,entityKey:a.getEntityAt(f.get("start")),offsetKey:b}),s)},a}(r.Component);return fB=a}function vB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yB=s,xB=XM,wB=rN,_B=tN.isBrowser("IE <= 11");var SB=function(e){function t(t){var n;return bB(vB(n=e.call(this,t)||this),"_forceFlag",void 0),bB(vB(n),"_node",void 0),n._forceFlag=!1,n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;wB(t)||xB(!1);var r=t;return n?!function(e){return _B?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},n.componentDidMount=function(){this._forceFlag=!this._forceFlag},n.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},n.render=function(){var e=this;return""===this.props.children?this._forceFlag?function(e){return _B?yB.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):yB.createElement("br",{key:"A","data-text":"true",ref:e})}((function(t){return e._node=t})):function(e){return _B?yB.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):yB.createElement("br",{key:"B","data-text":"true",ref:e})}((function(t){return e._node=t})):yB.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(t){return e._node=t}},this.props.children)},t}(yB.Component),kB=SB,EB=rN;var CB=function(e){return!(!e||!e.ownerDocument)&&(EB(e)&&"BR"===e.nodeName)},jB={initODS:function(){},handleExtensionCausedError:function(){}};var OB=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))},TB=OB;var IB=function(e){return TB(e)&&3==e.nodeType};var RB=function e(t,n){return!(!t||!n)&&(t===n||!IB(t)&&(IB(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))};var PB=function(e){if(typeof(e=e||(typeof document<"u"?document:void 0))>"u")return null;try{return e.activeElement||e.body}catch{return e.body}},MB=jB,AB=kN,DB=RB,FB=PB,LB=nN,NB=XM,BB=rN,zB=tN.isBrowser("IE");function $B(e,t){if(!e)return"[empty]";var n=VB(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(BB(n)||NB(!1),n.outerHTML)}function VB(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return LB(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var o=e.cloneNode();1===o.nodeType&&n.length&&o.setAttribute("data-labels",n.join(", "));for(var i=e.childNodes,a=0;a<i.length;a++)o.appendChild(VB(i[a],t));return o}function HB(e,t){for(var n=e,r=n;n;){if(BB(n)&&r.hasAttribute("contenteditable"))return $B(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function KB(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function UB(e,t,n,r){var o=FB();if(e.extend&&null!=t&&DB(o,t)){n>KB(t)&&AB.logSelectionStateFailure({anonymizedDom:HB(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())});var i=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,n)}catch(a){throw AB.logSelectionStateFailure({anonymizedDom:HB(t,(function(t){var n=[];return t===o&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:i,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:n},null,2),selectionState:JSON.stringify(r.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var a=e.getRangeAt(0);a.setEnd(t,n),e.addRange(a.cloneRange())}}function GB(e,t,n,r){var o=LB(t).createRange();if(n>KB(t)&&(AB.logSelectionStateFailure({anonymizedDom:HB(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),MB.handleExtensionCausedError()),o.setStart(t,n),zB)try{e.addRange(o)}catch(e){}else e.addRange(o)}var WB=function(e,t,n,r,o){var i=LB(t);if(DB(i.documentElement,t)){var a=i.defaultView.getSelection(),s=e.getAnchorKey(),l=e.getAnchorOffset(),c=e.getFocusKey(),u=e.getFocusOffset(),d=e.getIsBackward();if(!a.extend&&d){var f=s,p=l;s=c,l=u,c=f,u=p,d=!1}var h=s===n&&r<=l&&o>=l,g=c===n&&r<=u&&o>=u;if(h&&g)return a.removeAllRanges(),GB(a,t,l-r,e),void UB(a,t,u-r,e);if(d){if(g&&(a.removeAllRanges(),GB(a,t,u-r,e)),h){var m=a.focusNode,v=a.focusOffset;a.removeAllRanges(),GB(a,t,l-r,e),UB(a,m,v,e)}}else h&&(a.removeAllRanges(),GB(a,t,l-r,e)),g&&UB(a,t,u-r,e)}},qB=Ou;var YB,JB,XB=kB,ZB=s,QB=XM,ez=CB,tz=WB,nz=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"leaf",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,r=t.start,o=t.text,i=n.getKey(),a=r+o.length;if(e.hasEdgeWithin(i,r,a)){var s=this.leaf;s||QB(!1);var l,c=s.firstChild;c||QB(!1),c.nodeType===Node.TEXT_NODE?l=c:ez(c)?l=s:(l=c.firstChild)||QB(!1),tz(e,l,i,r,a)}}},n.shouldComponentUpdate=function(e){var t=this.leaf;return t||QB(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},n.componentDidUpdate=function(){this._setSelection()},n.componentDidMount=function(){this._setSelection()},n.render=function(){var e=this,t=this.props.block,n=this.props.text;n.endsWith("\n")&&this.props.isLast&&(n+="\n");var r=this.props,o=r.customStyleMap,i=r.customStyleFn,a=r.offsetKey,s=r.styleSet,l=s.reduce((function(e,t){var n={},r=o[t];return void 0!==r&&e.textDecoration!==r.textDecoration&&(n.textDecoration=[e.textDecoration,r.textDecoration].join(" ").trim()),qB(e,r,n)}),{});if(i){var c=i(s,t);l=qB(l,c)}return ZB.createElement("span",{"data-offset-key":a,ref:function(t){return e.leaf=t},style:l},ZB.createElement(XB,null,n))},t}(ZB.Component),rz=nz;function oz(){if(JB)return YB;JB=1;var e=mB(),t=rz,n=_N,r=s,o=vL;JP.List;var i=function(i){function a(){return i.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,i),a.prototype.render=function(){var i=this.props,a=i.block,s=i.contentState,l=i.customStyleFn,c=i.customStyleMap,u=i.decorator,d=i.direction,f=i.forceSelection,p=i.hasSelection,h=i.selection,g=i.tree,m=a.getKey(),v=a.getText(),b=g.size-1,y=this.props.children||g.map((function(o,i){var g=o.get("decoratorKey"),y=o.get("leaves"),x=y.size-1,w=y.map((function(e,o){var s=n.encode(m,i,o),u=e.get("start"),d=e.get("end");return r.createElement(t,{key:s,offsetKey:s,block:a,start:u,selection:p?h:null,forceSelection:f,text:v.slice(u,d),styleSet:a.getInlineStyleAt(u),customStyleMap:c,customStyleFn:l,isLast:g===b&&o===x})})).toArray();return g&&u?r.createElement(e,{block:a,children:w,contentState:s,decorator:u,decoratorKey:g,direction:d,leafSet:o,text:v,key:i}):w})).toArray();return r.createElement("div",{"data-offset-key":n.encode(m,0,0),className:o({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===d,"public/DraftStyleDefault/rtl":"RTL"===d})},y)},a}(r.Component);return YB=i}function iz(e,t){return!!t&&(e===t.documentElement||e===t.body)}var az={getTop:function(e){var t=e.ownerDocument;return iz(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;iz(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return iz(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;iz(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}},sz=az,lz=/-(.)/g;var cz=function(e){return e.replace(lz,(function(e,t){return t.toUpperCase()}))},uz=/([A-Z])/g;var dz=cz,fz=function(e){return e.replace(uz,"-$1").toLowerCase()};function pz(e){return null==e?e:String(e)}var hz=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return pz(n.getPropertyValue(fz(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return pz(n.getPropertyValue(fz(t)));if("display"===t)return"none"}return e.currentStyle?pz("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[dz(t)]):pz(e.style&&e.style[dz(t)])};function gz(e,t){var n=mz.get(e,t);return"auto"===n||"scroll"===n}var mz={get:hz,getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(gz(e,"overflow")||gz(e,"overflowY")||gz(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}},vz=mz,bz=RB;var yz=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!bz(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}},xz=yz;var wz=function(e){var t=xz(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}},_z=typeof navigator<"u"&&navigator.userAgent.indexOf("AppleWebKit")>-1;var Sz=function(e){return(e=e||document).scrollingElement?e.scrollingElement:_z||"CSS1Compat"!==e.compatMode?e.body:e.documentElement},kz=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}};var Ez=function(e){var t=Sz(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=kz(e),r=e===t?e.ownerDocument.documentElement:e,o=e.scrollWidth-r.clientWidth,i=e.scrollHeight-r.clientHeight;return n.x=Math.max(0,Math.min(n.x,o)),n.y=Math.max(0,Math.min(n.y,i)),n};function Cz(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function jz(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function Oz(){return{width:window.innerWidth||Cz(),height:window.innerHeight||jz()}}Oz.withoutScrollbars=function(){return{width:Cz(),height:jz()}};var Tz,Iz,Rz,Pz,Mz=Oz;function Az(){if(Iz)return Tz;Iz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=oz(),i=_N,a=s,l=sz,c=vz,u=wz,d=Ez,f=Mz,p=XM,h=EN;JP.List;var g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},m=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},b=function(e,t,r,o,i,a){var s={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},l=o(e);return l&&(s.className=l),void 0!==i.customEditable&&(s=n({},s,{contentEditable:i.customEditable,suppressContentEditableWarning:!0})),s},y=function(e){function s(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this),"wrapperRef",a.createRef()),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(s,e);var y=s.prototype;return y.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,o=t.tree,i=!n.getChildKeys().isEmpty(),a=n!==e.block||o!==e.tree||r!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection;return i||a},y.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,o=c.getScrollParent(n),i=d(o);if(o===window){var a=u(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{h(n)||p(!1);var s=n;(r=s.offsetHeight+s.offsetTop-(o.offsetHeight+i.y))>0&&l.setTop(o,l.getTop(o)+r+10)}}}},y.render=function(){var e=this,r=this.props,l=r.block,c=r.blockRenderMap,u=r.blockRendererFn,d=r.blockStyleFn,f=r.contentState,p=r.decorator,h=r.editorKey,y=r.editorState,x=r.customStyleFn,w=r.customStyleMap,_=r.direction,S=r.forceSelection,k=r.selection,E=r.tree,C=null;l.children.size&&(C=l.children.reduce((function(t,r){var o=i.encode(r,0,0),l=f.getBlockForKey(r),p=v(l,u),g=p.CustomComponent||s,x=m(l,c),w=x.Element,_=x.wrapperTemplate,S=b(l,h,o,d,p,null),k=n({},e.props,{tree:y.getBlockTree(r),blockProps:p.customProps,offsetKey:o,block:l});return t.push(a.createElement(w,S,a.createElement(g,k))),!_||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(l,f)||function(e,t,n){var r=[],o=!0,s=!1,l=void 0;try{for(var c,u=n.reverse()[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=c.value;if(d.type!==t)break;r.push(d)}}catch(e){s=!0,l=e}finally{try{!o&&null!=u.return&&u.return()}finally{if(s)throw l}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),p=f[0].key;n.push(a.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":i.encode(p,0,0)},f))}(_,w,t),t}),[]));var j=l.getKey(),O=i.encode(j,0,0),T=v(l,u),I=T.CustomComponent,R=null!=I?a.createElement(I,t({},this.props,{tree:y.getBlockTree(j),blockProps:T.customProps,offsetKey:O,block:l})):a.createElement(o,{block:l,children:C,contentState:f,customStyleFn:x,customStyleMap:w,decorator:p,direction:_,forceSelection:S,hasSelection:g(k,j),selection:k,tree:E});if(l.getParentKey())return R;var P=m(l,c).Element,M=b(l,h,O,d,T,this.wrapperRef);return a.createElement(P,M,R)},s}(a.Component);return Tz=y}var Dz=Ou;function Fz(){return Fz=Dz||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fz.apply(this,arguments)}var Lz,Nz,Bz,zz,$z=rz,Vz=_N,Hz=s,Kz=sz,Uz=vz,Gz=LF,Wz=EF,qz=vL,Yz=wz,Jz=Ez,Xz=Mz,Zz=XM,Qz=EN,e$=KF,t$=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},n$=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||t$(e.selection,e.block.getKey())&&e.forceSelection},n.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,o=Uz.getScrollParent(n),i=Jz(o);if(o===window){var a=Yz(n);(r=a.y+a.height-Xz().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{Qz(n)||Zz(!1),(r=n.offsetHeight+n.offsetTop-(o.offsetTop+o.offsetHeight+i.y))>0&&Kz.setTop(o,Kz.getTop(o)+r+10)}}}}},n._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),o=this.props.tree.size-1,i=t$(this.props.selection,n);return this.props.tree.map((function(a,s){var l=a.get("leaves");if(0===l.size)return null;var c=l.size-1,u=l.map((function(a,l){var u=Vz.encode(n,s,l),d=a.get("start"),f=a.get("end");return Hz.createElement($z,{key:u,offsetKey:u,block:t,start:d,selection:i?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(d,f),styleSet:t.getInlineStyleAt(d),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:s===o&&l===c})})).toArray(),d=a.get("decoratorKey");if(null==d||!e.props.decorator)return u;var f=e$(e.props.decorator),p=f.getComponentForKey(d);if(!p)return u;var h=f.getPropsForKey(d),g=Vz.encode(n,s,0),m=l.first().get("start"),v=l.last().get("end"),b=r.slice(m,v),y=t.getEntityAt(a.get("start")),x=Wz.getHTMLDirIfDifferent(Gz.getDirection(b),e.props.direction),w={contentState:e.props.contentState,decoratedText:b,dir:x,start:m,end:v,blockKey:n,entityKey:y,offsetKey:g};return Hz.createElement(p,Fz({},h,w,{key:g}),u)})).toArray()},n.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,o=qz({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return Hz.createElement("div",{"data-offset-key":r,className:o,ref:function(t){return e._node=t}},this._renderChildren())},t}(Hz.Component),r$=n$;var o$=WD("draft_tree_data_support")?function(){if(Pz)return Rz;Pz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=Az(),r=_N,o=s,i=KF,a=function(e){function a(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e);var s=a.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,a=e.blockRenderMap,s=e.blockRendererFn,l=e.blockStyleFn,c=e.customStyleMap,u=e.customStyleFn,d=e.editorState,f=e.editorKey,p=e.textDirectionality,h=d.getCurrentContent(),g=d.getSelection(),m=d.mustForceSelection(),v=d.getDecorator(),b=i(d.getDirectionMap()),y=[],x=h.getBlocksAsArray()[0];x;){var w=x.getKey(),_={blockRenderMap:a,blockRendererFn:s,blockStyleFn:l,contentState:h,customStyleFn:u,customStyleMap:c,decorator:v,editorKey:f,editorState:d,forceSelection:m,selection:g,block:x,direction:p||b.get(w),tree:d.getBlockTree(w)},S=(a.get(x.getType())||a.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:w},_)),wrapperTemplate:S,key:w,offsetKey:r.encode(w,0,0)});var k=x.getNextSiblingKey();x=k?h.getBlockForKey(k):null}for(var E=[],C=0;C<y.length;){var j=y[C];if(j.wrapperTemplate){var O=[];do{O.push(y[C].block),C++}while(C<y.length&&y[C].wrapperTemplate===j.wrapperTemplate);var T=o.cloneElement(j.wrapperTemplate,{key:j.key+"-wrap","data-offset-key":j.offsetKey},O);E.push(T)}else E.push(j.block),C++}return o.createElement("div",{"data-contents":"true"},E)},a}(o.Component);return Rz=a}():function(){if(zz)return Bz;zz=1;var e=Ou;function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=r$,i=_N,a=s,l=vL,c=(Nz||(Nz=1,Lz=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var o=arguments[r];o&&(t=(t?t+" ":"")+o)}return t}),Lz),u=KF,d=function(e,t,n,r){return l({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){function r(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(r,e);var s=r.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,r=e.blockRenderMap,s=e.blockRendererFn,l=e.blockStyleFn,f=e.customStyleMap,p=e.customStyleFn,h=e.editorState,g=e.editorKey,m=e.preventScroll,v=e.textDirectionality,b=h.getCurrentContent(),y=h.getSelection(),x=h.mustForceSelection(),w=h.getDecorator(),_=u(h.getDirectionMap()),S=b.getBlocksAsArray(),k=[],E=null,C=null,j=0;j<S.length;j++){var O=S[j],T=O.getKey(),I=O.getType(),R=s(O),P=void 0,M=void 0,A=void 0;R&&(P=R.component,M=R.props,A=R.editable);var D=v||_.get(T),F=i.encode(T,0,0),L={contentState:b,block:O,blockProps:M,blockStyleFn:l,customStyleMap:f,customStyleFn:p,decorator:w,direction:D,forceSelection:x,offsetKey:F,preventScroll:m,selection:y,tree:h.getBlockTree(T)},N=r.get(I)||r.get("unstyled"),B=N.wrapper,z=N.element||r.get("unstyled").element,$=O.getDepth(),V="";if(l&&(V=l(O)),"li"===z)V=c(V,d(I,$,C!==B||null===E||$>E,D));var H=P||o,K={className:V,"data-block":!0,"data-editor":g,"data-offset-key":F,key:T};void 0!==A&&(K=n({},K,{contentEditable:A,suppressContentEditableWarning:!0}));var U=a.createElement(z,K,a.createElement(H,t({},L,{key:T})));k.push({block:U,wrapperTemplate:B,key:T,offsetKey:F}),E=B?O.getDepth():null,C=B}for(var G=[],W=0;W<k.length;){var q=k[W];if(q.wrapperTemplate){var Y=[];do{Y.push(k[W].block),W++}while(W<k.length&&k[W].wrapperTemplate===q.wrapperTemplate);var J=a.cloneElement(q.wrapperTemplate,{key:q.key+"-wrap","data-offset-key":q.offsetKey},Y);G.push(J)}else G.push(q.block),W++}return a.createElement("div",{"data-contents":"true"},G)},r}(a.Component);return Bz=f}(),i$={isImage:function(e){return"image"===a$(e)[0]},isJpeg:function(e){var t=a$(e);return i$.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function a$(e){return e.split("/")}var s$=i$,l$=XM;var c$=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)||l$(!1),"number"!=typeof t&&l$(!1),0===t||t-1 in e||l$(!1),"function"==typeof e.callee&&l$(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch{}for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}(e):[e]};function u$(e){return function(){return e}}var d$=function(){};d$.thatReturns=u$,d$.thatReturnsFalse=u$(!1),d$.thatReturnsTrue=u$(!0),d$.thatReturnsNull=u$(null),d$.thatReturnsThis=function(){return this},d$.thatReturnsArgument=function(e){return e};var f$=d$,p$=s$,h$=c$,g$=f$,m$=new RegExp("\r\n","g"),v$={"text/rtf":1,"text/html":1};function b$(e){if("file"==e.kind)return e.getAsFile()}var y$=function(){function e(e){this.data=e,this.types=e.types?h$(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return v$[e]}))},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(m$,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){var e=this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")}));if(e)return!0;for(var t=this.getFiles(),n=0;n<t.length;n++){var r=t[n].type;if(!p$.isImage(r))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(b$).filter(g$.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},e}(),x$=y$,w$=XM,_$=/\.textClipping$/,S$={"text/plain":!0,"text/html":!0,"text/rtf":!0};var k$=function(e,t){var n=0,r=[];e.forEach((function(o){!function(e,t){if(!kc.FileReader||e.type&&!(e.type in S$))return void t("");if(""===e.type){var n="";return _$.test(e.name)&&(n=e.name.replace(_$,"")),void t(n)}var r=new FileReader;r.onload=function(){var e=r.result;"string"!=typeof e&&w$(!1),t(e)},r.onerror=function(){t("")},r.readAsText(e)}(o,(function(o){n++,o&&r.push(o.slice(0,5e3)),n==e.length&&t(r.join("\r"))}))}))};var E$=function(e){return"handled"===e||!0===e},C$=x$,j$=vD,O$=pL,T$=lN,I$=nN,R$=k$,P$=RN,M$=cN,A$=E$,D$=KF;var F$={onDragEnd:function(e){e.exitCurrentMode(),L$(e)},onDrop:function(e,t){var n=new C$(t.nativeEvent.dataTransfer),r=e._latestEditorState,o=function(e,t){var n=null,r=null,o=I$(e.currentTarget);if("function"==typeof o.caretRangeFromPoint){var i=o.caretRangeFromPoint(e.x,e.y);n=i.startContainer,r=i.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}n=D$(n),r=D$(r);var a=D$(T$(n));return P$(t,a,r,a,r)}(t.nativeEvent,r);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=o){var i=n.getFiles();if(i.length>0){if(e.props.handleDroppedFiles&&A$(e.props.handleDroppedFiles(o,i)))return;return void R$(i,(function(t){t&&e.update(N$(r,o,t))}))}var a=e._internalDrag?"internal":"external";e.props.handleDrop&&A$(e.props.handleDrop(o,n,a))||(e._internalDrag?e.update(function(e,t){var n=j$.moveText(e.getCurrentContent(),e.getSelection(),t);return O$.push(e,n,"insert-fragment")}(r,o)):e.update(N$(r,o,n.getText()))),L$(e)}}};function L$(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:M$(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function N$(e,t,n){var r=j$.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return O$.push(e,r,"insert-fragment")}var B$=F$;var z$=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),i=!1;return r.some((function(e){return o===e.get("start")?(i=!0,!0):o<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return o===t&&(i=!0,!0)}))})),i};!function(e){if(!e.setImmediate){var t,n=1,r={},o=!1,i=e.document,a=Object.getPrototypeOf&&Object.getPrototypeOf(e);a=a&&a.setTimeout?a:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){l(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var n="setImmediate$"+Math.random()+"$",r=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&l(+t.data.slice(n.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),t=function(t){e.postMessage(n+t,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},t=function(t){e.port2.postMessage(t)}}():i&&"onreadystatechange"in i.createElement("script")?function(){var e=i.documentElement;t=function(t){var n=i.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(l,0,e)},a.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var o=new Array(arguments.length-1),i=0;i<o.length;i++)o[i]=arguments[i+1];var a={callback:e,args:o};return r[n]=a,t(n),n++},a.clearImmediate=s}function s(e){delete r[e]}function l(e){if(o)setTimeout(l,0,e);else{var t=r[e];if(t){o=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{s(e),o=!1}}}}}(typeof self>"u"?kc:self);var $$=kc.setImmediate,V$=vD,H$=pL,K$=XN,U$=E$,G$=z$,W$=KF,q$=$$,Y$=tN.isBrowser("Firefox");function J$(e,t,n,r,o){var i=V$.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return H$.push(e,i,"insert-characters",o)}var X$=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e._latestEditorState,r=t.data;if(r){if(e.props.handleBeforeInput&&U$(e.props.handleBeforeInput(r,n,t.timeStamp)))return void t.preventDefault();var o=n.getSelection(),i=o.getStartOffset(),a=o.getAnchorKey();if(!o.isCollapsed())return t.preventDefault(),void e.update(J$(n,r,n.getCurrentInlineStyle(),K$(n.getCurrentContent(),n.getSelection()),!0));var s=J$(n,r,n.getCurrentInlineStyle(),K$(n.getCurrentContent(),n.getSelection()),!1),l=!1;if(l||(l=G$(e._latestCommittedEditorState)),!l){var c=n.getBlockTree(a),u=s.getBlockTree(a);l=c.size!==u.size||c.zip(u).some((function(e){var t=e[0],n=e[1],o=t.get("start"),a=o+(o>=i?r.length:0),s=t.get("end"),l=s+(s>=i?r.length:0),c=n.get("start"),u=n.get("end"),d=n.get("decoratorKey");return t.get("decoratorKey")!==d||t.get("leaves").size!==n.get("leaves").size||a!==c||l!==u||null!=d&&u-c!==s-o}))}if(l||(l=function(e){return Y$&&("'"==e||"/"==e)}(r)),l||(l=W$(s.getDirectionMap()).get(a)!==W$(n.getDirectionMap()).get(a)),l)return t.preventDefault(),s=H$.set(s,{forceSelection:!0}),void e.update(s);s=H$.set(s,{nativelyRenderedContent:s.getCurrentContent()}),e._pendingStateFromBeforeInput=s,q$((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}},Z$=pL,Q$=RB,eV=PB;var tV=function(e,t){var n=t.currentTarget.ownerDocument;if(!e.props.preserveSelectionOnBlur&&eV(n)===n.body){var r=n.defaultView.getSelection(),o=e.editor;1===r.rangeCount&&Q$(o,r.anchorNode)&&Q$(o,r.focusNode)&&r.removeAllRanges()}var i=e._latestEditorState,a=i.getSelection();if(a.getHasFocus()){var s=a.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(Z$.acceptSelection(i,s))}},nV=pL;var rV=function(e,t){e.setMode("composite"),e.update(nV.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)},oV=yA;var iV=function(e){var t=e.getSelection();return t.isCollapsed()?null:oV(e.getCurrentContent(),t)},aV=iV;var sV=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(aV(e._latestEditorState))};var lV=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1},cV=vD,uV=pL,dV=vz,fV=iV,pV=Ez,hV=lV;var gV=function(e,t){var n,r=e._latestEditorState,o=r.getSelection(),i=t.target;if(o.isCollapsed())t.preventDefault();else{if(hV(i)){var a=i;n=pV(dV.getScrollParent(a))}var s=fV(r);e.setClipboard(s),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(n),e.exitCurrentMode(),e.update(function(e){var t=cV.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return uV.push(e,t,"remove-range")}(r))}),0)}};var mV=function(e,t){e.setMode("drag"),t.preventDefault()};var vV=function(e){e._internalDrag=!0,e.setMode("drag")},bV=pL,yV=tN;var xV=function(e,t){var n=e._latestEditorState,r=n.getSelection();if(!r.getHasFocus()){var o=r.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),yV.isBrowser("Chrome < 60.0.3081.0")?e.update(bV.forceSelection(n,o)):e.update(bV.acceptSelection(n,o))}},wV=XM,_V=/[\uD800-\uDFFF]/;function SV(e){return 55296<=e&&e<=57343}function kV(e){return _V.test(e)}function EV(e,t){return 1+SV(e.charCodeAt(t))}function CV(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!kV(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o<r;t--)o+=EV(e,o);if(o>=r)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=EV(e,o-1);o<0&&(o=0)}var i=r;if(n<r)for(i=o;n>0&&i<r;n--)i+=EV(e,i);return e.substring(o,i)}var jV={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=EV(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:EV,hasSurrogateUnit:kV,isCodeUnitInSurrogateRange:SV,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||wV(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),r=e.charCodeAt(t+1);return 55296<=n&&n<=56319&&56320<=r&&r<=57343},strlen:function(e){if(!kV(e))return e.length;for(var t=0,n=0;n<e.length;n+=EV(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return CV(e,t=t<n?t:n,r)},substr:CV},OV=jV;var TV=function(e,t){var n=e.getSelection(),r=e.getCurrentContent(),o=n.getStartKey(),i=n.getStartOffset(),a=o,s=0;if(t>i){var l=r.getKeyBefore(o);if(null==l)a=o;else a=l,s=r.getBlockForKey(l).getText().length}else s=i-t;return n.merge({focusKey:a,focusOffset:s,isBackward:!0})},IV=vD,RV=WD("draft_tree_data_support");var PV=function(e,t,n){var r=e.getSelection(),o=e.getCurrentContent(),i=r,a=r.getAnchorKey(),s=r.getFocusKey(),l=o.getBlockForKey(a);if(RV&&"forward"===n&&a!==s)return o;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return o;if(RV)if(r.getAnchorOffset()===o.getBlockForKey(a).getLength()){var c=o.getBlockForKey(l.nextSibling);if(!c||0===c.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((i=t(e))===r)return o}return IV.removeRange(o,i,n)},MV=pL,AV=OV,DV=TV,FV=PV;var LV=function(e){var t=FV(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o-1];return DV(e,i?AV.getUTF16Length(i,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return MV.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")},NV=vD,BV=_N,zV=pL,$V=qN.notEmptyKey,VV=lN,HV=LV,KV=KF,UV=tN.isEngine("Gecko");var GV=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.isCollapsed,i=(null==r?void 0:r.nodeType)!==Node.TEXT_NODE&&(null==r?void 0:r.nodeType)!==Node.ELEMENT_NODE;if(null!=r&&!i){if(r.nodeType===Node.TEXT_NODE&&(null!==r.previousSibling||null!==r.nextSibling)){var a=r.parentNode;if(null==a)return;r.nodeValue=a.textContent;for(var s=a.firstChild;null!=s;s=s.nextSibling)s!==r&&a.removeChild(s)}var l=r.textContent,c=e._latestEditorState,u=KV(VV(r)),d=BV.decode(u),f=d.blockKey,p=d.decoratorKey,h=d.leafKey,g=c.getBlockTree(f).getIn([p,"leaves",h]),m=g.start,v=g.end,b=c.getCurrentContent(),y=b.getBlockForKey(f),x=y.getText().slice(m,v);if(l.endsWith("\n\n")&&(l=l.slice(0,-1)),l===x){var w=t.nativeEvent.inputType;if(w){var _=function(e,t){return"deleteContentBackward"===e?HV(t):t}(w,c);if(_!==c)return e.restoreEditorDOM(),void e.update(_)}return}var S,k,E,C,j=c.getSelection(),O=j.merge({anchorOffset:m,focusOffset:v,isBackward:!1}),T=y.getEntityAt(m),I=$V(T)?b.getEntity(T):null,R="MUTABLE"===(null!=I?I.getMutability():null),P=R?"spellcheck-change":"apply-entity",M=NV.replaceText(b,O,l,y.getInlineStyleAt(m),R?y.getEntityAt(m):null);if(UV)S=n.anchorOffset,k=n.focusOffset,C=(E=m+Math.min(S,k))+Math.abs(S-k),S=E,k=C;else{var A=l.length-x.length;E=j.getStartOffset(),C=j.getEndOffset(),S=o?C+A:E,k=C+A}var D=M.merge({selectionBefore:b.getSelectionAfter(),selectionAfter:j.merge({anchorOffset:S,focusOffset:k})});e.update(zV.push(c,D,P))}},WV=SN;var qV=function(e){return e.which===WV.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))},YV=tN.isPlatform("Mac OS X"),JV={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return YV&&e.altKey},usesMacOSHeuristics:function(){return YV},hasCommandModifier:function(e){return YV?!!e.metaKey&&!e.altKey:JV.isCtrlKeyCommand(e)},isSoftNewlineEvent:qV},XV=JV,ZV=vD,QV=pL,eH=yA,tH=KF,nH=null,rH={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),r=null;if(n.isCollapsed()){var o=n.getAnchorKey(),i=t.getBlockForKey(o).getLength();if(i===n.getAnchorOffset()){var a=t.getKeyAfter(o);if(null==a)return e;r=n.set("focusKey",a).set("focusOffset",0)}else r=n.set("focusOffset",i)}else r=n;r=tH(r),nH=eH(t,r);var s=ZV.removeRange(t,r,"forward");return s===t?e:QV.push(e,s,"remove-range")},paste:function(e){if(!nH)return e;var t=ZV.replaceWithFragment(e.getCurrentContent(),e.getSelection(),nH);return QV.push(e,t,"insert-fragment")}},oH=rH,iH=XM;var aH=tN.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer;o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var i,a=Array.from(t.getClientRects());if(n.push(a),o)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}iH(!1)}:function(e){return Array.from(e.getClientRects())},sH=aH,lH=OV,cH=nN,uH=sH,dH=XM;function fH(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<e.length;a++){var s=e[a];0===s.width||1===s.width||(n=Math.min(n,s.top),r=Math.min(r,s.bottom),o=Math.max(o,s.top),i=Math.max(i,s.bottom))}return o<=r&&o-n<t&&i-r<t}function pH(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}var hH=function(e){e.collapsed||dH(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var n=function(e){var t=getComputedStyle(e),n=cH(e),r=n.createElement("div");r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.fontStyle=t.fontStyle,r.style.fontWeight=t.fontWeight,r.style.lineHeight=t.lineHeight,r.style.position="absolute",r.textContent="M";var o=n.body;o||dH(!1),o.appendChild(r);var i=r.getBoundingClientRect();return o.removeChild(r),i.height}(t),r=e.endContainer,o=e.endOffset;for(e.setStart(e.startContainer,0);fH(uH(e),n)&&(r=e.startContainer,o=e.startOffset,r.parentNode||dH(!1),e.setStartBefore(r),1!==r.nodeType||"inline"===getComputedStyle(r).display););for(var i=r,a=o-1;;){for(var s=i.nodeValue,l=a;l>=0;l--)if(!(null!=s&&l>0&&lH.isSurrogatePair(s,l-1))){if(e.setStart(i,l),!fH(uH(e),n))break;r=i,o=l}if(-1===l||0===i.childNodes.length)break;a=pH(i=i.childNodes[l])}return e.setStart(r,o),e},gH=pL,mH=hH,vH=zN,bH=TV,yH=PV;var xH=function(e,t){var n=yH(e,(function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return bH(e,1);var r=t.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return r=mH(r),vH(e,null,r.endContainer,r.endOffset,r.startContainer,r.startOffset).selectionState}),"backward");return n===e.getCurrentContent()?e:gH.push(e,n,"remove-range")},wH="['‘’]",_H="\\s|(?![_])"+{getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}.getPunctuation(),SH=new RegExp("^(?:"+_H+")*(?:"+wH+"|(?!"+_H+").)*(?:(?!"+_H+").)"),kH=new RegExp("(?:(?!"+_H+").)(?:"+wH+"|(?!"+_H+").)*(?:"+_H+")*$");function EH(e,t){var n=t?kH.exec(e):SH.exec(e);return n?n[0]:e}var CH={getBackward:function(e){return EH(e,!0)},getForward:function(e){return EH(e,!1)}},jH=CH,OH=pL,TH=TV,IH=PV;var RH=function(e){var t=IH(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return TH(e,1);var r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(0,n),i=jH.getBackward(o);return TH(e,i.length||1)}),"backward");return t===e.getCurrentContent()?e:OH.push(e,t,"remove-range")};var PH=function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getStartOffset(),a=e.getCurrentContent(),s=o;return t>a.getBlockForKey(o).getText().length-i?(s=a.getKeyAfter(o),n=0):n=i+t,r.merge({focusKey:s,focusOffset:n})},MH=CH,AH=pL,DH=PH,FH=PV;var LH=function(e){var t=FH(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(n),i=MH.getForward(o);return DH(e,i.length||1)}),"forward");return t===e.getCurrentContent()?e:AH.push(e,t,"remove-range")},NH=vD,BH=pL;var zH=function(e){var t=NH.splitBlock(e.getCurrentContent(),e.getSelection());return BH.push(e,t,"split-block")},$H=pL;var VH=function(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent().getBlockForKey(n).getLength();return $H.set(e,{selection:t.merge({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}),forceSelection:!0})},HH=pL;var KH=function(e){var t=e.getSelection(),n=t.getStartKey();return HH.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})},UH=pL,GH=OV,WH=PH,qH=PV;var YH=function(e){var t=qH(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o];return WH(e,i?GH.getUTF16Length(i,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return UH.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")},JH=vD,XH=pL,ZH=yA;var QH=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var r,o,i=t.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i).getLength();if(s<=1)return e;n===s?(r=t.set("anchorOffset",n-1),o=t):o=(r=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var l=ZH(a,r),c=JH.removeRange(a,r,"backward"),u=c.getSelectionAfter(),d=u.getAnchorOffset()-1,f=u.merge({anchorOffset:d,focusOffset:d}),p=JH.replaceWithFragment(c,f,l),h=XH.push(e,p,"insert-fragment");return XH.acceptSelection(h,o)},eK=pL;var tK=function(e,t,n){var r=eK.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(eK.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(r)}),0)):n(r);else{var o=r.getCurrentContent();n(eK.set(r,{nativelyRenderedContent:o}))}},nK=vD,rK=pL,oK=SN,iK=oH,aK=tN,sK=E$,lK=xH,cK=RH,uK=LH,dK=zH,fK=VH,pK=KH,hK=LV,gK=YH,mK=QH,vK=tK,bK=XV.isOptionKeyCommand,yK=aK.isBrowser("Chrome");var xK=function(e,t){var n=t.which,r=e._latestEditorState;function o(n){var r=e.props[n];return!!r&&(r(t),!0)}switch(n){case oK.RETURN:if(t.preventDefault(),e.props.handleReturn&&sK(e.props.handleReturn(t,r)))return;break;case oK.ESC:if(t.preventDefault(),o("onEscape"))return;break;case oK.TAB:if(o("onTab"))return;break;case oK.UP:if(o("onUpArrow"))return;break;case oK.RIGHT:if(o("onRightArrow"))return;break;case oK.DOWN:if(o("onDownArrow"))return;break;case oK.LEFT:if(o("onLeftArrow"))return;break;case oK.SPACE:yK&&bK(t)&&t.preventDefault()}var i=e.props.keyBindingFn(t);if(null!=i&&""!==i)if("undo"!==i){if(t.preventDefault(),!e.props.handleKeyCommand||!sK(e.props.handleKeyCommand(i,r,t.timeStamp))){var a=function(e,t,n){switch(e){case"redo":return rK.redo(t);case"delete":return gK(t);case"delete-word":return uK(t);case"backspace":return hK(t);case"backspace-word":return cK(t);case"backspace-to-start-of-line":return lK(t,n);case"split-block":return dK(t);case"transpose-characters":return mK(t);case"move-selection-to-start-of-block":return pK(t);case"move-selection-to-end-of-block":return fK(t);case"secondary-cut":return iK.cut(t);case"secondary-paste":return iK.paste(t);default:return t}}(i,r,t);a!==r&&e.update(a)}}else vK(t,r,e.update);else if(n===oK.SPACE&&yK&&bK(t)){var s=nK.replaceText(r.getCurrentContent(),r.getSelection()," ");e.update(rK.push(r,s,"insert-characters"))}};var wK=function(){function e(e){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}(),_K=wK,SK=XM,kK=tN.isBrowser("IE <= 9");var EK=function(e){var t,n=null;return!kK&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||SK(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n},CK=rN;var jK=function(e){return!(!e||!e.ownerDocument)&&(CK(e)&&"A"===e.nodeName)},OK=rN;var TK,IK=function(e){return!(!e||!e.ownerDocument)&&(OK(e)&&"IMG"===e.nodeName)};function RK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){PK(e,t,n[t])}))}return e}function PK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MK=cM,AK=kM,DK=NM,FK=xL,LK=KD,NK=_K,BK=vL,zK=sA,$K=EK,VK=WD,HK=JP,KK=HK.List,UK=HK.Map,GK=HK.OrderedSet,WK=jK,qK=CB,YK=EN,JK=IK,XK=VK("draft_tree_data_support"),ZK=new RegExp("\r","g"),QK=new RegExp("\n","g"),eU=new RegExp("^\n","g"),tU=new RegExp("&nbsp;","g"),nU=new RegExp("&#13;?","g"),rU=new RegExp("&#8203;?","g"),oU=["bold","bolder","500","600","700","800","900"],iU=["light","lighter","normal","100","200","300","400"],aU=["className","href","rel","target","title"],sU=["alt","className","height","src","width"],lU=(PK(TK={},BK("public/DraftStyleDefault/depth0"),0),PK(TK,BK("public/DraftStyleDefault/depth1"),1),PK(TK,BK("public/DraftStyleDefault/depth2"),2),PK(TK,BK("public/DraftStyleDefault/depth3"),3),PK(TK,BK("public/DraftStyleDefault/depth4"),4),TK),cU=UK({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),uU=function(e){if(YK(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},dU=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(lU).some((function(n){e.classList.contains(n)&&(t=lU[n])})),t},fU=function(e){if(!WK(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new NK(t.href);return!0}catch{return!1}},pU=function(e){if(!JK(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},hU=function(e,t){if(!YK(e))return t;var n=e,r=n.style.fontWeight,o=n.style.fontStyle,i=n.style.textDecoration;return t.withMutations((function(e){oU.indexOf(r)>=0?e.add("BOLD"):iU.indexOf(r)>=0&&e.remove("BOLD"),"italic"===o?e.add("ITALIC"):"normal"===o&&e.remove("ITALIC"),"underline"===i&&e.add("UNDERLINE"),"line-through"===i&&e.add("STRIKETHROUGH"),"none"===i&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},gU=function(e){return"ul"===e||"ol"===e},mU=function(){function e(e,t){PK(this,"characterList",KK()),PK(this,"currentBlockType","unstyled"),PK(this,"currentDepth",0),PK(this,"currentEntity",null),PK(this,"currentText",""),PK(this,"wrapper",null),PK(this,"blockConfigs",[]),PK(this,"contentBlocks",[]),PK(this,"entityMap",LK),PK(this,"blockTypeMap",void 0),PK(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=KK(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=LK,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],GK())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(XK?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=RK({key:e.key||zK(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:KK(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=KK(),this.currentBlockType="unstyled",this.currentText="",t},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=o.nodeName.toLowerCase();if("body"===i||gU(i)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,s=this.wrapper;gU(i)&&(this.wrapper=i,gU(s)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),t)),this.currentDepth=a,this.wrapper=s}else{var l=this.blockTypeMap.get(i);if(void 0===l)if("#text"!==i)if("br"!==i)if(pU(o))this._addImgNode(o,t);else if(fU(o))this._addAnchorNode(o,n,t);else{var c=t;cU.has(i)&&(c=c.add(cU.get(i))),c=hU(o,c);var u=uU(o);null!=u&&(c=c.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),c))}else this._addBreakNode(o,t);else this._addTextNode(o,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var d=this.currentDepth,f=this.wrapper;if(this.wrapper="pre"===i?"pre":this.wrapper,"string"!=typeof l&&(l=this.disambiguate(i,this.wrapper)||l[0]||"unstyled"),!XK&&YK(o)&&("unordered-list-item"===l||"ordered-list-item"===l)){var p=o;this.currentDepth=dU(p,this.currentDepth)}var h=zK(),g=this._toBlockConfigs(Array.from(o.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:h,childConfigs:g,type:l})),this.currentDepth=d,this.wrapper=f}}}return n},t._appendText=function(e,t){var n;this.currentText+=e;var r=MK.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(r))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry((function(e){return null!==e.getEntity()}));t=void 0!==r?Math.min(t,r[0]):t,r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})),t>(n=void 0!==r?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=KK()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(eU,"")).replace(QK," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){qK(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(JK(e)){var n=e,r={};sU.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),VK("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(WK(e)){var r=e,o={};aU.forEach((function(e){var t=r.getAttribute(e);t&&(o[e]=t)})),o.url=new NK(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=r>0?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=KK(o.childConfigs.map((function(e){return e.key}))),this.contentBlocks.push(new DK(RK({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this,n=KK(e).flatMap((function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)}));return n},t._toFlatContentBlocks=function(e){var t=this;this._hoistContainersInBlockConfigs(e).forEach((function(e){var n=t._extractTextFromBlockConfigs(e.childConfigs),r=n.text,o=n.characterList;t.contentBlocks.push(new AK(RK({},e,{text:e.text+r,characterList:e.characterList.concat(o)})))}))},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=KK(),o=0;o<=t;o++){var i=e[o];n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(i.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}(),vU=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FK,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:$K)(e=e.trim().replace(ZK,"").replace(tU," ").replace(nU,"").replace(rU,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys((function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach((function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)}))})),UK(t)}(t);return new mU(r,(function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null})).addDOMNode(n).getContentBlocks()};function bU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yU=kM,xU=NM,wU=vU,_U=sA,SU=EK,kU=WD,EU=JP,CU=YD,jU=EU.List,OU=EU.Repeat,TU=kU("draft_tree_data_support"),IU=TU?xU:yU,RU={processHTML:function(e,t){return wU(e,SU,t)},processText:function(e,t,n){return e.reduce((function(e,r,o){r=CU(r);var i=_U(),a={key:i,type:n,text:r,characterList:jU(OU(t,r.length))};if(TU&&0!==o){var s=o-1;a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bU(e,t,n[t])}))}return e}({},a,{prevSibling:(e[s]=e[s].merge({nextSibling:i})).getKey()})}return e.push(new IU(a)),e}),[])}};var PU=function(e,t,n,r){var o=t.getStartKey(),i=t.getEndKey(),a=e.getBlockMap(),s=a.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===i})).concat([[i,a.get(i)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return a=a.merge(s),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})},MU=vD,AU=pL,DU=PU,FU=KF,LU={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return LU.toggleInlineStyle(e,"BOLD");case"italic":return LU.toggleInlineStyle(e,"ITALIC");case"underline":return LU.toggleInlineStyle(e,"UNDERLINE");case"code":return LU.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return LU.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return LU.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=MU.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=AU.push(e,t,"insert-characters");return AU.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockBefore(r);if(o&&"atomic"===o.getType()){var i=n.getBlockMap().delete(o.getKey()),a=n.merge({blockMap:i,selectionAfter:t});if(a!==n)return AU.push(e,a,"remove-range")}var s=LU.tryToRemoveBlockStyle(e);return s?AU.push(e,s,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;var i=n.getBlockAfter(r);if(!i||"atomic"!==i.getType())return null;var a=t.merge({focusKey:i.getKey(),focusOffset:i.getLength()}),s=MU.removeRange(n,a,"forward");return s!==n?AU.push(e,s,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),o=r.getAnchorKey();if(o!==r.getFocusKey())return t;var i=t.getCurrentContent(),a=i.getBlockForKey(o),s=a.getType();if("unordered-list-item"!==s&&"ordered-list-item"!==s)return t;e.preventDefault();var l=a.getDepth();if(!e.shiftKey&&l===n)return t;var c=DU(i,r,e.shiftKey?-1:1,n);return AU.push(t,c,"adjust-depth")},toggleBlockType:function(e,t){var n=e.getSelection(),r=n.getStartKey(),o=n.getEndKey(),i=e.getCurrentContent(),a=n;if(r!==o&&0===n.getEndOffset()){var s=FU(i.getBlockBefore(o));o=s.getKey(),a=a.merge({anchorKey:r,anchorOffset:n.getStartOffset(),focusKey:o,focusOffset:s.getLength(),isBackward:!1})}var l=i.getBlockMap().skipWhile((function(e,t){return t!==r})).reverse().skipWhile((function(e,t){return t!==o})).some((function(e){return"atomic"===e.getType()}));if(l)return e;var c=i.getBlockForKey(r).getType()===t?"unstyled":t;return AU.push(e,MU.setBlockType(i,a,c),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?LU.toggleBlockType(e,"code-block"):LU.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),r=e.getCurrentInlineStyle();if(n.isCollapsed())return AU.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o,i=e.getCurrentContent();return o=r.has(t)?MU.removeInlineStyle(i,n,t):MU.applyInlineStyle(i,n,t),AU.push(e,o,"change-inline-style")},toggleLink:function(e,t,n){var r=MU.applyEntity(e.getCurrentContent(),t,n);return AU.push(e,r,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var r=t.getAnchorKey(),o=e.getCurrentContent(),i=o.getBlockForKey(r).getType(),a=o.getBlockBefore(r);if("code-block"===i&&a&&"code-block"===a.getType()&&0!==a.getLength())return null;if("unstyled"!==i)return MU.setBlockType(o,t,"unstyled")}return null}},NU=LU,BU=/\r\n?|\n/g;var zU=QP,$U=cM,VU=x$,HU=vD,KU=RU,UU=pL,GU=NU,WU=XN,qU=k$,YU=E$,JU=function(e){return e.split(BU)};function XU(e,t,n){var r=HU.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return UU.push(e,r.set("entityMap",n),"insert-fragment")}var ZU=function(e,t){t.preventDefault();var n=new VU(t.clipboardData);if(!n.isRichText()){var r=n.getFiles(),o=n.getText();if(r.length>0){if(e.props.handlePastedFiles&&YU(e.props.handlePastedFiles(r)))return;return void qU(r,(function(t){if(t=t||o){var n=e._latestEditorState,r=JU(t),i=$U.create({style:n.getCurrentInlineStyle(),entity:WU(n.getCurrentContent(),n.getSelection())}),a=GU.getCurrentBlockType(n),s=KU.processText(r,i,a),l=zU.createFromArray(s),c=HU.replaceWithFragment(n.getCurrentContent(),n.getSelection(),l);e.update(UU.push(n,c,"insert-fragment"))}}))}}var i=[],a=n.getText(),s=n.getHTML(),l=e._latestEditorState;if(e.props.formatPastedText){var c=e.props.formatPastedText(a,s);a=c.text,s=c.html}if(!e.props.handlePastedText||!YU(e.props.handlePastedText(a,s,l))){if(a&&(i=JU(a)),!e.props.stripPastedStyles){var u,d=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&d){if(-1!==(null===(u=s)||void 0===u?void 0:u.indexOf(e.getEditorKey()))||1===i.length&&1===d.size&&d.first().getText()===a)return void e.update(XU(e._latestEditorState,d))}else if(d&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(i,d))return void e.update(XU(e._latestEditorState,d));if(s){var f=KU.processHTML(s,e.props.blockRenderMap);if(f){var p=f.contentBlocks,h=f.entityMap;if(p){var g=zU.createFromArray(p);return void e.update(XU(e._latestEditorState,g,h))}}}e.setClipboard(null)}if(i.length){var m=$U.create({style:l.getCurrentInlineStyle(),entity:WU(l.getCurrentContent(),l.getSelection())}),v=GU.getCurrentBlockType(l),b=KU.processText(i,m,v),y=zU.createFromArray(b);e.update(XU(e._latestEditorState,y))}}},QU=tN,eG=X$,tG=tV,nG=rV,rG=sV,oG=gV,iG=mV,aG=vV,sG=xV,lG=GV,cG=xK,uG=ZU,dG=WN,fG=QU.isBrowser("Chrome"),pG=QU.isBrowser("Firefox"),hG=fG||pG?dG:function(e){},gG={onBeforeInput:eG,onBlur:tG,onCompositionStart:nG,onCopy:rG,onCut:oG,onDragOver:iG,onDragStart:aG,onFocus:sG,onInput:lG,onKeyDown:cG,onPaste:uG,onSelect:dG,onMouseUp:hG,onKeyUp:hG},mG=cc.unstable_flushControlled;var vG=s,bG=vL,yG=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},n.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=bG({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return vG.createElement("div",{className:t},vG.createElement("div",{className:bG("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},t}(vG.Component),xG=yG,wG=XV,_G=SN,SG=tN,kG=SG.isPlatform("Mac OS X"),EG=kG&&SG.isBrowser("Firefox < 29"),CG=wG.hasCommandModifier,jG=wG.isCtrlKeyCommand;function OG(e){return kG&&e.altKey||jG(e)}var TG=function(e){switch(e.keyCode){case 66:return CG(e)?"bold":null;case 68:return jG(e)?"delete":null;case 72:return jG(e)?"backspace":null;case 73:return CG(e)?"italic":null;case 74:return CG(e)?"code":null;case 75:return kG&&jG(e)?"secondary-cut":null;case 77:case 79:return jG(e)?"split-block":null;case 84:return kG&&jG(e)?"transpose-characters":null;case 85:return CG(e)?"underline":null;case 87:return kG&&jG(e)?"backspace-word":null;case 89:return jG(e)?kG?"secondary-paste":"redo":null;case 90:return function(e){return CG(e)?e.shiftKey?"redo":"undo":null}(e)||null;case _G.RETURN:return"split-block";case _G.DELETE:return function(e){return!kG&&e.shiftKey?null:OG(e)?"delete-word":"delete"}(e);case _G.BACKSPACE:return function(e){return CG(e)&&kG?"backspace-to-start-of-line":OG(e)?"backspace-word":"backspace"}(e);case _G.LEFT:return EG&&CG(e)?"move-selection-to-start-of-block":null;case _G.RIGHT:return EG&&CG(e)?"move-selection-to-end-of-block":null;default:return null}},IG=Ou;function RG(){return RG=IG||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RG.apply(this,arguments)}function PG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AG(e,t,n[t])}))}return e}function MG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DG(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var FG=xL,LG=wL,NG=gB,BG=o$,zG=B$,$G=gG,VG=mG,HG=xG,KG=jB,UG=pL,GG=s,WG=sz,qG=vz,YG=vL,JG=sA,XG=TG,ZG=Ez,QG=WD,eW=XM,tW=EN,nW=KF,rW=tN.isBrowser("IE"),oW=!rW,iW={edit:$G,composite:NG,drag:zG,cut:null,render:null},aW=!1,sW=function(e){function t(){return e.apply(this,arguments)||this}DG(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(GG.Component),lW=function(e){function t(t){var n;return AG(MG(n=e.call(this,t)||this),"_blockSelectEvents",void 0),AG(MG(n),"_clipboard",void 0),AG(MG(n),"_handler",void 0),AG(MG(n),"_dragCount",void 0),AG(MG(n),"_internalDrag",void 0),AG(MG(n),"_editorKey",void 0),AG(MG(n),"_placeholderAccessibilityID",void 0),AG(MG(n),"_latestEditorState",void 0),AG(MG(n),"_latestCommittedEditorState",void 0),AG(MG(n),"_pendingStateFromBeforeInput",void 0),AG(MG(n),"_onBeforeInput",void 0),AG(MG(n),"_onBlur",void 0),AG(MG(n),"_onCharacterData",void 0),AG(MG(n),"_onCompositionEnd",void 0),AG(MG(n),"_onCompositionStart",void 0),AG(MG(n),"_onCopy",void 0),AG(MG(n),"_onCut",void 0),AG(MG(n),"_onDragEnd",void 0),AG(MG(n),"_onDragOver",void 0),AG(MG(n),"_onDragStart",void 0),AG(MG(n),"_onDrop",void 0),AG(MG(n),"_onInput",void 0),AG(MG(n),"_onFocus",void 0),AG(MG(n),"_onKeyDown",void 0),AG(MG(n),"_onKeyPress",void 0),AG(MG(n),"_onKeyUp",void 0),AG(MG(n),"_onMouseDown",void 0),AG(MG(n),"_onMouseUp",void 0),AG(MG(n),"_onPaste",void 0),AG(MG(n),"_onSelect",void 0),AG(MG(n),"editor",void 0),AG(MG(n),"editorContainer",void 0),AG(MG(n),"focus",void 0),AG(MG(n),"blur",void 0),AG(MG(n),"setMode",void 0),AG(MG(n),"exitCurrentMode",void 0),AG(MG(n),"restoreEditorDOM",void 0),AG(MG(n),"setClipboard",void 0),AG(MG(n),"getClipboard",void 0),AG(MG(n),"getEditorKey",void 0),AG(MG(n),"update",void 0),AG(MG(n),"onDragEnter",void 0),AG(MG(n),"onDragLeave",void 0),AG(MG(n),"_handleEditorContainerRef",(function(e){n.editorContainer=e,n.editor=null!==e?e.firstChild:null})),AG(MG(n),"focus",(function(e){var t=n.props.editorState,r=t.getSelection().getHasFocus(),o=n.editor;if(o){var i=qG.getScrollParent(o),a=e||ZG(i),s=a.x,l=a.y;tW(o)||eW(!1),o.focus(),i===window?window.scrollTo(s,l):WG.setTop(i,l),r||n.update(UG.forceSelection(t,t.getSelection()))}})),AG(MG(n),"blur",(function(){var e=n.editor;e&&(tW(e)||eW(!1),e.blur())})),AG(MG(n),"setMode",(function(e){var t=n.props,r=t.onPaste,o=t.onCut,i=t.onCopy,a=PG({},iW.edit);r&&(a.onPaste=r),o&&(a.onCut=o),i&&(a.onCopy=i);var s=PG({},iW,{edit:a});n._handler=s[e]})),AG(MG(n),"exitCurrentMode",(function(){n.setMode("edit")})),AG(MG(n),"restoreEditorDOM",(function(e){n.setState({contentsKey:n.state.contentsKey+1},(function(){n.focus(e)}))})),AG(MG(n),"setClipboard",(function(e){n._clipboard=e})),AG(MG(n),"getClipboard",(function(){return n._clipboard})),AG(MG(n),"update",(function(e){n._latestEditorState=e,n.props.onChange(e)})),AG(MG(n),"onDragEnter",(function(){n._dragCount++})),AG(MG(n),"onDragLeave",(function(){n._dragCount--,0===n._dragCount&&n.exitCurrentMode()})),n._blockSelectEvents=!1,n._clipboard=null,n._handler=null,n._dragCount=0,n._editorKey=t.editorKey||JG(),n._placeholderAccessibilityID="placeholder-"+n._editorKey,n._latestEditorState=t.editorState,n._latestCommittedEditorState=t.editorState,n._onBeforeInput=n._buildHandler("onBeforeInput"),n._onBlur=n._buildHandler("onBlur"),n._onCharacterData=n._buildHandler("onCharacterData"),n._onCompositionEnd=n._buildHandler("onCompositionEnd"),n._onCompositionStart=n._buildHandler("onCompositionStart"),n._onCopy=n._buildHandler("onCopy"),n._onCut=n._buildHandler("onCut"),n._onDragEnd=n._buildHandler("onDragEnd"),n._onDragOver=n._buildHandler("onDragOver"),n._onDragStart=n._buildHandler("onDragStart"),n._onDrop=n._buildHandler("onDrop"),n._onInput=n._buildHandler("onInput"),n._onFocus=n._buildHandler("onFocus"),n._onKeyDown=n._buildHandler("onKeyDown"),n._onKeyPress=n._buildHandler("onKeyPress"),n._onKeyUp=n._buildHandler("onKeyUp"),n._onMouseDown=n._buildHandler("onMouseDown"),n._onMouseUp=n._buildHandler("onMouseUp"),n._onPaste=n._buildHandler("onPaste"),n._onSelect=n._buildHandler("onSelect"),n.getEditorKey=function(){return n._editorKey},n.state={contentsKey:0},n}DG(t,e);var n=t.prototype;return n._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(VG?VG((function(){return r(t,n)})):r(t,n))}}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:nW(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return GG.createElement(HG,e)}return null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleFn,i=e.customStyleMap,a=e.editorState,s=e.preventScroll,l=e.readOnly,c=e.textAlignment,u=e.textDirectionality,d=YG({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===c,"DraftEditor/alignRight":"right"===c,"DraftEditor/alignCenter":"center"===c}),f=this.props.role||"textbox",p="combobox"===f?!!this.props.ariaExpanded:null,h={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:PG({},LG,i),customStyleFn:o,editorKey:this._editorKey,editorState:a,preventScroll:s,textDirectionality:u};return GG.createElement("div",{className:d},this._renderPlaceholder(),GG.createElement("div",{className:YG("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},GG.createElement("div",{"aria-activedescendant":l?null:this.props.ariaActiveDescendantID,"aria-autocomplete":l?null:this.props.ariaAutoComplete,"aria-controls":l?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":l?null:p,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":l?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:YG({notranslate:!l,"public/DraftEditor/content":!0}),contentEditable:!l,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:l?null:f,spellCheck:oW&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},GG.createElement(sW,{editor:this,editorState:a}),GG.createElement(BG,RG({},h,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!aW&&QG("draft_ods_enabled")&&(aW=!0,KG.initODS()),this.setMode("edit"),rW&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):kc.execCommand("AutoUrlDetect",!1,!1))},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},t}(GG.Component);AG(lW,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:FG,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:XG,readOnly:!1,spellCheck:!1,stripPastedStyles:!1});JP.List;var cW=JP.OrderedSet;cW();var uW=JP;WD("draft_tree_data_support"),uW.List,uW.Map,uW.OrderedMap;var dW=Object.create,fW=Object.defineProperty,pW=Object.getPrototypeOf,hW=Object.prototype.hasOwnProperty,gW=Object.getOwnPropertyNames,mW=Object.getOwnPropertyDescriptor,vW=Object.assign,bW=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yW=(e,t,n)=>{if((e=>{fW(e,"__esModule",{value:!0})})(e),t&&"object"==typeof t||"function"==typeof t)for(let r of gW(t))!hW.call(e,r)&&"default"!==r&&fW(e,r,{get:()=>t[r],enumerable:!(n=mW(t,r))||n.enumerable});return e},xW=e=>e&&e.__esModule?e:yW(fW(null!=e?dW(pW(e)):{},"default",{value:e,enumerable:!0}),e),wW=bW(((e,t)=>{var n={BOLD:"__",ITALIC:"*"},r={"unordered-list-item":"- ","header-one":"# ","header-two":"## ","header-three":"### ","header-four":"#### ","header-five":"##### ","header-six":"###### ",blockquote:"> "},o={"code-block":"```"};function i(e,t){let{symbol:n}=t,r=e.slice(0,t.range.start),o=e.slice(t.range.start,t.range.end),i=o.trim(),a=e.slice(t.range.end),s=t.range.start+o.indexOf(i),l=e.slice(t.range.start,s),c=e.slice(s+i.length,t.range.end);return`${r}${i}${a}`.replace(`${n}${i}${n}`,`${l}${n}${i}${n}${c}`)}t.exports=function(e,t){let a=vW(vW({},n),t),s=[];return e.blocks.map((t=>{let n=0,l="";l+=((e,t)=>"ordered-list-item"===e?`${t.reduce(((e,t)=>"ordered-list-item"===t?e+1:e),1)}. `:r[e]||"")(t.type,s),s.push(t.type);let c=[];return l+=Array.from(t.text).reduce(((r,o,s)=>{let l=r;for(function(e){return[...e].sort(((e,t)=>t.length-e.length))}(t.inlineStyleRanges).filter((e=>e.offset===s)).filter((e=>a[e.style])).forEach((e=>{let t=a[e.style].length;l+=a[e.style],n+=t,c.push({symbol:a[e.style],range:{start:e.offset+n,end:e.offset+e.length+n},end:e.offset+(e.length-1)})})),t.entityRanges.filter((e=>e.offset===s)).forEach((t=>{l+=(e=>"LINK"===e.type?"[":"")(e.entityMap[t.key])})),l+=o,t.entityRanges.filter((e=>e.offset+e.length-1===s)).forEach((t=>{l+=(e=>"LINK"===e.type?`](${e.data.url})`:"")(e.entityMap[t.key])}));0!==c.length&&c[c.length-1].end===s;){let e=c.pop();l+=e.symbol,l=i(l,e),n+=e.symbol.length}return l}),""),l=((e,t)=>{if(e in o){let n=o[e];return`${n}\n${t}\n${n}`}return t})(t.type,l),l=((e,t,n)=>{if("atomic"!==e.type)return n;let r=n.substring(0,n.length-e.text.length),o=e.entityRanges[0].key,i=t[o].type,a=t[o].data;return"draft-js-video-plugin-video"===i?`${r}[[ embed url=${a.url||a.src} ]]`:`${r}![${a.fileName||""}](${a.url||a.src})`})(t,e.entityMap,l),l})).join("\n")}})),_W=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ASTNodeTypes=void 0,function(e){e.Document="Document",e.DocumentExit="Document:exit",e.Paragraph="Paragraph",e.ParagraphExit="Paragraph:exit",e.BlockQuote="BlockQuote",e.BlockQuoteExit="BlockQuote:exit",e.ListItem="ListItem",e.ListItemExit="ListItem:exit",e.List="List",e.ListExit="List:exit",e.Header="Header",e.HeaderExit="Header:exit",e.CodeBlock="CodeBlock",e.CodeBlockExit="CodeBlock:exit",e.HtmlBlock="HtmlBlock",e.HtmlBlockExit="HtmlBlock:exit",e.HorizontalRule="HorizontalRule",e.HorizontalRuleExit="HorizontalRule:exit",e.Comment="Comment",e.CommentExit="Comment:exit",e.ReferenceDef="ReferenceDef",e.ReferenceDefExit="ReferenceDef:exit",e.Str="Str",e.StrExit="Str:exit",e.Break="Break",e.BreakExit="Break:exit",e.Emphasis="Emphasis",e.EmphasisExit="Emphasis:exit",e.Strong="Strong",e.StrongExit="Strong:exit",e.Html="Html",e.HtmlExit="Html:exit",e.Link="Link",e.LinkExit="Link:exit",e.Image="Image",e.ImageExit="Image:exit",e.Code="Code",e.CodeExit="Code:exit",e.Delete="Delete",e.DeleteExit="Delete:exit"}(e.ASTNodeTypes||(e.ASTNodeTypes={}))})),SW=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SyntaxMap=void 0;var t=_W();e.SyntaxMap={root:t.ASTNodeTypes.Document,paragraph:t.ASTNodeTypes.Paragraph,blockquote:t.ASTNodeTypes.BlockQuote,listItem:t.ASTNodeTypes.ListItem,list:t.ASTNodeTypes.List,Bullet:"Bullet",heading:t.ASTNodeTypes.Header,code:t.ASTNodeTypes.CodeBlock,HtmlBlock:t.ASTNodeTypes.HtmlBlock,thematicBreak:t.ASTNodeTypes.HorizontalRule,text:t.ASTNodeTypes.Str,break:t.ASTNodeTypes.Break,emphasis:t.ASTNodeTypes.Emphasis,strong:t.ASTNodeTypes.Strong,html:t.ASTNodeTypes.Html,link:t.ASTNodeTypes.Link,image:t.ASTNodeTypes.Image,inlineCode:t.ASTNodeTypes.Code,delete:t.ASTNodeTypes.Delete,yaml:"Yaml",table:"Table",tableRow:"TableRow",tableCell:"TableCell",linkReference:"LinkReference",imageReference:"ImageReference",footnoteReference:"FootnoteReference",definition:"Definition",ReferenceDef:t.ASTNodeTypes.ReferenceDef}})),kW=bW(((e,t)=>{var n=t.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(d){var f=n?i(d):d,p={},h=!0,g={node:f,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){g.isRoot||(g.parent.node[g.key]=e),g.node=e,t&&(h=!1)},delete:function(e){delete g.parent.node[g.key],e&&(h=!1)},remove:function(e){l(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],e&&(h=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){s=!1},block:function(){h=!1}};if(!s)return g;function m(){if("object"==typeof g.node&&null!==g.node){(!g.keys||g.node_!==g.node)&&(g.keys=a(g.node)),g.isLeaf=0==g.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){g.circular=o[e];break}}else g.isLeaf=!0,g.keys=null;g.notLeaf=!g.isLeaf,g.notRoot=!g.isRoot}m();var v=t.call(g,g.node);return void 0!==v&&g.update&&g.update(v),p.before&&p.before.call(g,g.node),h&&("object"==typeof g.node&&null!==g.node&&!g.circular&&(o.push(g),m(),c(g.keys,(function(t,o){r.push(t),p.pre&&p.pre.call(g,g.node[t],t);var i=e(g.node[t]);n&&u.call(g.node,t)&&(g.node[t]=i.node),i.isLast=o==g.keys.length-1,i.isFirst=0==o,p.post&&p.post.call(g,i),r.pop()})),o.pop()),p.after&&p.after.call(g,g.node)),g}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if(function(e){return"[object Date]"===s(e)}(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===s(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===s(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===s(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===s(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===s(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return c(a(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){(!this.isRoot||!n)&&(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var s=i(r);return e.push(r),t.push(s),c(a(r),(function(e){s[e]=n(r[e])})),e.pop(),t.pop(),s}return r}(this.value)};var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function s(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};c(a(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}})),EW=bW(((e,t)=>{var n=1e3,r=60*n,o=60*r,i=24*o,a=7*i,s=365.25*i;function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}t.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*a;case"days":case"day":case"d":return l*i;case"hours":case"hour":case"hrs":case"hr":case"h":return l*o;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=i?l(e,t,i,"day"):t>=o?l(e,t,o,"hour"):t>=r?l(e,t,r,"minute"):t>=n?l(e,t,n,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}})),CW=bW(((e,t)=>{t.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;let n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;let i=t.formatters[o];if("function"==typeof i){let t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){let r=t(this.namespace+(typeof n>"u"?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n,r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)!r[n]||("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=EW(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}})),jW=bW(((e,t)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=CW()(e);var{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),OW=bW(((e,t)=>{t.exports=function(e){if(e)throw e}})),TW=bW(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),IW=bW(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};t.exports=function e(){var t,n,r,o,i,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,o)})):typeof o<"u"&&l(d,{name:n,newValue:o}));return d}})),RW=bW(((e,t)=>{t.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}})),PW=bW(((e,t)=>{var n=[].slice;t.exports=function(e,t){var r;return function(){var t,a=n.call(arguments,0),s=e.length>a.length;s&&a.push(o);try{t=e.apply(null,a)}catch(e){if(s&&r)throw e;return o(e)}s||(t&&"function"==typeof t.then?t.then(i,o):t instanceof Error?o(t):i(t))};function o(){r||(r=!0,t.apply(null,arguments))}function i(e){o(null,e)}}})),MW=bW(((e,t)=>{var n=PW();t.exports=o,o.wrap=n;var r=[].slice;function o(){var e=[],t={run:function(){var t=-1,o=r.call(arguments,0,-1),i=arguments[arguments.length-1];if("function"!=typeof i)throw new Error("Expected function as last argument, not "+i);(function a(s){var l=e[++t],c=r.call(arguments,0).slice(1),u=o.length,d=-1;if(s)i(s);else{for(;++d<u;)(null===c[d]||void 0===c[d])&&(c[d]=o[d]);o=c,l?n(l,a).apply(null,o):i.apply(null,[null].concat(o))}}).apply(null,[null].concat(o))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}})),AW=bW(((e,t)=>{var n={}.hasOwnProperty;function r(e){return(!e||"object"!=typeof e)&&(e={}),i(e.line)+":"+i(e.column)}function o(e){return(!e||"object"!=typeof e)&&(e={}),r(e.start)+"-"+r(e.end)}function i(e){return e&&"number"==typeof e?e:1}t.exports=function(e){return e&&"object"==typeof e?n.call(e,"position")||n.call(e,"type")?o(e.position):n.call(e,"start")||n.call(e,"end")?o(e):n.call(e,"line")||n.call(e,"column")?r(e):"":""}})),DW=bW(((e,t)=>{var n=AW();function r(){}t.exports=i,r.prototype=Error.prototype,i.prototype=new r;var o=i.prototype;function i(e,t,r){var o,i,a;"string"==typeof t&&(r=t,t=null),o=function(e){var t,n=[null,null];return"string"==typeof e&&(t=e.indexOf(":"),-1===t?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1))),n}(r),i=n(t)||"1:1",a={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(a=t,t=t.start):a.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=i,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=a,this.source=o[0],this.ruleId=o[1]}o.file="",o.name="",o.reason="",o.message="",o.stack="",o.fatal=null,o.column=null,o.line=null})),FW=bW((e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}e.basename=function(e,n){var r,o,i,a,s=0,l=-1;if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');if(t(e),r=e.length,void 0===n||!n.length||n.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else l<0&&(i=!0,l=r+1);return l<0?"":e.slice(s,l)}if(n===e)return"";for(o=-1,a=n.length-1;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else o<0&&(i=!0,o=r+1),a>-1&&(e.charCodeAt(r)===n.charCodeAt(a--)?a<0&&(l=r):(a=-1,l=o));return s===l?l=o:l<0&&(l=e.length),e.slice(s,l)},e.dirname=function(e){var n,r,o;if(t(e),!e.length)return".";for(n=-1,o=e.length;--o;)if(47===e.charCodeAt(o)){if(r){n=o;break}}else r||(r=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},e.extname=function(e){var n,r,o,i=-1,a=0,s=-1,l=0;for(t(e),o=e.length;o--;)if(47!==(r=e.charCodeAt(o)))s<0&&(n=!0,s=o+1),46===r?i<0?i=o:1!==l&&(l=1):i>-1&&(l=-1);else if(n){a=o+1;break}return i<0||s<0||0===l||1===l&&i===s-1&&i===a+1?"":e.slice(i,s)},e.join=function(){for(var e,n=-1;++n<arguments.length;)t(arguments[n]),arguments[n]&&(e=void 0===e?arguments[n]:e+"/"+arguments[n]);return void 0===e?".":function(e){var n,r;return t(e),n=47===e.charCodeAt(0),r=function(e,t){for(var n,r,o="",i=0,a=-1,s=0,l=-1;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a!==l-1&&1!==s)if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",i=0):i=(o=o.slice(0,r)).length-1-o.lastIndexOf("/"),a=l,s=0;continue}}else if(o.length){o="",i=0,a=l,s=0;continue}t&&(o=o.length?o+"/..":"..",i=2)}else o.length?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!n),!r.length&&!n&&(r="."),r.length&&47===e.charCodeAt(e.length-1)&&(r+="/"),n?"/"+r:r}(e)},e.sep="/"})),LW=bW((e=>{e.cwd=function(){return"/"}})),NW=bW(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),BW=bW(((e,t)=>{var n=FW(),r=LW(),o=NW();t.exports=s;var i={}.hasOwnProperty,a=["history","path","basename","stem","extname","dirname"];function s(e){var t,n;if(e){if("string"==typeof e||o(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof s))return new s(e);for(this.data={},this.messages=[],this.history=[],this.cwd=r.cwd(),n=-1;++n<a.length;)t=a[n],i.call(e,t)&&(this[t]=e[t]);for(t in e)a.indexOf(t)<0&&(this[t]=e[t])}function l(e,t){if(e&&e.indexOf(n.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function c(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}s.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(s.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){c(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(s.prototype,"dirname",{get:function(){return"string"==typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(s.prototype,"basename",{get:function(){return"string"==typeof this.path?n.basename(this.path):void 0},set:function(e){c(e,"basename"),l(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(s.prototype,"extname",{get:function(){return"string"==typeof this.path?n.extname(this.path):void 0},set:function(e){if(l(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(s.prototype,"stem",{get:function(){return"string"==typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){c(e,"stem"),l(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})})),zW=bW(((e,t)=>{var n=DW(),r=BW();t.exports=r,r.prototype.message=function(e,t,r){var o=new n(e,t,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o},r.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},r.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}})),$W=bW(((e,t)=>{t.exports=zW()})),VW=bW(((e,t)=>{var n=OW(),r=TW(),o=IW(),i=RW(),a=MW(),s=$W();t.exports=function e(){var t,r=[],v=a(),b={},y=-1;return x.data=function(e,n){return"string"==typeof e?2===arguments.length?(h("data",t),b[e]=n,x):c.call(b,e)&&b[e]||null:e?(h("data",t),b=e,x):b},x.freeze=w,x.attachers=r,x.use=function(e){var n;if(h("use",t),null!=e)if("function"==typeof e)u.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):a(e)}return n&&(b.settings=o(b.settings||{},n)),x;function a(e){c(e.plugins),e.settings&&(n=o(n||{},e.settings))}function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):a(e)}}function c(e){var t=-1;if(null!=e){if("object"!=typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function u(e,t){var n=function(e){for(var t=-1;++t<r.length;)if(r[t][0]===e)return r[t]}(e);n?(i(n[1])&&i(t)&&(t=o(!0,n[1],t)),n[1]=t):r.push(l.call(arguments))}},x.parse=function(e){var t,n=s(e);return w(),t=x.Parser,f("parse",t),d(t,"parse")?new t(String(n),n).parse():t(String(n),n)},x.stringify=function(e,t){var n,r=s(t);return w(),n=x.Compiler,p("stringify",n),g(e),d(n,"compile")?new n(e,r).compile():n(e,r)},x.run=_,x.runSync=function(e,t){var r,o;return _(e,t,i),m("runSync","run",o),r;function i(e,t){o=!0,r=t,n(e)}},x.process=S,x.processSync=function(e){var t,r;return w(),f("processSync",x.Parser),p("processSync",x.Compiler),t=s(e),S(t,o),m("processSync","process",r),t;function o(e){r=!0,n(e)}},x;function x(){for(var t=e(),n=-1;++n<r.length;)t.use.apply(null,r[n]);return t.data(o(!0,{},b)),t}function w(){var e,n;if(t)return x;for(;++y<r.length;)!1!==(e=r[y])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(n=e[0].apply(x,e.slice(1)))&&v.use(n));return t=!0,y=1/0,x}function _(e,t,n){if(g(e),w(),!n&&"function"==typeof t&&(n=t,t=null),!n)return new Promise(r);function r(r,o){v.run(e,s(t),(function(t,i,a){i=i||e,t?o(t):r?r(i):n(null,i,a)}))}r(null,n)}function S(e,t){if(w(),f("process",x.Parser),p("process",x.Compiler),!t)return new Promise(n);function n(n,r){var o=s(e);u.run(x,{file:o},(function(e){e?r(e):n?n(o):t(null,o)}))}n(null,t)}}().freeze();var l=[].slice,c={}.hasOwnProperty,u=a().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,o){e?n(e):(t.tree=r,t.file=o,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||r(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}));function d(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function f(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function p(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function h(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function g(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function m(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}})),HW=bW(((e,t)=>{t.exports=function(e,t){var n,r=String(e),o=0;if("string"!=typeof t)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)o++,n=r.indexOf(t,n+t.length);return o}})),KW=bW(((e,t)=>{function n(e){if(null==e)return r;if("string"==typeof e)return function(e){return t;function t(t){return!(!t||t.type!==e)}}(e);if("object"==typeof e)return"length"in e?function(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return o;function o(){for(var e=-1;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return t;function t(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function r(){return!0}t.exports=n})),UW=bW(((e,t)=>{t.exports=function(e){return e}})),GW=bW(((e,t)=>{t.exports=s;var n=KW(),r=UW(),o=!0,i="skip",a=!1;function s(e,t,s,l){var c,u;"function"==typeof t&&"function"!=typeof s&&(l=s,s=t,t=null),u=n(t),c=l?-1:1,function e(n,d,f){var p,h="object"==typeof n&&null!==n?n:{};return"string"==typeof h.type&&(p="string"==typeof h.tagName?h.tagName:"string"==typeof h.name?h.name:void 0,g.displayName="node ("+r(h.type+(p?"<"+p+">":""))+")"),g;function g(){var r,p,h=f.concat(n),g=[];if((!t||u(n,d,f[f.length-1]||null))&&(g=function(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[o,e]:[e]}(s(n,f)),g[0]===a))return g;if(n.children&&g[0]!==i)for(p=(l?n.children.length:-1)+c;p>-1&&p<n.children.length;){if((r=e(n.children[p],p,h)())[0]===a)return r;p="number"==typeof r[1]?r[1]:p+c}return g}}(e,null,[])()}s.CONTINUE=o,s.SKIP=i,s.EXIT=a})),WW=bW(((e,t)=>{t.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}})),qW=bW(((e,t)=>{t.exports=function(e,t,n,r){var o,c;return"string"==typeof t||t&&"function"==typeof t.exec?c=[[t,n]]:(c=t,r=n),o=r||{},a(e,o,function e(t){var n=t[0];return r;function r(r,s){var l,c,u,d,f=n[0],p=n[1],h=[],g=0,m=s.children.indexOf(r);for(f.lastIndex=0,c=f.exec(r.value);c&&(l=c.index,!1!==(d=p.apply(null,[].concat(c,{index:c.index,input:c.input})))&&(g!==l&&h.push({type:"text",value:r.value.slice(g,l)}),"string"==typeof d&&d.length>0&&(d={type:"text",value:d}),d&&(h=[].concat(h,d)),g=l+c[0].length),f.global);)c=f.exec(r.value);if(void 0===l?(h=[r],m--):(g<r.value.length&&h.push({type:"text",value:r.value.slice(g)}),h.unshift(m,1),i.apply(s.children,h)),t.length>1)for(u=e(t.slice(1)),l=-1;++l<h.length;)"text"===(r=h[l]).type?u(r,s):a(r,o,u);return m+h.length+1}}(function(e){var t,n,r=[];if("object"!=typeof e)throw new Error("Expected array or object as schema");if("length"in e)for(n=-1;++n<e.length;)r.push([s(e[n][0]),l(e[n][1])]);else for(t in e)r.push([s(t),l(e[t])]);return r}(c))),e};var n=GW(),r=KW(),o=WW(),i=[].splice;function a(e,t,o){var i=r(t.ignore||[]);return n(e,"text",(function(e,t){for(var n,r,a=-1;++a<t.length;){if(n=t[a],i(n,r?r.children.indexOf(n):void 0,r))return;r=n}return o(e,r)})),[]}function s(e){return"string"==typeof e?new RegExp(o(e),"g"):e}function l(e){return"function"==typeof e?e:function(){return e}}})),YW=bW(((e,t)=>{t.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/})),JW=bW(((e,t)=>{var n=String.fromCharCode;t.exports=n})),XW=bW(((e,t)=>{var n=JW();t.exports=function(e){return function(t){return e.test(n(t))}}})),ZW=bW(((e,t)=>{var n=YW(),r=XW()(n);t.exports=r})),QW=bW(((e,t)=>{var n=XW()(/\s/);t.exports=n})),eq=bW((e=>{var t=HW(),n=qW(),r=ZW(),o=QW();function i(e){this.config.enter.autolinkProtocol.call(this,e)}function a(e,n,r,o,i){var a,s,c="";return!!(l(i)&&(/^w/i.test(n)&&(r=n+r,n="",c="http://"),function(e){var t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(r))&&(a=function(e){var n,r,o,i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(i)for(e=e.slice(0,i.index),i=i[0],n=i.indexOf(")"),r=t(e,"("),o=t(e,")");-1!==n&&r>o;)e+=i.slice(0,n+1),i=i.slice(n+1),n=i.indexOf(")"),o++;return[e,i]}(r+o),a[0]))&&(s={type:"link",title:null,url:c+n+a[0],children:[{type:"text",value:n+a[0]}]},a[1]&&(s=[s,{type:"text",value:a[1]}]),s)}function s(e,t,n,r){return!(!l(r,!0)||/[_-]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l(e,t){var n=e.input.charCodeAt(e.index-1);return(n!=n||o(n)||r(n))&&(!t||47!==n)}e.transforms=[function(e){n(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i,a],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/,s]],{ignore:["link","linkReference"]})}],e.enter={literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:i,literalAutolinkHttp:i,literalAutolinkWww:i},e.exit={literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}})),tq=bW(((e,t)=>{var n={}.hasOwnProperty;t.exports=n})),nq=bW(((e,t)=>{var n=[].splice;t.exports=n})),rq=bW(((e,t)=>{var n=nq();t.exports=function(e,t,r,o){var i,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,r=r>0?r:0,o.length<1e4)(i=Array.from(o)).unshift(t,r),n.apply(e,i);else for(r&&n.apply(e,[t,r]);s<o.length;)(i=o.slice(s,s+1e4)).unshift(t,0),n.apply(e,i),s+=1e4,t+=1e4}})),oq=bW(((e,t)=>{t.exports=function(e){return null==e?[]:"length"in e?e:[e]}})),iq=bW(((e,t)=>{var n=tq(),r=rq(),o=oq();function i(e,t){var r,i,s,l;for(r in t)for(l in i=n.call(e,r)?e[r]:e[r]={},s=t[r])i[l]=a(o(s[l]),n.call(i,l)?i[l]:[])}function a(e,t){for(var n=-1,o=[];++n<e.length;)("after"===e[n].add?t:o).push(e[n]);return r(t,0,0,o),t}t.exports=function(e){for(var t={},n=-1;++n<e.length;)i(t,e[n]);return t}})),aq=bW(((e,t)=>{var n=XW()(/[A-Za-z]/);t.exports=n})),sq=bW(((e,t)=>{var n=XW()(/[\dA-Za-z]/);t.exports=n})),lq=bW(((e,t)=>{t.exports=function(e){return e<32||127===e}})),cq=bW(((e,t)=>{t.exports=function(e){return e<-2}})),uq=bW((e=>{var t=aq(),n=sq(),r=lq(),o=cq(),i=ZW(),a=QW(),s={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 87===t||t-32==87?(e.consume(t),i):n(t)}function i(t){return 87===t||t-32==87?(e.consume(t),a):n(t)}function a(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||o(e)?n(e):t(e)}},partial:!0},l={tokenize:function(e,t,n){var o,s;return l;function l(t){return 38===t?e.check(d,f,c)(t):46===t||95===t?e.check(u,f,c)(t):r(t)||a(t)||45!==t&&i(t)?f(t):(e.consume(t),l)}function c(t){return 46===t?(s=o,o=void 0,e.consume(t),l):(95===t&&(o=!0),e.consume(t),l)}function f(e){return s||o?n(e):t(e)}},partial:!0},c={tokenize:function(e,t){var n=0;return r;function r(a){return 38===a?e.check(d,t,o)(a):(40===a&&n++,41===a?e.check(u,i,o)(a):b(a)?t(a):v(a)?e.check(u,t,o)(a):(e.consume(a),r))}function o(t){return e.consume(t),r}function i(e){return--n<0?t(e):o(e)}},partial:!0},u={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(o){return v(o)?(e.consume(o),r):b(o)?t(o):n(o)}},partial:!0},d={tokenize:function(e,n,r){return function(t){return e.consume(t),o};function o(n){return t(n)?(e.consume(n),o):59===n?(e.consume(n),i):r(n)}function i(e){return b(e)?n(e):r(e)}},partial:!0},f={tokenize:function(e,t,n){var r=this;return function(t){return 87!==t&&t-32!=87||!x(r.previous)||S(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s,e.attempt(l,e.attempt(c,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:x},p={tokenize:function(e,t,n){var o=this;return function(t){return 72!==t&&t-32!=72||!w(o.previous)||S(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),s)};function s(t){return 84===t||t-32==84?(e.consume(t),u):n(t)}function u(t){return 84===t||t-32==84?(e.consume(t),d):n(t)}function d(t){return 80===t||t-32==80?(e.consume(t),f):n(t)}function f(t){return 83===t||t-32==83?(e.consume(t),p):p(t)}function p(t){return 58===t?(e.consume(t),h):n(t)}function h(t){return 47===t?(e.consume(t),g):n(t)}function g(t){return 47===t?(e.consume(t),m):n(t)}function m(t){return r(t)||a(t)||i(t)?n(t):e.attempt(l,e.attempt(c,v),n)(t)}function v(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:w},h={tokenize:function(e,t,r){var o,i=this;return function(t){return y(t)&&_(i.previous)&&!S(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):r(t)};function a(t){return y(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(u,f,l)(t):45===t||95===t?e.check(u,r,c)(t):n(t)?(e.consume(t),s):f(t)}function l(t){return e.consume(t),o=!0,s}function c(t){return e.consume(t),d}function d(t){return 46===t?e.check(u,r,l)(t):s(t)}function f(n){return o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:_},g={};e.text=g;for(var m=48;m<123;)g[m]=h,58===++m?m=65:91===m&&(m=97);function v(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function b(e){return null===e||e<0||32===e||60===e}function y(e){return 43===e||45===e||46===e||95===e||n(e)}function x(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}function w(e){return null===e||!t(e)}function _(e){return 47!==e&&w(e)}function S(e){for(var t=e.length;t--;)if(("labelLink"===e[t][1].type||"labelImage"===e[t][1].type)&&!e[t][1]._balanced)return!0}g[43]=h,g[45]=h,g[46]=h,g[95]=h,g[72]=[h,p],g[104]=[h,p],g[87]=[h,f],g[119]=[h,f]})),dq=bW(((e,t)=>{t.exports=uq()})),fq=bW(((e,t)=>{t.exports=function(e){return e<0||32===e}})),pq=bW(((e,t)=>{var n=fq(),r=ZW(),o=QW();t.exports=function(e){return null===e||n(e)||o(e)?1:r(e)?2:void 0}})),hq=bW(((e,t)=>{t.exports=function(e,t,n){for(var r,o=[],i=-1;++i<e.length;)(r=e[i].resolveAll)&&o.indexOf(r)<0&&(t=r(t,n),o.push(r));return t}})),gq=bW(((e,t)=>{var n=Object.assign;t.exports=n})),mq=bW(((e,t)=>{var n=gq();t.exports=function(e){return n({},e)}})),vq=bW(((e,t)=>{t.exports=function(e){var t=e||{},a=t.singleTilde,s={tokenize:function(e,t,r){var o=this.previous,i=this.events,s=0;return l;function l(t){return 126!==t||126===o&&"characterEscape"!==i[i.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),c(t))}function c(i){var l,u,d=n(o);return 126===i?s>1?r(i):(e.consume(i),s++,c):s<2&&!a?r(i):(l=e.exit("strikethroughSequenceTemporary"),u=n(i),l._open=!u||2===u&&d,l._close=!d||2===d&&u,t(i))}},resolveAll:function(e,t){for(var n,a,s,l,c=-1;++c<e.length;)if("enter"===e[c][0]&&"strikethroughSequenceTemporary"===e[c][1].type&&e[c][1]._close)for(s=c;s--;)if("exit"===e[s][0]&&"strikethroughSequenceTemporary"===e[s][1].type&&e[s][1]._open&&e[c][1].end.offset-e[c][1].start.offset==e[s][1].end.offset-e[s][1].start.offset){e[c][1].type="strikethroughSequence",e[s][1].type="strikethroughSequence",n={type:"strikethrough",start:i(e[s][1].start),end:i(e[c][1].end)},a={type:"strikethroughText",start:i(e[s][1].end),end:i(e[c][1].start)},l=[["enter",n,t],["enter",e[s][1],t],["exit",e[s][1],t],["enter",a,t]],r(l,l.length,0,o(t.parser.constructs.insideSpan.null,e.slice(s+1,c),t)),r(l,l.length,0,[["exit",a,t],["enter",e[c][1],t],["exit",e[c][1],t],["exit",n,t]]),r(e,s-1,c-s+3,l),c=s+l.length-2;break}return function(e){for(var t=-1,n=e.length;++t<n;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}(e)}};return null==a&&(a=!0),{text:{126:s},insideSpan:{null:s}}};var n=pq(),r=rq(),o=hq(),i=mq()})),bq=bW(((e,t)=>{t.exports=function(e){return-2===e||-1===e||32===e}})),yq=bW(((e,t)=>{var n=bq();t.exports=function(e,t,r,o){var i=o?o-1:1/0,a=0;return function(o){return n(o)?(e.enter(r),s(o)):t(o)};function s(o){return n(o)&&a++<i?(e.consume(o),s):(e.exit(r),t(o))}}})),xq=bW((e=>{e.flow={null:{tokenize:function(e,o,i){var a,s,l=[],c=0;return function(t){return null===t||-5===t||-4===t||-3===t?i(t):(e.enter("table")._align=l,e.enter("tableHead"),e.enter("tableRow"),124===t?u(t):(c++,e.enter("temporaryTableCellContent"),p(t)))};function u(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,d}function d(r){return null===r||-5===r||-4===r||-3===r?function(r){return null===r?i(r):(e.exit("tableRow"),e.exit("tableHead"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.check(n,i,t(e,g,"linePrefix",4)))}(r):-2===r||-1===r||32===r?(e.enter("whitespace"),e.consume(r),f):(a&&(a=void 0,c++),124===r?u(r):(e.enter("temporaryTableCellContent"),p(r)))}function f(t){return-2===t||-1===t||32===t?(e.consume(t),f):(e.exit("whitespace"),d(t))}function p(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),d(t)):(e.consume(t),92===t?h:p)}function h(t){return 92===t||124===t?(e.consume(t),p):p(t)}function g(t){return null===t||t<0||32===t?i(t):(e.enter("tableDelimiterRow"),m(t))}function m(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,l.push(null),b):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l.push("left"),y):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):i(t)}function v(t){return-2===t||-1===t||32===t?(e.consume(t),v):(e.exit("whitespace"),m(t))}function b(t){return 45===t?(e.consume(t),b):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l[l.length-1]="left"===l[l.length-1]?"center":"right",x):m(t))}function y(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,b):i(t)}function x(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):i(t)}function w(t){return e.exit("tableDelimiterRow"),s&&c===l.length?null===t?_(t):e.check(r,_,S)(t):i(t)}function _(t){return e.exit("table"),o(t)}function S(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,k,"linePrefix",4)}function k(t){return e.enter("tableBody"),E(t)}function E(t){return e.enter("tableRow"),124===t?C(t):(e.enter("temporaryTableCellContent"),T(t))}function C(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),j}function j(t){return null===t||-5===t||-4===t||-3===t?function(t){return e.exit("tableRow"),null===t?R(t):e.check(r,R,P)(t)}(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),O):124===t?C(t):(e.enter("temporaryTableCellContent"),T(t))}function O(t){return-2===t||-1===t||32===t?(e.consume(t),O):(e.exit("whitespace"),j(t))}function T(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),j(t)):(e.consume(t),92===t?I:T)}function I(t){return 92===t||124===t?(e.consume(t),T):T(t)}function R(t){return e.exit("tableBody"),_(t)}function P(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,E,"linePrefix",4)}},resolve:function(e,t){for(var n,r,o,i,a,s,l,c,u,d,f=e.length,p=-1;++p<f;)n=e[p][1],i&&("temporaryTableCellContent"===n.type&&(c=c||p,u=p),("tableCellDivider"===n.type||"tableRow"===n.type)&&u&&(s={type:"tableContent",start:e[c][1].start,end:e[u][1].end},l={type:"chunkText",start:s.start,end:s.end,contentType:"text"},e.splice(c,u-c+1,["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]),p-=u-c-3,f=e.length,c=void 0,u=void 0)),"exit"===e[p][0]&&d&&d+1<p&&("tableCellDivider"===n.type||"tableRow"===n.type&&(d+3<p||"whitespace"!==e[d][1].type))&&(a={type:o?"tableDelimiter":r?"tableHeader":"tableData",start:e[d][1].start,end:e[p][1].end},e.splice(p+("tableCellDivider"===n.type?1:0),0,["exit",a,t]),e.splice(d,0,["enter",a,t]),p+=2,f=e.length,d=p+1),"tableRow"===n.type&&(i="enter"===e[p][0])&&(d=p+1),"tableDelimiterRow"===n.type&&(o="enter"===e[p][0])&&(d=p+1),"tableHead"===n.type&&(r="enter"===e[p][0]);return e},interruptible:!0}};var t=yq(),n={tokenize:function(e,t,n){return function(t){return 45!==t?n(t):(e.enter("setextUnderline"),r(t))};function r(t){return 45===t?(e.consume(t),r):o(t)}function o(r){return-2===r||-1===r||32===r?(e.consume(r),o):null===r||-5===r||-4===r||-3===r?t(r):n(r)}},partial:!0},r={tokenize:function(e,t,n){var r=0;return function(t){return e.enter("check"),e.consume(t),o};function o(i){return-1===i||32===i?(e.consume(i),4===++r?t:o):null===i||i<0?t(i):n(i)}},partial:!0}})),wq=bW(((e,t)=>{t.exports=xq()})),_q=bW(((e,t)=>{t.exports=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n}})),Sq=bW(((e,t)=>{var n=_q();t.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}})),kq=bW((e=>{var t=fq(),n=yq(),r=Sq(),o={tokenize:function(e,t,n){var r=this;return function(t){return 91===t&&null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return-2===t||32===t?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(r){return 93===r?(e.enter("taskListCheckMarker"),e.consume(r),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:i},t,n)):n(r)}}};function i(e,o,i){var a=this;return n(e,(function(e){return r(a.events,"whitespace")&&null!==e&&!t(e)?o(e):i(e)}),"whitespace")}e.text={91:o}})),Eq=bW(((e,t)=>{t.exports=kq()})),Cq=bW(((e,t)=>{var n=iq(),r=dq(),o=vq(),i=wq(),a=Eq();t.exports=function(e){return n([r,o(e),i,a])}})),jq=bW(((e,t)=>{t.exports=Cq()})),Oq=bW((e=>{e.canContainEols=["delete"],e.enter={strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},e.exit={strikethrough:function(e){this.exit(e)}}})),Tq=bW((e=>{function t(e){this.exit(e)}function n(e){this.enter({type:"tableCell",children:[]},e)}function r(e,t){return"|"===t?t:e}e.enter={table:function(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)},tableData:n,tableHeader:n,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},e.exit={codeText:function(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,r)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:t,tableHeader:t,tableRow:t}})),Iq=bW((e=>{function t(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}e.exit={taskListCheckValueChecked:t,taskListCheckValueUnchecked:t,paragraph:function(e){var t,n=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],o=n.children,i=r.children[0],a=-1;if(n&&"listItem"===n.type&&"boolean"==typeof n.checked&&i&&"text"===i.type){for(;++a<o.length;)if("paragraph"===o[a].type){t=o[a];break}t===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}})),Rq=bW(((e,t)=>{var n=eq(),r=Oq(),o=Tq(),i=Iq(),a={}.hasOwnProperty;function s(e,t){var n,r,o;for(n in t)r=a.call(e,n)?e[n]:e[n]={},o=t[n],"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,o):Object.assign(r,o)}t.exports=function(e){for(var t={transforms:[],canContainEols:[]},n=e.length,r=-1;++r<n;)s(t,e[r]);return t}([n,r,o,i])})),Pq=bW((e=>{var t="phrasing",n=["autolink","link","image","label"];e.unsafe=[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:":",before:"[ps]",after:"\\/",inConstruct:t,notInConstruct:n}]})),Mq=bW(((e,t)=>{t.exports=function(e,t,n){for(var r,o,i,a=e.children||[],s=[],l=-1,c=n.before;++l<a.length;)i=a[l],l+1<a.length?((o=t.handle.handlers[a[l+1].type])&&o.peek&&(o=o.peek),r=o?o(a[l+1],e,t,{before:"",after:""}).charAt(0):""):r=n.after,s.length>0&&("\r"===c||"\n"===c)&&"html"===i.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),c=" "),s.push(t.handle(i,e,t,{before:c,after:r})),c=s[s.length-1].slice(-1);return s.join("")}})),Aq=bW((e=>{var t=Mq();function n(e,n,r){var o=r.enter("emphasis"),i=t(e,r,{before:"~",after:"~"});return o(),"~~"+i+"~~"}e.unsafe=[{character:"~",inConstruct:"phrasing"}],e.handlers={delete:n},n.peek=function(){return"~"}})),Dq=bW(((e,t)=>{t.exports=function(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}})),Fq=bW(((e,t)=>{t.exports=r,r.peek=function(){return"`"};var n=Dq();function r(e,t,r){for(var o,i,a,s,l=e.value||"",c="`",u=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(l);)c+="`";for(/[^ \r\n]/.test(l)&&(/[ \r\n`]/.test(l.charAt(0))||/[ \r\n`]/.test(l.charAt(l.length-1)))&&(l=" "+l+" ");++u<r.unsafe.length;)if((o=r.unsafe[u]).atBreak)for(i=n(o);a=i.exec(l);)s=a.index,10===l.charCodeAt(s)&&13===l.charCodeAt(s-1)&&s--,l=l.slice(0,s)+" "+l.slice(a.index+1);return c+l+c}})),Lq=bW(((e,t)=>{var n,r="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var o=e.length*t;if(n!==e||typeof n>"u")n=e,r="";else if(r.length>=o)return r.substr(0,o);for(;o>r.length&&t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+=e,r=r.substr(0,o),r}})),Nq=bW(((e,t)=>{var n=Lq();t.exports=function(e,t){for(var c,u,d,f,y,x,w,_,S,k,E,C=t||{},j=!1!==C.padding,O=!1!==C.delimiterStart,T=!1!==C.delimiterEnd,I=(C.align||[]).concat(),R=!1!==C.alignDelimiters,P=[],M=C.stringLength||v,A=-1,D=e.length,F=[],L=[],N=[],B=[],z=[],$=0;++A<D;){for(u=-1,N=[],B=[],(d=(c=e[A]).length)>$&&($=d);++u<d;)x=m(c[u]),!0===R&&(y=M(x),B[u]=y,(void 0===(f=z[u])||y>f)&&(z[u]=y)),N.push(x);F[A]=N,L[A]=B}if(u=-1,d=$,"object"==typeof I&&"length"in I)for(;++u<d;)P[u]=b(I[u]);else for(E=b(I);++u<d;)P[u]=E;for(u=-1,d=$,N=[],B=[];++u<d;)E=P[u],S="",k="",E===h?S=s:E===g?k=s:E===p&&(S=s,k=s),y=R?Math.max(1,z[u]-S.length-k.length):1,x=S+n(a,y)+k,!0===R&&((y=S.length+y+k.length)>z[u]&&(z[u]=y),B[u]=y),N[u]=x;for(F.splice(1,0,N),L.splice(1,0,B),A=-1,D=F.length,w=[];++A<D;){for(N=F[A],B=L[A],u=-1,d=$,_=[];++u<d;)x=N[u]||"",S="",k="",!0===R&&(y=z[u]-(B[u]||0),(E=P[u])===g?S=n(o,y):E===p?y%2==0?k=S=n(o,y/2):(S=n(o,y/2+.5),k=n(o,y/2-.5)):k=n(o,y)),!0===O&&0===u&&_.push(l),!0===j&&!(!1===R&&""===x)&&(!0===O||0!==u)&&_.push(o),!0===R&&_.push(S),_.push(x),!0===R&&_.push(k),!0===j&&_.push(o),(!0===T||u!==d-1)&&_.push(l);_=_.join(""),!1===T&&(_=_.replace(r,"")),w.push(_)}return w.join(i)};var r=/ +$/,o=" ",i="\n",a="-",s=":",l="|",c=0,u=67,d=76,f=82,p=99,h=108,g=114;function m(e){return null==e?"":String(e)}function v(e){return e.length}function b(e){var t="string"==typeof e?e.charCodeAt(0):c;return t===d||t===h?h:t===f||t===g?g:t===u||t===p?p:c}})),Bq=bW(((e,t)=>{var n=Mq(),r=Fq(),o=Nq();t.exports=function(e){var t=e||{},i=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n){return u(function(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("table");++r<o;)i[r]=d(n[r],t);return a(),i}(e,n),e.align)},tableRow:function(e,t,n){var r=d(e,n),o=u([r]);return o.slice(0,o.indexOf("\n"))},tableCell:c,inlineCode:function(e,t,n){var o=r(e,t,n);return-1!==n.stack.indexOf("tableCell")&&(o=o.replace(/\|/g,"\\$&")),o}}};function c(e,t,r){var o=r.enter("tableCell"),i=n(e,r,{before:l,after:l});return o(),i}function u(e,t){return o(e,{align:t,alignDelimiters:a,padding:i,stringLength:s})}function d(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("tableRow");++r<o;)i[r]=c(n[r],0,t);return a(),i}}})),zq=bW(((e,t)=>{t.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}})),$q=bW(((e,t)=>{t.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}})),Vq=bW(((e,t)=>{t.exports=function(e,t){for(var r,o=e.children||[],i=[],a=-1;++a<o.length;)r=o[a],i.push(t.handle(r,e,t,{before:"\n",after:"\n"})),a+1<o.length&&i.push(s(r,o[a+1]));return i.join("");function s(r,o){for(var i,a=-1;++a<t.join.length&&(!0!==(i=t.join[a](r,o,e,t))&&1!==i);){if("number"==typeof i)return n("\n",1+Number(i));if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}};var n=Lq()})),Hq=bW(((e,t)=>{t.exports=function(e,t){for(var r,o=[],i=0,a=0;r=n.exec(e);)s(e.slice(i,r.index)),o.push(r[0]),i=r.index+r[0].length,a++;return s(e.slice(i)),o.join("");function s(e){o.push(t(e,a,!e))}};var n=/\r?\n|\r/g})),Kq=bW(((e,t)=>{t.exports=function(e,t,s){var l,c,u,d=r(s),f=o(s);return t&&t.ordered&&(d=(t.start>-1?t.start:1)+(!1===s.options.incrementListMarker?0:t.children.indexOf(e))+"."),l=d.length+1,("tab"===f||"mixed"===f&&(t&&t.spread||e.spread))&&(l=4*Math.ceil(l/4)),u=s.enter("listItem"),c=a(i(e,s),(function(e,t,r){return t?(r?"":n(" ",l))+e:(r?d:d+n(" ",l-d.length))+e})),u(),c};var n=Lq(),r=zq(),o=$q(),i=Vq(),a=Hq()})),Uq=bW((e=>{var t=Kq();e.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}],e.handlers={listItem:function(e,n,r){var o=t(e,n,r),i=e.children[0];return"boolean"==typeof e.checked&&i&&"paragraph"===i.type&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "}))),o}}})),Gq=bW(((e,t)=>{t.exports=function e(t,n){var r,o=-1;if(n.extensions)for(;++o<n.extensions.length;)e(t,n.extensions[o]);for(r in n)"extensions"===r||("unsafe"===r||"join"===r?t[r]=t[r].concat(n[r]||[]):"handlers"===r?t[r]=Object.assign(t[r],n[r]||{}):t.options[r]=n[r]);return t}})),Wq=bW(((e,t)=>{var n=Pq(),r=Aq(),o=Bq(),i=Uq(),a=Gq();t.exports=function(e){var t=a({handlers:{},join:[],unsafe:[],options:{}},{extensions:[n,r,o(e),i]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}})),qq=bW(((e,t)=>{var n,r=jq(),o=Rq(),i=Wq();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i(e))}})),Yq=bW(((e,t)=>{function n(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return t.join("")}t.exports=n})),Jq=bW(((e,t)=>{t.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}})),Xq=bW(((e,t)=>{var n=JW();t.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||65534==(65535&r)||r>1114111?"�":n(r)}})),Zq=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cq(),n=yq(),r=function(e){var r,o=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n(e,o,"linePrefix")}),(function(t){return e.enter("paragraph"),i(t)}));return o;function i(t){var n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,a(t)}function a(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):t(n)?(e.consume(n),e.exit("chunkText"),i):(e.consume(n),a)}};e.tokenize=r})),Qq=bW(((e,t)=>{var n=cq(),r=yq(),o={tokenize:function(e,t,o){return r(e,(function(e){return null===e||n(e)?t(e):o(e)}),"linePrefix")},partial:!0};t.exports=o})),eY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cq(),n=yq(),r=Qq(),o=function(e){var n,o,s,l=this,c=[],u=0,d={tokenize:function(e,t){var s=0;return n={},u;function u(t){return s<c.length?(l.containerState=c[s][1],e.attempt(c[s][0].continuation,d,f)(t)):o.currentConstruct&&o.currentConstruct.concrete?(n.flowContinue=!0,g(t)):(l.interrupt=o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,h,g)(t))}function d(e){return s++,l.containerState._closeFlow?h(e):u(e)}function f(t){return o.currentConstruct&&o.currentConstruct.lazy?(l.containerState={},e.attempt(i,h,e.attempt(a,h,e.check(r,h,p)))(t)):h(t)}function p(e){return s=c.length,n.lazy=!0,n.flowContinue=!0,g(e)}function h(e){return n.flowEnd=!0,g(e)}function g(e){return n.continued=s,l.interrupt=l.containerState=void 0,t(e)}},partial:!0};return f;function f(t){return u<c.length?(l.containerState=c[u][1],e.attempt(c[u][0].continuation,p,h)(t)):h(t)}function p(e){return u++,f(e)}function h(t){return n&&n.flowContinue?m(t):(l.interrupt=o&&o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,g,m)(t))}function g(e){return c.push([l.currentConstruct,l.containerState]),l.containerState=void 0,h(e)}function m(t){return null===t?(x(0,!0),void e.consume(t)):(o=o||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:o}),v(t))}function v(n){return null===n?(y(e.exit("chunkFlow")),m(n)):t(n)?(e.consume(n),y(e.exit("chunkFlow")),e.check(d,b)):(e.consume(n),v)}function b(e){return x(n.continued,n&&n.flowEnd),u=0,f(e)}function y(e){s&&(s.next=e),s=e,o.lazy=n&&n.lazy,o.defineSkip(e.start),o.write(l.sliceStream(e))}function x(t,n){var r=c.length;for(o&&n&&(o.write([null]),s=o=void 0);r-- >t;)l.containerState=c[r][1],c[r][0].exit.call(l,e);c.length=t}},i={tokenize:function(e,t,r){return n(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},a={tokenize:function(e,t,r){return n(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};e.tokenize=o})),tY=bW(((e,t)=>{var n=gq(),r=rq(),o=mq();function i(e,t){for(var n,o,i,a,s,l,c=e[t][1],u=e[t][2],d=t-1,f=[],p=c._tokenizer||u.parser[c.contentType](c.start),h=p.events,g=[],m={};c;){for(;e[++d][1]!==c;);f.push(d),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),o&&p.defineSkip(c.start),c.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(n),c.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),o=c,c=c.next}for(c=o,i=h.length;i--;)"enter"===h[i][0]?a=!0:a&&h[i][1].type===h[i-1][1].type&&h[i][1].start.line!==h[i][1].end.line&&(v(h.slice(i+1,s)),c._tokenizer=c.next=void 0,c=c.previous,s=i+1);for(p.events=c._tokenizer=c.next=void 0,v(h.slice(0,s)),i=-1,l=0;++i<g.length;)m[l+g[i][0]]=l+g[i][1],l+=g[i][1]-g[i][0]-1;return m;function v(t){var n=f.pop();g.unshift([n,n+t.length-1]),r(e,n,2,t)}}t.exports=function(e){for(var t,a,s,l,c,u,d,f={},p=-1;++p<e.length;){for(;p in f;)p=f[p];if(t=e[p],p&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[p-1][1].type&&((s=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[s][1].type&&(s+=2),s<u.length&&"content"===u[s][1].type))for(;++s<u.length&&"content"!==u[s][1].type;)"chunkText"===u[s][1].type&&(u[s][1].isInFirstContentOfListItem=!0,s++);if("enter"===t[0])t[1].contentType&&(n(f,i(e,p)),p=f[p],d=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(s=p,a=void 0;s--&&("lineEnding"===(l=e[s])[1].type||"lineEndingBlank"===l[1].type);)"enter"===l[0]&&(a&&(e[a][1].type="lineEndingBlank"),l[1].type="lineEnding",a=s);a&&(t[1].end=o(e[a][1].start),(c=e.slice(a,p)).unshift(t),r(e,a,p-a+1,c))}}return!d}})),nY=bW(((e,t)=>{var n=cq(),r=Sq(),o=tY(),i=yq(),a={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?i(t):n(t)?e.check(s,a,i)(t):(e.consume(t),o)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),o}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0},s={tokenize:function(e,t,o){var a=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,s,"linePrefix")};function s(i){return null===i||n(i)?o(i):a.parser.constructs.disable.null.indexOf("codeIndented")>-1||r(a.events,"linePrefix")<4?e.interrupt(a.parser.constructs.flow,o,t)(i):t(i)}},partial:!0};t.exports=a})),rY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nY(),n=yq(),r=Qq(),o=function(e){var o=this,i=e.attempt(r,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEndingBlank"),e.consume(t),e.exit("lineEndingBlank"),o.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,a,n(e,e.attempt(this.parser.constructs.flow,a,e.attempt(t,a)),"linePrefix")));return i;function a(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o.currentConstruct=void 0,i;e.consume(t)}};e.tokenize=o})),oY=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gq(),n=mq(),r=a("text"),o=a("string"),i={resolveAll:s()};function a(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){var t=r[e],o=-1;if(null===e)return!0;if(t)for(;++o<t.length;)if(!t[o].previous||t[o].previous.call(n,n.previous))return!0}},resolveAll:s("text"===e?l:void 0)}}function s(e){return function(t,n){for(var r,o=-1;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function l(e,r){for(var o,i,a,s,l,c,u,d,f=-1;++f<=e.length;)if((f===e.length||"lineEnding"===e[f][1].type)&&"data"===e[f-1][1].type){for(i=e[f-1][1],s=(o=r.sliceStream(i)).length,l=-1,c=0,u=void 0;s--;)if("string"==typeof(a=o[s])){for(l=a.length;32===a.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===a)u=!0,c++;else if(-1!==a){s++;break}c&&(d={type:f===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-c,offset:i.end.offset-c,_index:i.start._index+s,_bufferIndex:s?l:i.start._bufferIndex+l},end:n(i.end)},i.end=n(d.start),i.start.offset===i.end.offset?t(i,d):(e.splice(f,0,["enter",d,r],["exit",d,r]),f+=2)),f++}return e}e.resolver=i,e.string=o,e.text=r})),iY=bW(((e,t)=>{var n=rq();t.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}})),aY=bW(((e,t)=>{var n=JW();t.exports=function(e){for(var t,r,o,i=-1,a=[];++i<e.length;){if("string"==typeof(t=e[i]))r=t;else if(-5===t)r="\r";else if(-4===t)r="\n";else if(-3===t)r="\r\n";else if(-2===t)r="\t";else if(-1===t){if(o)continue;r=" "}else r=n(t);o=-2===t,a.push(r)}return a.join("")}})),sY=bW(((e,t)=>{t.exports=function(e,t){var n,r=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;return r===i?n=[e[r].slice(o,a)]:(n=e.slice(r,i),o>-1&&(n[0]=n[0].slice(o)),a>0&&n.push(e[i].slice(0,a))),n}})),lY=bW(((e,t)=>{var n=gq(),r=cq(),o=iY(),i=rq(),a=oq(),s=hq(),l=aY(),c=mq(),u=sY();t.exports=function(e,t,d){var f=d?c(d):{line:1,column:1,offset:0},p={},h=[],g=[],m=[],v={consume:function(e){r(e)?(f.line++,f.column=1,f.offset+=-3===e?2:1,C()):-1!==e&&(f.column++,f.offset++),f._bufferIndex<0?f._index++:(f._bufferIndex++,f._bufferIndex===g[f._index].length&&(f._bufferIndex=-1,f._index++)),b.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=w(),b.events.push(["enter",n,b]),m.push(n),n},exit:function(e){var t=m.pop();return t.end=w(),b.events.push(["exit",t,b]),t},attempt:k((function(e,t){E(e,t.from)})),check:k(S),interrupt:k(S,{interrupt:!0}),lazy:k(S,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:x,sliceSerialize:function(e){return l(x(e))},now:w,defineSkip:function(e){p[e.line]=e.column,C()},write:function(e){return g=o(g,e),function(){for(var e,t;f._index<g.length;)if("string"==typeof(t=g[f._index]))for(e=f._index,f._bufferIndex<0&&(f._bufferIndex=0);f._index===e&&f._bufferIndex<t.length;)_(t.charCodeAt(f._bufferIndex));else _(t)}(),null!==g[g.length-1]?[]:(E(t,0),b.events=s(h,b.events,b),b.events)}},y=t.tokenize.call(b,v);return t.resolveAll&&h.push(t),f._index=0,f._bufferIndex=-1,b;function x(e){return u(g,e)}function w(){return c(f)}function _(e){y=y(e)}function S(e,t){t.restore()}function k(e,t){return function(r,o,i){var s,l,c,u;return r.tokenize||"length"in r?d(a(r)):function(e){return e in r||null in r?d(r.null?a(r[e]).concat(a(r.null)):r[e])(e):i(e)};function d(e){return s=e,p(e[l=0])}function p(e){return function(r){return u=function(){var e=w(),t=b.previous,n=b.currentConstruct,r=b.events.length,o=Array.from(m);return{restore:i,from:r};function i(){f=e,b.previous=t,b.currentConstruct=n,b.events.length=r,m=o,C()}}(),c=e,e.partial||(b.currentConstruct=e),e.name&&b.parser.constructs.disable.null.indexOf(e.name)>-1?g():e.tokenize.call(t?n({},b,t):b,v,h,g)(r)}}function h(t){return e(c,u),o}function g(e){return u.restore(),++l<s.length?p(s[l]):i}}}function E(e,t){e.resolveAll&&h.indexOf(e)<0&&h.push(e),e.resolve&&i(b.events,t,b.events.length-t,e.resolve(b.events.slice(t),b)),e.resolveTo&&(b.events=e.resolveTo(b.events,b))}function C(){f.line in p&&f.column<2&&(f.column=p[f.line],f.offset+=p[f.line]-1)}}})),cY=bW(((e,t)=>{t.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}})),uY=bW(((e,t)=>{var n=iY(),r=rq(),o=pq(),i=cY(),a=hq(),s=mq(),l={name:"attention",tokenize:function(e,t){var n,r=o(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(a){var s,l,c,u;return a===n?(e.consume(a),i):(s=e.exit("attentionSequence"),c=!(l=o(a))||2===l&&r,u=!r||2===r&&l,s._open=42===n?c:c&&(r||!u),s._close=42===n?u:u&&(l||!c),t(a))}},resolveAll:function(e,t){for(var o,l,c,u,d,f,p,h,g=-1;++g<e.length;)if("enter"===e[g][0]&&"attentionSequence"===e[g][1].type&&e[g][1]._close)for(o=g;o--;)if("exit"===e[o][0]&&"attentionSequence"===e[o][1].type&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[g][1]).charCodeAt(0)){if((e[o][1]._close||e[g][1]._open)&&(e[g][1].end.offset-e[g][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[g][1].end.offset-e[g][1].start.offset)%3))continue;u={type:(f=e[o][1].end.offset-e[o][1].start.offset>1&&e[g][1].end.offset-e[g][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(s(e[o][1].end),-f),end:s(e[o][1].end)},d={type:f>1?"strongSequence":"emphasisSequence",start:s(e[g][1].start),end:i(s(e[g][1].start),f)},c={type:f>1?"strongText":"emphasisText",start:s(e[o][1].end),end:s(e[g][1].start)},l={type:f>1?"strong":"emphasis",start:s(u.start),end:s(d.end)},e[o][1].end=s(u.start),e[g][1].start=s(d.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=n(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=n(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",c,t]]),p=n(p,a(t.parser.constructs.insideSpan.null,e.slice(o+1,g),t)),p=n(p,[["exit",c,t],["enter",d,t],["exit",d,t],["exit",l,t]]),e[g][1].end.offset-e[g][1].start.offset?(h=2,p=n(p,[["enter",e[g][1],t],["exit",e[g][1],t]])):h=0,r(e,o-1,g-o+3,p),g=o+p.length-h-2;break}for(g=-1;++g<e.length;)"attentionSequence"===e[g][1].type&&(e[g][1].type="data");return e}};t.exports=l})),dY=bW(((e,t)=>{var n=XW()(/[#-'*+\--9=?A-Z^-~]/);t.exports=n})),fY=bW(((e,t)=>{var n=aq(),r=sq(),o=dY(),i=lq(),a={name:"autolink",tokenize:function(e,t,a){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return n(t)?(e.consume(t),c):o(t)?f(t):a(t)}function c(e){return 43===e||45===e||46===e||r(e)?u(e):f(e)}function u(t){return 58===t?(e.consume(t),d):(43===t||45===t||46===t||r(t))&&s++<32?(e.consume(t),u):f(t)}function d(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||i(t)?a(t):(e.consume(t),d)}function f(t){return 64===t?(e.consume(t),s=0,p):o(t)?(e.consume(t),f):a(t)}function p(e){return r(e)?h(e):a(e)}function h(t){return 46===t?(e.consume(t),s=0,p):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):g(t)}function g(t){return(45===t||r(t))&&s++<63?(e.consume(t),45===t?g:h):a(t)}function m(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};t.exports=a})),pY=bW(((e,t)=>{var n=bq(),r=yq(),o={name:"blockQuote",tokenize:function(e,t,r){var o=this;return function(t){return 62===t?(o.containerState.open||(e.enter("blockQuote",{_container:!0}),o.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i):r(t)};function i(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,n){return r(e,e.attempt(o,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};t.exports=o})),hY=bW(((e,t)=>{var n=XW()(/[!-/:-@[-`{-~]/);t.exports=n})),gY=bW(((e,t)=>{var n=hY(),r={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return n(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}};t.exports=r})),mY=bW(((e,t)=>{var n;t.exports=function(e){var t,r="&"+e+";";return(n=n||document.createElement("i")).innerHTML=r,t=n.textContent,(59!==t.charCodeAt(t.length-1)||"semi"===e)&&t!==r&&t}})),vY=bW(((e,t)=>{var n=XW()(/\d/);t.exports=n})),bY=bW(((e,t)=>{var n=XW()(/[\dA-Fa-f]/);t.exports=n})),yY=bW(((e,t)=>{var n=mY(),r=sq(),o=vY(),i=bY();var a=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(n),s={name:"characterReference",tokenize:function(e,t,n){var s,l,c=this,u=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),d};function d(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,l=r,p(t))}function f(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=i,p):(e.enter("characterReferenceValue"),s=7,l=o,p(t))}function p(o){var i;return 59===o&&u?(i=e.exit("characterReferenceValue"),l!==r||a.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)):l(o)&&u++<s?(e.consume(o),p):n(o)}}};t.exports=s})),xY=bW(((e,t)=>{var n=cq(),r=fq(),o=Sq(),i=yq(),a={name:"codeFenced",tokenize:function(e,t,a){var s,l=this,c={tokenize:function(e,t,r){var o=0;return i(e,a,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function a(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}function l(t){return t===s?(e.consume(t),o++,l):o<d?r(t):(e.exit("codeFencedFenceSequence"),i(e,c,"whitespace")(t))}function c(o){return null===o||n(o)?(e.exit("codeFencedFence"),t(o)):r(o)}},partial:!0},u=o(this.events,"linePrefix"),d=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,f(t)};function f(t){return t===s?(e.consume(t),d++,f):(e.exit("codeFencedFenceSequence"),d<3?a(t):i(e,p,"whitespace")(t))}function p(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||r(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),i(e,g,"whitespace")(t)):96===t&&t===s?a(t):(e.consume(t),h)}function g(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||n(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===s?a(t):(e.consume(t),m)}function v(n){return e.exit("codeFencedFence"),l.interrupt?t(n):b(n)}function b(t){return null===t?x(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(c,x,u?i(e,b,"linePrefix",u+1):b)):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||n(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),y)}function x(n){return e.exit("codeFenced"),t(n)}},concrete:!0};t.exports=a})),wY=bW(((e,t)=>{var n=cq(),r=rq(),o=Sq(),i=yq(),a={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(s,o,r);function o(r){return null===r?t(r):n(r)?e.attempt(s,o,t)(r):(e.enter("codeFlowValue"),i(r))}function i(t){return null===t||n(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return r(e,0,0,[["enter",n,t]]),r(e,e.length,0,[["exit",n,t]]),e}},s={tokenize:function(e,t,r){var a=this;return i(e,(function s(l){return n(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i(e,s,"linePrefix",5)):o(a.events,"linePrefix")<4?r(l):t(l)}),"linePrefix",5)},partial:!0};t.exports=a})),_Y=bW(((e,t)=>{var n=cq(),r={name:"codeText",tokenize:function(e,t,r){var o,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),o++,u):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[o][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};t.exports=r})),SY=bW(((e,t)=>{var n=lq(),r=fq(),o=cq();t.exports=function(e,t,i,a,s,l,c,u,d){var f=d||1/0,p=0;return function(t){return 60===t?(e.enter(a),e.enter(s),e.enter(l),e.consume(t),e.exit(l),h):n(t)||41===t?i(t):(e.enter(a),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(t))};function h(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(n))}function g(t){return 62===t?(e.exit("chunkString"),e.exit(u),h(t)):null===t||60===t||o(t)?i(t):(e.consume(t),92===t?m:g)}function m(t){return 60===t||62===t||92===t?(e.consume(t),g):g(t)}function v(o){return 40===o?++p>f?i(o):(e.consume(o),v):41===o?p--?(e.consume(o),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):null===o||r(o)?p?i(o):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):n(o)?i(o):(e.consume(o),92===o?b:v)}function b(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}}})),kY=bW(((e,t)=>{var n=cq(),r=bq();t.exports=function(e,t,o,i,a,s){var l,c=this,u=0;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),e.enter(s),d};function d(r){return null===r||91===r||93===r&&!l||94===r&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?o(r):93===r?(e.exit(s),e.enter(a),e.consume(r),e.exit(a),e.exit(i),t):n(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(r))}function f(t){return null===t||91===t||93===t||n(t)||u++>999?(e.exit("chunkString"),d(t)):(e.consume(t),l=l||!r(t),92===t?p:f)}function p(t){return 91===t||92===t||93===t?(e.consume(t),u++,f):f(t)}}})),EY=bW(((e,t)=>{var n=cq(),r=bq(),o=yq();t.exports=function(e,t){var i;return function a(s){return n(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,a):r(s)?o(e,a,i?"linePrefix":"lineSuffix")(s):t(s)}}})),CY=bW(((e,t)=>{var n=cq(),r=yq();t.exports=function(e,t,o,i,a,s){var l;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,c};function c(n){return n===l?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?o(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===l||null===t||n(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?f:d)}function f(t){return t===l||92===t?(e.consume(t),d):d(t)}}})),jY=bW(((e,t)=>{var n=cq(),r=fq(),o=Jq(),i=SY(),a=kY(),s=yq(),l=EY(),c=CY(),u={name:"definition",tokenize:function(e,t,r){var c,u=this;return function(t){return e.enter("definition"),a.call(u,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function f(t){return c=o(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l(e,i(e,e.attempt(d,s(e,p,"whitespace"),s(e,p,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function p(o){return null===o||n(o)?(e.exit("definition"),u.parser.defined.indexOf(c)<0&&u.parser.defined.push(c),t(o)):r(o)}}},d={tokenize:function(e,t,o){return function(t){return r(t)?l(e,i)(t):o(t)};function i(t){return 34===t||39===t||40===t?c(e,s(e,a,"whitespace"),o,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):o(t)}function a(e){return null===e||n(e)?t(e):o(e)}},partial:!0};t.exports=u})),OY=bW(((e,t)=>{var n=cq(),r={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),o};function o(o){return n(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):r(o)}}};t.exports=r})),TY=bW(((e,t)=>{var n=cq(),r=fq(),o=bq(),i=rq(),a=yq(),s={name:"headingAtx",tokenize:function(e,t,i){var s=this,l=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&l++<6?(e.consume(n),c):null===n||r(n)?(e.exit("atxHeadingSequence"),s.interrupt?t(n):u(n)):i(n)}function u(r){return 35===r?(e.enter("atxHeadingSequence"),d(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):o(r)?a(e,u,"whitespace")(r):(e.enter("atxHeadingText"),f(r))}function d(t){return 35===t?(e.consume(t),d):(e.exit("atxHeadingSequence"),u(t))}function f(t){return null===t||35===t||r(t)?(e.exit("atxHeadingText"),u(t)):(e.consume(t),f)}},resolve:function(e,t){var n,r,o=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),o-2>a&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4),o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},i(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}};t.exports=s})),IY=bW(((e,t)=>{t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]})),RY=bW(((e,t)=>{t.exports=["pre","script","style","textarea"]})),PY=bW(((e,t)=>{var n=aq(),r=sq(),o=cq(),i=fq(),a=bq(),s=JW(),l=IY(),c=RY(),u=Qq(),d={name:"htmlFlow",tokenize:function(e,t,u){var d,p,h,g,m,v=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(r){return 33===r?(e.consume(r),y):47===r?(e.consume(r),_):63===r?(e.consume(r),d=3,v.interrupt?t:V):n(r)?(e.consume(r),h=s(r),p=!0,S):u(r)}function y(r){return 45===r?(e.consume(r),d=2,x):91===r?(e.consume(r),d=5,h="CDATA[",g=0,w):n(r)?(e.consume(r),d=4,v.interrupt?t:V):u(r)}function x(n){return 45===n?(e.consume(n),v.interrupt?t:V):u(n)}function w(n){return n===h.charCodeAt(g++)?(e.consume(n),g===h.length?v.interrupt?t:D:w):u(n)}function _(t){return n(t)?(e.consume(t),h=s(t),S):u(t)}function S(n){return null===n||47===n||62===n||i(n)?47!==n&&p&&c.indexOf(h.toLowerCase())>-1?(d=1,v.interrupt?t(n):D(n)):l.indexOf(h.toLowerCase())>-1?(d=6,47===n?(e.consume(n),k):v.interrupt?t(n):D(n)):(d=7,v.interrupt?u(n):p?C(n):E(n)):45===n||r(n)?(e.consume(n),h+=s(n),S):u(n)}function k(n){return 62===n?(e.consume(n),v.interrupt?t:D):u(n)}function E(t){return a(t)?(e.consume(t),E):M(t)}function C(t){return 47===t?(e.consume(t),M):58===t||95===t||n(t)?(e.consume(t),j):a(t)?(e.consume(t),C):M(t)}function j(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),j):O(t)}function O(t){return 61===t?(e.consume(t),T):a(t)?(e.consume(t),O):C(t)}function T(t){return null===t||60===t||61===t||62===t||96===t?u(t):34===t||39===t?(e.consume(t),m=t,I):a(t)?(e.consume(t),T):(m=void 0,R(t))}function I(t){return t===m?(e.consume(t),P):null===t||o(t)?u(t):(e.consume(t),I)}function R(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?O(t):(e.consume(t),R)}function P(e){return 47===e||62===e||a(e)?C(e):u(e)}function M(t){return 62===t?(e.consume(t),A):u(t)}function A(t){return a(t)?(e.consume(t),A):null===t||o(t)?D(t):u(t)}function D(t){return 45===t&&2===d?(e.consume(t),N):60===t&&1===d?(e.consume(t),B):62===t&&4===d?(e.consume(t),H):63===t&&3===d?(e.consume(t),V):93===t&&5===d?(e.consume(t),$):!o(t)||6!==d&&7!==d?null===t||o(t)?F(t):(e.consume(t),D):e.check(f,H,F)(t)}function F(t){return e.exit("htmlFlowData"),L(t)}function L(t){return null===t?K(t):o(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L):(e.enter("htmlFlowData"),D(t))}function N(t){return 45===t?(e.consume(t),V):D(t)}function B(t){return 47===t?(e.consume(t),h="",z):D(t)}function z(t){return 62===t&&c.indexOf(h.toLowerCase())>-1?(e.consume(t),H):n(t)&&h.length<8?(e.consume(t),h+=s(t),z):D(t)}function $(t){return 93===t?(e.consume(t),V):D(t)}function V(t){return 62===t?(e.consume(t),H):D(t)}function H(t){return null===t||o(t)?(e.exit("htmlFlowData"),K(t)):(e.consume(t),H)}function K(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},f={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(u,t,n)}},partial:!0};t.exports=d})),MY=bW(((e,t)=>{var n=aq(),r=sq(),o=cq(),i=fq(),a=bq(),s=yq(),l={name:"htmlText",tokenize:function(e,t,l){var c,u,d,f,p=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),h};function h(t){return 33===t?(e.consume(t),g):47===t?(e.consume(t),O):63===t?(e.consume(t),C):n(t)?(e.consume(t),R):l(t)}function g(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),u="CDATA[",d=0,w):n(t)?(e.consume(t),E):l(t)}function m(t){return 45===t?(e.consume(t),v):l(t)}function v(t){return null===t||62===t?l(t):45===t?(e.consume(t),b):y(t)}function b(e){return null===e||62===e?l(e):y(e)}function y(t){return null===t?l(t):45===t?(e.consume(t),x):o(t)?(f=y,B(t)):(e.consume(t),y)}function x(t){return 45===t?(e.consume(t),$):y(t)}function w(t){return t===u.charCodeAt(d++)?(e.consume(t),d===u.length?_:w):l(t)}function _(t){return null===t?l(t):93===t?(e.consume(t),S):o(t)?(f=_,B(t)):(e.consume(t),_)}function S(t){return 93===t?(e.consume(t),k):_(t)}function k(t){return 62===t?$(t):93===t?(e.consume(t),k):_(t)}function E(t){return null===t||62===t?$(t):o(t)?(f=E,B(t)):(e.consume(t),E)}function C(t){return null===t?l(t):63===t?(e.consume(t),j):o(t)?(f=C,B(t)):(e.consume(t),C)}function j(e){return 62===e?$(e):C(e)}function O(t){return n(t)?(e.consume(t),T):l(t)}function T(t){return 45===t||r(t)?(e.consume(t),T):I(t)}function I(t){return o(t)?(f=I,B(t)):a(t)?(e.consume(t),I):$(t)}function R(t){return 45===t||r(t)?(e.consume(t),R):47===t||62===t||i(t)?P(t):l(t)}function P(t){return 47===t?(e.consume(t),$):58===t||95===t||n(t)?(e.consume(t),M):o(t)?(f=P,B(t)):a(t)?(e.consume(t),P):$(t)}function M(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),M):A(t)}function A(t){return 61===t?(e.consume(t),D):o(t)?(f=A,B(t)):a(t)?(e.consume(t),A):P(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?l(t):34===t||39===t?(e.consume(t),c=t,F):o(t)?(f=D,B(t)):a(t)?(e.consume(t),D):(e.consume(t),c=void 0,N)}function F(t){return t===c?(e.consume(t),L):null===t?l(t):o(t)?(f=F,B(t)):(e.consume(t),F)}function L(e){return 62===e||47===e||i(e)?P(e):l(e)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?l(t):62===t||i(t)?P(t):(e.consume(t),N)}function B(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s(e,z,"linePrefix",p.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function z(t){return e.enter("htmlTextData"),f(t)}function $(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):l(n)}}};t.exports=l})),AY=bW(((e,t)=>{var n=fq(),r=iY(),o=rq(),i=Jq(),a=hq(),s=mq(),l=SY(),c=kY(),u=CY(),d=EY(),f={name:"labelEnd",tokenize:function(e,t,n){for(var r,o,a=this,s=a.events.length;s--;)if(("labelImage"===a.events[s][1].type||"labelLink"===a.events[s][1].type)&&!a.events[s][1]._balanced){r=a.events[s][1];break}return function(t){return r?r._inactive?c(t):(o=a.parser.defined.indexOf(i(a.sliceSerialize({start:r.end,end:a.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(p,t,o?t:c)(n):91===n?e.attempt(h,t,o?e.attempt(g,t,c):c)(n):o?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){for(var n,i,l,c,u,d,f,p=e.length,h=0;p--;)if(c=e[p][1],u){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[p][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(d){if("enter"===e[p][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(u=p,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(d=p);return n={type:"labelLink"===e[u][1].type?"link":"image",start:s(e[u][1].start),end:s(e[e.length-1][1].end)},i={type:"label",start:s(e[u][1].start),end:s(e[d][1].end)},l={type:"labelText",start:s(e[u+h+2][1].end),end:s(e[d-2][1].start)},f=[["enter",n,t],["enter",i,t]],f=r(f,e.slice(u+1,u+h+3)),f=r(f,[["enter",l,t]]),f=r(f,a(t.parser.constructs.insideSpan.null,e.slice(u+h+4,d-3),t)),f=r(f,[["exit",l,t],e[d-2],e[d-1],["exit",i,t]]),f=r(f,e.slice(d+1)),f=r(f,[["exit",n,t]]),o(e,u,e.length,f),e},resolveAll:function(e){for(var t,n=-1;++n<e.length;)!(t=e[n][1])._used&&("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},p={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),d(e,o)};function o(t){return 41===t?s(t):l(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return n(t)?d(e,a)(t):s(t)}function a(t){return 34===t||39===t||40===t?u(e,d(e,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},h={tokenize:function(e,t,n){var r=this;return function(t){return c.call(r,e,o,n,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.indexOf(i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},g={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};t.exports=f})),DY=bW(((e,t)=>{var n={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:AY().resolveAll};t.exports=n})),FY=bW(((e,t)=>{var n={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:AY().resolveAll};t.exports=n})),LY=bW(((e,t)=>{var n=yq(),r={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};t.exports=r})),NY=bW(((e,t)=>{var n=cq(),r=bq(),o=yq(),i={name:"thematicBreak",tokenize:function(e,t,i){var a,s=0;return function(t){return e.enter("thematicBreak"),a=t,l(t)};function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):r(u)?o(e,l,"whitespace")(u):s<3||null!==u&&!n(u)?i(u):(e.exit("thematicBreak"),t(u))}function c(t){return t===a?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),l(t))}}};t.exports=i})),BY=bW(((e,t)=>{var n=vY(),r=bq(),o=Sq(),i=_q(),a=yq(),s=Qq(),l=NY(),c={name:"list",tokenize:function(e,t,a){var c=this,d=o(c.events,"linePrefix"),f=0;return function(t){var r=c.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!c.containerState.marker||t===c.containerState.marker:n(t)){if(c.containerState.type||(c.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(l,a,h)(t):h(t);if(!c.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(t)}return a(t)};function p(t){return n(t)&&++f<10?(e.consume(t),p):(!c.interrupt||f<2)&&(c.containerState.marker?t===c.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),h(t)):a(t)}function h(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),c.containerState.marker=c.containerState.marker||t,e.check(s,c.interrupt?a:g,e.attempt(u,v,m))}function g(e){return c.containerState.initialBlankLine=!0,d++,v(e)}function m(t){return r(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),v):a(t)}function v(n){return c.containerState.size=d+i(c.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var o=this;return o.containerState._closeFlow=void 0,e.check(s,(function(n){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,a(e,t,"listItemIndent",o.containerState.size+1)(n)}),(function(n){return o.containerState.furtherBlankLines||!r(n)?(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,i(n)):(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,e.attempt(d,t,i)(n))}));function i(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,a(e,e.attempt(c,t,n),"linePrefix",o.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,n){var i=this;return a(e,(function(e){return r(e)||!o(i.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",i.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},d={tokenize:function(e,t,n){var r=this;return a(e,(function(e){return o(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};t.exports=c})),zY=bW(((e,t)=>{var n=cq(),r=mq(),o=yq(),i={name:"setextUnderline",tokenize:function(e,t,r){for(var i,a,s=this,l=s.events.length;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){a="paragraph"===s.events[l][1].type;break}return function(t){return s.lazy||!s.interrupt&&!a?r(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,c(t))};function c(t){return t===i?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),o(e,u,"lineSuffix")(t))}function u(o){return null===o||n(o)?(e.exit("setextHeadingLine"),t(o)):r(o)}},resolveTo:function(e,t){for(var n,o,i,a,s=e.length;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(o=s)}else"content"===e[s][1].type&&e.splice(s,1),!i&&"definition"===e[s][1].type&&(i=s);return a={type:"setextHeading",start:r(e[o][1].start),end:r(e[e.length-1][1].end)},e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=r(e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}};t.exports=i})),$Y=bW((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oY(),n=uY(),r=fY(),o=pY(),i=gY(),a=yY(),s=xY(),l=wY(),c=_Y(),u=jY(),d=OY(),f=TY(),p=PY(),h=MY(),g=AY(),m=DY(),v=FY(),b=LY(),y=BY(),x=zY(),w=NY(),_={42:y,43:y,45:y,48:y,49:y,50:y,51:y,52:y,53:y,54:y,55:y,56:y,57:y,62:o},S={91:u},k={"-2":l,"-1":l,32:l},E={35:f,42:w,45:[x,w],60:p,61:x,95:w,96:s,126:s},C={38:a,92:i},j={"-5":b,"-4":b,"-3":b,33:m,38:a,42:n,60:[r,h],91:v,92:[d,i],93:g,95:n,96:c},O={null:[n,t.resolver]};e.contentInitial=S,e.disable={null:[]},e.document=_,e.flow=E,e.flowInitial=k,e.insideSpan=O,e.string=C,e.text=j})),VY=bW(((e,t)=>{var n=Zq(),r=eY(),o=rY(),i=oY(),a=iq(),s=lY(),l=oq(),c=$Y();t.exports=function(e){var t={defined:[],constructs:a([c].concat(l((e||{}).extensions))),content:u(n),document:u(r),flow:u(o),string:u(i.string),text:u(i.text)};return t;function u(e){return function(n){return s(t,e,n)}}}})),HY=bW(((e,t)=>{var n=/[\0\t\n\r]/g;t.exports=function(){var e,t=!0,r=1,o="";return function(i,a,s){var l,c,u,d,f,p=[];for(i=o+i.toString(a),u=0,o="",t&&(65279===i.charCodeAt(0)&&u++,t=void 0);u<i.length;){if(n.lastIndex=u,d=(l=n.exec(i))?l.index:i.length,f=i.charCodeAt(d),!l){o=i.slice(u);break}if(10===f&&u===d&&e)p.push(-3),e=void 0;else if(e&&(p.push(-5),e=void 0),u<d&&(p.push(i.slice(u,d)),r+=d-u),0===f)p.push(65533),r++;else if(9===f)for(c=4*Math.ceil(r/4),p.push(-2);r++<c;)p.push(-1);else 10===f?(p.push(-4),r=1):(e=!0,r=1);u=d+1}return s&&(e&&p.push(-5),o&&p.push(o),p.push(null)),p}}})),KY=bW(((e,t)=>{var n=tY();t.exports=function(e){for(;!n(e););return e}})),UY=bW(((e,t)=>{t.exports=function(e,t,p){return"string"!=typeof t&&(p=t,t=void 0),function(e){var t=e||{},s=function(e,t){for(var n=-1;++n<t.length;)f(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(fe),autolinkProtocol:L,autolinkEmail:L,atxHeading:v(le),blockQuote:v(re),characterEscape:L,characterReference:L,codeFenced:v(oe),codeFencedFenceInfo:b,codeFencedFenceMeta:b,codeIndented:v(oe,b),codeText:v(ie,b),codeTextData:L,data:L,codeFlowValue:L,definition:v(ae),definitionDestinationString:b,definitionLabelString:b,definitionTitleString:b,emphasis:v(se),hardBreakEscape:v(ce),hardBreakTrailing:v(ce),htmlFlow:v(ue,b),htmlFlowData:L,htmlText:v(ue,b),htmlTextData:L,image:v(de),label:b,link:v(fe),listItem:v(he),listItemValue:k,listOrdered:v(pe,S),listUnordered:v(pe),paragraph:v(ge),reference:X,referenceString:b,resourceDestinationString:b,resourceTitleString:b,setextHeading:v(le),strong:v(me),thematicBreak:v(be)},exit:{atxHeading:x(),atxHeadingSequence:M,autolink:x(),autolinkEmail:ne,autolinkProtocol:te,blockQuote:x(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:ee,codeFenced:x(O),codeFencedFence:j,codeFencedFenceInfo:E,codeFencedFenceMeta:C,codeFlowValue:N,codeIndented:x(T),codeText:x(H),codeTextData:N,data:N,definition:x(),definitionDestinationString:P,definitionLabelString:I,definitionTitleString:R,emphasis:x(),hardBreakEscape:x(z),hardBreakTrailing:x(z),htmlFlow:x($),htmlFlowData:N,htmlText:x(V),htmlTextData:N,image:x(U),label:W,labelText:G,lineEnding:B,link:x(K),listItem:x(),listOrdered:x(),listUnordered:x(),paragraph:x(),referenceString:Z,resourceDestinationString:q,resourceTitleString:Y,resource:J,setextHeading:x(F),setextHeadingLineSequence:D,setextHeadingText:A,strong:x(),thematicBreak:x()}},t.mdastExtensions||[]),l={};return c;function c(e){for(var t,n={type:"root",children:[]},i=[],a=[],l=-1,c={stack:[n],tokenStack:i,config:s,enter:y,exit:w,buffer:b,resume:_,setData:h,getData:g};++l<e.length;)("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)&&("enter"===e[l][0]?a.push(l):l=p(e,a.pop(l),l));for(l=-1;++l<e.length;)t=s[e[l][0]],o.call(t,e[l][1].type)&&t[e[l][1].type].call(r({sliceSerialize:e[l][2].sliceSerialize},c),e[l][1]);if(i.length)throw new Error("Cannot close document, a token (`"+i[i.length-1].type+"`, "+d({start:i[i.length-1].start,end:i[i.length-1].end})+") is still open");for(n.position={start:m(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:m(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<s.transforms.length;)n=s.transforms[l](n)||n;return n}function p(e,t,n){for(var r,o,i,a,s,l,c,u=t-1,d=-1,f=!1;++u<=n;)if("listUnordered"===(s=e[u])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,c=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(r&&!c&&!d&&!l&&(l=u),c=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(c=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(o=u,i=void 0;o--;)if("lineEnding"===(a=e[o])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;i&&(e[i][1].type="lineEndingBlank",f=!0),a[1].type="lineEnding",i=o}else if("linePrefix"!==a[1].type&&"blockQuotePrefix"!==a[1].type&&"blockQuotePrefixWhitespace"!==a[1].type&&"blockQuoteMarker"!==a[1].type&&"listItemIndent"!==a[1].type)break;l&&(!i||l<i)&&(r._spread=!0),r.end=m(i?e[i][1].start:s[1].end),e.splice(i||u,0,["exit",r,s[2]]),u++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:m(s[1].start)},e.splice(u,0,["enter",r,s[2]]),u++,n++,l=void 0,c=!0)}return e[t][1]._spread=f,n}function h(e,t){l[e]=t}function g(e){return l[e]}function m(e){return{line:e.line,column:e.column,offset:e.offset}}function v(e,t){return n;function n(n){y.call(this,e(n),n),t&&t.call(this,n)}}function b(){this.stack.push({type:"fragment",children:[]})}function y(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:m(t.start)},e}function x(e){return t;function t(t){e&&e.call(this,t),w.call(this,t)}}function w(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): it’s not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+d({start:n.start,end:n.end})+") is open");return t.position.end=m(e.end),t}function _(){return n(this.stack.pop())}function S(){h("expectingFirstListItemValue",!0)}function k(e){g("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),h("expectingFirstListItemValue"))}function E(){var e=this.resume();this.stack[this.stack.length-1].lang=e}function C(){var e=this.resume();this.stack[this.stack.length-1].meta=e}function j(){g("flowCodeInside")||(this.buffer(),h("flowCodeInside",!0))}function O(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h("flowCodeInside")}function T(){var e=this.resume();this.stack[this.stack.length-1].value=e}function I(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase()}function R(){var e=this.resume();this.stack[this.stack.length-1].title=e}function P(){var e=this.resume();this.stack[this.stack.length-1].url=e}function M(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)}function A(){h("setextHeadingSlurpLineEnding",!0)}function D(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function F(){h("setextHeadingSlurpLineEnding")}function L(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||"text"!==n.type)&&((n=ve()).position={start:m(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function N(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=m(e.end)}function B(e){var t=this.stack[this.stack.length-1];if(g("atHardBreak"))return t.children[t.children.length-1].position.end=m(e.end),void h("atHardBreak");!g("setextHeadingSlurpLineEnding")&&s.canContainEols.indexOf(t.type)>-1&&(L.call(this,e),N.call(this,e))}function z(){h("atHardBreak",!0)}function $(){var e=this.resume();this.stack[this.stack.length-1].value=e}function V(){var e=this.resume();this.stack[this.stack.length-1].value=e}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function K(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function U(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function G(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function W(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,h("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function q(){var e=this.resume();this.stack[this.stack.length-1].url=e}function Y(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){h("inReference")}function X(){h("referenceType","collapsed")}function Z(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),h("referenceType","full")}function Q(e){h("characterReferenceType",e.type)}function ee(e){var t,n,r=this.sliceSerialize(e),o=g("characterReferenceType");o?(t=a(r,"characterReferenceMarkerNumeric"===o?10:16),h("characterReferenceType")):t=u(r),(n=this.stack.pop()).value+=t,n.position.end=m(e.end)}function te(e){N.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function ne(e){N.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function re(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function ie(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function ue(){return{type:"html",value:""}}function de(){return{type:"image",title:null,url:"",alt:null}}function fe(){return{type:"link",title:null,url:"",children:[]}}function pe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function he(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ge(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}(p)(c(s(p).document().write(l()(e,t,!0))))};var n=Yq(),r=gq(),o=tq(),i=Jq(),a=Xq(),s=VY(),l=HY(),c=KY(),u=mY(),d=AW();function f(e,t){var n,r;for(n in t)r=o.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}})),GY=bW(((e,t)=>{t.exports=UY()})),WY=bW(((e,t)=>{t.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=GY()})),qY=bW(((e,t)=>{!function(){var e;function n(e){for(var t,n,r,o,i=1,a=[].slice.call(arguments),s=0,l=e.length,c="",u=!1,d=!1,f=function(){return a[i++]},p=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<l;++s)if(t=e[s],u)switch(u=!1,"."==t?(d=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(d=!0,s+=2,t=e[s]):d=!0,o=p(),t){case"b":c+=parseInt(f(),10).toString(2);break;case"c":c+="string"==typeof(n=f())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(f(),10);break;case"f":r=String(parseFloat(f()).toFixed(o||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(f());break;case"o":c+="0"+parseInt(f(),10).toString(8);break;case"s":c+=f();break;case"x":c+="0x"+parseInt(f(),10).toString(16);break;case"X":c+="0x"+parseInt(f(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(e=typeof t<"u"?t.exports=n:function(){return this||(0,eval)("this")}()).format=n,e.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},typeof console<"u"&&"function"==typeof console.log&&(e.printf=function(){console.log(n.apply(null,arguments))})}()})),YY=bW(((e,t)=>{var n=qY(),r=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=n.apply(null,arguments)),new e(t)}}t.exports=r,r.eval=o(EvalError),r.range=o(RangeError),r.reference=o(ReferenceError),r.syntax=o(SyntaxError),r.type=o(TypeError),r.uri=o(URIError),r.create=o})),JY=bW(((e,t)=>{t.exports=function(e){var t,n=e||"yaml",r=[],o=-1;for((("string"==typeof n||!("length"in n))&&(n=[n]),t=n.length);++o<t;)r[o]=i(n[o]);return r};var n=YY(),r={}.hasOwnProperty,o={yaml:"-",toml:"+"};function i(e){var t=e;if("string"==typeof t){if(!r.call(o,t))throw n("Missing matter definition for `%s`",t);t={type:t,marker:o[t]}}else if("object"!=typeof t)throw n("Expected matter to be an object, not `%j`",t);if(!r.call(t,"type"))throw n("Missing `type` in matter `%j`",t);if(!r.call(t,"fence")&&!r.call(t,"marker"))throw n("Missing `marker` or `fence` in matter `%j`",t);return t}})),XY=bW(((e,t)=>{t.exports=function(e){for(var t,i,a=n(e),s=a.length,l=-1,c={};++l<s;)t=a[l],(i=o(t,"open").charCodeAt(0))in c?c[i].push(r(t)):c[i]=[r(t)];return{flow:c}};var n=JY();function r(e){var t,n=e.type,r=e.anywhere,i=n+"Value",a=n+"Fence",s=a+"Sequence",l={tokenize:function(e,n,r){var o=0;return function(n){return n===t.charCodeAt(o)?(e.enter(a),e.enter(s),i(n)):r(n)};function i(n){return o===t.length?(e.exit(s),-2===n||-1===n||32===n?(e.enter("whitespace"),l(n)):c(n)):n===t.charCodeAt(o)?(e.consume(n),o++,i):r(n)}function l(t){return-2===t||-1===t||32===t?(e.consume(t),l):(e.exit("whitespace"),c(t))}function c(t){return-5===t||-4===t||-3===t||null===t?(e.exit(a),n(t)):r(t)}},partial:!0};return{tokenize:function(a,s,c){var u=this;return function(i){var s=u.now();return 1!==s.column||!r&&1!==s.line?c(i):(a.enter(n),t=o(e,"open"),a.attempt(l,d,c)(i))};function d(n){return t=o(e,"close"),h(n)}function f(e){return-5===e||-4===e||-3===e||null===e?h(e):(a.enter(i),p(e))}function p(e){return-5===e||-4===e||-3===e||null===e?(a.exit(i),h(e)):(a.consume(e),p)}function h(e){return null===e?c(e):(a.enter("lineEnding"),a.consume(e),a.exit("lineEnding"),a.attempt(l,g,f))}function g(e){return a.exit(n),s(e)}},concrete:!0}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),ZY=bW(((e,t)=>{t.exports=XY()})),QY=bW(((e,t)=>{t.exports=function(e){for(var t,a=n(e),s=a.length,l=-1,c={},u={};++l<s;)t=a[l],c[t.type]=r(t),u[t.type]=o,u[t.type+"Value"]=i;return{enter:c,exit:u}};var n=JY();function r(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function o(e){var t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function i(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}})),eJ=bW(((e,t)=>{t.exports=function(e){for(var t,i=[],a={},s=n(e),l=s.length,c=-1;++c<l;)t=s[c],a[t.type]=r(t),i.push({atBreak:!0,character:o(t,"open").charAt(0)});return{unsafe:i,handlers:a}};var n=JY();function r(e){var t=o(e,"open"),n=o(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+n}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),tJ=bW(((e,t)=>{var n=ZY(),r=QY(),o=eJ();t.exports=function(e){var t=this.data();function i(e,n){t[e]?t[e].push(n):t[e]=[n]}i("micromarkExtensions",n(e)),i("fromMarkdownExtensions",r(e)),i("toMarkdownExtensions",o(e))}})),nJ=bW(((e,t)=>{t.exports=function(e){var t=e||{},n={tokenize:f},r={tokenize:p,resolveAll:u},o={add:"after",tokenize:h,resolveAll:u,resolveTo:d},i={tokenize:g,continuation:{tokenize:m},exit:v},a={91:n};return t.inlineNotes&&(a[93]=o,a[94]=r),{_hiddenFootnoteSupport:{},document:{91:i},text:a}};var n=Jq(),r=Qq(),o=yq(),i=rq(),a=Sq(),s=mq(),l=hq(),c={tokenize:function(e,t,n){var r=this;return o(e,(function(e){return 4===a(r.events,"footnoteDefinitionIndent")?t(e):n(e)}),"footnoteDefinitionIndent",5)},partial:!0};function u(e){for(var t,n=e.length,r=-1;++r<n;)t=e[r][1],"enter"===e[r][0]&&"inlineNoteStart"===t.type&&(t.type="data",e.splice(r+1,4),n-=4);return e}function d(e,t){for(var n,r,o,a,c,u=e.length-4;u--;)if(o=e[u][1],"enter"===e[u][0]&&"inlineNoteStart"===o.type){c=u,a="inlineNote";break}n={type:a,start:s(e[c][1].start),end:s(e[e.length-1][1].end)},r={type:"inlineNoteText",start:s(e[c+4][1].end),end:s(e[e.length-3][1].start)};var d=[["enter",n,t],e[c+1],e[c+2],e[c+3],e[c+4],["enter",r,t]];return i(d,d.length,0,l(t.parser.constructs.insideSpan.null,e.slice(c+6,-4),t)),d.push(["exit",r,t],e[e.length-2],e[e.length-3],["exit",n,t]),i(e,u,e.length-u,d),e}function f(e,t,r){var o,i=this,a=i.parser.footnotes||(i.parser.footnotes=[]),s=0;return function(t){return 91!==t?r(t):(e.enter("footnoteCall"),e.enter("footnoteCallLabelMarker"),e.consume(t),e.exit("footnoteCallLabelMarker"),l)};function l(t){return 94!==t?r(t):(e.enter("footnoteCallMarker"),e.consume(t),e.exit("footnoteCallMarker"),e.enter("footnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(l){var d;return null===l||91===l||s++>999?r(l):93===l?o?(e.exit("chunkString"),d=e.exit("footnoteCallString"),a.indexOf(n(i.sliceSerialize(d)))<0?r(l):function(n){return e.enter("footnoteCallLabelMarker"),e.consume(n),e.exit("footnoteCallLabelMarker"),e.exit("footnoteCall"),t}(l)):r(l):(e.consume(l),l<0||32===l||(o=!0),92===l?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function p(e,t,n){return function(t){return 94!==t?n(t):(e.enter("inlineNoteStart"),e.enter("inlineNoteMarker"),e.consume(t),e.exit("inlineNoteMarker"),r)};function r(r){return 91!==r?n(r):(e.enter("inlineNoteStartMarker"),e.consume(r),e.exit("inlineNoteStartMarker"),e.exit("inlineNoteStart"),t)}}function h(e,t,n){var r=this;return function(o){for(var i,a=r.events.length;a--;)if("inlineNoteStart"===r.events[a][1].type){i=!0;break}return 93===o&&i?(e.enter("inlineNoteEnd"),e.enter("inlineNoteEndMarker"),e.consume(o),e.exit("inlineNoteEndMarker"),e.exit("inlineNoteEnd"),t):n(o)}}function g(e,t,o){var i,a,s=this,l=s.parser.footnotes||(s.parser.footnotes=[]),c=0;return function(t){return 91!==t?o(t):(e.enter("footnoteDefinition")._container=!0,e.enter("footnoteDefinitionLabel"),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),u)};function u(t){return 94!==t?o(t):(e.enter("footnoteDefinitionMarker"),e.consume(t),e.exit("footnoteDefinitionMarker"),e.enter("footnoteDefinitionLabelString"),d)}function d(t){var r;return null===t||91===t||c>999?o(t):93===t?a?(r=e.exit("footnoteDefinitionLabelString"),i=n(s.sliceSerialize(r)),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),e.exit("footnoteDefinitionLabel"),h):o(t):-5===t||-4===t||-3===t?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c++,d):(e.enter("chunkString").contentType="string",f(t))}function f(t){return null===t||-5===t||-4===t||-3===t||91===t||93===t||c>999?(e.exit("chunkString"),d(t)):(t<0||32===t||(a=!0),c++,e.consume(t),92===t?p:f)}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,f):f(t)}function h(t){return 58!==t?o(t):(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),e.check(r,g,m))}function g(e){return s.containerState.initialBlankLine=!0,v(e)}function m(t){return(-2===t||-1===t||32===t)&&(e.enter("footnoteDefinitionWhitespace"),e.consume(t),e.exit("footnoteDefinitionWhitespace")),v(t)}function v(e){return l.indexOf(i)<0&&l.push(i),t(e)}}function m(e,t,n){var o=this;return e.check(r,(function(e){return o.containerState.initialBlankLine&&(o.containerState.furtherBlankLines=!0),t(e)}),(function(r){return o.containerState.furtherBlankLines||-2!==r&&-1!==r&&32!==r?n(r):(o.containerState.initialBlankLine=void 0,o.containerState.furtherBlankLines=void 0,e.attempt(c,t,n)(r))}))}function v(e){e.exit("footnoteDefinition")}})),rJ=bW((e=>{var t=Jq();e.canContainEols=["footnote"],e.enter={footnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},footnoteDefinitionLabelString:function(){this.buffer()},footnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},footnoteCallString:function(){this.buffer()},inlineNote:function(e){this.enter({type:"footnote",children:[]},e)}},e.exit={footnoteDefinition:function(e){this.exit(e)},footnoteDefinitionLabelString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},footnoteCall:function(e){this.exit(e)},footnoteCallString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},inlineNote:function(e){this.exit(e)}}})),oJ=bW(((e,t)=>{t.exports=function(e){return e.label||!e.identifier?e.label||"":e.identifier.replace(r,"$1").replace(o,i)};var n=mY(),r=/\\([!-/:-@[-`{-~])/g,o=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}})),iJ=bW(((e,t)=>{function n(e,t,n){var r;if(!t)return n;for("string"==typeof t&&(t=[t]),r=-1;++r<t.length;)if(-1!==e.indexOf(t[r]))return!0;return!1}t.exports=function(e,t){return n(e,t.inConstruct,!0)&&!n(e,t.notInConstruct)}})),aJ=bW(((e,t)=>{t.exports=function(e,t,a){for(var s,l,c,u,d,f,p,h,g=(a.before||"")+(t||"")+(a.after||""),m=[],v=[],b={},y=-1;++y<e.unsafe.length;)if(u=e.unsafe[y],r(e.stack,u))for(d=n(u);f=d.exec(g);)s="before"in u||u.atBreak,l="after"in u,c=f.index+(s?f[1].length:0),-1===m.indexOf(c)?(m.push(c),b[c]={before:s,after:l}):(b[c].before&&!s&&(b[c].before=!1),b[c].after&&!l&&(b[c].after=!1));for(m.sort(o),p=a.before?a.before.length:0,h=g.length-(a.after?a.after.length:0),y=-1;++y<m.length;)!((c=m[y])<p||c>=h)&&(c+1<h&&m[y+1]===c+1&&b[c].after&&!b[c+1].before&&!b[c+1].after||(p!==c&&v.push(i(g.slice(p,c),"\\")),p=c,!/[!-/:-@[-`{-~]/.test(g.charAt(c))||a.encode&&-1!==a.encode.indexOf(g.charAt(c))?(v.push("&#x"+g.charCodeAt(c).toString(16).toUpperCase()+";"),p++):v.push("\\")));return v.push(i(g.slice(p,h),a.after)),v.join("")};var n=Dq(),r=iJ();function o(e,t){return e-t}function i(e,t){for(var n,r=/\\(?=[!-/:-@[-`{-~])/g,o=[],i=[],a=-1,s=0,l=e+t;n=r.exec(l);)o.push(n.index);for(;++a<o.length;)s!==o[a]&&i.push(e.slice(s,o[a])),i.push("\\"),s=o[a];return i.push(e.slice(s)),i.join("")}})),sJ=bW((e=>{e.unsafe=[{character:"[",inConstruct:["phrasing","label","reference"]}],e.handlers={footnote:s,footnoteDefinition:function(e,n,a){var s,l=a.enter("footnoteDefinition"),c=a.enter("label"),u="[^"+i(a,t(e),{before:"^",after:"]"})+"]:";return c(),s=o(r(e,a),(function(e,t,n){return t?(n?"":" ")+e:(n?u:u+" ")+e})),l(),s},footnoteReference:a};var t=oJ(),n=Mq(),r=Vq(),o=Hq(),i=aJ();function a(e,n,r){var o=r.enter("footnoteReference"),a=r.enter("reference"),s=i(r,t(e),{before:"^",after:"]"});return a(),o(),"[^"+s+"]"}function s(e,t,r){var o=r.enter("footnote"),i=r.enter("label"),a="^["+n(e,r,{before:"[",after:"]"})+"]";return i(),o(),a}a.peek=function(){return"["},s.peek=function(){return"^"}})),lJ=bW(((e,t)=>{var n,r=nJ(),o=rJ(),i=sJ();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-footnotes] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i)}})),cJ=bW((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkdown=void 0;var n=t(VW());t(eq()).default.transforms=[];var r=t(qq()),o=t(WY()),i=t(tJ()),a=t(lJ()),s=n.default().use(o.default).use(i.default,["yaml"]).use(r.default).use(a.default,{inlineNotes:!0});e.parseMarkdown=e=>s.parse(e)})),uJ=bW((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.Syntax=void 0;var n=SW(),r=_W();Object.defineProperty(e,"Syntax",{enumerable:!0,get:function(){return r.ASTNodeTypes}});var o=t(kW()),i=t(jW()),a=cJ(),s=i.default("@textlint/markdown-to-ast");e.parse=function(e){let t=65279===e.charCodeAt(0)?e.slice(1):e,r=a.parseMarkdown(t);return o.default(r).forEach((function(e){if(this.notLeaf){if(e.type){let t=n.SyntaxMap[e.type];t?e.type=t:s(`replacedType : ${t} , node.type: ${e.type}`)}if(e.position){let n=e.position,r={start:{line:n.start.line,column:Math.max(n.start.column-1,0)},end:{line:n.end.line,column:Math.max(n.end.column-1,0)}},o=[n.start.offset,n.end.offset];e.loc=r,e.range=o,e.raw=t.slice(o[0],o[1]),Object.defineProperty(e,"position",{enumerable:!1,configurable:!1,writable:!1,value:n})}}})),r}})),dJ=bW(((e,t)=>{var n=uJ().parse,r={Strong:{type:"BOLD",symbol:"__"},Emphasis:{type:"ITALIC",symbol:"*"}},o={List:"unordered-list-item",Header1:"header-one",Header2:"header-two",Header3:"header-three",Header4:"header-four",Header5:"header-five",Header6:"header-six",CodeBlock:"code-block",BlockQuote:"blockquote"},i=e=>{let t=e.indexOf("```"),n=e.indexOf("```",t+1);if(t>=0&&n>=0){let r=e.slice(t,n+1).join("\n"),o=[...e.slice(0,t),r,...e.slice(n+1)];return i(o)}return e},a=(e,t,i={})=>{let a=vW(vW({},r),i.inlineStyles),s=vW(vW({},o),i.blockStyles),l=n(e),c="",u=[],d=[],f=t,p=(e,t,n)=>{u.push({offset:e,length:t,style:n})},h=e=>e.reduce(((e,t)=>t.value?e+t.value.length:t.children&&t.children.length?e+h(t.children):e),0),g=(e,t)=>{let n=/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/;switch(e.type){case"Link":(e=>{let t=Object.keys(f).length;f[t]={type:"LINK",mutability:"MUTABLE",data:{url:e.url}},d.push({key:t,length:h(e.children),offset:c.length})})(e);break;case"Image":(e=>{let t=Object.keys(f).length;f[t]={type:"IMAGE",mutability:"IMMUTABLE",data:{url:e.url,src:e.url,fileName:e.alt||""}},d.push({key:t,length:1,offset:c.length})})(e);break;case"Paragraph":n.test(e.raw)&&(e=>{let t=e.raw.match(/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/)[1],n=Object.keys(f).length;f[n]={type:"draft-js-video-plugin-video",mutability:"IMMUTABLE",data:{src:t}},d.push({key:n,length:1,offset:c.length})})(e)}if(!n.test(e.raw)&&e.children&&t){let n=h(e.children);p(c.length,n,t.type);let r=a[e.type];e.children.forEach((e=>{g(e,r)}))}else if(!n.test(e.raw)&&e.children){let t=a[e.type];e.children.forEach((e=>{g(e,t)}))}else t&&p(c.length,e.value.length,t.type),a[e.type]&&p(c.length,e.value.length,a[e.type].type),c=`${c}${"Image"===e.type||n.test(e.raw)?" ":e.value}`};l.children.forEach((e=>{let t=a[e.type];g(e,t)}));let m="unstyled";if(l.children[0]){let e=((e,t)=>{let n=e.type,r=e.ordered,o=e.depth;return"List"===n&&r?"ordered-list-item":"Header"===n?t[`${n}${o}`]:"Paragraph"===e.type&&e.children&&e.children[0]&&"Image"===e.children[0].type||"Paragraph"===e.type&&e.raw&&e.raw.match(/^\[\[\s\S+\s.*\S+\s\]\]/)?"atomic":t[n]})(l.children[0],s);e&&(m=e)}return{text:c,inlineStyleRanges:u,entityRanges:d,blockStyle:m,entityMap:f}};t.exports=function(e,t){let n=(e=>{let t=e.split("\n");return i(t)})(e),r=[],o={};return n.forEach((e=>{let n=a(e,o,t);r.push({text:n.text,type:n.blockStyle,depth:0,inlineStyleRanges:n.inlineStyleRanges,entityRanges:n.entityRanges}),o=n.entityMap})),0===Object.keys(o).length&&(o={data:"",mutability:"",type:""}),{blocks:r,entityMap:o}}})),fJ=xW(wW()),pJ=xW(dJ());fJ.default,pJ.default;function hJ(e,t){return"function"==typeof e?e(t):e}function gJ(e,t){return n=>{t.setState((t=>({...t,[e]:hJ(n,t[e])})))}}function mJ(e){return e instanceof Function}function vJ(e,t,n){let r,o=[];return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(s.length===o.length&&!s.some(((e,t)=>o[t]!==e)))return r;let l;if(o=s,n.key&&n.debug&&(l=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function bJ(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const yJ="debugHeaders";function xJ(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const wJ={createTable:e=>{e.getHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,a;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],l=null!=(a=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],c=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))));return _J(t,[...s,...c,...l],e)}),bJ(e.options,yJ)),e.getCenterHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>(n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),_J(t,n,e,"center"))),bJ(e.options,yJ)),e.getLeftHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return _J(t,i,e,"left")}),bJ(e.options,yJ)),e.getRightHeaderGroups=vJ((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return _J(t,i,e,"right")}),bJ(e.options,yJ)),e.getFooterGroups=vJ((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getLeftFooterGroups=vJ((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getCenterFooterGroups=vJ((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getRightFooterGroups=vJ((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),bJ(e.options,yJ)),e.getFlatHeaders=vJ((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getLeftFlatHeaders=vJ((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getCenterFlatHeaders=vJ((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getRightFlatHeaders=vJ((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),bJ(e.options,yJ)),e.getCenterLeafHeaders=vJ((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getLeftLeafHeaders=vJ((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getRightLeafHeaders=vJ((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),bJ(e.options,yJ)),e.getLeafHeaders=vJ((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,a,s,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),bJ(e.options,yJ))}};function _J(e,t,n,r){var o,i;let a=0;const s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)}),0)};s(e);let l=[];const c=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let s,l=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,l=!0),a&&(null==a?void 0:a.column)===s)a.subHeaders.push(e);else{const o=xJ(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(i,t-1)},u=t.map(((e,t)=>xJ(n,e,{depth:a,index:t})));c(u,a-1),l.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}const SJ=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>function(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}(s.subRows,(e=>e.subRows)),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:vJ((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:vJ((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),bJ(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),bJ(e.options,"debugRows")),_getAllCellsByColumnId:vJ((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),bJ(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},kJ={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},EJ=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(i))};EJ.autoRemove=e=>DJ(e);const CJ=(e,t,n)=>{var r;return!(null==(r=e.getValue(t))||null==(r=r.toString())||!r.includes(n))};CJ.autoRemove=e=>DJ(e);const jJ=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};jJ.autoRemove=e=>DJ(e);const OJ=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};OJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const TJ=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));TJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const IJ=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));IJ.autoRemove=e=>DJ(e)||!(null!=e&&e.length);const RJ=(e,t,n)=>e.getValue(t)===n;RJ.autoRemove=e=>DJ(e);const PJ=(e,t,n)=>e.getValue(t)==n;PJ.autoRemove=e=>DJ(e);const MJ=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};MJ.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},MJ.autoRemove=e=>DJ(e)||DJ(e[0])&&DJ(e[1]);const AJ={includesString:EJ,includesStringSensitive:CJ,equalsString:jJ,arrIncludes:OJ,arrIncludesAll:TJ,arrIncludesSome:IJ,equals:RJ,weakEquals:PJ,inNumberRange:MJ};function DJ(e){return null==e||""===e}const FJ={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:gJ("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?AJ.includesString:"number"==typeof r?AJ.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?AJ.equals:Array.isArray(r)?AJ.arrIncludes:AJ.weakEquals},e.getFilterFn=()=>{var n,r;return mJ(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:AJ[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=hJ(n,o?o.value:void 0);var a;if(LJ(r,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const s={id:e.id,value:i};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?l:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=hJ(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(LJ(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function LJ(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const NJ={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))})),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const r=Math.floor(n.length/2),o=n.sort(((e,t)=>e-t));return n.length%2!=0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},BJ={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:gJ("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?NJ.sum:"[object Date]"===Object.prototype.toString.call(r)?NJ.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return mJ(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:NJ[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const zJ={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:gJ("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=vJ((e=>[WJ(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),bJ(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=WJ(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=WJ(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=vJ((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),bJ(e.options,"debugTable"))}},$J={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:gJ("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,a,s,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...t??[],...n??[]];return e.filter((e=>!r.includes(e.column.id)))}),bJ(t.options,"debugRows")),e.getLeftVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),bJ(t.options,"debugRows")),e.getRightVisibleCells=vJ((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),bJ(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?!(null==(n=r[t])||!n.length):!!(null!=(o=r.left)&&o.length||null!=(i=r.right)&&i.length)},e.getLeftLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),bJ(e.options,"debugColumns")),e.getRightLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),bJ(e.options,"debugColumns")),e.getCenterLeafColumns=vJ((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...t??[],...n??[]];return e.filter((e=>!r.includes(e.id)))}),bJ(e.options,"debugColumns"))}},VJ={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},HJ={getDefaultColumnDef:()=>VJ,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:gJ("columnSizing",e),onColumnSizingInfoChange:gJ("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:VJ.minSize,null!=(r=i??e.columnDef.size)?r:VJ.size),null!=(o=e.columnDef.maxSize)?o:VJ.maxSize)},e.getStart=vJ((e=>[e,WJ(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),bJ(t.options,"debugColumns")),e.getAfter=vJ((e=>[e,WJ(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),bJ(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o||(null==i.persist||i.persist(),UJ(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=UJ(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*s,0))/100})),{...e,deltaOffset:a,deltaPercentage:s}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...c}))))},d=e=>u("move",e),f=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||typeof document<"u"?document:null,h={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",h.moveHandler),null==p||p.removeEventListener("mouseup",h.upHandler),f(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",g.moveHandler),null==p||p.removeEventListener("touchend",g.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof KJ)return KJ;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return KJ=e,KJ}()&&{passive:!1};UJ(i)?(null==p||p.addEventListener("touchmove",g.moveHandler,m),null==p||p.addEventListener("touchend",g.upHandler,m)):(null==p||p.addEventListener("mousemove",h.moveHandler,m),null==p||p.addEventListener("mouseup",h.upHandler,m)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let KJ=null;function UJ(e){return"touchstart"===e.type}const GJ={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:gJ("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=vJ((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),bJ(t.options,"debugRows")),e.getVisibleCells=vJ((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),bJ(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>vJ((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),bJ(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function WJ(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const qJ={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:gJ("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>AJ.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return mJ(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:AJ[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},YJ={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:gJ("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const i=!0===r||!(null==r||!r[e.id]);let a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||null!=r&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},JJ={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:gJ("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>hJ(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=hJ(t,n.pageIndex);const o=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,hJ(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=hJ(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=vJ((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),bJ(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},XJ={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:gJ("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,a,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=r??o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?!(null==(n=r[t])||!n.length):!!(null!=(o=r.top)&&o.length||null!=(i=r.bottom)&&i.length)},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(n??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(n??[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),bJ(e.options,"debugRows")),e.getBottomRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),bJ(e.options,"debugRows")),e.getCenterRows=vJ((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...t??[],...n??[]]);return e.filter((e=>!r.has(e.id)))}),bJ(e.options,"debugRows"))}},ZJ={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:gJ("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{QJ(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getFilteredSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getGroupedSelectedRowModel=vJ((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?eX(e,n):{rows:[],flatRows:[],rowsById:{}}),bJ(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!(!t.length||!Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return QJ(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return tX(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===nX(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===nX(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},QJ=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach((t=>QJ(e,t.id,n,r,o)))};function eX(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const a=tX(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function tX(e,t){var n;return null!=(n=t[e.id])&&n}function nX(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(tX(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=nX(e,t);"all"===n?i=!0:("some"===n&&(i=!0),o=!1)}})),o?"all":!!i&&"some"}const rX=/([0-9]+)/gm;function oX(e,t){return e===t?0:e>t?1:-1}function iX(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function aX(e,t){const n=e.split(rX).filter(Boolean),r=t.split(rX).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const sX={alphanumeric:(e,t,n)=>aX(iX(e.getValue(n)).toLowerCase(),iX(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>aX(iX(e.getValue(n)),iX(t.getValue(n))),text:(e,t,n)=>oX(iX(e.getValue(n)).toLowerCase(),iX(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>oX(iX(e.getValue(n)),iX(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>oX(e.getValue(n),t.getValue(n))},lX={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:gJ("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return sX.datetime;if("string"==typeof n&&(r=!0,n.split(rX).length>1))return sX.alphanumeric}return r?sX.text:sX.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return mJ(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:sX[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((a=>{const s=null==a?void 0:a.find((t=>t.id===e.id)),l=null==a?void 0:a.findIndex((t=>t.id===e.id));let c,u=[],d=i?n:"desc"===o;var f;(c=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&l!==a.length-1?"replace":s?"toggle":"replace","toggle"===c&&(i||o||(c="remove")),"add"===c)?(u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):u="toggle"===c?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===c?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return u}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},cX=[wJ,GJ,zJ,$J,kJ,FJ,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},qJ,lX,BJ,YJ,JJ,XJ,ZJ,HJ];function uX(e){var t,n;const r=[...cX,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let a={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a}));const s=[];let l=!1;const c={_features:r,options:{...i,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=hJ(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:vJ((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),bJ(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:vJ((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},s=a.accessorKey;let l,c=null!=(o=null!=(i=a.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?l=a.accessorFn:s&&(l=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[a.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:l,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:vJ((()=>[!0]),(()=>{var e;return[u,...null==(e=u.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),bJ(e.options,"debugColumns")),getLeafColumns:vJ((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=u.columns)&&t.length){let t=u.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[u]}),bJ(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(u,e);return u}(o,e,r,n),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),bJ(e,"debugColumns")),getAllFlatColumns:vJ((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),bJ(e,"debugColumns")),_getAllFlatColumnsById:vJ((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),bJ(e,"debugColumns")),getAllLeafColumns:vJ((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>{let n=e.flatMap((e=>e.getLeafColumns()));return t(n)}),bJ(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,c);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function dX(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function fX(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var r;const o=[],i={},a=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const l=[];for(let u=0;u<e.length;u++){var c;let d=e[u];const f=SJ(n,d.id,d.original,d.index,d.depth,0,d.parentId);if(f.columnFilters=d.columnFilters,null!=(c=d.subRows)&&c.length&&r<a){if(f.subRows=s(d.subRows,r+1),d=f,t(d)&&!f.subRows.length){l.push(d),i[d.id]=d,o.push(d);continue}if(t(d)||f.subRows.length){l.push(d),i[d.id]=d,o.push(d);continue}}else d=f,t(d)&&(l.push(d),i[d.id]=d,o.push(d))}return l};return{rows:s(e),flatRows:o,rowsById:i}}(e,t,n):function(e,t,n){var r;const o=[],i={},a=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const l=[];for(let u=0;u<e.length;u++){let d=e[u];if(t(d)){var c;if(null!=(c=d.subRows)&&c.length&&r<a){const e=SJ(n,d.id,d.original,d.index,d.depth,0,d.parentId);e.subRows=s(d.subRows,r+1),d=e}l.push(d),o.push(d),i[d.id]=d}}return l};return{rows:s(e),flatRows:o,rowsById:i}}(e,t,n)}function pX(e,t){return e?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(e)?s.createElement(e,t):e:null}var hX=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===gX}(e)}(e)};var gX="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function mX(e,t){return!1!==t.clone&&t.isMergeableObject(e)?bX(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function vX(e,t,n){return e.concat(t).map((function(e){return mX(e,n)}))}function bX(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||vX,n.isMergeableObject=n.isMergeableObject||hX;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=mX(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=bX(e[o],t[o],n):r[o]=mX(t[o],n)})),r}(e,t,n):mX(t,n)}bX.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return bX(e,n,t)}),{})};var yX=bX;function xX(e,t){return function(n){return e(t(n))}}var wX=xX(Object.getPrototypeOf,Object),_X=Function.prototype,SX=Object.prototype,kX=_X.toString,EX=SX.hasOwnProperty,CX=kX.call(Object);function jX(e){if(!Uc(e)||"[object Object]"!=Kc(e))return!1;var t=wX(e);if(null===t)return!0;var n=EX.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&kX.call(n)==CX}function OX(e,t){return e===t||e!=e&&t!=t}function TX(e,t){for(var n=e.length;n--;)if(OX(e[n][0],t))return n;return-1}var IX=Array.prototype.splice;function RX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RX.prototype.clear=function(){this.__data__=[],this.size=0},RX.prototype.delete=function(e){var t=this.__data__,n=TX(t,e);return!(n<0)&&(n==t.length-1?t.pop():IX.call(t,n,1),--this.size,!0)},RX.prototype.get=function(e){var t=this.__data__,n=TX(t,e);return n<0?void 0:t[n][1]},RX.prototype.has=function(e){return TX(this.__data__,e)>-1},RX.prototype.set=function(e,t){var n=this.__data__,r=TX(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function PX(e){if(!Tc(e))return!1;var t=Kc(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var MX=Pc["__core-js_shared__"],AX=function(){var e=/[^.]+$/.exec(MX&&MX.keys&&MX.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var DX=Function.prototype.toString;function FX(e){if(null!=e){try{return DX.call(e)}catch{}try{return e+""}catch{}}return""}var LX=/^\[object .+?Constructor\]$/,NX=Function.prototype,BX=Object.prototype,zX=NX.toString,$X=BX.hasOwnProperty,VX=RegExp("^"+zX.call($X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HX(e){return!(!Tc(e)||function(e){return!!AX&&AX in e}(e))&&(PX(e)?VX:LX).test(FX(e))}function KX(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return HX(n)?n:void 0}var UX=KX(Pc,"Map"),GX=KX(Object,"create");var WX=Object.prototype.hasOwnProperty;var qX=Object.prototype.hasOwnProperty;function YX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function JX(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function XX(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YX.prototype.clear=function(){this.__data__=GX?GX(null):{},this.size=0},YX.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},YX.prototype.get=function(e){var t=this.__data__;if(GX){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return WX.call(t,e)?t[e]:void 0},YX.prototype.has=function(e){var t=this.__data__;return GX?void 0!==t[e]:qX.call(t,e)},YX.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=GX&&void 0===t?"__lodash_hash_undefined__":t,this},XX.prototype.clear=function(){this.size=0,this.__data__={hash:new YX,map:new(UX||RX),string:new YX}},XX.prototype.delete=function(e){var t=JX(this,e).delete(e);return this.size-=t?1:0,t},XX.prototype.get=function(e){return JX(this,e).get(e)},XX.prototype.has=function(e){return JX(this,e).has(e)},XX.prototype.set=function(e,t){var n=JX(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ZX(e){var t=this.__data__=new RX(e);this.size=t.size}ZX.prototype.clear=function(){this.__data__=new RX,this.size=0},ZX.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ZX.prototype.get=function(e){return this.__data__.get(e)},ZX.prototype.has=function(e){return this.__data__.has(e)},ZX.prototype.set=function(e,t){var n=this.__data__;if(n instanceof RX){var r=n.__data__;if(!UX||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new XX(r)}return n.set(e,t),this.size=n.size,this};var QX=function(){try{var e=KX(Object,"defineProperty");return e({},"",{}),e}catch{}}();function eZ(e,t,n){"__proto__"==t&&QX?QX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tZ=Object.prototype.hasOwnProperty;function nZ(e,t,n){var r=e[t];(!tZ.call(e,t)||!OX(r,n)||void 0===n&&!(t in e))&&eZ(e,t,n)}function rZ(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=void 0;void 0===l&&(l=e[s]),o?eZ(n,s,l):nZ(n,s,l)}return n}function oZ(e){return Uc(e)&&"[object Arguments]"==Kc(e)}var iZ=Object.prototype,aZ=iZ.hasOwnProperty,sZ=iZ.propertyIsEnumerable,lZ=oZ(function(){return arguments}())?oZ:function(e){return Uc(e)&&aZ.call(e,"callee")&&!sZ.call(e,"callee")},cZ=Array.isArray;var uZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,dZ=uZ&&"object"==typeof module&&module&&!module.nodeType&&module,fZ=dZ&&dZ.exports===uZ?Pc.Buffer:void 0,pZ=(fZ?fZ.isBuffer:void 0)||function(){return!1},hZ=/^(?:0|[1-9]\d*)$/;function gZ(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&hZ.test(e))&&e>-1&&e%1==0&&e<t}function mZ(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var vZ={};function bZ(e){return function(t){return e(t)}}vZ["[object Float32Array]"]=vZ["[object Float64Array]"]=vZ["[object Int8Array]"]=vZ["[object Int16Array]"]=vZ["[object Int32Array]"]=vZ["[object Uint8Array]"]=vZ["[object Uint8ClampedArray]"]=vZ["[object Uint16Array]"]=vZ["[object Uint32Array]"]=!0,vZ["[object Arguments]"]=vZ["[object Array]"]=vZ["[object ArrayBuffer]"]=vZ["[object Boolean]"]=vZ["[object DataView]"]=vZ["[object Date]"]=vZ["[object Error]"]=vZ["[object Function]"]=vZ["[object Map]"]=vZ["[object Number]"]=vZ["[object Object]"]=vZ["[object RegExp]"]=vZ["[object Set]"]=vZ["[object String]"]=vZ["[object WeakMap]"]=!1;var yZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,xZ=yZ&&"object"==typeof module&&module&&!module.nodeType&&module,wZ=xZ&&xZ.exports===yZ&&Ic.process,_Z=function(){try{return xZ&&xZ.require&&xZ.require("util").types||wZ&&wZ.binding&&wZ.binding("util")}catch{}}(),SZ=_Z&&_Z.isTypedArray,kZ=SZ?bZ(SZ):function(e){return Uc(e)&&mZ(e.length)&&!!vZ[Kc(e)]},EZ=Object.prototype.hasOwnProperty;function CZ(e,t){var n=cZ(e),r=!n&&lZ(e),o=!n&&!r&&pZ(e),i=!n&&!r&&!o&&kZ(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||EZ.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gZ(c,l)))&&s.push(c);return s}var jZ=Object.prototype;function OZ(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||jZ)}var TZ=xX(Object.keys,Object),IZ=Object.prototype.hasOwnProperty;function RZ(e){return null!=e&&mZ(e.length)&&!PX(e)}function PZ(e){return RZ(e)?CZ(e):function(e){if(!OZ(e))return TZ(e);var t=[];for(var n in Object(e))IZ.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var MZ=Object.prototype.hasOwnProperty;function AZ(e){if(!Tc(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=OZ(e),n=[];for(var r in e)"constructor"==r&&(t||!MZ.call(e,r))||n.push(r);return n}function DZ(e){return RZ(e)?CZ(e,!0):AZ(e)}var FZ="object"==typeof exports&&exports&&!exports.nodeType&&exports,LZ=FZ&&"object"==typeof module&&module&&!module.nodeType&&module,NZ=LZ&&LZ.exports===FZ?Pc.Buffer:void 0,BZ=NZ?NZ.allocUnsafe:void 0;function zZ(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $Z(){return[]}var VZ=Object.prototype.propertyIsEnumerable,HZ=Object.getOwnPropertySymbols,KZ=HZ?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(HZ(e),(function(t){return VZ.call(e,t)})))}:$Z;function UZ(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var GZ=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)UZ(t,KZ(e)),e=wX(e);return t}:$Z;function WZ(e,t,n){var r=t(e);return cZ(e)?r:UZ(r,n(e))}function qZ(e){return WZ(e,PZ,KZ)}function YZ(e){return WZ(e,DZ,GZ)}var JZ=KX(Pc,"DataView"),XZ=KX(Pc,"Promise"),ZZ=KX(Pc,"Set"),QZ=KX(Pc,"WeakMap"),eQ="[object Map]",tQ="[object Promise]",nQ="[object Set]",rQ="[object WeakMap]",oQ="[object DataView]",iQ=FX(JZ),aQ=FX(UX),sQ=FX(XZ),lQ=FX(ZZ),cQ=FX(QZ),uQ=Kc;(JZ&&uQ(new JZ(new ArrayBuffer(1)))!=oQ||UX&&uQ(new UX)!=eQ||XZ&&uQ(XZ.resolve())!=tQ||ZZ&&uQ(new ZZ)!=nQ||QZ&&uQ(new QZ)!=rQ)&&(uQ=function(e){var t=Kc(e),n="[object Object]"==t?e.constructor:void 0,r=n?FX(n):"";if(r)switch(r){case iQ:return oQ;case aQ:return eQ;case sQ:return tQ;case lQ:return nQ;case cQ:return rQ}return t});var dQ=Object.prototype.hasOwnProperty;var fQ=Pc.Uint8Array;function pQ(e){var t=new e.constructor(e.byteLength);return new fQ(t).set(new fQ(e)),t}var hQ=/\w*$/;var gQ=Lc?Lc.prototype:void 0,mQ=gQ?gQ.valueOf:void 0;function vQ(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return pQ(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return function(e,t){var n=t?pQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?pQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,hQ.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return function(e){return mQ?Object(mQ.call(e)):{}}(e)}}var bQ=Object.create,yQ=function(){function e(){}return function(t){if(!Tc(t))return{};if(bQ)return bQ(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var xQ=_Z&&_Z.isMap,wQ=xQ?bZ(xQ):function(e){return Uc(e)&&"[object Map]"==uQ(e)};var _Q=_Z&&_Z.isSet,SQ=_Q?bZ(_Q):function(e){return Uc(e)&&"[object Set]"==uQ(e)},kQ="[object Arguments]",EQ="[object Function]",CQ="[object Object]",jQ={};function OQ(e,t,n,r,o,i){var a,s=1&t,l=2&t,c=4&t;if(void 0!==a)return a;if(!Tc(e))return e;var u=cZ(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&dQ.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return zZ(e,a)}else{var d=uQ(e),f=d==EQ||"[object GeneratorFunction]"==d;if(pZ(e))return function(e,t){if(t)return e.slice();var n=e.length,r=BZ?BZ(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==CQ||d==kQ||f&&!o){if(a=l||f?{}:function(e){return"function"!=typeof e.constructor||OZ(e)?{}:yQ(wX(e))}(e),!s)return l?function(e,t){return rZ(e,GZ(e),t)}(e,function(e,t){return e&&rZ(t,DZ(t),e)}(a,e)):function(e,t){return rZ(e,KZ(e),t)}(e,function(e,t){return e&&rZ(t,PZ(t),e)}(a,e))}else{if(!jQ[d])return o?e:{};a=vQ(e,d,s)}}i||(i=new ZX);var p=i.get(e);if(p)return p;i.set(e,a),SQ(e)?e.forEach((function(r){a.add(OQ(r,t,n,r,e,i))})):wQ(e)&&e.forEach((function(r,o){a.set(o,OQ(r,t,n,o,e,i))}));var h=u?void 0:(c?l?YZ:qZ:l?DZ:PZ)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(h||e,(function(r,o){h&&(r=e[o=r]),nZ(a,o,OQ(r,t,n,o,e,i))})),a}jQ[kQ]=jQ["[object Array]"]=jQ["[object ArrayBuffer]"]=jQ["[object DataView]"]=jQ["[object Boolean]"]=jQ["[object Date]"]=jQ["[object Float32Array]"]=jQ["[object Float64Array]"]=jQ["[object Int8Array]"]=jQ["[object Int16Array]"]=jQ["[object Int32Array]"]=jQ["[object Map]"]=jQ["[object Number]"]=jQ[CQ]=jQ["[object RegExp]"]=jQ["[object Set]"]=jQ["[object String]"]=jQ["[object Symbol]"]=jQ["[object Uint8Array]"]=jQ["[object Uint8ClampedArray]"]=jQ["[object Uint16Array]"]=jQ["[object Uint32Array]"]=!0,jQ["[object Error]"]=jQ[EQ]=jQ["[object WeakMap]"]=!1;function TQ(e){return OQ(e,5)}var IQ=Array.isArray,RQ=Object.keys,PQ=Object.prototype.hasOwnProperty,MQ=typeof Element<"u";function AQ(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,o,i=IQ(e),a=IQ(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(!AQ(e[n],t[n]))return!1;return!0}if(i!=a)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,u=t instanceof RegExp;if(c!=u)return!1;if(c&&u)return e.toString()==t.toString();var d=RQ(e);if((r=d.length)!==RQ(t).length)return!1;for(n=r;0!==n--;)if(!PQ.call(t,d[n]))return!1;if(MQ&&e instanceof Element&&t instanceof Element)return e===t;for(n=r;0!==n--;)if(!("_owner"===(o=d[n])&&e.$$typeof||AQ(e[o],t[o])))return!1;return!0}return e!=e&&t!=t}var DQ=function(e,t){try{return AQ(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}};const FQ=Ec(DQ);function LQ(e){return OQ(e,4)}function NQ(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function BQ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(BQ.Cache||XX),n}BQ.Cache=XX;var zQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Q=/\\(\\)?/g,VQ=function(e){var t=BQ(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zQ,(function(e,n,r,o){t.push(r?o.replace($Q,"$1"):n||e)})),t}));function HQ(e){if("string"==typeof e||Gc(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var KQ=Lc?Lc.prototype:void 0,UQ=KQ?KQ.toString:void 0;function GQ(e){if("string"==typeof e)return e;if(cZ(e))return NQ(e,GQ)+"";if(Gc(e))return UQ?UQ.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function WQ(e){return cZ(e)?NQ(e,HQ):Gc(e)?[e]:zZ(VQ(function(e){return null==e?"":GQ(e)}(e)))}function qQ(){return qQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qQ.apply(this,arguments)}function YQ(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var JQ=(0,s.createContext)(void 0);JQ.displayName="FormikContext",JQ.Provider,JQ.Consumer;var XQ=function(e){return"function"==typeof e},ZQ=function(e){return null!==e&&"object"==typeof e},QQ=function(e){return String(Math.floor(Number(e)))===e},e0=function(e){return"[object String]"===Object.prototype.toString.call(e)},t0=function(e){return ZQ(e)&&XQ(e.then)};function n0(e,t,n,r){void 0===r&&(r=0);for(var o=WQ(t);e&&r<o.length;)e=e[o[r++]];return r!==o.length&&!e||void 0===e?n:e}function r0(e,t,n){for(var r=LQ(e),o=r,i=0,a=WQ(t);i<a.length-1;i++){var s=a[i],l=n0(e,a.slice(0,i+1));if(l&&(ZQ(l)||Array.isArray(l)))o=o[s]=LQ(l);else{var c=a[i+1];o=o[s]=QQ(c)&&Number(c)>=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)}function o0(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],s=e[a];ZQ(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},o0(s,t,n,r[a])):r[a]=t}return r}var i0={},a0={};function s0(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,o=void 0===r||r,i=e.validateOnMount,a=void 0!==i&&i,l=e.isInitialValid,c=e.enableReinitialize,u=void 0!==c&&c,d=e.onSubmit,f=YQ(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=qQ({validateOnChange:n,validateOnBlur:o,validateOnMount:a,onSubmit:d},f),h=(0,s.useRef)(p.initialValues),g=(0,s.useRef)(p.initialErrors||i0),m=(0,s.useRef)(p.initialTouched||a0),v=(0,s.useRef)(p.initialStatus),b=(0,s.useRef)(!1),y=(0,s.useRef)({});(0,s.useEffect)((function(){return b.current=!0,function(){b.current=!1}}),[]);var x=(0,s.useState)(0)[1],w=(0,s.useRef)({values:TQ(p.initialValues),errors:TQ(p.initialErrors)||i0,touched:TQ(p.initialTouched)||a0,status:TQ(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=w.current,S=(0,s.useCallback)((function(e){var t=w.current;w.current=function(e,t){switch(t.type){case"SET_VALUES":return qQ({},e,{values:t.payload});case"SET_TOUCHED":return qQ({},e,{touched:t.payload});case"SET_ERRORS":return FQ(e.errors,t.payload)?e:qQ({},e,{errors:t.payload});case"SET_STATUS":return qQ({},e,{status:t.payload});case"SET_ISSUBMITTING":return qQ({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qQ({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qQ({},e,{values:r0(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qQ({},e,{touched:r0(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qQ({},e,{errors:r0(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qQ({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qQ({},e,{touched:o0(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return qQ({},e,{isSubmitting:!1});default:return e}}(t,e),t!==w.current&&x((function(e){return e+1}))}),[]),k=(0,s.useCallback)((function(e,t){return new Promise((function(n,r){var o=p.validate(e,t);null==o?n(i0):t0(o)?o.then((function(e){n(e||i0)}),(function(e){r(e)})):n(o)}))}),[p.validate]),E=(0,s.useCallback)((function(e,t){var n=p.validationSchema,r=XQ(n)?n(t):n,o=t&&r.validateAt?r.validateAt(t,e):function(e,t,n){void 0===n&&(n=!1);var r=l0(e);return t[n?"validateSync":"validate"](r,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){o.then((function(){e(i0)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return r0(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var a=i;n0(t,a.path)||(t=r0(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),C=(0,s.useCallback)((function(e,t){return new Promise((function(n){return n(y.current[e].validate(t))}))}),[]),j=(0,s.useCallback)((function(e){var t=Object.keys(y.current).filter((function(e){return XQ(y.current[e].validate)})),n=t.length>0?t.map((function(t){return C(t,n0(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=r0(e,t[r],n)),e}),{})}))}),[C]),O=(0,s.useCallback)((function(e){return Promise.all([j(e),p.validationSchema?E(e):{},p.validate?k(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return yX.all([t,n,r],{arrayMerge:c0})}))}),[p.validate,p.validationSchema,j,k,E]),T=d0((function(e){return void 0===e&&(e=_.values),S({type:"SET_ISVALIDATING",payload:!0}),O(e).then((function(e){return b.current&&(S({type:"SET_ISVALIDATING",payload:!1}),S({type:"SET_ERRORS",payload:e})),e}))}));(0,s.useEffect)((function(){a&&!0===b.current&&FQ(h.current,p.initialValues)&&T(h.current)}),[a,T]);var I=(0,s.useCallback)((function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:g.current?g.current:p.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:p.initialTouched||{},o=e&&e.status?e.status:v.current?v.current:p.initialStatus;h.current=t,g.current=n,m.current=r,v.current=o;var i=function(){S({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var a=p.onReset(_.values,Y);t0(a)?a.then(i):i()}else i()}),[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,s.useEffect)((function(){!0===b.current&&!FQ(h.current,p.initialValues)&&u&&(h.current=p.initialValues,I(),a&&T(h.current))}),[u,p.initialValues,I,a,T]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(g.current,p.initialErrors)&&(g.current=p.initialErrors||i0,S({type:"SET_ERRORS",payload:p.initialErrors||i0}))}),[u,p.initialErrors]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(m.current,p.initialTouched)&&(m.current=p.initialTouched||a0,S({type:"SET_TOUCHED",payload:p.initialTouched||a0}))}),[u,p.initialTouched]),(0,s.useEffect)((function(){u&&!0===b.current&&!FQ(v.current,p.initialStatus)&&(v.current=p.initialStatus,S({type:"SET_STATUS",payload:p.initialStatus}))}),[u,p.initialStatus,p.initialTouched]);var R=d0((function(e){if(y.current[e]&&XQ(y.current[e].validate)){var t=n0(_.values,e),n=y.current[e].validate(t);return t0(n)?(S({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),S({type:"SET_ISVALIDATING",payload:!1})}))):(S({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(S({type:"SET_ISVALIDATING",payload:!0}),E(_.values,e).then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:n0(t,e)}}),S({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),P=(0,s.useCallback)((function(e,t){var n=t.validate;y.current[e]={validate:n}}),[]),M=(0,s.useCallback)((function(e){delete y.current[e]}),[]),A=d0((function(e,t){return S({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?T(_.values):Promise.resolve()})),D=(0,s.useCallback)((function(e){S({type:"SET_ERRORS",payload:e})}),[]),F=d0((function(e,t){var r=XQ(e)?e(_.values):e;return S({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?T(r):Promise.resolve()})),L=(0,s.useCallback)((function(e,t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),N=d0((function(e,t,r){return S({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?T(r0(_.values,e,t)):Promise.resolve()})),B=(0,s.useCallback)((function(e,t){var n,r=t,o=e;if(!e0(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,s=i.name,l=i.id,c=i.value,u=i.checked,d=(i.outerHTML,i.options),f=i.multiple;r=t||s||l,o=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"==typeof e)return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||"true"==n||"false"==n)return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}(n0(_.values,r),u,c):d&&f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):c}r&&N(r,o)}),[N,_.values]),z=d0((function(e){if(e0(e))return function(t){return B(t,e)};B(e)})),$=d0((function(e,t,n){return void 0===t&&(t=!0),S({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?T(_.values):Promise.resolve()})),V=(0,s.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||r||o);$(i,!0)}),[$]),H=d0((function(e){if(e0(e))return function(t){return V(t,e)};V(e)})),K=(0,s.useCallback)((function(e){XQ(e)?S({type:"SET_FORMIK_STATE",payload:e}):S({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),U=(0,s.useCallback)((function(e){S({type:"SET_STATUS",payload:e})}),[]),G=(0,s.useCallback)((function(e){S({type:"SET_ISSUBMITTING",payload:e})}),[]),W=d0((function(){return S({type:"SUBMIT_ATTEMPT"}),T().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=J()))return}catch(e){throw e}return Promise.resolve(n).then((function(e){return b.current&&S({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(b.current)throw S({type:"SUBMIT_FAILURE"}),e}))}if(b.current&&(S({type:"SUBMIT_FAILURE"}),t))throw e}))})),q=d0((function(e){e&&e.preventDefault&&XQ(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&XQ(e.stopPropagation)&&e.stopPropagation(),W().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:I,validateForm:T,validateField:R,setErrors:D,setFieldError:L,setFieldTouched:$,setFieldValue:N,setStatus:U,setSubmitting:G,setTouched:A,setValues:F,setFormikState:K,submitForm:W},J=d0((function(){return d(_.values,Y)})),X=d0((function(e){e&&e.preventDefault&&XQ(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&XQ(e.stopPropagation)&&e.stopPropagation(),I()})),Z=(0,s.useCallback)((function(e){return{value:n0(_.values,e),error:n0(_.errors,e),touched:!!n0(_.touched,e),initialValue:n0(h.current,e),initialTouched:!!n0(m.current,e),initialError:n0(g.current,e)}}),[_.errors,_.touched,_.values]),Q=(0,s.useCallback)((function(e){return{setValue:function(t,n){return N(e,t,n)},setTouched:function(t,n){return $(e,t,n)},setError:function(t){return L(e,t)}}}),[N,$,L]),ee=(0,s.useCallback)((function(e){var t=ZQ(e),n=t?e.name:e,r=n0(_.values,n),o={name:n,value:r,onChange:z,onBlur:H};if(t){var i=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===i?void 0===a?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(a)),o.value=a):"radio"===i?(o.checked=r===a,o.value=a):"select"===s&&l&&(o.value=o.value||[],o.multiple=!0)}return o}),[H,z,_.values]),te=(0,s.useMemo)((function(){return!FQ(h.current,_.values)}),[h.current,_.values]),ne=(0,s.useMemo)((function(){return typeof l<"u"?te?_.errors&&0===Object.keys(_.errors).length:!1!==l&&XQ(l)?l(p):l:_.errors&&0===Object.keys(_.errors).length}),[l,te,_.errors,p]);return qQ({},_,{initialValues:h.current,initialErrors:g.current,initialTouched:m.current,initialStatus:v.current,handleBlur:H,handleChange:z,handleReset:X,handleSubmit:q,resetForm:I,setErrors:D,setFormikState:K,setFieldTouched:$,setFieldValue:N,setFieldError:L,setStatus:U,setSubmitting:G,setTouched:A,setValues:F,submitForm:W,validateForm:T,validateField:R,isValid:ne,dirty:te,unregisterField:M,registerField:P,getFieldProps:ee,getFieldMeta:Z,getFieldHelpers:Q,validateOnBlur:o,validateOnChange:n,validateOnMount:a})}function l0(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||jX(e)?l0(e):""!==e?e:void 0})):jX(e[r])?t[r]=l0(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function c0(e,t,n){var r=e.slice();return t.forEach((function(t,o){if(typeof r[o]>"u"){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?yX(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=yX(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var u0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?s.useLayoutEffect:s.useEffect;function d0(e){var t=(0,s.useRef)(e);return u0((function(){t.current=e})),(0,s.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}var f0=(0,s.forwardRef)((function(e,t){var n=e.action,r=YQ(e,["action"]),o=n??"#",i=function(){var e=(0,s.useContext)(JQ);return e}(),a=i.handleReset,l=i.handleSubmit;return(0,s.createElement)("form",qQ({onSubmit:l,ref:t,onReset:a,action:o},r))}));function p0(e){this._maxSize=e,this.clear()}f0.displayName="Form",p0.prototype.clear=function(){this._size=0,this._values=Object.create(null)},p0.prototype.get=function(e){return this._values[e]},p0.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var h0=/[^.^\]^[]+|(?=\[\]|\.\.)/g,g0=/^\d+$/,m0=/^\d/,v0=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,b0=/^\s*(['"]?)(.*?)(\1)\s*$/,y0=new p0(512),x0=new p0(512),w0=new p0(512),_0={Cache:p0,split:k0,normalizePath:S0,setter:function(e){var t=S0(e);return x0.get(e)||x0.set(e,(function(e,n){for(var r=0,o=t.length,i=e;r<o-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;i=i[t[r++]]}i[t[r]]=n}))},getter:function(e,t){var n=S0(e);return w0.get(e)||w0.set(e,(function(e){for(var r=0,o=n.length;r<o;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(E0(t)||g0.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,o,i,a,s=e.length;for(o=0;o<s;o++)(r=e[o])&&(C0(r)&&(r='"'+r+'"'),a=E0(r),i=!a&&/^\d+$/.test(r),t.call(n,r,a,i,o,e))}(Array.isArray(e)?e:k0(e),t,n)}};function S0(e){return y0.get(e)||y0.set(e,k0(e).map((function(e){return e.replace(b0,"$2")})))}function k0(e){return e.match(h0)||[""]}function E0(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function C0(e){return!E0(e)&&(function(e){return e.match(m0)&&!e.match(g0)}(e)||function(e){return v0.test(e)}(e))}const j0=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,O0=e=>e.match(j0)||[],T0=(e,t)=>O0(e).join(t).toLowerCase(),I0=e=>O0(e).reduce(((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`),"");var R0=I0,P0=e=>T0(e,"_"),M0={exports:{}};function A0(e,t){var n=e.length,r=new Array(n),o={},i=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)o[i]||l(e[i],i,new Set);return r;function l(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch{c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var u=a.get(e)||new Set;if(t=(u=Array.from(u)).length){i.add(e);do{var d=u[--t];l(d,s.get(d),i)}while(t);i.delete(e)}r[--n]=e}}}M0.exports=function(e){return A0(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}(e),e)},M0.exports.array=A0;const D0=Ec(M0.exports),F0=Object.prototype.toString,L0=Error.prototype.toString,N0=RegExp.prototype.toString,B0=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",z0=/^Symbol\((.*)\)(.*)$/;function $0(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return B0.call(e).replace(z0,"Symbol($1)");const r=F0.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+L0.call(e)+"]":"RegExp"===r?N0.call(e):null}function V0(e,t){let n=$0(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=$0(this[e],t);return null!==r?r:n}),2)}function H0(e){return null==e?[]:[].concat(e)}let K0,U0,G0,W0=/\$\{\s*(\w+)\s*\}/g;K0=Symbol.toStringTag;class q0{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[K0]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],H0(e).forEach((e=>{if(Y0.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}U0=Symbol.hasInstance,G0=Symbol.toStringTag;class Y0 extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(W0,((e,n)=>V0(t[n]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,o){const i=new q0(e,t,n,r);if(o)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[G0]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Y0)}static[U0](e){return q0[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let J0={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=null!=r&&r!==n?` (cast from the value \`${V0(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${V0(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${V0(n,!0)}\``+o}},X0={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Z0={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Q0={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},e1={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${V0(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${V0(n,!0)}\``}return Y0.formatError(J0.notType,e)}};Object.assign(Object.create(null),{mixed:J0,string:X0,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Z0,object:Q0,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:e1});const t1=e=>e&&e.__isYupSchema__;class n1{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:o}=t,i="function"==typeof n?n:(...e)=>e.every((e=>e===n));return new n1(e,((e,t)=>{var n;let a=i(...e)?r:o;return null!=(n=null==a?void 0:a(t))?n:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!t1(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const r1="$",o1=".";class i1{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===r1,this.isValue=this.key[0]===o1,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?r1:this.isValue?o1:"";this.path=this.key.slice(n.length),this.getter=this.path&&_0.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}i1.prototype.__isYupRef=!0;const a1=e=>null==e;function s1(e){function t({value:t,path:n="",options:r,originalValue:o,schema:i},a,s){const{name:l,test:c,params:u,message:d,skipAbsent:f}=e;let{parent:p,context:h,abortEarly:g=i.spec.abortEarly,disableStackTrace:m=i.spec.disableStackTrace}=r;function v(e){return i1.isRef(e)?e.getValue(t,p,h):e}function b(e={}){const r=Object.assign({value:t,originalValue:o,label:i.spec.label,path:e.path||n,spec:i.spec,disableStackTrace:e.disableStackTrace||m},u,e.params);for(const e of Object.keys(r))r[e]=v(r[e]);const a=new Y0(Y0.formatError(e.message||d,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const y=g?a:s;let x={path:n,parent:p,type:l,from:r.from,createError:b,resolve:v,options:r,originalValue:o,schema:i};const w=e=>{Y0.isError(e)?y(e):e?s(null):y(b())},_=e=>{Y0.isError(e)?y(e):a(e)};if(f&&a1(t))return w(!0);let S;try{var k;if(S=c.call(x,t,x),"function"==typeof(null==(k=S)?void 0:k.then)){if(r.sync)throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(S).then(w,_)}}catch(e){return void _(e)}w(S)}return t.OPTIONS=e,t}function l1(e,t,n,r=n){let o,i,a;return t?(_0.forEach(t,((s,l,c)=>{let u=l?s.slice(1,s.length-1):s,d="tuple"===(e=e.resolve({context:r,parent:o,value:n})).type,f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s})),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class c1 extends Set{describe(){const e=[];for(const t of this.values())e.push(i1.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new c1(this.values())}merge(e,t){const n=this.clone();return e.forEach((e=>n.add(e))),t.forEach((e=>n.delete(e))),n}}function u1(e,t=new Map){if(t1(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=u1(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,u1(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(u1(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=u1(o,t)}return n}class d1{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new c1,this._blacklist=new c1,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(J0.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=u1(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!!(this.spec.nullable&&null===e||this.spec.optional&&void 0===e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce(((t,n)=>n.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,o;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(o=e.disableStackTrace)?o:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,o=n._cast(e,t);if(!1!==t.assert&&!n.isType(o)){if(r&&a1(o))return o;let i=V0(e),a=V0(o);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return o}_cast(e,t){let n=void 0===e?e:this.transforms.reduce(((t,n)=>n.call(this,t,e,this)),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:o,originalValue:i=e,strict:a=this.spec.strict}=t,s=e;a||(s=this._cast(s,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:o,value:s,originalValue:i,options:t,tests:l},n,(e=>{if(e.length)return r(e,s);this.runTests({path:o,value:s,originalValue:i,options:t,tests:this.tests},n,r)}))}runTests(e,t,n){let r=!1,{tests:o,value:i,originalValue:a,path:s,options:l}=e,c=e=>{r||(r=!0,t(e,i))},u=e=>{r||(r=!0,n(e,i))},d=o.length,f=[];if(!d)return u([]);let p={value:i,originalValue:a,path:s,options:l,schema:this};for(let e=0;e<o.length;e++){(0,o[e])(p,c,(function(e){e&&(Array.isArray(e)?f.push(...e):f.push(e)),--d<=0&&u(f)}))}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:o,options:i}){const a=e??t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const s="number"==typeof a;let l=n[a];const c=Object.assign({},i,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[s?"index":"key"]:a,path:s||a.includes(".")?`${r||""}[${s?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(c)._validate(l,c,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise(((n,i)=>r._validate(e,t,((e,t)=>{Y0.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new Y0(e,t,void 0,void 0,o)):n(t)}))))}validateSync(e,t){var n;let r,o=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw Y0.isError(e)&&(e.value=t),e}),((t,n)=>{if(t.length)throw new Y0(t,e,void 0,void 0,i);r=n})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(Y0.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Y0.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):u1(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=s1({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=s1({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=J0.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=J0.notNull){return this.nullability(!1,e)}required(e=J0.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=J0.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=s1(t),o=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter((e=>!(e.OPTIONS.name===t.name&&(o||e.OPTIONS.test===r.OPTIONS.test)))),n.tests.push(r),n}when(e,t){!Array.isArray(e)&&"string"!=typeof e&&(t=e,e=".");let n=this.clone(),r=H0(e).map((e=>new i1(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push("function"==typeof t?new n1(r,t):n1.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=s1({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=J0.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n.internalTests.whiteList=s1({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=J0.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n.internalTests.blacklist=s1({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:o,nullable:i}=t.spec;return{meta:r,label:n,optional:o,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t))}}}d1.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])d1.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=l1(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])d1.prototype[e]=d1.prototype.oneOf;for(const e of["not","nope"])d1.prototype[e]=d1.prototype.notOneOf;const f1=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function p1(e){var t,n;const r=f1.exec(e);return r?{year:h1(r[1]),month:h1(r[2],1)-1,day:h1(r[3],1),hour:h1(r[4]),minute:h1(r[5]),second:h1(r[6]),millisecond:r[7]?h1(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:h1(r[10]),minuteOffset:h1(r[11])}:null}function h1(e,t=0){return Number(e)||t}let g1=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m1=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,v1=/^(?:[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,b1=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),y1=e=>a1(e)||e===e.trim(),x1={}.toString();function w1(){return new _1}class _1 extends d1{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===x1?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||J0.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=X0.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=X0.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=X0.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,o=!1;return t&&("object"==typeof t?({excludeEmptyString:o=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||X0.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&o||-1!==t.search(e)})}email(e=X0.email){return this.matches(g1,{name:"email",message:e,excludeEmptyString:!0})}url(e=X0.url){return this.matches(m1,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=X0.uuid){return this.matches(v1,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(b1,{name:"datetime",message:r||X0.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||X0.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=p1(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||X0.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=p1(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=X0.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:y1})}lowercase(e=X0.lowercase){return this.transform((e=>a1(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>a1(e)||e===e.toLowerCase()})}uppercase(e=X0.uppercase){return this.transform((e=>a1(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>a1(e)||e===e.toUpperCase()})}}w1.prototype=_1.prototype;let S1=new Date("");class k1 extends d1{constructor(){super({type:"date",check:e=>(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}),this.withMutation((()=>{this.transform(((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=p1(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?k1.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let n;if(i1.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Z0.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Z0.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function E1(e,t){let n=1/0;return e.some(((e,r)=>{var o;if(null!=(o=t.path)&&o.includes(e))return n=r,!0})),n}function C1(e){return(t,n)=>E1(e,t)-E1(e,n)}k1.INVALID_DATE=S1,k1.prototype;const j1=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function O1(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=O1(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=O1(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(O1)}):"optional"in e?e.optional():e}let T1=e=>"[object Object]"===Object.prototype.toString.call(e);function I1(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===n.indexOf(e)))}const R1=C1([]);function P1(e){return new M1(e)}class M1 extends d1{constructor(e){super({type:"object",check:e=>T1(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=R1,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let o=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),s={},l=Object.assign({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of a){let n=o[e],a=e in r;if(n){let o,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:s});let a=n instanceof d1?n.spec:void 0,u=null==a?void 0:a.strict;if(null!=a&&a.strip){c=c||e in r;continue}o=t.__validating&&u?r[e]:n.cast(r[e],l),void 0!==o&&(s[e]=o)}else a&&!i&&(s[e]=r[e]);(a!==e in s||s[e]!==r[e])&&(c=!0)}return c?s:r}_validate(e,t={},n,r){let{from:o=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...o],t.__validating=!0,t.originalValue=i,super._validate(e,t,n,((e,o)=>{if(!a||!T1(o))return void r(e,o);i=i||o;let s=[];for(let e of this._nodes){let n=this.fields[e];!n||i1.isRef(n)||s.push(n.asNestedTest({options:t,key:e,parent:o,parentPath:t.path,originalParent:i}))}this.runTests({tests:s,value:o,originalValue:i,options:t},n,(t=>{r(t.sort(this._sortErrors).concat(e),o)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((n=>{var r;const o=this.fields[n];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),t[n]=o&&"getDefault"in o?o.getDefault(i):void 0})),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,o=new Set(t.map((([e,t])=>`${e}-${t}`)));function i(e,t){let i=_0.split(e)[0];r.add(i),o.has(`${t}-${i}`)||n.push([t,i])}for(const t of Object.keys(e)){let n=e[t];r.add(t),i1.isRef(n)&&n.isSibling?i(n.path,t):t1(n)&&"deps"in n&&n.deps.forEach((e=>i(e,t)))}return D0.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=C1(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation((n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)}))}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return O1(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter((([t,n])=>e.includes(t)&&e.includes(n))))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=_0.getter(e,!0);return this.transform((o=>{if(!o)return o;let i=o;return((e,t)=>{const n=[..._0.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),o=_0.getter(_0.join(n),!0)(e);return!(!o||!(r in o))})(o,e)&&(i=Object.assign({},o),n||delete i[e],i[t]=r(o)),i}))}json(){return this.transform(j1)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Q0.exact,test(e){if(null==e)return!0;const t=I1(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Q0.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=I1(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Q0.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n}))}camelCase(){return this.transformKeys(R0)}snakeCase(){return this.transformKeys(P0)}constantCase(){return this.transformKeys((e=>P0(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[o]})),n.fields[o]=i.describe(t)}return n}}P1.prototype=M1.prototype;const A1=e=>{const{scrollOnMatch:t=!0,onMatch:n,id:r,children:o}=e,i=(0,s.useRef)(!0);return(0,s.useEffect)((()=>{const e=()=>{if(-1!==window.location.hash.split("/").filter((e=>0!==e.indexOf("?")&&1!==e.length&&0!==e.length)).map((e=>"#"===e.charAt(0)?e.substring(1):e)).indexOf(r)){n&&n(r);const e=document.getElementById(r);t&&e&&!function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)&&e.scrollIntoView(i.current?{behavior:"instant"}:{behavior:"smooth",block:"center"})}};return i.current&&(e(),i.current=!1),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}}),[r,n,t]),(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{id:r}):(0,C.jsx)("div",{id:r,children:o})},D1={"tedi-textarea__input":"tedi-textarea__input-8c740e37","tedi-textarea__character-count":"tedi-textarea__character-count-c5b62b38"},F1=(0,s.forwardRef)(((e,t)=>{const{className:n,helper:r=[],characterLimit:o,onChange:i,onChangeEvent:a,value:l,defaultValue:c,...u}=e,[d,f]=s.useState(c??""),p=s.useCallback((e=>{!l&&!(i||a)&&f(e),null==i||i(e)}),[l,i,a]),h=s.useMemo((()=>l??d),[l,d]),g=h.length,m=o?`${g}/${o}`:"",v=[...Array.isArray(r)?r:[r],...o?[{type:g>o?"error":"hint",text:m,position:"right",className:lc(D1["tedi-textarea__character-count"])}]:[]];return(0,C.jsx)(y_,{...u,ref:t,"data-name":"textarea",inputClassName:D1["tedi-textarea__input"],isTextArea:!0,className:lc(D1["tedi-textarea"],n),value:h,onChange:p,onChangeEvent:a,helper:v})}));F1.displayName="TextArea";const L1={"tedi-number-field":"tedi-number-field-dd7196c9","tedi-number-field--disabled":"tedi-number-field--disabled-f19e7ff7","tedi-number-field__button":"tedi-number-field__button-e276fac1","tedi-number-field__input-wrapper":"tedi-number-field__input-wrapper-400bdcf6","tedi-number-field__button__disabled":"tedi-number-field__button__disabled-c7b3b631","tedi-number-field__button--decrement":"tedi-number-field__button--decrement-152a6e1b","tedi-number-field__button--increment":"tedi-number-field__button--increment-8bd8e08f","tedi-number-field--invalid":"tedi-number-field--invalid-0c9ed153","tedi-number-field__input":"tedi-number-field__input-1b10ec1e","tedi-number-field--small":"tedi-number-field--small-e0a3a881","tedi-number-field__input-wrapper--full-width":"tedi-number-field__input-wrapper--full-width-1847e7b8","tedi-number-field__input-wrapper--with-suffix":"tedi-number-field__input-wrapper--with-suffix-81f89bd3","tedi-number-field__suffix":"tedi-number-field__suffix-eb5be3bc"};(e=>{const{getCurrentBreakpointProps:t}=iu(),{id:n,label:r,hideLabel:o,required:i,className:a,size:l,inputMode:c="numeric",decimalPlaces:u,min:d,max:f,step:p=1,defaultValue:h,value:g,onChange:m,suffix:v,fullWidth:b=!1,disabled:y=!1,invalid:x=!1,helper:w,input:_}=t(e),{getLabel:S}=jv(),k=(0,s.useRef)(null),[E,j]=(0,s.useState)(""),[O,T]=(0,s.useState)(h??0),I=(0,s.useMemo)((()=>m&&typeof g<"u"?g:O),[m,g,O]),R=w?(null==w?void 0:w.id)??`${n}-helper`:void 0,P=(0,s.useCallback)((e=>x||void 0!==d&&e<d||void 0!==f&&e>f||"error"===(null==w?void 0:w.type)),[x,w,f,d]),M=e=>Math.min(f??1/0,Math.max(d??-1/0,e)),A=e=>{let t=I;"increment"===e&&(t+=p),"decrement"===e&&(t-=p),t=M(t),t=(e=>void 0!==u?parseFloat(e.toFixed(u)):e)(t),(e=>{const t=S("numberField.quantityUpdated"),n="string"==typeof t?t:t(e);j(n),setTimeout((()=>{j("")}),5e3)})(t),null==m||m(t),T(t)},D=({currentTarget:{value:e}})=>{null==m||m(M(+e)),T(M(+e))},F=e=>{const t="increment"===e?void 0!==f&&I>=f:void 0!==d&&I<=d,n=lc(L1["tedi-number-field__button"],L1[`tedi-number-field__button--${e}`],{[L1["tedi-number-field__button--disabled"]]:t||y}),r=S(`numberField.${e}`),o="string"==typeof r?r:r(p);return(0,C.jsx)(Zw,{"aria-label":o,onClick:()=>A(e),disabled:t||y,visualType:"secondary",className:n,icon:{name:"increment"===e?"add":"remove"},children:"increment"===e?"+":"-"})},L=lc(L1["tedi-number-field"],{[L1["tedi-number-field--invalid"]]:P(I)},{[L1["tedi-number-field--disabled"]]:y},{[L1["tedi-number-field--small"]]:"small"===l},a);return(0,C.jsxs)("div",{"data-name":"number-field",className:a,children:[(0,C.jsx)(v_,{id:n,label:r,required:i,hideLabel:o,size:l}),(0,C.jsxs)("div",{className:L,children:[F("decrement"),(()=>{const e=lc(L1["tedi-number-field__input-wrapper"],{[L1["tedi-number-field__input-wrapper--with-suffix"]]:v,[L1["tedi-number-field__input-wrapper--full-width"]]:b}),t=lc(L1["tedi-number-field__input"],null==_?void 0:_.className);return(0,C.jsxs)("div",{className:e,onClick:()=>{var e;return null==(e=null==k?void 0:k.current)?void 0:e.focus()},children:[(0,C.jsx)("input",{ref:k,id:n,"aria-describedby":R,"aria-invalid":x,type:"number",inputMode:c,value:I,min:d,max:f,required:i,step:p,disabled:y,onChange:D,className:t,..._}),v&&(0,C.jsx)(Yv,{element:"span",modifiers:"small",color:"tertiary",className:L1["tedi-number-field__suffix"],children:v})]})})(),F("increment")]}),w&&(0,C.jsx)(Ww,{...w,id:R}),(0,C.jsx)("div",{"aria-live":"polite",className:"visually-hidden",children:E})]})}).displayName="NumberField";const N1="tedi-search__wrapper-92d6f11f",B1="tedi-search__input-94d53b76",z1="tedi-search__input--has-button-d8e073e7",$1="tedi-search__button-cbb4df17",V1=(0,s.forwardRef)((({placeholder:e,isClearable:t=!0,searchIcon:n="search",onSearch:r,onChange:o,button:i,...a},s)=>{const l={...a,ref:s,inputClassName:lc(B1,i&&z1),placeholder:e,isClearable:t,onKeyPress:e=>{"Enter"===e.key&&(null==r||r(a.value))},onChange:o,...i?{}:{icon:n}};return(0,C.jsxs)("div",{className:lc(N1,a.className),children:[(0,C.jsx)(y_,{...l}),i&&(0,C.jsx)(Zw,{...i,onClick:()=>{null==r||r(a.value)},className:lc($1,i.className),children:i.children})]})}));V1.displayName="Search";function H1(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=H1(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function K1(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=H1(e))&&(r&&(r+=" "),r+=t);return r}const U1=e=>"number"==typeof e&&!isNaN(e),G1=e=>"string"==typeof e,W1=e=>"function"==typeof e,q1=e=>G1(e)||W1(e)?e:null,Y1=e=>(0,s.isValidElement)(e)||G1(e)||W1(e)||U1(e);function J1(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(e){let{children:a,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:f}=e;const p=r?`${t}--${l}`:t,h=r?`${n}--${l}`:n,g=(0,s.useRef)(0);return(0,s.useLayoutEffect)((()=>{const e=d.current,t=p.split(" "),n=r=>{r.target===d.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)}),[]),(0,s.useEffect)((()=>{const e=d.current,t=()=>{e.removeEventListener("animationend",t),o?function(e,t,n){void 0===n&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame((()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)}))}))}(e,u,i):u()};f||(c?t():(g.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))}),[f]),s.createElement(s.Fragment,null,a)}}function X1(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Z1={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter((e=>e!==t));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach((t=>{const n=setTimeout((()=>{t(...[].slice.call(arguments,1))}),0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)}))}},Q1=e=>{let{theme:t,type:n,...r}=e;return s.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...r})},e2={info:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return s.createElement(Q1,{...e},s.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return s.createElement("div",{className:"Toastify__spinner"})}};function t2(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function n2(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function r2(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return s.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":r},s.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},s.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function o2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:l,controlledProgress:c,progress:u,rtl:d,isIn:f,theme:p}=e;const h=i||c&&0===u,g={...l,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1};c&&(g.transform=`scaleX(${u})`);const m=K1("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":d}),v=W1(a)?a({rtl:d,type:o,defaultClassName:m}):K1(m,a);return s.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:v,style:g,[c&&u>=1?"onTransitionEnd":"onAnimationEnd"]:c&&u<1?null:()=>{f&&r()}})}const i2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=function(e){const[t,n]=(0,s.useState)(!1),[r,o]=(0,s.useState)(!1),i=(0,s.useRef)(null),a=(0,s.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=(0,s.useRef)(e),{autoClose:c,pauseOnHover:u,closeToast:d,onClick:f,closeOnClick:p}=e;function h(t){if(e.draggable){"touchstart"===t.nativeEvent.type&&t.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",y),document.addEventListener("touchmove",b),document.addEventListener("touchend",y);const n=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=n.getBoundingClientRect(),n.style.transition="",a.x=t2(t.nativeEvent),a.y=n2(t.nativeEvent),"x"===e.draggableDirection?(a.start=a.x,a.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function g(t){if(a.boundingRect){const{top:n,bottom:r,left:o,right:i}=a.boundingRect;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&a.x>=o&&a.x<=i&&a.y>=n&&a.y<=r?v():m()}}function m(){n(!0)}function v(){n(!1)}function b(n){const r=i.current;a.canDrag&&r&&(a.didMove=!0,t&&v(),a.x=t2(n),a.y=n2(n),a.delta="x"===e.draggableDirection?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),r.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,r.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",y);const t=i.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity="1"}}(0,s.useEffect)((()=>{l.current=e})),(0,s.useEffect)((()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),W1(e.onOpen)&&e.onOpen((0,s.isValidElement)(e.children)&&e.children.props),()=>{const e=l.current;W1(e.onClose)&&e.onClose((0,s.isValidElement)(e.children)&&e.children.props)})),[]),(0,s.useEffect)((()=>(e.pauseOnFocusLoss&&(document.hasFocus()||v(),window.addEventListener("focus",m),window.addEventListener("blur",v)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",v))})),[e.pauseOnFocusLoss]);const x={onMouseDown:h,onTouchStart:h,onMouseUp:g,onTouchEnd:g};return c&&u&&(x.onMouseEnter=v,x.onMouseLeave=m),p&&(x.onClick=e=>{f&&f(e),a.canCloseOnClick&&d()}),{playToast:m,pauseToast:v,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:x}}(e),{closeButton:i,children:a,autoClose:l,onClick:c,type:u,hideProgressBar:d,closeToast:f,transition:p,position:h,className:g,style:m,bodyClassName:v,bodyStyle:b,progressClassName:y,progressStyle:x,updateId:w,role:_,progress:S,rtl:k,toastId:E,deleteToast:C,isIn:j,isLoading:O,iconOut:T,closeOnClick:I,theme:R}=e,P=K1("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":I}),M=W1(g)?g({rtl:k,position:h,type:u,defaultClassName:P}):K1(P,g),A=!!S||!l,D={closeToast:f,type:u,theme:R};let F=null;return!1===i||(F=W1(i)?i(D):(0,s.isValidElement)(i)?(0,s.cloneElement)(i,D):r2(D)),s.createElement(p,{isIn:j,done:C,position:h,preventExitTransition:n,nodeRef:r},s.createElement("div",{id:E,onClick:c,className:M,...o,style:m,ref:r},s.createElement("div",{...j&&{role:_},className:W1(v)?v({type:u}):K1("Toastify__toast-body",v),style:b},null!=T&&s.createElement("div",{className:K1("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},T),s.createElement("div",null,a)),F,s.createElement(o2,{...w&&!A?{key:`pb-${w}`}:{},rtl:k,theme:R,delay:l,isRunning:t,isIn:j,closeToast:f,hide:d,type:u,style:x,className:y,controlledProgress:A,progress:S||0})))},a2=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},s2=J1(a2("bounce",!0));J1(a2("slide",!0));J1(a2("zoom")),J1(a2("flip"));const l2=(0,s.forwardRef)(((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=function(e){const[,t]=(0,s.useReducer)((e=>e+1),0),[n,r]=(0,s.useState)([]),o=(0,s.useRef)(null),i=(0,s.useRef)(new Map).current,a=e=>-1!==n.indexOf(e),l=(0,s.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:e=>i.get(e)}).current;function c(e){let{containerId:t}=e;const{limit:n}=l.props;!n||t&&l.containerId!==t||(l.count-=l.queue.length,l.queue=[])}function u(e){r((t=>null==e?[]:t.filter((t=>t!==e))))}function d(){const{toastContent:e,toastProps:t,staleId:n}=l.queue.shift();p(e,t,n)}function f(e,n){let{delay:r,staleId:a,...c}=n;if(!Y1(e)||function(e){return!o.current||l.props.enableMultiContainer&&e.containerId!==l.props.containerId||i.has(e.toastId)&&null==e.updateId}(c))return;const{toastId:f,updateId:h,data:g}=c,{props:m}=l,v=()=>u(f),b=null==h;b&&l.count++;const y={...m,style:m.toastStyle,key:l.toastKey++,...Object.fromEntries(Object.entries(c).filter((e=>{let[t,n]=e;return null!=n}))),toastId:f,updateId:h,data:g,closeToast:v,isIn:!1,className:q1(c.className||m.toastClassName),bodyClassName:q1(c.bodyClassName||m.bodyClassName),progressClassName:q1(c.progressClassName||m.progressClassName),autoClose:!c.isLoading&&(x=c.autoClose,w=m.autoClose,!1===x||U1(x)&&x>0?x:w),deleteToast(){const e=X1(i.get(f),"removed");i.delete(f),Z1.emit(4,e);const n=l.queue.length;if(l.count=null==f?l.count-l.displayedToast:l.count-1,l.count<0&&(l.count=0),n>0){const e=null==f?l.props.limit:1;if(1===n||1===e)l.displayedToast++,d();else{const t=e>n?n:e;l.displayedToast=t;for(let e=0;e<t;e++)d()}}else t()}};var x,w;y.iconOut=function(e){let{theme:t,type:n,isLoading:r,icon:o}=e,i=null;const a={theme:t,type:n};return!1===o||(W1(o)?i=o(a):(0,s.isValidElement)(o)?i=(0,s.cloneElement)(o,a):G1(o)||U1(o)?i=o:r?i=e2.spinner():(e=>e in e2)(n)&&(i=e2[n](a))),i}(y),W1(c.onOpen)&&(y.onOpen=c.onOpen),W1(c.onClose)&&(y.onClose=c.onClose),y.closeButton=m.closeButton,!1===c.closeButton||Y1(c.closeButton)?y.closeButton=c.closeButton:!0===c.closeButton&&(y.closeButton=!Y1(m.closeButton)||m.closeButton);let _=e;(0,s.isValidElement)(e)&&!G1(e.type)?_=(0,s.cloneElement)(e,{closeToast:v,toastProps:y,data:g}):W1(e)&&(_=e({closeToast:v,toastProps:y,data:g})),m.limit&&m.limit>0&&l.count>m.limit&&b?l.queue.push({toastContent:_,toastProps:y,staleId:a}):U1(r)?setTimeout((()=>{p(_,y,a)}),r):p(_,y,a)}function p(e,t,n){const{toastId:o}=t;n&&i.delete(n);const a={content:e,props:t};i.set(o,a),r((e=>[...e,o].filter((e=>e!==n)))),Z1.emit(4,X1(a,null==a.props.updateId?"added":"updated"))}return(0,s.useEffect)((()=>(l.containerId=e.containerId,Z1.cancelEmit(3).on(0,f).on(1,(e=>o.current&&u(e))).on(5,c).emit(2,l),()=>{i.clear(),Z1.emit(3,l)})),[]),(0,s.useEffect)((()=>{l.props=e,l.isToastActive=a,l.displayedToast=n.length})),{getToastToRender:function(t){const n=new Map,r=Array.from(i.values());return e.newestOnTop&&r.reverse(),r.forEach((e=>{const{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(e=>t(e[0],e[1])))},containerRef:o,isToastActive:a}}(e),{className:i,style:a,rtl:l,containerId:c}=e;function u(e){const t=K1("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":l});return W1(i)?i({position:e,rtl:l,defaultClassName:t}):K1(t,q1(i))}return(0,s.useEffect)((()=>{t&&(t.current=r.current)}),[]),s.createElement("div",{ref:r,className:"Toastify",id:c},n(((e,t)=>{const n=t.length?{...a}:{...a,pointerEvents:"none"};return s.createElement("div",{className:u(e),style:n,key:`container-${e}`},t.map(((e,n)=>{let{content:r,props:i}=e;return s.createElement(i2,{...i,isIn:o(i.toastId),style:{...i.style,"--nth":n+1,"--len":t.length},key:`toast-${i.key}`},r)})))})))}));l2.displayName="ToastContainer",l2.defaultProps={position:"top-right",transition:s2,autoClose:5e3,closeButton:r2,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let c2,u2=new Map,d2=[],f2=1;function p2(){return""+f2++}function h2(e){return e&&(G1(e.toastId)||U1(e.toastId))?e.toastId:p2()}function g2(e,t){return u2.size>0?Z1.emit(0,e,t):d2.push({content:e,options:t}),t.toastId}function m2(e,t){return{...t,type:t&&t.type||e,toastId:h2(t)}}function v2(e){return(t,n)=>g2(t,m2(e,n))}function b2(e,t){return g2(e,m2("default",t))}b2.loading=(e,t)=>g2(e,m2("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),b2.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=G1(o)?b2.loading(o,n):b2.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(e,t,o)=>{if(null==t)return void b2.dismiss(r);const i={type:e,...s,...n,data:o},a=G1(t)?{render:t}:t;return r?b2.update(r,{...i,...a}):b2(a.render,{...i,...a}),o},c=W1(e)?e():e;return c.then((e=>l("success",a,e))).catch((e=>l("error",i,e))),c},b2.success=v2("success"),b2.info=v2("info"),b2.error=v2("error"),b2.warning=v2("warning"),b2.warn=b2.warning,b2.dark=(e,t)=>g2(e,m2("default",{theme:"dark",...t})),b2.dismiss=e=>{u2.size>0?Z1.emit(1,e):d2=d2.filter((t=>null!=e&&t.options.toastId!==e))},b2.clearWaitingQueue=function(e){return void 0===e&&(e={}),Z1.emit(5,e)},b2.isActive=e=>{let t=!1;return u2.forEach((n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},b2.update=function(e,t){void 0===t&&(t={}),setTimeout((()=>{const n=function(e,t){let{containerId:n}=t;const r=u2.get(n||c2);return r&&r.getToast(e)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:p2()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,g2(a,i)}}),0)},b2.done=e=>{b2.update(e,{progress:1})},b2.onChange=e=>(Z1.on(4,e),()=>{Z1.off(4,e)}),b2.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},b2.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Z1.on(2,(e=>{c2=e.containerId||e,u2.set(c2,e),d2.forEach((e=>{Z1.emit(0,e.content,e.options)})),d2=[]})).on(3,(e=>{u2.delete(e.containerId||e),0===u2.size&&Z1.off(0).off(1).off(5)}));const y2=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=iu(),{getLabel:r}=jv(),{visualType:o="link",underline:i=!0,as:a,children:s,...l}=n(e);return(0,C.jsxs)(Jw,{"data-name":"link",...l,ref:t,as:a||"a",visualType:o,underline:i,children:[s,"_blank"===l.target&&(0,C.jsxs)("span",{className:"sr-only",children:["(",r("anchor.new-tab"),")"]})]})}));y2.displayName="Link";const x2=y2,w2={"tedi-card":"tedi-card-6773201e","tedi-card--background--accent":"tedi-card--background--accent-a0ccccbf","tedi-card--border--accent":"tedi-card--border--accent-16076fd7","tedi-card--background--brand-primary":"tedi-card--background--brand-primary-2e729236","tedi-card--border--brand-primary":"tedi-card--border--brand-primary-0ebff366","tedi-card--background--brand-secondary":"tedi-card--background--brand-secondary-e0935065","tedi-card--border--brand-secondary":"tedi-card--border--brand-secondary-c8f172e4","tedi-card--background--brand-tertiary":"tedi-card--background--brand-tertiary-8d2f79f4","tedi-card--border--brand-tertiary":"tedi-card--border--brand-tertiary-cc06323c","tedi-card--background--brand-quaternary":"tedi-card--background--brand-quaternary-e35ff683","tedi-card--border--brand-quaternary":"tedi-card--border--brand-quaternary-fdf175e9","tedi-card--background--primary":"tedi-card--background--primary-6f518b6a","tedi-card--border--primary":"tedi-card--border--primary-3ee7b649","tedi-card--background--secondary":"tedi-card--background--secondary-402019fb","tedi-card--border--secondary":"tedi-card--border--secondary-b0de1d8c","tedi-card--background--tertiary":"tedi-card--background--tertiary-d57f4e16","tedi-card--border--tertiary":"tedi-card--border--tertiary-1846869a","tedi-card--background--info-primary":"tedi-card--background--info-primary-981c7808","tedi-card--border--info-primary":"tedi-card--border--info-primary-d73b0349","tedi-card--background--info-secondary":"tedi-card--background--info-secondary-118ce8d4","tedi-card--border--info-secondary":"tedi-card--border--info-secondary-25075005","tedi-card--background--neutral-primary":"tedi-card--background--neutral-primary-8b4fa913","tedi-card--border--neutral-primary":"tedi-card--border--neutral-primary-3c442023","tedi-card--background--neutral-secondary":"tedi-card--background--neutral-secondary-77a1899a","tedi-card--border--neutral-secondary":"tedi-card--border--neutral-secondary-2dd2db0a","tedi-card--background--success-primary":"tedi-card--background--success-primary-2e50333d","tedi-card--border--success-primary":"tedi-card--border--success-primary-167796e5","tedi-card--background--success-secondary":"tedi-card--background--success-secondary-5ef8094d","tedi-card--border--success-secondary":"tedi-card--border--success-secondary-5d3c8168","tedi-card--background--danger-primary":"tedi-card--background--danger-primary-a701ed87","tedi-card--border--danger-primary":"tedi-card--border--danger-primary-f0b990dd","tedi-card--background--danger-secondary":"tedi-card--background--danger-secondary-cbde6da8","tedi-card--border--danger-secondary":"tedi-card--border--danger-secondary-29b9cdf0","tedi-card--background--warning-primary":"tedi-card--background--warning-primary-92facd8b","tedi-card--border--warning-primary":"tedi-card--border--warning-primary-60cabe9b","tedi-card--background--warning-secondary":"tedi-card--background--warning-secondary-01e1cafe","tedi-card--border--warning-secondary":"tedi-card--border--warning-secondary-e4339e73","tedi-card--border-left":"tedi-card--border-left-d2bbe0cd","tedi-card--border-top":"tedi-card--border-top-4199f286","tedi-card--borderless":"tedi-card--borderless-8f44bb3f","tedi-card--no-border-radius-top":"tedi-card--no-border-radius-top-d8b0071d","tedi-card__content":"tedi-card__content-a40bc648","tedi-card--no-border-radius-right":"tedi-card--no-border-radius-right-52a78320","tedi-card--no-border-radius-bottom":"tedi-card--no-border-radius-bottom-59e75b25","tedi-card--no-border-radius-left":"tedi-card--no-border-radius-left-ff9938cb","tedi-card__content--separator":"tedi-card__content--separator-0019d413","tedi-card__header":"tedi-card__header-f7a4ed63"},_2=s.createContext({}),S2=e=>{if("number"==typeof e)return{"--card-content-padding-top":`${e}rem`,"--card-content-padding-right":`${e}rem`,"--card-content-padding-bottom":`${e}rem`,"--card-content-padding-left":`${e}rem`};if((e=>"object"==typeof e&&"vertical"in e&&"horizontal"in e)(e)){const{vertical:t,horizontal:n}=e;return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${n}rem`,"--card-content-padding-bottom":`${t}rem`,"--card-content-padding-left":`${n}rem`}}const{top:t=0,right:n=0,bottom:r=0,left:o=0}=e||{};return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${n}rem`,"--card-content-padding-bottom":`${r}rem`,"--card-content-padding-left":`${o}rem`}},k2=e=>{const{padding:t,background:n}=s.useContext(_2),{getCurrentBreakpointProps:r}=iu(),{children:o,className:i,padding:a,background:l,backgroundImage:c,backgroundPosition:u,backgroundSize:d,backgroundRepeat:f,hasSeparator:p,role:h,style:g,...m}=r(e,{padding:t,background:n}),v=l?w2[`tedi-card--background--${l}`]:"",b={backgroundImage:c?`url(${c})`:void 0,backgroundPosition:u,backgroundSize:d,backgroundRepeat:f};return(0,C.jsx)("button"===h?"button":"div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,className:lc(w2["tedi-card__content"],v,i,{[w2["tedi-card__content--separator"]]:p}),style:{...S2(a),...b,...g},...m,children:o})},E2="tedi-card__notification-content-2a22e902",C2="tedi-card__notification-d5a264e6",j2=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=iu(),{children:r,className:o,padding:i,background:a,borderRadius:s,borderless:l,border:c,...u}=n(e,{padding:1}),[d,f]=(e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]})(c),p=lc(w2["tedi-card"],{[w2[`tedi-card--border-${d}`]]:d,[w2[`tedi-card--border--${f}`]]:f,[w2["tedi-card--borderless"]]:l,[w2["tedi-card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[w2["tedi-card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[w2["tedi-card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[w2["tedi-card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)},o);return(0,C.jsx)(_2.Provider,{value:{padding:i,background:a},children:(0,C.jsx)("div",{"data-name":"card","data-testid":"tedi-card",...u,className:p,ref:t,children:r})})}));j2.displayName="Card";const O2=Object.assign(j2,{Content:k2,Header:e=>{const{className:t,...n}=e;return(0,C.jsx)(k2,{className:lc(w2["tedi-card__header"],t),...n})},Notification:e=>{const{children:t,padding:n,className:r,...o}=e,i=lc(C2,r);return(0,C.jsx)(k2,{"data-name":"card-notification",padding:n,className:E2,children:(0,C.jsx)(Zv,{className:i,noSideBorders:!0,...o,children:t})})}}),T2=e=>{const{children:t}=e;return(0,C.jsx)(C.Fragment,{children:t})},I2=["xs","sm","md","lg","xl","xxl"],R2=()=>{const[e,t]=(0,s.useState)(P2());return(0,s.useEffect)((()=>{const e=eu((()=>{t(P2())}),20);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),e},P2=()=>{let e=null;return typeof window<"u"&&(e=window.matchMedia("(min-width: 1400px)").matches?"xxl":window.matchMedia("(min-width: 1200px)").matches?"xl":window.matchMedia("(min-width: 992px)").matches?"lg":window.matchMedia("(min-width: 768px)").matches?"md":window.matchMedia("(min-width: 576px)").matches?"sm":"xs"),e},M2=()=>{const e=R2(),t=s.useMemo((()=>e?I2.slice(0,I2.indexOf(e)+1):[]),[e]);return{getCurrentBreakpointProps:s.useCallback(((e,n={})=>{const{sm:r,md:o,lg:i,xl:a,xxl:s,...l}=e,c=[...t.map((t=>sc("xs"===t?l:e[t],(e=>void 0!==e))))].filter(Boolean);return Object.assign(n,...c)}),[t])}},A2=["xs","sm"],D2=["md"],F2=["lg","xl","xxl"],L2=e=>{const t=R2(),n=null==e?void 0:e.reduce(((e,t)=>{switch(t){case"desktop":return[...e,...F2];case"tablet":return[...e,...D2];case"mobile":return[...e,...A2];default:return[...e,t]}}),[]);return!!t&&n.includes(t)},N2={"primary-main":"primary-main-ea0565ff","primary-active":"primary-active-d24cbc9e","primary-active-subtle":"primary-active-subtle-c2ab8b5f","primary-highlight":"primary-highlight-212d11b7","primary-highlight-subtle":"primary-highlight-subtle-715c2641","accent-main":"accent-main-f55c9be5","accent-highlight":"accent-highlight-6810179d","bg-default":"bg-default-099a281c","bg-muted":"bg-muted-13732b1c","bg-subtle":"bg-subtle-e7130c61","bg-disabled":"bg-disabled-eed0584e","bg-inverted":"bg-inverted-2bf8047e","bg-inverted-contrast":"bg-inverted-contrast-304e2c10",black:"black-d9cad7d6",white:"white-5992ce1a","positive-main":"positive-main-dfc533f2","positive-active":"positive-active-f4288715","positive-highlight":"positive-highlight-6594b5a8","important-main":"important-main-67d03aad","important-active":"important-active-5ebf547d","important-highlight":"important-highlight-aa19e975","info-main":"info-main-80c1cd50","info-active":"info-active-5f165e38","info-highlight":"info-highlight-578939bc","warning-main":"warning-main-2fae5383","warning-highlight":"warning-highlight-f87e48b3",transparent:"transparent-74d01799"},B2=e=>e?N2[e]:"",z2=e=>{const{getCurrentBreakpointProps:t}=M2(),{children:n,className:r,tabIndex:o,element:i="p",modifiers:a,color:s,...l}=t(e,{tabIndex:e.id?-1:void 0}),c="string"==typeof a?[a]:a,u=lc(r,null==c?void 0:c.map((e=>`text-${e}`)),{[`text-${s}`]:s});return(0,C.jsx)(i,{className:u,...l,tabIndex:o,children:n})},$2=e=>{const{children:t,element:n="h1",...r}=e;return(0,C.jsx)(z2,{element:n,...r,children:t})},V2={icon:"icon-8081be27","icon--block":"icon--block-4aa6379d","icon--inline":"icon--inline-5d045b85"},H2=(0,s.forwardRef)(((e,t)=>{const{className:n,name:r,filled:o=!1,label:i,type:a="outlined",size:s=24,display:l="block",color:c,...u}=e,d=lc("notranslate","material-symbols",V2.icon,V2[`icon--${l}`],{[`material-symbols--${a}`]:a,[`text-${c}`]:c},n),f={...s?{"--icon-internal-variation-size":s/16+"rem"}:{},...o?{"--icon-internal-variation-fill":1}:{}};return(0,C.jsx)("span",{"data-name":"icon",role:"img","aria-hidden":!i,...u,className:d,style:f,ref:t,"aria-label":i,children:r})}));H2.displayName="Icon";const K2={btn:"btn-a9ce955b","btn--small":"btn--small-5daaaf3d","btn--icon-only":"btn--icon-only-375cfc7d","btn--tertiary":"btn--tertiary-c1cc08ad","btn--default":"btn--default-eca73b71","btn--primary":"btn--primary-22126c0a","btn--is-active":"btn--is-active-a0b6b950","btn--is-hovered":"btn--is-hovered-4a27da20","btn--secondary":"btn--secondary-a76a0864","btn--important":"btn--important-1a53be26","btn--positive":"btn--positive-46a2598e","btn--inverted":"btn--inverted-3fc5447d","btn--link":"btn--link-92dffb55","btn--text-color":"btn--text-color-2cc027f7",btn__text:"btn__text-7d9d1a13","btn--is-loading":"btn--is-loading-00320401","btn--icon":"btn--icon-456b539f",btn__inner:"btn__inner-804ab13a","btn__icon--left":"btn__icon--left-50b31870","btn__icon--right":"btn__icon--right-9b9e8607",btn__icon:"btn__icon-738969c8",btn__spinner:"btn__spinner-5ad34e4e","btn--underline":"btn--underline-e2d2c82b","btn--no-style":"btn--no-style-ed081476","btn--full-width":"btn--full-width-9809b856"},U2=(0,s.forwardRef)((({children:e,as:t,text:n,className:r,visualType:o="primary",color:i="default",size:a,icon:s,iconLeft:l,iconRight:c,underline:u=!1,isHovered:d,isActive:f,isLoading:p=!1,noStyle:h,renderWrapperElement:g,fullWidth:m,onClick:v,...b},y)=>{const x=t||"button",w=s||l||c,_=h?lc(K2["btn--no-style"],r,{[K2["btn--full-width"]]:m}):lc(K2.btn,K2[`btn--${o}`],K2[`btn--${i}`],r,{[K2[`btn--${a}`]]:a},{[K2["btn--underline"]]:u},{[K2["btn--is-hovered"]]:d},{[K2["btn--is-active"]]:f},{[K2["btn--is-loading"]]:p},{[K2["btn--icon-only"]]:s},{[K2["btn--icon"]]:w},{[K2["btn--full-width"]]:m}),S=(e,t)=>{const n={size:16,className:lc(K2.btn__icon,K2[`btn__icon--${e}`],{[K2.btn__spinner]:p})},r="string"==typeof t?{...n,name:t}:{...n,...t,className:lc(n.className,null==t?void 0:t.className)};return p?(0,C.jsx)(Tv,{className:r.className}):(0,C.jsx)(H2,{...r})};return(0,C.jsx)(tu,{visibility:"hide",children:(0,C.jsx)(x,{"data-name":"button-content",...b,"aria-disabled":p||b["aria-disabled"],onClick:e=>{v&&!p&&v(e)},ref:y,className:_,children:h?e:(0,C.jsxs)("span",{className:K2.btn__inner,children:[s&&S("centre",s),l&&S("left",l),(0,C.jsx)("span",{className:K2.btn__text,children:e}),p&&!w&&(0,C.jsx)(Tv,{position:"absolute",className:K2.btn__spinner}),c&&S("right",c)]})})})}));U2.displayName="ButtonContent";const G2=U2,W2=(0,s.forwardRef)(((e,t)=>{const{children:n,as:r,type:o,formNoValidate:i,visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:f,isHovered:p,isActive:h,noStyle:g,...m}=e;return(0,C.jsx)(G2,{"data-name":"button",...m,type:o||"button",formNoValidate:!!(i??"submit"===o)||void 0,ref:t,as:r||"button",visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:f,isHovered:p,isActive:h,noStyle:g,children:n})}));W2.displayName="Button";const q2=W2,Y2={collapse__title:"collapse__title-8b98d783",collapse__icon:"collapse__icon-6cfc1cff","collapse--is-open":"collapse--is-open-67cf3662",collapse__content:"collapse__content-c7ea2935"},J2=e=>{const{getLabel:t}=jv(),{id:n,children:r,className:o,openText:i=t("open"),closeText:a=t("close"),hideCollapseText:l=!1,title:c,titleRowProps:u,defaultOpen:d,open:f,onToggle:p,...h}=e,[g,m]=s.useState(d),v=au(),b=v||(void 0!==f?f:g),y=lc(Y2.collapse,o,{[Y2["collapse--is-open"]]:b}),x=()=>{m((e=>!e)),null==p||p(!b)},w=(0,C.jsx)("div",{className:Y2.collapse__content,children:r});return(0,C.jsxs)("div",{"data-name":"collapse",...h,className:y,children:[(0,C.jsx)("button",{type:"button","data-name":"collapse-trigger",className:Y2.collapse__title,"aria-expanded":b,"aria-controls":n,onKeyDown:e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),x())},onClick:x,children:(0,C.jsxs)(Bv,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...u,element:"span",children:[c&&(0,C.jsx)(zv,{children:c}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(Bv,{element:"span",alignItems:"center",gutter:1,children:[(0,C.jsx)(tu,{visibility:"hide",children:(0,C.jsx)(zv,{width:"auto",className:lc({"visually-hidden":l}),children:(0,C.jsx)(z2,{element:"span",color:"primary",children:b?a:i})})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(H2,{className:Y2.collapse__icon,name:"expand_more"})})]})})]})}),v?w:(0,C.jsx)(Dv,{duration:300,id:n,height:b?"auto":0,"data-testid":"collapse-inner",children:w})]})},X2=(0,s.forwardRef)(((e,t)=>{const{getLabel:n}=jv(),{visualType:r="link",as:o,children:i,...a}=e;return(0,C.jsxs)(G2,{"data-name":"anchor",...a,ref:t,as:o||"a",visualType:r,children:[i,"_blank"===a.target&&(0,C.jsxs)("span",{className:"sr-only",children:["(",n("anchor.new-tab"),")"]})]})}));X2.displayName="Anchor";const Z2=s.createContext({menuOpen:!1,toggleMenu:()=>null,headerType:"system",reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),context:{},y:null,headerElement:null,headerBottomElement:null,headerBottomSize:void 0}),Q2={card:"card-1dcacf64","card--borderless":"card--borderless-32e5f5c2","card--no-border-radius-top":"card--no-border-radius-top-b4365e4f",card__content:"card__content-815d48ff","card--no-border-radius-right":"card--no-border-radius-right-3ceb8758","card--no-border-radius-bottom":"card--no-border-radius-bottom-63f3360b","card--no-border-radius-left":"card--no-border-radius-left-a3acce4a","card--border-left":"card--border-left-e9b3151f","card--border-top":"card--border-top-e2a66b39","card__header--default":"card__header--default-90734e02","card__header--primary-main":"card__header--primary-main-8de91e10","card__header--primary-active":"card__header--primary-active-6877b9af","card__header--white":"card__header--white-9243bce2","card__header--bg-muted":"card__header--bg-muted-7904d086",card__header:"card__header-5d78acc3"},e3=s.createContext({}),t3=e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]},n3=e=>{const t=e=>"object"==typeof e&&"vertical"in e&&"horizontal"in e;return{"--card-content-padding-top":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.top}rem`,"--card-content-padding-right":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.right}rem`,"--card-content-padding-bottom":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.bottom}rem`,"--card-content-padding-left":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.left}rem`}},r3=(0,s.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=M2(),{children:r,className:o,padding:i,background:a="bg-default",borderRadius:s,borderless:l,border:c="border-default",...u}=n(e,{padding:1}),[d,f]=t3(c),p=lc(Q2.card,o,{[Q2[`card--border-${d}`]]:d,[Q2["card--borderless"]]:l,[Q2["card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[Q2["card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[Q2["card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[Q2["card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)});return(0,C.jsx)(e3.Provider,{value:{padding:i,background:a},children:(0,C.jsx)("div",{"data-name":"card",...u,className:p,ref:t,style:f?{"--card-border-color":`var(--color-${f})`}:void 0,children:r})})}));r3.displayName="Card";const o3=e=>{const{variant:t,...n}=e,{getCurrentBreakpointProps:r}=M2(),{padding:o}=s.useContext(e3),{children:i,className:a,background:l,padding:c,...u}=r(n,{background:t??"default",padding:o}),d=lc(Q2.card__header,Q2[`card__header--${l}`],a);return(0,C.jsx)("div",{"data-name":"card-header",style:n3(c),...u,className:d,children:i})};o3.displayName="CardHeader";const i3=e=>{const{padding:t,background:n}=s.useContext(e3),{getCurrentBreakpointProps:r}=M2(),{children:o,className:i,padding:a,background:l,...c}=r(e,{padding:t,background:n}),u=lc(Q2.card__content,{[B2(l)]:l},i);return(0,C.jsx)("div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,style:n3(a),...c,className:u,children:o})};i3.displayName="CardContent";const a3="card__notification-content-4c89a40e",s3="card__notification-b07a1cfd",l3=e=>{const{children:t,padding:n,className:r,...o}=e,i=lc(s3,r);return(0,C.jsx)(i3,{"data-name":"card-notification",padding:n,className:a3,children:(0,C.jsx)(Zv,{className:i,...o,children:t})})},c3=({children:e})=>(0,C.jsx)(C.Fragment,{children:e});c3.displayName="HeaderContent";const u3={tooltip:"tooltip-413196ab","tooltip--none":"tooltip--none-01bd521a","tooltip--small":"tooltip--small-f23b2c64","tooltip--medium":"tooltip--medium-33ed6e9a","tooltip--large":"tooltip--large-84d7b683",tooltip__arrow:"tooltip__arrow-7d8214bc","tooltip__arrow--stroke":"tooltip__arrow--stroke-092e3c3e",tooltip__trigger:"tooltip__trigger-f6422045","tooltip__trigger--click":"tooltip__trigger--click-bb6703b1"},d3=10,f3=s.createContext({open:!1,isMounted:!1,openWith:"hover",reference:()=>null,floating:()=>null,focusManager:{},arrowRef:{current:null},x:null,y:null,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{x:0,y:0,centerOffset:0},placement:"top",context:{}}),p3=e=>{const{getLabel:t}=jv(),n=su(),{children:r,placement:o="bottom",openWith:i=(n?"click":"hover"),defaultOpen:a=!1,open:l,onToggle:c,role:u="tooltip",offset:d=d3}=e,{order:f=["reference","content"],modal:p=!1,initialFocus:h=-1,...g}=e.focusManager??{},{visuallyHiddenDismiss:m=!!p&&t("close")}=g??{},[v,b]=s.useState(a),y=s.useRef(null),x=c&&typeof l<"u"?l:v,w=nu(),{x:_,y:S,refs:k,strategy:E,context:j,middlewareData:O,placement:T}=_w({placement:o,open:x,onOpenChange:e=>{typeof l>"u"&&b(e),null==c||c(e)},middleware:[Zy(d),ex(),Qy({padding:8}),tx({element:y,padding:4})],whileElementsMounted:zy}),{getReferenceProps:I,getFloatingProps:R}=jw([Mx(j,{handleClose:Lw(),enabled:"hover"===i}),mw(j),Sw(j,{enabled:"hover"===i}),Dw(j,{role:u}),xw(j,{outsidePressEvent:"click"===i?"mousedown":"pointerdown"})]);return(0,C.jsx)(f3.Provider,{value:{open:x,isMounted:w,openWith:i,reference:k.setReference,floating:k.setFloating,arrowRef:y,focusManager:{order:f,initialFocus:h,modal:p,visuallyHiddenDismiss:m,...g},x:_,y:S,strategy:E,getReferenceProps:I,getFloatingProps:R,arrow:{...O.arrow},context:j,placement:T},children:r})},h3=e=>{const{children:t,maxWidth:n="medium",cardProps:r,className:o}=e,{open:i,x:a,y:l,strategy:c,focusManager:u,floating:d,arrowRef:f,getFloatingProps:p,placement:h,context:g}=s.useContext(f3),[m,v]=t3(null==r?void 0:r.border),b=()=>m&&v?`var(--color-${v})`:"none",y="none"!==b();return(0,C.jsx)(nw,{"data-name":"tooltip",children:(()=>{const e=(0,C.jsx)(uw,{...u,context:g,children:(0,C.jsxs)("div",{...p({ref:d,style:{position:c,left:a??0,top:l??0},className:lc(u3.tooltip,o,{[u3[`tooltip--${n}`]]:n})}),"data-placement":h,children:[(0,C.jsx)(kx,{ref:e=>f.current=e,context:g,fill:null!=r&&r.background?`var(--color-${null==r?void 0:r.background})`:"var(--color-bg-default)",stroke:b(),strokeWidth:y?4:0,className:lc(u3.tooltip__arrow,{[u3["tooltip__arrow--stroke"]]:y}),height:7,width:14}),(0,C.jsx)(r3,{padding:.5,borderless:!0,...r,children:(0,C.jsx)(i3,{children:t})})]})});return i?e:null})()})},g3=e=>{const{children:t}=e,{getLabel:n}=jv(),{getReferenceProps:r,reference:o,openWith:i}=s.useContext(f3),a=nx([o,t.ref]);return s.cloneElement(t,r({ref:a,tabIndex:0,label:t.type===H2?n("tooltip.icon-trigger"):void 0,...t.props,className:lc(u3.tooltip__trigger,{[u3["tooltip__trigger--click"]]:"click"===i},t.props.className)}))},m3="header__dropdown-cb8faff9",v3="header__dropdown--open-03680708",b3=e=>{const{children:t,triggerProps:n,defaultOpen:r,open:o,onToggle:i,shouldAnimate:a,tooltipProps:l}=e,[c,u]=s.useState(r),[d,f]=s.useState(d3),{headerElement:p}=s.useContext(Z2),h=s.useRef(null);s.useEffect((()=>{if(null!=p&&p.current&&null!=h&&h.current){const e=p.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),n=e.bottom-t.bottom;f(n)}}),[p,h,t]);const g=void 0!==o?o:c;return(0,C.jsxs)(p3,{offset:d,openWith:"click",role:"dialog",onToggle:e=>{u(e),null==i||i(e)},open:g,children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{...n,ref:h,className:lc(m3,n.className,{[v3]:a&&g})})}),(0,C.jsx)(h3,{...l,cardProps:{...null==l?void 0:l.cardProps,border:"top-primary-active-subtle",borderless:!1,background:"bg-muted"},children:t})]})},y3={modal:"modal-11cfca5e","modal--center":"modal--center-b671c09c","modal--no-overlay":"modal--no-overlay-a990d10a",modal__inner:"modal__inner-10a95cee","modal--right":"modal--right-d7b9213c","modal--bottom":"modal--bottom-b9033478","modal--10":"modal--10-bc4c5908","modal--8":"modal--8-46477dbb","modal--6":"modal--6-cd8246bc",modal__card:"modal__card-f5ca2013","close-button":"close-button-9544f148"},x3=s.createContext({isOpen:!1,reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),closeModal:()=>null,context:{},isDismissable:!0,escapeKey:!0,outsidePress:!0}),w3=e=>{const{children:t,defaultOpen:n=!1,onToggle:r,isDismissable:o=!0,escapeKey:i=!0,outsidePress:a=!0}=e,[l,c]=s.useState(n),u=r&&typeof e.open<"u"?e.open:l,{refs:d,context:f}=_w({open:u,onOpenChange:e=>e?m():g()}),{getReferenceProps:p,getFloatingProps:h}=jw([mw(f),Dw(f),xw(f,{enabled:o,escapeKey:i,outsidePress:a})]),g=()=>{typeof e.open>"u"&&c(!1),null==r||r(!1)},m=()=>{typeof e.open>"u"&&c(!0),null==r||r(!0)};return(0,C.jsx)(x3.Provider,{value:{isOpen:u,reference:d.setReference,floating:d.setFloating,getReferenceProps:p,getFloatingProps:h,closeModal:g,context:f,isDismissable:o,escapeKey:i,outsidePress:a},children:t})},_3=e=>{const{children:t}=e,{closeModal:n}=s.useContext(x3);return s.cloneElement(t,{onClick:()=>{var e,r;null==(r=(e=t.props).onClick)||r.call(e),n()}})},S3=e=>{const{children:t,size:n=6,cardProps:r={},hideCloseButton:o,position:i,lockScroll:a=!0,trapFocus:l=!0,returnFocus:c=!0,overlay:u,visuallyHiddenDismiss:d=!1}=e,{getLabel:f}=jv(),p=e["aria-labelledby"],h=e["aria-describedby"],{isOpen:g,floating:m,getFloatingProps:v,context:b,isDismissable:y}=s.useContext(x3),x=s.useMemo((()=>{let e=!1;const n=e=>e.type.displayName;return o?t:s.Children.map(t,((t,r)=>e||!s.isValidElement(t)||"CardHeader"!==n(t)&&"CardContent"!==n(t)?t:(e=!0,s.cloneElement(t,{...t.props,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(_3,{children:(0,C.jsx)(qv,{size:"large",className:y3["close-button"]})}),t.props.children]})}))))}),[t,f,o]);return(0,C.jsx)(nw,{"data-name":"modal",children:g&&(0,C.jsx)(pw,{lockScroll:a,className:lc(y3.modal,y3[`modal--${n}`],y3[`modal--${i}`],{[y3["modal--no-overlay"]]:"none"===u}),children:(0,C.jsx)(uw,{context:b,closeOnFocusOut:!l&&y,visuallyHiddenDismiss:d?f("modal.close"):void 0,returnFocus:c,modal:l,children:(0,C.jsx)("div",{...v({ref:m,className:y3.modal__inner,"aria-labelledby":p,"aria-describedby":h,"aria-modal":l}),children:(0,C.jsx)(r3,{...r,className:lc(y3.modal__card,null==r?void 0:r.className),children:x})})})})})},k3=e=>{const{children:t}=e,{getReferenceProps:n,reference:r}=s.useContext(x3);return s.cloneElement(t,n({ref:r,...t.props}))},E3="header-modal__close-824b7dc8",C3=e=>{const{triggerProps:t,defaultOpen:n,open:r,onToggle:o,children:i,ariaLabelledby:a}=e,{getLabel:s}=jv();return(0,C.jsxs)(w3,{defaultOpen:n,open:r,onToggle:o,children:[(0,C.jsx)(k3,{children:(0,C.jsx)(q2,{...t})}),(0,C.jsx)(S3,{"aria-labelledby":a,hideCloseButton:!0,position:"right",children:(0,C.jsxs)(i3,{padding:0,children:[(0,C.jsx)(r3,{borderless:!0,background:"primary-highlight-subtle",padding:.5,borderRadius:!1,children:(0,C.jsx)(i3,{children:(0,C.jsx)(z2,{element:"div",modifiers:"right",children:(0,C.jsx)(_3,{children:(0,C.jsx)(qv,{title:s("modal.close"),size:"large",className:E3})})})})}),(0,C.jsx)(r3,{border:"top-border-default",borderRadius:!1,padding:0,children:(0,C.jsx)(i3,{children:i})})]})})]})},j3=e=>{const{languages:t}=e,n=L2(["desktop","tablet"]),{getLabel:r}=jv(),[o,i]=s.useState(!1),a=null==t?void 0:t.find((e=>e.isSelected)),l={children:null==a?void 0:a.label,"aria-label":`${r("header.select-lang")} ${(null==a?void 0:a["aria-label"])??(null==a?void 0:a.label)}`,visualType:n?"link":"tertiary",iconRight:n?{name:"expand_more",color:"primary",size:24}:void 0},c=({isSelected:e,onClick:t,label:n,"aria-label":r},o=!0)=>(0,C.jsx)(q2,{visualType:o?"link":e?"primary":"tertiary","aria-current":e,"aria-label":r,onClick:()=>(e=>{null==e||e({onToggle:i})})(t),children:n}),u=(0,C.jsxs)("div",{children:[(0,C.jsx)(z2,{color:"muted",modifiers:"small",children:r("header.select-lang")}),(0,C.jsx)(b3,{shouldAnimate:!0,open:o,onToggle:i,tooltipProps:{cardProps:{padding:1}},triggerProps:l,children:(0,C.jsx)(tb,{verticalSpacing:{size:.75},element:"ul",children:(null==t?void 0:t.map((e=>(0,C.jsx)(eb,{children:c(e)},e.label))))||[]})})]}),d=(0,C.jsx)(C3,{ariaLabelledby:"header-language-modal-label",open:o,onToggle:i,triggerProps:l,children:(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsxs)(i3,{children:[(0,C.jsx)($2,{id:"header-language-modal-label",className:"sr-only",children:r("header.select-lang")}),(0,C.jsx)(Bv,{alignItems:"center",element:"ul",children:null==t?void 0:t.map((e=>(0,C.jsx)(zv,{width:"auto",children:c(e,!1)},e.label)))})]})})});return n?u:d};j3.displayName="HeaderLanguage";const O3={tag:"tag-de7cd582","tag--default":"tag--default-77443d27","tag--type-ghost":"tag--type-ghost-80dfabdb","tag--large":"tag--large-81928b3e","tag--color-default":"tag--color-default-9aabde81","tag--type-default":"tag--type-default-328f991f","tag--type-secondary":"tag--type-secondary-495a8ed8","tag--color-accent":"tag--color-accent-798040f8","tag--type-borderless":"tag--type-borderless-1c5fcca7","tag--type-invisible":"tag--type-invisible-c8d11eb5","tag--icon-only":"tag--icon-only-1f412944","tag--disabled":"tag--disabled-06b14065","tag--with-arrow":"tag--with-arrow-a7d0d694","tag--color-primary":"tag--color-primary-d4a64cd4","tag--color-positive":"tag--color-positive-f823c0df","tag--color-warning":"tag--color-warning-3efdfe52","tag--color-important":"tag--color-important-81499159","tag--status-error":"tag--status-error-30c88b17","tag--status-success":"tag--status-success-e31be3e2","tag--status-inactive":"tag--status-inactive-09947563","tag--rounded":"tag--rounded-e9419f54"},T3=(0,s.forwardRef)(((e,t)=>{const{children:n,size:r,className:o,title:i,color:a="default",status:s,type:l="default",rounded:c=!1,hasArrow:u=!1,isLoading:d=!1,isDisabled:f=!1,iconOnly:p=!1,id:h}=e,g=d?Hw:i?"abbr":"div",m=lc(O3.tag,o,{[O3[`tag--${r}`]]:r},{[O3[`tag--type-${l}`]]:l},{[O3[`tag--color-${a}`]]:a},{[O3[`tag--status-${s}`]]:s},{[O3["tag--rounded"]]:c},{[O3["tag--icon-only"]]:p},{[O3["tag--disabled"]]:f},{[O3["tag--with-arrow"]]:u&&!c});return(0,C.jsx)(g,{id:h,"data-name":"tag",className:m,title:i,ref:t,children:n})}));T3.displayName="Tag";const I3="header-role-collapse-7664165f",R3="header-role-wrapper-c65bcd63",P3="header-role-children-3fdd2c2c",M3=e=>{const{renderModal:t=!1,...n}=e,[r,o]=s.useState(!1);return t?(0,C.jsx)(D3,{...n,open:r,onToggle:o}):(0,C.jsx)(A3,{...n,open:r,onToggle:o})};M3.displayName="HeaderRole";const A3=e=>{const{getLabel:t}=jv(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l="function"==typeof n?n({onToggle:o}):n,c=(0,C.jsx)(b3,{shouldAnimate:!0,open:r,onToggle:o,tooltipProps:{cardProps:{padding:0},maxWidth:"medium"},triggerProps:{children:i,"aria-label":`${s??""} ${a??""} ${i??""}`,visualType:"link",iconRight:{name:"expand_more",color:"primary",size:24}},children:(0,C.jsx)("div",{className:R3,children:(0,C.jsx)(Bw,{fadeSize:0,children:(0,C.jsx)("div",{className:P3,children:l})})})});return(0,C.jsxs)("div",{children:[s===t("header.role-label")?(0,C.jsx)("div",{children:(0,C.jsx)(T3,{color:"primary",type:"secondary",children:s})}):(0,C.jsxs)(z2,{color:"muted",modifiers:["bold","small"],children:[s,!!a&&(0,C.jsxs)(C.Fragment,{children:[" ",(0,C.jsxs)(z2,{element:"span",modifiers:["small","normal"],children:[(0,C.jsx)("span",{style:{color:"var(--color-border-default)"},children:"|"})," ",a]})]})]}),l?c:i]})},D3=e=>{const{getLabel:t}=jv(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l=(0,C.jsxs)(z2,{element:"span",color:"muted",modifiers:"bold",children:[s," ",i,a&&(0,C.jsx)(z2,{element:"span",modifiers:"normal",children:` | ${a}`})]}),c="function"==typeof n?n({onToggle:o}):n;return(0,C.jsx)(r3,{background:"bg-muted",borderRadius:!1,borderless:!0,children:(0,C.jsx)(i3,{padding:0,children:c?(0,C.jsx)(J2,{id:"role-collapse",open:r,onToggle:o,className:I3,hideCollapseText:!0,title:l,children:(0,C.jsx)("div",{className:R3,children:(0,C.jsx)(Bw,{fadeSize:0,children:(0,C.jsx)("div",{className:P3,children:c})})})}):(0,C.jsx)("div",{className:P3,children:l})})})},F3=e=>{const{children:t,onActionClick:n,closeOnAction:r=!0,iconName:o}=e,[i,a]=s.useState(!1),l=L2(["desktop"]),c=L2(["mobile"]),{getLabel:u}=jv(),{headerType:d}=s.useContext(Z2),f={children:u("header.settings"),visualType:"tertiary",icon:{name:o||"account_circle",color:"primary",size:36}};if("public"===d)return(0,C.jsx)(q2,{icon:c?{name:"login",color:"primary",size:24}:void 0,visualType:c?"tertiary":"primary",onClick:n,children:u("header.login")});const p="function"==typeof t?t({onToggle:a}):t;if(!p)return(0,C.jsx)(q2,{icon:{name:"logout",color:"primary",size:24},visualType:"tertiary",onClick:n,children:u("header.logout")});const h=()=>(0,C.jsx)(q2,{onClick:()=>{n(),r&&a(!1)},iconLeft:"logout",visualType:"link",children:u("header.logout")}),g=(0,C.jsx)(b3,{open:i,onToggle:a,tooltipProps:{cardProps:{padding:1}},triggerProps:f,children:(0,C.jsxs)(Kv,{size:1,children:[p,(0,C.jsx)(Uw,{isStretched:!0}),(0,C.jsx)(h,{})]})}),m=(0,C.jsxs)(C3,{open:i,onToggle:a,ariaLabelledby:"header-settings-modal-label",triggerProps:f,children:[(0,C.jsx)($2,{id:"header-settings-modal-label",className:"sr-only",children:u("header.settings")}),p,(0,C.jsx)(Uw,{isStretched:!0}),(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsx)(i3,{children:(0,C.jsx)(h,{})})}),(0,C.jsx)(Uw,{isStretched:!0})]});return l?g:m};F3.displayName="HeaderSettings";const L3="dropdown-fc86e9ac",N3="dropdown__item-bc9999d8",B3="dropdown__item--active-c49b11d2",z3="dropdown__item--disabled-c66020d7",$3=e=>{const{getLabel:t}=jv(),{button:n,items:r,onItemClick:o,closeMenuOnClick:i=!0,...a}=e,{initialFocus:l=-1,modal:c=!1,...u}=e.focusManager??{},{visuallyHiddenDismiss:d=!!c&&t("close")}=u??{},f=function(){const e=Sx(),t=Ox(),n=jx();return bx((()=>{const r={id:e,parentId:n};return null==t||t.addNode(r),()=>{null==t||t.removeNode(r)}}),[t,e,n]),e}(),p=s.useRef([]),[h,g]=s.useState(!1),[m,v]=s.useState(null),{x:b,y,strategy:x,refs:w,placement:_,context:S}=_w({placement:"bottom-start",nodeId:f,open:h,onOpenChange:g,middleware:[ex(),Qy()],whileElementsMounted:zy}),k=r.findIndex((e=>e.isActive)),{getReferenceProps:E,getFloatingProps:j,getItemProps:O}=jw([mw(S),Mw(S,{listRef:p,activeIndex:m,selectedIndex:k,onNavigate:v,loop:!0}),Dw(S,{role:"listbox"}),xw(S)]),T=e=>lc(N3,{[B3]:e.isActive,[z3]:e.isDisabled}),I=(e,t,n)=>{var r;null==o||o(e,t,n),null==(r=null==e?void 0:e.onClick)||r.call(e,n),i&&g(!1)},R=(e,t)=>(0,C.jsx)("button",{...O({disabled:e.isDisabled,tabIndex:m===t?0:-1,role:"option",className:T(e),onClick:n=>I(e,t,n),onKeyDown(n){"Enter"===n.key&&I(e,t,n)},ref(e){p.current[t]=e}}),children:e.children},t);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(q2,{"data-name":"dropdown",...a,...n,...E({ref:w.setReference,tabIndex:0})}),(0,C.jsx)(nw,{children:(()=>{const e=(0,C.jsx)(uw,{context:S,initialFocus:l,visuallyHiddenDismiss:d,modal:c,...u,children:(0,C.jsx)("div",{...j({ref:w.setFloating,style:{position:x,left:b??0,top:y??0},className:L3,onKeyDown(e){"Tab"===e.key&&g(!1)}}),"data-placement":_,children:r.map(((e,t)=>R(e,t)))})});return h?e:null})()})]})},V3=(s.createContext({activeStep:0,allowStepLabelClick:!0,handleActiveStepChange:()=>null}),e=>{var t,n,r,o,i;const{muiTextfieldProps:a,textfieldProps:l,inputFormat:c,onChangeHandler:u,type:d="date"}=e,{ref:f,inputRef:p,inputProps:h,InputProps:g,value:m,size:v,onChange:b,error:y,disabled:x,...w}=a,{readOnly:_,id:S,input:k,...E}=l,j=s.useRef({inner:null,input:null});return s.useEffect((()=>{j.current.input&&(null==p||p(j.current.input))}),[p]),(0,C.jsx)(y_,{id:S,...w,disabled:x,readOnly:_,...E,value:null==h?void 0:h.value,onChangeEvent:e=>{var t;null==(t=null==h?void 0:h.onChange)||t.call(h,e)},placeholder:(null==l?void 0:l.placeholder)||(null==h?void 0:h.placeholder),defaultValue:void 0,ref:j,input:{...h,...k},invalid:y,icon:{name:"date"===d?"today":"schedule",label:null==(i=null==(o=null==(r=null==(n=null==(t=null==a?void 0:a.InputProps)?void 0:t.endAdornment)?void 0:n.props)?void 0:r.children)?void 0:o.props)?void 0:i["aria-label"]},onBlur:e=>{var t,n,r;null==(t=E.onBlur)||t.call(E,e),null==(n=w.onBlur)||n.call(w,e),Sc(e.currentTarget.value,c,!0).isValid()||(u(null),null==(r=null==h?void 0:h.onChange)||r.call(h,{...e,target:{...e.target,value:""}}))}})}),H3=e=>{const{value:t,defaultValue:n,onChange:r,minDate:o,maxDate:i,disabled:a,readOnly:l,toolbarTitle:c,disableFuture:u,disablePast:d,shouldDisableDate:f,shouldDisableMonth:p,shouldDisableYear:h,disableHighlightToday:g,referenceDate:m,inputFormat:v="DD.MM.YYYY",views:b=["year","day"],onError:y,loading:x,onClose:w,..._}=e,[S,k]=s.useState(n||null),[E,j]=s.useState(!1),O=s.useMemo((()=>r&&typeof t<"u"?t:S),[S,r,t]),T=e=>{(null==e||!e.isValid())&&null!==e||(typeof t>"u"&&k(e),null==r||r(e))};return(0,C.jsx)(_I,{"data-name":"datepicker",value:O,onChange:T,renderInput:e=>(0,C.jsx)(V3,{muiTextfieldProps:e,inputFormat:v,onChangeHandler:T,textfieldProps:{..._,onClear:()=>T(null),onIconClick:l?void 0:()=>j((e=>!e))}}),open:E,inputFormat:v,onOpen:()=>j(!0),onClose:()=>{j(!1),null==w||w()},defaultCalendarMonth:m,disabled:a,disableFuture:u,disablePast:d,shouldDisableDate:f,shouldDisableMonth:p,shouldDisableYear:h,disableHighlightToday:g,readOnly:l,minDate:o,maxDate:i,toolbarTitle:c,onError:y,loading:x,views:b})},K3="check-48c1869b",U3="check--disabled-3f793e27",G3="check__input-92dff7a9",W3="check__indicator-0ac86462",q3="check__indicator--hover-c4064110",Y3="check__indicator--indeterminate-33c0c00a",J3="check__icon-e76c1b87",X3="check__icon--check-e0ab9856",Z3="check__icon--indeterminate-dc93d769",Q3="check__tooltip-icon-e8045891",e5="check__extra-content-7ade4e97",t5=e=>{const{id:t,label:n,value:r,className:o,disabled:i=!1,onChange:a,hideLabel:l=!1,extraContent:c,checked:u,defaultChecked:d,indeterminate:f,hover:p,name:h,tooltip:g,...m}=e,[v,b]=s.useState(d||!1),y=s.useRef(null),x=s.useMemo((()=>f?"mixed":a&&typeof u<"u"?u:v),[f,a,u,v]),w=lc(K3,{[U3]:i});return(0,C.jsxs)("div",{"data-name":"check",className:o,...m,children:[(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsxs)(zv,{width:"auto",children:[(0,C.jsx)("input",{id:t,value:r,name:h,type:"checkbox",disabled:i,checked:"mixed"!==x&&x,"aria-checked":x,onChange:e=>{typeof u>"u"&&b(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:G3}),(0,C.jsxs)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=y.current)?void 0:e.click()},className:lc(W3,{[q3]:p,[Y3]:f}),children:[(0,C.jsx)(Gv,{size:16,name:"remove",className:lc(J3,Z3)}),(0,C.jsx)(Gv,{size:16,name:"check",className:lc(J3,X3)})]})]}),(0,C.jsx)(zv,{children:(0,C.jsxs)("label",{ref:y,className:w,htmlFor:t,children:[(0,C.jsx)("span",{className:lc({"visually-hidden":l}),children:n}),g&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{name:"info",color:"brand",size:16,display:"inline",className:Q3})}),(0,C.jsx)(h3,{children:g})]})]})})]}),c&&(0,C.jsx)("div",{className:e5,children:c})]})},n5={select__control:"select__control-c52fb518","select--invalid":"select--invalid-a28d479c","select__control--focused":"select__control--focused-666f5665",select__arrow:"select__arrow-f088db27","select__menu-portal":"select__menu-portal-83a0138d",select__menu:"select__menu-36546a54","select__menu-list":"select__menu-list-1db27a34","select__menu-list-inner":"select__menu-list-inner-65d1bbd0","select__menu-list-footer":"select__menu-list-footer-8ebb4c1b",select__option:"select__option-a57e0e71","select__option--focused":"select__option--focused-421543c0","select__option--selected":"select__option--selected-3d192b35","select__option--disabled":"select__option--disabled-ffe87ec9","select--small":"select--small-9131190c",select__input:"select__input-ff08a918","select__multi-value-item":"select__multi-value-item-0ca3b242",select__checkbox:"select__checkbox-2412f21a",select:"select-40793e72",select__group:"select__group-4bbb5fe8","select__group-heading":"select__group-heading-e20b5f3f","select__multi-value-clear":"select__multi-value-clear-3603e9b1","select--tags-row":"select--tags-row-8b3eeef0","select--searchable":"select--searchable-c0c07c33","select--tags-stack":"select--tags-stack-8ee56ad9"},r5=e=>{const t=lc(n5.select__control,e.className,{[n5["select__control--focused"]]:e.isFocused});return(0,C.jsx)(KR.Control,{...e,className:t})},o5=e=>(0,C.jsx)(KR.Input,{...e,className:lc(e.className,n5.select__input),isHidden:void 0!==e.selectProps.inputIsHidden?e.selectProps.inputIsHidden:e.isHidden}),i5=e=>(0,C.jsx)(KR.Menu,{...e,className:lc(e.className,n5.select__menu)}),a5=e=>(0,C.jsx)(KR.MenuPortal,{...e,className:lc(e.className,n5["select__menu-portal"])}),s5=(0,s.forwardRef)(((e,t)=>{const{options:n,defaultOptions:r,id:o,name:i,iconName:a="arrow_drop_down",label:l,required:c,value:u,defaultValue:d,tagsDirection:f="row",onChange:p,onInputChange:h,inputValue:g,loadOptions:m,isLoading:v,isTagRemovable:b=!1,openMenuOnFocus:y=!1,openMenuOnClick:x=!0,tabSelectsValue:w=!1,disabled:_=!1,className:S,hideLabel:k=!1,helper:E,placeholder:j,invalid:O,size:T,async:I=!1,renderOption:R,renderMessageListFooter:P,noOptionsMessage:M,loadingMessage:A,multiple:D=!1,closeMenuOnSelect:F=!D,blurInputOnSelect:L=!1,autoFocus:N=!1,isClearable:B=!0,isClearIndicatorVisible:z=!1,isSearchable:$=!0,menuIsOpen:V,onMenuClose:H,onMenuOpen:K,onBlur:U,inputIsHidden:G,optionGroupHeadingText:W={modifiers:"small",color:"subtle"},optionGroupBackgroundColor:q,cacheOptions:Y=!0,...J}=e,X=E?(null==E?void 0:E.id)??`${o}-helper`:void 0,Z=s.useRef(null),{getLabel:Q}=jv();s.useImperativeHandle(t,(()=>Z.current));const ee=e=>{var t;null==p||p(e),!L&&Z.current&&(null==(t=Z.current.inputRef)||t.focus())},te=()=>(0,C.jsx)(H2,{name:a,size:24,className:n5.select__arrow}),ne=e=>(0,C.jsx)(KR.Placeholder,{...e,className:lc(e.className,"inline-block")}),re=s.useCallback((e=>(0,C.jsxs)("div",{className:n5["select__menu-list-wrapper"],children:[(0,C.jsx)(KR.MenuList,{...e,className:lc(e.className,n5["select__menu-list"]),children:e.children}),P&&(0,C.jsx)("div",{className:n5["select__menu-list-footer"],children:P(e)})]})),[P]),oe=e=>D?(e=>{const t=lc(n5.select__option,{[n5["select__option--disabled"]]:e.isDisabled},{[n5["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,C.jsx)(KR.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:R?R(e):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{className:"sr-only",children:e.label}),(0,C.jsx)(t5,{id:e.data.value,label:e.label,"aria-hidden":!0,className:n5.select__checkbox,value:e.data.value,name:e.data.value,checked:e.isSelected,onChange:(e,t)=>null,disabled:e.isDisabled,hover:e.isFocused})]})})})(e):(e=>{const t=lc(n5.select__option,{[n5["select__option--disabled"]]:e.isDisabled},{[n5["select__option--selected"]]:e.isSelected},{[n5["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,C.jsx)(KR.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:R?R(e):e.children})})(e),ie=({children:e,components:{Remove:t},data:n,selectProps:r,removeProps:o,...i})=>(0,C.jsxs)(T3,{color:"default",type:"secondary",className:lc(n5["select__multi-value-item"],{[n5["select__multi-value-item--big"]]:"small"!==T}),children:[e,b&&(0,C.jsx)(t,{data:n,selectProps:r,innerProps:o})]}),ae=({data:e,innerProps:t})=>(0,C.jsx)(q2,{icon:{name:"clear",color:"muted"},className:n5["select__multi-value-clear"],visualType:"link",tabIndex:-1,...t,children:`${Q("remove")} ${e.label}`}),se=({innerProps:{ref:e,...t}})=>z?(0,C.jsx)(q2,{icon:{name:"clear",color:"muted"},visualType:"link",tabIndex:-1,ref:e,...t,children:Q("clear")}):null,le=e=>{const t=lc(n5.select__group);return(0,C.jsx)(KR.Group,{...e,className:t,children:e.children})},ce=e=>{const t=lc(n5["select__group-heading"],B2(e.data.backgroundColor||q||"transparent")),n=e.data.text||W;return(0,C.jsx)(KR.GroupHeading,{...e,className:t,children:(0,C.jsx)(z2,{...n,children:e.data.label})})},ue=lc(n5.select,S,{[n5["select--invalid"]]:O||"error"===(null==E?void 0:E.type)},{[n5[`select--${T}`]]:T},{[n5[`select--tags-${f}`]]:f},{[n5["select--searchable"]]:$});return(0,C.jsxs)("div",{"data-name":"select",...J,className:ue,children:[(0,C.jsxs)("div",{className:n5.select__inner,children:[(0,C.jsx)(v_,{id:`${o}-input`,label:l,required:c,hideLabel:k,size:T}),(()=>{const e={ClearIndicator:se,DropdownIndicator:te,IndicatorSeparator:()=>null,MenuPortal:a5,Menu:i5,MenuList:re,Option:oe,Control:r5,Input:o5,MultiValue:ie,MultiValueRemove:ae,Placeholder:ne,Group:le,GroupHeading:ce},t=I?qP:UP;return(0,C.jsx)(t,{id:o,"aria-describedby":X,autoFocus:N,ref:Z,instanceId:o,className:"select__wrapper",name:i,options:n,defaultOptions:r,value:u,defaultValue:d,cacheOptions:Y,onChange:ee,onInputChange:h,onBlur:U,inputValue:g,inputId:`${o}-input`,loadOptions:m,isLoading:v,noOptionsMessage:M||(()=>Q("select.no-options")),loadingMessage:A||(()=>Q("select.loading")),classNamePrefix:"select",components:e,isDisabled:_,isSearchable:$,menuIsOpen:V,openMenuOnFocus:y,openMenuOnClick:x,tabSelectsValue:w,onMenuClose:H,onMenuOpen:K,placeholder:j||"",isClearable:B,backspaceRemovesValue:!0,menuShouldScrollIntoView:!0,isMulti:D,hideSelectedOptions:!1,closeMenuOnSelect:F,blurInputOnSelect:L,menuPosition:"fixed",menuPlacement:"auto",inputIsHidden:G,required:c,theme:e=>({...e,colors:{...e.colors,primary:"#005aa3",danger:"#b50000",dangerLight:"#fceeee"}}),styles:{input:e=>({...e,gridTemplateColumns:"0fr"})}})})()]}),E&&(0,C.jsx)(Ww,{...E,id:X})]})}));s5.displayName="Select";const l5={"choice-group":"choice-group-7127bc4c","choice-group__inner--indented":"choice-group__inner--indented-095d03f8","choice-group__item--extra-padding":"choice-group__item--extra-padding-defa3089"},c5=s.createContext({name:"",inputType:"radio",onChange:()=>null,currentValue:[]}),u5=e=>{const{id:t,label:n,value:r,className:o,direction:i="column",disabled:a,colProps:l=("column"===i?{width:12}:{width:"auto",grow:1}),onChange:c,hideLabel:u,extraContent:d,tooltip:f}=e,{currentValue:p,inputType:h,name:g,onChange:m}=s.useContext(c5),v=!!p&&("checkbox"===h?r===p||-1!==p.indexOf(r):r===p);return(0,C.jsx)(zv,{...l,children:(0,C.jsx)(t5,{id:t,label:n,value:r,name:g,className:o,disabled:a,checked:v,onChange:(e,t)=>{null==m||m(e,t),null==c||c(e,t)},hideLabel:u,extraContent:d,tooltip:f})})},d5="radio-4b3e1d44",f5="radio--disabled-8a5be211",p5="radio__input-c3c0efa1",h5="radio__indicator-cb82800d",g5="radio__indicator--hover-a273c5aa",m5="radio__tooltip-icon-dc07bb33",v5="radio__extra-content-465c7a50",b5=e=>{const{id:t,label:n,value:r,className:o,disabled:i,onChange:a,hideLabel:l,extraContent:c,checked:u,defaultChecked:d,hover:f,name:p,tooltip:h,...g}=e,[m,v]=s.useState(d||!1),b=s.useRef(null),y=s.useMemo((()=>a&&typeof u<"u"?u:m),[a,m,u]),x=lc(d5,{[f5]:i});return(0,C.jsxs)("div",{"data-name":"radio",className:o,...g,children:[(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsxs)(zv,{width:"auto",children:[(0,C.jsx)("input",{id:t,value:r,name:p,type:"radio",disabled:i,checked:y,onChange:e=>{typeof u>"u"&&v(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:p5}),(0,C.jsx)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=b.current)?void 0:e.click()},className:lc(h5,{[g5]:f})})]}),(0,C.jsx)(zv,{children:(0,C.jsxs)("label",{ref:b,className:x,htmlFor:t,children:[(0,C.jsx)("span",{className:lc({"visually-hidden":l}),children:n}),h&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{name:"info",color:"brand",size:16,display:"inline",className:m5})}),(0,C.jsx)(h3,{children:h})]})]})})]}),c&&(0,C.jsx)("div",{className:v5,children:c})]})},y5=e=>{const{id:t,label:n,value:r,className:o,direction:i="column",disabled:a,colProps:l=("column"===i?{width:12}:{width:"auto",grow:1}),onChange:c,hideLabel:u,extraContent:d,tooltip:f}=e,{currentValue:p,inputType:h,name:g,onChange:m}=s.useContext(c5),v=!!p&&("checkbox"===h?r===p||-1!==p.indexOf(r):r===p);return(0,C.jsx)(zv,{...l,children:(0,C.jsx)(b5,{id:t,label:n,value:r,name:g,className:o,disabled:a,checked:v,onChange:(e,t)=>{null==m||m(e,t),null==c||c(e,t)},hideLabel:u,extraContent:d,tooltip:f})})},x5={"filter-item__input":"filter-item__input-7c8ed8cf","filter-item__label":"filter-item__label-057b50f5","filter-item--disabled":"filter-item--disabled-ad10dc42","filter-item--checked":"filter-item--checked-9af66168","filter-item--positive-main":"filter-item--positive-main-a40378b9","filter-item--important-main":"filter-item--important-main-f57d26aa","filter-item--warning-main":"filter-item--warning-main-5629af6e"},w5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i,background:a}=e,{currentValue:l,inputType:c,name:u,onChange:d}=s.useContext(c5),f=!!l&&("checkbox"===c?r===l||-1!==l.indexOf(r):r===l),p=lc(x5["filter-item"],null==i?void 0:i.className,{[x5["filter-item--disabled"]]:o},{[x5["filter-item--checked"]]:f},{[x5[`filter-item--${a}`]]:!!a});return(0,C.jsxs)(zv,{...i,className:p,children:[(0,C.jsx)("input",{id:t,value:r,name:u,type:c,disabled:o,checked:f,onChange:e=>d(r,null==e?void 0:e.target.checked),className:x5["filter-item__input"]}),(0,C.jsx)("label",{htmlFor:t,className:x5["filter-item__label"],children:n})]})},_5="light-item__input-db1bda86",S5="light-item__label-4502df50",k5="light-item--disabled-ea5955c3",E5="light-item--checked-19c9facc",C5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i}=e,{currentValue:a,inputType:l,name:c,onChange:u}=s.useContext(c5),d=!!a&&("checkbox"===l?r===a||-1!==a.indexOf(r):r===a),f=lc(null==i?void 0:i.className,{[k5]:o},{[E5]:d});return(0,C.jsxs)(zv,{...i,className:f,children:[(0,C.jsx)("input",{id:t,value:r,name:c,type:l,disabled:o,checked:d,onChange:e=>u(r,null==e?void 0:e.target.checked),className:_5}),(0,C.jsx)("label",{htmlFor:t,className:S5,children:n})]})},j5={"selector-item":"selector-item-afa6036a","selector-item__input":"selector-item__input-d671bb71","selector-item__label":"selector-item__label-15347301","selector-item--disabled":"selector-item--disabled-133d2c07","selector-item--checked":"selector-item--checked-3caf6414","selector-item--column":"selector-item--column-cb724fe9","selector-item--column-reverse":"selector-item--column-reverse-1d916d7a","selector-item--row":"selector-item--row-733fd28b","selector-item--row-reverse":"selector-item--row-reverse-89fd4a76"},O5=e=>{const{id:t,label:n,value:r,disabled:o,colProps:i,direction:a}=e,{currentValue:l,inputType:c,name:u,onChange:d}=s.useContext(c5),f=!!l&&("checkbox"===c?r===l||-1!==l.indexOf(r):r===l),p=lc(j5["selector-item"],null==i?void 0:i.className,j5[`selector-item--${a}`],{[j5["selector-item--disabled"]]:o},{[j5["selector-item--checked"]]:f});return(0,C.jsxs)(zv,{...i,className:p,children:[(0,C.jsx)("input",{id:t,value:r,name:u,type:c,disabled:o,checked:f,onChange:e=>{null==d||d(r,null==e?void 0:e.target.checked)},className:j5["selector-item__input"]}),(0,C.jsx)("label",{htmlFor:t,className:j5["selector-item__label"],children:n})]})},T5=e=>{const{getLabel:t}=jv(),{id:n,className:r,label:o,required:i,helper:a,items:l,type:c="default",direction:u=("default"===c?"column":"row"),rowProps:d,name:f,inputType:p="radio",value:h,defaultValue:g,onChange:m,hideLabel:v,indeterminateCheck:b,indeterminateCheckProps:y={},...x}=e,{indented:w,..._}=y,S=(null==y?void 0:y.indented)??!0,k=a?(null==a?void 0:a.id)??`${n}-helper`:void 0,E=b&&"default"===c&&"checkbox"===p,[j,O]=s.useState((()=>g||("checkbox"===p?[]:null))),T=(t=e.value)=>!!m&&typeof t<"u",I=T(h)?h:j,R=s.useMemo((()=>0===(null==I?void 0:I.length)),[null==I?void 0:I.length]),P=s.useMemo((()=>{var e;return(null==I?void 0:I.length)===(null==(e=null==l?void 0:l.filter((e=>!e.disabled)))?void 0:e.length)}),[null==I?void 0:I.length,l]),M=s.useMemo((()=>!R&&!P),[P,R]),A=s.useMemo((()=>{const e=P?"all":R?"none":"some";return"string"==typeof b?b:"function"==typeof b?b(e):b?t("all"===e?"table.filter.remove-all":"table.filter.select-all"):""}),[t,b,P,R]),D={name:f,inputType:p,onChange:(e,t)=>{let n=I;n="checkbox"===p&&n?Array.isArray(n)?t?[...n,e]:n.filter((t=>t!==e)):t?[n,e]:[n].filter((t=>t!==e)):e,T()||O(Array.isArray(n)?[...n]:n),null==m||m(n)},currentValue:I};let F,L,N=C5;switch(c){case"default":F=2,L=1,N="checkbox"===p?u5:y5;break;case"selector":F=0,L=0,N=O5;break;case"filter":F=2,L=2,N=w5;break;case"light":F=1,L=1,N=C5}const B=lc(l5["choice-group"],r),z=lc(l5["choice-group__inner"],null==d?void 0:d.className,{[l5["choice-group__inner--indented"]]:E&&S});return(0,C.jsx)(c5.Provider,{value:D,children:(0,C.jsxs)("fieldset",{"data-name":"choice-group",...x,className:B,id:n,name:f,"aria-describedby":k,children:[(0,C.jsx)("legend",{children:(0,C.jsx)(v_,{id:n,label:o,required:i,hideLabel:v,renderWithoutLabel:!0})}),null!=l&&l.length?(0,C.jsxs)(C.Fragment,{children:[E&&(0,C.jsx)(t5,{id:`${n}-indeterminate`,value:"indeterminate",name:"indeterminate",..._,label:A,indeterminate:M,checked:P,onChange:(e,t)=>{var n;const r=P?[]:null==(n=null==l?void 0:l.filter((e=>!e.disabled)))?void 0:n.map((e=>e.value));T()||O([...r]),null==m||m(r)}}),(0,C.jsx)(Bv,{direction:u,gutterX:F,gutterY:L,...d,className:z,children:l.map(((e,t)=>(0,s.createElement)(N,{...e,className:lc(e.className,{[l5["choice-group__item--extra-padding"]]:e.extraContent&&t!==l.length-1}),direction:u,key:e.id})))})]}):(0,C.jsx)("p",{children:t("table.filter.no-options")}),a&&(0,C.jsx)(Ww,{...a,id:k})]})})},I5={"toggle-wrapper":"toggle-wrapper-35cb3798",toggle:"toggle-b7a0206b","toggle--disabled":"toggle--disabled-086a40c0","toggle--active":"toggle--active-f8d436cc","toggle--ghost":"toggle--ghost-b8136f68",toggle__dot:"toggle__dot-6c85a2a2",toggle__icon:"toggle__icon-4a0f4e6c",toggle__spinner:"toggle__spinner-d4f2ba79","toggle--medium":"toggle--medium-ce9bfb2e","toggle--large":"toggle--large-acae3dd1","toggle--alternative":"toggle--alternative-07ba3fde",toggle__label:"toggle__label-cdb29c78","toggle__extra-content":"toggle__extra-content-4f8dda6c"},R5=(0,s.forwardRef)(((e,t)=>{const{ariaLabel:n,className:r,checked:o,defaultChecked:i,onChange:a,size:l=(e.icon?"large":"medium"),color:c="default",type:u,icon:d,disabled:f=!1,isLoading:p=!1,extraContent:h,label:g,...m}=e,[v,b]=s.useState(i||!1),y=s.useMemo((()=>a&&typeof o<"u"?o:v),[a,v,o]),x=lc(I5.toggle,I5[`toggle--${l}`],I5[`toggle--${c}`],{[I5["toggle--active"]]:y,[I5["toggle--disabled"]]:f,[I5[`toggle--${u}`]]:u},r),w=()=>{if(p)return;const e=!y;typeof o>"u"&&b(e),null==a||a(e)},_={noStyle:!0,type:"button","aria-label":n,"aria-pressed":y,disabled:f,"aria-disabled":p,...m,onClick:w};return(0,C.jsxs)("div",{className:I5["toggle-wrapper"],children:[(0,C.jsx)(q2,{..._,onClick:e=>{var t;null==(t=null==m?void 0:m.onClick)||t.call(m,e),w()},ref:t,"data-name":"toggle",className:x,children:(0,C.jsx)("span",{className:I5.toggle__dot,children:p?(0,C.jsx)(Tv,{size:"large"===l?16:10,className:lc(I5.toggle__icon,I5.toggle__spinner)}):d?(0,C.jsx)(H2,{className:I5.toggle__icon,name:y?"lock_open_right":"lock",size:16}):null})}),g&&(0,C.jsx)(q2,{..._,className:I5.toggle__label,"aria-hidden":!0,tabIndex:-1,children:g}),h&&(0,C.jsx)("div",{className:I5["toggle__extra-content"],children:h})]})}));R5.displayName="Toggle";const P5={table:"table-95e2ce2d","th--sortable":"th--sortable-e9907825",sort__button:"sort__button-98f3f530",sort__icon:"sort__icon-1c37fdff",filter__icon:"filter__icon-a6408ada","sort__icon--active":"sort__icon--active-ed6767d3","filter__icon--active":"filter__icon--active-d14db408","sort__icon--asc":"sort__icon--asc-9ed20154","sort__icon--desc":"sort__icon--desc-24ef5b2b","table__row--border-hidden":"table__row--border-hidden-35904e21","table__row--clickable":"table__row--clickable-43b04ec0","table--vertical-align-base-line":"table--vertical-align-base-line-85bbb2f6","table--hidden-bottom-border":"table--hidden-bottom-border-4334c76e","table--footer-bottom-border":"table--footer-bottom-border-d33045fd","table--small":"table--small-1ae7cbce",table__expand:"table__expand-19801588","table__row--group-header":"table__row--group-header-70657dcd","table__row--group-item":"table__row--group-item-d18f21ab","table__row--last-group-item":"table__row--last-group-item-7b3a8250",filter__content:"filter__content-e28d0f6a",filter__button:"filter__button-0c3bdad8",filter__indeterminate:"filter__indeterminate-f266331a","sticky-column":"sticky-column-c4a00eca","sticky-column--left":"sticky-column--left-4e599e4b","sticky-column--right":"sticky-column--right-3dfd1c9b"};function M5(e="row-selection",t){return{id:e,header:({table:n})=>t?(0,C.jsx)(Ev.Consumer,{children:({getLabel:t})=>{const r=t("table.select-all"),o="string"==typeof r?r:r(n.getIsAllRowsSelected());return(0,C.jsx)(t5,{id:`${e}-header`,label:o,hideLabel:!0,value:"row-expander-header",name:`${e}-header`,checked:n.getIsAllRowsSelected(),indeterminate:n.getIsSomeRowsSelected(),onChange:()=>n.toggleAllRowsSelected()})}}):null,cell:({row:t})=>(0,C.jsx)(Ev.Consumer,{children:({getLabel:n})=>{const r=n("table.select-row"),o="string"==typeof r?r:r(t.getIsSelected());return t.getCanSelect()?(0,C.jsx)(t5,{id:`${e}-${t.id}`,name:`${e}-${t.id}`,label:o,hideLabel:!0,value:`${e}-${t.id}`,checked:t.getIsSelected(),onChange:()=>t.toggleSelected()}):null}}),size:18,maxSize:18,minSize:18}}const A5=(e,t)=>"string"!=typeof t&&"number"!=typeof t||(null==e?void 0:e.toLowerCase().includes(String(t).toLowerCase())),D5=(e,t)=>e===t,F5=(e,t)=>null==e?void 0:e.some((e=>e===t)),L5=(e,t)=>{const n=t?Sc(t):null,r=null!=e&&e.from?Sc(e.from):null,o=null!=e&&e.to?Sc(e.to):null;return!((r||o)&&!n)&&(r&&!o?r.isSameOrBefore(n,"day"):!r&&o?o.isSameOrAfter(n,"day"):!r||!o||r.isSameOrBefore(n,"day")&&o.isSameOrAfter(n,"day"))},N5=(e,t)=>{if("object"!=typeof t||!Object.keys(t).includes("from")||!Object.keys(t).includes("to"))return console.error("Accessor function should return an object { from: Dayjs | Date | string | null | undefined, to: Dayjs | Date | string | null | undefined }"),!0;const n=t,r=null!=e&&e.from?Sc(e.from):null,o=null!=e&&e.to?Sc(e.to):null,i=null==n?void 0:n.from,a=null==n?void 0:n.to;return r&&o?i&&a?r.isSameOrBefore(i,"day")&&o.isSameOrAfter(i,"day")||o.isSameOrAfter(a,"day")&&r.isSameOrBefore(a,"day"):i?r.isSameOrBefore(i,"day")&&o.isSameOrAfter(i,"day"):!!a&&(r.isSameOrBefore(a,"day")&&o.isSameOrAfter(a,"day")):r&&!o?a?r.isSameOrBefore(a,"day"):!!i&&r.isSameOrBefore(i,"day"):!(!r&&o)||(i?o.isSameOrAfter(i,"day"):!!a&&o.isSameOrAfter(a,"day"))},B5=(e,t,n,r)=>{var o;return r(n,null==(o=null==e?void 0:e.getValue)?void 0:o.call(e,t))},z5=s.createContext({isLoading:!1,isError:!1,table:null,id:"",hideRowBorder:!1}),$5={pagination__wrapper:"pagination__wrapper-017154aa",pagination__pages:"pagination__pages-29b0da46",pagination__page:"pagination__page-8588d7aa","pagination__page--current":"pagination__page--current-db7cb2cd","pagination__arrow-item":"pagination__arrow-item-e073424c",pagination__arrow:"pagination__arrow-f7602a28"},V5=({type:e})=>{const{table:t}=s.useContext(z5),{getLabel:n}=jv(),{getCanPreviousPage:r,getCanNextPage:o,nextPage:i,previousPage:a,toggleAllRowsExpanded:l}=t,c="next"===e;return(0,C.jsx)("li",{className:$5["pagination__arrow-item"],children:(0,C.jsxs)("button",{type:"button",className:$5.pagination__arrow,disabled:c?!o():!r(),onClick:()=>{c?i():a(),l(!1)},children:[(0,C.jsx)("span",{className:"visually-hidden",children:n(`pagination.${c?"next":"prev"}-page`)}),(0,C.jsx)(H2,{name:c?"arrow_forward":"arrow_back",size:16})]})})},H5=({item:e})=>{const{table:t}=s.useContext(z5),{getLabel:n}=jv(),r=n("pagination.page"),{setPageIndex:o,toggleAllRowsExpanded:i}=t,a=e.page||0;return(0,C.jsx)("li",{children:(0,C.jsx)("button",{...e,type:"button",className:lc($5.pagination__page,{[$5["pagination__page--current"]]:e.selected}),"aria-label":"string"==typeof r?r:r(a,e.selected),onClick:()=>{o(a-1),i(!1)},children:a})})},K5=e=>{const{getLabel:t}=jv(),{table:n,id:r}=s.useContext(z5),o=t("pagination.results"),{setPageSize:i,getState:a,getPageCount:l}=n,{pageIndex:c,pageSize:u}=a().pagination,d=[{value:"5",label:"5"},{value:"10",label:"10"},{value:"20",label:"20"},{value:"50",label:"50"},{value:"100",label:"100"}],f=Math.ceil(e.totalRows/u),{paginationItems:p}=(e=>{const{boundaryCount:t=1,count:n=5,page:r,siblingCount:o=1}=e,i=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},a=i(1,Math.min(t,n)),s=i(Math.max(n-t+1,t+1),n),l=Math.max(Math.min(r-o,n-t-2*o-1),t+2),c=Math.min(Math.max(r+o,t+2*o+2),s.length>0?s[0]-2:n-1),u=["previous",...a,...l>t+2?["ellipsis"]:t+1<n-t?[t+1]:[],...i(l,c),...c<n-t-1?["ellipsis"]:n-t>t?[n-t]:[],...s,"next"],d=e=>{switch(e){case"previous":return r-1;case"next":return r+1;default:return null}};return{paginationItems:u.map((e=>"number"==typeof e?{type:"page",page:e,selected:e===r,"aria-current":e===r?"true":void 0}:{type:e,page:d(e),selected:!1}))}})({page:c+1,count:f}),h=d.find((e=>e.value===String(u)))??{value:String(u),label:String(u)};return(0,C.jsxs)("div",{className:$5.pagination__wrapper,children:[(0,C.jsxs)(z2,{color:"muted",modifiers:"small",children:[e.totalRows," ","string"==typeof o?o:o(e.totalRows)]}),l()>1&&(0,C.jsx)("nav",{role:"navigation","aria-label":t("pagination.title"),className:$5.pagination,children:(0,C.jsx)("ul",{className:$5.pagination__pages,children:p.map(((e,t)=>((e,t)=>"previous"===e.type||"next"===e.type?(0,C.jsx)(V5,{type:e.type},t):"ellipsis"===e.type?(0,C.jsx)("li",{className:lc($5.pagination__page),children:"..."},t):(0,C.jsx)(H5,{item:e},t))(e,t)))})}),(0,C.jsx)(s5,{id:`page-size-${r}`,label:t("pagination.page-size"),hideLabel:!0,isSearchable:!1,isClearable:!1,onChange:e=>(e=>{const t=parseInt((null==e?void 0:e.value)||"10");i(t)})(e),value:h,size:"small",options:d})]})},U5=e=>{const{icon:t="spa",className:n,children:r,cardProps:o,isNested:i,rowProps:a,...l}=e,c=L2(["mobile","tablet"]),{padding:u=(i?0:c?1:1.5),background:d=(i?void 0:c?"bg-subtle":"white"),...f}=o??{};return(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)(r3,{"data-name":"placeholder",...l,className:n,borderless:i,padding:u,background:d,...f,children:(0,C.jsx)(i3,{children:(0,C.jsxs)(Bv,{direction:"column",alignItems:"center",gutter:2,...a,children:[t&&(0,C.jsx)(zv,{width:"auto",children:(e=>{const t={size:36,className:lc("text-primary")},n="string"==typeof e?{...t,name:e}:"object"!=typeof e||s.isValidElement(e)?void 0:{...t,...e,className:lc(t.className,null==e?void 0:e.className)};return n?(0,C.jsx)(H2,{...n}):e})(t)}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(z2,{color:"muted",modifiers:"center",element:"div",children:r})})]})})})})},G5=s.createContext({column:null,rows:null,values:null,open:!1,setOpen:null}),W5=()=>{var e,t,n,r,o;const{getLabel:i}=jv(),{column:a,open:l,setOpen:c,values:u}=s.useContext(G5),d={dateRangeField:null==u?void 0:u.dateRange},f=null==(e=null==a?void 0:a.columnDef)?void 0:e.meta,p=(null==f?void 0:f.startDatePicker)??{},h=(null==f?void 0:f.endDatePicker)??{},g=i("table.filter"),m=i("table.filter.from"),v=i("table.filter.to"),b=`filter-date-${null==a?void 0:a.id}-from`,y=`filter-date-${null==a?void 0:a.id}-to`,x=i("table.filter.validation.to-before-from"),w=P1().shape({dateRangeField:P1().shape({from:w1().defined().nullable(),to:w1().defined().nullable().test("to-before-from",x,(function(e){const{from:t}=this.parent;return!(e&&t&&Sc(e).isBefore(Sc(t),"day"))}))})}),{values:_,errors:S,setFieldValue:k,handleReset:E,handleSubmit:j}=s0({initialValues:d,validationSchema:w,onSubmit:e=>{null==a||a.setFilterValue(e.dateRangeField),null==c||c(!1)},onReset:()=>{null==a||a.setFilterValue(""),null==c||c(!1)}});return s.useEffect((()=>{var e;if(l&&!_.dateRangeField){const t=document.getElementById(b);null==(e=null==t?void 0:t.focus)||e.call(t,{preventScroll:!0})}}),[null==a?void 0:a.id,_.dateRangeField,l,b]),(0,C.jsx)("form",{onSubmit:j,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)(z2,{modifiers:"h5",children:g}),(0,C.jsx)(H3,{id:b,label:m,...p,name:m,value:null!=(t=_.dateRangeField)&&t.from?Sc(_.dateRangeField.from):null,input:{autoComplete:"off"},onChange:e=>{var t,n;k("dateRangeField.from",(null==e?void 0:e.toISOString())??null),e&&null!=(t=_.dateRangeField)&&t.to&&Sc(e).isAfter(Sc(null==(n=_.dateRangeField)?void 0:n.to),"day")&&k("dateRangeField.to",null)}}),(0,C.jsx)(H3,{id:y,label:v,shouldDisableDate:e=>{var t,n;return!(null==(t=_.dateRangeField)||!t.from||!Sc(e).isBefore(Sc(null==(n=_.dateRangeField)?void 0:n.from),"day"))},...h,name:v,value:null!=(n=_.dateRangeField)&&n.to?Sc(null==(r=_.dateRangeField)?void 0:r.to):null,input:{autoComplete:"off"},onChange:e=>k("dateRangeField.to",(null==e?void 0:e.toISOString())??null),helper:null!=(o=S.dateRangeField)&&o.to?{text:S.dateRangeField.to,type:"error"}:void 0}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:E,children:i("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:i("table.filter")})})]})]})})},q5=e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.filter(Boolean))?void 0:t.filter(((e,t,n)=>(null==n?void 0:n.indexOf(e))===t)))?void 0:n.sort(((e,t)=>{var n;return"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?null==(n=null==e?void 0:e.localeCompare)?void 0:n.call(e,t):0}))},Y5=()=>{var e,t,n,r;const{getLabel:o}=jv(),{column:i,rows:a,setOpen:l,values:c}=s.useContext(G5),u=o("table.filter"),d=null==(e=null==i?void 0:i.columnDef)?void 0:e.filterFn,f="select"===d?"selectFilter":"multiSelectFilter",p={inputType:d,selectFilter:null==c?void 0:c.selectField,multiSelectFilter:null==c?void 0:c.multiSelectField},h=null==(t=null==i?void 0:i.columnDef)?void 0:t.meta,g=null==h?void 0:h.filterOptions,m=e=>"object"==typeof e&&null!==e&&"id"in e&&"label"in e&&"value"in e,v=null!=a&&a.length&&"string"==typeof(null==(n=null==i?void 0:i.columnDef)?void 0:n.id)?a.map((e=>{var t,n;return null==(n=null==e?void 0:e.getValue)?void 0:n.call(e,null==(t=null==i?void 0:i.columnDef)?void 0:t.id)})):[],b=null!=g&&g.length?m(g[0])?g:q5(g):q5(v),y=null==b?void 0:b.map(((e,t)=>{var n;return m(e)?e:{id:`${null==(n=null==i?void 0:i.columnDef)?void 0:n.id}-choice-${t}`,label:String(e),value:String(e)}})),{values:x,setFieldValue:w,handleReset:_,handleSubmit:S,errors:k}=s0({initialValues:p,onSubmit:e=>{var t;null==i||i.setFilterValue(null!=(t=e[f])&&t.length?e[f]:""),null==l||l(!1)},onReset:()=>{null==i||i.setFilterValue(""),null==l||l(!1)}});return(0,C.jsx)("form",{onSubmit:S,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)($2,{element:"h6",children:o("table.filter")}),(0,C.jsx)(r3,{className:P5.filter__content,children:(0,C.jsx)(i3,{children:(0,C.jsx)(T5,{id:`filter-${f}-${null==i?void 0:i.id}`,name:u,label:u,hideLabel:!0,inputType:"select"===d?"radio":"checkbox",size:"small",value:x[f],indeterminateCheck:!0,indeterminateCheckProps:{indented:!1,className:P5.filter__indeterminate},items:y,onChange:e=>w(f,e),helper:0!==(null==(r=k[f])?void 0:r.length)?{text:k[f],type:"error"}:{text:""}})})}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:_,children:o("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:o("table.filter")})})]})]})})},J5=()=>{const{getLabel:e}=jv(),{column:t,open:n,setOpen:r,values:o}=s.useContext(G5),i={filter:null==o?void 0:o.filter},a=`text-filter-${null==t?void 0:t.id}`,l=e("table.filter"),c=e("search"),u=e("table.filter.validation.min-length"),d="string"==typeof u?u:u(3),f=P1().shape({filter:w1().notRequired().matches(/^(?!\s+$).*/,e("table.filter.validation.no-spaces")).min(3,d).nullable().transform((e=>e||null))}),{values:p,setFieldValue:h,handleReset:g,handleSubmit:m,touched:v,errors:b}=s0({initialValues:i,validationSchema:f,onSubmit:e=>{null==t||t.setFilterValue(e.filter),null==r||r(!1)},onReset:()=>{null==t||t.setFilterValue(""),null==r||r(!1)}});return s.useEffect((()=>{var e;if(n&&!p.filter){const t=document.getElementById(a);null==(e=null==t?void 0:t.focus)||e.call(t,{preventScroll:!0})}}),[null==t?void 0:t.id,p.filter,n,a]),(0,C.jsx)("form",{onSubmit:m,children:(0,C.jsxs)(Kv,{children:[(0,C.jsx)(y_,{id:a,label:l,placeholder:c,icon:"close",onIconClick:g,value:p.filter||"",onChange:e=>h("filter",e),helper:v.filter&&b.filter?{text:b.filter,type:"error"}:{text:d},input:{autoComplete:"off"}}),(0,C.jsxs)(Bv,{gutter:2,justifyContent:"end",children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{visualType:"secondary",onClick:g,children:e("clear")})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(q2,{type:"submit",children:e("table.filter")})})]})]})})},X5=e=>{const{column:t,rows:n}=e,[r,o]=s.useState(!1),{getLabel:i}=jv(),a=t.columnDef.filterFn,l=t.getFilterValue(),c=e=>"string"==typeof e,u=e=>Array.isArray(e),d=e=>"object"==typeof e&&null!==e&&("from"in e||"to"in e),f=s.useMemo((()=>({filter:"auto"!==a&&"text"!==a||!c(l)?"":l,selectField:"select"===a&&c(l)?l:"",multiSelectField:"multi-select"===a&&u(l)?l:[],dateRange:["date-range","date-range-period"].includes(a)&&d(l)?l:{from:null,to:null}})),[a,l]);return(0,C.jsx)(G5.Provider,{value:{column:t,rows:n,values:f,open:r,setOpen:o},children:(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(p3,{openWith:"click",open:r,onToggle:o,focusManager:{order:["content"],initialFocus:0,modal:!0},children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{visualType:"link",icon:{name:"filter_alt",className:lc(P5.filter__icon,{[P5["filter__icon--active"]]:!!t.getFilterValue()||r})},className:lc(P5.filter__button,"show-print"),children:(0,C.jsx)("span",{className:"sr-only",children:i("table.filter")})})}),(0,C.jsx)(h3,{maxWidth:"large",cardProps:{padding:{horizontal:1,vertical:.5}},children:(()=>{switch(a){case"date-range":case"date-range-period":return(0,C.jsx)(W5,{});case"multi-select":case"select":return(0,C.jsx)(Y5,{});default:return(0,C.jsx)(J5,{})}})()})]})})})},Z5=()=>{const{table:e,loadingLabel:t}=s.useContext(z5),n=(null==e?void 0:e.getState().pagination.pageSize)||10,r=n===e4?10:n;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("tr",{className:"sr-only",children:(0,C.jsx)("td",{children:t})}),Array.from(Array(r).keys()).map((t=>(0,C.jsx)("tr",{"aria-hidden":!0,children:Array.from(Array(null==e?void 0:e.getAllColumns().length).keys()).map((e=>(0,C.jsx)("td",{children:(0,C.jsx)(Hw,{width:100,height:21})},e)))},t)))]})},Q5=()=>{var e;const{getLabel:t}=jv(),{table:n,id:r,caption:o,renderSubComponent:i,isFooterVisible:a,renderGroupHeading:l,onRowClick:c,isLoading:u,isError:d,hideRowBorder:f,placeholder:p,errorPlaceholder:h,size:g}=s.useContext(z5);if(null===n)return null;const{getHeaderGroups:m,getFooterGroups:v,getRowModel:b}=n,y=t("table.sort"),x=(e,t)=>{const n=lc(P5.sort__icon,{[P5["sort__icon--active"]]:!!e,[P5["sort__icon--desc"]]:"desc"===e,[P5["sort__icon--asc"]]:"asc"===e});return(0,C.jsx)(tu,{visibility:"show",children:(0,C.jsx)(q2,{visualType:"link",icon:{name:e?"expand_more":"unfold_more",className:n},className:lc(P5.sort__button),onClick:t,children:(0,C.jsx)("span",{className:"sr-only",children:"string"==typeof y?y:y(e)})})})},w=e=>{const t=null==e?void 0:e.findIndex((e=>e.column.columnDef.footer));return(-1!==t?t:null==e?void 0:e.length)+1},_=()=>{let e;return b().rows.map(((t,n)=>{const{rowGroupKey:r,...o}=t.original,i=r=>{var o;return{...t,original:{...r,rowClassName:lc(r.rowClassName,P5["table__row--group-item"],{[P5["table__row--last-group-item"]]:(null==(o=b().rows[n+1])?void 0:o.original.rowGroupKey)!==e})}}};return r&&e!==r?(e=r,i(t.original)):r?i(o):(e=r,t)}))},S=e=>{var t;return(0,C.jsx)(zv,{width:"auto",children:(0,C.jsxs)(Bv,{justifyContent:"end",alignItems:"center",gutter:1,children:[e.column.getCanFilter()?(0,C.jsx)(X5,{column:e.column,rows:null==(t=null==n?void 0:n.getCoreRowModel())?void 0:t.rows}):null,e.column.getCanSort()&&(0,C.jsx)(zv,{align:"center",width:"auto",children:x(e.column.getIsSorted(),e.column.getToggleSortingHandler())})]})})},k=e=>{var t;const n=e.original.CustomRowComponent;return(0,C.jsxs)(s.Fragment,{children:[e.original.rowGroupKey&&(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsx)("tr",{className:lc(null==(t=e.original.rowClassName)?void 0:t.replace(P5["table__row--group-item"],"").replace(P5["table__row--last-group-item"],""),P5["table__row--group-header"],{[P5["table__row--border-hidden"]]:f}),children:l?l(e):(0,C.jsx)("td",{colSpan:e.getVisibleCells().length,children:e.original.rowGroupKey})})}),n?(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)(n,{...e})}):(0,C.jsx)(tu,{breakInside:"avoid",children:(0,C.jsx)("tr",{className:lc(e.original.rowClassName,{[P5["table__row--clickable"]]:!!e.original.onClick||!!c,[P5["table__row--border-hidden"]]:f}),onClick:()=>(e=>{var t,n;null==(n=(t=e.original).onClick)||n.call(t,e.original),null==c||c(e.original)})(e),children:e.getVisibleCells().map((e=>(0,C.jsx)("td",{style:{width:e.column.getSize()},className:lc({[P5["sticky-column"]]:e.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===e.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===e.column.getIsPinned()}),children:pX(e.column.columnDef.cell,e.getContext())},e.id)))})}),e.getIsExpanded()&&i?(0,C.jsx)(tu,{breakBefore:"avoid",children:null==i?void 0:i(e)}):null]},e.id)};return(0,C.jsxs)("table",{id:r,children:[o&&(0,C.jsx)("caption",{className:"sr-only",children:o}),(0,C.jsx)("thead",{children:m().map((e=>(0,C.jsx)("tr",{children:e.headers.map((e=>(0,C.jsx)("th",{scope:"col",style:{width:e.getSize()},className:lc({[P5["th--sortable"]]:e.column.getCanSort(),[P5["sticky-column"]]:e.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===e.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===e.column.getIsPinned()}),"aria-sort":"asc"===e.column.getIsSorted()?"ascending":"desc"===e.column.getIsSorted()?"descending":void 0,children:e.isPlaceholder?null:(0,C.jsxs)(Bv,{gutter:"small"===g?2:void 0,alignItems:"center",justifyContent:"between",wrap:"nowrap",children:[(0,C.jsx)(zv,{onClick:e.column.getToggleSortingHandler(),children:pX(e.column.columnDef.header,e.getContext())}),(e.column.getCanFilter()||e.column.getCanSort())&&S(e)]})},e.id)))},e.id)))}),(0,C.jsx)("tbody",{children:u?(0,C.jsx)(Z5,{}):null!=(e=_())&&e.length?_().map((e=>k(e))):(()=>{const e=d?(0,C.jsx)(U5,{...h}):(0,C.jsx)(U5,{...p});return(0,C.jsx)("tr",{children:(0,C.jsx)("td",{colSpan:null==n?void 0:n.getAllColumns().length,children:e})})})()}),a&&(0,C.jsx)("tfoot",{children:v().map((e=>(0,C.jsx)("tr",{children:e.headers.map(((t,n)=>t.column.columnDef.footer?(0,C.jsx)("th",{scope:"col",colSpan:w(e.headers.slice(n+1)),className:lc({[P5["sticky-column"]]:t.column.getIsPinned(),[P5["sticky-column--left"]]:"left"===t.column.getIsPinned(),[P5["sticky-column--right"]]:"right"===t.column.getIsPinned()}),children:t.isPlaceholder?null:pX(t.column.columnDef.footer,t.getContext())},t.id):null))},e.id)))})]})},e4=1e4,t4=[];function n4(e){const{getLabel:t}=jv(),{id:n,data:r,columns:o,caption:i,columnFilters:a,onColumnFiltersChange:l,cardProps:{padding:c=0,...u}={},hidePagination:d,defaultPagination:f={pageIndex:0,pageSize:d?e4:10},pagination:p,manualPagination:h=!!e.pagination,manualSorting:g=!!e.sorting,manualFiltering:m=!!e.columnFilters,sorting:v,defaultSorting:b=[],defaultExpanded:y={},autoResetPageIndex:x,onPaginationChange:w,onSortingChange:_,rowSelection:S,onRowSelectionChange:k,enableRowSelection:E,defaultColumnVisibility:j={},columnVisibility:O,onColumnVisibilityChange:T,columnPinning:I,onColumnPinningChange:R,getRowId:P,onRowClick:M,defaultRowSelection:A,totalRows:D,renderSubComponent:F,getRowCanExpand:L,groupRowsBy:N,renderGroupHeading:B,isLoading:z=!1,isError:$=!1,placeholder:V,errorPlaceholder:H,loadingLabel:K=t("table.loading"),verticalAlign:U="middle",enableFilters:G=!1,enableSorting:W=!0,hideRowBorder:q=!1,size:Y="medium",hideCardBorder:J,...X}=e,Z=s.useMemo((()=>(null!=r&&r.length?r:t4)??t4),[r]),Q=au(),[{pageIndex:ee,pageSize:te},ne]=s.useState(f),[re,oe]=s.useState(b),[ie,ae]=s.useState(y),[se,le]=s.useState(A||{}),[ce,ue]=s.useState([]),[de,fe]=s.useState(j),[pe,he]=s.useState({left:[],right:[]}),ge=s.useMemo((()=>!!Q||ie),[ie,Q]),me=s.useMemo((()=>p||{pageIndex:ee,pageSize:te}),[ee,te,p]),ve=s.useMemo((()=>v||re),[re,v]),be=s.useMemo((()=>a||ce),[ce,a]),ye=s.useMemo((()=>S||se),[se,S]),xe=s.useMemo((()=>O||de),[de,O]),we=s.useMemo((()=>I||pe),[pe,I]),_e=s.useMemo((()=>{const e=(null==Z?void 0:Z.map((e=>"string"==typeof N?{...e,rowGroupKey:e[N]}:N?{...e,rowGroupKey:N(e)}:e)))??[];return e.reduce(((t,n)=>(n.rowGroupKey&&t.keys.includes(n.rowGroupKey)||(n.rowGroupKey?(t.keys=[...t.keys,n.rowGroupKey],t.list=[...t.list,...e.filter((e=>e.rowGroupKey===n.rowGroupKey))]):t.list=[...t.list,n]),t)),{keys:[],list:[]}).list}),[Z,N]),Se=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=s.useState((()=>({current:uX(t)}))),[r,o]=s.useState((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:_e,columns:o,state:{rowSelection:ye,columnFilters:be,pagination:me,sorting:ve,expanded:ge,columnVisibility:xe,columnPinning:we},manualSorting:g,manualFiltering:m,pageCount:p&&D?Math.ceil(D/p.pageSize):void 0,autoResetPageIndex:x,onRowSelectionChange:e=>{if("function"!=typeof e)return;const t=e(ye);S&&k?k(t):le(t)},enableRowSelection:E,onExpandedChange:ae,onPaginationChange:e=>{if("function"!=typeof e)return;const t=e(me);p&&w?w(t):ne(t)},onSortingChange:e=>{if("function"!=typeof e)return;const t=e(ve);v&&_?_(t):oe(t)},onColumnFiltersChange:e=>{if("function"!=typeof e)return;const t=e(be);a&&l?l(t):ue(t)},onColumnVisibilityChange:e=>{if("function"!=typeof e)return;const t=e(xe);O&&T?T(t):fe(t)},onColumnPinningChange:e=>{if("function"!=typeof e)return;const t=e(we);I&&R?R(t):he(t)},getCoreRowModel:e=>vJ((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;l<t.length;l++){const c=SJ(e,e._getRowId(t[l],l,i),t[l],l,o,0,null==i?void 0:i.id);var s;n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=c.originalSubRows)&&s.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return a};return n.rows=r(t),n}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>vJ((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r<i.length;r+=1){var n;const o=i[r],s=a[o.id],l=s.sortUndefined,c=null!=(n=null==o?void 0:o.desc)&&n;let u=0;if(l){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;u=n&&r?0:n?l:-l}}if(0===u&&(u=s.sortingFn(e,t,o.id)),0!==u)return c&&(u*=-1),s.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>vJ((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:i,flatRows:a,rowsById:s}=n;const l=r*o,c=l+r;let u;i=i.slice(l,c),u=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:s}:dX({rows:i,flatRows:a,rowsById:s}),u.flatRows=[];const d=e=>{u.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return u.rows.forEach(d),u}),bJ(e.options,"debugTable")),getFilteredRowModel:e=>vJ((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach((t=>{var n;const r=e.getColumn(t.id);if(!r)return;const i=r.getFilterFn();i&&o.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value})}));const a=(n??[]).map((e=>e.id)),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,u;r&&s&&l.length&&(a.push("__global__"),l.forEach((e=>{var t;i.push({id:e.id,filterFn:s,resolvedValue:null!=(t=null==s.resolveFilterValue?void 0:s.resolveFilterValue(r))?t:r})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){c=o[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){u=i[e];const t=u.id;if(u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return fX(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[t]])return!1;return!0}),e)}),bJ(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getExpandedRowModel:e=>vJ((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?dX(t):t),bJ(e.options,"debugTable")),getRowCanExpand:L,getSubRows:e=>e.subRows,manualPagination:h,enableFilters:G,enableSorting:W,getRowId:P,filterFns:{text:(e,t,n)=>B5(e,t,n,A5),select:(e,t,n)=>B5(e,t,n,D5),"multi-select":(e,t,n)=>B5(e,t,n,F5),"date-range":(e,t,n)=>B5(e,t,n,L5),"date-range-period":(e,t,n)=>B5(e,t,n,N5)}}),ke=!!Se.getFooterGroups().find((e=>!!e.headers.find((e=>e.column.columnDef.footer)))),Ee=!(J||!d||ke),Ce=!q&&ke&&!d,je=lc(P5.table,P5[`table--vertical-align-${U}`],P5[`table--${Y}`],{[P5["table--hidden-bottom-border"]]:Ee,[P5["table--footer-bottom-border"]]:Ce}),Oe=(e,n)=>{const{children:r=t(`table.${e}`),isNested:o=!0,icon:i=("error"===e?"error":void 0),cardProps:{padding:a=1,...s}={},...l}=n||{cardProps:{}};return{children:r,isNested:o,icon:i,cardProps:{padding:a,...s},...l}};return(0,C.jsx)(z5.Provider,{value:{table:Se,id:n,caption:i,onRowClick:M,renderSubComponent:F,isFooterVisible:ke,renderGroupHeading:B,placeholder:Oe("empty",V),errorPlaceholder:Oe("error",H),loadingLabel:K,isLoading:z,isError:$,hideRowBorder:q,size:Y},children:(0,C.jsx)(r3,{"data-name":"table",...X,borderless:J,padding:c,...u,children:(0,C.jsxs)(i3,{children:[(0,C.jsx)("div",{className:je,children:(0,C.jsx)(Q5,{})}),!d&&Se&&(0,C.jsx)(K5,{totalRows:D||Se.getFilteredRowModel().rows.length})]})})})}s.createContext({openItems:void 0,showIcons:void 0}),s.createContext({currentTab:"",setCurrentTab:()=>null}),s.createContext({onItemOpen:()=>null}),s.createContext({index:0,title:null});const r4={"accordion__item-wrapping-heading":"accordion__item-wrapping-heading-45345260","accordion__item-header":"accordion__item-header-26962561","accordion__item--open":"accordion__item--open-52bf4ec2",accordion__item:"accordion__item-c7a360bc","accordion__item--disabled":"accordion__item--disabled-ca60e759","accordion__item-content":"accordion__item-content-4c915498"},o4=s.createContext({isOpen:()=>!0,onToggle:()=>null}),i4=e=>{const{children:t,className:n,openItem:r,gutter:o=.5,onToggleItem:i,defaultOpenItem:a=[],...l}=e,c=r||a,[u,d]=s.useState(c);return(0,C.jsx)(o4.Provider,{value:{isOpen:e=>(i&&typeof r<"u"?r:u).includes(e),onToggle:t=>{if(i)return i(t);((t=e.openItem)=>!!i&&typeof t<"u")(r)||d((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))}},children:(0,C.jsx)("div",{"data-name":"accordion",...l,className:lc(r4.accordion,n),children:(0,C.jsx)(Kv,{size:o,children:t})})})},a4=s.createContext({id:"",disabled:!1}),s4=e=>{const{children:t,className:n,id:r,disabled:o=!1,borderType:i,selected:a=!1,border:l="border-default",...c}=e,{onToggle:u,isOpen:d}=s.useContext(o4),f=lc(r4.accordion__item,n,{[r4["accordion__item--disabled"]]:o,[r4["accordion__item--open"]]:d(r)}),p=a||"primary"===i?"primary-main":l;return(0,C.jsx)(a4.Provider,{value:{id:r,disabled:o},children:(0,C.jsx)(A1,{id:r,onMatch:e=>{o||u(e)},children:(0,C.jsx)(r3,{"data-name":"accordion-item",border:p,className:f,...c,children:t})})})},l4=e=>{const{children:t,className:n,...r}=e,{isOpen:o}=s.useContext(o4),{id:i,disabled:a}=s.useContext(a4),l=au(),c=lc(r4["accordion__item-content"],n),u=(0,C.jsx)(i3,{"data-name":"accordion-item-content",...r,className:c,children:t});return l&&!a?u:(0,C.jsx)(Dv,{duration:300,height:o(i)?"auto":0,role:"region","aria-labelledby":i,id:`${i}-content`,children:u})},c4="toggle--open-31d6b84d",u4="toggle--close-8f1101e9",d4=({openText:e,closeText:t,isOpen:n,iconRight:r,...o})=>{const i=lc({[c4]:n},{[u4]:!n},null==r?void 0:r.className);return(0,C.jsx)(q2,{"data-name":"button",iconRight:{...r,className:i,name:"expand_more"},...o,children:n?t:e})},f4=e=>{var t;const{children:n,className:r,background:o="white",openText:i,closeText:a,...l}=e,[c,u]=s.useState(!1),{onToggle:d,isOpen:f}=s.useContext(o4),{id:p,disabled:h}=s.useContext(a4),g=()=>{h||d(p)},m=e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),g())},v=e=>{h||u(e)},b=lc(r4["accordion__item-header"],r),y=1===(null==(t=s.Children.toArray(n))?void 0:t.length)?s.Children.toArray(n).find((e=>s.isValidElement(e)&&(e.type===$2||e.type===z2&&["h1","h2","h3","h4","h5","h6"].includes(e.props.element)))):void 0,x=s.useMemo((()=>{switch(o){case"primary":return f(p)?"primary-active":"primary-main";case"white/primary":return f(p)?"primary-active":"white";case"muted/primary":return f(p)?"primary-active":"bg-muted";default:return o}}),[o,p,f]),w="white"===x||"bg-muted"===x?void 0:"inverted",_=e=>(0,C.jsx)(o3,{"data-name":"accordion-item-header",role:"button",tabIndex:h?-1:0,"aria-disabled":h,className:b,onClick:g,onKeyDown:m,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),"aria-expanded":f(p),"aria-controls":`${p}-content`,background:x,...l,children:i&&a&&!h?(0,C.jsxs)(Bv,{justifyContent:"between",alignItems:"center",children:[(0,C.jsx)(zv,{children:e}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(d4,{openText:i,closeText:a,isActive:c,isOpen:f(p),color:w,visualType:"link","aria-hidden":!0,tabIndex:-1})})]}):e});return y?(()=>{const{element:e,children:t,...n}=(null==y?void 0:y.props)??{};return(0,C.jsx)($2,{element:e,modifiers:"normal",className:r4["accordion__item-wrapping-heading"],children:_((0,C.jsx)(z2,{element:"span",...n,children:t}))})})():_(n)},p4=require("@tanstack/react-table"),h4=e=>{var t;let{visible:n,toggleVisible:r,title:o,size:i,primaryText:a,secondaryText:s,tertiaryText:l,onPrimary:c,onSecondary:u,onTertiary:d,children:f,primaryDisabled:p=!1,tertiaryDisabled:h=!1,tertiaryIconLeft:g,primaryColor:m,cardProps:v,withoutCardHeader:b=!1,tertiaryColor:y,tertiaryVisualType:x,notification:w,isLoading:_}=e;const S=(0,N.useIntl)();return(0,C.jsx)(w3,{open:n,onToggle:r,children:(0,C.jsxs)(S3,{"aria-labelledby":"label",hideCloseButton:!0,size:null!=i?i:6,cardProps:v,children:[!b&&(0,C.jsx)(o3,{background:"white",children:(0,C.jsx)($2,{element:"h2",modifiers:"h3",color:"default",children:S.formatMessage({id:o})})}),w&&(0,C.jsx)(l3,{title:w.title,type:w.type,children:null!==(t=null==w?void 0:w.children)&&void 0!==t?t:""}),(0,C.jsx)(i3,{children:(0,C.jsxs)(C.Fragment,{children:[b&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)($2,{element:"h2",modifiers:"h3",color:"default",children:S.formatMessage({id:o})}),(0,C.jsx)("br",{})]}),_?(0,C.jsx)(Tv,{color:"primary",label:"Loading...",size:16}):(0,C.jsx)(C.Fragment,{children:f}),(0,C.jsx)(Uw,{spacing:1}),(0,C.jsxs)(Bv,{justifyContent:"between",gutter:0,children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(Bv,{gutter:0,children:!!s&&!!u&&(0,C.jsx)(q2,{visualType:"secondary",onClick:()=>u(),children:S.formatMessage({id:s})})})}),(0,C.jsx)(zv,{grow:1,children:(0,C.jsxs)(Bv,{justifyContent:"end",gap:3,gutter:0,children:[!!l&&!!d&&(0,C.jsx)(q2,{iconLeft:g,visualType:null!=x?x:"primary",color:null!=y?y:"default",onClick:()=>d(),disabled:h,children:S.formatMessage({id:l})}),!!a&&!!c&&(0,C.jsx)(q2,{disabled:p,visualType:"primary",color:null!=m?m:"positive",onClick:()=>c(),children:S.formatMessage({id:a})})]})})]})]})})]})})},g4=()=>(0,C.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,C.jsxs)("g",{"clip-path":"url(#clip0_28747_2860)",children:[(0,C.jsx)("path",{d:"M28.8511 26.8C28.1722 27.9772 27.0884 28.8674 25.8017 29.3048C24.515 29.7422 23.1132 29.6969 21.8574 29.1773C20.6016 28.6578 19.5776 27.6994 18.9761 26.4808C18.3745 25.2621 18.2365 23.8664 18.5878 22.5536C18.9391 21.2407 19.7557 20.1004 20.8854 19.345C22.0151 18.5896 23.3809 18.2707 24.7283 18.4477C26.0758 18.6246 27.3129 19.2854 28.2093 20.3069C29.1056 21.3284 29.6 22.641 29.6003 24H18.4003",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M24.0049 8V10.4",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M10.1465 15.9954L12.225 17.1954",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M10.1406 31.9954L12.2191 30.7954",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M23.9951 40V37.6",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M37.8539 32.0046L35.7754 30.8046",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M37.8588 16.0045L35.7803 17.2045",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,C.jsx)("path",{d:"M28 46.8493C33.8841 45.8139 39.1414 42.5469 42.6753 37.7296C46.2092 32.9123 47.7468 26.9166 46.9675 20.9932C46.1882 15.0697 43.1521 9.67575 38.4925 5.9364C33.8329 2.19704 27.9095 0.40098 21.9578 0.922824C16.0061 1.44467 10.4857 4.24412 6.54787 8.7373C2.61007 13.2305 0.558967 19.0705 0.822366 25.0392C1.08576 31.0079 3.64332 36.6445 7.96161 40.7733C12.2799 44.9022 18.0255 47.2044 24 47.2",stroke:"#005AA3","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"clip0_28747_2860",children:(0,C.jsx)("rect",{width:"48",height:"48",fill:"white"})})})]}),m4=e=>{let{togglePopup:t,isOpen:n,signState:r,addAlert:o,projectId:i,enableSignPopup:a,unlockContainer:l,permissions:c,downloadProjektiOsaContainer:u,isBlockingRequestInProgress:d}=e;const f=(0,N.useIntl)(),{projectTypes:p,projectContainer:{signers:h,revision:g,signed:m}}=r,v=h.length>0,b=e=>{var t;let{row:n}=e;return(null==n||null===(t=n.subRows)||void 0===t?void 0:t.length)>0?(0,C.jsx)(d4,{openText:"",closeText:"",onClick:n.getToggleExpandedHandler(),isOpen:n.getIsExpanded(),size:"small",visualType:"link"}):(0,C.jsx)(C.Fragment,{})},y=e=>{let{onClick:t}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:"download",visualType:"secondary",onClick:()=>t(),children:f.formatMessage({id:"download"})})}),(0,C.jsx)(h3,{children:f.formatMessage({id:"download.tooltip"})})]})},x=e=>{let{onClick:t}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:"delete",size:"small",color:"important",onClick:()=>t(),children:f.formatMessage({id:"showSignersPopup.fullProject.remove"})})}),(0,C.jsx)(h3,{children:f.formatMessage({id:"showSignersPopup.fullProject.remove"})})]})},w=e=>{let{onClick:t}=e;return(0,C.jsx)(q2,{visualType:"primary",size:"small",onClick:()=>t(),iconLeft:"add",children:f.formatMessage({id:"showSignersPopup.containerName.sign"})})},_=e=>{var t;const n=e.original.part,r=!v&&!n.signed&&c.canSign;return(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsxs)("tr",{className:B2("bg-muted"),children:[(0,C.jsx)("td",{colSpan:2,children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"start",gutterX:2,children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(b,{row:e})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(Yv,{modifiers:"bold",children:(0,C.jsx)(H,{code:n.type})})})]})}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"end",gutterX:2,children:[(null==e||null===(t=e.subRows)||void 0===t?void 0:t.length)>0&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(y,{onClick:()=>u(n.type)})}),r&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(w,{onClick:()=>a(n.revision,n.type)})})]})})]})})},S=e=>{const n=!m&&c.canSign;return(0,C.jsx)(tu,{breakAfter:"avoid",children:(0,C.jsxs)("tr",{className:B2("bg-muted"),children:[(0,C.jsx)("td",{colSpan:2,children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"start",gutterX:2,children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(b,{row:e})}),(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(Yv,{modifiers:"bold",children:e.original.customRowLabel})})]})}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{}),(0,C.jsx)("td",{children:(0,C.jsxs)(Bv,{alignItems:"center",justifyContent:"end",gutterX:2,children:[v&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(y,{onClick:()=>u()})}),c.canSign&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(x,{onClick:()=>{l((()=>{o({title:f.formatMessage({id:"alert.containerUnlocked"}),message:void 0}),t(!1)}))}})})]}),n&&(0,C.jsx)(zv,{width:"auto",children:(0,C.jsx)(w,{onClick:()=>a(g,"SIGN_CONTAINER")})})]})})]})})},k=(0,s.useMemo)((()=>[...p.map((e=>({CustomRowComponent:_,customRowLabel:e.type,subRows:O(e.signers),part:e}))),...v||c.canSign&&p.length>1?[{CustomRowComponent:S,customRowLabel:f.formatMessage({id:"showSignersPopup.fullProject"}),subRows:O(h)}]:[]]),[p]);const E=(0,p4.createColumnHelper)(),j=[E.accessor("name",{id:"type",header:()=>f.formatMessage({id:"projectType"}),cell:()=>(0,C.jsx)(C.Fragment,{})}),E.accessor("name",{id:"name",header:()=>f.formatMessage({id:"showSignersPopup.header.signer"})}),E.accessor("date",{id:"date",header:()=>f.formatMessage({id:"showSignersPopup.header.date"})})];function O(e){return null==e?void 0:e.map((e=>({name:e.name,date:U(e.date)})))}return(0,C.jsx)(h4,{toggleVisible:()=>t(!1),secondaryText:"button.close",onSecondary:()=>t(!1),size:8,visible:n,title:f.formatMessage({id:"showSignersPopup.title"}),cardProps:{border:"top-positive-main"},children:d?(0,C.jsx)(Bv,{justifyContent:"center",className:"mx-2",children:(0,C.jsx)(Tv,{label:f.formatMessage({id:"common.spinner.text"})})}):(0,C.jsx)(n4,{className:"sb-unstyled",columns:j,data:k,defaultExpanded:{0:!0},hidePagination:!0,id:"customExpandRow",placeholder:{icon:(0,C.jsx)(g4,{})}})})};const v4=(0,E.connect)((function(e){return{isOpen:e.uiState.signDocumentListOpen,signState:e.signState,projectId:e.projectState.projectId,permissions:e.permissions.permissions,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0}}),(function(e){return{togglePopup:t=>{e(P(t))},addAlert:t=>{e(M(t))},enableSignPopup:(t,n)=>{e(_t(t,n))},unlockContainer:t=>{e(ht(void 0,t))},downloadProjektiOsaContainer:t=>{e(mt(t))}}}))(m4),b4=require("moment");var y4=o.n(b4);function x4(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const w4=["label","tooltip","required","children"],_4=e=>{let{label:t,tooltip:n,required:r,children:o}=e,i=x4(e,w4);const s=!!n,l="string"==typeof n;return(0,C.jsxs)("div",a(a({},i),{},{children:[(0,C.jsxs)(Bv,{gutter:0,gap:1,alignItems:"center",children:[(0,C.jsx)(g_,{required:r,tooltip:s&&l?n:void 0,children:t}),s&&!l&&(0,C.jsx)(zv,{children:(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(Gv,{size:18,color:"brand",name:"info"})}),(0,C.jsx)(h3,{maxWidth:"large",children:"string"==typeof n?(0,C.jsx)(Yv,{children:n}):(0,C.jsxs)(C.Fragment,{children:[" ",n]})})]})})]}),(0,C.jsx)("div",{children:o})]}))},S4=e=>{let{closePopup:t,files:n,requestRestrictFiles:r,requestsInProgress:o}=e;const i=(0,N.useIntl)(),[a,l]=(0,s.useState)(),[c,u]=(0,s.useState)(),[d,f]=(0,s.useState)();return(0,C.jsx)(h4,{toggleVisible:()=>t(),secondaryText:"button.close",onSecondary:()=>t(),primaryText:"button.save",onPrimary:function(){if(!(null!=n&&n.length&&a&&c&&d)||o)return;const e=y4()(d).format("YYYY-MM-DD");r(n,a,c,e)},size:8,visible:!(null==n||!n.length),title:i.formatMessage({id:"popupRestrictAccess.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.overview"}),children:(0,C.jsx)(tb,{style:"styled",children:null==n?void 0:n.map((e=>(0,C.jsx)(tb.Item,{children:e.failiNimetus},e.id)))})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.basis"}),tooltip:i.formatMessage({id:"popupRestrictAccess.basis.label"}),required:!0,children:(0,C.jsx)(F1,{id:"popupRestrictAccessBasis",label:"",hideLabel:!0,renderWithoutLabel:!0,placeholder:i.formatMessage({id:"popupRestrictAccess.basis.placeholder"}),value:a,onChange:e=>l(e),characterLimit:4e3})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.explanation"}),tooltip:i.formatMessage({id:"popupRestrictAccess.explanation.label"}),required:!0,children:(0,C.jsx)(F1,{id:"popupRestrictAccessExplanation",label:"",hideLabel:!0,renderWithoutLabel:!0,placeholder:i.formatMessage({id:"popupRestrictAccess.explanation.placeholder"}),value:c,onChange:e=>u(e),characterLimit:4e3})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupRestrictAccess.endDate"}),tooltip:i.formatMessage({id:"popupRestrictAccess.endDate.label"}),required:!0,children:(0,C.jsx)(H3,{id:"popupRestrictAccessEndDate",label:"",placeholder:i.formatMessage({id:"common.date.placeholder"}),hideLabel:!0,renderWithoutLabel:!0,value:void 0,onChange:e=>{var t;return f(null!==(t=null==e?void 0:e.toString())&&void 0!==t?t:"")}})})})]})})};const k4=(0,E.connect)((function(e){const t=new Set(e.restrictFilesState.fileIds);return{files:t&&e.projectState.projectFiles.filter((e=>t.has(e.id))),requestsInProgress:e.restrictFilesState.requestsInProgress}}),(function(e){return{closePopup:()=>{e(It(void 0))},requestRestrictFiles:(t,n,r,o)=>{e(Mt(t,n,r,o))}}}))(S4),E4=["text","name"],C4=e=>{let{text:t,name:n}=e,r=x4(e,E4);return(0,C.jsxs)(Bv,{gap:2,gutterX:2,alignItems:"center",children:[(0,C.jsx)(H2,a({name:null!=n?n:"add",size:16,color:"primary"},r)),t]})};var j4=o(543);const O4=(e,t)=>!e&&t,T4=e=>{const{getCurrentBreakpointProps:t}=M2(),{isBreakpoint:n}=t({isBreakpoint:!0,[e]:{isBreakpoint:!1}},{isBreakpoint:!1});return n};let I4=function(e){return e.Show="Show",e.Text="Text",e.Delete="Delete",e.Edit="Edit",e.More="More",e.Download="Download",e}({});const R4=e=>{let{onDownload:t,onView:n,onEdit:r,onDelete:o,textButton:i,collapseButtonsBreakPoint:a="lg",buttonsShown:l}=e;const c=(0,N.useIntl)(),[u,d]=(0,s.useState)([]),[f,p]=(0,s.useState)({dropdownButtons:[],actionButtons:[]}),h=T4(a);if((0,s.useEffect)((()=>{d(((e,t,n,r,o,i)=>{if(e)return e;const a=O4(e,t),s=O4(e,n),l=O4(e,r),c=O4(e,o),u=O4(e,i),d={[I4.Download]:a,[I4.Show]:s,[I4.Edit]:l,[I4.Delete]:c,[I4.Text]:u};return(0,j4.keys)((0,j4.pickBy)(d))})(l,t,n,r,o,i))}),[l,t,n,o,r,i]),(0,s.useEffect)((()=>{p(((e,t,n,r,o,i,a,s)=>{var l;const c={[I4.Download]:{icon:"download",text:t.formatMessage({id:"common.button.download"}),onClick:r,visualType:"secondary",color:"default"},[I4.Edit]:{icon:"edit",text:t.formatMessage({id:"common.button.change"}),onClick:o,visualType:"primary"},[I4.Delete]:{icon:"delete",text:t.formatMessage({id:"common.button.delete"}),onClick:i,color:"important",visualType:"primary"},[I4.Text]:{icon:null!==(l=null==s?void 0:s.icon)&&void 0!==l?l:"add",text:null==s?void 0:s.text,onClick:null==s?void 0:s.onClick},[I4.Show]:{icon:"visibility",text:t.formatMessage({id:"common.button.view"}),onClick:a,visualType:"secondary"}},u=Object.keys(c),d=e.sort(((e,t)=>u.indexOf(e)-u.indexOf(t)));if(n)return{dropdownButtons:d.map((e=>c[e])),actionButtons:[]};{let t=[],n=[...d];if(d.includes(I4.Text)&&(n.length>2&&e.includes(I4.Show)&&(t.push(I4.Show),n=n.filter((e=>e!==I4.Show))),t.push(I4.Text),n=n.filter((e=>e!==I4.Text))),n.length>3){let e=[...n];const r=[];u.forEach((t=>{d.includes(t)&&r.length<=3&&(r.push(t),e=e.filter((e=>e!==t)))})),t=e,n=r}return{dropdownButtons:t.map((e=>c[e])),actionButtons:n.map((e=>c[e]))}}})(u,c,h,t,r,o,n,i))}),[u,h]),!f.actionButtons.length&&!f.dropdownButtons.length)return(0,C.jsx)(C.Fragment,{});return(0,C.jsx)(Bv,{gutter:0,children:(0,C.jsx)(zv,{style:{minWidth:"".concat((()=>{let e=f.actionButtons.length;return f.dropdownButtons.length&&(e+=1),42*e})(),"px")},children:(0,C.jsxs)(Bv,{gap:2,gutter:0,justifyContent:"end",children:[!!f.actionButtons.length&&f.actionButtons.map((e=>{let{icon:t,text:n,onClick:r,color:o,visualType:i}=e;return(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(q2,{icon:t,visualType:i,color:o,onClick:r,children:n})}),(0,C.jsx)(h3,{children:n})]},t)})),!!f.dropdownButtons.length&&(0,C.jsx)($3,{button:{children:"",icon:"more_vert",size:"small",visualType:"secondary",style:{width:"2.5rem",height:"2.5rem"}},items:f.dropdownButtons.map((e=>{let{text:t,icon:n,onClick:r}=e;return{children:(0,C.jsx)(C4,{text:t,name:n}),onClick:r}}))})]})})})},P4=e=>{let{isVisible:t,toggleDeleteModal:n,handleDelete:r,title:o,primaryText:i,description:a,withoutCardHeader:s}=e;const l=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:n,primaryText:i,secondaryText:"button.cancel",onPrimary:r,onSecondary:n,primaryColor:"important",size:6,visible:t,title:o,cardProps:{border:"top-important-main"},withoutCardHeader:s,children:a?(0,C.jsxs)(Bv,{gutter:2,children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{label:"Example icon",name:"warning",size:24,color:"important"})}),(0,C.jsx)(zv,{children:(0,C.jsx)(Yv,{children:l.formatMessage({id:a})})})]}):(0,C.jsx)(C.Fragment,{})})};function M4(e,t){const n=e.filter((e=>e.code===t))[0];return n?n.text:""}const A4=e=>{let{code:t,codes:n}=e;return(0,C.jsxs)(C.Fragment,{children:[t&&(0,C.jsx)("span",{children:M4(n,t)}),!t&&(0,C.jsx)("span",{})]})};const D4=(0,E.connect)((function(e,t){return{codes:e.codeToTextState[t.type],code:t.code}}),(function(e){return{}}))(A4),F4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"grupp",code:t})},L4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"projektiOsa",code:t})},N4=e=>{let{code:t}=e;return(0,C.jsx)(D4,{type:"projektiStaadium",code:t})},B4=e=>{let{isVisible:t,toggleConfirmationModal:n,headerText:r,subText:o,positiveButtonText:i,onSubmit:a,withoutCardHeader:s}=e;const l=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:n,primaryText:i,secondaryText:"button.cancel",onPrimary:()=>{n(),a()},onSecondary:()=>{n()},size:6,visible:t,title:r,cardProps:{border:"top-positive-main"},withoutCardHeader:s,children:(0,C.jsx)(Bv,{gutter:3,children:(0,C.jsx)(zv,{xs:12,children:l.formatMessage({id:o})})})})},z4=e=>{let{file:t,className:n}=e;return t.akPiirang?(0,C.jsxs)("div",{className:n,children:[(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.owner",values:{owner:t.akPiirang.teabeValdaja}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.reason",values:{reason:t.akPiirang.juriidilineAlus}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.description"}),(0,C.jsx)("br",{}),t.akPiirang.pohjendus?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(N.FormattedMessage,{id:t.akPiirang.pohjendus}),(0,C.jsx)("br",{})]}):null,(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.start",values:{dateTime:U(new Date(t.akPiirang.piirangAlgus))}}),(0,C.jsx)("br",{}),(0,C.jsx)(N.FormattedMessage,{id:"document.restriction.end",values:{dateTime:U(new Date(t.akPiirang.piirangLopp))}})]}):null},$4=e=>{let{files:t,loadFiles:n,deselectFile:r,selectFile:o,setEditFile:i,requestDeleteFile:a,downloadFiles:l,applicationId:u,isAudit:d,toggleRestrictAccessPopupWith:f,toggleReleaseAccessPopupWith:p,selectedFilesIds:h,permissions:g,unlockFile:m,isProjectContainerSignedByAnyone:v,isBlockingRequestInProgress:b,isLegacy:y}=e;const x=(0,N.useIntl)(),[w,_]=(0,s.useState)({visible:!1,fileId:void 0}),[S,k]=(0,s.useState)([]),[E,j]=(0,s.useState)({visible:!1,file:void 0});(0,s.useEffect)((()=>{u&&n()}),[u,n]),(0,s.useEffect)((()=>{k([...t])}),[t]);const O=e=>{j((t=>({visible:!t.visible,file:e})))},T=e=>{let t=[I4.Download];e.locked||!g.canWrite||v||t.push(I4.Edit),g.canWrite&&t.push(I4.Delete),(g.canCreateRestrictions&&(!e.akPiirang||e.akPiirang)||e.locked&&!v)&&t.push(I4.Text);return(0,C.jsx)(R4,{buttonsShown:t,onDownload:()=>function(e){return l([e])}(e),onEdit:()=>i(e),onDelete:()=>_({visible:!0,fileId:e.id}),textButton:{onClick:()=>g.canCreateRestrictions?e.akPiirang?p([e.id]):f([e.id]):e.locked&&!v?O(e):void 0,text:g.canCreateRestrictions?x.formatMessage({id:e.akPiirang?"editPopover.liftRestriction":"editPopover.restrictAccess"}):e.locked&&!v?x.formatMessage({id:"label.unlock_container"}):"",icon:g.canCreateRestrictions?x.formatMessage({id:e.akPiirang?"remove":"add"}):e.locked?x.formatMessage({id:"lock_open"}):void 0}})},[I,R]=c().useState({}),P=(0,p4.createColumnHelper)(),M=[P.accessor((e=>e.failiNimetus),{id:"failiNimetus",header:()=>x.formatMessage({id:"document.fileName"}),cell:e=>e.renderValue()}),P.accessor((e=>e.projTunnus),{id:"projTunnus",header:()=>x.formatMessage({id:d?"document.auditId":"document.projectId"}),cell:e=>e.renderValue()}),P.accessor((e=>e.projOsa),{id:"projOsa",header:()=>x.formatMessage({id:d?"document.auditType":"document.projectType"}),cell:e=>(0,C.jsx)(L4,{code:e.row.original.projOsa})}),P.accessor((e=>e.grupp),{id:"grupp",header:()=>x.formatMessage({id:"document.groupName"}),cell:e=>(0,C.jsx)(F4,{code:e.row.original.grupp})}),P.accessor((e=>e.jrkNr),{id:"jrkNr",header:()=>x.formatMessage({id:"document.jrkNr"}),cell:e=>e.renderValue()}),P.accessor((e=>e.errorMessages),{id:"errorMessages",header:()=>x.formatMessage({id:"document.hasErrorMessagesTitle"}),cell:e=>((e,t)=>{var n;let r=(0,C.jsx)(H2,{name:"check_circle",color:"positive"});if((null===(n=e.errorMessages)||void 0===n?void 0:n.length)>0&&(r=t?(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"error",color:"warning"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"document.signedInvalidFileInfo"})})]}):(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)("span",{children:(0,C.jsx)(H2,{name:"error",color:"important"})})}),(0,C.jsx)(h3,{children:(0,C.jsx)(tb,{style:e.errorMessages.length>1?"styled":"none",children:e.errorMessages.map((t=>(0,C.jsx)(tb.Item,{children:t},"".concat(e.id,"-").concat(t))))})})]})),e.akPiirang&&(r=(0,C.jsxs)(C.Fragment,{children:[r,(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)("span",{children:(0,C.jsx)(T3,{color:"important",type:"secondary",children:(0,C.jsx)(N.FormattedMessage,{id:"restricted.message.tag"})})})}),(0,C.jsx)(h3,{maxWidth:"none",children:(0,C.jsx)(z4,{file:e,className:"restricted-message"})})]})]})),e.locked){let e;e=t?(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"lock",color:"disabled"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"unlockDocument.disabled"})})]}):(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"lock"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"unlockDocument.tooltip"})})]}),r=(0,C.jsxs)(Bv,{gap:2,alignItems:"center",children:[r,e]})}return r})(e.row.original,v)}),P.accessor((e=>e.hasChanged),{id:"hasChanged",header:()=>x.formatMessage({id:"document.hasChangedTitle"}),cell:e=>{const t=e.row.original;return t.hasChanged&&(0,C.jsxs)(p3,{children:[(0,C.jsx)(g3,{children:(0,C.jsx)(H2,{name:"info",color:"primary"})}),(0,C.jsx)(h3,{children:(0,C.jsx)(N.FormattedMessage,{id:"document.hasChanged"})})]})}}),P.accessor((e=>"".concat(e.id)),{id:"actions",cell:e=>T(e.row.original),header:()=>(0,C.jsx)("span",{className:"visually-hidden",children:x.formatMessage({id:"placeholder.actions"})}),enableSorting:!1})];if(!d){const e=P.accessor((e=>e.projStaadium),{id:"projStaadium",header:()=>x.formatMessage({id:"document.projectStage"}),cell:e=>(0,C.jsx)(N4,{code:e.row.original.projStaadium})});M.splice(2,0,e)}return(0,C.jsxs)(C.Fragment,{children:[!y||S&&0!==S.length?(0,C.jsx)(n4,{columns:[M5("test-2",!0),...M],data:S,enableRowSelection:!0,getRowId:e=>e.id,id:"row-selection-table-outside",onRowSelectionChange:e=>{R(e),function(e){const t=new Set(h),n=new Set(e);for(const e of h)n.has(e)||r(e);for(const n of e)t.has(n)||o(n)}(Object.keys(e)),console.log("state",e)},rowSelection:I,placeholder:{icon:(0,C.jsx)(g4,{})}}):(0,C.jsx)("div",{className:"legacy-project-no-files-block",children:(0,C.jsx)(Yv,{children:x.formatMessage({id:"documents.cannotShowLegacyFiles"})})}),b&&(0,C.jsx)("div",{className:"doc2--loading-overlay--indicator--visible",children:(0,C.jsx)(Bv,{justifyContent:"center",children:(0,C.jsx)(Tv,{color:"primary",label:"Loading...",size:18})})}),(0,C.jsx)(P4,{isVisible:w.visible,toggleDeleteModal:()=>_({visible:!1,fileId:void 0}),handleDelete:()=>(w.fileId&&a([w.fileId]),void _({visible:!1,fileId:void 0})),title:"file.delete.modal.title",description:"file.delete.modal.content",primaryText:"common.confirmation.modal.yes",withoutCardHeader:!0}),(0,C.jsx)(B4,{toggleConfirmationModal:()=>O(void 0),isVisible:E.visible,onSubmit:()=>(e=>{if(e.projOsa)return m(e.projOsa)})(E.file),headerText:"unlockDocument.title",positiveButtonText:"unlockDocument.open",subText:"unlockDocument.content"})]})};const V4=(0,E.connect)((function(e){return{files:e.projectState.projectFiles,openPopoverId:e.projectState.openPopoverId,applicationId:e.projectState.applicationId,isAudit:"AUDIT"===e.projectState.applicationType,projektiOsa:e.codeToTextState.projektiOsa,selectedFilesIds:e.projectState.selectedFilesIds,permissions:e.permissions.permissions,isProjectContainerSignedByAnyone:e.signState.projectContainer.signers.length>0,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0,isLegacy:e.projectState.legacy}}),(function(e){return{loadFiles:()=>{e(it())},deselectFile:t=>{e(Ke(t))},selectFile:t=>{e(He(t))},setEditFile:t=>{e(An({id:t.id})),e(Bn())},requestDeleteFile:t=>{e(gt(t))},toggleRestrictAccessPopupWith:t=>{e(It(t))},toggleReleaseAccessPopupWith:t=>{e(Rt(t))},downloadFiles:t=>{e(vt(t))},unlockFile:t=>{e(ht(t))}}}))($4),H4=e=>{e.stopPropagation(),window.open("https://e-ehitus.taskugiid.eu/failid/ehitusprojekti-failid","_blank","noopener,noreferrer")};let K4=o(501);"default"in K4&&(K4=K4.default);const U4=e=>{let{setUploadedFile:t,uploadedFile:n,setDropzoneHasErrors:r,allowedExtensions:o,maxSizeBytes:i,hasErrors:l}=e;const[c,u]=(0,s.useState)([]),d=e=>{var t;const n=(null!==(t=e.name.split(".").pop())&&void 0!==t?t:"").toLowerCase();return o.includes("."+n)};return(0,C.jsxs)(Kv,{size:1,children:[n&&(0,C.jsx)(r3,{borderless:!0,children:(0,C.jsx)(i3,{background:"bg-muted",children:(0,C.jsx)("span",{children:(0,C.jsxs)(Bv,{gutter:0,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsxs)(z2,{modifiers:"bold",children:[(0,C.jsx)(N.FormattedMessage,{id:"file.transfer.selected"}),":"]})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(z2,{modifiers:"break-all",children:n.name})})]})})})}),(0,C.jsx)(K4,{onDrop:e=>{if(1===e.length){const n=e[0],o=[];d(n)||o.push({title:"documents.modal.file.upload.error.unsupported.format.1",link:"documents.modal.file.upload.error.unsupported.format.2"}),i&&n.size>i&&o.push({title:"documents.modal.file.upload.error.too.big"}),n.name.length>130&&o.push({title:"documents.modal.file.upload.error.filename.too.long"}),u(o),l&&l((null==o?void 0:o.length)>0),r&&r(o.length>0),t(n)}},children:e=>{let{getRootProps:t,getInputProps:n}=e;return(0,C.jsx)("section",{children:(0,C.jsx)("div",a(a({},t()),{},{style:{padding:"20px",cursor:"pointer",userSelect:"none",border:"1px solid #E1E2E5",borderRadius:"4px"},children:(0,C.jsxs)(Bv,{alignItems:"center",gap:2,children:[(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)("input",a({},n()))}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Bv,{alignItems:"center",justifyContent:"center",children:(0,C.jsxs)(z2,{children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.drop.message.1"}),(0,C.jsx)(x2,{children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.drop.message.2"})}),"."]})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Bv,{alignItems:"center",justifyContent:"center",children:(0,C.jsx)(q2,{icon:"attach_file",visualType:"secondary",children:(0,C.jsx)(N.FormattedMessage,{id:"common.file_upload.add"})})})})]})}))})}}),(0,C.jsxs)(Zv,{icon:"info",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.1"}),(0,C.jsx)(x2,{onClick:H4,tabIndex:0,children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.2"})}),"."]}),n&&c.length>0&&(0,C.jsxs)(Zv,{icon:"error",type:"danger",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.unable.to.attach"}),(0,C.jsxs)(z2,{modifiers:"break-all",children:[(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.file"}),null==n?void 0:n.name]}),(0,C.jsx)(tb,{element:"ul",style:"styled",children:c.map((e=>(0,C.jsxs)(eb,{children:[(0,C.jsx)(N.FormattedMessage,{id:e.title}),!d(n)&&(0,C.jsx)(x2,{onClick:H4,tabIndex:0,children:(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.requirements.message.3"})}),"."]})))}),(0,C.jsx)(N.FormattedMessage,{id:"documents.modal.file.upload.error.retry"})]})]})},G4=require("yup"),W4=G4.object({file:G4.mixed().required("common.file.required")}),q4=(e,t)=>Object.keys(e).filter((e=>e===t||e.includes(".")&&e.split(".")[0]===t)),Y4=e=>{const t=(0,N.useIntl)(),[n,r]=(0,s.useState)({});return{validate:(t,n,o)=>e.validate(t,{abortEarly:!1,context:o}).then((()=>{r({}),n(t)}),(e=>{r((e=>{var t;let n={};return null===(t=e.inner)||void 0===t||t.forEach(((t,r)=>{n[t.path]=e.errors[r]})),n})(e))})),getErrorMessagesByFieldName:e=>{let r=[];r=Array.isArray(e)?e.map((e=>q4(n,e))).flatMap((e=>e)):q4(n,e);const o=[];for(const e of r)n[e]&&o.push(t.formatMessage({id:n[e]}));return o.length>0?(0,j4.uniq)(o).join(", "):void 0},clearErrors:e=>{r(e?t=>((e,t)=>{let n=a({},e);const r=q4(e,t);for(const e of r)delete n[e];return n})(t,e):{})},errors:n,getErrorMessagesWithIntlShape:()=>Object.keys(n).reduce(((e,r)=>(e[r]=Array.from(new Set([t.formatMessage({id:n[r]})])).join(", "),e)),{})}},J4=e=>{let{isVisible:t,onConfirm:n,toggleVisible:r,extraInfoNotification:o,onFileUpload:i,errorMessage:a,allowedExtensions:l,maxSizeBytes:c}=e;const u=(0,N.useIntl)(),[d,f]=(0,s.useState)(void 0),[p,h]=(0,s.useState)(!1),{validate:g,clearErrors:m,getErrorMessagesByFieldName:v}=Y4(W4),b=()=>{f(void 0),m(),r()};return(0,C.jsx)(h4,{toggleVisible:()=>b(),primaryText:"button.add",secondaryText:"button.cancel",onPrimary:()=>{g({file:d},(()=>{p||a||(n([d]),f(void 0),r())}))},onSecondary:()=>b(),primaryColor:"positive",size:6,visible:t,title:"documents.modal.file.upload.adding",cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Bv,{gap:3,children:[v("file")&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"danger",icon:"error",children:v("file")})}),!!a&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"danger",icon:"error",children:u.formatMessage({id:a})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(U4,{uploadedFile:d,setUploadedFile:e=>{f(e),i&&i(e),m()},setDropzoneHasErrors:h,allowedExtensions:l,maxSizeBytes:c})}),o&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{type:"warning",icon:"warning",children:u.formatMessage({id:o})})})]})})},X4=e=>{let{isVisible:t,toggleModal:n,handleOpenProject:r,title:o,primaryText:i,description:a}=e;return(0,C.jsx)(P4,{isVisible:t,toggleDeleteModal:n,handleDelete:r,title:o,description:a,primaryText:i})},Z4=e=>{let{requestDeleteProject:t,toggleSignDocumentListPopup:n,toggleRestrictAccessPopupWith:r,toggleReleaseAccessPopupWith:o,requestsInProgress:i,uploadFiles:l,deletionPending:c,allowedExtensions:u,selectedFileIds:d,requestDeleteFile:f,isLegacyProject:p,isAudit:h,permissions:g,downloadFiles:m,downloadLegacyContainer:v,clearSelectedFiles:b,createProject:y,cloneReferencedForEditing:x,isBlockingRequestInProgress:w,isRestrictedFileSelected:_,isNonRestrictedFilesSelected:S,hasRestrictedFiles:k,buttonConfig:E,fileCount:j}=e;const O=(0,N.useIntl)(),[T,I]=(0,s.useState)(!1),[R,P]=(0,s.useState)(!1),[M,A]=(0,s.useState)(!1),[D,F]=(0,s.useState)(0),[L,B]=(0,s.useState)({});(0,s.useEffect)((()=>{i||(F((e=>e+1)),P(!1))}),[i]),(0,s.useEffect)((()=>{if(!E)return;const e={};E.filter((e=>!!e.popover)).forEach((t=>{e[t.popover.id]=!1})),B(e)}),[E]);const z=O.formatMessage({id:"fileUpload.largeFileWarning",defaultMessage:"Laetavate failide hulgas esineb suuri faile. Failide laadimine ja töötlemine võib võtta aega. Palun ärge sulgege akent."});const $=[g.canWrite&&{text:O.formatMessage({id:"tableFooter.manage.delete"}),icon:"delete",isDisabled:!d.length,onClick:()=>{f(b)}},(g.canAccessFiles&&(g.canRead||g.canAccessRestrictedFiles)||_&&g.canAccessRestrictedFiles)&&{text:O.formatMessage({id:"tableFooter.manage.download"}),icon:"download",isDisabled:!d.length,onClick:()=>{m(b)}},g.canCreateRestrictions&&(!_||S)&&{text:O.formatMessage({id:"tableFooter.manage.restrictAccess"}),icon:"add",isDisabled:!d.length,onClick:()=>r([...d])},g.canCreateRestrictions&&(_||!S)&&{text:O.formatMessage({id:"tableFooter.manage.releaseRestriction"}),icon:"remove",isDisabled:!d.length,onClick:()=>o([...d])}].filter(Boolean);function V(e){const t=L[e];B(a(a({},L),{},{[e]:!t}))}return(0,C.jsxs)(Bv,{gutter:0,justifyContent:"between",children:[(0,C.jsx)(zv,{children:(0,C.jsx)(Bv,{gutter:0,gap:2,children:g.canDelete&&!w&&(0,C.jsx)(q2,{id:"delete-building-project-button",visualType:"primary",color:"important",size:"small",onClick:()=>I((e=>!e)),children:(0,C.jsx)(N.FormattedMessage,{id:h?"tableFooter.delete.audit":"tableFooter.delete"})})})}),(0,C.jsx)(zv,{xs:8,children:(0,C.jsxs)(Bv,{justifyContent:"end",gutter:0,gap:2,children:[p?(0,C.jsx)(C.Fragment,{children:g.canAccessFiles&&(!k||g.canAccessRestrictedFiles)&&!w&&(0,C.jsx)(q2,{iconLeft:"download",onClick:function(){v()},children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.downloadContainer"})})}):(0,C.jsxs)(C.Fragment,{children:[!w&&g.canWrite&&(0,C.jsx)(q2,{id:"upload-building-project-button",iconLeft:"add",visualType:"primary",onClick:()=>P((e=>!e)),size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.upload"})}),(0,C.jsx)(J4,{isVisible:R,onConfirm:function(e){e&&l(e,z)},toggleVisible:()=>P((e=>!e)),allowedExtensions:u,maxSizeBytes:2e9},D)]}),function(){if(E)return E.map((e=>e.popover?function(e){var t,n,r,o,i;return(0,C.jsxs)(C.Fragment,{children:[!e.disabled&&(0,C.jsx)(q2,{id:e.id,color:null!==(t=e.theme)&&void 0!==t?t:"default",onClick:()=>V(e.popover.id),size:"small",children:e.text}),(0,C.jsx)(h4,{toggleVisible:()=>V(e.popover.id),secondaryText:null===(n=e.popover)||void 0===n?void 0:n.cancelText,onSecondary:()=>V(e.popover.id),primaryText:null===(r=e.popover)||void 0===r?void 0:r.confirmText,onPrimary:()=>{var t;null===(t=e.popover)||void 0===t||t.onConfirm(),V(e.popover.id)},size:6,visible:L[e.popover.id],title:O.formatMessage({id:null===(o=e.popover)||void 0===o?void 0:o.title}),cardProps:{border:"top-positive-main"},children:(0,C.jsx)("p",{children:null===(i=e.popover)||void 0===i?void 0:i.text})})]})}(e):function(e){var t;return(0,C.jsx)(q2,{id:e.id,className:"ml-1 mt-1",color:null!==(t=e.theme)&&void 0!==t?t:"default",onClick:e.onClick,disabled:e.disabled,size:"small",children:e.text})}(e)))}(),(!w||j>0)&&(0,C.jsx)(q2,{id:"signed-documents-list-button",iconLeft:g.canSign?"edit":void 0,visualType:"primary",onClick:()=>n(!0),size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.openSigners"})}),(!p||g.canCreateRestrictions)&&!w&&(g.canRead||g.canWrite)&&j>0&&(0,C.jsx)($3,{button:{children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.manage"}),size:"small",visualType:"secondary"},items:$.map((e=>{let{text:t,icon:n,isDisabled:r,onClick:o}=e;return{children:(0,C.jsx)(C4,{text:t,name:n}),isDisabled:null!=r&&r,onClick:o}}))}),g.canCreateNewVersion&&!w&&(0,C.jsx)(q2,{onClick:y,children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.makeChangeable"})}),g.canCloneForEditing&&!w&&(0,C.jsx)(q2,{onClick:()=>A((e=>!e)),children:(0,C.jsx)(N.FormattedMessage,{id:"tableFooter.makeChangeable"})})]})}),(0,C.jsx)(X4,{isVisible:M,toggleModal:()=>A((e=>!e)),handleOpenProject:function(){x(),A((e=>!e))},title:"popupEditReferenced.title",description:"popupEditReferenced.overview",primaryText:"button.verify"}),(0,C.jsx)(P4,{isVisible:T,toggleDeleteModal:()=>I((e=>!e)),handleDelete:()=>{t()},title:"buildingProject.delete.modal.header",description:"buildingProject.delete.modal.description",primaryText:"common.confirmation.modal.yes",withoutCardHeader:!0})]})};const Q4=(0,E.connect)((function(e){const t=new Set(e.projectState.selectedFilesIds),n=e.projectState.projectFiles.filter((e=>!!e.akPiirang)).length>0,r=e.projectState.projectFiles.filter((e=>t.has(e.id)&&!!e.akPiirang)).length>0,o=e.projectState.projectFiles.filter((e=>t.has(e.id)&&!e.akPiirang)).length>0;return{selectedFileIds:e.projectState.selectedFilesIds,requestsInProgress:e.projectState.requestsInProgress,deletionPending:e.projectState.deletionPending,allowedExtensions:e.projectState.allowedExtensions,isLegacyProject:e.projectState.legacy,isAudit:"AUDIT"===e.projectState.applicationType,permissions:e.permissions.permissions,isBlockingRequestInProgress:e.projectState.blockingRequestsInProgress>0,isRestrictedFileSelected:r,isNonRestrictedFilesSelected:o,hasRestrictedFiles:n,fileCount:e.projectState.projectFiles.length}}),(function(e){return{toggleSignRefusalPopup:t=>{e(R(t))},toggleSignDocumentListPopup:t=>{e(P(t))},toggleRestrictAccessPopupWith:t=>{e(It(t))},toggleReleaseAccessPopupWith:t=>{e(Rt(t))},requestDeleteProject:()=>{e({type:I.CLEAR_ALL_ALERTS,payload:{}}),e(nt())},uploadFiles:(t,n)=>{e(pt(t,n))},requestDeleteFile:t=>{e(gt(void 0,t))},downloadFiles:t=>{e(vt(void 0,t))},downloadLegacyContainer:t=>{e(dt(t))},clearSelectedFiles:()=>{e(Xe())},createProject:()=>{e(et())},cloneReferencedForEditing:()=>{e(Ae())}}}))(Z4),e6=e=>{let{canAddAudit:t,canReferenceBaseProject:n,baseProjectInfo:r,navigateForwardNormal:o,navigateForwardLegacy:i,navigateForwardReferenceBase:a,navigateForwardAudit:l,isDisabled:c}=e;const u=(0,N.useIntl)(),[d,f]=(0,s.useState)(er.NORMAL);(0,s.useEffect)((()=>{r&&!r.disabled&&f(er.REFERENCE)}),[r]);return(0,C.jsxs)(Kv,{size:1,children:[(0,C.jsx)(_4,{label:u.formatMessage({id:"intro.buildingProject.text"}),tooltip:u.formatMessage({id:"intro.buildingProject.text"}),required:!c||!(null!=r&&r.disabled),children:(0,C.jsxs)(Kv,{size:0,children:[n&&r&&(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-reference",name:"doc2--project-creation-type-selector",disabled:c||(null==r?void 0:r.disabled),checked:d===er.REFERENCE,value:er.REFERENCE,onChange:e=>f(e),label:(0,C.jsxs)(Bv,{gutter:0,gap:1,children:[u.formatMessage({id:"intro.reference.title"}),(0,C.jsxs)("a",{className:"link-gray cursor-pointer",href:"".concat(window.REACT_APP_URL).concat(window.REACT_APP_ENDING,"/document?docNr=").concat(r.nr),target:"_blank",rel:"noopener noreferrer",children:[r.documentTypeName," nr ",r.nr]}),"(".concat(null==r?void 0:r.signatureDate,")")]})}),(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-normal",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.NORMAL,value:er.NORMAL,onChange:e=>f(e),label:u.formatMessage({id:"intro.normal.title"})}),(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-legacy",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.LEGACY,value:er.LEGACY,onChange:e=>f(e),label:u.formatMessage({id:"intro.container.title"})}),t&&(0,C.jsx)(b5,{id:"doc2--project-creation-type-selector-type-audit",name:"doc2--project-creation-type-selector",disabled:c,checked:d===er.AUDIT,value:er.AUDIT,onChange:e=>f(e),label:u.formatMessage({id:"intro.audit.title"})})]})}),(0,C.jsx)(Zv,{icon:"info",children:(0,C.jsx)(N.FormattedMessage,{id:(e=>{switch(e){case er.REFERENCE:return"intro.reference.text";case er.NORMAL:return"intro.normal.text";case er.LEGACY:return"intro.container.text";case er.AUDIT:return"intro.audit.text"}})(d)})}),!c&&(0,C.jsx)(Bv,{justifyContent:"end",children:(0,C.jsx)(q2,{color:"positive",onClick:function(e){switch(e.preventDefault(),d){case er.REFERENCE:a();break;case er.NORMAL:o();break;case er.LEGACY:i();break;case er.AUDIT:l()}},size:"small",children:(0,C.jsx)(N.FormattedMessage,{id:"intro.button.verifyBuildingProject"})})})]})},t6=e=>{let{navigateBackward:t,navigateForward:n,allowedExtensions:r,uploadFile:o,uploadInProgress:i,isDisabled:a}=e;const l=(0,N.useIntl)(),[c,u]=(0,s.useState)(void 0),[d,f]=(0,s.useState)(!1);return(0,C.jsx)("div",{id:"doc2--project-creation-legacy",children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(U4,{uploadedFile:c,setUploadedFile:e=>u(e),allowedExtensions:r,hasErrors:e=>f(e)}),!(a||i)&&(0,C.jsxs)(Bv,{justifyContent:"between",gap:3,gutter:0,children:[(0,C.jsx)(q2,{visualType:"secondary",onClick:t,size:"small",children:l.formatMessage({id:"button.close"})}),c&&!d&&(0,C.jsx)(q2,{visualType:"primary",onClick:function(){c&&o(c,(()=>{n()}))},color:"positive",size:"small",id:"add-old-file-button",children:l.formatMessage({id:"button.add"})})]})]})})},n6=e=>{let{step:t,endProjectCreation:n,sendCreateProject:r,sendCreateAudit:o,requestsInProgress:i,applicationId:a,canCreateNewVersion:l,baseProjectInfo:c,canAddAudit:u,canReferenceBaseProject:d,type:f,setProjectCreationType:p,uploadContainer:h,loadCreateProjectOptions:g,referenceBaseProject:m}=e;const v=(0,N.useIntl)();(0,s.useEffect)((()=>{g()}),[a]),(0,s.useEffect)((()=>{f!==er.NORMAL&&f!==er.AUDIT||1!==t||n()}),[f,t]);const b=v.formatMessage({id:"fileUpload.largeFileWarning",defaultMessage:"Laetavate failide hulgas esineb suuri faile. Failide laadimine ja töötlemine võib võtta aega. Palun ärge sulgege akent."});return(0,C.jsxs)(C.Fragment,{children:[!f&&(0,C.jsx)(e6,{navigateForwardNormal:function(){p(er.NORMAL),r()},navigateForwardLegacy:function(){p(er.LEGACY)},navigateForwardReferenceBase:function(){p(er.REFERENCE),m().then((()=>n()))},navigateForwardAudit:function(){p(er.AUDIT),o()},canAddAudit:u,canReferenceBaseProject:d,baseProjectInfo:c,isDisabled:!l}),f===er.LEGACY&&(0,C.jsx)(t6,{navigateForward:n,navigateBackward:function(){p(void 0)},allowedExtensions:[".asice",".ddoc",".bdoc"],uploadFile:(e,t)=>h(e,b,t),uploadInProgress:!!i,isDisabled:!l})]})};const r6=(0,E.connect)((function(e){return{applicationId:e.projectState.applicationId,step:e.projectState.projectCreationStep,requestsInProgress:e.projectState.requestsInProgress,type:e.projectState.projectCreationType,canCreateNewVersion:!e.projectState.isProceeding,baseProjectInfo:e.baseProjectState.info,canAddAudit:e.projectState.canAddAudit,canReferenceBaseProject:e.projectState.canReferenceBaseProject}}),(function(e){return{endProjectCreation:()=>{e(Le(!1)),e(Ze(void 0)),e(D(!0))},sendCreateProject:()=>{e(et())},sendCreateAudit:()=>{e(tt())},setProjectCreationType:t=>{e(Ze(t))},uploadContainer:(t,n,r)=>{e(ut(t,n,r))},loadCreateProjectOptions:()=>{e(bt())},referenceBaseProject:()=>e(Me())}}))(n6),o6=e=>{let{alerts:t,removeAlert:n}=e;const r=e=>"title"in e?e.title:"intlTitle"in e?e.intlTitle:"template"in e&&e.props.file.akPiirang?"document.isRestricted":"common.error.unknown",o=e=>e.message?e.message:e.intlMessage?e.intlMessage:"";return null!=t&&t.length?(0,C.jsx)(Kv,{size:.5,children:t.map((e=>(0,C.jsx)(Zv,{type:e.error?"danger":"success",icon:e.error?"error":"check_circle",onClose:()=>n(e.id),title:r(e)?(0,C.jsx)(N.FormattedMessage,{id:r(e)}):void 0,children:(0,C.jsxs)(C.Fragment,{children:[o(e)&&(0,C.jsx)(N.FormattedMessage,{id:o(e)}),"template"in e&&e.template===je.FileRestricted&&(0,C.jsx)(z4,{file:e.props.file})]})},"doc2--alert-"+e.id)))}):null};const i6=(0,E.connect)((function(e){return{alerts:e.uiState.alerts}}),(function(e){return{removeAlert:t=>{e(A(t))}}}))(o6),a6=E.useStore;let s6;const l6=e=>{let{applicationId:t,projectCreation:n,projectFiles:r,onFilesChange:o,loadCurrentProject:i,isCurrentProjectLoading:a,loadClassifiers:l,permissions:c,buttonConfig:u}=e;const{keycloak:d}=a6().getState();return(0,s.useEffect)((()=>{t&&(i(),l())}),[t,i,l,d.authenticated]),(0,s.useEffect)((()=>{if(void 0===o)return;if(r===tr)return;const e=JSON.stringify(r);if(e===s6)return;s6=e;const t=JSON.parse(e),n=Object.freeze(t);o(n)}),[r]),(0,C.jsxs)(Kv,{size:.5,children:[c.canRead&&!n&&!a&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i6,{}),(0,C.jsx)(Q4,{buttonConfig:u}),(0,C.jsx)(V4,{})]}),n&&!a&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i6,{}),(0,C.jsx)(r6,{})]})]})};const c6=(0,E.connect)((function(e){return{applicationId:e.projectState.applicationId,projectCreation:e.projectState.projectCreation,projectFiles:e.projectState.projectFiles,isCurrentProjectLoading:e.projectState.isLoadingCurrentProject,permissions:e.permissions.permissions}}),(function(e){return{loadCurrentProject:()=>{e(Qe())},loadClassifiers:()=>{e(rt()),e(ot())}}}))(l6),u6=e=>{let{error:t}=e;return(0,C.jsx)(Zv,{type:"danger",icon:"error",children:(0,C.jsxs)(C.Fragment,{children:["message"in t&&(0,C.jsx)(Yv,{children:t.message}),"intlMessage"in t&&(0,C.jsx)(N.FormattedMessage,{id:t.intlMessage})]})})},d6=e=>{let{file:t,errors:n,setFile:r,sendFile:o,clearFile:i,addError:l,clearErrors:c,grupp:u,projektiOsa:d,projektiStaadium:f,ehitised:p,responsePending:h,isAudit:g}=e;const m=(0,N.useIntl)();let v=!1,b=!0;if(t&&t.fileName){let e=t.fileName.split(".").pop();"ifc"===(null==e?void 0:e.toLowerCase())&&(v=!0,b=!1)}function y(e,n){if(!t)return;const o=a({},t);o[e]=n,r(o)}function x(e){return e.map((e=>({value:e.code,label:e.text})))}function w(e,t){return e.find((e=>{if(e.value===t)return{value:e.value,label:e.label}}))}const _=(0,s.useMemo)((()=>x(f)),[f]),S=(0,s.useMemo)((()=>x(d)),[d]),k=(0,s.useMemo)((()=>x(u)),[u]),E=(0,s.useMemo)((()=>[{value:"",label:"-"},{value:"Kõik",label:"Kõik"}].concat(x(p))),[p]);return(0,C.jsx)(h4,{toggleVisible:()=>i(),secondaryText:"button.close",onSecondary:function(){c(),i()},primaryText:"button.save",onPrimary:function(){(function(){if(!t)return!0;c();let e=!1;!b||void 0!==t.grupp&&null!==t.grupp&&0!==t.grupp.length||(l({field:"grupp",intlMessage:"popupEditFile.error.groupName"}),e=!0);!v||null!=t.ehitiseSeos&&""!=t.ehitiseSeos||(l({field:"ehitiseSeos",intlMessage:"popupEditFile.error.buildingRelation"}),e=!0);void 0!==t.projektiOsa&&null!==t.projektiOsa&&0!==t.projektiOsa.length||(l({field:"projektiOsa",intlMessage:"popupEditFile.error.projectType"}),e=!0);g||void 0!==t.projektiStaadium&&null!==t.projektiStaadium&&0!==t.projektiStaadium.length||(l({field:"projektiStaadium",intlMessage:"popupEditFile.error.projectStage"}),e=!0);return e})()||o()},size:8,visible:!!t,title:m.formatMessage({id:"popupEditFile.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsxs)(Kv,{size:1,children:[n.map(((e,t)=>(0,C.jsx)(u6,{error:e},"doc2--edit-error-".concat(t)))),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.fileName"}),tooltip:m.formatMessage({id:"popupEditFile.fileName.label"}),children:null==t?void 0:t.fileName})}),v&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.ehitiseSeosEhrKood"}),tooltip:m.formatMessage({id:"popupEditFile.ehitiseSeosEhrKood.label"}),required:v,children:(0,C.jsx)(s5,{id:"buildingConnection",label:"",options:E,onChange:e=>y("ehitiseSeos",e.value),value:w(E,null==t?void 0:t.ehitiseSeos),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:g?"popupEditFile.auditID":"popupEditFile.projectID"}),tooltip:m.formatMessage({id:g?"popupEditFile.auditID.label":"popupEditFile.projectID.label"}),children:(0,C.jsx)(y_,{id:"projektiTunnus",value:null==t?void 0:t.projektiTunnus,renderWithoutLabel:!0,hideLabel:!0,label:"",onChange:e=>y("projektiTunnus",e)})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.projectStage"}),tooltip:m.formatMessage({id:"popupEditFile.projectStage.label"}),required:!g,children:(0,C.jsx)(s5,{id:"projectStage",label:"",options:_,onChange:e=>y("projektiStaadium",e.value),value:w(_,null==t?void 0:t.projektiStaadium),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:g?"popupEditFile.auditType":"popupEditFile.projectType"}),tooltip:m.formatMessage({id:g?"popupEditFile.auditType.label":"popupEditFile.projectType.label"}),required:!0,children:(0,C.jsx)(s5,{id:"projectPart",label:"",options:S,onChange:e=>y("projektiOsa",e.value),value:w(S,null==t?void 0:t.projektiOsa),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.groupName"}),tooltip:m.formatMessage({id:"popupEditFile.groupName.label"}),required:b,children:(0,C.jsx)(s5,{id:"group",label:"",options:k,onChange:e=>y("grupp",e.value),value:w(k,null==t?void 0:t.grupp),hideLabel:!0,renderWithoutLabel:!0})})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:m.formatMessage({id:"popupEditFile.jrkNr"}),tooltip:m.formatMessage({id:"popupEditFile.jrkNr.label"}),children:(0,C.jsx)(y_,{id:"jrkNr",value:(null==t?void 0:t.jrkNr)||"",renderWithoutLabel:!0,hideLabel:!0,label:"",onChange:e=>y("jrkNr",e)})})})]})})};const f6=(0,E.connect)((function(e){return{file:e.editFileState.editFile,errors:e.editFileState.errors,projektiOsa:e.codeToTextState.projektiOsa,projektiStaadium:e.codeToTextState.projektiStaadium,grupp:e.codeToTextState.grupp,grupiMarksona:e.codeToTextState.grupiMarksona,ehitised:e.codeToTextState.ehitised,responsePending:e.editFileState.responsePending,isAudit:"AUDIT"===e.projectState.applicationType}}),(function(e){return{setFile:t=>{e(An(t))},clearFile:()=>{e(Dn())},sendFile:()=>{e(zn())},addError:t=>{e(Fn(t))},clearErrors:()=>{e(Ln())}}}))(d6);let p6=function(e){return e.ENABLE_SIGN_PROJEKTI_OSA="ENABLE_SIGN_PROJEKTI_OSA",e.SET_SIGN_CHALLENGE="SET_SIGN_CHALLENGE",e.SET_SIGN_SESSION="SET_SIGN_SESSION",e.COMPLETE_SIGNING="COMPLETE_SIGNING",e.TOGGLE_SIGN_IN_PROGRESS="TOGGLE_SIGN_IN_PROGRESS",e.CANCEL_SIGN_PROJEKTI_OSA="CANCEL_SIGN_PROJEKTI_OSA",e.SET_SIGN_METHOD="SET_SIGN_METHOD",e.SET_MOBILE_NUMBER="SET_MOBILE_NUMBER",e}({});function h6(e){return{type:p6.SET_SIGN_SESSION,payload:{text:e}}}function g6(){return{type:p6.COMPLETE_SIGNING,payload:{}}}function m6(e){return{type:p6.TOGGLE_SIGN_IN_PROGRESS,payload:{toggled:e}}}function v6(){return(e,t)=>{const{method:n}=t().signPopup;switch(n){case se.ID_CARD:e((async(e,t)=>{const{applicationId:n,projectId:r}=t().projectState,{projektiOsa:o,revision:i}=t().signPopup;if(n&&r&&o&&i)try{console.log("start signing with ID card"),e(m6(!0));const t={revision:i,projektiOsa:"SIGN_CONTAINER"===o?null:o},a=window.hwcrypto;if(!a)throw new TypeError("Could not find hwcrypto");const s=await a.getCertificate({lang:"et"});t.signingCertificate=Array.prototype.slice.call(s.encoded);const l="".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_ID_CARD,{applicationNumber:n,projectId:r}));console.log("posting body",t);const c=await ue()({method:"POST",url:l,headers:{"Content-Type":"application/json"},data:JSON.stringify(t)});if(200!==c.status)throw new RangeError("Unexpected response status code, expected 200, got ".concat(c.status));console.log("got response data",c.data),e(h6(c.data.sessionId));const u=new Uint8Array(xt.bg(c.data.dataToSign));let d=c.data.digestAlgorithm;d.startsWith("SHA")&&!d.startsWith("SHA-")&&(d=d.replace("SHA","SHA-"));const f={type:d,value:u};console.log("trying to sign",f);const p=await a.sign(s,f,{lang:"et"});console.log("got signature data",p);const h={signatureValue:xt.iI(p.value),sessionId:c.data.sessionId},g="".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_ID_CARD,{applicationNumber:n,projectId:r}));console.log("posting body",h);const m=await ue()({method:"POST",url:g,headers:{"Content-Type":"application/json"},data:JSON.stringify(h)});if(204!==m.status)throw new RangeError("Unexpected response status code, expected 200, got ".concat(c.status));console.log("successfully signed, got response data",m.data),e(be()),e(it()),e(g6())}catch(t){console.error(t),e(m6(!1)),e(g6()),he(t,e)}}));break;case se.MOBILE_ID:e(b6(se.MOBILE_ID));break;case se.SMART_ID:e(b6(se.SMART_ID))}}}function b6(e){return async(t,n)=>{const{applicationId:r,projectId:o}=n().projectState,{projektiOsa:i,revision:a,mobileNumber:s}=n().signPopup;if(!r||!o||!i||!a||e===se.MOBILE_ID&&!s)return;const l=e===se.MOBILE_ID?"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_MOBILE_ID,{applicationNumber:r,projectId:o})):"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.SIGN_SMART_ID,{applicationNumber:r,projectId:o})),c={revision:a,projektiOsa:"SIGN_CONTAINER"===i?null:i};t(m6(!0)),e===se.MOBILE_ID&&(c.phoneNumber=s),ue()({method:"POST",url:l,headers:{"Content-Type":"application/json"},data:JSON.stringify(c)}).then((n=>{var r;200===n.status&&(t(h6(n.data.sessionId)),t((r=n.data.challenge,{type:p6.SET_SIGN_CHALLENGE,payload:{text:r}})),t(function(e){return async(t,n)=>{const{applicationId:r,projectId:o}=n().projectState,{sessionId:i}=n().signPopup;if(!r||!o||!i)return;const a=e===se.MOBILE_ID?"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_MOBILE_ID,{applicationNumber:r,projectId:o})):"".concat(window.DOC2.API_BASE).concat(me(window.DOC2.FINALISE_SMART_ID,{applicationNumber:r,projectId:o})),s={sessionId:i};ue()({method:"POST",url:a,headers:{"Content-Type":"application/json"},data:JSON.stringify(s)}).catch((e=>{t(m6(!1)),he(e,t)})).finally((()=>{t(be()),t(it()),t(g6())}))}}(e)))})).catch((e=>{t(m6(!1)),t(g6()),he(e,t)}))}}const y6={hash:"",containerId:"",challengeId:"",signatureId:"",certificate:[],signature:[],newDoFailId:void 0,phoneNr:"+372",personIdentifier:"",doFailId:void 0,doDokuNr:"",addToExisting:!1};let x6=function(e){return e.SIGN_TYPE_ID_CARD="ID-kaart",e.SIGN_TYPE_MOBILE_ID="Mobiil-ID",e.SIGN_TYPE_SMART_ID="Smart-ID",e}({}),w6=function(e){return e.Hint="hint",e.Valid="valid",e.Error="error",e}({});const _6=function(e){if(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return a({text:e,type:w6.Error},n)}},S6=e=>{let{yupErrors:t,responseError:n,setSignType:r,signData:o,cleanError:i,setSignData:s,signType:l}=e;const c=(0,N.useIntl)();return(0,C.jsxs)(Bv,{gutter:0,gap:3,children:[n&&(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(Zv,{icon:"warning",type:"danger",children:c.formatMessage({id:n.id},n.values)})}),(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(T5,{id:"signing-type",inputType:"radio",items:[{id:x6.SIGN_TYPE_ID_CARD,label:x6.SIGN_TYPE_ID_CARD,value:x6.SIGN_TYPE_ID_CARD},{id:x6.SIGN_TYPE_MOBILE_ID,label:x6.SIGN_TYPE_MOBILE_ID,value:x6.SIGN_TYPE_MOBILE_ID},{id:x6.SIGN_TYPE_SMART_ID,label:x6.SIGN_TYPE_SMART_ID,value:x6.SIGN_TYPE_SMART_ID}],type:"filter",label:"",hideLabel:!0,renderWithoutLabel:!0,name:"signing",value:l,onChange:e=>{r(e)}})}),(0,C.jsx)(zv,{children:(0,C.jsx)(r3,{borderless:!0,padding:.5,children:(0,C.jsx)(i3,{children:(0,C.jsxs)(Bv,{gap:2,children:[l===x6.SIGN_TYPE_ID_CARD&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"id_card",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.id_card"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.id_card"})})]})})]}),l===x6.SIGN_TYPE_MOBILE_ID&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"sim_card",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.mobile_id"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.mobile_id.without_idCode"})}),(0,C.jsx)(y_,{id:"phone-number",label:c.formatMessage({id:"document.persons.phone"}),value:o.phoneNr,onChange:e=>(e=>{i("signData.phoneNr"),s(a(a({},o),{},{phoneNr:e}))})(e),required:!0,helper:_6((e=>{if(t)return t[e]?c.formatMessage({id:t[e]}):void 0})("signData.phoneNr")),placeholder:c.formatMessage({id:"document.persons.phone.placeholder"}),defaultValue:"+372"})]})})]}),l===x6.SIGN_TYPE_SMART_ID&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(zv,{xs:"auto",children:(0,C.jsx)(H2,{name:"smartphone",color:"primary",size:36})}),(0,C.jsx)(zv,{children:(0,C.jsxs)(Kv,{size:.5,children:[(0,C.jsx)(z2,{color:"primary",element:"h3",children:(0,C.jsx)(N.FormattedMessage,{id:"signing.modal.smart_id"})}),(0,C.jsx)(z2,{children:c.formatMessage({id:"signing.modal.header.smart_id.without_idCode"})})]})})]})]})})})})]})},k6=G4.object({signData:G4.object({phoneNr:G4.string().test("validate-phoneNr","validate.phoneNr",(function(e){const t=this.options.context;return(null==t?void 0:t.signType)!==x6.SIGN_TYPE_MOBILE_ID||!!(n=e)&&/^\+372\d{7,10}$/.test(n);var n}))})}),E6=e=>{let{challenge:t,revision:n,onContinue:r,onCancel:o,setSignMethod:i,setMobileNumber:a}=e;const[l,c]=(0,s.useState)(y6),[u,d]=(0,s.useState)(x6.SIGN_TYPE_ID_CARD),{validate:f,errors:p,clearErrors:h}=Y4(k6),g=e=>{h(),m(),d(e),(e=>{switch(e){case x6.SIGN_TYPE_ID_CARD:i(se.ID_CARD);break;case x6.SIGN_TYPE_MOBILE_ID:i(se.MOBILE_ID);break;case x6.SIGN_TYPE_SMART_ID:i(se.SMART_ID)}})(e)},m=()=>{c(y6)};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(h4,{toggleVisible:()=>o(),primaryText:"button.sign",secondaryText:"button.cancel",onPrimary:()=>{f({signData:l},(()=>{r()}),{signType:u})},onSecondary:()=>{h(),m(),d(x6.SIGN_TYPE_ID_CARD),o()},primaryColor:"positive",size:6,visible:!!n,title:"signing",cardProps:{border:"top-positive-main"},children:(0,C.jsx)(Kv,{size:1,children:(0,C.jsx)(S6,{setSignData:e=>{return a((t=e).phoneNr),void c(t);var t},signData:l,yupErrors:p,cleanError:e=>h(e),setSignType:e=>g(e),signType:u})})}),u!==x6.SIGN_TYPE_ID_CARD&&t&&(0,C.jsx)(h4,{visible:!!t,toggleVisible:()=>o(),secondaryText:"button.cancel",onSecondary:()=>o(),title:u===x6.SIGN_TYPE_MOBILE_ID?"signing.modal.header.mobile_id.step2":"signing.modal.header.smart_id.step2",withoutCardHeader:!0,children:(0,C.jsx)(O2,{children:(0,C.jsx)(O2.Content,{background:"secondary",children:(0,C.jsx)(Yv,{modifiers:["bold","center"],element:"h3",children:t})})})})]})};const C6=(0,E.connect)((function(e){return{challenge:e.signPopup.challenge,revision:e.signPopup.revision}}),(function(e){return{onContinue:()=>{e(v6())},onCancel:()=>{e({type:p6.CANCEL_SIGN_PROJEKTI_OSA,payload:{}})},setSignMethod:t=>{e(function(e){return{type:p6.SET_SIGN_METHOD,payload:{method:e}}}(t))},setMobileNumber:t=>{var n;e((n=t,{type:p6.SET_MOBILE_NUMBER,payload:{text:n}}))}}}))(E6),j6=e=>{let{closePopup:t,files:n,requestReleaseFiles:r,requestsInProgress:o}=e;const i=(0,N.useIntl)();return(0,C.jsx)(h4,{toggleVisible:()=>t(),secondaryText:"button.close",onSecondary:()=>t(),primaryText:"button.save",onPrimary:function(){null!=n&&n.length&&r(n)},size:8,visible:!(null==n||!n.length),title:i.formatMessage({id:"popupReleaseAccess.title"}),cardProps:{border:"top-positive-main"},children:(0,C.jsx)(zv,{xs:12,children:(0,C.jsx)(_4,{label:i.formatMessage({id:"popupReleaseAccess.overview"}),children:(0,C.jsx)(tb,{style:"styled",children:null==n?void 0:n.map((e=>(0,C.jsx)(eb,{children:e.failiNimetus},e.id)))})})})})};const O6=(0,E.connect)((function(e){const t=new Set(e.restrictFilesState.releaseFileIds);return{files:t&&e.projectState.projectFiles.filter((e=>t.has(e.id))),requestsInProgress:e.restrictFilesState.requestsInProgress}}),(function(e){return{closePopup:()=>{e(Rt(void 0))},requestReleaseFiles:t=>{e(At(t))}}}))(j6),T6=e=>{let{applicationId:t,onFilesChange:n,buttonConfig:r,isProceeding:o}=e;const i=(0,N.useIntl)(),[a,l]=(0,s.useState)(!1);(0,s.useEffect)((()=>{Ci.dispatch({type:Fe.INITIALIZATION,payload:{value:{applicationId:t,isProceeding:null!=o&&o}}})}),[t,o]);const[c,u]=(0,s.useState)("buildingProject.header.default");return(0,s.useEffect)((()=>{Ci.subscribe((()=>{var e;const t=i.formatMessage({id:"AUDIT"===(null===(n=Ci.getState().projectState)||void 0===n?void 0:n.applicationType)?"buildingProject.header.audit":"buildingProject.header.default"});var n;const r=null!==(e=Ci.getState().projectState)&&void 0!==e&&e.isReference?" (".concat(i.formatMessage({id:"buildingProject.header.reference"}),")"):"";u(t+r),l(Ci.getState().keycloak.authenticated)}))}),[]),(0,C.jsx)(T2,{children:(0,C.jsx)(Cv,{locale:"et",children:(0,C.jsxs)("div",{id:"doc2",children:[(0,C.jsx)(i4,{defaultOpenItem:["ProjectFilePageSection"],"data-testid":"project-file-accordion",children:(0,C.jsxs)(s4,{id:"ProjectFilePageSection",children:[(0,C.jsx)(f4,{background:"primary",closeText:" ",openText:" ",children:c}),(0,C.jsx)(l4,{children:(0,C.jsx)(c6,{onFilesChange:n,buttonConfig:r})})]})}),(0,C.jsx)(f6,{}),(0,C.jsx)(v4,{}),(0,C.jsx)(k4,{}),(0,C.jsx)(O6,{}),(0,C.jsx)(C6,{})]})})})},I6=e=>{let t=Ii({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,C.jsx)(E.Provider,{store:Ci,children:(0,C.jsx)(T6,a({},t))})}})(),module.exports=i})();