mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
46 lines
1.6 MiB
46 lines
1.6 MiB
!function(){var e=["__cssMap","__cssVars","__breakpoints"],t=["theme","css","__css","sx"],n=["baseStyle"],r=["styleConfig"],o=["as","viewBox","color","focusable","children","className","__css"],i=["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"],a=["transitionEnd","transition"],s=["root"],l=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"],u=["ease","times","yoyo","flip","loop"],c=["transitionEnd","transition"],d=["transition","transitionEnd"],f=["transition","transitionEnd"],h=["willChange"],p=["transition","transitionEnd"],v=["in","unmountOnExit","animateOpacity","startingHeight","endingHeight","style","className","transition","transitionEnd"],g=["unmountOnExit","in","className","transition","transitionEnd","delay"],m=["unmountOnExit","in","reverse","initialScale","className","transition","transitionEnd","delay"],y=["direction","style","unmountOnExit","in","className","transition","transitionEnd","delay","motionProps"],b=["unmountOnExit","in","reverse","className","offsetX","offsetY","transition","transitionEnd","delay"],w=["onChange","defaultIndex","index","allowMultiple","allowToggle"],k=["isDisabled","isFocusable","id"],x=["htmlProps"],S=["className","motionProps"],C=["children","reduceMotion"],_=["htmlProps","descendants"],E=["label","thickness","speed","emptyColor","className"],P=["status","addRole"],L=["htmlWidth","htmlHeight","alt"],O=["fallbackSrc","fallback","src","srcSet","align","fit","loading","ignoreFallback","crossOrigin","fallbackStrategy","referrerPolicy"],A=["children","className"],M=["label","placement","spacing","children","className","__css"],T=["isDisabled","isLoading","isActive","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"],I=["size","colorScheme","variant","className","spacing","isAttached","isDisabled"],R=["icon","children","isRound","aria-label"],N=["id","isRequired","isInvalid","isDisabled","isReadOnly"],D=["getRootProps","htmlProps"],z=["isDisabled","isInvalid","isReadOnly","isRequired"],j=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"],B=["className","children","requiredIndicator","optionalIndicator"],F=["isIndeterminate","isChecked"],H=["defaultChecked","isChecked","isFocusable","onChange","isIndeterminate","name","value","tabIndex","aria-label","aria-labelledby","aria-invalid"],V=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],W=["children","isDisabled","__css"],U=["htmlSize"],G=["children","className"],q=["placement"],Y=["placement"],Z=["className"],X=["className"],$=["ratio","children","className"],K=["className"],Q=["size","centerContent"],J=["size"],ee=["axis"],te=["className"],ne=["className","centerContent"],re=["borderLeftWidth","borderBottomWidth","borderTopWidth","borderRightWidth","borderWidth","borderStyle","borderColor"],oe=["className","orientation","__css"],ie=["direction","align","justify","wrap","basis","grow","shrink"],ae=["templateAreas","gap","rowGap","columnGap","column","row","autoFlow","autoRows","templateRows","autoColumns","templateColumns"],se=["area","colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart"],le=["className"],ue=["className"],ce=["className","isExternal"],de=["isExternal","target","rel","className"],fe=["className"],he=["children","styleType","stylePosition","spacing"],pe=["as"],ve=["as"],ge=["columns","spacingX","spacingY","spacing","minChildWidth"],me=["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"],ye=["className","align","decoration","casing"],be=["spacing","spacingX","spacingY","children","justify","direction","align","className","shouldWrapChildren"],we=["className"],ke=["ref","isDisabled","isFocusable","clickOnEnter","clickOnSpace","onMouseDown","onMouseUp","onClick","onKeyDown","onKeyUp","tabIndex","onMouseOver","onMouseLeave"],xe=["size","shadowColor","bg","style"],Se=["containerRef"],Ce=["className"],_e=["onClick","className"],Ee=["preset","motionProps"],Pe=["className","children","containerProps","motionProps"],Le=["className"],Oe=["className"],Ae=["className","transition","motionProps"],Me=["leastDestructiveRef"],Te=["className","children","motionProps","containerProps"],Ie=["focusInputOnChange","clampValueOnBlur","keepWithinRange","min","max","step","isReadOnly","isDisabled","isRequired","isInvalid","pattern","inputMode","allowMouseWheel","id","onChange","precision","name","aria-describedby","aria-label","aria-labelledby","onFocus","onBlur","onInvalid","getAriaValueText","isValidCharacter","format","parse"],Re=["htmlProps"],Ne=["closeOnBlur","closeOnEsc","initialFocusRef","id","returnFocusOnClose","autoFocus","arrowSize","arrowShadowColor","trigger","openDelay","closeDelay","isLazy","lazyBehavior","computePositionOnMount"],De=["children"],ze=["variants"],je=["rootProps","motionProps"],Be=["size","isIndeterminate"],Fe=["size","max","min","valueText","getValueText","value","capIsRound","children","thickness","color","trackColor","isIndeterminate"],He=["min","max","value","isIndeterminate","role"],Ve=["value","min","max","hasStripe","isAnimated","children","borderRadius","isIndeterminate","aria-label","aria-labelledby","title","role"],We=["children","placeholder","className"],Ue=["rootProps","placeholder","icon","color","height","h","minH","minHeight","iconColor","iconSize"],Ge=["children"],qe=["min","max","onChange","value","defaultValue","isReversed","direction","orientation","id","isDisabled","isReadOnly","onChangeStart","onChangeEnd","step","getAriaValueText","aria-valuetext","aria-label","aria-labelledby","name","focusThumbOnChange","minStepsBetweenThumbs"],Ye=["index"],Ze=["value"],Xe=["index"],$e=["getRootProps"],Ke=["min","max","onChange","value","defaultValue","isReversed","direction","orientation","id","isDisabled","isReadOnly","onChangeStart","onChangeEnd","step","getAriaValueText","aria-valuetext","aria-label","aria-labelledby","name","focusThumbOnChange"],Qe=["getInputProps","getRootProps"],Je=["spacing","children"],et=["defaultIndex","onChange","index","isManual","isLazy","lazyBehavior","orientation","direction"],tt=["isDisabled","isFocusable"],nt=["children"],rt=["children","className"],ot=["htmlProps","descendants"],it=["isFitted"],at=["className","rows"],st=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","closeOnScroll","closeOnPointerDown","closeOnEsc","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"],lt=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor","motionProps"],ut=["children","theme","toastOptions"],ct=["boundingBox","generationMode"],dt=["tooltip","styleClass","tooltipProps","asCheckbox","isChecked"],ft=["children","tooltip","tooltipProps","styleClass"],ht=["triggerComponent","children","styleClass","hasArrow"],pt=["label","labelFontSize","styleClass","isDisabled","showStepper","width","textAlign","isInvalid","value","onChange","min","max","isInteger","formControlProps","formLabelProps","numberInputFieldProps","numberInputStepperProps","tooltipProps"],vt=["label","isDisabled","validValues","tooltip","tooltipProps","size","fontSize","styleClass"],gt=["label","styleClass"],mt=["label","value","min","max","step","onChange","width","tooltipSuffix","withSliderMarks","sliderMarkLeftOffset","sliderMarkRightOffset","withInput","isInteger","inputWidth","inputReadOnly","withReset","hideTooltip","isCompact","handleReset","isResetDisabled","isSliderDisabled","isInputDisabled","styleClass","sliderFormControlProps","sliderFormLabelProps","sliderMarkProps","sliderTrackProps","sliderThumbProps","sliderNumberInputProps","sliderNumberInputFieldProps","sliderNumberInputStepperProps","sliderTooltipProps","sliderIAIIconButtonProps"],yt=["scope","children"],bt=["children"],wt=["children"],kt=["asChild"],xt=["scope","children"],St=["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"],Ct=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"],_t=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"],Et=["strategy"],Pt=["mainAxis","crossAxis","limiter"],Lt=["__scopePopper","virtualRef"],Ot=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions"],At=["__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopId","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus"],Mt=["__scopeRovingFocusGroup","focusable","active"],Tt=["__scopeMenu"],It=["forceMount"],Rt=["__scopeMenu","loop","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll"],Nt=["disabled","onSelect"],Dt=["__scopeMenu","disabled","textValue"],zt=["__scopeContextMenu"],jt=["__scopeContextMenu"],Bt=["__scopeContextMenu"],Ft=["label","isDisabled","width","formControlProps","formLabelProps","styleClass"],Ht=["label","styleClass","isDisabled","fontSize","width","size","isInvalid"],Vt=["iconButton"],Wt=["styleClass"];function Ut(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ut=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),s=new _(o||[]);return r(a,"_invoke",{value:k(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var d={};function f(){}function h(){}function p(){}var v={};l(v,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==t&&n.call(m,i)&&(v=m);var y=p.prototype=f.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,i,a,s){var l=c(e[r],e,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==kn(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function k(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=E,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Gt(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,o)}function qt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Gt(i,r,o,a,s,"next",e)}function s(e){Gt(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Yt(){return Yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Zt(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Yt.apply(this,arguments)}function Zt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nn(e)););return e}function Xt(e){var t="function"==typeof Map?new Map:void 0;return Xt=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return $t(e,arguments,nn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),vn(r,e)},Xt(e)}function $t(e,t,n){return $t=tn()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&vn(o,n.prototype),o},$t.apply(null,arguments)}function Kt(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Qt(e){var t=tn();return function(){var n,r=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jt(this,n)}}function Jt(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return en(e)}function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}function rn(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,mn(r.key),r)}}function on(e,t,n){return t&&rn(e.prototype,t),n&&rn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function an(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sn(e,t){if(null==e)return{};var n,r,o=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,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ln(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 un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){gn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cn(e){return function(e){if(Array.isArray(e))return Cn(e)}(e)||fn(e)||Sn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dn(e){return wn(e)||fn(e)||Sn(e)||bn()}function fn(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function hn(){hn=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),vn(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return pn(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=kn(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},hn.apply(this,arguments)}function pn(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&&vn(e,t)}function vn(e,t){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vn(e,t)}function gn(e,t,n){return(t=mn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mn(e){var t=function(e,t){if("object"!==kn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kn(t)?t:String(t)}function yn(e,t){return wn(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||Sn(e,t)||bn()}function bn(){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 wn(e){if(Array.isArray(e))return e}function kn(e){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kn(e)}function xn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Sn(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Sn(e,t){if(e){if("string"==typeof e)return Cn(e,t);var n=Object.prototype.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)?Cn(e,t):void 0}}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}System.register([],(function(Gt,Zt){"use strict";var $t=document.createElement("style");return $t.textContent="@font-face{font-family:Inter;src:url("+new URL("Inter-b9a8e5e2.ttf",Zt.meta.url).href+");font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url("+new URL("Inter-Bold-790c108b.ttf",Zt.meta.url).href+');font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}*{scrollbar-width:thick;scrollbar-color:var(--scrollbar-color) transparent}*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:var(--scrollbar-color);border-radius:8px;border:2px solid var(--scrollbar-color)}*::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color-hover);border:2px solid var(--scrollbar-color-hover)}::-webkit-scrollbar-button{background:transparent}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(26, 26, 32);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(46, 48, 58);--tab-panel-bg: rgb(36, 38, 48);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--slider-mark-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--notice-color: rgb(130, 71, 19);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39);--scrollbar-color: var(--accent-color);--scrollbar-color-hover: var(--accent-color-bright)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(208, 210, 212);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(196, 198, 200);--tab-panel-bg: rgb(206, 208, 210);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: var(--accent-color);--slider-mark-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--notice-color: rgb(255, 71, 90);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(167, 167, 171);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172);--scrollbar-color: rgb(180, 180, 184);--scrollbar-color-hover: rgb(150, 150, 154)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: rgb(36, 40, 44);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-mark-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--notice-color: rgb(130, 71, 19);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39);--scrollbar-color: var(--accent-color);--scrollbar-color-hover: var(--accent-color-bright)}@media (max-width: 600px){#root .app-content{padding:5px}#root .app-content .site-header{position:fixed;display:flex;height:100px;z-index:1}#root .app-content .site-header .site-header-left-side{position:absolute;display:flex;min-width:145px;float:left;padding-left:0}#root .app-content .site-header .site-header-right-side{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-template-rows:25px 25px 25px;grid-template-areas:"logoSpace logoSpace logoSpace sampler sampler sampler" "status status status status status status" "btn1 btn2 btn3 btn4 btn5 btn6";row-gap:15px}#root .app-content .site-header .site-header-right-side .chakra-popover__popper{grid-area:logoSpace}#root .app-content .site-header .site-header-right-side>:nth-child(1).chakra-text{grid-area:status;width:100%;display:flex;justify-content:center}#root .app-content .site-header .site-header-right-side>:nth-child(2){grid-area:sampler;display:flex;justify-content:center;align-items:center}#root .app-content .site-header .site-header-right-side>:nth-child(2) select{width:185px;margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper{right:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper svg{margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(3){grid-area:btn1}#root .app-content .site-header .site-header-right-side>:nth-child(4){grid-area:btn2}#root .app-content .site-header .site-header-right-side>:nth-child(6){grid-area:btn3}#root .app-content .site-header .site-header-right-side>:nth-child(7){grid-area:btn4}#root .app-content .site-header .site-header-right-side>:nth-child(8){grid-area:btn5}#root .app-content .site-header .site-header-right-side>:nth-child(9){grid-area:btn6}#root .app-content .app-tabs{position:fixed;display:flex;flex-direction:column;row-gap:15px;max-width:100%;overflow:hidden;margin-top:120px}#root .app-content .app-tabs .app-tabs-list{display:flex;justify-content:space-between}#root .app-content .app-tabs .app-tabs-panels{overflow:hidden;overflow-y:scroll}#root .app-content .app-tabs .app-tabs-panels .workarea-main{display:grid;grid-template-areas:"workarea" "options" "gallery";row-gap:15px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper{grid-area:options;width:100%;max-width:100%;height:inherit;overflow:inherit;padding:0 10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper .main-settings-row,#root .app-content .app-tabs .app-tabs-panels .workarea-main .parameters-panel-wrapper .advanced-parameters-item{max-width:100%}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper{grid-area:workarea}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .workarea-split-view{display:flex;flex-direction:column}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-options{column-gap:3px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .text-to-image-area{padding:0}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-preview{height:430px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button{row-gap:10px;padding:5px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button svg{width:2rem;height:2rem;margin-top:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-settings{display:flex;flex-wrap:wrap;row-gap:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-canvas-area .konvajs-content{height:400px!important}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper{grid-area:gallery;min-height:400px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper .image-gallery-popup{width:100%!important;max-width:100%!important}}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.site-header-right-side .lang-select-btn[data-selected=true],.site-header-right-side .lang-select-btn[data-selected=true]:hover{background-color:var(--accent-color)}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button:disabled:hover{background-color:var(--btn-base-color)}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.add-model-modal{display:flex}.add-model-modal-body{display:flex;flex-direction:column;row-gap:1rem;padding-bottom:2rem}.add-model-form{display:flex;flex-direction:column;row-gap:.5rem}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:var(--btn-base-color)}.invoke-btn:disabled:hover{background-color:var(--btn-base-color)}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:var(--btn-base-color)}.cancel-btn:disabled:hover{background-color:var(--btn-base-color)}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-settings,.main-settings-list{display:grid;row-gap:1rem}.main-settings-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-settings-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-settings-block .invokeai__number-input-form-label,.main-settings-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-settings-block .invokeai__select-label{margin:0}.advanced-parameters{padding-top:.5rem;display:grid;row-gap:.5rem}.advanced-parameters-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem;background-color:var(--tab-panel-bg)}.advanced-parameters-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-parameters-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-parameters-panel button{background-color:var(--btn-base-color)}.advanced-parameters-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-parameters-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-parameters-header{border-radius:.4rem;font-weight:700}.advanced-parameters-header[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.4rem .4rem 0 0}.advanced-parameters-header:hover{background-color:var(--tab-hover-color)}.upscale-settings{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--tab-list-text-inactive)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30;animation:popIn .3s ease-in}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}@keyframes popIn{0%{opacity:0;filter:blur(100)}to{opacity:1;filter:blur(0)}}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:24px;height:24px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.parameters-panel-wrapper-enter{transform:translate(-150%)}.parameters-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.parameters-panel-wrapper-exit{transform:translate(0)}.parameters-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.parameters-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.parameters-panel-wrapper::-webkit-scrollbar{display:none}.parameters-panel-wrapper .parameters-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.parameters-panel-wrapper .parameters-panel::-webkit-scrollbar{display:none}.parameters-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.parameters-panel-wrapper[data-pinned=false] .parameters-panel-margin{margin:1rem}.parameters-panel-wrapper .parameters-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.parameters-panel-wrapper .parameters-panel-pin-button[data-selected=true]{top:0;right:0}.parameters-panel-wrapper .parameters-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:var(--btn-base-color)}.floating-show-hide-button:disabled:hover{background-color:var(--btn-base-color)}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-canvas-container{display:flex;position:relative;height:100%;width:100%;border-radius:.5rem}.inpainting-canvas-wrapper{position:relative}.inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary)}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary)}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{color:var(--text-color-secondary)}.invokeai__switch-form-control .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary)}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;font-size:.9rem;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{padding-bottom:.5rem;border-radius:.5rem}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-mark-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color);font-family:Inter}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif}\n',document.head.appendChild($t),{execute:function(){var $t,Jt,tn,rn,ln,fn,vn,mn,bn,wn,Sn,Cn,_n,En,Pn,Ln,On,An,Mn,Tn,In,Rn,Nn,Dn,zn,jn,Bn,Fn,Hn,Vn,Wn,Un,Gn,qn,Yn,Zn,Xn,$n,Kn,Qn,Jn,er,tr,nr,rr;function or(e,t){for(var n=function(){var n=t[r];if("string"!=typeof n&&!Array.isArray(n)){var o=function(t){if("default"!==t&&!(t in e)){var r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:function(){return n[t]}})}};for(var i in n)o(i)}},r=0;r<t.length;r++)n();return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sr={},lr={get exports(){return sr},set exports(e){sr=e}},ur={},cr={},dr={get exports(){return cr},set exports(e){cr=e}},fr={},hr=Symbol.for("react.element"),pr=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),gr=Symbol.for("react.strict_mode"),mr=Symbol.for("react.profiler"),yr=Symbol.for("react.provider"),br=Symbol.for("react.context"),wr=Symbol.for("react.forward_ref"),kr=Symbol.for("react.suspense"),xr=Symbol.for("react.memo"),Sr=Symbol.for("react.lazy"),Cr=Symbol.iterator;var _r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Er=Object.assign,Pr={};function Lr(e,t,n){this.props=e,this.context=t,this.refs=Pr,this.updater=n||_r}function Or(){}function Ar(e,t,n){this.props=e,this.context=t,this.refs=Pr,this.updater=n||_r}Lr.prototype.isReactComponent={},Lr.prototype.setState=function(e,t){if("object"!==kn(e)&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},Or.prototype=Lr.prototype;var Mr=Ar.prototype=new Or;Mr.constructor=Ar,Er(Mr,Lr.prototype),Mr.isPureReactComponent=!0;var Tr=Array.isArray,Ir=Object.prototype.hasOwnProperty,Rr={current:null},Nr={key:!0,ref:!0,__self:!0,__source:!0};function Dr(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)Ir.call(t,r)&&!Nr.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:hr,type:e,key:i,ref:a,props:o,_owner:Rr.current}}function zr(e){return"object"===kn(e)&&null!==e&&e.$$typeof===hr}var jr=/\/+/g;function Br(e,t){return"object"===kn(e)&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function Fr(e,t,n,r,o){var i=kn(e);"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case hr:case pr:a=!0}}if(a)return o=o(a=e),e=""===r?"."+Br(a,0):r,Tr(o)?(n="",null!=e&&(n=e.replace(jr,"$&/")+"/"),Fr(o,t,n,"",(function(e){return e}))):null!=o&&(zr(o)&&(o=function(e,t){return{$$typeof:hr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(jr,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=""===r?".":r+":",Tr(e))for(var s=0;s<e.length;s++){var l=r+Br(i=e[s],s);a+=Fr(i,t,n,l,o)}else if(l=function(e){return null===e||"object"!==kn(e)?null:"function"==typeof(e=Cr&&e[Cr]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)a+=Fr(i=i.value,t,n,l=r+Br(i,s++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Hr(e,t,n){if(null==e)return e;var r=[],o=0;return Fr(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function Vr(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Wr={current:null},Ur={transition:null},Gr={ReactCurrentDispatcher:Wr,ReactCurrentBatchConfig:Ur,ReactCurrentOwner:Rr};fr.Children={map:Hr,forEach:function(e,t,n){Hr(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return Hr(e,(function(){t++})),t},toArray:function(e){return Hr(e,(function(e){return e}))||[]},only:function(e){if(!zr(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},fr.Component=Lr,fr.Fragment=vr,fr.Profiler=mr,fr.PureComponent=Ar,fr.StrictMode=gr,fr.Suspense=kr,fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gr,fr.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Er({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=Rr.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Ir.call(t,l)&&!Nr.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:hr,type:e.type,key:o,ref:i,props:r,_owner:a}},fr.createContext=function(e){return(e={$$typeof:br,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:yr,_context:e},e.Consumer=e},fr.createElement=Dr,fr.createFactory=function(e){var t=Dr.bind(null,e);return t.type=e,t},fr.createRef=function(){return{current:null}},fr.forwardRef=function(e){return{$$typeof:wr,render:e}},fr.isValidElement=zr,fr.lazy=function(e){return{$$typeof:Sr,_payload:{_status:-1,_result:e},_init:Vr}},fr.memo=function(e,t){return{$$typeof:xr,type:e,compare:void 0===t?null:t}},fr.startTransition=function(e){var t=Ur.transition;Ur.transition={};try{e()}finally{Ur.transition=t}},fr.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},fr.useCallback=function(e,t){return Wr.current.useCallback(e,t)},fr.useContext=function(e){return Wr.current.useContext(e)},fr.useDebugValue=function(){},fr.useDeferredValue=function(e){return Wr.current.useDeferredValue(e)},fr.useEffect=function(e,t){return Wr.current.useEffect(e,t)},fr.useId=function(){return Wr.current.useId()},fr.useImperativeHandle=function(e,t,n){return Wr.current.useImperativeHandle(e,t,n)},fr.useInsertionEffect=function(e,t){return Wr.current.useInsertionEffect(e,t)},fr.useLayoutEffect=function(e,t){return Wr.current.useLayoutEffect(e,t)},fr.useMemo=function(e,t){return Wr.current.useMemo(e,t)},fr.useReducer=function(e,t,n){return Wr.current.useReducer(e,t,n)},fr.useRef=function(e){return Wr.current.useRef(e)},fr.useState=function(e){return Wr.current.useState(e)},fr.useSyncExternalStore=function(e,t,n){return Wr.current.useSyncExternalStore(e,t,n)},fr.useTransition=function(){return Wr.current.useTransition()},fr.version="18.2.0",function(e){e.exports=fr}(dr);var qr=ar(cr),Yr=or({__proto__:null,default:qr},[cr]),Zr=cr,Xr=Symbol.for("react.element"),$r=Symbol.for("react.fragment"),Kr=Object.prototype.hasOwnProperty,Qr=Zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Jr={key:!0,ref:!0,__self:!0,__source:!0};function eo(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)Kr.call(t,r)&&!Jr.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Xr,type:e,key:i,ref:a,props:o,_owner:Qr.current}}ur.Fragment=$r,ur.jsx=eo,ur.jsxs=eo,function(e){e.exports=ur}(lr);var to=sr.Fragment,no=sr.jsx,ro=sr.jsxs,oo=Boolean(null==globalThis?void 0:globalThis.document)?cr.useLayoutEffect:cr.useEffect,io=cr.createContext({});function ao(){var e=cr.useContext(io);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}io.displayName="ColorModeContext";var so="chakra-ui-light",lo="chakra-ui-dark";var uo,co=(uo="chakra-ui-color-mode",{ssr:!1,type:"localStorage",get:function(e){if(!(null==globalThis?void 0:globalThis.document))return e;var t;try{t=localStorage.getItem(uo)||e}catch(Dhe){}return t||e},set:function(e){try{localStorage.setItem(uo,e)}catch(Dhe){}}}),fo=function(){};function ho(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}function po(e){var t=e.value,n=e.children,r=e.options,o=void 0===r?{}:r,i=o.useSystemColorMode,a=o.initialColorMode,s=o.disableTransitionOnChange,l=e.colorModeManager,u=void 0===l?co:l,c="dark"===a?"dark":"light",d=yn(cr.useState((function(){return ho(u,c)})),2),f=d[0],h=d[1],p=yn(cr.useState((function(){return ho(u)})),2),v=p[0],g=p[1],m=cr.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.preventTransition,n=void 0===t||t,r={setDataset:function(e){var t=n?r.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,null==t||t()},setClassName:function(e){document.body.classList.add(e?lo:so),document.body.classList.remove(e?so:lo)},query:function(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme:function(e){var t;return(null!==(t=r.query().matches)&&void 0!==t?t:"dark"===e)?"dark":"light"},addListener:function(e){var t=r.query(),n=function(t){e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(n):t.addEventListener("change",n),function(){"function"==typeof t.removeListener?t.removeListener(n):t.removeEventListener("change",n)}},preventTransition:function(){var e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),function(){window.getComputedStyle(document.body),requestAnimationFrame((function(){requestAnimationFrame((function(){document.head.removeChild(e)}))}))}}};return r}({preventTransition:s})}),[s]),y=m.getSystemTheme,b=m.setClassName,w=m.setDataset,k=m.addListener,x="system"!==a||f?f:v,S=cr.useCallback((function(e){var t="system"===e?y():e;h(t),b("dark"===t),w(t),u.set(t)}),[u,y,b,w]);oo((function(){"system"===a&&g(y())}),[]),cr.useEffect((function(){var e=u.get();S(e||("system"!==a?c:"system"))}),[u,c,a,S]);var C=cr.useCallback((function(){S("dark"===x?"light":"dark")}),[x,S]);cr.useEffect((function(){if(i)return k(S)}),[i,k,S]);var _=cr.useMemo((function(){return{colorMode:null!=t?t:x,toggleColorMode:t?fo:C,setColorMode:t?fo:S,forced:void 0!==t}}),[x,C,S,t]);return qr.createElement(io.Provider,{value:_},n)}po.displayName="ColorModeProvider";var vo={},go={get exports(){return vo},set exports(e){vo=e}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[o]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[a]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c="object"==kn(ir)&&ir&&ir.Object===Object&&ir,d="object"==("undefined"==typeof self?"undefined":kn(self))&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=t&&!t.nodeType&&t,p=h&&e&&!e.nodeType&&e,v=p&&p.exports===h,g=v&&c.process,m=function(){try{var e=p&&p.require&&p.require("util").types;return e||g&&g.binding&&g.binding("util")}catch(Dhe){}}(),y=m&&m.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var w,k=Array.prototype,x=Function.prototype,S=Object.prototype,C=f["__core-js_shared__"],_=x.toString,E=S.hasOwnProperty,P=(w=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",L=S.toString,O=_.call(Object),A=RegExp("^"+_.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=v?f.Buffer:void 0,T=f.Symbol,I=f.Uint8Array,R=M?M.allocUnsafe:void 0,N=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),D=Object.create,z=S.propertyIsEnumerable,j=k.splice,B=T?T.toStringTag:void 0,F=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(Dhe){}}(),H=M?M.isBuffer:void 0,V=Math.max,W=Date.now,U=fe(f,"Map"),G=fe(Object,"create"),q=function(){function e(){}return function(t){if(!Pe(t))return{};if(D)return D(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(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 Z(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 X(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 $(e){var t=this.__data__=new Z(e);this.size=t.size}function K(e,t){var n=xe(e),r=!n&&ke(e),o=!n&&!r&&Ce(e),i=!n&&!r&&!o&&Oe(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 u in e)!t&&!E.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||he(u,l))||s.push(u);return s}function Q(e,t,n){(void 0!==n&&!we(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];E.call(e,t)&&we(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(we(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Y.prototype.clear=function(){this.__data__=G?G(null):{},this.size=0},Y.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Y.prototype.get=function(e){var t=this.__data__;if(G){var r=t[e];return r===n?void 0:r}return E.call(t,e)?t[e]:void 0},Y.prototype.has=function(e){var t=this.__data__;return G?void 0!==t[e]:E.call(t,e)},Y.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=G&&void 0===t?n:t,this},Z.prototype.clear=function(){this.__data__=[],this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0)&&(n==t.length-1?t.pop():j.call(t,n,1),--this.size,!0)},Z.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Z.prototype.has=function(e){return ee(this.__data__,e)>-1},Z.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(U||Z),string:new Y}},X.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return de(this,e).get(e)},X.prototype.has=function(e){return de(this,e).has(e)},X.prototype.set=function(e,t){var n=de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$.prototype.clear=function(){this.__data__=new Z,this.size=0},$.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$.prototype.get=function(e){return this.__data__.get(e)},$.prototype.has=function(e){return this.__data__.has(e)},$.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!U||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};var ne,re=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[ne?a:++r];if(!1===t(o[s],s,o))break}return e};function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?function(e){var t=E.call(e,B),n=e[B];try{e[B]=void 0;var r=!0}catch(Dhe){}var o=L.call(e);r&&(t?e[B]=n:delete e[B]);return o}(e):function(e){return L.call(e)}(e)}function ie(e){return Le(e)&&oe(e)==o}function ae(e){return!(!Pe(e)||(t=e,P&&P in t))&&(_e(e)?A:s).test(function(e){if(null!=e){try{return _.call(e)}catch(Dhe){}try{return e+""}catch(Dhe){}}return""}(e));var t}function se(e){if(!Pe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=pe(e),n=[];for(var r in e)("constructor"!=r||!t&&E.call(e,r))&&n.push(r);return n}function le(e,t,n,r,o){e!==t&&re(t,(function(i,s){if(o||(o=new $),Pe(i))!function(e,t,n,r,o,i,s){var l=ve(e,n),u=ve(t,n),c=s.get(u);if(c)return void Q(e,n,c);var d=i?i(l,u,n+"",e,t,s):void 0,f=void 0===d;if(f){var h=xe(u),p=!h&&Ce(u),v=!h&&!p&&Oe(u);d=u,h||p||v?xe(l)?d=l:!function(e){return Le(e)&&Se(e)}(l)?p?(f=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=R?R(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(f=!1,g=u,m=!0?(y=g.buffer,b=new y.constructor(y.byteLength),new I(b).set(new I(y)),b):g.buffer,d=new g.constructor(m,g.byteOffset,g.length)):d=[]:d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(l):function(e){if(!Le(e)||oe(e)!=a)return!1;var t=N(e);if(null===t)return!0;var n=E.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_.call(n)==O}(u)||ke(u)?(d=l,ke(l)?d=function(e){return function(e,t,n,r){var o=!n;n||(n={});var i=-1,a=t.length;for(;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?te(n,s,l):J(n,s,l)}return n}(e,Ae(e))}(l):Pe(l)&&!_e(l)||(d=function(e){return"function"!=typeof e.constructor||pe(e)?{}:q(N(e))}(u))):f=!1}var g,m,y,b;f&&(s.set(u,d),o(d,u,r,i,s),s.delete(u));Q(e,n,d)}(e,t,s,n,le,r,o);else{var l=r?r(ve(e,s),i,s+"",e,t,o):void 0;void 0===l&&(l=i),Q(e,s,l)}}),Ae)}function ue(e,t){return be(function(e,t,n){return t=V(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=V(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),b(e,this,s)}}(e,t,Re),e+"")}var ce=F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:Ie(t),writable:!0})}:Re;function de(e,t){var n=e.__data__;return function(e){var t=kn(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ae(n)?n:void 0}function he(e,t){var n=kn(e);return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&l.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}function ve(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge,me,ye,be=(ge=ce,me=0,ye=0,function(){var e=W(),t=16-(e-ye);if(ye=e,t>0){if(++me>=800)return arguments[0]}else me=0;return ge.apply(void 0,arguments)});function we(e,t){return e===t||e!=e&&t!=t}var ke=ie(function(){return arguments}())?ie:function(e){return Le(e)&&E.call(e,"callee")&&!z.call(e,"callee")},xe=Array.isArray;function Se(e){return null!=e&&Ee(e.length)&&!_e(e)}var Ce=H||function(){return!1};function _e(e){if(!Pe(e))return!1;var t=oe(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Pe(e){var t=kn(e);return null!=e&&("object"==t||"function"==t)}function Le(e){return null!=e&&"object"==kn(e)}var Oe=y?function(e){return function(t){return e(t)}}(y):function(e){return Le(e)&&Ee(e.length)&&!!u[oe(e)]};function Ae(e){return Se(e)?K(e,!0):se(e)}var Me,Te=(Me=function(e,t,n,r){le(e,t,n,r)},ue((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Me.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Pe(n))return!1;var r=kn(t);return!!("number"==r?Se(n)&&he(t,n.length):"string"==r&&t in n)&&we(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Me(e,a,n,o)}return e})));function Ie(e){return function(){return e}}function Re(e){return e}e.exports=Te}(go,vo);var mo=vo;function yo(e){var t=kn(e);return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function bo(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 wo(e)?e.apply(void 0,n):e}var wo=function(e){return"function"==typeof e},ko=function(e){return"string"==typeof e?e.replace(/!(important)?$/,"").trim():e},xo=function(e,t){return function(n){var r=String(t),o=function(e){return/!(important)?$/.test(e)}(r),i=ko(r),a=e?"".concat(e,".").concat(i):i,s=yo(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=ko(s),o?"".concat(s," !important"):s}};function So(e){var t=e.scale,n=e.transform,r=e.compose;return function(e,o){var i,a=xo(t,e)(o),s=null!==(i=null==n?void 0:n(a,o))&&void 0!==i?i:a;return r&&(s=r(s,o)),s}}var Co=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}};function _o(e,t){return function(n){var r={property:n,scale:e};return r.transform=So({scale:e,transform:t}),r}}var Eo=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];var Po={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Lo={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};var Oo={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Ao="& > :not(style) ~ :not(style)",Mo=gn({},Ao,{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}),To=gn({},Ao,{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}),Io={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Ro=new Set(Object.values(Io)),No=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Do=function(e){return e.trim()};var zo=function(e){return"string"==typeof e&&e.includes("(")&&e.includes(")")};var jo=function(e){return function(t){return"".concat(e,"(").concat(t,")")}},Bo={filter:function(e){return"auto"!==e?e:Po},backdropFilter:function(e){return"auto"!==e?e:Lo},ring:function(e){return function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(Bo.px(e))},bgClip:function(e){return"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform:function(e){return"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))"].concat(Eo).join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)"].concat(Eo).join(" "):e},vh:function(e){return"$100vh"===e?"var(--chakra-vh)":e},px:function(e){if(null==e)return e;var t=function(e){var t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t.unitless||"number"==typeof e?"".concat(e,"px"):e},fraction:function(e){return"number"!=typeof e||e>1?e:"".concat(100*e,"%")},float:function(e,t){return"rtl"===t.direction?{left:"right",right:"left"}[e]:e},degree:function(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;var t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?"".concat(e,"deg"):e},gradient:function(e,t){return function(e,t){var n,r;if(null==e||No.has(e))return e;var o=null!==(n=null==(r=hn(/(^[a-z-A-Z]+)\(((.*))\)/g,{type:1,values:2}).exec(e))?void 0:r.groups)&&void 0!==n?n:{},i=o.type,a=o.values;if(!i||!a)return e;var s=i.includes("-gradient")?i:"".concat(i,"-gradient"),l=dn(a.split(",").map(Do).filter(Boolean)),u=l[0],c=l.slice(1);if(0===(null==c?void 0:c.length))return e;var d=u in Io?Io[u]:u;c.unshift(d);var f=c.map((function(e){if(Ro.has(e))return e;var n=e.indexOf(" "),r=yn(-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],2),o=r[0],i=r[1],a=zo(i)?i:i&&i.split(" "),s="colors.".concat(o),l=s in t.__cssMap?t.__cssMap[s].varRef:o;return a?[l].concat(cn(Array.isArray(a)?a:[a])).join(" "):l}));return"".concat(s,"(").concat(f.join(", "),")")}(e,null!=t?t:{})},blur:jo("blur"),opacity:jo("opacity"),brightness:jo("brightness"),contrast:jo("contrast"),dropShadow:jo("drop-shadow"),grayscale:jo("grayscale"),hueRotate:jo("hue-rotate"),invert:jo("invert"),saturate:jo("saturate"),sepia:jo("sepia"),bgImage:function(e){return null==e||zo(e)||No.has(e)?e:"url(".concat(e,")")},outline:function(e){var t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection:function(e){var t,n=null!==(t=Oo[e])&&void 0!==t?t:{},r=n.space,o=n.divide,i={flexDirection:e};return r&&(i[r]=1),o&&(i[o]=1),i}},Fo={borderWidths:_o("borderWidths"),borderStyles:_o("borderStyles"),colors:_o("colors"),borders:_o("borders"),radii:_o("radii",Bo.px),space:_o("space",Co(Bo.vh,Bo.px)),spaceT:_o("space",Co(Bo.vh,Bo.px)),degreeT:function(e){return{property:e,transform:Bo.degree}},prop:function(e,t,n){return un({property:e,scale:t},t&&{transform:So({scale:t,transform:n})})},propT:function(e,t){return{property:e,transform:t}},sizes:_o("sizes",Co(Bo.vh,Bo.px)),sizesT:_o("sizes",Co(Bo.vh,Bo.fraction)),shadows:_o("shadows"),logical:function(e){var t,n,r,o=e.property,i=e.scale,a=e.transform;return{scale:i,property:(t=o,n=t.rtl,r=t.ltr,function(e){return"rtl"===e.direction?n:r}),transform:i?So({scale:i,compose:a}):a}},blur:_o("blur",Bo.blur)},Ho={background:Fo.colors("background"),backgroundColor:Fo.colors("backgroundColor"),backgroundImage:Fo.propT("backgroundImage",Bo.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Bo.bgClip},bgSize:Fo.prop("backgroundSize"),bgPosition:Fo.prop("backgroundPosition"),bg:Fo.colors("background"),bgColor:Fo.colors("backgroundColor"),bgPos:Fo.prop("backgroundPosition"),bgRepeat:Fo.prop("backgroundRepeat"),bgAttachment:Fo.prop("backgroundAttachment"),bgGradient:Fo.propT("backgroundImage",Bo.gradient),bgClip:{transform:Bo.bgClip}};Object.assign(Ho,{bgImage:Ho.backgroundImage,bgImg:Ho.backgroundImage});var Vo={border:Fo.borders("border"),borderWidth:Fo.borderWidths("borderWidth"),borderStyle:Fo.borderStyles("borderStyle"),borderColor:Fo.colors("borderColor"),borderRadius:Fo.radii("borderRadius"),borderTop:Fo.borders("borderTop"),borderBlockStart:Fo.borders("borderBlockStart"),borderTopLeftRadius:Fo.radii("borderTopLeftRadius"),borderStartStartRadius:Fo.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:Fo.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:Fo.radii("borderTopRightRadius"),borderStartEndRadius:Fo.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:Fo.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:Fo.borders("borderRight"),borderInlineEnd:Fo.borders("borderInlineEnd"),borderBottom:Fo.borders("borderBottom"),borderBlockEnd:Fo.borders("borderBlockEnd"),borderBottomLeftRadius:Fo.radii("borderBottomLeftRadius"),borderBottomRightRadius:Fo.radii("borderBottomRightRadius"),borderLeft:Fo.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:Fo.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:Fo.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:Fo.borders(["borderLeft","borderRight"]),borderInline:Fo.borders("borderInline"),borderY:Fo.borders(["borderTop","borderBottom"]),borderBlock:Fo.borders("borderBlock"),borderTopWidth:Fo.borderWidths("borderTopWidth"),borderBlockStartWidth:Fo.borderWidths("borderBlockStartWidth"),borderTopColor:Fo.colors("borderTopColor"),borderBlockStartColor:Fo.colors("borderBlockStartColor"),borderTopStyle:Fo.borderStyles("borderTopStyle"),borderBlockStartStyle:Fo.borderStyles("borderBlockStartStyle"),borderBottomWidth:Fo.borderWidths("borderBottomWidth"),borderBlockEndWidth:Fo.borderWidths("borderBlockEndWidth"),borderBottomColor:Fo.colors("borderBottomColor"),borderBlockEndColor:Fo.colors("borderBlockEndColor"),borderBottomStyle:Fo.borderStyles("borderBottomStyle"),borderBlockEndStyle:Fo.borderStyles("borderBlockEndStyle"),borderLeftWidth:Fo.borderWidths("borderLeftWidth"),borderInlineStartWidth:Fo.borderWidths("borderInlineStartWidth"),borderLeftColor:Fo.colors("borderLeftColor"),borderInlineStartColor:Fo.colors("borderInlineStartColor"),borderLeftStyle:Fo.borderStyles("borderLeftStyle"),borderInlineStartStyle:Fo.borderStyles("borderInlineStartStyle"),borderRightWidth:Fo.borderWidths("borderRightWidth"),borderInlineEndWidth:Fo.borderWidths("borderInlineEndWidth"),borderRightColor:Fo.colors("borderRightColor"),borderInlineEndColor:Fo.colors("borderInlineEndColor"),borderRightStyle:Fo.borderStyles("borderRightStyle"),borderInlineEndStyle:Fo.borderStyles("borderInlineEndStyle"),borderTopRadius:Fo.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:Fo.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:Fo.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:Fo.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Vo,{rounded:Vo.borderRadius,roundedTop:Vo.borderTopRadius,roundedTopLeft:Vo.borderTopLeftRadius,roundedTopRight:Vo.borderTopRightRadius,roundedTopStart:Vo.borderStartStartRadius,roundedTopEnd:Vo.borderStartEndRadius,roundedBottom:Vo.borderBottomRadius,roundedBottomLeft:Vo.borderBottomLeftRadius,roundedBottomRight:Vo.borderBottomRightRadius,roundedBottomStart:Vo.borderEndStartRadius,roundedBottomEnd:Vo.borderEndEndRadius,roundedLeft:Vo.borderLeftRadius,roundedRight:Vo.borderRightRadius,roundedStart:Vo.borderInlineStartRadius,roundedEnd:Vo.borderInlineEndRadius,borderStart:Vo.borderInlineStart,borderEnd:Vo.borderInlineEnd,borderTopStartRadius:Vo.borderStartStartRadius,borderTopEndRadius:Vo.borderStartEndRadius,borderBottomStartRadius:Vo.borderEndStartRadius,borderBottomEndRadius:Vo.borderEndEndRadius,borderStartRadius:Vo.borderInlineStartRadius,borderEndRadius:Vo.borderInlineEndRadius,borderStartWidth:Vo.borderInlineStartWidth,borderEndWidth:Vo.borderInlineEndWidth,borderStartColor:Vo.borderInlineStartColor,borderEndColor:Vo.borderInlineEndColor,borderStartStyle:Vo.borderInlineStartStyle,borderEndStyle:Vo.borderInlineEndStyle});var Wo={color:Fo.colors("color"),textColor:Fo.colors("color"),fill:Fo.colors("fill"),stroke:Fo.colors("stroke")},Uo={boxShadow:Fo.shadows("boxShadow"),mixBlendMode:!0,blendMode:Fo.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:Fo.prop("backgroundBlendMode"),opacity:!0};Object.assign(Uo,{shadow:Uo.boxShadow});var Go={filter:{transform:Bo.filter},blur:Fo.blur("--chakra-blur"),brightness:Fo.propT("--chakra-brightness",Bo.brightness),contrast:Fo.propT("--chakra-contrast",Bo.contrast),hueRotate:Fo.degreeT("--chakra-hue-rotate"),invert:Fo.propT("--chakra-invert",Bo.invert),saturate:Fo.propT("--chakra-saturate",Bo.saturate),dropShadow:Fo.propT("--chakra-drop-shadow",Bo.dropShadow),backdropFilter:{transform:Bo.backdropFilter},backdropBlur:Fo.blur("--chakra-backdrop-blur"),backdropBrightness:Fo.propT("--chakra-backdrop-brightness",Bo.brightness),backdropContrast:Fo.propT("--chakra-backdrop-contrast",Bo.contrast),backdropHueRotate:Fo.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:Fo.propT("--chakra-backdrop-invert",Bo.invert),backdropSaturate:Fo.propT("--chakra-backdrop-saturate",Bo.saturate)},qo={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Bo.flexDirection},experimental_spaceX:{static:Mo,transform:So({scale:"space",transform:function(e){return null!==e?{"--chakra-space-x":e}:null}})},experimental_spaceY:{static:To,transform:So({scale:"space",transform:function(e){return null!=e?{"--chakra-space-y":e}:null}})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:Fo.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:Fo.space("gap"),rowGap:Fo.space("rowGap"),columnGap:Fo.space("columnGap")};Object.assign(qo,{flexDir:qo.flexDirection});var Yo={gridGap:Fo.space("gridGap"),gridColumnGap:Fo.space("gridColumnGap"),gridRowGap:Fo.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Zo={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Bo.outline},outlineOffset:!0,outlineColor:Fo.colors("outlineColor")},Xo={width:Fo.sizesT("width"),inlineSize:Fo.sizesT("inlineSize"),height:Fo.sizes("height"),blockSize:Fo.sizes("blockSize"),boxSize:Fo.sizes(["width","height"]),minWidth:Fo.sizes("minWidth"),minInlineSize:Fo.sizes("minInlineSize"),minHeight:Fo.sizes("minHeight"),minBlockSize:Fo.sizes("minBlockSize"),maxWidth:Fo.sizes("maxWidth"),maxInlineSize:Fo.sizes("maxInlineSize"),maxHeight:Fo.sizes("maxHeight"),maxBlockSize:Fo.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:Fo.propT("float",Bo.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Xo,{w:Xo.width,h:Xo.height,minW:Xo.minWidth,maxW:Xo.maxWidth,minH:Xo.minHeight,maxH:Xo.maxHeight,overscroll:Xo.overscrollBehavior,overscrollX:Xo.overscrollBehaviorX,overscrollY:Xo.overscrollBehaviorY});var $o={listStyleType:!0,listStylePosition:!0,listStylePos:Fo.prop("listStylePosition"),listStyleImage:!0,listStyleImg:Fo.prop("listStyleImage")};var Ko=function(e){var t=new WeakMap;return function(n,r,o,i){if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);var a=t.get(n);if(a.has(r))return a.get(r);var s=e(n,r,o,i);return a.set(r,s),s}}((function(e,t,n,r){var o="string"==typeof t?t.split("."):[t];for(r=0;r<o.length&&e;r+=1)e=e[o[r]];return void 0===e?n:e})),Qo={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Jo={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},ei=function(e,t,n){var r={},o=Ko(e,t,{});for(var i in o){i in n&&null!=n[i]||(r[i]=o[i])}return r},ti={srOnly:{transform:function(e){return!0===e?Qo:"focusable"===e?Jo:{}}},layerStyle:{processResult:!0,transform:function(e,t,n){return ei(t,"layerStyles.".concat(e),n)}},textStyle:{processResult:!0,transform:function(e,t,n){return ei(t,"textStyles.".concat(e),n)}},apply:{processResult:!0,transform:function(e,t,n){return ei(t,e,n)}}},ni={position:!0,pos:Fo.prop("position"),zIndex:Fo.prop("zIndex","zIndices"),inset:Fo.spaceT("inset"),insetX:Fo.spaceT(["left","right"]),insetInline:Fo.spaceT("insetInline"),insetY:Fo.spaceT(["top","bottom"]),insetBlock:Fo.spaceT("insetBlock"),top:Fo.spaceT("top"),insetBlockStart:Fo.spaceT("insetBlockStart"),bottom:Fo.spaceT("bottom"),insetBlockEnd:Fo.spaceT("insetBlockEnd"),left:Fo.spaceT("left"),insetInlineStart:Fo.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:Fo.spaceT("right"),insetInlineEnd:Fo.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(ni,{insetStart:ni.insetInlineStart,insetEnd:ni.insetInlineEnd});var ri={ring:{transform:Bo.ring},ringColor:Fo.colors("--chakra-ring-color"),ringOffset:Fo.prop("--chakra-ring-offset-width"),ringOffsetColor:Fo.colors("--chakra-ring-offset-color"),ringInset:Fo.prop("--chakra-ring-inset")},oi={margin:Fo.spaceT("margin"),marginTop:Fo.spaceT("marginTop"),marginBlockStart:Fo.spaceT("marginBlockStart"),marginRight:Fo.spaceT("marginRight"),marginInlineEnd:Fo.spaceT("marginInlineEnd"),marginBottom:Fo.spaceT("marginBottom"),marginBlockEnd:Fo.spaceT("marginBlockEnd"),marginLeft:Fo.spaceT("marginLeft"),marginInlineStart:Fo.spaceT("marginInlineStart"),marginX:Fo.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:Fo.spaceT("marginInline"),marginY:Fo.spaceT(["marginTop","marginBottom"]),marginBlock:Fo.spaceT("marginBlock"),padding:Fo.space("padding"),paddingTop:Fo.space("paddingTop"),paddingBlockStart:Fo.space("paddingBlockStart"),paddingRight:Fo.space("paddingRight"),paddingBottom:Fo.space("paddingBottom"),paddingBlockEnd:Fo.space("paddingBlockEnd"),paddingLeft:Fo.space("paddingLeft"),paddingInlineStart:Fo.space("paddingInlineStart"),paddingInlineEnd:Fo.space("paddingInlineEnd"),paddingX:Fo.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:Fo.space("paddingInline"),paddingY:Fo.space(["paddingTop","paddingBottom"]),paddingBlock:Fo.space("paddingBlock")};Object.assign(oi,{m:oi.margin,mt:oi.marginTop,mr:oi.marginRight,me:oi.marginInlineEnd,marginEnd:oi.marginInlineEnd,mb:oi.marginBottom,ml:oi.marginLeft,ms:oi.marginInlineStart,marginStart:oi.marginInlineStart,mx:oi.marginX,my:oi.marginY,p:oi.padding,pt:oi.paddingTop,py:oi.paddingY,px:oi.paddingX,pb:oi.paddingBottom,pl:oi.paddingLeft,ps:oi.paddingInlineStart,paddingStart:oi.paddingInlineStart,pr:oi.paddingRight,pe:oi.paddingInlineEnd,paddingEnd:oi.paddingInlineEnd});var ii={textDecorationColor:Fo.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:Fo.shadows("textShadow")},ai={clipPath:!0,transform:Fo.propT("transform",Bo.transform),transformOrigin:!0,translateX:Fo.spaceT("--chakra-translate-x"),translateY:Fo.spaceT("--chakra-translate-y"),skewX:Fo.degreeT("--chakra-skew-x"),skewY:Fo.degreeT("--chakra-skew-y"),scaleX:Fo.prop("--chakra-scale-x"),scaleY:Fo.prop("--chakra-scale-y"),scale:Fo.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:Fo.degreeT("--chakra-rotate")},si={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:Fo.prop("transitionDuration","transition.duration"),transitionProperty:Fo.prop("transitionProperty","transition.property"),transitionTimingFunction:Fo.prop("transitionTimingFunction","transition.easing")},li={fontFamily:Fo.prop("fontFamily","fonts"),fontSize:Fo.prop("fontSize","fontSizes",Bo.px),fontWeight:Fo.prop("fontWeight","fontWeights"),lineHeight:Fo.prop("lineHeight","lineHeights"),letterSpacing:Fo.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ui={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:Fo.spaceT("scrollMargin"),scrollMarginTop:Fo.spaceT("scrollMarginTop"),scrollMarginBottom:Fo.spaceT("scrollMarginBottom"),scrollMarginLeft:Fo.spaceT("scrollMarginLeft"),scrollMarginRight:Fo.spaceT("scrollMarginRight"),scrollMarginX:Fo.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:Fo.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:Fo.spaceT("scrollPadding"),scrollPaddingTop:Fo.spaceT("scrollPaddingTop"),scrollPaddingBottom:Fo.spaceT("scrollPaddingBottom"),scrollPaddingLeft:Fo.spaceT("scrollPaddingLeft"),scrollPaddingRight:Fo.spaceT("scrollPaddingRight"),scrollPaddingX:Fo.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:Fo.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function ci(e){return yo(e)&&e.reference?e.reference:String(e)}var di=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];return n.map(ci).join(" ".concat(e," ")).replace(/calc/g,"")},fi=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(di.apply(void 0,["+"].concat(t)),")")},hi=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(di.apply(void 0,["-"].concat(t)),")")},pi=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(di.apply(void 0,["*"].concat(t)),")")},vi=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(di.apply(void 0,["/"].concat(t)),")")},gi=function(e){var t=ci(e);return null==t||Number.isNaN(parseFloat(t))?pi(t,-1):String(t).startsWith("-")?String(t).slice(1):"-".concat(t)},mi=Object.assign((function(e){return{add:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mi(fi.apply(void 0,[e].concat(n)))},subtract:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mi(hi.apply(void 0,[e].concat(n)))},multiply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mi(pi.apply(void 0,[e].concat(n)))},divide:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mi(vi.apply(void 0,[e].concat(n)))},negate:function(){return mi(gi(e))},toString:function(){return e.toString()}}}),{add:fi,subtract:hi,multiply:pi,divide:vi,negate:gi});function yi(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(/\s+/g,t)}(e.toString());return function(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(function(e){if(e.includes("\\."))return e;var t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e}(t))}function bi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return[t,e].filter(Boolean).join("-")}function wi(e,t){return"var(".concat(e).concat(t?", ".concat(t):"",")")}function ki(e,t,n){var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return yi("--".concat(bi(e,t)))}(e,n);return{variable:r,reference:wi(r,t)}}function xi(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function Si(e){if(null==e)return e;var t=function(e){var t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t.unitless||"number"==typeof e?"".concat(e,"px"):e}var Ci=function(e,t){return parseInt(e[1],10)>parseInt(t[1],10)?1:-1},_i=function(e){return Object.fromEntries(Object.entries(e).sort(Ci))};function Ei(e){var t=_i(e);return Object.assign(Object.values(t),t)}function Pi(e){var t;if(!e)return e;var n=(e=null!==(t=Si(e))&&void 0!==t?t:e).endsWith("px")?-1:-.0625;return"number"==typeof e?"".concat(e+n):e.replace(/([0-9]+\.?[0-9]*)/,(function(e){return"".concat(parseFloat(e)+n)}))}function Li(e,t){var n=["@media screen"];return e&&n.push("and","(min-width: ".concat(Si(e),")")),t&&n.push("and","(max-width: ".concat(Si(t),")")),n.join(" ")}function Oi(e){var t;if(!e)return null;e.base=null!==(t=e.base)&&void 0!==t?t:"0px";var n=Ei(e),r=Object.entries(e).sort(Ci).map((function(e,t,n){var r,o=yn(e,2),i=o[0],a=o[1],s=yn(null!==(r=n[t+1])&&void 0!==r?r:[],2)[1];return s=parseFloat(s)>0?Pi(s):void 0,{_minW:Pi(a),breakpoint:i,minW:a,maxW:s,maxWQuery:Li(null,s),minWQuery:Li(a),minMaxQuery:Li(a,s)}})),o=function(e){var t=Object.keys(_i(e));return new Set(t)}(e),i=Array.from(o.values());return{keys:o,normalized:n,isResponsive:function(e){var t=Object.keys(e);return t.length>0&&t.every((function(e){return o.has(e)}))},asObject:_i(e),asArray:Ei(e),details:r,media:[null].concat(cn(n.map((function(e){return Li(e)})).slice(1))),toArrayValue:function(e){if(!yo(e))throw new Error("toArrayValue: value must be an object");for(var t=i.map((function(t){var n;return null!==(n=e[t])&&void 0!==n?n:null}));null===xi(t);)t.pop();return t},toObjectValue:function(e){if(!Array.isArray(e))throw new Error("toObjectValue: value must be an array");return e.reduce((function(e,t,n){var r=i[n];return null!=r&&null!=t&&(e[r]=t),e}),{})}}}var Ai=function(e,t){return"".concat(e,":hover ").concat(t,", ").concat(e,"[data-hover] ").concat(t)},Mi=function(e,t){return"".concat(e,":focus ").concat(t,", ").concat(e,"[data-focus] ").concat(t)},Ti=function(e,t){return"".concat(e,":focus-visible ").concat(t)},Ii=function(e,t){return"".concat(e,":focus-within ").concat(t)},Ri=function(e,t){return"".concat(e,":active ").concat(t,", ").concat(e,"[data-active] ").concat(t)},Ni=function(e,t){return"".concat(e,":disabled ").concat(t,", ").concat(e,"[data-disabled] ").concat(t)},Di=function(e,t){return"".concat(e,":invalid ").concat(t,", ").concat(e,"[data-invalid] ").concat(t)},zi=function(e,t){return"".concat(e,":checked ").concat(t,", ").concat(e,"[data-checked] ").concat(t)},ji=function(e,t){return"".concat(e,":placeholder-shown ").concat(t)},Bi=function(e){return Hi((function(t){return e(t,"&")}),"[role=group]","[data-group]",".group")},Fi=function(e){return Hi((function(t){return e(t,"~ &")}),"[data-peer]",".peer")},Hi=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];return n.map(e).join(", ")},Vi={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Bi(Ai),_peerHover:Fi(Ai),_groupFocus:Bi(Mi),_peerFocus:Fi(Mi),_groupFocusVisible:Bi(Ti),_peerFocusVisible:Fi(Ti),_groupActive:Bi(Ri),_peerActive:Fi(Ri),_groupDisabled:Bi(Ni),_peerDisabled:Fi(Ni),_groupInvalid:Bi(Di),_peerInvalid:Fi(Di),_groupChecked:Bi(zi),_peerChecked:Fi(zi),_groupFocusWithin:Bi(Ii),_peerFocusWithin:Fi(Ii),_peerPlaceholderShown:Fi(ji),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},Wi=Object.keys(Vi);function Ui(e,t){return ki(String(e).replace(/\./g,"-"),void 0,t)}function Gi(e,t){for(var n={},r={},o=function(){var o=yn(a[i],2),s=o[0],l=o[1],u=l.isSemantic,c=l.value,d=Ui(s,null==t?void 0:t.cssVarPrefix),f=d.variable,h=d.reference;if(!u){if(s.startsWith("space")){var p=dn(s.split(".")),v=p[0],g=p.slice(1),m="".concat(v,".-").concat(g.join(".")),y=mi.negate(c),b=mi.negate(h);r[m]={value:y,var:f,varRef:b}}return n[f]=c,r[s]={value:c,var:f,varRef:h},"continue"}var w=yo(c)?c:{default:c};n=mo(n,Object.entries(w).reduce((function(n,r){var o,i,a,l,u=yn(r,2),c=u[0],d=u[1],h=(a=d,l=[String(s).split(".")[0],a].join("."),e[l]?Ui(l,null==t?void 0:t.cssVarPrefix).reference:a);return"default"===c?(n[f]=h,n):(n[null!==(o=null==(i=Vi)?void 0:i[c])&&void 0!==o?o:c]=gn({},f,h),n)}),{})),r[s]={value:h,var:f,varRef:h}},i=0,a=Object.entries(e);i<a.length;i++)o();return{cssVars:n,cssMap:r}}var qi=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function Yi(e){return function(e,t){var n,r={},o=xn(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;i in e&&(r[i]=e[i])}}catch(a){o.e(a)}finally{o.f()}return r}(e,qi)}function Zi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return(yo(e)||Array.isArray(e))&&t?Object.entries(e).reduce((function(e,n){var r=yn(n,2),o=r[0],i=r[1];return yo(i)||Array.isArray(i)?Object.entries(Zi(i,t-1)).forEach((function(t){var n=yn(t,2),r=n[0],i=n[1];e["".concat(o,".").concat(r)]=i})):e[o]=i,e}),{}):e}function Xi(t){var n,r=function(t){return t.__cssMap,t.__cssVars,t.__breakpoints,sn(t,e)}(t),o=Yi(r),i=function(e){return e.semanticTokens}(r),a=function(e){var t,n,r=e.tokens,o=e.semanticTokens,i=Object.entries(null!==(t=Zi(r))&&void 0!==t?t:{}).map((function(e){var t=yn(e,2);return[t[0],{isSemantic:!1,value:t[1]}]})),a=Object.entries(null!==(n=Zi(o,1))&&void 0!==n?n:{}).map((function(e){var t=yn(e,2);return[t[0],{isSemantic:!0,value:t[1]}]}));return Object.fromEntries([].concat(cn(i),cn(a)))}({tokens:o,semanticTokens:i}),s=Gi(a,{cssVarPrefix:null==(n=r.config)?void 0:n.cssVarPrefix}),l=s.cssMap,u=s.cssVars;return Object.assign(r,{__cssVars:un(un({},{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"}),u),__cssMap:l,__breakpoints:Oi(r.breakpoints)}),r}var $i=mo({},Ho,Vo,Wo,qo,Xo,Go,ri,Zo,Yo,ti,ni,Uo,oi,ui,li,ii,ai,$o,si),Ki=Object.assign({},oi,Xo,qo,Yo,ni),Qi=Object.keys(Ki),Ji=[].concat(cn(Object.keys($i)),Wi),ea=un(un({},$i),Vi),ta=function(e){return e in ea},na=function(e){return function(t){if(!t.__breakpoints)return e;var n=t.__breakpoints,r=n.isResponsive,o=n.toArrayValue,i=n.media,a={};for(var s in e){var l=bo(e[s],t);if(null!=l)if(l=yo(l)&&r(l)?o(l):l,Array.isArray(l))for(var u=l.slice(0,i.length).length,c=0;c<u;c+=1){var d=null==i?void 0:i[c];d?(a[d]=a[d]||{},null!=l[c]&&(a[d][s]=l[c])):a[s]=l[c]}else a[s]=l}return a}};var ra=function(e,t){return e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t)},oa=function(e,t){var n,r;if(null==t)return t;var o=function(t){var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},i=function(e){var t;return null!==(t=o(e))&&void 0!==t?t:e},a=function(e){for(var t=[],n="",r=!1,o=0;o<e.length;o++){var i=e[o];"("===i?(r=!0,n+=i):")"===i?(r=!1,n+=i):","!==i||r?n+=i:(t.push(n),n="")}return(n=n.trim())&&t.push(n),t}(t),s=yn(a,2),l=s[0],u=s[1];return t=null!==(n=null!==(r=o(l))&&void 0!==r?r:i(u))&&void 0!==n?n:i(t)};var ia=function(e){return function(t){var n=function(e){var t=e.configs,n=void 0===t?{}:t,r=e.pseudos,o=void 0===r?{}:r,i=e.theme;return function e(t){var r,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=bo(t,i),l=na(s)(i),u={};for(var c in l){var d,f=bo(l[c],i);c in o&&(c=o[c]),ra(c,f)&&(f=oa(i,f));var h=n[c];if(!0===h&&(h={property:c}),yo(f)){var p;u[c]=null!==(p=u[c])&&void 0!==p?p:{},u[c]=mo({},u[c],e(f,!0))}else{var v=null!==(d=null==(r=null==h?void 0:h.transform)?void 0:r.call(h,f,i,s))&&void 0!==d?d:f;v=(null==h?void 0:h.processResult)?e(v,!0):v;var g=bo(null==h?void 0:h.property,i);if(!a&&(null==h?void 0:h.static)){var m=bo(h.static,i);u=mo({},u,m)}if(g&&Array.isArray(g)){var y,b=xn(g);try{for(b.s();!(y=b.n()).done;){u[y.value]=v}}catch(w){b.e(w)}finally{b.f()}}else g?"&"===g&&yo(v)?u=mo({},u,v):u[g]=v:yo(v)?u=mo({},u,v):u[c]=v}}return u}}({theme:t,pseudos:Vi,configs:$i});return n(e)}};function aa(e){return{definePartsStyle:function(e){return e},defineMultiStyleConfig:function(t){return un({parts:e},t)}}}function sa(e){var t=e.__breakpoints;return function(e,n,r,o){var i,a;if(t){var s={},l=function(e,t){return Array.isArray(e)?e:yo(e)?t(e):null!=e?[e]:void 0}(r,t.toArrayValue);if(!l)return s;for(var u=l.length,c=1===u,d=!!e.parts,f=function(){var r=t.details[h],u=t.details[function(e,t){for(var n=t+1;n<e.length;n++)if(null!=e[n])return n;return-1}(l,h)],f=Li(r.minW,null==u?void 0:u._minW),p=bo(null==(i=e[n])?void 0:i[l[h]],o);return p?d?(null==(a=e.parts)||a.forEach((function(e){mo(s,gn({},e,c?p[e]:gn({},f,p[e])))})),"continue"):d?void(s[f]=p):(c?mo(s,p):s[f]=p,"continue"):"continue"},h=0;h<u;h++)f();return s}}}function la(e){return function(t){var n,r=t.variant,o=t.size,i=sa(t.theme);return mo({},bo(null!==(n=e.baseStyle)&&void 0!==n?n:{},t),i(e,"sizes",o,t),i(e,"variants",r,t))}}function ua(e){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=xn(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(e,["styleConfig","size","variant","colorScheme"])}var ca=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Dhe){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),da="-ms-",fa="-moz-",ha="-webkit-",pa="comm",va="rule",ga="decl",ma="@keyframes",ya=Math.abs,ba=String.fromCharCode,wa=Object.assign;function ka(e){return e.trim()}function xa(e,t,n){return e.replace(t,n)}function Sa(e,t){return e.indexOf(t)}function Ca(e,t){return 0|e.charCodeAt(t)}function _a(e,t,n){return e.slice(t,n)}function Ea(e){return e.length}function Pa(e){return e.length}function La(e,t){return t.push(e),e}var Oa=1,Aa=1,Ma=0,Ta=0,Ia=0,Ra="";function Na(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Oa,column:Aa,length:a,return:""}}function Da(e,t){return wa(Na("",null,null,"",null,null,0),e,{length:-e.length},t)}function za(){return Ia=Ta>0?Ca(Ra,--Ta):0,Aa--,10===Ia&&(Aa=1,Oa--),Ia}function ja(){return Ia=Ta<Ma?Ca(Ra,Ta++):0,Aa++,10===Ia&&(Aa=1,Oa++),Ia}function Ba(){return Ca(Ra,Ta)}function Fa(){return Ta}function Ha(e,t){return _a(Ra,e,t)}function Va(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Wa(e){return Oa=Aa=1,Ma=Ea(Ra=e),Ta=0,[]}function Ua(e){return Ra="",e}function Ga(e){return ka(Ha(Ta-1,Za(91===e?e+2:40===e?e+1:e)))}function qa(e){for(;(Ia=Ba())&&Ia<33;)ja();return Va(e)>2||Va(Ia)>3?"":" "}function Ya(e,t){for(;--t&&ja()&&!(Ia<48||Ia>102||Ia>57&&Ia<65||Ia>70&&Ia<97););return Ha(e,Fa()+(t<6&&32==Ba()&&32==ja()))}function Za(e){for(;ja();)switch(Ia){case e:return Ta;case 34:case 39:34!==e&&39!==e&&Za(Ia);break;case 40:41===e&&Za(e);break;case 92:ja()}return Ta}function Xa(e,t){for(;ja()&&e+Ia!==57&&(e+Ia!==84||47!==Ba()););return"/*"+Ha(t,Ta-1)+"*"+ba(47===e?e:ja())}function $a(e){for(;!Va(Ba());)ja();return Ha(e,Ta)}function Ka(e){return Ua(Qa("",null,null,null,[""],e=Wa(e),0,[0],e))}function Qa(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,p=0,v=1,g=1,m=1,y=0,b="",w=o,k=i,x=r,S=b;g;)switch(p=y,y=ja()){case 40:if(108!=p&&58==Ca(S,d-1)){-1!=Sa(S+=xa(Ga(y),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:S+=Ga(y);break;case 9:case 10:case 13:case 32:S+=qa(p);break;case 92:S+=Ya(Fa()-1,7);continue;case 47:switch(Ba()){case 42:case 47:La(es(Xa(ja(),Fa()),t,n),l);break;default:S+="/"}break;case 123*v:s[u++]=Ea(S)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:h>0&&Ea(S)-d&&La(h>32?ts(S+";",r,n,d-1):ts(xa(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(La(x=Ja(S,t,n,u,c,o,s,b,w=[],k=[],d),i),123===y)if(0===c)Qa(S,t,x,x,w,i,d,s,k);else switch(99===f&&110===Ca(S,3)?100:f){case 100:case 109:case 115:Qa(e,x,x,r&&La(Ja(e,x,x,0,0,o,s,b,o,w=[],d),k),o,k,d,s,r?w:k);break;default:Qa(S,x,x,x,[""],k,0,s,k)}}u=c=h=0,v=m=1,b=S="",d=a;break;case 58:d=1+Ea(S),h=p;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==za())continue;switch(S+=ba(y),y*v){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(Ea(S)-1)*m,m=1;break;case 64:45===Ba()&&(S+=Ga(ja())),f=Ba(),c=d=Ea(b=S+=$a(Fa())),y++;break;case 45:45===p&&2==Ea(S)&&(v=0)}}return i}function Ja(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,f=0===o?i:[""],h=Pa(f),p=0,v=0,g=0;p<r;++p)for(var m=0,y=_a(e,d+1,d=ya(v=a[p])),b=e;m<h;++m)(b=ka(v>0?f[m]+" "+y:xa(y,/&\f/g,f[m])))&&(l[g++]=b);return Na(e,t,n,0===o?va:s,l,u,c)}function es(e,t,n){return Na(e,t,n,pa,ba(Ia),_a(e,2,-2),0)}function ts(e,t,n,r){return Na(e,t,n,ga,_a(e,0,r),_a(e,r+1,-1),r)}function ns(e,t){for(var n="",r=Pa(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function rs(e,t,n,r){switch(e.type){case"@import":case ga:return e.return=e.return||e.value;case pa:return"";case ma:return e.return=e.value+"{"+ns(e.children,r)+"}";case va:e.value=e.props.join(",")}return Ea(n=ns(e.children,r))?e.return=e.value+"{"+n+"}":""}var os=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function is(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var as=function(e,t,n){for(var r=0,o=0;r=o,o=Ba(),38===r&&12===o&&(t[n]=1),!Va(o);)ja();return Ha(e,Ta)},ss=function(e,t){return Ua(function(e,t){var n=-1,r=44;do{switch(Va(r)){case 0:38===r&&12===Ba()&&(t[n]=1),e[n]+=as(Ta-1,t,n);break;case 2:e[n]+=Ga(r);break;case 4:if(44===r){e[++n]=58===Ba()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ba(r)}}while(r=ja());return e}(Wa(e),t))},ls=new WeakMap,us=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ls.get(n))&&!r){ls.set(e,!0);for(var o=[],i=ss(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},cs=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ds(e,t){switch(function(e,t){return 45^Ca(e,0)?(((t<<2^Ca(e,0))<<2^Ca(e,1))<<2^Ca(e,2))<<2^Ca(e,3):0}(e,t)){case 5103:return ha+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ha+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ha+e+fa+e+da+e+e;case 6828:case 4268:return ha+e+da+e+e;case 6165:return ha+e+da+"flex-"+e+e;case 5187:return ha+e+xa(e,/(\w+).+(:[^]+)/,ha+"box-$1$2"+da+"flex-$1$2")+e;case 5443:return ha+e+da+"flex-item-"+xa(e,/flex-|-self/,"")+e;case 4675:return ha+e+da+"flex-line-pack"+xa(e,/align-content|flex-|-self/,"")+e;case 5548:return ha+e+da+xa(e,"shrink","negative")+e;case 5292:return ha+e+da+xa(e,"basis","preferred-size")+e;case 6060:return ha+"box-"+xa(e,"-grow","")+ha+e+da+xa(e,"grow","positive")+e;case 4554:return ha+xa(e,/([^-])(transform)/g,"$1"+ha+"$2")+e;case 6187:return xa(xa(xa(e,/(zoom-|grab)/,ha+"$1"),/(image-set)/,ha+"$1"),e,"")+e;case 5495:case 3959:return xa(e,/(image-set\([^]*)/,ha+"$1$`$1");case 4968:return xa(xa(e,/(.+:)(flex-)?(.*)/,ha+"box-pack:$3"+da+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ha+e+e;case 4095:case 3583:case 4068:case 2532:return xa(e,/(.+)-inline(.+)/,ha+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ea(e)-1-t>6)switch(Ca(e,t+1)){case 109:if(45!==Ca(e,t+4))break;case 102:return xa(e,/(.+:)(.+)-([^]+)/,"$1"+ha+"$2-$3$1"+fa+(108==Ca(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Sa(e,"stretch")?ds(xa(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ca(e,t+1))break;case 6444:switch(Ca(e,Ea(e)-3-(~Sa(e,"!important")&&10))){case 107:return xa(e,":",":"+ha)+e;case 101:return xa(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ha+(45===Ca(e,14)?"inline-":"")+"box$3$1"+ha+"$2$3$1"+da+"$2box$3")+e}break;case 5936:switch(Ca(e,t+11)){case 114:return ha+e+da+xa(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ha+e+da+xa(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ha+e+da+xa(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ha+e+da+e+e}return e}var fs=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ga:e.return=ds(e.value,e.length);break;case ma:return ns([Da(e,{value:xa(e.value,"@","@"+ha)})],r);case va:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ns([Da(e,{props:[xa(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ns([Da(e,{props:[xa(t,/:(plac\w+)/,":"+ha+"input-$1")]}),Da(e,{props:[xa(t,/:(plac\w+)/,":-moz-$1")]}),Da(e,{props:[xa(t,/:(plac\w+)/,da+"input-$1")]})],r)}return""}))}}],hs=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||fs,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u,c=[rs,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=Pa(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([us,cs].concat(i,c));o=function(e,t,n,r){l=n,function(e){ns(Ka(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new ca({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return f.sheet.hydrate(s),f};function ps(){return ps=Object.assign?Object.assign.bind():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},ps.apply(this,arguments)}var vs={},gs={get exports(){return vs},set exports(e){vs=e}},ms={},ys="function"==typeof Symbol&&Symbol.for,bs=ys?Symbol.for("react.element"):60103,ws=ys?Symbol.for("react.portal"):60106,ks=ys?Symbol.for("react.fragment"):60107,xs=ys?Symbol.for("react.strict_mode"):60108,Ss=ys?Symbol.for("react.profiler"):60114,Cs=ys?Symbol.for("react.provider"):60109,_s=ys?Symbol.for("react.context"):60110,Es=ys?Symbol.for("react.async_mode"):60111,Ps=ys?Symbol.for("react.concurrent_mode"):60111,Ls=ys?Symbol.for("react.forward_ref"):60112,Os=ys?Symbol.for("react.suspense"):60113,As=ys?Symbol.for("react.suspense_list"):60120,Ms=ys?Symbol.for("react.memo"):60115,Ts=ys?Symbol.for("react.lazy"):60116,Is=ys?Symbol.for("react.block"):60121,Rs=ys?Symbol.for("react.fundamental"):60117,Ns=ys?Symbol.for("react.responder"):60118,Ds=ys?Symbol.for("react.scope"):60119;function zs(e){if("object"===kn(e)&&null!==e){var t=e.$$typeof;switch(t){case bs:switch(e=e.type){case Es:case Ps:case ks:case Ss:case xs:case Os:return e;default:switch(e=e&&e.$$typeof){case _s:case Ls:case Ts:case Ms:case Cs:return e;default:return t}}case ws:return t}}}function js(e){return zs(e)===Ps}ms.AsyncMode=Es,ms.ConcurrentMode=Ps,ms.ContextConsumer=_s,ms.ContextProvider=Cs,ms.Element=bs,ms.ForwardRef=Ls,ms.Fragment=ks,ms.Lazy=Ts,ms.Memo=Ms,ms.Portal=ws,ms.Profiler=Ss,ms.StrictMode=xs,ms.Suspense=Os,ms.isAsyncMode=function(e){return js(e)||zs(e)===Es},ms.isConcurrentMode=js,ms.isContextConsumer=function(e){return zs(e)===_s},ms.isContextProvider=function(e){return zs(e)===Cs},ms.isElement=function(e){return"object"===kn(e)&&null!==e&&e.$$typeof===bs},ms.isForwardRef=function(e){return zs(e)===Ls},ms.isFragment=function(e){return zs(e)===ks},ms.isLazy=function(e){return zs(e)===Ts},ms.isMemo=function(e){return zs(e)===Ms},ms.isPortal=function(e){return zs(e)===ws},ms.isProfiler=function(e){return zs(e)===Ss},ms.isStrictMode=function(e){return zs(e)===xs},ms.isSuspense=function(e){return zs(e)===Os},ms.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ks||e===Ps||e===Ss||e===xs||e===Os||e===As||"object"===kn(e)&&null!==e&&(e.$$typeof===Ts||e.$$typeof===Ms||e.$$typeof===Cs||e.$$typeof===_s||e.$$typeof===Ls||e.$$typeof===Rs||e.$$typeof===Ns||e.$$typeof===Ds||e.$$typeof===Is)},ms.typeOf=zs,function(e){e.exports=ms}(gs);var Bs=vs,Fs={};Fs[Bs.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fs[Bs.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Hs(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Vs=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ws=function(e,t,n){Vs(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Us={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Gs=/[A-Z]|^ms/g,qs=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ys=function(e){return 45===e.charCodeAt(1)},Zs=function(e){return null!=e&&"boolean"!=typeof e},Xs=is((function(e){return Ys(e)?e:e.replace(Gs,"-$&").toLowerCase()})),$s=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(qs,(function(e,t,n){return Qs={name:t,styles:n,next:Qs},t}))}return 1===Us[e]||Ys(e)||"number"!=typeof t||0===t?t:t+"px"};function Ks(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(kn(n)){case"boolean":return"";case"object":if(1===n.anim)return Qs={name:n.name,styles:n.styles,next:Qs},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Qs={name:r.name,styles:r.styles,next:Qs},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ks(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==kn(a))null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Zs(a)&&(r+=Xs(i)+":"+$s(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Ks(e,t,a);switch(i){case"animation":case"animationName":r+=Xs(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Zs(a[l])&&(r+=Xs(i)+":"+$s(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Qs,i=n(e);return Qs=o,Ks(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Qs,Js=/label:\s*([^\s;\n{]+)\s*(;|$)/g,el=function(e,t,n){if(1===e.length&&"object"===kn(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Qs=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ks(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Ks(n,t,e[a]),r&&(o+=i[a]);Js.lastIndex=0;for(var s,l="";null!==(s=Js.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:Qs}},tl=!!Yr.useInsertionEffect&&Yr.useInsertionEffect,nl=tl||function(e){return e()},rl=tl||cr.useLayoutEffect,ol=cr.createContext("undefined"!=typeof HTMLElement?hs({key:"css"}):null),il=ol.Provider,al=function(e){return cr.forwardRef((function(t,n){var r=cr.useContext(ol);return e(t,r,n)}))},sl=cr.createContext({}),ll=os((function(e){return os((function(t){return function(e,t){return"function"==typeof t?t(e):ps({},e,t)}(e,t)}))})),ul=function(e){var t=cr.useContext(sl);return e.theme!==t&&(t=ll(t)(e.theme)),cr.createElement(sl.Provider,{value:t},e.children)},cl=al((function(e,t){var n=e.styles,r=el([n],void 0,cr.useContext(sl)),o=cr.useRef();return rl((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),o.current=[n,i],function(){n.flush()}}),[t]),rl((function(){var e=o.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Ws(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function dl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return el(t)}var fl=function(){var e=dl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},hl=1/60*1e3,pl="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},vl="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(pl())}),hl)};var gl=!0,ml=!1,yl=!1,bl={delta:0,timestamp:0},wl=["read","update","preRender","render","postRender"],kl=wl.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,u=l?t:n;return a&&i.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[n,t])[0],(n=l[1]).length=0,r=t.length)for(var u=0;u<r;u++){var c=t[u];c(s),i.has(c)&&(a.schedule(c),e())}o=!1}};return a}((function(){return ml=!0})),e}),{}),xl=wl.reduce((function(e,t){var n=kl[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),ml||El(),n.schedule(e,t,r)},e}),{}),Sl=wl.reduce((function(e,t){return e[t]=kl[t].cancel,e}),{}),Cl=function(e){return kl[e].process(bl)},_l=function e(t){ml=!1,bl.delta=gl?hl:Math.max(Math.min(t-bl.timestamp,40),1),bl.timestamp=t,yl=!0,wl.forEach(Cl),yl=!1,ml&&(gl=!1,vl(e))},El=function(){ml=!0,gl=!0,yl||vl(_l)},Pl=function(){return bl};function Ll(e){return"function"==typeof e}function Ol(e,t){var n={};return Object.keys(e).forEach((function(r){t.includes(r)||(n[r]=e[r])})),n}var Al=function(e){var t=new WeakMap;return function(n,r,o,i){if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);var a=t.get(n);if(a.has(r))return a.get(r);var s=e(n,r,o,i);return a.set(r,s),s}}((function(e,t,n,r){var o="string"==typeof t?t.split("."):[t];for(r=0;r<o.length&&e;r+=1)e=e[o[r]];return void 0===e?n:e}));function Ml(e,t){var n={};return Object.keys(e).forEach((function(r){var o=e[r];t(o,r,e)&&(n[r]=o)})),n}var Tl=function(e){return Ml(e,(function(e){return null!=e}))};function Il(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Rl=Il();function Nl(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 Ll(e)?e.apply(void 0,n):e}function Dl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var zl=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jl=is((function(e){return zl.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Bl=function(e){return"theme"!==e},Fl=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?jl:Bl},Hl=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Vl=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Vs(t,n,r),nl((function(){return Ws(t,n,r)})),null},Wl=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=Hl(t,n,i),l=s||Fl(a),u=!l("as");return function(){var c=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;h<f;h++)d.push(c[h],c[0][h])}var p=al((function(e,t,n){var r=u&&e.as||a,i="",c=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=cr.useContext(sl)}"string"==typeof e.className?i=Hs(t.registered,c,e.className):null!=e.className&&(i=e.className+" ");var p=el(d.concat(c),t.registered,f);i+=t.key+"-"+p.name,void 0!==o&&(i+=" "+o);var v=u&&void 0===s?Fl(r):l,g={};for(var m in e)u&&"as"===m||v(m)&&(g[m]=e[m]);return g.className=i,g.ref=n,cr.createElement(cr.Fragment,null,cr.createElement(Vl,{cache:t,serialized:p,isStringTag:"string"==typeof r}),cr.createElement(r,g))}));return p.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=a,p.__emotion_styles=d,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+o}}),p.withComponent=function(t,r){return e(t,ps({},n,r,{shouldForwardProp:Hl(p,r,!0)})).apply(void 0,d)},p}}.bind();function Ul(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1;function r(){if(n)throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?");n=!0}function o(){r();for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];for(var a=0,s=o;a<s.length;a++){var u=s[a];t[u]=l(u)}return Ul(e,t)}function i(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i=0,a=r;i<a.length;i++){var s=a[i];s in t||(t[s]=l(s))}return Ul(e,t)}function a(){return Object.fromEntries(Object.entries(t).map((function(e){var t=yn(e,2);return[t[0],t[1].selector]})))}function s(){return Object.fromEntries(Object.entries(t).map((function(e){var t=yn(e,2);return[t[0],t[1].className]})))}function l(t){var n=(["container","root"].includes(null!=t?t:"")?[e]:[e,t]).filter(Boolean).join("__"),r="chakra-".concat(n);return{className:r,selector:".".concat(r),toString:function(){return t}}}var u={};return{parts:o,toPart:l,extend:i,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:u}}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Wl[e]=Wl(e)}));var Gl=Ul("accordion").parts("root","container","button","panel").extend("icon"),ql=Ul("alert").parts("title","description","container").extend("icon","spinner"),Yl=Ul("avatar").parts("label","badge","container").extend("excessLabel","group"),Zl=Ul("breadcrumb").parts("link","item","container").extend("separator");Ul("button").parts();var Xl=Ul("checkbox").parts("control","icon","container").extend("label");Ul("progress").parts("track","filledTrack").extend("label");var $l=Ul("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Kl=Ul("editable").parts("preview","input","textarea"),Ql=Ul("form").parts("container","requiredIndicator","helperText"),Jl=Ul("formError").parts("text","icon"),eu=Ul("input").parts("addon","field","element"),tu=Ul("list").parts("container","item","icon"),nu=Ul("menu").parts("button","list","item").extend("groupTitle","command","divider"),ru=Ul("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ou=Ul("numberinput").parts("root","field","stepperGroup","stepper");Ul("pininput").parts("field");var iu=Ul("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),au=Ul("progress").parts("label","filledTrack","track"),su=Ul("radio").parts("container","control","label"),lu=Ul("select").parts("field","icon"),uu=Ul("slider").parts("container","track","thumb","filledTrack","mark"),cu=Ul("stat").parts("container","label","helpText","number","icon"),du=Ul("switch").parts("container","track","thumb"),fu=Ul("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),hu=Ul("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),pu=Ul("tag").parts("container","label","closeButton"),vu=Ul("card").parts("container","header","body","footer");function gu(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function mu(e){return Math.min(1,Math.max(0,e))}function yu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function bu(e){return e<=1?"".concat(100*Number(e),"%"):e}function wu(e){return 1===e.length?"0"+e:String(e)}function ku(e,t,n){e=gu(e,255),t=gu(t,255),n=gu(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s:a,l:s}}function xu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Su(e,t,n){e=gu(e,255),t=gu(t,255),n=gu(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=r,s=r-o,l=0===r?0:s/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/s+(t<n?6:0);break;case t:i=(n-e)/s+2;break;case n:i=(e-t)/s+4}i/=6}return{h:i,s:l,v:a}}function Cu(e,t,n,r){var o=[wu(Math.round(e).toString(16)),wu(Math.round(t).toString(16)),wu(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function _u(e){return Math.round(255*parseFloat(e)).toString(16)}function Eu(e){return Pu(e)/255}function Pu(e){return parseInt(e,16)}var Lu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ou(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Lu[e])e=Lu[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Iu.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Iu.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Iu.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Iu.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Iu.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Iu.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Iu.hex8.exec(e),n)return{r:Pu(n[1]),g:Pu(n[2]),b:Pu(n[3]),a:Eu(n[4]),format:t?"name":"hex8"};if(n=Iu.hex6.exec(e),n)return{r:Pu(n[1]),g:Pu(n[2]),b:Pu(n[3]),format:t?"name":"hex"};if(n=Iu.hex4.exec(e),n)return{r:Pu(n[1]+n[1]),g:Pu(n[2]+n[2]),b:Pu(n[3]+n[3]),a:Eu(n[4]+n[4]),format:t?"name":"hex8"};if(n=Iu.hex3.exec(e),n)return{r:Pu(n[1]+n[1]),g:Pu(n[2]+n[2]),b:Pu(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===kn(e)&&(Ru(e.r)&&Ru(e.g)&&Ru(e.b)?(t=function(e,t,n){return{r:255*gu(e,255),g:255*gu(t,255),b:255*gu(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Ru(e.h)&&Ru(e.s)&&Ru(e.v)?(r=bu(e.s),o=bu(e.v),t=function(e,t,n){e=6*gu(e,360),t=gu(t,100),n=gu(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(e.h,r,o),a=!0,s="hsv"):Ru(e.h)&&Ru(e.s)&&Ru(e.l)&&(r=bu(e.s),i=bu(e.l),t=function(e,t,n){var r,o,i;if(e=gu(e,360),t=gu(t,100),n=gu(n,100),0===t)o=n,i=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=xu(s,a,e+1/3),o=xu(s,a,e),i=xu(s,a,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=yu(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Au="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Mu="[\\s|\\(]+(".concat(Au,")[,|\\s]+(").concat(Au,")[,|\\s]+(").concat(Au,")\\s*\\)?"),Tu="[\\s|\\(]+(".concat(Au,")[,|\\s]+(").concat(Au,")[,|\\s]+(").concat(Au,")[,|\\s]+(").concat(Au,")\\s*\\)?"),Iu={CSS_UNIT:new RegExp(Au),rgb:new RegExp("rgb"+Mu),rgba:new RegExp("rgba"+Tu),hsl:new RegExp("hsl"+Mu),hsla:new RegExp("hsla"+Tu),hsv:new RegExp("hsv"+Mu),hsva:new RegExp("hsva"+Tu),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ru(e){return Boolean(Iu.CSS_UNIT.exec(String(e)))}var Nu=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=Ou(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=yu(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=Su(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Su(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=ku(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=ku(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Cu(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var i=[wu(Math.round(e).toString(16)),wu(Math.round(t).toString(16)),wu(Math.round(n).toString(16)),wu(_u(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*gu(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*gu(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Cu(this.r,this.g,this.b,!1),t=0,n=Object.entries(Lu);t<n.length;t++){var r=n[t],o=r[0];if(e===r[1])return o}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=mu(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=mu(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=mu(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=mu(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Du(e){if(void 0===e&&(e={}),void 0!==e.count&&null!==e.count){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(Du(e));return e.count=t,n}var r=function(e,t){var n=ju(function(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if("string"==typeof e){var n=Fu.find((function(t){return t.name===e}));if(n){var r=Bu(n);if(r.hueRange)return r.hueRange}var o=new Nu(e);if(o.isValid){var i=o.toHsv().h;return[i,i]}}return[0,360]}(e),t);n<0&&(n=360+n);return n}(e.hue,e.seed),o=function(e,t){if("monochrome"===t.hue)return 0;if("random"===t.luminosity)return ju([0,100],t.seed);var n=zu(e).saturationRange,r=n[0],o=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=o-10;break;case"light":o=55}return ju([r,o],t.seed)}(r,e),i=function(e,t,n){var r=function(e,t){for(var n=zu(e).lowerBounds,r=0;r<n.length-1;r++){var o=n[r][0],i=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=o&&t<=a){var l=(s-i)/(a-o);return l*t+(i-l*o)}}return 0}(e,t),o=100;switch(n.luminosity){case"dark":o=r+20;break;case"light":r=(o+r)/2;break;case"random":r=0,o=100}return ju([r,o],n.seed)}(r,o,e),a={h:r,s:o,v:i};return void 0!==e.alpha&&(a.a=e.alpha),new Nu(a)}function zu(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=Fu;t<n.length;t++){var r=Bu(n[t]);if(r.hueRange&&e>=r.hueRange[0]&&e<=r.hueRange[1])return r}throw Error("Color not found")}function ju(e,t){if(void 0===t)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0,o=(t=(9301*t+49297)%233280)/233280;return Math.floor(r+o*(n-r))}function Bu(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],o=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,o]}}var Fu=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];var Hu=function(e,t,n){var r=function(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e}(e,"colors.".concat(t),t);return new Nu(r).isValid?r:n},Vu=function(e){return function(t){return"dark"===function(e){return function(t){var n=Hu(t,e);return new Nu(n).isDark()?"dark":"light"}}(e)(t)}},Wu=function(e,t){return function(n){var r=Hu(n,e);return new Nu(r).setAlpha(t).toRgbString()}};function Uu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1rem",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba(255, 255, 255, 0.15)";return{backgroundImage:"linear-gradient(\n 45deg,\n ".concat(t," 25%,\n transparent 25%,\n transparent 50%,\n ").concat(t," 50%,\n ").concat(t," 75%,\n transparent 75%,\n transparent\n )"),backgroundSize:"".concat(e," ").concat(e)}}function Gu(e){var t,n=Du().toHexString();return e&&(t=e,0!==Object.keys(t).length)?e.string&&e.colors?function(e,t){var n=0;if(0===e.length)return t[0];for(var r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n&=n;return n=(n%t.length+t.length)%t.length,t[n]}(e.string,e.colors):e.string&&!e.colors?function(e){var t=0;if(0===e.length)return t.toString();for(var n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t&=t;for(var r="#",o=0;o<3;o+=1){r+="00".concat((t>>8*o&255).toString(16)).substr(-2)}return r}(e.string):e.colors&&!e.string?function(e){return e[Math.floor(Math.random()*e.length)]}(e.colors):n:n}function qu(e,t){return function(n){return"dark"===n.colorMode?t:e}}function Yu(e){var t=e.orientation,n=e.vertical,r=e.horizontal;return t?"vertical"===t?n:r:{}}function Zu(e){return function(e){var t=kn(e);return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}(e)&&e.reference?e.reference:String(e)}var Xu=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];return n.map(Zu).join(" ".concat(e," ")).replace(/calc/g,"")},$u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(Xu.apply(void 0,["+"].concat(t)),")")},Ku=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(Xu.apply(void 0,["-"].concat(t)),")")},Qu=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(Xu.apply(void 0,["*"].concat(t)),")")},Ju=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc(".concat(Xu.apply(void 0,["/"].concat(t)),")")},ec=function(e){var t=Zu(e);return null==t||Number.isNaN(parseFloat(t))?Qu(t,-1):String(t).startsWith("-")?String(t).slice(1):"-".concat(t)},tc=Object.assign((function(e){return{add:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tc($u.apply(void 0,[e].concat(n)))},subtract:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tc(Ku.apply(void 0,[e].concat(n)))},multiply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tc(Qu.apply(void 0,[e].concat(n)))},divide:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tc(Ju.apply(void 0,[e].concat(n)))},negate:function(){return tc(ec(e))},toString:function(){return e.toString()}}}),{add:$u,subtract:Ku,multiply:Qu,divide:Ju,negate:ec});function nc(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:function(e){return!Number.isInteger(parseFloat(e.toString()))}(e)?t.replace(".","\\."):e}function rc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return[t,nc(e)].filter(Boolean).join("-")}function oc(e,t){return"var(".concat(nc(e)).concat(t?", ".concat(t):"",")")}function ic(e,t){var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(rc(e,t))}(e,null==t?void 0:t.prefix);return{variable:n,reference:oc(n,ac(null==t?void 0:t.fallback))}}function ac(e){return"string"==typeof e?e:null==e?void 0:e.reference}var sc=aa(Gl.keys),lc=sc.definePartsStyle,uc=(0,sc.defineMultiStyleConfig)({baseStyle:lc({container:{borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},button:{transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},panel:{pt:"2",px:"4",pb:"5"},icon:{fontSize:"1.25em"}})}),cc=aa(ql.keys),dc=cc.definePartsStyle,fc=cc.defineMultiStyleConfig,hc=ki("alert-fg"),pc=ki("alert-bg"),vc=dc({container:{bg:pc.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:hc.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:hc.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function gc(e){var t=e.theme,n=e.colorScheme,r=Wu("".concat(n,".200"),.16)(t);return{light:"colors.".concat(n,".100"),dark:r}}var mc=dc((function(e){var t,n,r=e.colorScheme,o=gc(e);return{container:(n={},gn(n,hc.variable,"colors.".concat(r,".500")),gn(n,pc.variable,o.light),gn(n,"_dark",(t={},gn(t,hc.variable,"colors.".concat(r,".200")),gn(t,pc.variable,o.dark),t)),n)}})),yc=dc((function(e){var t,n,r=e.colorScheme,o=gc(e);return{container:(n={},gn(n,hc.variable,"colors.".concat(r,".500")),gn(n,pc.variable,o.light),gn(n,"_dark",(t={},gn(t,hc.variable,"colors.".concat(r,".200")),gn(t,pc.variable,o.dark),t)),gn(n,"paddingStart","3"),gn(n,"borderStartWidth","4px"),gn(n,"borderStartColor",hc.reference),n)}})),bc=dc((function(e){var t,n,r=e.colorScheme,o=gc(e);return{container:(n={},gn(n,hc.variable,"colors.".concat(r,".500")),gn(n,pc.variable,o.light),gn(n,"_dark",(t={},gn(t,hc.variable,"colors.".concat(r,".200")),gn(t,pc.variable,o.dark),t)),gn(n,"pt","2"),gn(n,"borderTopWidth","4px"),gn(n,"borderTopColor",hc.reference),n)}})),wc=dc((function(e){var t,n,r=e.colorScheme;return{container:(n={},gn(n,hc.variable,"colors.white"),gn(n,pc.variable,"colors.".concat(r,".500")),gn(n,"_dark",(t={},gn(t,hc.variable,"colors.gray.900"),gn(t,pc.variable,"colors.".concat(r,".200")),t)),gn(n,"color",hc.reference),n)}})),kc=fc({baseStyle:vc,variants:{subtle:mc,"left-accent":yc,"top-accent":bc,solid:wc},defaultProps:{variant:"subtle",colorScheme:"blue"}}),xc={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Sc=un(un(un({},xc),{max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"}),{},{container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}}),Cc=function(e){return"function"==typeof e};function _c(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 Cc(e)?e.apply(void 0,n):e}var Ec=aa(Yl.keys),Pc=Ec.definePartsStyle,Lc=Ec.defineMultiStyleConfig,Oc=ki("avatar-border-color"),Ac=ki("avatar-bg"),Mc=(gn($t={borderRadius:"full",border:"0.2em solid"},Oc.variable,"white"),gn($t,"_dark",gn({},Oc.variable,"colors.gray.800")),gn($t,"borderColor",Oc.reference),$t),Tc=(gn(Jt={},Ac.variable,"colors.gray.200"),gn(Jt,"_dark",gn({},Ac.variable,"colors.whiteAlpha.400")),gn(Jt,"bgColor",Ac.reference),Jt),Ic=ki("avatar-background"),Rc=function(e){var t,n=e.name,r=e.theme,o=n?Gu({string:n}):"colors.gray.400",i="white";return Vu(o)(r)||(i="gray.800"),t={bg:Ic.reference,"&:not([data-loaded])":gn({},Ic.variable,o),color:i},gn(t,Oc.variable,"colors.white"),gn(t,"_dark",gn({},Oc.variable,"colors.gray.800")),gn(t,"borderColor",Oc.reference),gn(t,"verticalAlign","top"),t};function Nc(e){var t="100%"!==e?Sc[e]:void 0;return Pc({container:{width:e,height:e,fontSize:"calc(".concat(null!=t?t:e," / 2.5)")},excessLabel:{width:e,height:e},label:{fontSize:"calc(".concat(null!=t?t:e," / 2.5)"),lineHeight:"100%"!==e?null!=t?t:e:void 0}})}var Dc=Lc({baseStyle:Pc((function(e){return{badge:_c(Mc,e),excessLabel:_c(Tc,e),container:_c(Rc,e)}})),sizes:{"2xs":Nc(4),xs:Nc(6),sm:Nc(8),md:Nc(12),lg:Nc(16),xl:Nc(24),"2xl":Nc(32),full:Nc("100%")},defaultProps:{size:"md"}}),zc={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},jc=ki("badge-bg"),Bc=ki("badge-color"),Fc=function(e){var t,n,r=e.colorScheme,o=e.theme,i=Wu("".concat(r,".500"),.6)(o);return gn(n={},jc.variable,"colors.".concat(r,".500")),gn(n,Bc.variable,"colors.white"),gn(n,"_dark",(gn(t={},jc.variable,i),gn(t,Bc.variable,"colors.whiteAlpha.800"),t)),gn(n,"bg",jc.reference),gn(n,"color",Bc.reference),n},Hc=function(e){var t,n,r=e.colorScheme,o=e.theme,i=Wu("".concat(r,".200"),.16)(o);return gn(n={},jc.variable,"colors.".concat(r,".100")),gn(n,Bc.variable,"colors.".concat(r,".800")),gn(n,"_dark",(gn(t={},jc.variable,i),gn(t,Bc.variable,"colors.".concat(r,".200")),t)),gn(n,"bg",jc.reference),gn(n,"color",Bc.reference),n},Vc=function(e){var t,n=e.colorScheme,r=e.theme,o=Wu("".concat(n,".200"),.8)(r);return gn(t={},Bc.variable,"colors.".concat(n,".500")),gn(t,"_dark",gn({},Bc.variable,o)),gn(t,"color",Bc.reference),gn(t,"boxShadow","inset 0 0 0px 1px ".concat(Bc.reference)),t},Wc={baseStyle:zc,variants:{solid:Fc,subtle:Hc,outline:Vc},defaultProps:{variant:"subtle",colorScheme:"gray"}},Uc=aa(Zl.keys),Gc=(0,Uc.defineMultiStyleConfig)({baseStyle:(0,Uc.definePartsStyle)({link:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}})}),qc=function(e){var t=e.colorScheme,n=e.theme;if("gray"===t)return{color:qu("inherit","whiteAlpha.900")(e),_hover:{bg:qu("gray.100","whiteAlpha.200")(e)},_active:{bg:qu("gray.200","whiteAlpha.300")(e)}};var r=Wu("".concat(t,".200"),.12)(n),o=Wu("".concat(t,".200"),.24)(n);return{color:qu("".concat(t,".600"),"".concat(t,".200"))(e),bg:"transparent",_hover:{bg:qu("".concat(t,".50"),r)(e)},_active:{bg:qu("".concat(t,".100"),o)(e)}}},Yc=function(e){var t=e.colorScheme,n=qu("gray.200","whiteAlpha.300")(e);return un({border:"1px solid",borderColor:"gray"===t?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"}},_c(qc,e))},Zc={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Xc=function(e){var t,n=e.colorScheme;if("gray"===n){var r=qu("gray.100","whiteAlpha.200")(e);return{bg:r,_hover:{bg:qu("gray.200","whiteAlpha.300")(e),_disabled:{bg:r}},_active:{bg:qu("gray.300","whiteAlpha.400")(e)}}}var o=null!==(t=Zc[n])&&void 0!==t?t:{},i=o.bg,a=void 0===i?"".concat(n,".500"):i,s=o.color,l=void 0===s?"white":s,u=o.hoverBg,c=void 0===u?"".concat(n,".600"):u,d=o.activeBg,f=void 0===d?"".concat(n,".700"):d,h=qu(a,"".concat(n,".200"))(e);return{bg:h,color:qu(l,"gray.800")(e),_hover:{bg:qu(c,"".concat(n,".300"))(e),_disabled:{bg:h}},_active:{bg:qu(f,"".concat(n,".400"))(e)}}},$c=function(e){var t=e.colorScheme;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:qu("".concat(t,".500"),"".concat(t,".200"))(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:qu("".concat(t,".700"),"".concat(t,".500"))(e)}}},Kc={baseStyle:{lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},variants:{ghost:qc,outline:Yc,solid:Xc,link:$c,unstyled:{bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}},sizes:{lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},Qc=aa(vu.keys),Jc=Qc.definePartsStyle,ed=Qc.defineMultiStyleConfig,td=ki("card-bg"),nd=ki("card-padding"),rd=Jc({container:(tn={},gn(tn,td.variable,"chakra-body-bg"),gn(tn,"backgroundColor",td.reference),gn(tn,"color","chakra-body-text"),tn),body:{padding:nd.reference,flex:"1 1 0%"},header:{padding:nd.reference},footer:{padding:nd.reference}}),od={sm:Jc({container:gn({borderRadius:"base"},nd.variable,"space.3")}),md:Jc({container:gn({borderRadius:"md"},nd.variable,"space.5")}),lg:Jc({container:gn({borderRadius:"xl"},nd.variable,"space.7")})},id=ed({baseStyle:rd,variants:{elevated:Jc({container:{boxShadow:"base",_dark:gn({},td.variable,"colors.gray.700")}}),outline:Jc({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Jc({container:gn({},td.variable,"colors.chakra-subtle-bg")}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},sizes:od,defaultProps:{variant:"elevated",size:"md"}}),ad=aa(Xl.keys),sd=ad.definePartsStyle,ld=ad.defineMultiStyleConfig,ud=ki("checkbox-size"),cd=function(e){var t=e.colorScheme;return{w:ud.reference,h:ud.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:qu("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:qu("".concat(t,".500"),"".concat(t,".200"))(e),color:qu("white","gray.900")(e),_hover:{bg:qu("".concat(t,".600"),"".concat(t,".300"))(e),borderColor:qu("".concat(t,".600"),"".concat(t,".300"))(e)},_disabled:{borderColor:qu("gray.200","transparent")(e),bg:qu("gray.200","whiteAlpha.300")(e),color:qu("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:qu("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:qu("".concat(t,".500"),"".concat(t,".200"))(e),color:qu("white","gray.900")(e)},_disabled:{bg:qu("gray.100","whiteAlpha.100")(e),borderColor:qu("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:qu("red.500","red.300")(e)}}},dd={_disabled:{cursor:"not-allowed"}},fd={userSelect:"none",_disabled:{opacity:.4}},hd={transitionProperty:"transform",transitionDuration:"normal"},pd=ld({baseStyle:sd((function(e){return{icon:hd,container:dd,control:_c(cd,e),label:fd}})),sizes:{sm:sd({control:gn({},ud.variable,"sizes.3"),label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:sd({control:gn({},ud.variable,"sizes.4"),label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:sd({control:gn({},ud.variable,"sizes.5"),label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}}),vd=ic("close-button-size"),gd=ic("close-button-bg"),md={baseStyle:{w:[vd.reference],h:[vd.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:(rn={},gn(rn,gd.variable,"colors.blackAlpha.100"),gn(rn,"_dark",gn({},gd.variable,"colors.whiteAlpha.100")),rn),_active:(ln={},gn(ln,gd.variable,"colors.blackAlpha.200"),gn(ln,"_dark",gn({},gd.variable,"colors.whiteAlpha.200")),ln),_focusVisible:{boxShadow:"outline"},bg:gd.reference},sizes:{lg:(fn={},gn(fn,vd.variable,"sizes.10"),gn(fn,"fontSize","md"),fn),md:(vn={},gn(vn,vd.variable,"sizes.8"),gn(vn,"fontSize","xs"),vn),sm:(mn={},gn(mn,vd.variable,"sizes.6"),gn(mn,"fontSize","2xs"),mn)},defaultProps:{size:"md"}},yd={baseStyle:{fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},variants:Wc.variants,defaultProps:Wc.defaultProps},bd={baseStyle:{w:"100%",mx:"auto",maxW:"prose",px:"4"}},wd={baseStyle:{opacity:.6,borderColor:"inherit"},variants:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"}},defaultProps:{variant:"solid"}},kd=aa($l.keys),xd=kd.definePartsStyle,Sd=kd.defineMultiStyleConfig,Cd=ki("drawer-bg"),_d=ki("drawer-box-shadow");function Ed(e){return xd("full"===e?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Pd={bg:"blackAlpha.600",zIndex:"overlay"},Ld={display:"flex",zIndex:"modal",justifyContent:"center"},Od=function(e){var t,n;return un(un({},e.isFullHeight&&{height:"100vh"}),{},(gn(n={zIndex:"modal",maxH:"100vh",color:"inherit"},Cd.variable,"colors.white"),gn(n,_d.variable,"shadows.lg"),gn(n,"_dark",(gn(t={},Cd.variable,"colors.gray.700"),gn(t,_d.variable,"shadows.dark-lg"),t)),gn(n,"bg",Cd.reference),gn(n,"boxShadow",_d.reference),n))},Ad={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Md={position:"absolute",top:"2",insetEnd:"3"},Td={px:"6",py:"2",flex:"1",overflow:"auto"},Id={px:"6",py:"4"},Rd=Sd({baseStyle:xd((function(e){return{overlay:Pd,dialogContainer:Ld,dialog:_c(Od,e),header:Ad,closeButton:Md,body:Td,footer:Id}})),sizes:{xs:Ed("xs"),sm:Ed("md"),md:Ed("lg"),lg:Ed("2xl"),xl:Ed("4xl"),full:Ed("full")},defaultProps:{size:"xs"}}),Nd=aa(Kl.keys),Dd=Nd.definePartsStyle,zd=(0,Nd.defineMultiStyleConfig)({baseStyle:Dd({preview:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},input:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},textarea:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}})}),jd=aa(Ql.keys),Bd=jd.definePartsStyle,Fd=jd.defineMultiStyleConfig,Hd=ki("form-control-color"),Vd=Fd({baseStyle:Bd({container:{width:"100%",position:"relative"},requiredIndicator:(gn(bn={marginStart:"1"},Hd.variable,"colors.red.500"),gn(bn,"_dark",gn({},Hd.variable,"colors.red.300")),gn(bn,"color",Hd.reference),bn),helperText:(gn(wn={mt:"2"},Hd.variable,"colors.gray.600"),gn(wn,"_dark",gn({},Hd.variable,"colors.whiteAlpha.600")),gn(wn,"color",Hd.reference),gn(wn,"lineHeight","normal"),gn(wn,"fontSize","sm"),wn)})}),Wd=aa(Jl.keys),Ud=Wd.definePartsStyle,Gd=Wd.defineMultiStyleConfig,qd=ki("form-error-color"),Yd=Gd({baseStyle:Ud({text:(gn(Sn={},qd.variable,"colors.red.500"),gn(Sn,"_dark",gn({},qd.variable,"colors.red.300")),gn(Sn,"color",qd.reference),gn(Sn,"mt","2"),gn(Sn,"fontSize","sm"),gn(Sn,"lineHeight","normal"),Sn),icon:(gn(Cn={marginEnd:"0.5em"},qd.variable,"colors.red.500"),gn(Cn,"_dark",gn({},qd.variable,"colors.red.300")),gn(Cn,"color",qd.reference),Cn)})}),Zd={baseStyle:{fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}},Xd={baseStyle:{fontFamily:"heading",fontWeight:"bold"},sizes:{"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},defaultProps:{size:"xl"}},$d=aa(eu.keys),Kd=$d.definePartsStyle,Qd=$d.defineMultiStyleConfig,Jd=Kd({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),ef={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},tf={lg:Kd({field:ef.lg,addon:ef.lg}),md:Kd({field:ef.md,addon:ef.md}),sm:Kd({field:ef.sm,addon:ef.sm}),xs:Kd({field:ef.xs,addon:ef.xs})};function nf(e){var t=e.focusBorderColor,n=e.errorBorderColor;return{focusBorderColor:t||qu("blue.500","blue.300")(e),errorBorderColor:n||qu("red.500","red.300")(e)}}var rf=Kd((function(e){var t=e.theme,n=nf(e),r=n.focusBorderColor,o=n.errorBorderColor;return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:qu("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Hu(t,o),boxShadow:"0 0 0 1px ".concat(Hu(t,o))},_focusVisible:{zIndex:1,borderColor:Hu(t,r),boxShadow:"0 0 0 1px ".concat(Hu(t,r))}},addon:{border:"1px solid",borderColor:qu("inherit","whiteAlpha.50")(e),bg:qu("gray.100","whiteAlpha.300")(e)}}})),of=Kd((function(e){var t=e.theme,n=nf(e),r=n.focusBorderColor,o=n.errorBorderColor;return{field:{border:"2px solid",borderColor:"transparent",bg:qu("gray.100","whiteAlpha.50")(e),_hover:{bg:qu("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Hu(t,o)},_focusVisible:{bg:"transparent",borderColor:Hu(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:qu("gray.100","whiteAlpha.50")(e)}}})),af=Kd((function(e){var t=e.theme,n=nf(e),r=n.focusBorderColor,o=n.errorBorderColor;return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Hu(t,o),boxShadow:"0px 1px 0px 0px ".concat(Hu(t,o))},_focusVisible:{borderColor:Hu(t,r),boxShadow:"0px 1px 0px 0px ".concat(Hu(t,r))}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}})),sf=Qd({baseStyle:Jd,sizes:tf,variants:{outline:rf,filled:of,flushed:af,unstyled:Kd({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),lf=ki("kbd-bg"),uf={baseStyle:(gn(_n={},lf.variable,"colors.gray.100"),gn(_n,"_dark",gn({},lf.variable,"colors.whiteAlpha.100")),gn(_n,"bg",lf.reference),gn(_n,"borderRadius","md"),gn(_n,"borderWidth","1px"),gn(_n,"borderBottomWidth","3px"),gn(_n,"fontSize","0.8em"),gn(_n,"fontWeight","bold"),gn(_n,"lineHeight","normal"),gn(_n,"px","0.4em"),gn(_n,"whiteSpace","nowrap"),_n)},cf={baseStyle:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}},df=aa(tu.keys),ff=(0,df.defineMultiStyleConfig)({baseStyle:(0,df.definePartsStyle)({icon:{marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}})}),hf=aa(nu.keys),pf=hf.defineMultiStyleConfig,vf=hf.definePartsStyle,gf=ki("menu-bg"),mf=ki("menu-shadow"),yf=pf({baseStyle:vf({button:{transitionProperty:"common",transitionDuration:"normal"},list:(gn(Pn={},gf.variable,"#fff"),gn(Pn,mf.variable,"shadows.sm"),gn(Pn,"_dark",(gn(En={},gf.variable,"colors.gray.700"),gn(En,mf.variable,"shadows.dark-lg"),En)),gn(Pn,"color","inherit"),gn(Pn,"minW","3xs"),gn(Pn,"py","2"),gn(Pn,"zIndex",1),gn(Pn,"borderRadius","md"),gn(Pn,"borderWidth","1px"),gn(Pn,"bg",gf.reference),gn(Pn,"boxShadow",mf.reference),Pn),item:{py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:(Ln={},gn(Ln,gf.variable,"colors.gray.100"),gn(Ln,"_dark",gn({},gf.variable,"colors.whiteAlpha.100")),Ln),_active:(On={},gn(On,gf.variable,"colors.gray.200"),gn(On,"_dark",gn({},gf.variable,"colors.whiteAlpha.200")),On),_expanded:(An={},gn(An,gf.variable,"colors.gray.100"),gn(An,"_dark",gn({},gf.variable,"colors.whiteAlpha.100")),An),_disabled:{opacity:.4,cursor:"not-allowed"},bg:gf.reference},groupTitle:{mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},command:{opacity:.6},divider:{border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}})}),bf=aa(ru.keys),wf=bf.defineMultiStyleConfig,kf=bf.definePartsStyle,xf={bg:"blackAlpha.600",zIndex:"modal"},Sf=function(e){return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:e.isCentered?"center":"flex-start",overflow:"inside"===e.scrollBehavior?"hidden":"auto"}},Cf=function(e){var t=e.scrollBehavior;return{borderRadius:"md",bg:qu("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:"inside"===t?"calc(100% - 7.5rem)":void 0,boxShadow:qu("lg","dark-lg")(e)}},_f={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Ef={position:"absolute",top:"2",insetEnd:"3"},Pf=function(e){return{px:"6",py:"2",flex:"1",overflow:"inside"===e.scrollBehavior?"auto":void 0}},Lf={px:"6",py:"4"};function Of(e){return kf("full"===e?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Af=wf({baseStyle:kf((function(e){return{overlay:xf,dialogContainer:_c(Sf,e),dialog:_c(Cf,e),header:_f,closeButton:Ef,body:_c(Pf,e),footer:Lf}})),sizes:{xs:Of("xs"),sm:Of("sm"),md:Of("md"),lg:Of("lg"),xl:Of("xl"),"2xl":Of("2xl"),"3xl":Of("3xl"),"4xl":Of("4xl"),"5xl":Of("5xl"),"6xl":Of("6xl"),full:Of("full")},defaultProps:{size:"md"}}),Mf={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},Tf=aa(ou.keys),If=Tf.defineMultiStyleConfig,Rf=Tf.definePartsStyle,Nf=ic("number-input-stepper-width"),Df=ic("number-input-input-padding"),zf=tc(Nf).add("0.5rem").toString(),jf=ic("number-input-bg"),Bf=ic("number-input-color"),Ff=ic("number-input-border-color"),Hf=(gn(Mn={},Nf.variable,"sizes.6"),gn(Mn,Df.variable,zf),Mn),Vf=function(e){var t,n;return null!==(t=null==(n=_c(sf.baseStyle,e))?void 0:n.field)&&void 0!==t?t:{}},Wf={width:Nf.reference},Uf=(gn(Rn={borderStart:"1px solid",borderStartColor:Ff.reference,color:Bf.reference,bg:jf.reference},Bf.variable,"colors.chakra-body-text"),gn(Rn,Ff.variable,"colors.chakra-border-color"),gn(Rn,"_dark",(gn(Tn={},Bf.variable,"colors.whiteAlpha.800"),gn(Tn,Ff.variable,"colors.whiteAlpha.300"),Tn)),gn(Rn,"_active",(gn(In={},jf.variable,"colors.gray.200"),gn(In,"_dark",gn({},jf.variable,"colors.whiteAlpha.300")),In)),gn(Rn,"_disabled",{opacity:.4,cursor:"not-allowed"}),Rn);function Gf(e){var t,n,r,o=null==(n=sf.sizes)?void 0:n[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},a=null!==(t=null==(r=o.field)?void 0:r.fontSize)&&void 0!==t?t:"md",s=Mf.fontSizes[a];return Rf({field:un(un({},o.field),{},{paddingInlineEnd:Df.reference,verticalAlign:"top"}),stepper:{fontSize:tc(s).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var qf,Yf,Zf,Xf,$f,Kf,Qf,Jf,eh,th,nh,rh,oh,ih,ah,sh,lh,uh=If({baseStyle:Rf((function(e){var t;return{root:Hf,field:null!==(t=_c(Vf,e))&&void 0!==t?t:{},stepperGroup:Wf,stepper:Uf}})),sizes:{xs:Gf("xs"),sm:Gf("sm"),md:Gf("md"),lg:Gf("lg")},variants:sf.variants,defaultProps:sf.defaultProps}),ch={baseStyle:un(un({},null==(qf=sf.baseStyle)?void 0:qf.field),{},{textAlign:"center"}),sizes:{lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},variants:{outline:function(e){var t,n,r;return null!==(t=null==(r=_c(null==(n=sf.variants)?void 0:n.outline,e))?void 0:r.field)&&void 0!==t?t:{}},flushed:function(e){var t,n,r;return null!==(t=null==(r=_c(null==(n=sf.variants)?void 0:n.flushed,e))?void 0:r.field)&&void 0!==t?t:{}},filled:function(e){var t,n,r;return null!==(t=null==(r=_c(null==(n=sf.variants)?void 0:n.filled,e))?void 0:r.field)&&void 0!==t?t:{}},unstyled:null!==(Nn=null==(Yf=sf.variants)?void 0:Yf.unstyled.field)&&void 0!==Nn?Nn:{}},defaultProps:sf.defaultProps},dh=aa(iu.keys),fh=dh.defineMultiStyleConfig,hh=dh.definePartsStyle,ph=ic("popper-bg"),vh=ic("popper-arrow-bg"),gh=ic("popper-arrow-shadow-color"),mh=fh({baseStyle:hh({popper:{zIndex:10},content:(gn(zn={},ph.variable,"colors.white"),gn(zn,"bg",ph.reference),gn(zn,vh.variable,ph.reference),gn(zn,gh.variable,"colors.gray.200"),gn(zn,"_dark",(gn(Dn={},ph.variable,"colors.gray.700"),gn(Dn,gh.variable,"colors.whiteAlpha.300"),Dn)),gn(zn,"width","xs"),gn(zn,"border","1px solid"),gn(zn,"borderColor","inherit"),gn(zn,"borderRadius","md"),gn(zn,"boxShadow","sm"),gn(zn,"zIndex","inherit"),gn(zn,"_focusVisible",{outline:0,boxShadow:"outline"}),zn),header:{px:3,py:2,borderBottomWidth:"1px"},body:{px:3,py:2},footer:{px:3,py:2,borderTopWidth:"1px"},closeButton:{position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}})}),yh=aa(au.keys),bh=yh.defineMultiStyleConfig,wh=yh.definePartsStyle,kh=function(e){var t=e.colorScheme,n=e.theme,r=e.isIndeterminate,o=e.hasStripe,i=qu(Uu(),Uu("1rem","rgba(0,0,0,0.1)"))(e),a=qu("".concat(t,".500"),"".concat(t,".200"))(e),s="linear-gradient(\n to right,\n transparent 0%,\n ".concat(Hu(n,a)," 50%,\n transparent 100%\n )");return un(un({},!r&&o&&i),r?{bgImage:s}:{bgColor:a})},xh={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Sh=function(e){return{bg:qu("gray.100","whiteAlpha.300")(e)}},Ch=function(e){return un({transitionProperty:"common",transitionDuration:"slow"},kh(e))},_h=wh((function(e){return{label:xh,filledTrack:Ch(e),track:Sh(e)}})),Eh=bh({sizes:{xs:wh({track:{h:"1"}}),sm:wh({track:{h:"2"}}),md:wh({track:{h:"3"}}),lg:wh({track:{h:"4"}})},baseStyle:_h,defaultProps:{size:"md",colorScheme:"blue"}}),Ph=aa(su.keys),Lh=Ph.defineMultiStyleConfig,Oh=Ph.definePartsStyle,Ah=function(e){var t,n=null==(t=_c(pd.baseStyle,e))?void 0:t.control;return un(un({},n),{},{borderRadius:"full",_checked:un(un({},null==n?void 0:n._checked),{},{_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}})})},Mh=Lh({baseStyle:Oh((function(e){var t,n,r,o;return{label:null==(n=(t=pd).baseStyle)?void 0:n.call(t,e).label,container:null==(o=(r=pd).baseStyle)?void 0:o.call(r,e).container,control:Ah(e)}})),sizes:{md:Oh({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Oh({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Oh({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),Th=aa(lu.keys),Ih=Th.defineMultiStyleConfig,Rh=Th.definePartsStyle,Nh=ki("select-bg"),Dh={paddingInlineEnd:"8"},zh=Ih({baseStyle:Rh({field:un(un({},null==(Zf=sf.baseStyle)?void 0:Zf.field),{},(gn(jn={appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Nh.reference},Nh.variable,"colors.white"),gn(jn,"_dark",gn({},Nh.variable,"colors.gray.700")),gn(jn,"> option, > optgroup",{bg:Nh.reference}),jn)),icon:{width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}}),sizes:{lg:un(un({},null==(Xf=sf.sizes)?void 0:Xf.lg),{},{field:un(un({},null==($f=sf.sizes)?void 0:$f.lg.field),Dh)}),md:un(un({},null==(Kf=sf.sizes)?void 0:Kf.md),{},{field:un(un({},null==(Qf=sf.sizes)?void 0:Qf.md.field),Dh)}),sm:un(un({},null==(Jf=sf.sizes)?void 0:Jf.sm),{},{field:un(un({},null==(eh=sf.sizes)?void 0:eh.sm.field),Dh)}),xs:un(un({},null==(th=sf.sizes)?void 0:th.xs),{},{field:un(un({},null==(nh=sf.sizes)?void 0:nh.xs.field),Dh),icon:{insetEnd:"1"}})},variants:sf.variants,defaultProps:sf.defaultProps}),jh=ki("skeleton-start-color"),Bh=ki("skeleton-end-color"),Fh={baseStyle:(gn(Fn={},jh.variable,"colors.gray.100"),gn(Fn,Bh.variable,"colors.gray.400"),gn(Fn,"_dark",(gn(Bn={},jh.variable,"colors.gray.800"),gn(Bn,Bh.variable,"colors.gray.600"),Bn)),gn(Fn,"background",jh.reference),gn(Fn,"borderColor",Bh.reference),gn(Fn,"opacity",.7),gn(Fn,"borderRadius","sm"),Fn)},Hh=ki("skip-link-bg"),Vh={baseStyle:{borderRadius:"md",fontWeight:"semibold",_focusVisible:(Hn={boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6"},gn(Hn,Hh.variable,"colors.white"),gn(Hn,"_dark",gn({},Hh.variable,"colors.gray.700")),gn(Hn,"bg",Hh.reference),Hn)}},Wh=aa(uu.keys),Uh=Wh.defineMultiStyleConfig,Gh=Wh.definePartsStyle,qh=ki("slider-thumb-size"),Yh=ki("slider-track-size"),Zh=ki("slider-bg"),Xh=function(e){return un({display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},Yu({orientation:e.orientation,vertical:{h:"100%"},horizontal:{w:"100%"}}))},$h=function(e){var t,n;return un(un({},Yu({orientation:e.orientation,horizontal:{h:Yh.reference},vertical:{w:Yh.reference}})),{},(gn(n={overflow:"hidden",borderRadius:"sm"},Zh.variable,"colors.gray.200"),gn(n,"_dark",gn({},Zh.variable,"colors.whiteAlpha.200")),gn(n,"_disabled",(gn(t={},Zh.variable,"colors.gray.300"),gn(t,"_dark",gn({},Zh.variable,"colors.whiteAlpha.300")),t)),gn(n,"bg",Zh.reference),n))},Kh=function(e){return un(un({},Yu({orientation:e.orientation,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}})),{},{w:qh.reference,h:qh.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}})},Qh=function(e){var t,n=e.colorScheme;return gn(t={width:"inherit",height:"inherit"},Zh.variable,"colors.".concat(n,".500")),gn(t,"_dark",gn({},Zh.variable,"colors.".concat(n,".200"))),gn(t,"bg",Zh.reference),t},Jh=Uh({baseStyle:Gh((function(e){return{container:Xh(e),track:$h(e),thumb:Kh(e),filledTrack:Qh(e)}})),sizes:{lg:Gh({container:(Vn={},gn(Vn,qh.variable,"sizes.4"),gn(Vn,Yh.variable,"sizes.1"),Vn)}),md:Gh({container:(Wn={},gn(Wn,qh.variable,"sizes.3.5"),gn(Wn,Yh.variable,"sizes.1"),Wn)}),sm:Gh({container:(Un={},gn(Un,qh.variable,"sizes.2.5"),gn(Un,Yh.variable,"sizes.0.5"),Un)})},defaultProps:{size:"md",colorScheme:"blue"}}),ep=ic("spinner-size"),tp={baseStyle:{width:[ep.reference],height:[ep.reference]},sizes:{xs:gn({},ep.variable,"sizes.3"),sm:gn({},ep.variable,"sizes.4"),md:gn({},ep.variable,"sizes.6"),lg:gn({},ep.variable,"sizes.8"),xl:gn({},ep.variable,"sizes.12")},defaultProps:{size:"md"}},np=aa(cu.keys),rp=np.defineMultiStyleConfig,op=np.definePartsStyle,ip=rp({baseStyle:op({container:{},label:{fontWeight:"medium"},helpText:{opacity:.8,marginBottom:"2"},number:{verticalAlign:"baseline",fontWeight:"semibold"},icon:{marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}}),sizes:{md:op({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),ap=aa(du.keys),sp=ap.defineMultiStyleConfig,lp=ap.definePartsStyle,up=ic("switch-track-width"),cp=ic("switch-track-height"),dp=ic("switch-track-diff"),fp=tc.subtract(up,cp),hp=ic("switch-thumb-x"),pp=ic("switch-bg"),vp=function(e){var t,n,r=e.colorScheme;return gn(n={borderRadius:"full",p:"0.5",width:[up.reference],height:[cp.reference],transitionProperty:"common",transitionDuration:"fast"},pp.variable,"colors.gray.300"),gn(n,"_dark",gn({},pp.variable,"colors.whiteAlpha.400")),gn(n,"_focusVisible",{boxShadow:"outline"}),gn(n,"_disabled",{opacity:.4,cursor:"not-allowed"}),gn(n,"_checked",(gn(t={},pp.variable,"colors.".concat(r,".500")),gn(t,"_dark",gn({},pp.variable,"colors.".concat(r,".200"))),t)),gn(n,"bg",pp.reference),n},gp={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[cp.reference],height:[cp.reference],_checked:{transform:"translateX(".concat(hp.reference,")")}},mp=sp({baseStyle:lp((function(e){var t;return{container:(t={},gn(t,dp.variable,fp),gn(t,hp.variable,dp.reference),gn(t,"_rtl",gn({},hp.variable,tc(dp).negate().toString())),t),track:vp(e),thumb:gp}})),sizes:{sm:lp({container:(Gn={},gn(Gn,up.variable,"1.375rem"),gn(Gn,cp.variable,"sizes.3"),Gn)}),md:lp({container:(qn={},gn(qn,up.variable,"1.875rem"),gn(qn,cp.variable,"sizes.4"),qn)}),lg:lp({container:(Yn={},gn(Yn,up.variable,"2.875rem"),gn(Yn,cp.variable,"sizes.6"),Yn)})},defaultProps:{size:"md",colorScheme:"blue"}}),yp=aa(fu.keys),bp=yp.defineMultiStyleConfig,wp=yp.definePartsStyle,kp=wp({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),xp={"&[data-is-numeric=true]":{textAlign:"end"}},Sp=wp((function(e){var t=e.colorScheme;return{th:un({color:qu("gray.600","gray.400")(e),borderBottom:"1px",borderColor:qu("".concat(t,".100"),"".concat(t,".700"))(e)},xp),td:un({borderBottom:"1px",borderColor:qu("".concat(t,".100"),"".concat(t,".700"))(e)},xp),caption:{color:qu("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),Cp=wp((function(e){var t=e.colorScheme;return{th:un({color:qu("gray.600","gray.400")(e),borderBottom:"1px",borderColor:qu("".concat(t,".100"),"".concat(t,".700"))(e)},xp),td:un({borderBottom:"1px",borderColor:qu("".concat(t,".100"),"".concat(t,".700"))(e)},xp),caption:{color:qu("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:qu("".concat(t,".100"),"".concat(t,".700"))(e)},td:{background:qu("".concat(t,".100"),"".concat(t,".700"))(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),_p=bp({baseStyle:kp,variants:{simple:Sp,striped:Cp,unstyled:{}},sizes:{sm:wp({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:wp({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:wp({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Ep=ki("tabs-color"),Pp=ki("tabs-bg"),Lp=ki("tabs-border-color"),Op=aa(hu.keys),Ap=Op.defineMultiStyleConfig,Mp=Op.definePartsStyle,Tp=function(e){return{display:"vertical"===e.orientation?"flex":"block"}},Ip=function(e){return{flex:e.isFitted?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Rp=function(e){var t=e.align,n=void 0===t?"start":t,r=e.orientation;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[n],flexDirection:"vertical"===r?"column":"row"}},Np={p:4},Dp=Mp((function(e){return{root:Tp(e),tab:Ip(e),tablist:Rp(e),tabpanel:Np}})),zp={sm:Mp({tab:{py:1,px:4,fontSize:"sm"}}),md:Mp({tab:{fontSize:"md",py:2,px:4}}),lg:Mp({tab:{fontSize:"lg",py:3,px:4}})},jp=Mp((function(e){var t,n,r,o,i=e.colorScheme,a=e.orientation,s="vertical"===a?"borderStart":"borderBottom",l="vertical"===a?"marginStart":"marginBottom";return{tablist:(t={},gn(t,s,"2px solid"),gn(t,"borderColor","inherit"),t),tab:(o={},gn(o,s,"2px solid"),gn(o,"borderColor","transparent"),gn(o,l,"-2px"),gn(o,"_selected",(n={},gn(n,Ep.variable,"colors.".concat(i,".600")),gn(n,"_dark",gn({},Ep.variable,"colors.".concat(i,".300"))),gn(n,"borderColor","currentColor"),n)),gn(o,"_active",(r={},gn(r,Pp.variable,"colors.gray.200"),gn(r,"_dark",gn({},Pp.variable,"colors.whiteAlpha.300")),r)),gn(o,"_disabled",{_active:{bg:"none"}}),gn(o,"color",Ep.reference),gn(o,"bg",Pp.reference),o)}})),Bp=Mp((function(e){var t,n,r,o=e.colorScheme;return{tab:(r={borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px"},gn(r,Lp.reference,"transparent"),gn(r,"_selected",(n={},gn(n,Ep.variable,"colors.".concat(o,".600")),gn(n,Lp.variable,"colors.white"),gn(n,"_dark",(t={},gn(t,Ep.variable,"colors.".concat(o,".300")),gn(t,Lp.variable,"colors.gray.800"),t)),gn(n,"borderColor","inherit"),gn(n,"borderBottomColor",Lp.reference),n)),gn(r,"color",Ep.reference),r),tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),Fp=Mp((function(e){var t,n,r,o=e.colorScheme;return{tab:(r={border:"1px solid",borderColor:"inherit"},gn(r,Pp.variable,"colors.gray.50"),gn(r,"_dark",gn({},Pp.variable,"colors.whiteAlpha.50")),gn(r,"mb","-1px"),gn(r,"_notLast",{marginEnd:"-1px"}),gn(r,"_selected",(n={},gn(n,Pp.variable,"colors.white"),gn(n,Ep.variable,"colors.".concat(o,".600")),gn(n,"_dark",(t={},gn(t,Pp.variable,"colors.gray.800"),gn(t,Ep.variable,"colors.".concat(o,".300")),t)),gn(n,"borderColor","inherit"),gn(n,"borderTopColor","currentColor"),gn(n,"borderBottomColor","transparent"),n)),gn(r,"color",Ep.reference),gn(r,"bg",Pp.reference),r),tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),Hp=Mp((function(e){var t=e.colorScheme,n=e.theme;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Hu(n,"".concat(t,".700")),bg:Hu(n,"".concat(t,".100"))}}}})),Vp=Mp((function(e){var t,n,r,o=e.colorScheme;return{tab:(r={borderRadius:"full",fontWeight:"semibold"},gn(r,Ep.variable,"colors.gray.600"),gn(r,"_dark",gn({},Ep.variable,"inherit")),gn(r,"_selected",(n={},gn(n,Ep.variable,"colors.white"),gn(n,Pp.variable,"colors.".concat(o,".600")),gn(n,"_dark",(t={},gn(t,Ep.variable,"colors.gray.800"),gn(t,Pp.variable,"colors.".concat(o,".300")),t)),n)),gn(r,"color",Ep.reference),gn(r,"bg",Pp.reference),r)}})),Wp=Ap({baseStyle:Dp,sizes:zp,variants:{line:jp,enclosed:Bp,"enclosed-colored":Fp,"soft-rounded":Hp,"solid-rounded":Vp,unstyled:Mp({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Up=aa(pu.keys),Gp=Up.defineMultiStyleConfig,qp=Up.definePartsStyle,Yp=qp({container:{fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},label:{lineHeight:1.2,overflow:"visible"},closeButton:{fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}}),Zp={sm:qp({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:qp({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:qp({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Xp=Gp({variants:{subtle:qp((function(e){var t;return{container:null==(t=Wc.variants)?void 0:t.subtle(e)}})),solid:qp((function(e){var t;return{container:null==(t=Wc.variants)?void 0:t.solid(e)}})),outline:qp((function(e){var t;return{container:null==(t=Wc.variants)?void 0:t.outline(e)}}))},baseStyle:Yp,sizes:Zp,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),$p=un(un({},null==(rh=sf.baseStyle)?void 0:rh.field),{},{paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),Kp={outline:function(e){var t,n;return null!==(t=null==(n=sf.variants)?void 0:n.outline(e).field)&&void 0!==t?t:{}},flushed:function(e){var t,n;return null!==(t=null==(n=sf.variants)?void 0:n.flushed(e).field)&&void 0!==t?t:{}},filled:function(e){var t,n;return null!==(t=null==(n=sf.variants)?void 0:n.filled(e).field)&&void 0!==t?t:{}},unstyled:null!==(Zn=null==(oh=sf.variants)?void 0:oh.unstyled.field)&&void 0!==Zn?Zn:{}},Qp={baseStyle:$p,sizes:{xs:null!==(Xn=null==(ih=sf.sizes)?void 0:ih.xs.field)&&void 0!==Xn?Xn:{},sm:null!==($n=null==(ah=sf.sizes)?void 0:ah.sm.field)&&void 0!==$n?$n:{},md:null!==(Kn=null==(sh=sf.sizes)?void 0:sh.md.field)&&void 0!==Kn?Kn:{},lg:null!==(Qn=null==(lh=sf.sizes)?void 0:lh.lg.field)&&void 0!==Qn?Qn:{}},variants:Kp,defaultProps:{size:"md",variant:"outline"}},Jp=ic("tooltip-bg"),ev=ic("tooltip-fg"),tv=ic("popper-arrow-bg"),nv=(gn(er={bg:Jp.reference,color:ev.reference},Jp.variable,"colors.gray.700"),gn(er,ev.variable,"colors.whiteAlpha.900"),gn(er,"_dark",(gn(Jn={},Jp.variable,"colors.gray.300"),gn(Jn,ev.variable,"colors.gray.900"),Jn)),gn(er,tv.variable,Jp.reference),gn(er,"px","2"),gn(er,"py","0.5"),gn(er,"borderRadius","sm"),gn(er,"fontWeight","medium"),gn(er,"fontSize","sm"),gn(er,"boxShadow","md"),gn(er,"maxW","xs"),gn(er,"zIndex","tooltip"),er),rv={Accordion:uc,Alert:kc,Avatar:Dc,Badge:Wc,Breadcrumb:Gc,Button:Kc,Checkbox:pd,CloseButton:md,Code:yd,Container:bd,Divider:wd,Drawer:Rd,Editable:zd,Form:Vd,FormError:Yd,FormLabel:Zd,Heading:Xd,Input:sf,Kbd:uf,Link:cf,List:ff,Menu:yf,Modal:Af,NumberInput:uh,PinInput:ch,Popover:mh,Progress:Eh,Radio:Mh,Select:zh,Skeleton:Fh,SkipLink:Vh,Slider:Jh,Spinner:tp,Stat:ip,Switch:mp,Table:_p,Tabs:Wp,Tag:Xp,Textarea:Qp,Tooltip:{baseStyle:nv},Card:id},ov={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},iv={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},av={property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}},sv=un(un({breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}}},Mf),{},{sizes:Sc,shadows:iv,space:xc,borders:ov,transition:av}),lv=un(un({semanticTokens:{colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},direction:"ltr"},sv),{},{components:rv,styles:{global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},config:{useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"}}),uv="undefined"!=typeof Element,cv="function"==typeof Map,dv="function"==typeof Set,fv="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function hv(e,t){if(e===t)return!0;if(e&&t&&"object"==kn(e)&&"object"==kn(t)){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!hv(e[r],t[r]))return!1;return!0}if(cv&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!hv(r.value[1],t.get(r.value[0])))return!1;return!0}if(dv&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(fv&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(uv&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!hv(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}var pv=function(e,t){try{return hv(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};function vv(){var e=cr.useContext(sl);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function gv(){var e=ao(),t=vv();return un(un({},e),{},{theme:t})}function mv(e){var t=e.cssVarsRoot,n=e.theme,r=e.children,o=cr.useMemo((function(){return Xi(n)}),[n]);return qr.createElement(ul,{theme:o},qr.createElement(yv,{root:t}),r)}function yv(e){var t=e.root,n=[void 0===t?":host, :root":t,"[data-theme]"].join(",");return qr.createElement(cl,{styles:function(e){return gn({},n,e.__cssVars)}})}function bv(){var e=ao().colorMode;return qr.createElement(cl,{styles:function(t){var n=Nl(Al(t,"styles.global"),{theme:t,colorMode:e});if(n){var r=ia(n)(t);return r}}})}!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.strict,n=void 0===t||t,r=e.errorMessage,o=void 0===r?"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider":r,i=e.name,a=cr.createContext(void 0);function s(){var e,t=cr.useContext(a);if(!t&&n){var r=new Error(o);throw r.name="ContextError",null==Error.captureStackTrace||e.call(Error,r,s),r}return t}a.displayName=i,a.Provider}({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});var wv=new Set([].concat(cn(Ji),["textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"])),kv=new Set(["htmlWidth","htmlHeight","htmlSize"]);function xv(e){return kv.has(e)||!wv.has(e)}function Sv(e,r){var o=null!=r?r:{},i=o.baseStyle,a=sn(o,n);a.shouldForwardProp||(a.shouldForwardProp=xv);var s=function(e){var n=e.baseStyle;return function(e){e.theme;var r=e.css,o=e.__css,i=e.sx,a=Ml(sn(e,t),(function(e,t){return ta(t)})),s=Nl(n,e),l=Object.assign({},o,s,Tl(a),i),u=ia(l)(e.theme);return r?[u,r]:u}}({baseStyle:i}),l=Wl(e,a)(s);return qr.forwardRef((function(e,t){var n=ao(),r=n.colorMode,o=n.forced;return qr.createElement(l,un({ref:t,"data-theme":o?r:void 0},e))}))}function Cv(e){return cr.forwardRef(e)}function _v(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.styleConfig,i=sn(n,r),a=gv(),s=a.theme,l=a.colorMode,u=e?Al(s,"components.".concat(e)):void 0,c=o||u,d=mo({theme:s,colorMode:l},null!==(t=null==c?void 0:c.defaultProps)&&void 0!==t?t:{},Tl(Ol(i,["children"]))),f=cr.useRef({});if(c){var h=la(c),p=h(d),v=pv(f.current,p);v||(f.current=p)}return f.current}function Ev(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _v(e,t)}function Pv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _v(e,t)}var Lv=function(){var e=new Map;return new Proxy(Sv,{apply:function(e,t,n){return Sv.apply(void 0,cn(n))},get:function(t,n){return e.has(n)||e.set(n,Sv(n)),e.get(n)}})}();function Ov(e,t){return"".concat(e," returned `undefined`. Seems you forgot to wrap component within ").concat(t)}function Av(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.strict,r=void 0===n||n,o=e.hookName,i=void 0===o?"useContext":o,a=e.providerName,s=void 0===a?"Provider":a,l=e.errorMessage,u=cr.createContext(void 0);function c(){var e,t=cr.useContext(u);if(!t&&r){var n=new Error(null!=l?l:Ov(i,s));throw n.name="ContextError",null==(e=Error.captureStackTrace)||e.call(Error,n,c),n}return t}return u.displayName=t,[u.Provider,c,u]}function Mv(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(n){throw new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}else e(t)}function Tv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){Mv(t,e)}))}}function Iv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cr.useMemo((function(){return Tv.apply(void 0,t)}),t)}function Rv(e){return e.sort((function(e,t){var n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function Nv(e,t,n){var r=e+1;return n&&r>=t&&(r=0),r}function Dv(e,t,n){var r=e-1;return n&&r<0&&(r=t),r}var zv="undefined"!=typeof window?cr.useLayoutEffect:cr.useEffect,jv=on((function e(){var t=this;an(this,e),gn(this,"descendants",new Map),gn(this,"register",(function(e){if(null!=e)return function(e){return"object"==kn(e)&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}(e)?t.registerNode(e):function(n){t.registerNode(n,e)}})),gn(this,"unregister",(function(e){t.descendants.delete(e);var n=Rv(Array.from(t.descendants.keys()));t.assignIndex(n)})),gn(this,"destroy",(function(){t.descendants.clear()})),gn(this,"assignIndex",(function(e){t.descendants.forEach((function(t){var n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),gn(this,"count",(function(){return t.descendants.size})),gn(this,"enabledCount",(function(){return t.enabledValues().length})),gn(this,"values",(function(){return Array.from(t.descendants.values()).sort((function(e,t){return e.index-t.index}))})),gn(this,"enabledValues",(function(){return t.values().filter((function(e){return!e.disabled}))})),gn(this,"item",(function(e){if(0!==t.count())return t.values()[e]})),gn(this,"enabledItem",(function(e){if(0!==t.enabledCount())return t.enabledValues()[e]})),gn(this,"first",(function(){return t.item(0)})),gn(this,"firstEnabled",(function(){return t.enabledItem(0)})),gn(this,"last",(function(){return t.item(t.descendants.size-1)})),gn(this,"lastEnabled",(function(){var e=t.enabledValues().length-1;return t.enabledItem(e)})),gn(this,"indexOf",(function(e){var n,r;return e&&null!==(n=null==(r=t.descendants.get(e))?void 0:r.index)&&void 0!==n?n:-1})),gn(this,"enabledIndexOf",(function(e){return null==e?-1:t.enabledValues().findIndex((function(t){return t.node.isSameNode(e)}))})),gn(this,"next",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Nv(e,t.count(),n);return t.item(r)})),gn(this,"nextEnabled",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.item(e);if(r){var o=t.enabledIndexOf(r.node),i=Nv(o,t.enabledCount(),n);return t.enabledItem(i)}})),gn(this,"prev",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Dv(e,t.count()-1,n);return t.item(r)})),gn(this,"prevEnabled",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.item(e);if(r){var o=t.enabledIndexOf(r.node),i=Dv(o,t.enabledCount()-1,n);return t.enabledItem(i)}})),gn(this,"registerNode",(function(e,n){if(e&&!t.descendants.has(e)){var r=Rv(Array.from(t.descendants.keys()).concat(e));(null==n?void 0:n.disabled)&&(n.disabled=!!n.disabled);var o=un({node:e,index:-1},n);t.descendants.set(e,o),t.assignIndex(r)}}))}));var Bv=yn(Av({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"}),2),Fv=Bv[0],Hv=Bv[1];function Vv(){return[Fv,function(){return Hv()},function(){return e=cr.useRef(new jv),zv((function(){return function(){return e.current.destroy()}})),e.current;var e},function(e){return function(e){var t=Hv(),n=yn(cr.useState(-1),2),r=n[0],o=n[1],i=cr.useRef(null);zv((function(){return function(){i.current&&t.unregister(i.current)}}),[]),zv((function(){if(i.current){var e=Number(i.current.dataset.index);r==e||Number.isNaN(e)||o(e)}}));var a=e?t.register(e):t.register;return{descendants:t,index:r,enabledIndex:t.enabledIndexOf(i.current),register:Tv(a,i)}}(e)}]}var Wv=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},Uv={path:qr.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},qr.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),qr.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),qr.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Gv=Cv((function(e,t){var n=e.as,r=e.viewBox,i=e.color,a=void 0===i?"currentColor":i,s=e.focusable,l=void 0!==s&&s,u=e.children,c=e.className,d=e.__css,f=sn(e,o),h={ref:t,focusable:l,className:Wv("chakra-icon",c),__css:un({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},d)},p=null!=r?r:Uv.viewBox;if(n&&"string"!=typeof n)return qr.createElement(Lv.svg,un(un({as:n},h),f));var v=null!=u?u:Uv.path;return qr.createElement(Lv.svg,un(un({verticalAlign:"middle",viewBox:p},h),f),v)}));function qv(e){var t=e.viewBox,n=void 0===t?"0 0 24 24":t,r=e.d,o=e.displayName,i=e.defaultProps,a=void 0===i?{}:i,s=cr.Children.toArray(e.path),l=Cv((function(e,t){return qr.createElement(Gv,un(un({ref:t,viewBox:n},a),e),s.length?s:qr.createElement("path",{fill:"currentColor",d:r}))}));return l.displayName=o,l}function Yv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=cr.useRef(e);return cr.useEffect((function(){n.current=e})),cr.useCallback((function(){for(var e,t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null==(t=n.current)?void 0:(e=t).call.apply(e,[n].concat(o))}),t)}function Zv(e){var t=e.value,n=e.defaultValue,r=e.onChange,o=e.shouldUpdate,i=void 0===o?function(e,t){return e!==t}:o,a=Yv(r),s=Yv(i),l=yn(cr.useState(n),2),u=l[0],c=l[1],d=void 0!==t,f=d?t:u,h=Yv((function(e){var t="function"==typeof e?e(f):e;s(f,t)&&(d||c(t),a(t))}),[d,a,f,s]);return[f,h]}Gv.displayName="Icon";var Xv=cr.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),$v=cr.createContext({});var Kv=cr.createContext(null),Qv="undefined"!=typeof document,Jv=Qv?cr.useLayoutEffect:cr.useEffect,eg=cr.createContext({strict:!1});function tg(e,t,n,r){var o=cr.useContext($v).visualElement,i=cr.useContext(eg),a=cr.useContext(Kv),s=cr.useContext(Xv).reducedMotion,l=cr.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));var u=l.current;return Jv((function(){u&&u.render()})),cr.useEffect((function(){u&&u.animationState&&u.animationState.animateChanges()})),Jv((function(){return function(){return u&&u.notify("Unmount")}}),[]),u}function ng(e){return"object"===kn(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function rg(e){return"string"==typeof e||Array.isArray(e)}function og(e){return"object"===kn(e)&&"function"==typeof e.start}var ig=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function ag(e){return og(e.animate)||ig.some((function(t){return rg(e[t])}))}function sg(e){return Boolean(ag(e)||e.variants)}function lg(e){var t=function(e,t){if(ag(e)){var n=e.initial,r=e.animate;return{initial:!1===n||rg(n)?n:void 0,animate:rg(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,cr.useContext($v)),n=t.initial,r=t.animate;return cr.useMemo((function(){return{initial:n,animate:r}}),[ug(n),ug(r)])}function ug(e){return Array.isArray(e)?e.join(" "):e}var cg=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},dg={measureLayout:cg(["layout","layoutId","drag"]),animation:cg(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:cg(["exit"]),drag:cg(["drag","dragControls"]),focus:cg(["whileFocus"]),hover:cg(["whileHover","onHoverStart","onHoverEnd"]),tap:cg(["whileTap","onTap","onTapStart","onTapCancel"]),pan:cg(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:cg(["whileInView","onViewportEnter","onViewportLeave"])};function fg(e){var t=cr.useRef(null);return null===t.current&&(t.current=e()),t.current}var hg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pg=1;var vg=cr.createContext({}),gg=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"getSnapshotBeforeUpdate",value:function(){var e=this.props,t=e.visualElement,n=e.props;return t&&t.setProps(n),null}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){return this.props.children}}]),n}(qr.Component),mg=cr.createContext({}),yg=Symbol.for("motionComponentSymbol");function bg(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,o=e.useRender,i=e.useVisualState,a=e.Component;t&&function(e){for(var t in e)"projectionNodeConstructor"===t?dg.projectionNodeConstructor=e[t]:dg[t].Component=e[t]}(t);var s=cr.forwardRef((function(e,s){var l,u,c,d=un(un(un({},cr.useContext(Xv)),e),{},{layoutId:(l=e,u=l.layoutId,c=cr.useContext(vg).id,c&&void 0!==u?c+"-"+u:u)}),f=d.isStatic,h=null,p=lg(e),v=f?void 0:fg((function(){if(hg.hasEverUpdated)return pg++})),g=i(e,f);if(!f&&Qv){p.visualElement=tg(a,g,d,n);var m=cr.useContext(eg).strict,y=cr.useContext(mg);p.visualElement&&(h=p.visualElement.loadFeatures(d,m,t,v,r||dg.projectionNodeConstructor,y))}return cr.createElement(gg,{visualElement:p.visualElement,props:d},h,cr.createElement($v.Provider,{value:p},o(a,e,v,function(e,t,n){return cr.useCallback((function(r){r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ng(n)&&(n.current=r))}),[t])}(g,p.visualElement,s),g,f,p.visualElement)))}));return s[yg]=a,s}function wg(e){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return bg(e(t,n))}if("undefined"==typeof Proxy)return t;var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var kg=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function xg(e){return"string"==typeof e&&!e.includes("-")&&!!(kg.indexOf(e)>-1||/[A-Z]/.test(e))}var Sg={};var Cg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_g=new Set(Cg);function Eg(e,t){var n=t.layout,r=t.layoutId;return _g.has(e)||e.startsWith("origin")||(n||void 0!==r)&&(!!Sg[e]||"opacity"===e)}var Pg=function(e){return!!(null==e?void 0:e.getVelocity)},Lg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Og=function(e,t){return Cg.indexOf(e)-Cg.indexOf(t)};function Ag(e){return e.startsWith("--")}var Mg=function(e,t){return t&&"number"==typeof e?t.transform(e):e},Tg=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},Ig=function(e){return e%1?Number(e.toFixed(5)):e},Rg=/(-)?([\d]*\.?[\d])+/g,Ng=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Dg=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function zg(e){return"string"==typeof e}var jg={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},Bg=Object.assign(Object.assign({},jg),{transform:Tg(0,1)}),Fg=Object.assign(Object.assign({},jg),{default:1}),Hg=function(e){return{test:function(t){return zg(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return"".concat(t).concat(e)}}},Vg=Hg("deg"),Wg=Hg("%"),Ug=Hg("px"),Gg=Hg("vh"),qg=Hg("vw"),Yg=Object.assign(Object.assign({},Wg),{parse:function(e){return Wg.parse(e)/100},transform:function(e){return Wg.transform(100*e)}}),Zg=function(e,t){return function(n){return Boolean(zg(n)&&Dg.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},Xg=function(e,t,n){return function(r){var o;if(!zg(r))return r;var i=yn(r.match(Rg),4),a=i[0],s=i[1],l=i[2],u=i[3];return gn(o={},e,parseFloat(a)),gn(o,t,parseFloat(s)),gn(o,n,parseFloat(l)),gn(o,"alpha",void 0!==u?parseFloat(u):1),o}},$g={test:Zg("hsl","hue"),parse:Xg("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+Wg.transform(Ig(n))+", "+Wg.transform(Ig(r))+", "+Ig(Bg.transform(i))+")"}},Kg=Tg(0,255),Qg=Object.assign(Object.assign({},jg),{transform:function(e){return Math.round(Kg(e))}}),Jg={test:Zg("rgb","red"),parse:Xg("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+Qg.transform(t)+", "+Qg.transform(n)+", "+Qg.transform(r)+", "+Ig(Bg.transform(i))+")"}};var em={test:Zg("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Jg.transform},tm={test:function(e){return Jg.test(e)||em.test(e)||$g.test(e)},parse:function(e){return Jg.test(e)?Jg.parse(e):$g.test(e)?$g.parse(e):em.parse(e)},transform:function(e){return zg(e)?e:e.hasOwnProperty("red")?Jg.transform(e):$g.transform(e)}},nm="${c}",rm="${n}";function om(e){"number"==typeof e&&(e="".concat(e));var t=[],n=0,r=e.match(Ng);r&&(n=r.length,e=e.replace(Ng,nm),t.push.apply(t,cn(r.map(tm.parse))));var o=e.match(Rg);return o&&(e=e.replace(Rg,rm),t.push.apply(t,cn(o.map(jg.parse)))),{values:t,numColors:n,tokenised:e}}function im(e){return om(e).values}function am(e){var t=om(e),n=t.values,r=t.numColors,o=t.tokenised,i=n.length;return function(e){for(var t=o,n=0;n<i;n++)t=t.replace(n<r?nm:rm,n<r?tm.transform(e[n]):Ig(e[n]));return t}}var sm=function(e){return"number"==typeof e?0:e};var lm={test:function(e){var t,n,r,o;return isNaN(e)&&zg(e)&&(null!==(n=null===(t=e.match(Rg))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(Ng))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:im,createTransformer:am,getAnimatableNone:function(e){var t=im(e);return am(e)(t.map(sm))}},um=new Set(["brightness","contrast","saturate","opacity"]);function cm(e){var t=yn(e.slice(0,-1).split("("),2),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=yn(r.match(Rg)||[],1)[0];if(!o)return e;var i=r.replace(o,""),a=um.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var dm=/([a-z-]*)\(.*?\)/g,fm=Object.assign(Object.assign({},lm),{getAnimatableNone:function(e){var t=e.match(dm);return t?t.map(cm).join(" "):e}}),hm=un(un({},jg),{},{transform:Math.round}),pm={borderWidth:Ug,borderTopWidth:Ug,borderRightWidth:Ug,borderBottomWidth:Ug,borderLeftWidth:Ug,borderRadius:Ug,radius:Ug,borderTopLeftRadius:Ug,borderTopRightRadius:Ug,borderBottomRightRadius:Ug,borderBottomLeftRadius:Ug,width:Ug,maxWidth:Ug,height:Ug,maxHeight:Ug,size:Ug,top:Ug,right:Ug,bottom:Ug,left:Ug,padding:Ug,paddingTop:Ug,paddingRight:Ug,paddingBottom:Ug,paddingLeft:Ug,margin:Ug,marginTop:Ug,marginRight:Ug,marginBottom:Ug,marginLeft:Ug,rotate:Vg,rotateX:Vg,rotateY:Vg,rotateZ:Vg,scale:Fg,scaleX:Fg,scaleY:Fg,scaleZ:Fg,skew:Vg,skewX:Vg,skewY:Vg,distance:Ug,translateX:Ug,translateY:Ug,translateZ:Ug,x:Ug,y:Ug,z:Ug,perspective:Ug,transformPerspective:Ug,opacity:Bg,originX:Yg,originY:Yg,originZ:Ug,zIndex:hm,fillOpacity:Bg,strokeOpacity:Bg,numOctaves:hm};function vm(e,t,n,r){var o=e.style,i=e.vars,a=e.transform,s=e.transformKeys,l=e.transformOrigin;s.length=0;var u=!1,c=!1,d=!0;for(var f in t){var h=t[f];if(Ag(f))i[f]=h;else{var p=pm[f],v=Mg(h,p);if(_g.has(f)){if(u=!0,a[f]=v,s.push(f),!d)continue;h!==(p.default||0)&&(d=!1)}else f.startsWith("origin")?(c=!0,l[f]=v):o[f]=v}}if(t.transform||(u||r?o.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(Og);var d,f=xn(i);try{for(f.s();!(d=f.n()).done;){var h=d.value;c+="".concat(Lg[h]||h,"(").concat(o[h],") ")}}catch(p){f.e(p)}finally{f.f()}return s&&!o.z&&(c+="translateZ(0)"),c=c.trim(),r?c=r(o,n?"":c):u&&n&&(c="none"),c}(e,n,d,r):o.transform&&(o.transform="none")),c){var g=l.originX,m=void 0===g?"50%":g,y=l.originY,b=void 0===y?"50%":y,w=l.originZ,k=void 0===w?0:w;o.transformOrigin="".concat(m," ").concat(b," ").concat(k)}}var gm=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function mm(e,t,n){for(var r in t)Pg(t[r])||Eg(r,n)||(e[r]=t[r])}function ym(e,t,n){var r={};return mm(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return cr.useMemo((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return vm(e,t,{enableHardwareAcceleration:!n},r),Object.assign({},e.vars,e.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function bm(e,t,n){var r={},o=ym(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),r.style=o,r}var wm=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll"].concat(["whileInView","onViewportEnter","onViewportLeave","viewport"],["whileTap","onTap","onTapStart","onTapCancel"],["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],["onPan","onPanStart","onPanSessionStart","onPanEnd"]));function km(e){return wm.has(e)}var xm,Sm=function(e){return!km(e)};try{(xm=require("@emotion/is-prop-valid").default)&&(Sm=function(e){return e.startsWith("on")?!km(e):xm(e)})}catch(qf){}function Cm(e,t,n){var r={};for(var o in e)(Sm(o)||!0===n&&km(o)||!t&&!km(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _m(e,t,n){return"string"==typeof e?e:Ug.transform(t+n*e)}var Em={offset:"stroke-dashoffset",array:"stroke-dasharray"},Pm={offset:"strokeDashoffset",array:"strokeDasharray"};function Lm(e,t,n,r){var o=t.attrX,a=t.attrY,s=t.originX,l=t.originY,u=t.pathLength,c=t.pathSpacing,d=void 0===c?1:c,f=t.pathOffset,h=void 0===f?0:f;vm(e,sn(t,i),n,r),e.attrs=e.style,e.style={};var p=e.attrs,v=e.style,g=e.dimensions;p.transform&&(g&&(v.transform=p.transform),delete p.transform),g&&(void 0!==s||void 0!==l||v.transform)&&(v.transformOrigin=function(e,t,n){var r=_m(t,e.x,e.width),o=_m(n,e.y,e.height);return"".concat(r," ").concat(o)}(g,void 0!==s?s:.5,void 0!==l?l:.5)),void 0!==o&&(p.x=o),void 0!==a&&(p.y=a),void 0!==u&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.pathLength=1;var i=o?Em:Pm;e[i.offset]=Ug.transform(-r);var a=Ug.transform(t),s=Ug.transform(n);e[i.array]="".concat(a," ").concat(s)}(p,u,d,h,!1)}var Om=function(){return un(un({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{},{attrs:{}})};function Am(e,t){var n=cr.useMemo((function(){var n=Om();return Lm(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),un(un({},n.attrs),{},{style:un({},n.style)})}),[t]);if(e.style){var r={};mm(r,e.style,e),n.style=un(un({},r),n.style)}return n}function Mm(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=function(t,n,r,o,i,a){var s=i.latestValues,l=(xg(t)?Am:bm)(n,s,a),u=un(un(un({},Cm(n,"string"==typeof t,e)),l),{},{ref:o});return r&&(u["data-projection-id"]=r),cr.createElement(t,u)};return t}var Tm=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};function Im(e,t,n,r){var o=t.style,i=t.vars;for(var a in Object.assign(e.style,o,r&&r.getProjectionStyles(n)),i)e.style.setProperty(a,i[a])}var Rm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Nm(e,t,n,r){for(var o in Im(e,t,void 0,r),t.attrs)e.setAttribute(Rm.has(o)?o:Tm(o),t.attrs[o])}function Dm(e){var t=e.style,n={};for(var r in t)(Pg(t[r])||Eg(r,e))&&(n[r]=t[r]);return n}function zm(e){var t=Dm(e);for(var n in e){if(Pg(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function jm(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}var Bm=function(e){return Array.isArray(e)},Fm=function(e){return Bm(e)?e[e.length-1]||0:e};function Hm(e){var t=Pg(e)?e.get():e;return function(e){return Boolean(e&&"object"===kn(e)&&e.mix&&e.toValue)}(t)?t.toValue():t}var Vm=function(e){return function(t,n){var r=cr.useContext($v),o=cr.useContext(Kv),i=function(){return function(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:Wm(t,n,r,o),renderState:i()};return a&&(s.mount=function(e){return a(t,e,s)}),s}(e,t,r,o)};return n?i():fg(i)}};function Wm(e,t,n,r){var o={},i=r(e);for(var s in i)o[s]=Hm(i[s]);var l=e.initial,u=e.animate,c=ag(e),d=sg(e);t&&d&&!c&&!1!==e.inherit&&(void 0===l&&(l=t.initial),void 0===u&&(u=t.animate));var f=!!n&&!1===n.initial,h=(f=f||!1===l)?u:l;h&&"boolean"!=typeof h&&!og(h)&&(Array.isArray(h)?h:[h]).forEach((function(t){var n=jm(e,t);if(n){var r=n.transitionEnd,i=(n.transition,sn(n,a));for(var s in i){var l=i[s];if(Array.isArray(l))l=l[f?l.length-1:0];null!==l&&(o[s]=l)}for(var u in r)o[u]=r[u]}}));return o}var Um,Gm={useVisualState:Vm({scrapeMotionValuesFromProps:zm,createRenderState:Om,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(Dhe){r.dimensions={x:0,y:0,width:0,height:0}}Lm(r,o,{enableHardwareAcceleration:!1},e.transformTemplate),Nm(t,r)}})},qm={useVisualState:Vm({scrapeMotionValuesFromProps:Dm,createRenderState:gm})};function Ym(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function Zm(e,t,n,r){cr.useEffect((function(){var o=e.current;if(n&&o)return Ym(o,t,n,r)}),[e,t,n,r])}function Xm(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function $m(e){return!!e.touches}function Km(e){return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"}(Um||(Um={}));var Qm={pageX:0,pageY:0};function Jm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page",n=e.touches[0]||e.changedTouches[0],r=n||Qm;return{x:r[t+"X"],y:r[t+"Y"]}}function ey(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{x:e[t+"X"],y:e[t+"Y"]}}function ty(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:$m(e)?Jm(e,t):ey(e,t)}}var ny=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(t){return e(t,ty(t))};return t?Km(n):n},ry={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},oy={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function iy(e){return Qv&&null===window.onpointerdown?e:Qv&&null===window.ontouchstart?oy[e]:Qv&&null===window.onmousedown?ry[e]:e}function ay(e,t,n,r){return Ym(e,iy(t),ny(n,"pointerdown"===t),r)}function sy(e,t,n,r){return Zm(e,iy(t),n&&ny(n,"pointerdown"===t),r)}function ly(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var uy=ly("dragHorizontal"),cy=ly("dragVertical");function dy(e){var t=!1;if("y"===e)t=cy();else if("x"===e)t=uy();else{var n=uy(),r=cy();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function fy(){var e=dy(!0);return!e||(e(),!1)}function hy(e,t,n){return function(r,o){Xm(r)&&!fy()&&(e.animationState&&e.animationState.setActive(Um.Hover,t),n&&n(r,o))}}var py=function e(t,n){return!!n&&(t===n||e(t,n.parentElement))};function vy(e){return cr.useEffect((function(){return function(){return e()}}),[])}function gy(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var my=function(e,t,n){return Math.min(Math.max(n,e),t)},yy=.001;function by(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,a=void 0===i?.25:i,s=e.velocity,l=void 0===s?0:s,u=e.mass,c=void 0===u?1:u,d=1-a;d=my(.05,1,d),o=my(.01,10,o/1e3),d<1?(t=function(e){var t=e*d,n=t*o,r=t-l,i=wy(e,d),a=Math.exp(-n);return yy-r/i*a},n=function(e){var n=e*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=wy(Math.pow(e,2),d);return(-t(e)+yy>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-l)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(l-e))});var f=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:o};var h=Math.pow(f,2)*c;return{stiffness:h,damping:2*d*Math.sqrt(c*h),duration:o}}function wy(e,t){return e*Math.sqrt(1-t*t)}var ky=["duration","bounce"],xy=["stiffness","damping","mass"];function Sy(e,t){return t.some((function(t){return void 0!==e[t]}))}function Cy(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.restSpeed,a=void 0===i?2:i,s=e.restDelta,l=gy(e,["from","to","restSpeed","restDelta"]),u={done:!1,value:n},c=function(e){var t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Sy(e,xy)&&Sy(e,ky)){var n=by(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(l),d=c.stiffness,f=c.damping,h=c.mass,p=c.velocity,v=c.duration,g=c.isResolvedFromDuration,m=_y,y=_y;function b(){var e=p?-p/1e3:0,t=o-n,r=f/(2*Math.sqrt(d*h)),i=Math.sqrt(d/h)/1e3;if(void 0===s&&(s=Math.min(Math.abs(o-n)/100,.4)),r<1){var a=wy(i,r);m=function(n){var s=Math.exp(-r*i*n);return o-s*((e+r*i*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},y=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(e+r*i*t)/a+t*Math.cos(a*n))-o*(Math.cos(a*n)*(e+r*i*t)-a*t*Math.sin(a*n))}}else if(1===r)m=function(n){return o-Math.exp(-i*n)*(t+(e+i*t)*n)};else{var l=i*Math.sqrt(r*r-1);m=function(n){var a=Math.exp(-r*i*n),s=Math.min(l*n,300);return o-a*((e+r*i*t)*Math.sinh(s)+l*t*Math.cosh(s))/l}}}return b(),{next:function(e){var t=m(e);if(g)u.done=e>=v;else{var n=1e3*y(e),r=Math.abs(n)<=a,i=Math.abs(o-t)<=s;u.done=r&&i}return u.value=u.done?o:t,u},flipTarget:function(){p=-p;var e=[o,n];n=e[0],o=e[1],b()}}}Cy.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var _y=function(e){return 0},Ey=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},Py=function(e,t,n){return-n*e+n*t+e};function Ly(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Oy(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;t/=360,r/=100;var i=0,a=0,s=0;if(n/=100){var l=r<.5?r*(1+n):r+n-r*n,u=2*r-l;i=Ly(u,l,t+1/3),a=Ly(u,l,t),s=Ly(u,l,t-1/3)}else i=a=s=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*s),alpha:o}}var Ay=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},My=[em,Jg,$g],Ty=function(e){return My.find((function(t){return t.test(e)}))},Iy=function(e,t){var n=Ty(e),r=Ty(t),o=n.parse(e),i=r.parse(t);n===$g&&(o=Oy(o),n=Jg),r===$g&&(i=Oy(i),r=Jg);var a=Object.assign({},o);return function(e){for(var t in a)"alpha"!==t&&(a[t]=Ay(o[t],i[t],e));return a.alpha=Py(o.alpha,i.alpha,e),n.transform(a)}},Ry=function(e){return"number"==typeof e},Ny=function(e,t){return function(n){return t(e(n))}},Dy=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(Ny)};function zy(e,t){return Ry(e)?function(n){return Py(e,t,n)}:tm.test(e)?Iy(e,t):Hy(e,t)}var jy=function(e,t){var n=cn(e),r=n.length,o=e.map((function(e,n){return zy(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}},By=function(e,t){var n=Object.assign(Object.assign({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=zy(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function Fy(e){for(var t=lm.parse(e),n=t.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}var Hy=function(e,t){var n=lm.createTransformer(t),r=Fy(e),o=Fy(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?Dy(jy(r.parsed,o.parsed),n):function(n){return"".concat(n>0?t:e)}},Vy=function(e,t){return function(n){return Py(e,t,n)}};function Wy(e,t,n){for(var r=[],o=n||function(e){return"number"==typeof e?Vy:"string"==typeof e?tm.test(e)?Iy:Hy:Array.isArray(e)?jy:"object"===kn(e)?By:void 0}(e[0]),i=e.length-1,a=0;a<i;a++){var s=o(e[a],e[a+1]);if(t){var l=Array.isArray(t)?t[a]:t;s=Dy(l,s)}r.push(s)}return r}function Uy(e,t){var n=yn(e,2),r=n[0],o=n[1],i=yn(t,1)[0];return function(e){return i(Ey(r,o,e))}}function Gy(e,t){var n=e.length,r=n-1;return function(o){var i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>o||s===r);s++);i=s-1}var l=Ey(e[i],e[i+1],o);return t[i](l)}}function qy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.clamp,o=void 0===r||r,i=n.ease,a=n.mixer,s=e.length;t.length,!i||!Array.isArray(i)||i.length,e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var l=Wy(t,i,a),u=2===s?Uy(e,l):Gy(e,l);return o?function(t){return u(my(e[0],e[s-1],t))}:u}var Yy,Zy=function(e){return function(t){return 1-e(1-t)}},Xy=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},$y=function(e){return function(t){return t*t*((e+1)*t-e)}},Ky=function(e){return e},Qy=(Yy=2,function(e){return Math.pow(e,Yy)}),Jy=Zy(Qy),eb=Xy(Qy),tb=function(e){return 1-Math.sin(Math.acos(e))},nb=Zy(tb),rb=Xy(nb),ob=$y(1.525),ib=Zy(ob),ab=Xy(ob),sb=function(e){var t=$y(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),lb=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},ub=Zy(lb);function cb(e,t){return e.map((function(){return t||eb})).splice(0,e.length-1)}function db(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===c.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(c),l);function f(){return qy(d,c,{ease:Array.isArray(i)?i:cb(c,i)})}var h=f();return{next:function(e){return u.value=h(e),u.done=e>=l,u},flipTarget:function(){c.reverse(),h=f()}}}var fb={keyframes:db,spring:Cy,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,u=e.restDelta,c=void 0===u?.5:u,d=e.modifyTarget,f={done:!1,value:o},h=a*n,p=o+h,v=void 0===d?p:d(p);return v!==p&&(h=v-o),{next:function(e){var t=-h*Math.exp(-e/l);return f.done=!(t>c||t<-c),f.value=f.done?v:v+t,f},flipTarget:function(){}}}};var hb=1/60*1e3,pb="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},vb="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(pb())}),hb)};var gb=!0,mb=!1,yb=!1,bb={delta:0,timestamp:0},wb=["read","update","preRender","render","postRender"],kb=wb.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=!1,a=new WeakSet,s={schedule:function(e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&o,s=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),-1===s.indexOf(e)&&(s.push(e),i&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(l){if(o)i=!0;else{o=!0;var u=[n,t];if(t=u[0],(n=u[1]).length=0,r=t.length)for(var c=0;c<r;c++){var d=t[c];d(l),a.has(d)&&(s.schedule(d),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((function(){return mb=!0})),e}),{}),xb=wb.reduce((function(e,t){var n=kb[t];return e[t]=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return mb||Eb(),n.schedule(e,t,r)},e}),{}),Sb=wb.reduce((function(e,t){return e[t]=kb[t].cancel,e}),{});wb.reduce((function(e,t){return e[t]=function(){return kb[t].process(bb)},e}),{});var Cb=function(e){return kb[e].process(bb)},_b=function e(t){mb=!1,bb.delta=gb?hb:Math.max(Math.min(t-bb.timestamp,40),1),bb.timestamp=t,yb=!0,wb.forEach(Cb),yb=!1,mb&&(gb=!1,vb(e))},Eb=function(){mb=!0,gb=!0,yb||vb(_b)};function Pb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e-t-n}var Lb=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return xb.update(t,!0)},stop:function(){return Sb.update(t)}}};function Ob(e){var t,n,r,o,i,a=e.from,s=e.autoplay,l=void 0===s||s,u=e.driver,c=void 0===u?Lb:u,d=e.elapsed,f=void 0===d?0:d,h=e.repeat,p=void 0===h?0:h,v=e.repeatType,g=void 0===v?"loop":v,m=e.repeatDelay,y=void 0===m?0:m,b=e.onPlay,w=e.onStop,k=e.onComplete,x=e.onRepeat,S=e.onUpdate,C=gy(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),_=C.to,E=0,P=C.duration,L=!1,O=!0,A=function(e){if(Array.isArray(e.to))return db;if(fb[e.type])return fb[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?db:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Cy:db}(C);(null===(n=(t=A).needsInterpolation)||void 0===n?void 0:n.call(t,a,_))&&(i=qy([0,100],[a,_],{clamp:!1}),a=0,_=100);var M=A(Object.assign(Object.assign({},C),{from:a,to:_}));function T(){E++,"reverse"===g?f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r?Pb(t+-e,t,n):t-(e-t)+n}(f,P,y,O=E%2==0):(f=Pb(f,P,y),"mirror"===g&&M.flipTarget()),L=!1,x&&x()}function I(e){if(O||(e=-e),f+=e,!L){var t=M.next(Math.max(0,f));o=t.value,i&&(o=i(o)),L=O?t.done:f<=0}null==S||S(o),L&&(0===E&&(null!=P||(P=f)),E<p?function(e,t,n,r){return r?e>=t+n:e<=-n}(f,P,y,O)&&T():(r.stop(),k&&k()))}return l&&(null==b||b(),(r=c(I)).start()),{stop:function(){null==w||w(),r.stop()}}}function Ab(e,t){return t?e*(1e3/t):0}function Mb(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,i=void 0===o?0:o,a=e.min,s=e.max,l=e.power,u=void 0===l?.8:l,c=e.timeConstant,d=void 0===c?750:c,f=e.bounceStiffness,h=void 0===f?500:f,p=e.bounceDamping,v=void 0===p?10:p,g=e.restDelta,m=void 0===g?1:g,y=e.modifyTarget,b=e.driver,w=e.onUpdate,k=e.onComplete,x=e.onStop;function S(e){return void 0!==a&&e<a||void 0!==s&&e>s}function C(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function _(e){null==t||t.stop(),t=Ob(Object.assign(Object.assign({},e),{driver:b,onUpdate:function(t){var n;null==w||w(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:k,onStop:x}))}function E(e){_(Object.assign({type:"spring",stiffness:h,damping:v,restDelta:m},e))}if(S(r))E({from:r,velocity:i,to:C(r)});else{var P=u*i+r;void 0!==y&&(P=y(P));var L,O,A=C(P),M=A===a?-1:1;_({type:"decay",from:r,velocity:i,timeConstant:d,power:u,restDelta:m,modifyTarget:y,onUpdate:S(P)?function(e){L=O,O=e,i=Ab(e-L,bb.delta),(1===M&&e>A||-1===M&&e<A)&&E({from:e,to:A,velocity:i})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}var Tb=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ib=function(e){return Tb(e)&&e.hasOwnProperty("z")},Rb=function(e,t){return Math.abs(e-t)};function Nb(e,t){if(Ry(e)&&Ry(t))return Rb(e,t);if(Tb(e)&&Tb(t)){var n=Rb(e.x,t.x),r=Rb(e.y,t.y),o=Ib(e)&&Ib(t)?Rb(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var Db=function(e,t){return 1-3*t+3*e},zb=function(e,t){return 3*t-6*e},jb=function(e){return 3*e},Bb=function(e,t,n){return((Db(t,n)*e+zb(t,n))*e+jb(t))*e},Fb=function(e,t,n){return 3*Db(t,n)*e*e+2*zb(t,n)*e+jb(t)};var Hb=.1;function Vb(e,t,n,r){if(e===t&&n===r)return Ky;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Bb(i*Hb,e,n);function a(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=Hb;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*Hb,s=Fb(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var i=Fb(t,n,r);if(0===i)return t;t-=(Bb(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=Bb(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+Hb,e,n)}return function(e){return 0===e||1===e?e:Bb(a(e),t,r)}}var Wb=("undefined"==typeof process||process.env,"production"),Ub=new Set;function Gb(e,t,n){e||Ub.has(t)||(console.warn(t),n&&console.warn(n),Ub.add(t))}var qb=new WeakMap,Yb=new WeakMap,Zb=function(e){var t=qb.get(e.target);t&&t(e)},Xb=function(e){e.forEach(Zb)};function $b(e,t,n){var r=function(e){var t=e.root,n=sn(e,s),r=t||document;Yb.has(r)||Yb.set(r,{});var o=Yb.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(Xb,un({root:t},n))),o[i]}(t);return qb.set(e,n),r.observe(e),function(){qb.delete(e),r.unobserve(e)}}var Kb={some:0,all:1};function Qb(e,t,n,r){var o=r.root,i=r.margin,a=r.amount,s=void 0===a?"some":a,l=r.once;cr.useEffect((function(){if(e&&n.current){var r={root:null==o?void 0:o.current,rootMargin:i,threshold:"number"==typeof s?s:Kb[s]};return $b(n.current,r,(function(e){var r=e.isIntersecting;if(t.isInView!==r&&(t.isInView=r,!l||r||!t.hasEnteredView)){r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Um.InView,r);var o=n.getProps(),i=r?o.onViewportEnter:o.onViewportLeave;i&&i(e)}}))}}),[e,o,i,s])}function Jb(e,t,n,r){var o=r.fallback,i=void 0===o||o;cr.useEffect((function(){e&&i&&("production"!==Wb&&Gb(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame((function(){t.hasEnteredView=!0;var e=n.getProps().onViewportEnter;e&&e(null),n.animationState&&n.animationState.setActive(Um.InView,!0)})))}),[e])}var ew=function(e){return function(t){return e(t),null}},tw={inView:ew((function(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=void 0===i?{}:i,s=cr.useRef({hasEnteredView:!1,isInView:!1}),l=Boolean(n||r||o);a.once&&s.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?Jb:Qb)(l,s.current,t,a)})),tap:ew((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=cr.useRef(!1),l=cr.useRef(null),u={passive:!(n||t||r||p)};function c(){l.current&&l.current(),l.current=null}function d(){return c(),s.current=!1,i.animationState&&i.animationState.setActive(Um.Tap,!1),!fy()}function f(e,n){d()&&(py(i.current,e.target)?t&&t(e,n):r&&r(e,n))}function h(e,t){d()&&r&&r(e,t)}function p(e,t){c(),s.current||(s.current=!0,l.current=Dy(ay(window,"pointerup",f,u),ay(window,"pointercancel",h,u)),i.animationState&&i.animationState.setActive(Um.Tap,!0),n&&n(e,t))}sy(i,"pointerdown",a?p:void 0,u),vy(c)})),focus:ew((function(e){var t=e.whileFocus,n=e.visualElement,r=n.animationState;Zm(n,"focus",t?function(){r&&r.setActive(Um.Focus,!0)}:void 0),Zm(n,"blur",t?function(){r&&r.setActive(Um.Focus,!1)}:void 0)})),hover:ew((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;sy(o,"pointerenter",t||r?hy(o,!0,t):void 0,{passive:!t}),sy(o,"pointerleave",n||r?hy(o,!1,n):void 0,{passive:!n})}))};function nw(){var e=cr.useContext(Kv);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=cr.useId();cr.useEffect((function(){return r(o)}),[]);return!t&&n?[!1,function(){return n&&n(o)}]:[!0]}function rw(){return null===(e=cr.useContext(Kv))||e.isPresent;var e}function ow(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var iw=function(e){return 1e3*e},aw={linear:Ky,easeIn:Qy,easeInOut:eb,easeOut:Jy,circIn:tb,circInOut:rb,circOut:nb,backIn:ob,backInOut:ab,backOut:ib,anticipate:sb,bounceIn:ub,bounceInOut:function(e){return e<.5?.5*(1-lb(1-2*e)):.5*lb(2*e-1)+.5},bounceOut:lb},sw=function(e){if(Array.isArray(e)){e.length;var t=yn(e,4);return Vb(t[0],t[1],t[2],t[3])}return"string"==typeof e?aw[e]:e},lw=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!lm.test(t)||t.startsWith("url(")))},uw=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},cw=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},dw=function(){return{type:"keyframes",ease:"linear",duration:.3}},fw=function(e){return{type:"keyframes",duration:.8,values:e}},hw={x:uw,y:uw,z:uw,rotate:uw,rotateX:uw,rotateY:uw,rotateZ:uw,scaleX:cw,scaleY:cw,scale:cw,opacity:dw,backgroundColor:dw,color:dw,default:cw},pw=un(un({},pm),{},{color:tm,backgroundColor:tm,outlineColor:tm,fill:tm,stroke:tm,borderColor:tm,borderTopColor:tm,borderRightColor:tm,borderBottomColor:tm,borderLeftColor:tm,filter:fm,WebkitFilter:fm}),vw=function(e){return pw[e]};function gw(e,t){var n,r=vw(e);return r!==fm&&(r=lm),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var mw=!1,yw=1/60*1e3,bw="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},ww="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(bw())}),yw)};var kw=!0,xw=!1,Sw=!1,Cw={delta:0,timestamp:0},_w=["read","update","preRender","render","postRender"],Ew=_w.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=!1,a=new WeakSet,s={schedule:function(e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&o,s=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),-1===s.indexOf(e)&&(s.push(e),i&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(l){if(o)i=!0;else{o=!0;var u=[n,t];if(t=u[0],(n=u[1]).length=0,r=t.length)for(var c=0;c<r;c++){var d=t[c];d(l),a.has(d)&&(s.schedule(d),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((function(){return xw=!0})),e}),{}),Pw=_w.reduce((function(e,t){var n=Ew[t];return e[t]=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return xw||Tw(),n.schedule(e,t,r)},e}),{}),Lw=_w.reduce((function(e,t){return e[t]=Ew[t].cancel,e}),{}),Ow=_w.reduce((function(e,t){return e[t]=function(){return Ew[t].process(Cw)},e}),{}),Aw=function(e){return Ew[e].process(Cw)},Mw=function e(t){xw=!1,Cw.delta=kw?yw:Math.max(Math.min(t-Cw.timestamp,40),1),Cw.timestamp=t,Sw=!0,_w.forEach(Aw),Sw=!1,xw&&(kw=!1,ww(e))},Tw=function(){xw=!0,kw=!0,Sw||ww(Mw)},Iw=function(){return Cw};function Rw(e,t){var n=performance.now(),r=function r(o){var i=o.timestamp-n;i>=t&&(Lw.read(r),e(i-t))};return Pw.read(r,!0),function(){return Lw.read(r)}}function Nw(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=sn(e,u),s=un({},a);return n&&(s.offset=n),a.duration&&(s.duration=iw(a.duration)),a.repeatDelay&&(s.repeatDelay=iw(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(sw):sw(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function Dw(e,t){var n,r;return null!==(r=null!==(n=(Hw(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}function zw(e,t,n){var r,o;return Array.isArray(t.to)&&void 0===e.duration&&(e.duration=.8),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=cn(e.to),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=sn(e,l);return!!Object.keys(t).length}(e)||(e=un(un({},e),(r=n,un({to:o=t.to},(Bm(o)?fw:hw[r]||hw.default)(o))))),un(un({},t),Nw(e))}function jw(e,t,n,r,o){var i=Hw(r,e)||{},a=void 0!==i.from?i.from:t.get(),s=lw(e,n);return"none"===a&&s&&"string"==typeof n?a=gw(e,n):Bw(a)&&"string"==typeof n?a=Fw(n):!Array.isArray(n)&&Bw(n)&&"string"==typeof a&&(n=Fw(a)),lw(e,a)&&s&&!1!==i.type?function(){var r={from:a,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===i.type||"decay"===i.type?Mb(un(un({},r),i)):Ob(un(un({},zw(i,r,e)),{},{onUpdate:function(e){r.onUpdate(e),i.onUpdate&&i.onUpdate(e)},onComplete:function(){r.onComplete(),i.onComplete&&i.onComplete()}}))}:function(){var e=Fm(n);return t.set(e),o(),i.onUpdate&&i.onUpdate(e),i.onComplete&&i.onComplete(),{stop:function(){}}}}function Bw(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function Fw(e){return"number"==typeof e?0:gw("",e)}function Hw(e,t){return e[t]||e.default||e}function Vw(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return mw&&(r={type:!1}),t.start((function(o){var i,a,s=jw(e,t,n,r,o),l=Dw(r,e),u=function(){return i=s()};return l?a=Rw(u,iw(l)):u(),function(){a&&a(),i&&i.stop()}}))}var Ww=function(e){return/^\-?\d*\.?\d+$/.test(e)},Uw=function(e){return/^0[^.\s]+$/.test(e)};function Gw(e,t){-1===e.indexOf(t)&&e.push(t)}function qw(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Yw=function(){function e(){an(this,e),this.subscriptions=[]}return on(e,[{key:"add",value:function(e){var t=this;return Gw(this.subscriptions,e),function(){return qw(t.subscriptions,e)}}},{key:"notify",value:function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}}},{key:"getSize",value:function(){return this.subscriptions.length}},{key:"clear",value:function(){this.subscriptions.length=0}}]),e}(),Zw=function(){function e(t){var n=this;an(this,e),this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Yw,this.velocityUpdateSubscribers=new Yw,this.renderSubscribers=new Yw,this.canTrackVelocity=!1,this.updateAndNotify=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n.prev=n.current,n.current=e;var r=Iw(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,Pw.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return Pw.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=function(e){return!isNaN(parseFloat(e))}(this.current)}return on(e,[{key:"onChange",value:function(e){return this.updateSubscribers.add(e)}},{key:"clearListeners",value:function(){this.updateSubscribers.clear()}},{key:"onRenderRequest",value:function(e){return e(this.get()),this.renderSubscribers.add(e)}},{key:"attach",value:function(e){this.passiveEffect=e}},{key:"set",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}},{key:"get",value:function(){return this.current}},{key:"getPrevious",value:function(){return this.prev}},{key:"getVelocity",value:function(){return this.canTrackVelocity?Ab(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}},{key:"start",value:function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))}},{key:"stop",value:function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}},{key:"isAnimating",value:function(){return!!this.stopAnimation}},{key:"clearAnimation",value:function(){this.stopAnimation=null}},{key:"destroy",value:function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}]),e}();function Xw(e){return new Zw(e)}var $w=function(e){return function(t){return t.test(e)}},Kw=[jg,Ug,Wg,Vg,qg,Gg,{test:function(e){return"auto"===e},parse:function(e){return e}}],Qw=function(e){return Kw.find($w(e))},Jw=[].concat(Kw,[tm,lm]),ek=function(e){return Jw.find($w(e))};function tk(e,t,n){var r=e.getProps();return jm(r,t,void 0!==n?n:r.custom,function(e){var t={};return e.values.forEach((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.values.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function nk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xw(n))}function rk(e,t){var n=tk(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o,a=(r.transition,sn(r,c));for(var s in a=un(un({},a),i)){nk(e,s,Fm(a[s]))}}function ok(e,t){if(t)return(t[e]||t.default||t).from}function ik(e){return Boolean(Pg(e)&&e.add)}function ak(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=tk(e,t,r.custom),i=o||{},a=i.transition,s=void 0===a?e.getDefaultTransition()||{}:a;r.transitionOverride&&(s=r.transitionOverride);var l=o?function(){return sk(e,o,r)}:function(){return Promise.resolve()},u=(null===(n=e.variantChildren)||void 0===n?void 0:n.size)?function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=s,i=o.delayChildren,a=void 0===i?0:i,l=o.staggerChildren,u=o.staggerDirection;return lk(e,t,a+n,l,u,r)}:function(){return Promise.resolve()},c=s,d=c.when;if(d){var f="beforeChildren"===d?[l,u]:[u,l],h=yn(f,2),p=h[0],v=h[1];return p().then(v)}return Promise.all([l(),u(r.delay)])}function sk(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.delay,i=void 0===o?0:o,a=r.transitionOverride,s=r.type,l=e.makeTargetAnimatable(t),u=l.transition,c=void 0===u?e.getDefaultTransition():u,f=l.transitionEnd,h=sn(l,d),p=e.getValue("willChange");a&&(c=a);var v=[],g=s&&(null===(n=e.animationState)||void 0===n?void 0:n.getState()[s]),m=function(t){var n=e.getValue(t),r=h[t];if(!n||void 0===r||g&&ck(g,t))return"continue";var o=un({delay:i},c);e.shouldReduceMotion&&_g.has(t)&&(o=un(un({},o),{},{type:!1,delay:0}));var a=Vw(t,n,r,o);ik(p)&&(p.add(t),a=a.then((function(){return p.remove(t)}))),v.push(a)};for(var y in h)m(y);return Promise.all(v).then((function(){f&&rk(e,f)}))}function lk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=arguments.length>5?arguments[5]:void 0,a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e*r}:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return s-e*r};return Array.from(e.variantChildren).sort(uk).forEach((function(e,r){a.push(ak(e,t,un(un({},i),{},{delay:n+l(r)})).then((function(){return e.notify("AnimationComplete",t)})))})),Promise.all(a)}function uk(e,t){return e.sortNodePosition(t)}function ck(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var dk=[Um.Animate,Um.InView,Um.Focus,Um.Hover,Um.Tap,Um.Drag,Um.Exit],fk=[].concat(dk).reverse(),hk=dk.length;function pk(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){var o=t.map((function(t){return ak(e,t,r)}));n=Promise.all(o)}else if("string"==typeof t)n=ak(e,t,r);else{var i="function"==typeof t?tk(e,t,r.custom):t;n=sk(e,i,r)}return n.then((function(){return e.notify("AnimationComplete",t)}))}(e,n,r)})))}}function vk(e){var t,n=pk(e),r=(gn(t={},Um.Animate,gk(!0)),gn(t,Um.InView,gk()),gn(t,Um.Hover,gk()),gn(t,Um.Tap,gk()),gn(t,Um.Drag,gk()),gn(t,Um.Focus,gk()),gn(t,Um.Exit,gk()),t),o=!0,i=function(t,n){var r=tk(e,n);if(r){r.transition;var o=r.transitionEnd,i=sn(r,f);t=un(un(un({},t),i),o)}return t};function a(t,a){for(var s,l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],d=new Set,f={},h=1/0,p=function(){var n=fk[v],p=r[n],g=null!==(s=l[n])&&void 0!==s?s:u[n],m=rg(g),y=n===a?p.isActive:null;!1===y&&(h=v);var b=g===u[n]&&g!==l[n]&&m;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys=un({},f),!p.isActive&&null===y||!g&&!p.prevProp||og(g)||"boolean"==typeof g)return"continue";var w=function(e,t){if("string"==typeof t)return t!==e;if(Array.isArray(t))return!ow(t,e);return!1}(p.prevProp,g),k=w||n===a&&p.isActive&&!b&&m||v>h&&m,x=Array.isArray(g)?g:[g],S=x.reduce(i,{});!1===y&&(S={});var C=p.prevResolvedValues,_=void 0===C?{}:C,E=un(un({},_),S),P=function(e){k=!0,d.delete(e),p.needsAnimating[e]=!0};for(var L in E){var O=S[L],A=_[L];f.hasOwnProperty(L)||(O!==A?Bm(O)&&Bm(A)?!ow(O,A)||w?P(L):p.protectedKeys[L]=!0:void 0!==O?P(L):d.add(L):void 0!==O&&d.has(L)?P(L):p.protectedKeys[L]=!0)}p.prevProp=g,p.prevResolvedValues=S,p.isActive&&(f=un(un({},f),S)),o&&e.blockInitialAnimation&&(k=!1),k&&!b&&c.push.apply(c,cn(x.map((function(e){return{animation:e,options:un({type:n},t)}}))))},v=0;v<hk;v++)p();if(d.size){var g={};d.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(g[t]=n)})),c.push({animation:g})}var m=Boolean(c.length);return o&&!1===l.initial&&!e.manuallyAnimateOnMount&&(m=!1),o=!1,m?n(c):Promise.resolve()}return{animateChanges:a,setActive:function(t,n,o){var i;if(r[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n;var s=a(o,t);for(var l in r)r[l].protectedKeys={};return s},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}function gk(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var mk={animation:ew((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=vk(t)),og(n)&&cr.useEffect((function(){return n.subscribe(t)}),[n])})),exit:ew((function(e){var t=e.custom,n=e.visualElement,r=yn(nw(),2),o=r[0],i=r[1],a=cr.useContext(Kv);cr.useEffect((function(){n.isPresent=o;var e=n.animationState&&n.animationState.setActive(Um.Exit,!o,{custom:a&&a.custom||t});e&&!o&&e.then(i)}),[o])}))},yk=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.transformPagePoint;if(an(this,e),this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=kk(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Nb(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=Iw().timestamp;r.history.push(un(un({},o),{},{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=bk(t,r.transformPagePoint),Xm(e)&&0===e.buttons?r.handlePointerUp(e,t):Pw.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=kk(bk(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!($m(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var a=ty(t),s=bk(a,this.transformPagePoint),l=s.point,u=Iw(),c=u.timestamp;this.history=[un(un({},l),{},{timestamp:c})];var d=n.onSessionStart;d&&d(t,kk(s,this.history)),this.removeListeners=Dy(ay(window,"pointermove",this.handlePointerMove),ay(window,"pointerup",this.handlePointerUp),ay(window,"pointercancel",this.handlePointerUp))}}return on(e,[{key:"updateHandlers",value:function(e){this.handlers=e}},{key:"end",value:function(){this.removeListeners&&this.removeListeners(),Lw.update(this.updatePoint)}}]),e}();function bk(e,t){return t?{point:t(e.point)}:e}function wk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kk(e,t){var n=e.point;return{point:n,delta:wk(n,Sk(t)),offset:wk(n,xk(t)),velocity:Ck(t,.1)}}function xk(e){return e[0]}function Sk(e){return e[e.length-1]}function Ck(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Sk(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>iw(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _k(e){return e.max-e.min}function Ek(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Nb(e,t)<n}function Pk(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=Py(t.min,t.max,e.origin),e.scale=_k(n)/_k(t),(Ek(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Py(n.min,n.max,e.origin)-e.originPoint,(Ek(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Lk(e,t,n,r){Pk(e.x,t.x,n.x,null==r?void 0:r.originX),Pk(e.y,t.y,n.y,null==r?void 0:r.originY)}function Ok(e,t,n){e.min=n.min+t.min,e.max=e.min+_k(t)}function Ak(e,t,n){e.min=t.min-n.min,e.max=e.min+_k(t)}function Mk(e,t,n){Ak(e.x,t.x,n.x),Ak(e.y,t.y,n.y)}function Tk(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Ik(e,t){var n=t.min-e.min,r=t.max-e.max;if(t.max-t.min<e.max-e.min){var o=[r,n];n=o[0],r=o[1]}return{min:n,max:r}}var Rk=.35;function Nk(e,t,n){return{min:Dk(e,t),max:Dk(e,n)}}function Dk(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function zk(e){return[e("x"),e("y")]}function jk(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function Bk(e){return void 0===e||1===e}function Fk(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!Bk(t)||!Bk(n)||!Bk(r)}function Hk(e){return Fk(e)||Vk(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Vk(e){return Wk(e.x)||Wk(e.y)}function Wk(e){return e&&"0%"!==e}function Uk(e,t,n){return n+t*(e-n)}function Gk(e,t,n,r,o){return void 0!==o&&(e=Uk(e,o,r)),Uk(e,n,r)+t}function qk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;e.min=Gk(e.min,t,n,r,o),e.max=Gk(e.max,t,n,r,o)}function Yk(e,t){var n=t.x,r=t.y;qk(e.x,n.translate,n.scale,n.originPoint),qk(e.y,r.translate,r.scale,r.originPoint)}function Zk(e,t){e.min=e.min+t,e.max=e.max+t}function Xk(e,t,n){var r=yn(n,3),o=r[0],i=r[1],a=r[2],s=void 0!==t[a]?t[a]:.5,l=Py(e.min,e.max,s);qk(e,t[o],t[i],l,t.scale)}var $k=["x","scaleX","originX"],Kk=["y","scaleY","originY"];function Qk(e,t){Xk(e.x,t,$k),Xk(e.y,t,Kk)}function Jk(e,t){return jk(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var ex=new WeakMap,tx=function(){function e(t){an(this,e),this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}return on(e,[{key:"start",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.snapToCursor,o=void 0!==r&&r;if(!1!==this.visualElement.isPresent){var i=function(e){t.stopAnimation(),o&&t.snapToCursor(ty(e,"page").point)},a=function(e,n){var r,o=t.getProps(),i=o.drag,a=o.dragPropagation,s=o.onDragStart;(!i||a||(t.openGlobalLock&&t.openGlobalLock(),t.openGlobalLock=dy(i),t.openGlobalLock))&&(t.isDragging=!0,t.currentDirection=null,t.resolveConstraints(),t.visualElement.projection&&(t.visualElement.projection.isAnimationBlocked=!0,t.visualElement.projection.target=void 0),zk((function(e){var n,r,o=t.getAxisMotionValue(e).get()||0;if(Wg.test(o)){var i=null===(r=null===(n=t.visualElement.projection)||void 0===n?void 0:n.layout)||void 0===r?void 0:r.layoutBox[e];if(i)o=_k(i)*(parseFloat(o)/100)}t.originPoint[e]=o})),null==s||s(e,n),null===(r=t.visualElement.animationState)||void 0===r||r.setActive(Um.Drag,!0))},s=function(e,n){var r=t.getProps(),o=r.dragPropagation,i=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(o||t.openGlobalLock){var l=n.offset;if(i&&null===t.currentDirection)return t.currentDirection=rx(l),void(null!==t.currentDirection&&(null==a||a(t.currentDirection)));t.updateAxis("x",n.point,l),t.updateAxis("y",n.point,l),t.visualElement.render(),null==s||s(e,n)}},l=function(e,n){return t.stop(e,n)};this.panSession=new yk(e,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l},{transformPagePoint:this.visualElement.getTransformPagePoint()})}}},{key:"stop",value:function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null==o||o(e,t)}}},{key:"cancel",value:function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Um.Drag,!1)}},{key:"updateAxis",value:function(e,t,n){var r=this.getProps().drag;if(n&&nx(e,r,this.currentDirection)){var o=this.getAxisMotionValue(e),i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?Py(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?Py(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}}},{key:"resolveConstraints",value:function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&ng(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Tk(e.x,r,i),y:Tk(e.y,n,o)}}(o.layoutBox,n),this.elastic=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rk;return!1===e?e=0:!0===e&&(e=Rk),{x:Nk(e,"left","right"),y:Nk(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&zk((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.layoutBox[t],e.constraints[t]))}))}},{key:"resolveRefConstraints",value:function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!ng(t))return!1;var r=t.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=Jk(e,n),o=t.scroll;return o&&(Zk(r.x,o.offset.x),Zk(r.y,o.offset.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:Ik(e.x,t.x),y:Ik(e.y,t.y)}}(o.layout.layoutBox,i);if(n){var s=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=jk(s))}return a}},{key:"startAnimation",value:function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,u=this.constraints||{},c=zk((function(n){var l;if(nx(n,r,t.currentDirection)){var c=null!==(l=null==u?void 0:u[n])&&void 0!==l?l:{};s&&(c={min:0,max:0});var d=i?200:1e6,f=i?40:1e7,h=un(un({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.startAxisValueAnimation(n,h)}}));return Promise.all(c).then(l)}},{key:"startAxisValueAnimation",value:function(e,t){return Vw(e,this.getAxisMotionValue(e),0,t)}},{key:"stopAnimation",value:function(){var e=this;zk((function(t){return e.getAxisMotionValue(t).stop()}))}},{key:"getAxisMotionValue",value:function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)}},{key:"snapToCursor",value:function(e){var t=this;zk((function(n){if(nx(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.layoutBox[n],a=i.min,s=i.max;o.set(e[n]-Py(a,s,.5))}}}))}},{key:"scalePositionWithinConstraints",value:function(){var e,t=this;if(this.visualElement.current){var n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(ng(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};zk((function(e){var n,r,o,i,s,l=t.getAxisMotionValue(e);if(l){var u=l.get();a[e]=(n={min:u,max:u},r=t.constraints[e],o=.5,i=_k(n),(s=_k(r))>i?o=Ey(r.min,r.max-i,n.min):i>s&&(o=Ey(n.min,n.max-s,r.min)),my(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.current.style.transform=s?s({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),zk((function(e){if(nx(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,s=o.max;n.set(Py(i,s,a[e]))}}))}}}},{key:"addListeners",value:function(){var e,t=this;if(this.visualElement.current){ex.set(this.visualElement,this);var n=ay(this.visualElement.current,"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){ng(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=Ym(window,"resize",(function(){return t.scalePositionWithinConstraints()})),s=o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(zk((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.render())}));return function(){a(),n(),i(),null==s||s()}}}},{key:"getProps",value:function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?Rk:u,d=e.dragMomentum,f=void 0===d||d;return un(un({},e),{},{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f})}}]),e}();function nx(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function rx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}var ox={pan:ew((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=cr.useRef(null),l=cr.useContext(Xv).transformPagePoint,u={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};cr.useEffect((function(){null!==s.current&&s.current.updateHandlers(u)})),sy(i,"pointerdown",a&&function(e){s.current=new yk(e,u,{transformPagePoint:l})}),vy((function(){return s.current&&s.current.end()}))})),drag:ew((function(e){var t=e.dragControls,n=e.visualElement,r=fg((function(){return new tx(n)}));cr.useEffect((function(){return t&&t.subscribe(r)}),[r,t]),cr.useEffect((function(){return r.addListeners()}),[r])}))};function ix(e){return"string"==typeof e&&e.startsWith("var(--")}var ax=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sx(e){var t=ax.exec(e);if(!t)return[,];var n=yn(t,3);return[n[1],n[2]]}function lx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=sx(e),o=yn(r,2),i=o[0],a=o[1];if(i){var s=window.getComputedStyle(t).getPropertyValue(i);return s?s.trim():ix(a)?lx(a,t,n+1):a}}var ux,cx=new Set(["width","height","top","left","right","bottom","x","y"]),dx=function(e){return cx.has(e)},fx=function(e,t){e.set(t,!1),e.set(t)},hx=function(e){return e===jg||e===Ug};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(ux||(ux={}));var px=function(e,t){return parseFloat(e.split(", ")[t])},vx=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return px(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?px(a[1],e):0}},gx=new Set(["x","y","z"]),mx=Cg.filter((function(e){return!gx.has(e)}));function yx(e){var t=[];return mx.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}var bx={width:function(e,t){var n=e.x,r=t.paddingLeft,o=void 0===r?"0":r,i=t.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(e,t){var n=e.y,r=t.paddingTop,o=void 0===r?"0":r,i=t.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:vx(4,13),y:vx(5,14)},wx=function(e,t,n){var r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),a=i.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=bx[e](r,i)})),t.render();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);fx(r,s[n]),e[n]=bx[n](l,i)})),e};function kx(e,t,n,r){return function(e){return Object.keys(e).some(dx)}(t)?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=un({},t),r=un({},r);var o=Object.keys(t).filter(dx),i=[],a=!1,s=[];if(o.forEach((function(o){var l=e.getValue(o);if(e.hasValue(o)){var u,c=n[o],d=Qw(c),f=t[o];if(Bm(f)){var h=f.length,p=null===f[0]?1:0;c=f[p],d=Qw(c);for(var v=p;v<h;v++)u?Qw(f[v]):u=Qw(f[v])}else u=Qw(f);if(d!==u)if(hx(d)&&hx(u)){var g=l.get();"string"==typeof g&&l.set(parseFloat(g)),"string"==typeof f?t[o]=parseFloat(f):Array.isArray(f)&&u===Ug&&(t[o]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==u?void 0:u.transform)&&(0===c||0===f)?0===c?l.set(u.transform(c)):t[o]=d.transform(f):(a||(i=yx(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],fx(l,f))}})),s.length){var l=s.indexOf("height")>=0?window.pageYOffset:null,u=wx(t,e,s);return i.length&&i.forEach((function(t){var n=yn(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.render(),Qv&&null!==l&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}return{target:t,transitionEnd:r}}(e,t,n,r):{target:t,transitionEnd:r}}var xx=function(e,t,n,r){var o=function(e,t,n){var r=Object.assign({},(Kt(t),t)),o=e.current;if(!(o instanceof Element))return{target:r,transitionEnd:n};for(var i in n&&(n=un({},n)),e.values.forEach((function(e){var t=e.get();if(ix(t)){var n=lx(t,o);n&&e.set(n)}})),r){var a=r[i];if(ix(a)){var s=lx(a,o);s&&(r[i]=s,n&&void 0===n[i]&&(n[i]=a))}}return{target:r,transitionEnd:n}}(e,t,r);return kx(e,t=o.target,n,r=o.transitionEnd)},Sx={current:null},Cx={current:!1};var _x=Object.keys(dg),Ex=_x.length,Px=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Lx=function(){function e(t){var n=this,r=t.parent,o=t.props,i=t.reducedMotionConfig,a=t.visualState,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};an(this,e),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=function(){return n.notify("Update",n.latestValues)},this.render=function(){n.current&&(n.triggerBuild(),n.renderInstance(n.current,n.renderState,n.props.style,n.projection))},this.scheduleRender=function(){return Pw.render(n.render,!1,!0)};var l=a.latestValues,u=a.renderState;this.latestValues=l,this.baseTarget=un({},l),this.initialValues=o.initial?un({},l):{},this.renderState=u,this.parent=r,this.props=o,this.depth=r?r.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=ag(o),this.isVariantNode=sg(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(r&&r.current);var c=this.scrapeMotionValuesFromProps(o),d=c.willChange,f=sn(c,h);for(var p in f){var v=f[p];void 0!==l[p]&&Pg(v)&&(v.set(l[p],!1),ik(d)&&d.add(p))}}return on(e,[{key:"scrapeMotionValuesFromProps",value:function(e){return{}}},{key:"mount",value:function(e){var t,n=this;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach((function(e,t){return n.bindToMotionValue(t,e)})),Cx.current||function(){if(Cx.current=!0,Qv)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Sx.current=e.matches};e.addListener(t),t()}else Sx.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Sx.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}},{key:"unmount",value:function(){var e,t,n;for(var r in null===(e=this.projection)||void 0===e||e.unmount(),Lw.update(this.notifyUpdate),Lw.render(this.render),this.valueSubscriptions.forEach((function(e){return e()})),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this),this.events)this.events[r].clear();this.current=null}},{key:"bindToMotionValue",value:function(e,t){var n=this,r=_g.has(e),o=t.onChange((function(t){n.latestValues[e]=t,n.props.onUpdate&&Pw.update(n.notifyUpdate,!1,!0),r&&n.projection&&(n.projection.isProjectionDirty=!0)})),i=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,(function(){o(),i()}))}},{key:"sortNodePosition",value:function(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}},{key:"loadFeatures",value:function(e,t,n,r,o,i){for(var a=this,s=[],l=0;l<Ex;l++){var u=_x[l],c=dg[u],d=c.isEnabled,f=c.Component;d(e)&&f&&s.push(cr.createElement(f,un(un({key:u},e),{},{visualElement:this})))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);var h=e.layoutId,p=e.layout,v=e.drag,g=e.dragConstraints,m=e.layoutScroll;this.projection.setOptions({layoutId:h,layout:p,alwaysMeasureLayout:Boolean(v)||g&&ng(g),visualElement:this,scheduleRender:function(){return a.scheduleRender()},animationType:"string"==typeof p?p:"both",initialPromotionConfig:i,layoutScroll:m})}return s}},{key:"triggerBuild",value:function(){this.build(this.renderState,this.latestValues,this.options,this.props)}},{key:"measureViewportBox",value:function(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"getStaticValue",value:function(e){return this.latestValues[e]}},{key:"setStaticValue",value:function(e,t){this.latestValues[e]=t}},{key:"makeTargetAnimatable",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(e,this.props,t)}},{key:"setProps",value:function(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(var t=0;t<Px.length;t++){var n=Px[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);var r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){var r=t.willChange;for(var o in t){var i=t[o],a=n[o];if(Pg(i))e.addValue(o,i),ik(r)&&r.add(o);else if(Pg(a))e.addValue(o,Xw(i)),ik(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(i)}else{var l=e.getStaticValue(o);e.addValue(o,Xw(void 0!==l?l:i))}}for(var u in n)void 0===t[u]&&e.removeValue(u);return t}(this,this.scrapeMotionValuesFromProps(e),this.prevMotionValues)}},{key:"getProps",value:function(){return this.props}},{key:"getVariant",value:function(e){var t;return null===(t=this.props.variants)||void 0===t?void 0:t[e]}},{key:"getDefaultTransition",value:function(){return this.props.transition}},{key:"getTransformPagePoint",value:function(){return this.props.transformPagePoint}},{key:"getClosestVariantNode",value:function(){var e;return this.isVariantNode?this:null===(e=this.parent)||void 0===e?void 0:e.getClosestVariantNode()}},{key:"getVariantContext",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){var r=(null===(t=this.parent)||void 0===t?void 0:t.getVariantContext())||{};return void 0!==this.props.initial&&(r.initial=this.props.initial),r}for(var o={},i=0;i<Ax;i++){var a=Ox[i],s=this.props[a];(rg(s)||!1===s)&&(o[a]=s)}return o}},{key:"addVariantChild",value:function(e){var t,n=this.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}}},{key:"addValue",value:function(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}},{key:"removeValue",value:function(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}},{key:"hasValue",value:function(e){return this.values.has(e)}},{key:"getValue",value:function(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Xw(t),this.addValue(e,n)),n}},{key:"readValue",value:function(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}},{key:"setBaseTarget",value:function(e,t){this.baseTarget[e]=t}},{key:"getBaseTarget",value:function(e){var t,n=this.props.initial,r="string"==typeof n||"object"===kn(n)?null===(t=jm(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;var o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Pg(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}},{key:"on",value:function(e,t){return this.events[e]||(this.events[e]=new Yw),this.events[e].add(t)}},{key:"notify",value:function(e){for(var t,n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];null===(n=this.events[e])||void 0===n||(t=n).notify.apply(t,o)}}]),e}(),Ox=["initial"].concat(dk),Ax=Ox.length,Mx=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"sortInstanceNodePosition",value:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1}},{key:"getBaseTargetFromProps",value:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}},{key:"removeValueFromRenderState",value:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]}},{key:"makeTargetAnimatableFromInstance",value:function(e,t,n){var r=e.transition,o=e.transitionEnd,i=sn(e,p),a=t.transformValues,s=function(e,t,n){var r,o={};for(var i in e){var a=ok(i,t);o[i]=void 0!==a?a:null===(r=n.getValue(i))||void 0===r?void 0:r.get()}return o}(i,r||{},this);if(a&&(o&&(o=a(o)),i&&(i=a(i)),s&&(s=a(s))),n){!function(e,t,n){var r,o,i=Object.keys(t).filter((function(t){return!e.hasValue(t)})),a=i.length;if(a)for(var s=0;s<a;s++){var l=i[s],u=t[l],c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(o=null!==(r=n[l])&&void 0!==r?r:e.readValue(l))&&void 0!==o?o:t[l]),null!=c&&("string"==typeof c&&(Ww(c)||Uw(c))?c=parseFloat(c):!ek(c)&&lm.test(u)&&(c=gw(l,u)),e.addValue(l,Xw(c)),void 0===n[l]&&(n[l]=c),null!==c&&e.setBaseTarget(l,c))}}(this,i,s);var l=xx(this,i,s,o);o=l.transitionEnd,i=l.target}return un({transition:r,transitionEnd:o},i)}}]),n}(Lx);var Tx=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"readValueFromInstance",value:function(e,t){if(_g.has(t)){var n=vw(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r)),i=(Ag(t)?o.getPropertyValue(t):o[t])||0;return"string"==typeof i?i.trim():i}},{key:"measureInstanceViewportBox",value:function(e,t){return Jk(e,t.transformPagePoint)}},{key:"build",value:function(e,t,n,r){vm(e,t,n,r.transformTemplate)}},{key:"scrapeMotionValuesFromProps",value:function(e){return Dm(e)}},{key:"renderInstance",value:function(e,t,n,r){Im(e,t,n,r)}}]),n}(Mx),Ix=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"getBaseTargetFromProps",value:function(e,t){return e[t]}},{key:"readValueFromInstance",value:function(e,t){var n;return _g.has(t)?(null===(n=vw(t))||void 0===n?void 0:n.default)||0:(t=Rm.has(t)?t:Tm(t),e.getAttribute(t))}},{key:"measureInstanceViewportBox",value:function(){return{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"scrapeMotionValuesFromProps",value:function(e){return zm(e)}},{key:"build",value:function(e,t,n,r){Lm(e,t,n,r.transformTemplate)}},{key:"renderInstance",value:function(e,t,n,r){Nm(e,t,0,r)}}]),n}(Mx),Rx=function(e,t){return xg(e)?new Ix(t,{enableHardwareAcceleration:!1}):new Tx(t,{enableHardwareAcceleration:!0})};function Nx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Dx={correct:function(e,t){if(!t.target)return e;if("string"==typeof e){if(!Ug.test(e))return e;e=parseFloat(e)}var n=Nx(e,t.target.x),r=Nx(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},zx="_$css",jx={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(ax,(function(e){return a.push(e),zx})));var s=lm.parse(e);if(s.length>5)return o;var l=lm.createTransformer(e),u="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+u]/=c,s[1+u]/=d;var f=Py(c,d,.5);"number"==typeof s[2+u]&&(s[2+u]/=f),"number"==typeof s[3+u]&&(s[3+u]/=f);var h=l(s);if(i){var p=0;h=h.replace(zx,(function(){var e=a[p];return p++,e}))}return h}},Bx=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"componentDidMount",value:function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,s=r.projection;e=Fx,Object.assign(Sg,e),s&&(o.group&&o.group.add(s),i&&i.register&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(un(un({},s.options),{},{onExitComplete:function(){return t.safeToRemove()}}))),hg.hasEverUpdated=!0}},{key:"getSnapshotBeforeUpdate",value:function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||Pw.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null}},{key:"componentDidUpdate",value:function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(o),(null==r?void 0:r.deregister)&&r.deregister(o))}},{key:"safeToRemove",value:function(){var e=this.props.safeToRemove;null==e||e()}},{key:"render",value:function(){return null}}]),n}(qr.Component);var Fx={borderRadius:un(un({},Dx),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Dx,borderTopRightRadius:Dx,borderBottomLeftRadius:Dx,borderBottomRightRadius:Dx,boxShadow:jx},Hx={measureLayout:function(e){var t=yn(nw(),2),n=t[0],r=t[1],o=cr.useContext(vg);return qr.createElement(Bx,un(un({},e),{},{layoutGroup:o,switchLayoutGroup:cr.useContext(mg),isPresent:n,safeToRemove:r}))}};function Vx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Pg(e)?e:Xw(e);return Vw("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Wx=["TopLeft","TopRight","BottomLeft","BottomRight"],Ux=Wx.length,Gx=function(e){return"string"==typeof e?parseFloat(e):e},qx=function(e){return"number"==typeof e||Ug.test(e)};function Yx(e,t,n,r,o,i){var a,s,l,u;o?(e.opacity=Py(0,null!==(a=n.opacity)&&void 0!==a?a:1,Xx(r)),e.opacityExit=Py(null!==(s=t.opacity)&&void 0!==s?s:1,0,$x(r))):i&&(e.opacity=Py(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,r));for(var c=0;c<Ux;c++){var d="border".concat(Wx[c],"Radius"),f=Zx(t,d),h=Zx(n,d);if(void 0!==f||void 0!==h)f||(f=0),h||(h=0),0===f||0===h||qx(f)===qx(h)?(e[d]=Math.max(Py(Gx(f),Gx(h),r),0),(Wg.test(h)||Wg.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=Py(t.rotate||0,n.rotate||0,r))}function Zx(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var Xx=Kx(0,.5,nb),$x=Kx(.5,.95,Ky);function Kx(e,t,n){return function(r){return r<e?0:r>t?1:n(Ey(e,t,r))}}function Qx(e,t){e.min=t.min,e.max=t.max}function Jx(e,t){Qx(e.x,t.x),Qx(e.y,t.y)}function eS(e,t,n,r,o){return e=Uk(e-=t,1/n,r),void 0!==o&&(e=Uk(e,1/o,r)),e}function tS(e,t,n,r,o){var i=yn(n,3),a=i[0],s=i[1],l=i[2];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;if(Wg.test(t)){t=parseFloat(t),t=Py(a.min,a.max,t/100)-a.min}if("number"==typeof t){var s=Py(i.min,i.max,r);e===i&&(s-=t),e.min=eS(e.min,t,n,s,o),e.max=eS(e.max,t,n,s,o)}}(e,t[a],t[s],t[l],t.scale,r,o)}var nS=["x","scaleX","originX"],rS=["y","scaleY","originY"];function oS(e,t,n,r){tS(e.x,t,nS,null==n?void 0:n.x,null==r?void 0:r.x),tS(e.y,t,rS,null==n?void 0:n.y,null==r?void 0:r.y)}function iS(e){return 0===e.translate&&1===e.scale}function aS(e){return iS(e.x)&&iS(e.y)}function sS(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function lS(e){return _k(e.x)/_k(e.y)}var uS=function(){function e(){an(this,e),this.members=[]}return on(e,[{key:"add",value:function(e){Gw(this.members,e),e.scheduleRender()}},{key:"remove",value:function(e){if(qw(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}}},{key:"relegate",value:function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)}},{key:"promote",value:function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))}},{key:"exitAnimationComplete",value:function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))}},{key:"scheduleRender",value:function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))}},{key:"removeLeadSnapshot",value:function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}]),e}();function cS(e,t,n){var r="",o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r="translate3d(".concat(o,"px, ").concat(i,"px, 0) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(r+="rotate(".concat(a,"deg) ")),s&&(r+="rotateX(".concat(s,"deg) ")),l&&(r+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return 1===u&&1===c||(r+="scale(".concat(u,", ").concat(c,")")),r||"none"}var dS=function(e,t){return e.depth-t.depth},fS=function(){function e(){an(this,e),this.children=[],this.isDirty=!1}return on(e,[{key:"add",value:function(e){Gw(this.children,e),this.isDirty=!0}},{key:"remove",value:function(e){qw(this.children,e),this.isDirty=!0}},{key:"forEach",value:function(e){this.isDirty&&this.children.sort(dS),this.isDirty=!1,this.children.forEach(e)}}]),e}(),hS=["","X","Y","Z"],pS=0;function vS(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(t){var r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null==n?void 0:n();an(this,e),this.id=pS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){r.isUpdating&&(r.isUpdating=!1,r.clearAllSnapshots())},this.updateProjection=function(){r.nodes.forEach(xS),r.nodes.forEach(SS)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=o,this.root=i?i.root||i:this,this.path=i?[].concat(cn(i.path),[i]):[],this.parent=i,this.depth=i?i.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new fS)}return on(e,[{key:"addEventListener",value:function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Yw),this.eventHandlers.get(e).add(t)}},{key:"notifyListeners",value:function(e){for(var t=this.eventHandlers.get(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null==t||t.notify.apply(t,r)}},{key:"hasListeners",value:function(e){return this.eventHandlers.has(e)}},{key:"registerPotentialNode",value:function(e,t){this.potentialNodes.set(e,t)}},{key:"mount",value:function(e){var n,r=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var i=this.options,a=i.layoutId,s=i.layout,l=i.visualElement;if(l&&!l.current&&l.mount(e),this.root.nodes.add(this),null===(n=this.parent)||void 0===n||n.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),o&&(s||a)&&(this.isLayoutDirty=!0),t){var u,c=function(){return r.root.updateBlockedByResize=!1};t(e,(function(){r.root.updateBlockedByResize=!0,u&&u(),u=Rw(c,250),hg.hasAnimatedSinceResize&&(hg.hasAnimatedSinceResize=!1,r.nodes.forEach(kS))}))}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&l&&(a||s)&&this.addEventListener("didUpdate",(function(e){var t,n,o,i,a,s=e.delta,u=e.hasLayoutChanged,c=e.hasRelativeTargetChanged,d=e.layout;if(r.isTreeAnimationBlocked())return r.target=void 0,void(r.relativeTarget=void 0);var f=null!==(n=null!==(t=r.options.transition)&&void 0!==t?t:l.getDefaultTransition())&&void 0!==n?n:AS,h=l.getProps(),p=h.onLayoutAnimationStart,v=h.onLayoutAnimationComplete,g=!r.targetLayout||!sS(r.targetLayout,d)||c,m=!u&&c;if((null===(o=r.resumeFrom)||void 0===o?void 0:o.instance)||m||u&&(g||!r.currentAnimation)){r.resumeFrom&&(r.resumingFrom=r.resumeFrom,r.resumingFrom.resumingFrom=void 0),r.setAnimationOrigin(s,m);var y=un(un({},Hw(f,"layout")),{},{onPlay:p,onComplete:v});l.shouldReduceMotion&&(y.delay=0,y.type=!1),r.startAnimation(y)}else u||0!==r.animationProgress||kS(r),r.isLead()&&(null===(a=(i=r.options).onExitComplete)||void 0===a||a.call(i));r.targetLayout=d}))}}},{key:"unmount",value:function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,Lw.preRender(this.updateProjection)}},{key:"blockUpdate",value:function(){this.updateManuallyBlocked=!0}},{key:"unblockUpdate",value:function(){this.updateManuallyBlocked=!1}},{key:"isUpdateBlocked",value:function(){return this.updateManuallyBlocked||this.updateBlockedByResize}},{key:"isTreeAnimationBlocked",value:function(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}},{key:"startUpdate",value:function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(CS),this.animationId++)}},{key:"willUpdate",value:function(){var e,t,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.isUpdateBlocked())null===(t=(e=this.options).onExitComplete)||void 0===t||t.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var o=0;o<this.path.length;o++){var i=this.path[o];i.shouldResetTransform=!0,i.updateScroll("snapshot")}var a=this.options,s=a.layoutId,l=a.layout;if(void 0!==s||l){var u=null===(n=this.options.visualElement)||void 0===n?void 0:n.getProps().transformTemplate;this.prevTransformTemplateValue=null==u?void 0:u(this.latestValues,""),this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}}}},{key:"didUpdate",value:function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bS);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(MS),this.potentialNodes.clear()),this.nodes.forEach(wS),this.nodes.forEach(gS),this.nodes.forEach(mS),this.clearAllSnapshots(),Ow.update(),Ow.preRender(),Ow.render())}},{key:"clearAllSnapshots",value:function(){this.nodes.forEach(yS),this.sharedNodes.forEach(_S)}},{key:"scheduleUpdateProjection",value:function(){Pw.preRender(this.updateProjection,!1,!0)}},{key:"scheduleCheckAfterUnmount",value:function(){var e=this;Pw.postRender((function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()}))}},{key:"updateSnapshot",value:function(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}},{key:"updateLayout",value:function(){var e;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var t=0;t<this.path.length;t++){this.path[t].updateScroll()}var n=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(e=this.options.visualElement)||void 0===e||e.notify("LayoutMeasure",this.layout.layoutBox,null==n?void 0:n.layoutBox)}}},{key:"updateScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:o(this.instance),offset:r(this.instance)})}},{key:"resetTransform",value:function(){var e;if(i){var t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!aS(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,o=null==r?void 0:r(this.latestValues,""),a=o!==this.prevTransformTemplateValue;t&&(n||Hk(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}}},{key:"measure",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.measurePageBox(),r=this.removeElementScroll(n);t&&(r=this.removeTransform(r)),IS(r);var o=null===(e=this.options.visualElement)||void 0===e?void 0:e.readValue("position"),i="fixed"===o||"sticky"===o?o:"static";return{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id,position:i}}},{key:"measurePageBox",value:function(){var e=this.options.visualElement;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};var t=e.measureViewportBox(),n=this.root.scroll;return n&&(Zk(t.x,n.offset.x),Zk(t.y,n.offset.y)),t}},{key:"removeElementScroll",value:function(e){var t={x:{min:0,max:0},y:{min:0,max:0}};Jx(t,e);for(var n=0;n<this.path.length;n++){var r=this.path[n],o=r.scroll,i=r.options;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){Jx(t,e);var a=this.root.scroll;a&&(Zk(t.x,-a.offset.x),Zk(t.y,-a.offset.y))}Zk(t.x,o.offset.x),Zk(t.y,o.offset.y)}}return t}},{key:"applyTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={x:{min:0,max:0},y:{min:0,max:0}};Jx(n,e);for(var r=0;r<this.path.length;r++){var o=this.path[r];!t&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qk(n,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),Hk(o.latestValues)&&Qk(n,o.latestValues)}return Hk(this.latestValues)&&Qk(n,this.latestValues),n}},{key:"removeTransform",value:function(e){var t,n={x:{min:0,max:0},y:{min:0,max:0}};Jx(n,e);for(var r=0;r<this.path.length;r++){var o=this.path[r];if(o.instance&&Hk(o.latestValues)){Fk(o.latestValues)&&o.updateSnapshot();var i={x:{min:0,max:0},y:{min:0,max:0}};Jx(i,o.measurePageBox()),oS(n,o.latestValues,null===(t=o.snapshot)||void 0===t?void 0:t.layoutBox,i)}}return Hk(this.latestValues)&&oS(n,this.latestValues),n}},{key:"setTargetDelta",value:function(e){this.targetDelta=e,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}},{key:"setOptions",value:function(e){this.options=un(un(un({},this.options),e),{},{crossfade:void 0===e.crossfade||e.crossfade})}},{key:"clearMeasurements",value:function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}},{key:"resolveTargetDelta",value:function(){var e;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),this.isProjectionDirty){var t=this.options,n=t.layout,r=t.layoutId;if(this.layout&&(n||r)){if(!this.targetDelta&&!this.relativeTarget){var o=this.getClosestProjectingParent();o&&o.layout?(this.relativeParent=o,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Mk(this.relativeTargetOrigin,this.layout.layoutBox,o.layout.layoutBox),Jx(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target)?function(e,t,n){Ok(e.x,t.x,n.x),Ok(e.y,t.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Jx(this.target,this.layout.layoutBox),Yk(this.target,this.targetDelta)):Jx(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;var i=this.getClosestProjectingParent();i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target?(this.relativeParent=i,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Mk(this.relativeTargetOrigin,this.target,i.target),Jx(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}}},{key:"getClosestProjectingParent",value:function(){if(this.parent&&!Fk(this.parent.latestValues)&&!Vk(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}},{key:"calcProjection",value:function(){var e;if(this.isProjectionDirty){this.isProjectionDirty=!1;var t=this.options,n=t.layout,r=t.layoutId;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(n||r)){var o=this.getLead();Jx(this.layoutCorrected,this.layout.layoutBox),function(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=n.length;if(a){var s,l;t.x=t.y=1;for(var u=0;u<a;u++)l=(s=n[u]).projectionDelta,"contents"!==(null===(o=null===(r=s.instance)||void 0===r?void 0:r.style)||void 0===o?void 0:o.display)&&(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Qk(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Yk(e,l)),i&&Hk(s.latestValues)&&Qk(e,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==o);var i=o.target;if(i){this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});var a=this.treeScale.x,s=this.treeScale.y,l=this.projectionTransform;Lk(this.projectionDelta,this.layoutCorrected,i,this.latestValues),this.projectionTransform=cS(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",i))}}}}},{key:"hide",value:function(){this.isVisible=!1}},{key:"show",value:function(){this.isVisible=!0}},{key:"scheduleRender",value:function(){var e,t,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null===(t=(e=this.options).scheduleRender)||void 0===t||t.call(e),r&&(null===(n=this.getStack())||void 0===n||n.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}},{key:"setAnimationOrigin",value:function(e){var t,n,r=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.snapshot,a=(null==i?void 0:i.latestValues)||{},s=un({},this.latestValues),l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!o;var u={x:{min:0,max:0},y:{min:0,max:0}},c=(null==i?void 0:i.source)!==(null===(t=this.layout)||void 0===t?void 0:t.source),d=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,f=Boolean(c&&!d&&!0===this.options.crossfade&&!this.path.some(OS));this.animationProgress=0,this.mixTargetDelta=function(t){var n,o=t/1e3;ES(l.x,e.x,o),ES(l.y,e.y,o),r.setTargetDelta(l),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&(Mk(u,r.layout.layoutBox,r.relativeParent.layout.layoutBox),LS(r.relativeTarget,r.relativeTargetOrigin,u,o)),c&&(r.animationValues=s,Yx(s,a,r.latestValues,o,f,d)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=o},this.mixTargetDelta(0)}},{key:"startAnimation",value:function(e){var t,n,r=this;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(Lw.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pw.update((function(){hg.hasAnimatedSinceResize=!0,r.currentAnimation=Vx(0,1e3,un(un({},e),{},{onUpdate:function(t){var n;r.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))}},{key:"completeAnimation",value:function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}},{key:"finishAnimation",value:function(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}},{key:"applyTransformsToTarget",value:function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,o=e.latestValues;if(t&&n&&r){if(this!==e&&this.layout&&r&&RS(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};var i=_k(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+i;var a=_k(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+a}Jx(t,n),Qk(t,o),Lk(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}},{key:"registerSharedNode",value:function(e,t){var n,r,o;this.sharedNodes.has(e)||this.sharedNodes.set(e,new uS),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,t)})}},{key:"isLead",value:function(){var e=this.getStack();return!e||e.lead===this}},{key:"getLead",value:function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}},{key:"getPrevLead",value:function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}},{key:"getStack",value:function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)}},{key:"promote",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.needsReset,n=e.transition,r=e.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,r),t&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})}},{key:"relegate",value:function(){var e=this.getStack();return!!e&&e.relegate(this)}},{key:"resetRotation",value:function(){var e=this.options.visualElement;if(e){var t=!1,n=e.latestValues;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),t){for(var r={},o=0;o<hS.length;o++){var i="rotate"+hS[o];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}for(var a in null==e||e.render(),r)e.setStaticValue(a,r[a]);e.scheduleRender()}}}},{key:"getProjectionStyles",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o={};if(!this.instance||this.isSVG)return o;if(!this.isVisible)return{visibility:"hidden"};o.visibility="";var i=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,o.opacity="",o.pointerEvents=Hm(r.pointerEvents)||"",o.transform=i?i(this.latestValues,""):"none",o;var a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){var s={};return this.options.layoutId&&(s.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,s.pointerEvents=Hm(r.pointerEvents)||""),this.hasProjected&&!Hk(this.latestValues)&&(s.transform=i?i({},""):"none",this.hasProjected=!1),s}var l=a.animationValues||a.latestValues;this.applyTransformsToTarget(),o.transform=cS(this.projectionDeltaWithTransform,this.treeScale,l),i&&(o.transform=i(l,o.transform));var u=this.projectionDelta,c=u.x,d=u.y;for(var f in o.transformOrigin="".concat(100*c.origin,"% ").concat(100*d.origin,"% 0"),a.animationValues?o.opacity=a===this?null!==(n=null!==(t=l.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=a===this?void 0!==l.opacity?l.opacity:"":void 0!==l.opacityExit?l.opacityExit:0,Sg)if(void 0!==l[f]){var h=Sg[f],p=h.correct,v=h.applyTo,g=p(l[f],a);if(v)for(var m=v.length,y=0;y<m;y++)o[v[y]]=g;else o[f]=g}return this.options.layoutId&&(o.pointerEvents=a===this?Hm(r.pointerEvents)||"":"none"),o}},{key:"clearSnapshot",value:function(){this.resumeFrom=this.snapshot=void 0}},{key:"resetTree",value:function(){this.root.nodes.forEach((function(e){var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(bS),this.root.sharedNodes.clear()}}]),e}()}function gS(e){e.updateLayout()}function mS(e){var t,n,r,o=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var i=e.layout,a=i.layoutBox,s=i.measuredBox,l=e.options.animationType,u=o.source!==e.layout.source;"size"===l?zk((function(e){var t=u?o.measuredBox[e]:o.layoutBox[e],n=_k(t);t.min=a[e].min,t.max=t.min+n})):RS(l,o.layoutBox,a)&&zk((function(e){var t=u?o.measuredBox[e]:o.layoutBox[e],n=_k(a[e]);t.max=t.min+n}));var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Lk(c,a,o.layoutBox);var d={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};u?Lk(d,e.applyTransform(s,!0),o.measuredBox):Lk(d,a,o.layoutBox);var f=!aS(c),h=!1;if(!e.resumeFrom){var p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){var v=p.snapshot,g=p.layout;if(v&&g){var m={x:{min:0,max:0},y:{min:0,max:0}};Mk(m,o.layoutBox,v.layoutBox);var y={x:{min:0,max:0},y:{min:0,max:0}};Mk(y,a,g.layoutBox),sS(m,y)||(h=!0)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:o,delta:d,layoutDelta:c,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function yS(e){e.clearSnapshot()}function bS(e){e.clearMeasurements()}function wS(e){var t=e.options.visualElement;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function xS(e){e.resolveTargetDelta()}function SS(e){e.calcProjection()}function CS(e){e.resetRotation()}function _S(e){e.removeLeadSnapshot()}function ES(e,t,n){e.translate=Py(t.translate,0,n),e.scale=Py(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function PS(e,t,n,r){e.min=Py(t.min,n.min,r),e.max=Py(t.max,n.max,r)}function LS(e,t,n,r){PS(e.x,t.x,n.x,r),PS(e.y,t.y,n.y,r)}function OS(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var AS={duration:.45,ease:[.4,0,.1,1]};function MS(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function TS(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function IS(e){TS(e.x),TS(e.y)}function RS(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;return Nb(e,t)<=n}(lS(t),lS(n),.2)}var NS=vS({attachResizeListener:function(e,t){return Ym(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),DS={current:void 0},zS=vS({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!DS.current){var e=new NS(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),DS.current=e}return DS.current},resetTransform:function(e,t){e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),jS=un(un(un(un({},mk),tw),ox),Hx),BS=wg((function(e,t){return function(e,t,n,r,o){var i=t.forwardMotionProps,a=void 0!==i&&i;return un(un({},xg(e)?Gm:qm),{},{preloadedFeatures:n,useRender:Mm(a),createVisualElement:r,projectionNodeConstructor:o,Component:e})}(e,t,jS,Rx,zS)}));function FS(){var e=cr.useRef(!1);return Jv((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var HS=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){var n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft}return null}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){return this.props.children}}]),n}(cr.Component);function VS(e){var t=e.children,n=e.isPresent,r=cr.useId(),o=cr.useRef(null),i=cr.useRef({width:0,height:0,top:0,left:0});return cr.useInsertionEffect((function(){var e=i.current,t=e.width,a=e.height,s=e.top,l=e.left;if(!n&&o.current&&t&&a){o.current.dataset.motionPopId=r;var u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule('\n [data-motion-pop-id="'.concat(r,'"] {\n position: absolute !important;\n width: ').concat(t,"px !important;\n height: ").concat(a,"px !important;\n top: ").concat(s,"px !important;\n left: ").concat(l,"px !important;\n }\n ")),function(){document.head.removeChild(u)}}}),[n]),cr.createElement(HS,{isPresent:n,childRef:o,sizeRef:i},cr.cloneElement(t,{ref:o}))}var WS=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=e.mode,l=fg(US),u=cr.useId(),c=cr.useMemo((function(){return{id:u,initial:n,isPresent:r,custom:i,onExitComplete:function(e){l.set(e,!0);var t,n=xn(l.values());try{for(n.s();!(t=n.n()).done;){if(!t.value)return}}catch(r){n.e(r)}finally{n.f()}o&&o()},register:function(e){return l.set(e,!1),function(){return l.delete(e)}}}}),a?void 0:[r]);return cr.useMemo((function(){l.forEach((function(e,t){return l.set(t,!1)}))}),[r]),cr.useEffect((function(){!r&&!l.size&&o&&o()}),[r]),"popLayout"===s&&(t=cr.createElement(VS,{isPresent:r},t)),cr.createElement(Kv.Provider,{value:c},t)};function US(){return new Map}var GS=function(e){return e.key||""};var qS=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=void 0===s||s,u=e.mode,c=void 0===u?"sync":u;a&&(c="wait",Gb(!1,"Replace exitBeforeEnter with mode='wait'"));var d=function(){var e=FS(),t=yn(cr.useState(0),2),n=t[0],r=t[1],o=cr.useCallback((function(){e.current&&r(n+1)}),[n]);return[cr.useCallback((function(){return Pw.postRender(o)}),[o]),n]}(),f=yn(d,1)[0],h=cr.useContext(vg).forceRender;h&&(f=h);var p=FS(),v=function(e){var t=[];return cr.Children.forEach(e,(function(e){cr.isValidElement(e)&&t.push(e)})),t}(t),g=v,m=new Set,y=cr.useRef(g),b=cr.useRef(new Map).current,w=cr.useRef(!0);if(Jv((function(){w.current=!1,function(e,t){e.forEach((function(e){var n=GS(e);t.set(n,e)}))}(v,b),y.current=g})),vy((function(){w.current=!0,b.clear(),m.clear()})),w.current)return cr.createElement(cr.Fragment,null,g.map((function(e){return cr.createElement(WS,{key:GS(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:l,mode:c},e)})));g=cn(g);for(var k=y.current.map(GS),x=v.map(GS),S=k.length,C=0;C<S;C++){var _=k[C];-1===x.indexOf(_)&&m.add(_)}return"wait"===c&&m.size&&(g=[]),m.forEach((function(e){if(-1===x.indexOf(e)){var t=b.get(e);if(t){var r=k.indexOf(e);g.splice(r,0,cr.createElement(WS,{key:GS(t),isPresent:!1,onExitComplete:function(){b.delete(e),m.delete(e);var t=y.current.findIndex((function(t){return t.key===e}));if(y.current.splice(t,1),!m.size){if(y.current=v,!1===p.current)return;f(),i&&i()}},custom:n,presenceAffectsLayout:l,mode:c},t))}}})),g=g.map((function(e){var t=e.key;return m.has(t)?e:cr.createElement(WS,{key:GS(e),isPresent:!0,presenceAffectsLayout:l,mode:c},e)})),"production"!==Wb&&"wait"===c&&g.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),cr.createElement(cr.Fragment,null,m.size?g:g.map((function(e){return cr.cloneElement(e)})))},YS=function(){return YS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},YS.apply(this,arguments)};function ZS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function XS(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Dhe){i(Dhe)}}function s(e){try{l(r.throw(e))}catch(Dhe){i(Dhe)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function $S(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(Dhe){s=[6,Dhe],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function KS(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function QS(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var JS=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};var eC={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},tC={position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},nC={position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},rC={position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},oC={position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}};function iC(e){var t;switch(null!==(t=null==e?void 0:e.direction)&&void 0!==t?t:"right"){case"right":default:return nC;case"left":return tC;case"bottom":return oC;case"top":return rC}}var aC={enter:{duration:.2,ease:eC.easeOut},exit:{duration:.1,ease:eC.easeIn}},sC=function(e,t){return un(un({},e),{},{delay:"number"==typeof t?t:null==t?void 0:t.enter})},lC=function(e,t){return un(un({},e),{},{delay:"number"==typeof t?t:null==t?void 0:t.exit})},uC=function(e){return null!=e&&parseInt(e.toString(),10)>0},cC={exit:{height:{duration:.2,ease:eC.ease},opacity:{duration:.3,ease:eC.ease}},enter:{height:{duration:.3,ease:eC.ease},opacity:{duration:.4,ease:eC.ease}}},dC={exit:function(e){var t,n=e.animateOpacity,r=e.startingHeight,o=e.transition,i=e.transitionEnd,a=e.delay;return un(un({},n&&{opacity:uC(r)?1:0}),{},{height:r,transitionEnd:null==i?void 0:i.exit,transition:null!==(t=null==o?void 0:o.exit)&&void 0!==t?t:lC(cC.exit,a)})},enter:function(e){var t,n=e.animateOpacity,r=e.endingHeight,o=e.transition,i=e.transitionEnd,a=e.delay;return un(un({},n&&{opacity:1}),{},{height:r,transitionEnd:null==i?void 0:i.enter,transition:null!==(t=null==o?void 0:o.enter)&&void 0!==t?t:sC(cC.enter,a)})}},fC=cr.forwardRef((function(e,t){var n=e.in,r=e.unmountOnExit,o=e.animateOpacity,i=void 0===o||o,a=e.startingHeight,s=void 0===a?0:a,l=e.endingHeight,u=void 0===l?"auto":l,c=e.style,d=e.className,f=e.transition,h=e.transitionEnd,p=sn(e,v),g=yn(cr.useState(!1),2),m=g[0],y=g[1];cr.useEffect((function(){var e=setTimeout((function(){y(!0)}));return function(){return clearTimeout(e)}}),[]),function(e){e.condition,e.message}({condition:Boolean(s>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});var b=parseFloat(s.toString())>0,w={startingHeight:s,endingHeight:u,animateOpacity:i,transition:m?f:{enter:{duration:0}},transitionEnd:{enter:null==h?void 0:h.enter,exit:r?null==h?void 0:h.exit:un(un({},null==h?void 0:h.exit),{},{display:b?"block":"none"})}},k=!r||n,x=n||r?"enter":"exit";return qr.createElement(qS,{initial:!1,custom:w},k&&qr.createElement(BS.div,un(un({ref:t},p),{},{className:JS("chakra-collapse",d),style:un({overflow:"hidden",display:"block"},c),custom:w,variants:dC,initial:!!r&&"exit",animate:x,exit:"exit"})))}));fC.displayName="Collapse";var hC={enter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.transition,r=t.transitionEnd,o=t.delay;return{opacity:1,transition:null!==(e=null==n?void 0:n.enter)&&void 0!==e?e:sC(aC.enter,o),transitionEnd:null==r?void 0:r.enter}},exit:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.transition,r=t.transitionEnd,o=t.delay;return{opacity:0,transition:null!==(e=null==n?void 0:n.exit)&&void 0!==e?e:lC(aC.exit,o),transitionEnd:null==r?void 0:r.exit}}},pC={initial:"exit",animate:"enter",exit:"exit",variants:hC},vC=cr.forwardRef((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.className,i=e.transition,a=e.transitionEnd,s=e.delay,l=sn(e,g),u=r||n?"enter":"exit",c=!n||r&&n,d={transition:i,transitionEnd:a,delay:s};return qr.createElement(qS,{custom:d},c&&qr.createElement(BS.div,un(un({ref:t,className:JS("chakra-fade",o),custom:d},pC),{},{animate:u},l)))}));vC.displayName="Fade";var gC={exit:function(e){var t,n=e.reverse,r=e.initialScale,o=e.transition,i=e.transitionEnd,a=e.delay;return un(un({opacity:0},n?{scale:r,transitionEnd:null==i?void 0:i.exit}:{transitionEnd:un({scale:r},null==i?void 0:i.exit)}),{},{transition:null!==(t=null==o?void 0:o.exit)&&void 0!==t?t:lC(aC.exit,a)})},enter:function(e){var t,n=e.transitionEnd,r=e.transition,o=e.delay;return{opacity:1,scale:1,transition:null!==(t=null==r?void 0:r.enter)&&void 0!==t?t:sC(aC.enter,o),transitionEnd:null==n?void 0:n.enter}}},mC={initial:"exit",animate:"enter",exit:"exit",variants:gC},yC=cr.forwardRef((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.reverse,i=void 0===o||o,a=e.initialScale,s=void 0===a?.95:a,l=e.className,u=e.transition,c=e.transitionEnd,d=e.delay,f=sn(e,m),h=!n||r&&n,p=r||n?"enter":"exit",v={initialScale:s,reverse:i,transition:u,transitionEnd:c,delay:d};return qr.createElement(qS,{custom:v},h&&qr.createElement(BS.div,un(un({ref:t,className:JS("chakra-offset-slide",l)},mC),{},{animate:p,custom:v},f)))}));yC.displayName="ScaleFade";var bC={exit:{duration:.15,ease:eC.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},wC={exit:function(e){var t,n=e.direction,r=e.transition,o=e.transitionEnd,i=e.delay;return un(un({},iC({direction:n}).exit),{},{transition:null!==(t=null==r?void 0:r.exit)&&void 0!==t?t:lC(bC.exit,i),transitionEnd:null==o?void 0:o.exit})},enter:function(e){var t,n=e.direction,r=e.transitionEnd,o=e.transition,i=e.delay;return un(un({},iC({direction:n}).enter),{},{transition:null!==(t=null==o?void 0:o.enter)&&void 0!==t?t:sC(bC.enter,i),transitionEnd:null==r?void 0:r.enter})}},kC=cr.forwardRef((function(e,t){var n=e.direction,r=void 0===n?"right":n,o=e.style,i=e.unmountOnExit,a=e.in,s=e.className,l=e.transition,u=e.transitionEnd,c=e.delay,d=e.motionProps,f=sn(e,y),h=iC({direction:r}),p=Object.assign({position:"fixed"},h.position,o),v=!i||a&&i,g=a||i?"enter":"exit",m={transitionEnd:u,transition:l,direction:r,delay:c};return qr.createElement(qS,{custom:m},v&&qr.createElement(BS.div,un(un({},f),{},{ref:t,initial:"exit",className:JS("chakra-slide",s),animate:g,exit:"exit",custom:m,variants:wC,style:p},d)))}));kC.displayName="Slide";var xC={initial:function(e){var t,n=e.offsetX,r=e.offsetY,o=e.transition,i=e.transitionEnd,a=e.delay;return{opacity:0,x:n,y:r,transition:null!==(t=null==o?void 0:o.exit)&&void 0!==t?t:lC(aC.exit,a),transitionEnd:null==i?void 0:i.exit}},enter:function(e){var t,n=e.transition,r=e.transitionEnd,o=e.delay;return{opacity:1,x:0,y:0,transition:null!==(t=null==n?void 0:n.enter)&&void 0!==t?t:sC(aC.enter,o),transitionEnd:null==r?void 0:r.enter}},exit:function(e){var t,n=e.offsetY,r=e.offsetX,o=e.transition,i=e.transitionEnd,a=e.reverse,s=e.delay,l={x:r,y:n};return un({opacity:0,transition:null!==(t=null==o?void 0:o.exit)&&void 0!==t?t:lC(aC.exit,s)},a?un(un({},l),{},{transitionEnd:null==i?void 0:i.exit}):{transitionEnd:un(un({},l),null==i?void 0:i.exit)})}},SC={initial:"initial",animate:"enter",exit:"exit",variants:xC},CC=cr.forwardRef((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.reverse,i=void 0===o||o,a=e.className,s=e.offsetX,l=void 0===s?0:s,u=e.offsetY,c=void 0===u?8:u,d=e.transition,f=e.transitionEnd,h=e.delay,p=sn(e,b),v=!n||r&&n,g=r||n?"enter":"exit",m={offsetX:l,offsetY:c,reverse:i,transition:d,transitionEnd:f,delay:h};return qr.createElement(qS,{custom:m},v&&qr.createElement(BS.div,un(un({ref:t,className:JS("chakra-offset-slide",a),custom:m},SC),{},{animate:g},p)))}));CC.displayName="SlideFade";var _C=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};var EC=function(e){e.condition,e.message};function PC(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var LC=yn(Av({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),2),OC=LC[0],AC=LC[1],MC=yn(Av({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),2),TC=MC[0],IC=MC[1],RC=yn(Vv(),4),NC=RC[0],DC=(RC[1],RC[2]),zC=RC[3],jC=Cv((function(e,t){var n=(0,IC().getButtonProps)(e,t),r=un({display:"flex",alignItems:"center",width:"100%",outline:0},AC().button);return qr.createElement(Lv.button,un(un({},n),{},{className:_C("chakra-accordion__button",e.className),__css:r}))}));function BC(e){var t=e.onChange,n=e.defaultIndex,r=e.index,o=e.allowMultiple,i=e.allowToggle,a=sn(e,w);!function(e){var t=e.index||e.defaultIndex,n=null!=t&&!Array.isArray(t)&&e.allowMultiple;EC({condition:!!n,message:"If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ".concat(kn(t),",")})}(e),function(e){EC({condition:!(!e.allowMultiple||!e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}(e);var s=DC(),l=yn(cr.useState(-1),2),u=l[0],c=l[1];cr.useEffect((function(){return function(){c(-1)}}),[]);var d=yn(Zv({value:r,defaultValue:function(){return o?null!=n?n:[]:null!=n?n:-1},onChange:t}),2),f=d[0],h=d[1];return{index:f,setIndex:h,htmlProps:a,getAccordionItemProps:function(e){var t=!1;null!==e&&(t=Array.isArray(f)?f.includes(e):f===e);return{isOpen:t,onChange:function(t){if(null!==e)if(o&&Array.isArray(f)){var n=t?f.concat(e):f.filter((function(t){return t!==e}));h(n)}else t?h(e):i&&h(-1)}}},focusedIndex:u,setFocusedIndex:c,descendants:s}}jC.displayName="AccordionButton";var FC=yn(Av({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"}),2),HC=FC[0],VC=FC[1];function WC(e){var t=e.isDisabled,n=e.isFocusable,r=e.id,o=sn(e,k),i=VC(),a=i.getAccordionItemProps,s=i.setFocusedIndex,l=cr.useRef(null),u=cr.useId(),c=null!=r?r:u,d="accordion-button-".concat(c),f="accordion-panel-".concat(c);!function(e){EC({condition:!(!e.isFocusable||e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}(e);var h=zC({disabled:t&&!n}),p=h.register,v=h.index,g=h.descendants,m=a(-1===v?null:v),y=m.isOpen,b=m.onChange;!function(e){EC({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}({isOpen:y,isDisabled:t});var w=cr.useCallback((function(){null==b||b(!y),s(v)}),[v,s,y,b]),x=cr.useCallback((function(e){var t={ArrowDown:function(){var e=g.nextEnabled(v);null==e||e.node.focus()},ArrowUp:function(){var e=g.prevEnabled(v);null==e||e.node.focus()},Home:function(){var e=g.firstEnabled();null==e||e.node.focus()},End:function(){var e=g.lastEnabled();null==e||e.node.focus()}},n=t[e.key];n&&(e.preventDefault(),n(e))}),[g,v]),S=cr.useCallback((function(){s(v)}),[s,v]),C=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{type:"button",ref:Tv(p,l,n),id:d,disabled:!!t,"aria-expanded":!!y,"aria-controls":f,onClick:PC(e.onClick,w),onFocus:PC(e.onFocus,S),onKeyDown:PC(e.onKeyDown,x)})}),[d,t,y,w,S,x,f,p]),_=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,role:"region",id:f,"aria-labelledby":d,hidden:!y})}),[d,y,f]);return{isOpen:y,isDisabled:t,isFocusable:n,onOpen:function(){null==b||b(!0)},onClose:function(){null==b||b(!1)},getButtonProps:C,getPanelProps:_,htmlProps:o}}function UC(e){var t=IC(),n=t.isOpen,r=t.isDisabled,o=VC().reduceMotion,i=_C("chakra-accordion__icon",e.className),a=un({opacity:r?.4:1,transform:n?"rotate(-180deg)":void 0,transition:o?void 0:"transform 0.2s",transformOrigin:"center"},AC().icon);return qr.createElement(Gv,un({viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a},e),qr.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))}UC.displayName="AccordionIcon";var GC=Cv((function(e,t){var n=e.children,r=e.className,o=WC(e),i=o.htmlProps,a=sn(o,x),s=un(un({},AC().container),{},{overflowAnchor:"none"}),l=cr.useMemo((function(){return a}),[a]);return qr.createElement(TC,{value:l},qr.createElement(Lv.div,un(un({ref:t},i),{},{className:_C("chakra-accordion__item",r),__css:s}),"function"==typeof n?n({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):n))}));GC.displayName="AccordionItem";var qC=Cv((function(e,t){var n=e.className,r=e.motionProps,o=sn(e,S),i=VC().reduceMotion,a=IC(),s=a.getPanelProps,l=a.isOpen,u=s(o,t),c=_C("chakra-accordion__panel",n),d=AC();i||delete u.hidden;var f=qr.createElement(Lv.div,un(un({},u),{},{__css:d.panel,className:c}));return i?f:qr.createElement(fC,un({in:l},r),f)}));qC.displayName="AccordionPanel";var YC=Cv((function(e,t){var n=e.children,r=e.reduceMotion,o=sn(e,C),i=Pv("Accordion",o),a=BC(ua(o)),s=a.htmlProps,l=a.descendants,u=sn(a,_),c=cr.useMemo((function(){return un(un({},u),{},{reduceMotion:!!r})}),[u,r]);return qr.createElement(NC,{value:l},qr.createElement(HC,{value:c},qr.createElement(OC,{value:i},qr.createElement(Lv.div,un(un({ref:t},s),{},{className:_C("chakra-accordion",o.className),__css:i.root}),n))))}));YC.displayName="Accordion";var ZC=fl({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),XC=Cv((function(e,t){var n=Ev("Spinner",e),r=ua(e),o=r.label,i=void 0===o?"Loading...":o,a=r.thickness,s=void 0===a?"2px":a,l=r.speed,u=void 0===l?"0.45s":l,c=r.emptyColor,d=void 0===c?"transparent":c,f=r.className,h=sn(r,E),p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}("chakra-spinner",f),v=un({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:s,borderBottomColor:d,borderLeftColor:d,animation:"".concat(ZC," ").concat(u," linear infinite")},n);return qr.createElement(Lv.div,un({ref:t,__css:v,className:p},h),i&&qr.createElement(Lv.span,{srOnly:!0},i))}));XC.displayName="Spinner";var $C=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function KC(e){return qr.createElement(Gv,un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))}var QC=yn(Av({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),2),JC=QC[0],e_=QC[1],t_=yn(Av({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),2),n_=t_[0],r_=t_[1],o_={info:{icon:function(e){return qr.createElement(Gv,un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"}))},colorScheme:"blue"},warning:{icon:KC,colorScheme:"orange"},success:{icon:function(e){return qr.createElement(Gv,un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}))},colorScheme:"green"},error:{icon:KC,colorScheme:"red"},loading:{icon:XC,colorScheme:"blue"}};var i_=Cv((function(e,t){var n,r=ua(e),o=r.status,i=void 0===o?"info":o,a=r.addRole,s=void 0===a||a,l=sn(r,P),u=null!==(n=e.colorScheme)&&void 0!==n?n:function(e){return o_[e].colorScheme}(i),c=Pv("Alert",un(un({},e),{},{colorScheme:u})),d=un({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden"},c.container);return qr.createElement(JC,{value:{status:i}},qr.createElement(n_,{value:c},qr.createElement(Lv.div,un(un({role:s?"alert":void 0,ref:t},l),{},{className:$C("chakra-alert",e.className),__css:d}))))}));i_.displayName="Alert";var a_=Cv((function(e,t){var n=un({display:"inline"},r_().description);return qr.createElement(Lv.div,un(un({ref:t},e),{},{className:$C("chakra-alert__desc",e.className),__css:n}))}));function s_(e){var t=e_().status,n=function(e){return o_[e].icon}(t),r=r_(),o="loading"===t?r.spinner:r.icon;return qr.createElement(Lv.span,un(un({display:"inherit"},e),{},{className:$C("chakra-alert__icon",e.className),__css:o}),e.children||qr.createElement(n,{h:"100%",w:"100%"}))}a_.displayName="AlertDescription",s_.displayName="AlertIcon";var l_=Cv((function(e,t){var n=r_();return qr.createElement(Lv.div,un(un({ref:t},e),{},{className:$C("chakra-alert__title",e.className),__css:n.title}))}));l_.displayName="AlertTitle";var u_=Cv((function(e,t){var n=e.htmlWidth,r=e.htmlHeight,o=e.alt,i=sn(e,L);return qr.createElement("img",un({width:n,height:r,ref:t,alt:o},i))}));u_.displayName="NativeImage";var c_=Cv((function(e,t){var n=e.fallbackSrc,r=e.fallback,o=e.src,i=e.srcSet,a=e.align,s=e.fit,l=e.loading,u=e.ignoreFallback,c=e.crossOrigin,d=e.fallbackStrategy,f=void 0===d?"beforeLoadOrError":d,h=e.referrerPolicy,p=sn(e,O),v=null!=l||u||!(void 0!==n||void 0!==r),g=function(e){var t=e.loading,n=e.src,r=e.srcSet,o=e.onLoad,i=e.onError,a=e.crossOrigin,s=e.sizes,l=e.ignoreFallback,u=yn(cr.useState("pending"),2),c=u[0],d=u[1];cr.useEffect((function(){d(n?"loading":"pending")}),[n]);var f=cr.useRef(),h=cr.useCallback((function(){if(n){p();var e=new Image;e.src=n,a&&(e.crossOrigin=a),r&&(e.srcset=r),s&&(e.sizes=s),t&&(e.loading=t),e.onload=function(e){p(),d("loaded"),null==o||o(e)},e.onerror=function(e){p(),d("failed"),null==i||i(e)},f.current=e}}),[n,a,r,s,o,i,t]),p=function(){f.current&&(f.current.onload=null,f.current.onerror=null,f.current=null)};return oo((function(){if(!l)return"loading"===c&&h(),function(){p()}}),[c,h,l]),l?"loaded":c}(un(un({},e),{},{ignoreFallback:v})),m=function(e,t){return"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t}(g,f),y=un({ref:t,objectFit:s,objectPosition:a},v?p:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=xn(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(p,["onError","onLoad"]));return m?r||qr.createElement(Lv.img,un({as:u_,className:"chakra-image__placeholder",src:n},y)):qr.createElement(Lv.img,un({as:u_,src:o,srcSet:i,crossOrigin:c,loading:l,referrerPolicy:h,className:"chakra-image"},y))}));function d_(e){return cr.Children.toArray(e).filter((function(e){return cr.isValidElement(e)}))}c_.displayName="Image",Cv((function(e,t){return qr.createElement(Lv.img,un({ref:t,as:u_,className:"chakra-image"},e))}));var f_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},h_=function(e){return e?"":void 0},p_=yn(Av({strict:!1,name:"ButtonGroupContext"}),2),v_=p_[0],g_=p_[1];function m_(e){var t=e.children,n=e.className,r=sn(e,A),o=cr.isValidElement(t)?cr.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,i=f_("chakra-button__icon",n);return qr.createElement(Lv.span,un(un({display:"inline-flex",alignSelf:"center",flexShrink:0},r),{},{className:i}),o)}function y_(e){var t=e.label,n=e.placement,r=e.spacing,o=void 0===r?"0.5rem":r,i=e.children,a=void 0===i?qr.createElement(XC,{color:"currentColor",width:"1em",height:"1em"}):i,s=e.className,l=e.__css,u=sn(e,M),c=f_("chakra-button__spinner",s),d="start"===n?"marginEnd":"marginStart",f=cr.useMemo((function(){var e;return un((gn(e={display:"flex",alignItems:"center",position:t?"relative":"absolute"},d,t?o:0),gn(e,"fontSize","1em"),gn(e,"lineHeight","normal"),e),l)}),[l,t,d,o]);return qr.createElement(Lv.div,un(un({className:c},u),{},{__css:f}),a)}m_.displayName="ButtonIcon",y_.displayName="ButtonSpinner";var b_=Cv((function(e,t){var n=g_(),r=Ev("Button",un(un({},n),e)),o=ua(e),i=o.isDisabled,a=void 0===i?null==n?void 0:n.isDisabled:i,s=o.isLoading,l=o.isActive,u=o.children,c=o.leftIcon,d=o.rightIcon,f=o.loadingText,h=o.iconSpacing,p=void 0===h?"0.5rem":h,v=o.type,g=o.spinner,m=o.spinnerPlacement,y=void 0===m?"start":m,b=o.className,w=o.as,k=sn(o,T),x=cr.useMemo((function(){var e=un(un({},null==r?void 0:r._focus),{},{zIndex:1});return un(un({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none"},r),!!n&&{_focus:e})}),[r,n]),S=function(e){var t=yn(cr.useState(!e),2),n=t[0],r=t[1],o=cr.useCallback((function(e){e&&r("BUTTON"===e.tagName)}),[]);return{ref:o,type:n?"button":void 0}}(w),C=S.ref,_=S.type,E={rightIcon:d,leftIcon:c,iconSpacing:p,children:u};return qr.createElement(Lv.button,un({disabled:a||s,ref:Iv(t,C),as:w,type:null!=v?v:_,"data-active":h_(l),"data-loading":h_(s),__css:x,className:f_("chakra-button",b)},k),s&&"start"===y&&qr.createElement(y_,{className:"chakra-button__spinner--start",label:f,placement:"start",spacing:p},g),s?f||qr.createElement(Lv.span,{opacity:0},qr.createElement(w_,un({},E))):qr.createElement(w_,un({},E)),s&&"end"===y&&qr.createElement(y_,{className:"chakra-button__spinner--end",label:f,placement:"end",spacing:p},g))}));function w_(e){var t=e.leftIcon,n=e.rightIcon,r=e.children,o=e.iconSpacing;return qr.createElement(qr.Fragment,null,t&&qr.createElement(m_,{marginEnd:o},t),r,n&&qr.createElement(m_,{marginStart:o},n))}b_.displayName="Button";var k_=Cv((function(e,t){var n=e.size,r=e.colorScheme,o=e.variant,i=e.className,a=e.spacing,s=void 0===a?"0.5rem":a,l=e.isAttached,u=e.isDisabled,c=sn(e,I),d=f_("chakra-button__group",i),f=cr.useMemo((function(){return{size:n,colorScheme:r,variant:o,isDisabled:u}}),[n,r,o,u]),h={display:"inline-flex"};return h=un(un({},h),{},l?{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:{"& > *:not(style) ~ *:not(style)":{marginStart:s}}),qr.createElement(v_,{value:f},qr.createElement(Lv.div,un({ref:t,role:"group",__css:h,className:d,"data-attached":l?"":void 0},c)))}));k_.displayName="ButtonGroup";var x_=Cv((function(e,t){var n=e.icon,r=e.children,o=e.isRound,i=e["aria-label"],a=sn(e,R),s=n||r,l=cr.isValidElement(s)?cr.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return qr.createElement(b_,un({padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":i},a),l)}));x_.displayName="IconButton";var S_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},C_=function(e){return e?"":void 0},__=function(e){return!!e||void 0};function E_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var P_=yn(Av({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),2),L_=P_[0],O_=P_[1],A_=yn(Av({strict:!1,name:"FormControlContext"}),2),M_=A_[0],T_=A_[1];var I_=Cv((function(e,t){var n=Pv("Form",e),r=function(e){var t=e.id,n=e.isRequired,r=e.isInvalid,o=e.isDisabled,i=e.isReadOnly,a=sn(e,N),s=cr.useId(),l=t||"field-".concat(s),u="".concat(l,"-label"),c="".concat(l,"-feedback"),d="".concat(l,"-helptext"),f=yn(cr.useState(!1),2),h=f[0],p=f[1],v=yn(cr.useState(!1),2),g=v[0],m=v[1],y=yn(cr.useState(!1),2),b=y[0],w=y[1],k=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({id:d},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Tv(e,(function(e){e&&m(!0)}))})}),[d]),x=cr.useCallback((function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},n),{},{ref:a,"data-focus":C_(b),"data-disabled":C_(o),"data-invalid":C_(r),"data-readonly":C_(i),id:null!==(e=n.id)&&void 0!==e?e:u,htmlFor:null!==(t=n.htmlFor)&&void 0!==t?t:l})}),[l,o,b,r,i,u]),S=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({id:c},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Tv(e,(function(e){e&&p(!0)})),"aria-live":"polite"})}),[c]),C=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un(un({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),a),{},{ref:e,role:"group"})}),[a]),_=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!i,isDisabled:!!o,isFocused:!!b,onFocus:function(){return w(!0)},onBlur:function(){return w(!1)},hasFeedbackText:h,setHasFeedbackText:p,hasHelpText:g,setHasHelpText:m,id:l,labelId:u,feedbackId:c,helpTextId:d,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:S,getRootProps:C,getLabelProps:x,getRequiredIndicatorProps:_}}(ua(e)),o=r.getRootProps,i=(r.htmlProps,sn(r,D)),a=S_("chakra-form-control",e.className);return qr.createElement(M_,{value:i},qr.createElement(L_,{value:n},qr.createElement(Lv.div,un(un({},o({},t)),{},{className:a,__css:n.container}))))}));I_.displayName="FormControl";var R_=Cv((function(e,t){var n=T_(),r=O_(),o=S_("chakra-form__helper-text",e.className);return qr.createElement(Lv.div,un(un({},null==n?void 0:n.getHelpTextProps(e,t)),{},{__css:r.helperText,className:o}))}));function N_(e){var t=D_(e),n=t.isDisabled,r=t.isInvalid,o=t.isReadOnly,i=t.isRequired;return un(un({},sn(t,z)),{},{disabled:n,readOnly:o,required:i,"aria-invalid":__(r),"aria-required":__(i),"aria-readonly":__(o)})}function D_(e){var t,n,r,o=T_(),i=e.id,a=e.disabled,s=e.readOnly,l=e.required,u=e.isRequired,c=e.isInvalid,d=e.isReadOnly,f=e.isDisabled,h=e.onFocus,p=e.onBlur,v=sn(e,j),g=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==o?void 0:o.hasFeedbackText)&&(null==o?void 0:o.isInvalid)&&g.push(o.feedbackId),(null==o?void 0:o.hasHelpText)&&g.push(o.helpTextId),un(un({},v),{},{"aria-describedby":g.join(" ")||void 0,id:null!=i?i:null==o?void 0:o.id,isDisabled:null!==(t=null!=a?a:f)&&void 0!==t?t:null==o?void 0:o.isDisabled,isReadOnly:null!==(n=null!=s?s:d)&&void 0!==n?n:null==o?void 0:o.isReadOnly,isRequired:null!==(r=null!=l?l:u)&&void 0!==r?r:null==o?void 0:o.isRequired,isInvalid:null!=c?c:null==o?void 0:o.isInvalid,onFocus:E_(null==o?void 0:o.onFocus,h),onBlur:E_(null==o?void 0:o.onBlur,p)})}R_.displayName="FormHelperText";var z_=yn(Av({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormError />\" "}),2),j_=z_[0],B_=z_[1],F_=Cv((function(e,t){var n=Pv("FormError",e),r=ua(e),o=T_();return(null==o?void 0:o.isInvalid)?qr.createElement(j_,{value:n},qr.createElement(Lv.div,un(un({},null==o?void 0:o.getErrorMessageProps(r,t)),{},{className:S_("chakra-form__error-message",e.className),__css:un({display:"flex",alignItems:"center"},n.text)}))):null}));F_.displayName="FormErrorMessage";var H_=Cv((function(e,t){var n=B_(),r=T_();if(!(null==r?void 0:r.isInvalid))return null;var o=S_("chakra-form__error-icon",e.className);return qr.createElement(Gv,un(un({ref:t,"aria-hidden":!0},e),{},{__css:n.icon,className:o}),qr.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))}));H_.displayName="FormErrorIcon";var V_=Cv((function(e,t){var n,r=Ev("FormLabel",e),o=ua(e),i=(o.className,o.children),a=o.requiredIndicator,s=void 0===a?qr.createElement(W_,null):a,l=o.optionalIndicator,u=void 0===l?null:l,c=sn(o,B),d=T_(),f=null!==(n=null==d?void 0:d.getLabelProps(c,t))&&void 0!==n?n:un({ref:t},c);return qr.createElement(Lv.label,un(un({},f),{},{className:S_("chakra-form__label",o.className),__css:un({display:"block",textAlign:"start"},r)}),i,(null==d?void 0:d.isRequired)?s:u)}));V_.displayName="FormLabel";var W_=Cv((function(e,t){var n=T_(),r=O_();if(!(null==n?void 0:n.isRequired))return null;var o=S_("chakra-form__required-indicator",e.className);return qr.createElement(Lv.span,un(un({},null==n?void 0:n.getRequiredIndicatorProps(e,t)),{},{__css:r.requiredIndicator,className:o}))}));function U_(e,t){var n=cr.useRef(!1),r=cr.useRef(!1);cr.useEffect((function(){if(n.current&&r.current)return e();r.current=!0}),t),cr.useEffect((function(){return n.current=!0,function(){n.current=!1}}),[])}W_.displayName="RequiredIndicator";var G_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};Lv("span",{baseStyle:G_}).displayName="VisuallyHidden",Lv("input",{baseStyle:G_}).displayName="VisuallyHiddenInput";var q_=!1,Y_=null,Z_=!1,X_=new Set,$_="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function K_(e,t){X_.forEach((function(n){return n(e,t)}))}function Q_(e){Z_=!0,function(e){return!(e.metaKey||!$_&&e.altKey||e.ctrlKey)}(e)&&(Y_="keyboard",K_("keyboard",e))}function J_(e){Y_="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Z_=!0,K_("pointer",e))}function eE(e){e.target!==window&&e.target!==document&&(Z_||(Y_="keyboard",K_("keyboard",e)),Z_=!1)}function tE(){Z_=!1}function nE(){return"pointer"!==Y_}function rE(e){!function(){if("undefined"!=typeof window&&!q_){var e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Z_=!0;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.apply(this,n)},document.addEventListener("keydown",Q_,!0),document.addEventListener("keyup",Q_,!0),window.addEventListener("focus",eE,!0),window.addEventListener("blur",tE,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",J_,!0),document.addEventListener("pointermove",J_,!0),document.addEventListener("pointerup",J_,!0)):(document.addEventListener("mousedown",J_,!0),document.addEventListener("mousemove",J_,!0),document.addEventListener("mouseup",J_,!0)),q_=!0}}(),e(nE());var t=function(){return e(nE())};return X_.add(t),function(){X_.delete(t)}}var oE=yn(Av({name:"CheckboxGroupContext",strict:!1}),2),iE=(oE[0],oE[1]),aE=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},sE=function(e){return e?"":void 0};function lE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}function uE(e){return qr.createElement(Lv.svg,un({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},e),qr.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cE(e){return qr.createElement(Lv.svg,un({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},e),qr.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dE(e){var t=e.isIndeterminate,n=e.isChecked,r=sn(e,F),o=t?cE:uE;return n||t?qr.createElement(Lv.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},qr.createElement(o,un({},r))):null}function fE(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=xn(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}function hE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=D_(e),n=t.isDisabled,r=t.isReadOnly,o=t.isRequired,i=t.isInvalid,a=t.id,s=t.onBlur,l=t.onFocus,u=t["aria-describedby"],c=e.defaultChecked,d=e.isChecked,f=e.isFocusable,h=e.onChange,p=e.isIndeterminate,v=e.name,g=e.value,m=e.tabIndex,y=void 0===m?void 0:m,b=e["aria-label"],w=e["aria-labelledby"],k=e["aria-invalid"],x=sn(e,H),S=fE(x,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=Yv(h),_=Yv(s),E=Yv(l),P=cr.useState(!1),L=yn(P,2),O=L[0],A=L[1],M=cr.useState(!1),T=yn(M,2),I=T[0],R=T[1],N=cr.useState(!1),D=yn(N,2),z=D[0],j=D[1],B=cr.useState(!1),F=yn(B,2),V=F[0],W=F[1];cr.useEffect((function(){return rE(A)}),[]);var U=cr.useRef(null),G=cr.useState(!0),q=yn(G,2),Y=q[0],Z=q[1],X=cr.useState(!!c),$=yn(X,2),K=$[0],Q=$[1],J=void 0!==d,ee=J?d:K,te=cr.useCallback((function(e){r||n?e.preventDefault():(J||Q(ee?e.target.checked:!!p||e.target.checked),null==C||C(e))}),[r,n,ee,J,p,C]);oo((function(){U.current&&(U.current.indeterminate=Boolean(p))}),[p]),U_((function(){n&&R(!1)}),[n,R]),oo((function(){var e=U.current;(null==e?void 0:e.form)&&(e.form.onreset=function(){Q(!!c)})}),[]);var ne=n&&!f,re=cr.useCallback((function(e){" "===e.key&&W(!0)}),[W]),oe=cr.useCallback((function(e){" "===e.key&&W(!1)}),[W]);oo((function(){U.current&&(U.current.checked!==ee&&Q(U.current.checked))}),[U.current]);var ie=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=function(e){I&&e.preventDefault(),W(!0)};return un(un({},e),{},{ref:t,"data-active":sE(V),"data-hover":sE(z),"data-checked":sE(ee),"data-focus":sE(I),"data-focus-visible":sE(I&&O),"data-indeterminate":sE(p),"data-disabled":sE(n),"data-invalid":sE(i),"data-readonly":sE(r),"aria-hidden":!0,onMouseDown:lE(e.onMouseDown,o),onMouseUp:lE(e.onMouseUp,(function(){return W(!1)})),onMouseEnter:lE(e.onMouseEnter,(function(){return j(!0)})),onMouseLeave:lE(e.onMouseLeave,(function(){return j(!1)}))})}),[V,ee,n,I,O,z,p,i,r]),ae=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un(un({},S),e),{},{ref:Tv(t,(function(e){e&&Z("LABEL"===e.tagName)})),onClick:lE(e.onClick,(function(){var e;Y||(null==(e=U.current)||e.click(),requestAnimationFrame((function(){var e;null==(e=U.current)||e.focus()})))})),"data-disabled":sE(n),"data-checked":sE(ee),"data-invalid":sE(i)})}),[S,n,ee,i,Y]),se=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(U,t),type:"checkbox",name:v,value:g,id:a,tabIndex:y,onChange:lE(e.onChange,te),onBlur:lE(e.onBlur,_,(function(){return R(!1)})),onFocus:lE(e.onFocus,E,(function(){return R(!0)})),onKeyDown:lE(e.onKeyDown,re),onKeyUp:lE(e.onKeyUp,oe),required:o,checked:ee,disabled:ne,readOnly:r,"aria-label":b,"aria-labelledby":w,"aria-invalid":k?Boolean(k):i,"aria-describedby":u,"aria-disabled":n,style:G_})}),[v,g,a,te,_,E,re,oe,o,ee,ne,r,b,w,k,i,u,n,y]),le=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,onMouseDown:lE(e.onMouseDown,pE),onTouchStart:lE(e.onTouchStart,pE),"data-disabled":sE(n),"data-checked":sE(ee),"data-invalid":sE(i)})}),[ee,n,i]),ue={isInvalid:i,isFocused:I,isChecked:ee,isActive:V,isHovered:z,isIndeterminate:p,isDisabled:n,isReadOnly:r,isRequired:o};return{state:ue,getRootProps:ae,getCheckboxProps:ie,getInputProps:se,getLabelProps:le,htmlProps:S}}function pE(e){e.preventDefault(),e.stopPropagation()}var vE={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},gE={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},mE=fl({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),yE=fl({from:{opacity:0},to:{opacity:1}}),bE=fl({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),wE=Cv((function(e,t){var n=iE(),r=Pv("Checkbox",un(un({},n),e)),o=ua(e),i=o.spacing,a=void 0===i?"0.5rem":i,s=o.className,l=o.children,u=o.iconColor,c=o.iconSize,d=o.icon,f=void 0===d?qr.createElement(dE,null):d,h=o.isChecked,p=o.isDisabled,v=void 0===p?null==n?void 0:n.isDisabled:p,g=o.onChange,m=o.inputProps,y=sn(o,V),b=h;(null==n?void 0:n.value)&&o.value&&(b=n.value.includes(o.value));var w=g;(null==n?void 0:n.onChange)&&o.value&&(w=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){null==t||t(e)}))}}(n.onChange,g));var k=hE(un(un({},y),{},{isDisabled:v,isChecked:b,onChange:w})),x=k.state,S=k.getInputProps,C=k.getCheckboxProps,_=k.getLabelProps,E=k.getRootProps,P=cr.useMemo((function(){return un({animation:x.isIndeterminate?"".concat(yE," 20ms linear, ").concat(bE," 200ms linear"):"".concat(mE," 200ms linear"),fontSize:c,color:u},r.icon)}),[u,c,,x.isIndeterminate,r.icon]),L=cr.cloneElement(f,{__css:P,isIndeterminate:x.isIndeterminate,isChecked:x.isChecked});return qr.createElement(Lv.label,un({__css:un(un({},gE),r.container),className:aE("chakra-checkbox",s)},E()),qr.createElement("input",un({className:"chakra-checkbox__input"},S(m,t))),qr.createElement(Lv.span,un({__css:un(un({},vE),r.control),className:"chakra-checkbox__control"},C()),L),l&&qr.createElement(Lv.span,un(un({className:"chakra-checkbox__label"},_()),{},{__css:un({marginStart:a},r.label)}),l))}));function kE(e){return qr.createElement(Gv,un({focusable:"false","aria-hidden":!0},e),qr.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}))}wE.displayName="Checkbox";var xE=Cv((function(e,t){var n=Ev("CloseButton",e),r=ua(e),o=r.children,i=r.isDisabled,a=r.__css,s=sn(r,W);return qr.createElement(Lv.button,un({type:"button","aria-label":"Close",ref:t,disabled:i,__css:un(un(un({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),n),a)},s),o||qr.createElement(kE,{width:"1em",height:"1em"}))}));function SE(e,t){var n=function(e){var t=parseFloat(e);return"number"!=typeof t||Number.isNaN(t)?0:t}(e),r=Math.pow(10,null!=t?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function CE(e){if(!Number.isFinite(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function _E(e,t,n){return 100*(e-t)/(n-t)}function EE(e,t,n){return(n-t)*e+t}function PE(e,t,n){return SE(Math.round((e-t)/n)*n+t,CE(n))}function LE(e,t,n){return null==e?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function OE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onChange,n=e.precision,r=e.defaultValue,o=e.value,i=e.step,a=void 0===i?1:i,s=e.min,l=void 0===s?Number.MIN_SAFE_INTEGER:s,u=e.max,c=void 0===u?Number.MAX_SAFE_INTEGER:u,d=e.keepWithinRange,f=void 0===d||d,h=Yv(t),p=cr.useState((function(){var e;return null==r?"":null!==(e=TE(r,a,n))&&void 0!==e?e:""})),v=yn(p,2),g=v[0],m=v[1],y=void 0!==o,b=y?o:g,w=ME(AE(b),a),k=null!=n?n:w,x=cr.useCallback((function(e){e!==b&&(y||m(e.toString()),null==h||h(e.toString(),AE(e)))}),[h,y,b]),S=cr.useCallback((function(e){var t=e;return f&&(t=LE(t,l,c)),SE(t,k)}),[k,f,c,l]),C=cr.useCallback((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e=""===b?AE(t):AE(b)+t,e=S(e),x(e)}),[S,a,x,b]),_=cr.useCallback((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e=""===b?AE(-t):AE(b)-t,e=S(e),x(e)}),[S,a,x,b]),E=cr.useCallback((function(){var e,t;null==r?e="":e=null!==(t=TE(r,a,n))&&void 0!==t?t:l;x(e)}),[r,n,a,x,l]),P=cr.useCallback((function(e){var t,n=null!==(t=TE(e,a,k))&&void 0!==t?t:l;x(n)}),[k,a,x,l]),L=AE(b),O=L>c||L<l,A=L===c,M=L===l;return{isOutOfRange:O,isAtMax:A,isAtMin:M,precision:k,value:b,valueAsNumber:L,update:x,reset:E,increment:C,decrement:_,clamp:S,cast:P,setValue:m}}function AE(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function ME(e,t){return Math.max(CE(t),CE(e))}function TE(e,t,n){var r=AE(e);if(!Number.isNaN(r)){var o=ME(r,t);return SE(r,null!=n?n:o)}}xE.displayName="CloseButton";var IE="\n :root {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root {\n --chakra-vh: 100dvh;\n }\n }\n",RE=function(){return qr.createElement(cl,{styles:IE})},NE=function(){return qr.createElement(cl,{styles:'\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n font-feature-settings: \'kern\';\n }\n\n *,\n *::before,\n *::after {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n }\n\n main {\n display: block;\n }\n\n hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n b,\n strong {\n font-weight: bold;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n img {\n border-style: none;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n textarea {\n overflow: auto;\n }\n\n [type="checkbox"],\n [type="radio"] {\n box-sizing: border-box;\n padding: 0;\n }\n\n [type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n input[type="number"] {\n -moz-appearance: textfield;\n }\n\n [type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n [type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n details {\n display: block;\n }\n\n summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n body,\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre {\n margin: 0;\n }\n\n button {\n background: transparent;\n padding: 0;\n }\n\n fieldset {\n margin: 0;\n padding: 0;\n }\n\n ol,\n ul {\n margin: 0;\n padding: 0;\n }\n\n textarea {\n resize: vertical;\n }\n\n button,\n [role="button"] {\n cursor: pointer;\n }\n\n button::-moz-focus-inner {\n border: 0 !important;\n }\n\n table {\n border-collapse: collapse;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n }\n\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {\n outline: none;\n box-shadow: none;\n }\n\n select::-ms-expand {\n display: none;\n }\n\n '.concat(IE,"\n ")})};function DE(e,t,n,r){var o=Yv(n);return cr.useEffect((function(){var i="function"==typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),function(){i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),function(){var n="function"==typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}var zE=function(){return"undefined"!=typeof window};var jE=function(e){return zE()&&e.test((n=navigator.userAgentData,null!==(t=null==n?void 0:n.platform)&&void 0!==t?t:navigator.platform));var t,n},BE=function(){return jE(/mac|iphone|ipad|ipod/i)&&function(e){return zE()&&e.test(navigator.vendor)}(/apple/i)};function FE(e){var t=e.ref,n=e.elements,r=e.enabled,o=function(){var e,n;return null!==(e=null==(n=t.current)?void 0:n.ownerDocument)&&void 0!==e?e:document};DE(o,"pointerdown",(function(e){if(BE()&&r){var i=e.target,a=(null!=n?n:[t]).some((function(e){var t="current"in e?e.current:e;return(null==t?void 0:t.contains(i))||t===i}));o().activeElement!==i&&a&&(e.preventDefault(),i.focus())}}))}var HE=Rl?cr.useLayoutEffect:cr.useEffect;function VE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=cr.useRef(e);return HE((function(){n.current=e})),cr.useCallback((function(){for(var e,t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null==(t=n.current)?void 0:(e=t).call.apply(e,[n].concat(o))}),t)}function WE(e,t){var n=void 0!==e;return[n,n&&void 0!==e?e:t]}function UE(e,t){var n=cr.useId();return cr.useMemo((function(){return e||[t,n].filter(Boolean).join("-")}),[e,t,n])}function GE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,n=e.onOpen,r=e.isOpen,o=e.id,i=VE(n),a=VE(t),s=cr.useState(e.defaultIsOpen||!1),l=yn(s,2),u=l[0],c=l[1],d=WE(r,u),f=yn(d,2),h=f[0],p=f[1],v=UE(o,"disclosure"),g=cr.useCallback((function(){h||c(!1),null==a||a()}),[h,a]),m=cr.useCallback((function(){h||c(!0),null==i||i()}),[h,i]),y=cr.useCallback((function(){(p?g:m)()}),[p,m,g]);return{isOpen:!!p,onOpen:m,onClose:g,onToggle:y,isControlled:h,getButtonProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(un({},e),{},{"aria-expanded":p,"aria-controls":v,onClick:Dl(e.onClick,y)})},getDisclosureProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(un({},e),{},{hidden:!p,id:v})}}}function qE(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}var YE=Cv((function(e,t){var n=e.htmlSize,r=sn(e,U),o=Pv("Input",r),i=N_(ua(r)),a=Wv("chakra-input",e.className);return qr.createElement(Lv.input,un(un({size:n},i),{},{__css:o.field,ref:t,className:a}))}));YE.displayName="Input",YE.id="Input";var ZE=yn(Av({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<InputGroup />\" "}),2),XE=ZE[0],$E=ZE[1],KE=Cv((function(e,t){var n=Pv("Input",e),r=ua(e),o=r.children,i=r.className,a=sn(r,G),s=Wv("chakra-input__group",i),l={},u=d_(o),c=n.field;u.forEach((function(e){if(n){var t,r;if(c&&"InputLeftElement"===e.type.id)l.paddingStart=null!==(t=c.height)&&void 0!==t?t:c.h;if(c&&"InputRightElement"===e.type.id)l.paddingEnd=null!==(r=c.height)&&void 0!==r?r:c.h;"InputRightAddon"===e.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(l.borderStartRadius=0)}}));var d=u.map((function(t){var n,r,o=qE({size:(null==(n=t.props)?void 0:n.size)||e.size,variant:(null==(r=t.props)?void 0:r.variant)||e.variant});return"Input"!==t.type.id?cr.cloneElement(t,o):cr.cloneElement(t,Object.assign(o,l,t.props))}));return qr.createElement(Lv.div,un({className:s,ref:t,__css:{width:"100%",display:"flex",position:"relative"}},a),qr.createElement(XE,{value:n},d))}));KE.displayName="InputGroup";var QE={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},JE=Lv("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),eP=Cv((function(e,t){var n,r=e.placement,o=void 0===r?"left":r,i=sn(e,q),a=null!==(n=QE[o])&&void 0!==n?n:{},s=$E();return qr.createElement(JE,un(un({ref:t},i),{},{__css:un(un({},s.addon),a)}))}));eP.displayName="InputAddon";var tP=Cv((function(e,t){return qr.createElement(eP,un(un({ref:t,placement:"left"},e),{},{className:Wv("chakra-input__left-addon",e.className)}))}));tP.displayName="InputLeftAddon",tP.id="InputLeftAddon";var nP=Cv((function(e,t){return qr.createElement(eP,un(un({ref:t,placement:"right"},e),{},{className:Wv("chakra-input__right-addon",e.className)}))}));nP.displayName="InputRightAddon",nP.id="InputRightAddon";var rP=Lv("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),oP=Cv((function(e,t){var n,r,o,i=e.placement,a=void 0===i?"left":i,s=sn(e,Y),l=$E(),u=l.field,c=un((gn(o={},"left"===a?"insetStart":"insetEnd","0"),gn(o,"width",null!==(n=null==u?void 0:u.height)&&void 0!==n?n:null==u?void 0:u.h),gn(o,"height",null!==(r=null==u?void 0:u.height)&&void 0!==r?r:null==u?void 0:u.h),gn(o,"fontSize",null==u?void 0:u.fontSize),o),l.element);return qr.createElement(rP,un({ref:t,__css:c},s))}));oP.id="InputElement",oP.displayName="InputElement";var iP=Cv((function(e,t){var n=e.className,r=sn(e,Z),o=Wv("chakra-input__left-element",n);return qr.createElement(oP,un({ref:t,placement:"left",className:o},r))}));iP.id="InputLeftElement",iP.displayName="InputLeftElement";var aP=Cv((function(e,t){var n=e.className,r=sn(e,X),o=Wv("chakra-input__right-element",n);return qr.createElement(oP,un({ref:t,placement:"right",className:o},r))}));function sP(e,t){return Array.isArray(e)?e.map((function(e){return null===e?null:t(e)})):function(e){var t=kn(e);return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}(e)?Object.keys(e).reduce((function(n,r){return n[r]=t(e[r]),n}),{}):null!=e?t(e):null}aP.id="InputRightElement",aP.displayName="InputRightElement";var lP=Cv((function(e,t){var n=e.ratio,r=void 0===n?4/3:n,o=e.children,i=e.className,a=sn(e,$),s=cr.Children.only(o),l=Wv("chakra-aspect-ratio",i);return qr.createElement(Lv.div,un({ref:t,position:"relative",className:l,_before:{height:0,content:'""',display:"block",paddingBottom:sP(r,(function(e){return"".concat(1/e*100,"%")}))},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}}},a),s)}));lP.displayName="AspectRatio";var uP=Cv((function(e,t){var n=Ev("Badge",e),r=ua(e),o=(r.className,sn(r,K));return qr.createElement(Lv.span,un(un({ref:t,className:Wv("chakra-badge",e.className)},o),{},{__css:un({display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle"},n)}))}));uP.displayName="Badge";var cP=Lv("div");cP.displayName="Box";var dP=Cv((function(e,t){var n=e.size,r=e.centerContent,o=void 0===r||r,i=sn(e,Q),a=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return qr.createElement(cP,un({ref:t,boxSize:n,__css:un(un({},a),{},{flexShrink:0,flexGrow:0})},i))}));dP.displayName="Square";var fP=Cv((function(e,t){var n=e.size,r=sn(e,J);return qr.createElement(dP,un({size:n,ref:t,borderRadius:"9999px"},r))}));fP.displayName="Circle";var hP=Lv("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});hP.displayName="Center";var pP={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Cv((function(e,t){var n=e.axis,r=void 0===n?"both":n,o=sn(e,ee);return qr.createElement(Lv.div,un(un({ref:t,__css:pP[r]},o),{},{position:"absolute"}))}));var vP=Cv((function(e,t){var n=Ev("Code",e),r=ua(e),o=(r.className,sn(r,te));return qr.createElement(Lv.code,un(un({ref:t,className:Wv("chakra-code",e.className)},o),{},{__css:un({display:"inline-block"},n)}))}));vP.displayName="Code";var gP=Cv((function(e,t){var n=ua(e),r=n.className,o=n.centerContent,i=sn(n,ne),a=Ev("Container",e);return qr.createElement(Lv.div,un(un({ref:t,className:Wv("chakra-container",r)},i),{},{__css:un(un({},a),o&&{display:"flex",flexDirection:"column",alignItems:"center"})}))}));gP.displayName="Container";var mP=Cv((function(e,t){var n=Ev("Divider",e),r=n.borderLeftWidth,o=n.borderBottomWidth,i=n.borderTopWidth,a=n.borderRightWidth,s=n.borderWidth,l=n.borderStyle,u=n.borderColor,c=sn(n,re),d=ua(e),f=d.className,h=d.orientation,p=void 0===h?"horizontal":h,v=d.__css,g=sn(d,oe),m={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:o||i||s||"1px",width:"100%"}};return qr.createElement(Lv.hr,un(un({ref:t,"aria-orientation":p},g),{},{__css:un(un(un({},c),{},{border:"0",borderColor:u,borderStyle:l},m[p]),v),className:Wv("chakra-divider",f)}))}));mP.displayName="Divider";var yP=Cv((function(e,t){var n=e.direction,r=e.align,o=e.justify,i=e.wrap,a=e.basis,s=e.grow,l=e.shrink,u=sn(e,ie),c={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return qr.createElement(Lv.div,un({ref:t,__css:c},u))}));yP.displayName="Flex";var bP=Cv((function(e,t){var n=e.templateAreas,r=e.gap,o=e.rowGap,i=e.columnGap,a=e.column,s=e.row,l=e.autoFlow,u=e.autoRows,c=e.templateRows,d=e.autoColumns,f=e.templateColumns,h=sn(e,ae),p={display:"grid",gridTemplateAreas:n,gridGap:r,gridRowGap:o,gridColumnGap:i,gridAutoColumns:d,gridColumn:a,gridRow:s,gridAutoFlow:l,gridAutoRows:u,gridTemplateRows:c,gridTemplateColumns:f};return qr.createElement(Lv.div,un({ref:t,__css:p},h))}));function wP(e){return sP(e,(function(e){return"auto"===e?"auto":"span ".concat(e,"/span ").concat(e)}))}bP.displayName="Grid";var kP=Cv((function(e,t){var n=e.area,r=e.colSpan,o=e.colStart,i=e.colEnd,a=e.rowEnd,s=e.rowSpan,l=e.rowStart,u=sn(e,se),c=qE({gridArea:n,gridColumn:wP(r),gridRow:wP(s),gridColumnStart:o,gridColumnEnd:i,gridRowStart:l,gridRowEnd:a});return qr.createElement(Lv.div,un({ref:t,__css:c},u))}));kP.displayName="GridItem";var xP=Cv((function(e,t){var n=Ev("Heading",e),r=ua(e),o=(r.className,sn(r,le));return qr.createElement(Lv.h2,un(un({ref:t,className:Wv("chakra-heading",e.className)},o),{},{__css:n}))}));xP.displayName="Heading",Cv((function(e,t){var n=Ev("Mark",e),r=ua(e);return qr.createElement(cP,un(un({ref:t},r),{},{as:"mark",__css:un({bg:"transparent",whiteSpace:"nowrap"},n)}))}));var SP=Cv((function(e,t){var n=Ev("Kbd",e),r=ua(e),o=r.className,i=sn(r,ue);return qr.createElement(Lv.kbd,un(un({ref:t,className:Wv("chakra-kbd",o)},i),{},{__css:un({fontFamily:"mono"},n)}))}));SP.displayName="Kbd";var CP=Cv((function(e,t){var n=Ev("Link",e),r=ua(e),o=r.className,i=r.isExternal,a=sn(r,ce);return qr.createElement(Lv.a,un(un({target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:t,className:Wv("chakra-link",o)},a),{},{__css:n}))}));CP.displayName="Link",Cv((function(e,t){var n=e.isExternal,r=e.target,o=e.rel,i=e.className,a=sn(e,de);return qr.createElement(Lv.a,un(un({},a),{},{ref:t,className:Wv("chakra-linkbox__overlay",i),rel:n?"noopener noreferrer":o,target:n?"_blank":r,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}}))})),Cv((function(e,t){var n=e.className,r=sn(e,fe);return qr.createElement(Lv.div,un(un({ref:t,position:"relative"},r),{},{className:Wv("chakra-linkbox",n),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}}))}));var _P=yn(Av({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<List />\" "}),2),EP=_P[0],PP=_P[1],LP=Cv((function(e,t){var n=Pv("List",e),r=ua(e),o=r.children,i=r.styleType,a=void 0===i?"none":i,s=r.stylePosition,l=r.spacing,u=sn(r,he),c=d_(o),d=l?gn({},"& > *:not(style) ~ *:not(style)",{mt:l}):{};return qr.createElement(EP,{value:n},qr.createElement(Lv.ul,un({ref:t,listStyleType:a,listStylePosition:s,role:"list",__css:un(un({},n.container),d)},u),c))}));LP.displayName="List",Cv((function(e,t){e.as;var n=sn(e,pe);return qr.createElement(LP,un({ref:t,as:"ol",styleType:"decimal",marginStart:"1em"},n))})).displayName="OrderedList",Cv((function(e,t){e.as;var n=sn(e,ve);return qr.createElement(LP,un({ref:t,as:"ul",styleType:"initial",marginStart:"1em"},n))})).displayName="UnorderedList";var OP=Cv((function(e,t){var n=PP();return qr.createElement(Lv.li,un(un({ref:t},e),{},{__css:n.item}))}));OP.displayName="ListItem";var AP=Cv((function(e,t){var n=PP();return qr.createElement(Gv,un(un({ref:t,role:"presentation"},e),{},{__css:n.icon}))}));AP.displayName="ListIcon";var MP=Cv((function(e,t){var n=e.columns,r=e.spacingX,o=e.spacingY,i=e.spacing,a=e.minChildWidth,s=sn(e,ge),l=vv(),u=a?function(e,t){return sP(e,(function(e){var n=function(e,t,n){var r=Array.isArray(t)?t:[t],o=Array.isArray(n)?n:[n];return function(n){var i=o.filter(Boolean),a=r.map((function(t,r){var o,a;if("breakpoints"===e)return function(e,t,n){var r,o;if(null==t)return t;var i=function(t){var n,r;return null==(r=null==(n=e.__breakpoints)?void 0:n.asArray)?void 0:r[t]};return null!==(r=null!==(o=i(t))&&void 0!==o?o:i(n))&&void 0!==r?r:n}(n,t,null!==(a=i[r])&&void 0!==a?a:t);var s="".concat(e,".").concat(t);return function(e,t,n){var r,o;if(null==t)return t;var i=function(t){var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.value};return null!==(r=null!==(o=i(t))&&void 0!==o?o:i(n))&&void 0!==r?r:n}(n,s,null!==(o=i[r])&&void 0!==o?o:t)}));return Array.isArray(t)?a:a[0]}}("sizes",e,function(e){return"number"==typeof e?"".concat(e,"px"):e}(e))(t);return null===e?null:"repeat(auto-fit, minmax(".concat(n,", 1fr))")}))}(a,l):sP(n,(function(e){return null===e?null:"repeat(".concat(e,", minmax(0, 1fr))")}));return qr.createElement(bP,un({ref:t,gap:i,columnGap:r,rowGap:o,templateColumns:u},s))}));MP.displayName="SimpleGrid";var TP=Lv("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});TP.displayName="Spacer";var IP="& > *:not(style) ~ *:not(style)";var RP=function(e){return qr.createElement(Lv.div,un(un({className:"chakra-stack__item"},e),{},{__css:un({display:"inline-block",flex:"0 0 auto",minWidth:0},e.__css)}))};RP.displayName="StackItem";var NP=Cv((function(e,t){var n=e.isInline,r=e.direction,o=e.align,i=e.justify,a=e.spacing,s=void 0===a?"0.5rem":a,l=e.wrap,u=e.children,c=e.divider,d=e.className,f=e.shouldWrapChildren,h=sn(e,me),p=n?"row":null!=r?r:"column",v=cr.useMemo((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return gn({flexDirection:n},IP,sP(n,(function(e){return r[e]})))}({direction:p,spacing:s})}),[p,s]),g=cr.useMemo((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":sP(n,(function(e){return r[e]}))}}({spacing:s,direction:p})}),[s,p]),m=!!c,y=!f&&!m,b=cr.useMemo((function(){var e=d_(u);return y?e:e.map((function(t,n){var r=void 0!==t.key?t.key:n,o=n+1===e.length,i=f?qr.createElement(RP,{key:r},t):t;if(!m)return i;var a=cr.cloneElement(c,{__css:g}),s=o?null:a;return qr.createElement(cr.Fragment,{key:r},i,s)}))}),[c,g,m,y,f,u]),w=Wv("chakra-stack",d);return qr.createElement(Lv.div,un({ref:t,display:"flex",alignItems:o,justifyContent:i,flexDirection:v.flexDirection,flexWrap:l,className:w,__css:m?{}:gn({},IP,v[IP])},h),b)}));NP.displayName="Stack";var DP=Cv((function(e,t){return qr.createElement(NP,un(un({align:"center"},e),{},{direction:"row",ref:t}))}));DP.displayName="HStack";var zP=Cv((function(e,t){return qr.createElement(NP,un(un({align:"center"},e),{},{direction:"column",ref:t}))}));zP.displayName="VStack";var jP=Cv((function(e,t){var n=Ev("Text",e),r=ua(e),o=(r.className,r.align,r.decoration,r.casing,sn(r,ye)),i=qE({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return qr.createElement(Lv.p,un(un(un({ref:t,className:Wv("chakra-text",e.className)},i),o),{},{__css:n}))}));function BP(e){return"number"==typeof e?"".concat(e,"px"):e}jP.displayName="Text";var FP=Cv((function(e,t){var n=e.spacing,r=void 0===n?"0.5rem":n,o=e.spacingX,i=e.spacingY,a=e.children,s=e.justify,l=e.direction,u=e.align,c=e.className,d=e.shouldWrapChildren,f=sn(e,be),h=cr.useMemo((function(){var e={spacingX:o,spacingY:i},t=e.spacingX,n=void 0===t?r:t,a=e.spacingY,c=void 0===a?r:a;return{"--chakra-wrap-x-spacing":function(e){return sP(n,(function(t){return BP(xo("space",t)(e))}))},"--chakra-wrap-y-spacing":function(e){return sP(c,(function(t){return BP(xo("space",t)(e))}))},"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}}),[r,o,i,s,u,l]),p=cr.useMemo((function(){return d?cr.Children.map(a,(function(e,t){return qr.createElement(HP,{key:t},e)})):a}),[a,d]);return qr.createElement(Lv.div,un({ref:t,className:Wv("chakra-wrap",c),overflow:"hidden"},f),qr.createElement(Lv.ul,{className:"chakra-wrap__list",__css:h},p))}));FP.displayName="Wrap";var HP=Cv((function(e,t){var n=e.className,r=sn(e,we);return qr.createElement(Lv.li,un({ref:t,__css:{display:"flex",alignItems:"flex-start"},className:Wv("chakra-wrap__listitem",n)},r))}));HP.displayName="WrapItem";var VP={body:{classList:{add:function(){},remove:function(){}}},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}}},WP=function(){},UP={document:VP,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:WP,removeEventListener:WP,getComputedStyle:function(){return{getPropertyValue:function(){return""}}},matchMedia:function(){return{matches:!1,addListener:WP,removeListener:WP}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)},setTimeout:function(){return 0},clearTimeout:WP,setInterval:function(){return 0},clearInterval:WP},GP="undefined"!=typeof window?{window:window,document:document}:{window:UP,document:VP},qP=cr.createContext(GP);function YP(e){var t=e.children,n=e.environment,r=yn(cr.useState(null),2),o=r[0],i=r[1],a=yn(cr.useState(!1),2),s=a[0],l=a[1];cr.useEffect((function(){return l(!0)}),[]);var u=cr.useMemo((function(){if(n)return n;var e=null==o?void 0:o.ownerDocument,t=null==o?void 0:o.ownerDocument.defaultView;return e?{document:e,window:t}:GP}),[o,n]);return qr.createElement(qP.Provider,{value:u},t,!n&&s&&qr.createElement("span",{id:"__chakra_env",hidden:!0,ref:function(e){cr.startTransition((function(){e&&i(e)}))}}))}qP.displayName="EnvironmentContext",YP.displayName="EnvironmentProvider";var ZP=function(e){return e?"":void 0};function XP(){var e=cr.useRef(new Map),t=e.current,n=cr.useCallback((function(t,n,r,o){e.current.set(r,{type:n,el:t,options:o}),t.addEventListener(n,r,o)}),[]),r=cr.useCallback((function(t,n,r,o){t.removeEventListener(n,r,o),e.current.delete(r)}),[]);return cr.useEffect((function(){return function(){t.forEach((function(e,t){r(e.el,e.type,t,e.options)}))}}),[r,t]),{add:n,remove:r}}function $P(e){var t=e.target,n=t.tagName,r=t.isContentEditable;return"INPUT"!==n&&"TEXTAREA"!==n&&!0!==r}function KP(e){return null!=e&&"object"==kn(e)&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function QP(e){var t;return!!KP(e)&&e instanceof(null!==(t=e.ownerDocument.defaultView)&&void 0!==t?t:window).HTMLElement}function JP(e){return KP(e)?e.ownerDocument:document}var eL=function(e){return e.hasAttribute("tabindex")};function tL(e){return!(!e.parentElement||!tL(e.parentElement))||e.hidden}function nL(e){if(!QP(e)||tL(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;var t=e.localName;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;var n={a:function(){return e.hasAttribute("href")},audio:function(){return e.hasAttribute("controls")},video:function(){return e.hasAttribute("controls")}};return t in n?n[t]():!!function(e){var t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||eL(e)}function rL(e){return!!e&&(QP(e)&&nL(e)&&!function(e){return eL(e)&&-1===e.tabIndex}(e))}var oL=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join();function iL(e){var t=Array.from(e.querySelectorAll(oL));return t.unshift(e),t.filter((function(e){return nL(e)&&function(e){return e.offsetWidth>0&&e.offsetHeight>0}(e)}))}function aL(e){var t=e.current;if(!t)return!1;var n=function(e){return JP(e).activeElement}(t);return!!n&&(!t.contains(n)&&!!rL(n))}function sL(e,t){var n=t.shouldFocus,r=t.visible,o=t.focusRef,i=n&&!r;U_((function(){if(i&&!aL(e)){var t=(null==o?void 0:o.current)||e.current;t&&requestAnimationFrame((function(){t.focus()}))}}),[i,e,o])}var lL={preventScroll:!0,shouldFocus:!1};function uL(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lL,n=t.focusRef,r=t.preventScroll,o=t.shouldFocus,i=t.visible,a=cL(e)?e.current:e,s=o&&i,l=cr.useRef(s),u=cr.useRef(i);oo((function(){!u.current&&i&&(l.current=s),u.current=i}),[i,s]);var c=cr.useCallback((function(){if(i&&a&&l.current&&(l.current=!1,!a.contains(document.activeElement)))if(null==n?void 0:n.current)requestAnimationFrame((function(){var e;null==(e=n.current)||e.focus({preventScroll:r})}));else{var e=iL(a);e.length>0&&requestAnimationFrame((function(){e[0].focus({preventScroll:r})}))}}),[i,r,a,n]);U_((function(){c()}),[c]),DE(a,"transitionend",c)}function cL(e){return"current"in e}var dL="top",fL="bottom",hL="right",pL="left",vL="auto",gL=[dL,fL,hL,pL],mL="start",yL="end",bL="viewport",wL="popper",kL=gL.reduce((function(e,t){return e.concat([t+"-"+mL,t+"-"+yL])}),[]),xL=[].concat(gL,[vL]).reduce((function(e,t){return e.concat([t,t+"-"+mL,t+"-"+yL])}),[]),SL=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function CL(e){return e?(e.nodeName||"").toLowerCase():null}function _L(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function EL(e){return e instanceof _L(e).Element||e instanceof Element}function PL(e){return e instanceof _L(e).HTMLElement||e instanceof HTMLElement}function LL(e){return"undefined"!=typeof ShadowRoot&&(e instanceof _L(e).ShadowRoot||e instanceof ShadowRoot)}var OL={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];PL(o)&&CL(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}),{});PL(r)&&CL(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function AL(e){return e.split("-")[0]}var ML=Math.max,TL=Math.min,IL=Math.round;function RL(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function NL(){return!/^((?!chrome|android).)*safari/i.test(RL())}function DL(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&PL(e)&&(o=e.offsetWidth>0&&IL(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&IL(r.height)/e.offsetHeight||1);var a=(EL(e)?_L(e):window).visualViewport,s=!NL()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function zL(e){var t=DL(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 jL(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&LL(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function BL(e){return _L(e).getComputedStyle(e)}function FL(e){return["table","td","th"].indexOf(CL(e))>=0}function HL(e){return((EL(e)?e.ownerDocument:e.document)||window.document).documentElement}function VL(e){return"html"===CL(e)?e:e.assignedSlot||e.parentNode||(LL(e)?e.host:null)||HL(e)}function WL(e){return PL(e)&&"fixed"!==BL(e).position?e.offsetParent:null}function UL(e){for(var t=_L(e),n=WL(e);n&&FL(n)&&"static"===BL(n).position;)n=WL(n);return n&&("html"===CL(n)||"body"===CL(n)&&"static"===BL(n).position)?t:n||function(e){var t=/firefox/i.test(RL());if(/Trident/i.test(RL())&&PL(e)&&"fixed"===BL(e).position)return null;var n=VL(e);for(LL(n)&&(n=n.host);PL(n)&&["html","body"].indexOf(CL(n))<0;){var r=BL(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 GL(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function qL(e,t,n){return ML(e,TL(t,n))}function YL(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ZL(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var XL={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=AL(n.placement),l=GL(s),u=[pL,hL].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return YL("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ZL(e,gL))}(o.padding,n),d=zL(i),f="y"===l?dL:pL,h="y"===l?fL:hL,p=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],g=UL(i),m=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=p/2-v/2,b=c[f],w=m-d[u]-c[h],k=m/2-d[u]/2+y,x=qL(b,k,w),S=l;n.modifiersData[r]=((t={})[S]=x,t.centerOffset=x-k,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)))&&jL(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $L(e){return e.split("-")[1]}var KL={top:"auto",right:"auto",bottom:"auto",left:"auto"};function QL(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,h=void 0===f?0:f,p=a.y,v=void 0===p?0:p,g="function"==typeof c?c({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var m=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=pL,w=dL,k=window;if(u){var x=UL(n),S="clientHeight",C="clientWidth";if(x===_L(n)&&"static"!==BL(x=HL(n)).position&&"absolute"===s&&(S="scrollHeight",C="scrollWidth"),o===dL||(o===pL||o===hL)&&i===yL)w=fL,v-=(d&&x===k&&k.visualViewport?k.visualViewport.height:x[S])-r.height,v*=l?1:-1;if(o===pL||(o===dL||o===fL)&&i===yL)b=hL,h-=(d&&x===k&&k.visualViewport?k.visualViewport.width:x[C])-r.width,h*=l?1:-1}var _,E=Object.assign({position:s},u&&KL),P=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:IL(t*r)/r||0,y:IL(n*r)/r||0}}({x:h,y:v}):{x:h,y:v};return h=P.x,v=P.y,l?Object.assign({},E,((_={})[w]=y?"0":"",_[b]=m?"0":"",_.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",_)):Object.assign({},E,((t={})[w]=y?v+"px":"",t[b]=m?h+"px":"",t.transform="",t))}var JL={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,u={placement:AL(t.placement),variation:$L(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,QL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,QL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},eO={passive:!0};var tO={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=_L(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,eO)})),s&&l.addEventListener("resize",n.update,eO),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,eO)})),s&&l.removeEventListener("resize",n.update,eO)}},data:{}},nO={left:"right",right:"left",bottom:"top",top:"bottom"};function rO(e){return e.replace(/left|right|bottom|top/g,(function(e){return nO[e]}))}var oO={start:"end",end:"start"};function iO(e){return e.replace(/start|end/g,(function(e){return oO[e]}))}function aO(e){var t=_L(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function sO(e){return DL(HL(e)).left+aO(e).scrollLeft}function lO(e){var t=BL(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function uO(e){return["html","body","#document"].indexOf(CL(e))>=0?e.ownerDocument.body:PL(e)&&lO(e)?e:uO(VL(e))}function cO(e,t){var n;void 0===t&&(t=[]);var r=uO(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_L(r),a=o?[i].concat(i.visualViewport||[],lO(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(cO(VL(a)))}function dO(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fO(e,t,n){return t===bL?dO(function(e,t){var n=_L(e),r=HL(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=NL();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+sO(e),y:l}}(e,n)):EL(t)?function(e,t){var n=DL(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):dO(function(e){var t,n=HL(e),r=aO(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ML(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ML(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+sO(e),l=-r.scrollTop;return"rtl"===BL(o||n).direction&&(s+=ML(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(HL(e)))}function hO(e,t,n,r){var o="clippingParents"===t?function(e){var t=cO(VL(e)),n=["absolute","fixed"].indexOf(BL(e).position)>=0&&PL(e)?UL(e):e;return EL(n)?t.filter((function(e){return EL(e)&&jL(e,n)&&"body"!==CL(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=fO(e,n,r);return t.top=ML(o.top,t.top),t.right=TL(o.right,t.right),t.bottom=TL(o.bottom,t.bottom),t.left=ML(o.left,t.left),t}),fO(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 pO(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?AL(o):null,a=o?$L(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case dL:t={x:s,y:n.y-r.height};break;case fL:t={x:s,y:n.y+n.height};break;case hL:t={x:n.x+n.width,y:l};break;case pL:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?GL(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case mL:t[u]=t[u]-(n[c]/2-r[c]/2);break;case yL:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function vO(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,u=n.rootBoundary,c=void 0===u?bL:u,d=n.elementContext,f=void 0===d?wL:d,h=n.altBoundary,p=void 0!==h&&h,v=n.padding,g=void 0===v?0:v,m=YL("number"!=typeof g?g:ZL(g,gL)),y=f===wL?"reference":wL,b=e.rects.popper,w=e.elements[p?y:f],k=hO(EL(w)?w:w.contextElement||HL(e.elements.popper),l,c,a),x=DL(e.elements.reference),S=pO({reference:x,element:b,strategy:"absolute",placement:o}),C=dO(Object.assign({},b,S)),_=f===wL?C:x,E={top:k.top-_.top+m.top,bottom:_.bottom-k.bottom+m.bottom,left:k.left-_.left+m.left,right:_.right-k.right+m.right},P=e.modifiersData.offset;if(f===wL&&P){var L=P[o];Object.keys(E).forEach((function(e){var t=[hL,fL].indexOf(e)>=0?1:-1,n=[dL,fL].indexOf(e)>=0?"y":"x";E[e]+=L[n]*t}))}return E}function gO(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,u=void 0===l?xL:l,c=$L(r),d=c?s?kL:kL.filter((function(e){return $L(e)===c})):gL,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var h=f.reduce((function(t,n){return t[n]=vO(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[AL(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var mO={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,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,v=n.allowedAutoPlacements,g=t.options.placement,m=AL(g),y=l||(m===g||!p?[rO(g)]:function(e){if(AL(e)===vL)return[];var t=rO(e);return[iO(e),t,iO(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(AL(n)===vL?gO(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:v}):n)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,S=!0,C=b[0],_=0;_<b.length;_++){var E=b[_],P=AL(E),L=$L(E)===mL,O=[dL,fL].indexOf(P)>=0,A=O?"width":"height",M=vO(t,{placement:E,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),T=O?L?hL:pL:L?fL:dL;w[A]>k[A]&&(T=rO(T));var I=rO(T),R=[];if(i&&R.push(M[P]<=0),s&&R.push(M[T]<=0,M[I]<=0),R.every((function(e){return e}))){C=E,S=!1;break}x.set(E,R)}if(S)for(var N=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=p?3:1;D>0;D--){if("break"===N(D))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function yO(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 bO(e){return[dL,hL,fL,pL].some((function(t){return e[t]>=0}))}var wO={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=vO(t,{elementContext:"reference"}),s=vO(t,{altBoundary:!0}),l=yO(a,r),u=yO(s,o,i),c=bO(l),d=bO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var kO={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=xL.reduce((function(e,n){return e[n]=function(e,t,n){var r=AL(e),o=[pL,dL].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,[pL,hL].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var xO={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=pO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var SO={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,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=void 0===f||f,p=n.tetherOffset,v=void 0===p?0:p,g=vO(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),m=AL(t.placement),y=$L(t.placement),b=!y,w=GL(m),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,_="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,E="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(x){if(i){var O,A="y"===w?dL:pL,M="y"===w?fL:hL,T="y"===w?"height":"width",I=x[w],R=I+g[A],N=I-g[M],D=h?-C[T]/2:0,z=y===mL?S[T]:C[T],j=y===mL?-C[T]:-S[T],B=t.elements.arrow,F=h&&B?zL(B):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=H[A],W=H[M],U=qL(0,S[T],F[T]),G=b?S[T]/2-D-U-V-E.mainAxis:z-U-V-E.mainAxis,q=b?-S[T]/2+D+U+W+E.mainAxis:j+U+W+E.mainAxis,Y=t.elements.arrow&&UL(t.elements.arrow),Z=Y?"y"===w?Y.clientTop||0:Y.clientLeft||0:0,X=null!=(O=null==P?void 0:P[w])?O:0,$=I+q-X,K=qL(h?TL(R,I+G-X-Z):R,I,h?ML(N,$):N);x[w]=K,L[w]=K-I}if(s){var Q,J="x"===w?dL:pL,ee="x"===w?fL:hL,te=x[k],ne="y"===k?"height":"width",re=te+g[J],oe=te-g[ee],ie=-1!==[dL,pL].indexOf(m),ae=null!=(Q=null==P?void 0:P[k])?Q:0,se=ie?re:te-S[ne]-C[ne]-ae+E.altAxis,le=ie?te+S[ne]+C[ne]-ae-E.altAxis:oe,ue=h&&ie?function(e,t,n){var r=qL(e,t,n);return r>n?n:r}(se,te,le):qL(h?se:re,te,h?le:oe);x[k]=ue,L[k]=ue-te}t.modifiersData[r]=L}},requiresIfExists:["offset"]};function CO(e,t,n){void 0===n&&(n=!1);var r=PL(t),o=PL(t)&&function(e){var t=e.getBoundingClientRect(),n=IL(t.width)/e.offsetWidth||1,r=IL(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=HL(t),a=DL(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==CL(t)||lO(i))&&(s=function(e){return e!==_L(e)&&PL(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:aO(e);var t}(t)),PL(t)?((l=DL(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=sO(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function _O(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 EO(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var PO={placement:"bottom",modifiers:[],strategy:"absolute"};function LO(){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 OO(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?PO:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},PO,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;u(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:EL(e)?cO(e):e.contextElement?cO(e.contextElement):[],popper:cO(t)};var c,d,f=function(e){var t=_O(e);return SL.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((c=[].concat(r,o.options.modifiers),d=c.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}),{}),Object.keys(d).map((function(e){return d[e]}))));return o.orderedModifiers=f.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}),u=function(){};a.push(s||u)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(LO(t,n)){o.rects={reference:CO(t,UL(n),"fixed"===o.options.strategy),popper:zL(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,u=i.options,c=void 0===u?{}:u,d=i.name;"function"==typeof a&&(o=a({state:o,options:c,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:EO((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){u(),s=!0}};if(!LO(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var AO=OO({defaultModifiers:[tO,xO,JL,OL,kO,mO,SO,XL,wO]}),MO=function(e,t){return{var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}},TO={arrowShadowColor:MO("--popper-arrow-shadow-color"),arrowSize:MO("--popper-arrow-size","8px"),arrowSizeHalf:MO("--popper-arrow-size-half"),arrowBg:MO("--popper-arrow-bg"),transformOrigin:MO("--popper-transform-origin"),arrowOffset:MO("--popper-arrow-offset")};var IO={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},RO={scroll:!0,resize:!0};function NO(e){return"object"===kn(e)?{enabled:!0,options:un(un({},RO),e)}:{enabled:e,options:RO}}var DO={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state;return function(){var e=t.elements.reference;t.elements.popper.style.width="".concat(e.offsetWidth,"px")}}},zO={name:"transformOrigin",enabled:!0,phase:"write",fn:function(e){var t=e.state;jO(t)},effect:function(e){var t=e.state;return function(){jO(t)}}},jO=function(e){var t;e.elements.popper.style.setProperty(TO.transformOrigin.var,(t=e.placement,IO[t]))},BO={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;FO(t)}},FO=function(e){var t;if(e.placement){var n=HO(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){var r,o;Object.assign(e.elements.arrow.style,(gn(r={},n.property,n.value),gn(r,"width",TO.arrowSize.varRef),gn(r,"height",TO.arrowSize.varRef),gn(r,"zIndex",-1),r));var i=(gn(o={},TO.arrowSizeHalf.var,"calc(".concat(TO.arrowSize.varRef," / 2)")),gn(o,TO.arrowOffset.var,"calc(".concat(TO.arrowSizeHalf.varRef," * -1)")),o);for(var a in i)e.elements.arrow.style.setProperty(a,i[a])}}},HO=function(e){return e.startsWith("top")?{property:"bottom",value:TO.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:TO.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:TO.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:TO.arrowOffset.varRef}:void 0},VO={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:function(e){var t=e.state;WO(t)},effect:function(e){var t=e.state;return function(){WO(t)}}},WO=function(e){if(e.elements.arrow){var t,n=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(n)Object.assign(n.style,{transform:"rotate(45deg)",background:TO.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:(t=e.placement,t.includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":t.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":t.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":t.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0)})}},UO={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},GO={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function qO(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr",o=(null==(n=UO[e])?void 0:n[r])||e;return"ltr"===r?o:null!==(t=GO[e])&&void 0!==t?t:o}function YO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,r=e.modifiers,o=e.placement,i=void 0===o?"bottom":o,a=e.strategy,s=void 0===a?"absolute":a,l=e.arrowPadding,u=void 0===l?8:l,c=e.eventListeners,d=void 0===c||c,f=e.offset,h=e.gutter,p=void 0===h?8:h,v=e.flip,g=void 0===v||v,m=e.boundary,y=void 0===m?"clippingParents":m,b=e.preventOverflow,w=void 0===b||b,k=e.matchWidth,x=e.direction,S=void 0===x?"ltr":x,C=cr.useRef(null),_=cr.useRef(null),E=cr.useRef(null),P=qO(i,S),L=cr.useRef((function(){})),O=cr.useCallback((function(){var e;n&&C.current&&_.current&&(null==(e=L.current)||e.call(L),E.current=AO(C.current,_.current,{placement:P,modifiers:[VO,BO,zO,un(un({},DO),{},{enabled:!!k}),un({name:"eventListeners"},NO(d)),{name:"arrow",options:{padding:u}},{name:"offset",options:{offset:null!=f?f:[0,p]}},{name:"flip",enabled:!!g,options:{padding:8}},{name:"preventOverflow",enabled:!!w,options:{boundary:y}}].concat(cn(null!=r?r:[])),strategy:s}),E.current.forceUpdate(),L.current=E.current.destroy)}),[P,n,r,k,d,u,f,p,g,w,y,s]);cr.useEffect((function(){return function(){var e;C.current||_.current||(null==(e=E.current)||e.destroy(),E.current=null)}}),[]);var A=cr.useCallback((function(e){C.current=e,O()}),[O]),M=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(A,t)})}),[A]),T=cr.useCallback((function(e){_.current=e,O()}),[O]),I=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(T,t),style:un(un({},e.style),{},{position:s,minWidth:k?void 0:"max-content",inset:"0 auto auto 0"})})}),[s,T,k]),R=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(e.size,e.shadowColor,e.bg,e.style,sn(e,xe));return un(un({},n),{},{ref:t,"data-popper-arrow":"",style:ZO(e)})}),[]),N=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,"data-popper-arrow-inner":""})}),[]);return{update:function(){var e;null==(e=E.current)||e.update()},forceUpdate:function(){var e;null==(e=E.current)||e.forceUpdate()},transformOrigin:TO.transformOrigin.varRef,referenceRef:A,popperRef:T,getPopperProps:I,getArrowProps:R,getArrowInnerProps:N,getReferenceProps:M}}function ZO(e){var t=e.size,n=e.shadowColor,r=e.bg,o=un(un({},e.style),{},{position:"absolute"});return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function XO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,n=e.onOpen,r=e.isOpen,o=e.id,i=Yv(n),a=Yv(t),s=cr.useState(e.defaultIsOpen||!1),l=yn(s,2),u=l[0],c=l[1],d=void 0!==r?r:u,f=void 0!==r,h=cr.useId(),p=null!=o?o:"disclosure-".concat(h),v=cr.useCallback((function(){f||c(!1),null==a||a()}),[f,a]),g=cr.useCallback((function(){f||c(!0),null==i||i()}),[f,i]),m=cr.useCallback((function(){d?v():g()}),[d,g,v]);function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(un({},e),{},{"aria-expanded":d,"aria-controls":p,onClick:function(t){var n;null==(n=e.onClick)||n.call(e,t),m()}})}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(un({},e),{},{hidden:!d,id:p})}return{isOpen:d,onOpen:g,onClose:v,onToggle:m,isControlled:f,getButtonProps:y,getDisclosureProps:b}}function $O(e){var t=e.isOpen,n=e.ref,r=yn(cr.useState(t),2),o=r[0],i=r[1],a=yn(cr.useState(!1),2),s=a[0],l=a[1];return cr.useEffect((function(){s||(i(t),l(!0))}),[t,s,o]),DE((function(){return n.current}),"animationend",(function(){i(t)})),{present:!(!t&&!o),onComplete:function(){var e,t=function(e){var t,n;return null!==(t=null==(n=JP(e))?void 0:n.defaultView)&&void 0!==t?t:window}(n.current),r=new t.CustomEvent("animationend",{bubbles:!0});null==(e=n.current)||e.dispatchEvent(r)}}}function KO(e){var t=e.wasSelected,n=e.enabled,r=e.isSelected,o=e.mode;return!n||(!!r||!("keepMounted"!==(void 0===o?"unmount":o)||!t))}var QO={},JO={get exports(){return QO},set exports(e){QO=e}},eA={},tA={},nA={get exports(){return tA},set exports(e){tA=e}},rA={};
|
||
/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===("undefined"==typeof performance?"undefined":kn(performance))&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,v=!1,g="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function w(e){if(v=!1,b(e),!p)if(null!==n(l))p=!0,T(k);else{var t=n(u);null!==t&&I(w,t.startTime-e)}}function k(t,o){p=!1,v&&(v=!1,m(_),_=-1),h=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!L());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&I(w,g.startTime-o),c=!1}return c}finally{d=null,f=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,C=null,_=-1,E=5,P=-1;function L(){return!(e.unstable_now()-P<E)}function O(){if(null!==C){var t=e.unstable_now();P=t;var n=!0;try{n=C(!0,t)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof y)x=function(){y(O)};else if("undefined"!=typeof MessageChannel){var A=new MessageChannel,M=A.port2;A.port1.onmessage=O,x=function(){M.postMessage(null)}}else x=function(){g(O,0)};function T(e){C=e,S||(S=!0,x())}function I(t,n){_=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,T(k))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch("object"===kn(i)&&null!==i?i="number"==typeof(i=i.delay)&&0<i?a+i:a:i=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(v?(m(_),_=-1):v=!0,I(w,i-a))):(r.sortIndex=s,t(l,r),p||h||(p=!0,T(k))),r},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(rA),function(e){e.exports=rA}(nA);
|
||
/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
var oA=cr,iA=tA;function aA(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sA=new Set,lA={};function uA(e,t){cA(e,t),cA(e+"Capture",t)}function cA(e,t){for(lA[e]=t,e=0;e<t.length;e++)sA.add(t[e])}var dA=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),fA=Object.prototype.hasOwnProperty,hA=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pA={},vA={};function gA(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(kn(t)){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function mA(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var yA={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){yA[e]=new mA(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];yA[t]=new mA(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){yA[e]=new mA(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){yA[e]=new mA(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){yA[e]=new mA(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){yA[e]=new mA(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){yA[e]=new mA(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){yA[e]=new mA(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){yA[e]=new mA(e,5,!1,e.toLowerCase(),null,!1,!1)}));var bA=/[\-:]([a-z])/g;function wA(e){return e[1].toUpperCase()}function kA(e,t,n,r){var o=yA.hasOwnProperty(t)?yA[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(gA(t,n,o,r)&&(n=null),r||null===o?function(e){return!!fA.call(vA,e)||!fA.call(pA,e)&&(hA.test(e)?vA[e]=!0:(pA[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(bA,wA);yA[t]=new mA(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(bA,wA);yA[t]=new mA(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(bA,wA);yA[t]=new mA(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){yA[e]=new mA(e,1,!1,e.toLowerCase(),null,!1,!1)})),yA.xlinkHref=new mA("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){yA[e]=new mA(e,1,!1,e.toLowerCase(),null,!0,!0)}));var xA=oA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,SA=Symbol.for("react.element"),CA=Symbol.for("react.portal"),_A=Symbol.for("react.fragment"),EA=Symbol.for("react.strict_mode"),PA=Symbol.for("react.profiler"),LA=Symbol.for("react.provider"),OA=Symbol.for("react.context"),AA=Symbol.for("react.forward_ref"),MA=Symbol.for("react.suspense"),TA=Symbol.for("react.suspense_list"),IA=Symbol.for("react.memo"),RA=Symbol.for("react.lazy"),NA=Symbol.for("react.offscreen"),DA=Symbol.iterator;function zA(e){return null===e||"object"!==kn(e)?null:"function"==typeof(e=DA&&e[DA]||e["@@iterator"])?e:null}var jA,BA=Object.assign;function FA(e){if(void 0===jA)try{throw Error()}catch(qke){var t=qke.stack.trim().match(/\n( *(at )?)/);jA=t&&t[1]||""}return"\n"+jA+e}var HA=!1;function VA(e,t){if(!e||HA)return"";HA=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":kn(Reflect))&&Reflect.construct){try{Reflect.construct(t,[])}catch(hpe){var r=hpe}Reflect.construct(e,[],t)}else{try{t.call()}catch(hpe){r=hpe}e.call(t.prototype)}else{try{throw Error()}catch(hpe){r=hpe}e()}}catch(hpe){if(hpe&&r&&"string"==typeof hpe.stack){for(var o=hpe.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{HA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?FA(e):""}function WA(e){switch(e.tag){case 5:return FA(e.type);case 16:return FA("Lazy");case 13:return FA("Suspense");case 19:return FA("SuspenseList");case 0:case 2:case 15:return e=VA(e.type,!1);case 11:return e=VA(e.type.render,!1);case 1:return e=VA(e.type,!0);default:return""}}function UA(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _A:return"Fragment";case CA:return"Portal";case PA:return"Profiler";case EA:return"StrictMode";case MA:return"Suspense";case TA:return"SuspenseList"}if("object"===kn(e))switch(e.$$typeof){case OA:return(e.displayName||"Context")+".Consumer";case LA:return(e._context.displayName||"Context")+".Provider";case AA:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case IA:return null!==(t=e.displayName||null)?t:UA(e.type)||"Memo";case RA:t=e._payload,e=e._init;try{return UA(e(t))}catch(qke){}}return null}function GA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return UA(t);case 8:return t===EA?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function qA(e){switch(kn(e)){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function YA(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ZA(e){e._valueTracker||(e._valueTracker=function(e){var t=YA(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function XA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YA(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $A(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(nxe){return e.body}}function KA(e,t){var n=t.checked;return BA({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function QA(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=qA(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function JA(e,t){null!=(t=t.checked)&&kA(e,"checked",t,!1)}function eM(e,t){JA(e,t);var n=qA(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?nM(e,t.type,n):t.hasOwnProperty("defaultValue")&&nM(e,t.type,qA(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function tM(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function nM(e,t,n){"number"===t&&$A(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rM=Array.isArray;function oM(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qA(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function iM(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(aA(91));return BA({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function aM(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(aA(92));if(rM(n)){if(1<n.length)throw Error(aA(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:qA(n)}}function sM(e,t){var n=qA(t.value),r=qA(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function lM(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function uM(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function cM(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?uM(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var dM,fM=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((dM=dM||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=dM.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function hM(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pM={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vM=["Webkit","ms","Moz","O"];function gM(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pM.hasOwnProperty(e)&&pM[e]?(""+t).trim():t+"px"}function mM(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=gM(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pM).forEach((function(e){vM.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pM[t]=pM[e]}))}));var yM=BA({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bM(e,t){if(t){if(yM[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(aA(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(aA(60));if("object"!==kn(t.dangerouslySetInnerHTML)||!("__html"in t.dangerouslySetInnerHTML))throw Error(aA(61))}if(null!=t.style&&"object"!==kn(t.style))throw Error(aA(62))}}function wM(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kM=null;function xM(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var SM=null,CM=null,_M=null;function EM(e){if(e=bN(e)){if("function"!=typeof SM)throw Error(aA(280));var t=e.stateNode;t&&(t=kN(t),SM(e.stateNode,e.type,t))}}function PM(e){CM?_M?_M.push(e):_M=[e]:CM=e}function LM(){if(CM){var e=CM,t=_M;if(_M=CM=null,EM(e),t)for(e=0;e<t.length;e++)EM(t[e])}}function OM(e,t){return e(t)}function AM(){}var MM=!1;function TM(e,t,n){if(MM)return e(t,n);MM=!0;try{return OM(e,t,n)}finally{MM=!1,(null!==CM||null!==_M)&&(AM(),LM())}}function IM(e,t){var n=e.stateNode;if(null===n)return null;var r=kN(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(aA(231,t,kn(n)));return n}var RM=!1;if(dA)try{var NM={};Object.defineProperty(NM,"passive",{get:function(){RM=!0}}),window.addEventListener("test",NM,NM),window.removeEventListener("test",NM,NM)}catch(wpe){RM=!1}function DM(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(Jke){this.onError(Jke)}}var zM=!1,jM=null,BM=!1,FM=null,HM={onError:function(e){zM=!0,jM=e}};function VM(e,t,n,r,o,i,a,s,l){zM=!1,jM=null,DM.apply(HM,arguments)}function WM(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function UM(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function GM(e){if(WM(e)!==e)throw Error(aA(188))}function qM(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=WM(e)))throw Error(aA(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return GM(o),e;if(i===r)return GM(o),t;i=i.sibling}throw Error(aA(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(aA(189))}}if(n.alternate!==r)throw Error(aA(190))}if(3!==n.tag)throw Error(aA(188));return n.stateNode.current===n?e:t}(e),null!==e?YM(e):null}function YM(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=YM(e);if(null!==t)return t;e=e.sibling}return null}var ZM=iA.unstable_scheduleCallback,XM=iA.unstable_cancelCallback,$M=iA.unstable_shouldYield,KM=iA.unstable_requestPaint,QM=iA.unstable_now,JM=iA.unstable_getCurrentPriorityLevel,eT=iA.unstable_ImmediatePriority,tT=iA.unstable_UserBlockingPriority,nT=iA.unstable_NormalPriority,rT=iA.unstable_LowPriority,oT=iA.unstable_IdlePriority,iT=null,aT=null;var sT=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lT(e)/uT|0)|0},lT=Math.log,uT=Math.LN2;var cT=64,dT=4194304;function fT(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hT(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=fT(s):0!==(i&=a)&&(r=fT(i))}else 0!==(a=n&~o)?r=fT(a):0!==i&&(r=fT(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-sT(t)),r|=e[n],t&=~o;return r}function pT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function vT(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gT(){var e=cT;return 0==(4194240&(cT<<=1))&&(cT=64),e}function mT(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yT(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-sT(t)]=n}function bT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-sT(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var wT=0;function kT(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var xT,ST,CT,_T,ET,PT=!1,LT=[],OT=null,AT=null,MT=null,TT=new Map,IT=new Map,RT=[],NT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function DT(e,t){switch(e){case"focusin":case"focusout":OT=null;break;case"dragenter":case"dragleave":AT=null;break;case"mouseover":case"mouseout":MT=null;break;case"pointerover":case"pointerout":TT.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":IT.delete(t.pointerId)}}function zT(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=bN(t))&&ST(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function jT(e){var t=yN(e.target);if(null!==t){var n=WM(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=UM(n)))return e.blockedOn=t,void ET(e.priority,(function(){CT(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function BT(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$T(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bN(n))&&ST(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);kM=r,n.target.dispatchEvent(r),kM=null,t.shift()}return!0}function FT(e,t,n){BT(e)&&n.delete(t)}function HT(){PT=!1,null!==OT&&BT(OT)&&(OT=null),null!==AT&&BT(AT)&&(AT=null),null!==MT&&BT(MT)&&(MT=null),TT.forEach(FT),IT.forEach(FT)}function VT(e,t){e.blockedOn===t&&(e.blockedOn=null,PT||(PT=!0,iA.unstable_scheduleCallback(iA.unstable_NormalPriority,HT)))}function WT(e){function t(t){return VT(t,e)}if(0<LT.length){VT(LT[0],e);for(var n=1;n<LT.length;n++){var r=LT[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==OT&&VT(OT,e),null!==AT&&VT(AT,e),null!==MT&&VT(MT,e),TT.forEach(t),IT.forEach(t),n=0;n<RT.length;n++)(r=RT[n]).blockedOn===e&&(r.blockedOn=null);for(;0<RT.length&&null===(n=RT[0]).blockedOn;)jT(n),null===n.blockedOn&&RT.shift()}var UT=xA.ReactCurrentBatchConfig,GT=!0;function qT(e,t,n,r){var o=wT,i=UT.transition;UT.transition=null;try{wT=1,ZT(e,t,n,r)}finally{wT=o,UT.transition=i}}function YT(e,t,n,r){var o=wT,i=UT.transition;UT.transition=null;try{wT=4,ZT(e,t,n,r)}finally{wT=o,UT.transition=i}}function ZT(e,t,n,r){if(GT){var o=$T(e,t,n,r);if(null===o)UR(e,t,r,XT,n),DT(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return OT=zT(OT,e,t,n,r,o),!0;case"dragenter":return AT=zT(AT,e,t,n,r,o),!0;case"mouseover":return MT=zT(MT,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return TT.set(i,zT(TT.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,IT.set(i,zT(IT.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(DT(e,r),4&t&&-1<NT.indexOf(e)){for(;null!==o;){var i=bN(o);if(null!==i&&xT(i),null===(i=$T(e,t,n,r))&&UR(e,t,r,XT,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else UR(e,t,r,null,n)}}var XT=null;function $T(e,t,n,r){if(XT=null,null!==(e=yN(e=xM(r))))if(null===(t=WM(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=UM(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return XT=e,null}function KT(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(JM()){case eT:return 1;case tT:return 4;case nT:case rT:return 16;case oT:return 536870912;default:return 16}default:return 16}}var QT=null,JT=null,eI=null;function tI(){if(eI)return eI;var e,t,n=JT,r=n.length,o="value"in QT?QT.value:QT.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return eI=o.slice(e,1<t?1-t:void 0)}function nI(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rI(){return!0}function oI(){return!1}function iI(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?rI:oI,this.isPropagationStopped=oI,this}return BA(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rI)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rI)},persist:function(){},isPersistent:rI}),t}var aI,sI,lI,uI={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cI=iI(uI),dI=BA({},uI,{view:0,detail:0}),fI=iI(dI),hI=BA({},dI,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_I,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==lI&&(lI&&"mousemove"===e.type?(aI=e.screenX-lI.screenX,sI=e.screenY-lI.screenY):sI=aI=0,lI=e),aI)},movementY:function(e){return"movementY"in e?e.movementY:sI}}),pI=iI(hI),vI=iI(BA({},hI,{dataTransfer:0})),gI=iI(BA({},dI,{relatedTarget:0})),mI=iI(BA({},uI,{animationName:0,elapsedTime:0,pseudoElement:0})),yI=BA({},uI,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bI=iI(yI),wI=iI(BA({},uI,{data:0})),kI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xI={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},SI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CI(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=SI[e])&&!!t[e]}function _I(){return CI}var EI=BA({},dI,{key:function(e){if(e.key){var t=kI[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nI(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xI[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_I,charCode:function(e){return"keypress"===e.type?nI(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nI(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),PI=iI(EI),LI=iI(BA({},hI,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),OI=iI(BA({},dI,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_I})),AI=iI(BA({},uI,{propertyName:0,elapsedTime:0,pseudoElement:0})),MI=BA({},hI,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),TI=iI(MI),II=[9,13,27,32],RI=dA&&"CompositionEvent"in window,NI=null;dA&&"documentMode"in document&&(NI=document.documentMode);var DI=dA&&"TextEvent"in window&&!NI,zI=dA&&(!RI||NI&&8<NI&&11>=NI),jI=String.fromCharCode(32),BI=!1;function FI(e,t){switch(e){case"keyup":return-1!==II.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HI(e){return"object"===kn(e=e.detail)&&"data"in e?e.data:null}var VI=!1;var WI={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function UI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!WI[e.type]:"textarea"===t}function GI(e,t,n,r){PM(r),0<(t=qR(t,"onChange")).length&&(n=new cI("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qI=null,YI=null;function ZI(e){jR(e,0)}function XI(e){if(XA(wN(e)))return e}function $I(e,t){if("change"===e)return t}var KI=!1;if(dA){var QI;if(dA){var JI="oninput"in document;if(!JI){var eR=document.createElement("div");eR.setAttribute("oninput","return;"),JI="function"==typeof eR.oninput}QI=JI}else QI=!1;KI=QI&&(!document.documentMode||9<document.documentMode)}function tR(){qI&&(qI.detachEvent("onpropertychange",nR),YI=qI=null)}function nR(e){if("value"===e.propertyName&&XI(YI)){var t=[];GI(t,YI,e,xM(e)),TM(ZI,t)}}function rR(e,t,n){"focusin"===e?(tR(),YI=n,(qI=t).attachEvent("onpropertychange",nR)):"focusout"===e&&tR()}function oR(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return XI(YI)}function iR(e,t){if("click"===e)return XI(t)}function aR(e,t){if("input"===e||"change"===e)return XI(t)}var sR="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lR(e,t){if(sR(e,t))return!0;if("object"!==kn(e)||null===e||"object"!==kn(t)||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!fA.call(t,o)||!sR(e[o],t[o]))return!1}return!0}function uR(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cR(e,t){var n,r=uR(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=uR(r)}}function dR(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dR(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fR(){for(var e=window,t=$A();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(Kke){n=!1}if(!n)break;t=$A((e=t.contentWindow).document)}return t}function hR(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pR(e){var t=fR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dR(n.ownerDocument.documentElement,n)){if(null!==r&&hR(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cR(n,i);var a=cR(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vR=dA&&"documentMode"in document&&11>=document.documentMode,gR=null,mR=null,yR=null,bR=!1;function wR(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;bR||null==gR||gR!==$A(r)||("selectionStart"in(r=gR)&&hR(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yR&&lR(yR,r)||(yR=r,0<(r=qR(mR,"onSelect")).length&&(t=new cI("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gR)))}function kR(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xR={animationend:kR("Animation","AnimationEnd"),animationiteration:kR("Animation","AnimationIteration"),animationstart:kR("Animation","AnimationStart"),transitionend:kR("Transition","TransitionEnd")},SR={},CR={};function _R(e){if(SR[e])return SR[e];if(!xR[e])return e;var t,n=xR[e];for(t in n)if(n.hasOwnProperty(t)&&t in CR)return SR[e]=n[t];return e}dA&&(CR=document.createElement("div").style,"AnimationEvent"in window||(delete xR.animationend.animation,delete xR.animationiteration.animation,delete xR.animationstart.animation),"TransitionEvent"in window||delete xR.transitionend.transition);var ER=_R("animationend"),PR=_R("animationiteration"),LR=_R("animationstart"),OR=_R("transitionend"),AR=new Map,MR="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function TR(e,t){AR.set(e,t),uA(t,[e])}for(var IR=0;IR<MR.length;IR++){var RR=MR[IR];TR(RR.toLowerCase(),"on"+(RR[0].toUpperCase()+RR.slice(1)))}TR(ER,"onAnimationEnd"),TR(PR,"onAnimationIteration"),TR(LR,"onAnimationStart"),TR("dblclick","onDoubleClick"),TR("focusin","onFocus"),TR("focusout","onBlur"),TR(OR,"onTransitionEnd"),cA("onMouseEnter",["mouseout","mouseover"]),cA("onMouseLeave",["mouseout","mouseover"]),cA("onPointerEnter",["pointerout","pointerover"]),cA("onPointerLeave",["pointerout","pointerover"]),uA("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),uA("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),uA("onBeforeInput",["compositionend","keypress","textInput","paste"]),uA("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),uA("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),uA("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var NR="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DR=new Set("cancel close invalid load scroll toggle".split(" ").concat(NR));function zR(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,a,s,l){if(VM.apply(this,arguments),zM){if(!zM)throw Error(aA(198));var u=jM;zM=!1,jM=null,BM||(BM=!0,FM=u)}}(r,t,void 0,e),e.currentTarget=null}function jR(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;zR(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;zR(o,s,u),i=l}}}if(BM)throw e=FM,BM=!1,FM=null,e}function BR(e,t){var n=t[vN];void 0===n&&(n=t[vN]=new Set);var r=e+"__bubble";n.has(r)||(WR(t,e,2,!1),n.add(r))}function FR(e,t,n){var r=0;t&&(r|=4),WR(n,e,r,t)}var HR="_reactListening"+Math.random().toString(36).slice(2);function VR(e){if(!e[HR]){e[HR]=!0,sA.forEach((function(t){"selectionchange"!==t&&(DR.has(t)||FR(t,!1,e),FR(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[HR]||(t[HR]=!0,FR("selectionchange",!1,t))}}function WR(e,t,n,r){switch(KT(t)){case 1:var o=qT;break;case 4:o=YT;break;default:o=ZT}n=o.bind(null,t,n,e),o=void 0,!RM||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function UR(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=yN(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}TM((function(){var r=i,o=xM(n),a=[];e:{var s=AR.get(e);if(void 0!==s){var l=cI,u=e;switch(e){case"keypress":if(0===nI(n))break e;case"keydown":case"keyup":l=PI;break;case"focusin":u="focus",l=gI;break;case"focusout":u="blur",l=gI;break;case"beforeblur":case"afterblur":l=gI;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=OI;break;case ER:case PR:case LR:l=mI;break;case OR:l=AI;break;case"scroll":l=fI;break;case"wheel":l=TI;break;case"copy":case"cut":case"paste":l=bI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=LI}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var v=(h=p).stateNode;if(5===h.tag&&null!==v&&(h=v,null!==f&&(null!=(v=IM(p,f))&&c.push(GR(p,v,h)))),d)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===kM||!(u=n.relatedTarget||n.fromElement)||!yN(u)&&!u[pN])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?yN(u):null)&&(u!==(d=WM(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=pI,v="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=LI,v="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:wN(l),h=null==u?s:wN(u),(s=new c(v,p+"leave",l,n,o)).target=d,s.relatedTarget=h,v=null,yN(o)===r&&((c=new c(f,p+"enter",u,n,o)).target=h,c.relatedTarget=d,v=c),d=v,l&&u)e:{for(f=u,p=0,h=c=l;h;h=YR(h))p++;for(h=0,v=f;v;v=YR(v))h++;for(;0<p-h;)c=YR(c),p--;for(;0<h-p;)f=YR(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=YR(c),f=YR(f)}c=null}else c=null;null!==l&&ZR(a,s,l,c,!1),null!==u&&null!==d&&ZR(a,d,u,c,!0)}if("select"===(l=(s=r?wN(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=$I;else if(UI(s))if(KI)g=aR;else{g=oR;var m=rR}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=iR);switch(g&&(g=g(e,r))?GI(a,g,n,o):(m&&m(e,s,r),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&nM(s,"number",s.value)),m=r?wN(r):window,e){case"focusin":(UI(m)||"true"===m.contentEditable)&&(gR=m,mR=r,yR=null);break;case"focusout":yR=mR=gR=null;break;case"mousedown":bR=!0;break;case"contextmenu":case"mouseup":case"dragend":bR=!1,wR(a,n,o);break;case"selectionchange":if(vR)break;case"keydown":case"keyup":wR(a,n,o)}var y;if(RI)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else VI?FI(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zI&&"ko"!==n.locale&&(VI||"onCompositionStart"!==b?"onCompositionEnd"===b&&VI&&(y=tI()):(JT="value"in(QT=o)?QT.value:QT.textContent,VI=!0)),0<(m=qR(r,b)).length&&(b=new wI(b,e,null,n,o),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=HI(n))&&(b.data=y))),(y=DI?function(e,t){switch(e){case"compositionend":return HI(t);case"keypress":return 32!==t.which?null:(BI=!0,jI);case"textInput":return(e=t.data)===jI&&BI?null:e;default:return null}}(e,n):function(e,t){if(VI)return"compositionend"===e||!RI&&FI(e,t)?(e=tI(),eI=JT=QT=null,VI=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zI&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qR(r,"onBeforeInput")).length&&(o=new wI("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}jR(a,t)}))}function GR(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qR(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=IM(e,n))&&r.unshift(GR(e,i,o)),null!=(i=IM(e,t))&&r.push(GR(e,i,o))),e=e.return}return r}function YR(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function ZR(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=IM(n,i))&&a.unshift(GR(n,l,s)):o||null!=(l=IM(n,i))&&a.push(GR(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var XR=/\r\n?/g,$R=/\u0000|\uFFFD/g;function KR(e){return("string"==typeof e?e:""+e).replace(XR,"\n").replace($R,"")}function QR(e,t,n){if(t=KR(t),KR(e)!==t&&n)throw Error(aA(425))}function JR(){}var eN=null,tN=null;function nN(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"===kn(t.dangerouslySetInnerHTML)&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var rN="function"==typeof setTimeout?setTimeout:void 0,oN="function"==typeof clearTimeout?clearTimeout:void 0,iN="function"==typeof Promise?Promise:void 0,aN="function"==typeof queueMicrotask?queueMicrotask:void 0!==iN?function(e){return iN.resolve(null).then(e).catch(sN)}:rN;function sN(e){setTimeout((function(){throw e}))}function lN(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void WT(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);WT(t)}function uN(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function cN(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dN=Math.random().toString(36).slice(2),fN="__reactFiber$"+dN,hN="__reactProps$"+dN,pN="__reactContainer$"+dN,vN="__reactEvents$"+dN,gN="__reactListeners$"+dN,mN="__reactHandles$"+dN;function yN(e){var t=e[fN];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pN]||n[fN]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cN(e);null!==e;){if(n=e[fN])return n;e=cN(e)}return t}n=(e=n).parentNode}return null}function bN(e){return!(e=e[fN]||e[pN])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wN(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(aA(33))}function kN(e){return e[hN]||null}var xN=[],SN=-1;function CN(e){return{current:e}}function _N(e){0>SN||(e.current=xN[SN],xN[SN]=null,SN--)}function EN(e,t){SN++,xN[SN]=e.current,e.current=t}var PN={},LN=CN(PN),ON=CN(!1),AN=PN;function MN(e,t){var n=e.type.contextTypes;if(!n)return PN;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function TN(e){return null!=(e=e.childContextTypes)}function IN(){_N(ON),_N(LN)}function RN(e,t,n){if(LN.current!==PN)throw Error(aA(168));EN(LN,t),EN(ON,n)}function NN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(aA(108,GA(e)||"Unknown",o));return BA({},n,r)}function DN(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||PN,AN=LN.current,EN(LN,e),EN(ON,ON.current),!0}function zN(e,t,n){var r=e.stateNode;if(!r)throw Error(aA(169));n?(e=NN(e,t,AN),r.__reactInternalMemoizedMergedChildContext=e,_N(ON),_N(LN),EN(LN,e)):_N(ON),EN(ON,n)}var jN=null,BN=!1,FN=!1;function HN(e){null===jN?jN=[e]:jN.push(e)}function VN(){if(!FN&&null!==jN){FN=!0;var e=0,t=wT;try{var n=jN;for(wT=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}jN=null,BN=!1}catch(Dhe){throw null!==jN&&(jN=jN.slice(e+1)),ZM(eT,VN),Dhe}finally{wT=t,FN=!1}}return null}var WN=[],UN=0,GN=null,qN=0,YN=[],ZN=0,XN=null,$N=1,KN="";function QN(e,t){WN[UN++]=qN,WN[UN++]=GN,GN=e,qN=t}function JN(e,t,n){YN[ZN++]=$N,YN[ZN++]=KN,YN[ZN++]=XN,XN=e;var r=$N;e=KN;var o=32-sT(r)-1;r&=~(1<<o),n+=1;var i=32-sT(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,$N=1<<32-sT(t)+o|n<<o|r,KN=i+e}else $N=1<<i|n<<o|r,KN=e}function eD(e){null!==e.return&&(QN(e,1),JN(e,1,0))}function tD(e){for(;e===GN;)GN=WN[--UN],WN[UN]=null,qN=WN[--UN],WN[UN]=null;for(;e===XN;)XN=YN[--ZN],YN[ZN]=null,KN=YN[--ZN],YN[ZN]=null,$N=YN[--ZN],YN[ZN]=null}var nD=null,rD=null,oD=!1,iD=null;function aD(e,t){var n=AF(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sD(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,nD=e,rD=uN(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,nD=e,rD=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==XN?{id:$N,overflow:KN}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=AF(18,null,null,0)).stateNode=t,n.return=e,e.child=n,nD=e,rD=null,!0);default:return!1}}function lD(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function uD(e){if(oD){var t=rD;if(t){var n=t;if(!sD(e,t)){if(lD(e))throw Error(aA(418));t=uN(n.nextSibling);var r=nD;t&&sD(e,t)?aD(r,n):(e.flags=-4097&e.flags|2,oD=!1,nD=e)}}else{if(lD(e))throw Error(aA(418));e.flags=-4097&e.flags|2,oD=!1,nD=e}}}function cD(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;nD=e}function dD(e){if(e!==nD)return!1;if(!oD)return cD(e),oD=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nN(e.type,e.memoizedProps)),t&&(t=rD)){if(lD(e))throw fD(),Error(aA(418));for(;t;)aD(e,t),t=uN(t.nextSibling)}if(cD(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(aA(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){rD=uN(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}rD=null}}else rD=nD?uN(e.stateNode.nextSibling):null;return!0}function fD(){for(var e=rD;e;)e=uN(e.nextSibling)}function hD(){rD=nD=null,oD=!1}function pD(e){null===iD?iD=[e]:iD.push(e)}var vD=xA.ReactCurrentBatchConfig;function gD(e,t){if(e&&e.defaultProps){for(var n in t=BA({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var mD=CN(null),yD=null,bD=null,wD=null;function kD(){wD=bD=yD=null}function xD(e){var t=mD.current;_N(mD),e._currentValue=t}function SD(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function CD(e,t){yD=e,wD=bD=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(bj=!0),e.firstContext=null)}function _D(e){var t=e._currentValue;if(wD!==e)if(e={context:e,memoizedValue:t,next:null},null===bD){if(null===yD)throw Error(aA(308));bD=e,yD.dependencies={lanes:0,firstContext:e}}else bD=bD.next=e;return t}var ED=null;function PD(e){null===ED?ED=[e]:ED.push(e)}function LD(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,PD(t)):(n.next=o.next,o.next=n),t.interleaved=n,OD(e,r)}function OD(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var AD=!1;function MD(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function TD(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ID(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function RD(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&PB)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,OD(e,n)}return null===(o=r.interleaved)?(t.next=t,PD(r)):(t.next=o.next,o.next=t),r.interleaved=t,OD(e,n)}function ND(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bT(e,n)}}function DD(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function zD(e,t,n,r){var o=e.updateQueue;AD=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;switch(f=t,h=n,v.tag){case 1:if("function"==typeof(p=v.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=v.payload)?p.call(h,d,f):p))break e;d=BA({},d,f);break e;case 2:AD=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=h,l=d):c=c.next=h,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);NB|=a,e.lanes=a,e.memoizedState=d}}function jD(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(aA(191,o));o.call(r)}}}var BD=(new oA.Component).refs;function FD(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:BA({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var HD={isMounted:function(e){return!!(e=e._reactInternals)&&WM(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=JB(),o=eF(e),i=ID(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=RD(e,i,o))&&(tF(t,e,o,r),ND(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=JB(),o=eF(e),i=ID(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=RD(e,i,o))&&(tF(t,e,o,r),ND(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=JB(),r=eF(e),o=ID(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=RD(e,o,r))&&(tF(t,e,r,n),ND(t,e,r))}};function VD(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!lR(n,r)||!lR(o,i))}function WD(e,t,n){var r=!1,o=PN,i=t.contextType;return"object"===kn(i)&&null!==i?i=_D(i):(o=TN(t)?AN:LN.current,i=(r=null!=(r=t.contextTypes))?MN(e,o):PN),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=HD,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function UD(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&HD.enqueueReplaceState(t,t.state,null)}function GD(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=BD,MD(e);var i=t.contextType;"object"===kn(i)&&null!==i?o.context=_D(i):(i=TN(t)?AN:LN.current,o.context=MN(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(FD(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&HD.enqueueReplaceState(o,o.state,null),zD(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function qD(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!==kn(e)){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(aA(309));var r=n.stateNode}if(!r)throw Error(aA(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===BD&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(aA(284));if(!n._owner)throw Error(aA(290,e))}return e}function YD(e,t){throw e=Object.prototype.toString.call(t),Error(aA(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZD(e){return(0,e._init)(e._payload)}function XD(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=TF(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=DF(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===_A?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===kn(i)&&null!==i&&i.$$typeof===RA&&ZD(i)===t.type)?((r=o(t,n.props)).ref=qD(e,t,n),r.return=e,r):((r=IF(n.type,n.key,n.props,null,e.mode,r)).ref=qD(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zF(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,i){return null===t||7!==t.tag?((t=RF(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=DF(""+t,e.mode,n)).return=e,t;if("object"===kn(t)&&null!==t){switch(t.$$typeof){case SA:return(n=IF(t.type,t.key,t.props,null,e.mode,n)).ref=qD(e,null,t),n.return=e,n;case CA:return(t=zF(t,e.mode,n)).return=e,t;case RA:return d(e,(0,t._init)(t._payload),n)}if(rM(t)||zA(t))return(t=RF(t,e.mode,n,null)).return=e,t;YD(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"===kn(n)&&null!==n){switch(n.$$typeof){case SA:return n.key===o?l(e,t,n,r):null;case CA:return n.key===o?u(e,t,n,r):null;case RA:return f(e,t,(o=n._init)(n._payload),r)}if(rM(n)||zA(n))return null!==o?null:c(e,t,n,r,null);YD(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"===kn(r)&&null!==r){switch(r.$$typeof){case SA:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case CA:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case RA:return h(e,t,n,(0,r._init)(r._payload),o)}if(rM(r)||zA(r))return c(t,e=e.get(n)||null,r,o,null);YD(t,r)}return null}function p(o,a,s,l){for(var u=null,c=null,p=a,v=a=0,g=null;null!==p&&v<s.length;v++){p.index>v?(g=p,p=null):g=p.sibling;var m=f(o,p,s[v],l);if(null===m){null===p&&(p=g);break}e&&p&&null===m.alternate&&t(o,p),a=i(m,a,v),null===c?u=m:c.sibling=m,c=m,p=g}if(v===s.length)return n(o,p),oD&&QN(o,v),u;if(null===p){for(;v<s.length;v++)null!==(p=d(o,s[v],l))&&(a=i(p,a,v),null===c?u=p:c.sibling=p,c=p);return oD&&QN(o,v),u}for(p=r(o,p);v<s.length;v++)null!==(g=h(p,o,v,s[v],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?v:g.key),a=i(g,a,v),null===c?u=g:c.sibling=g,c=g);return e&&p.forEach((function(e){return t(o,e)})),oD&&QN(o,v),u}function v(o,a,s,l){var u=zA(s);if("function"!=typeof u)throw Error(aA(150));if(null==(s=u.call(s)))throw Error(aA(151));for(var c=u=null,p=a,v=a=0,g=null,m=s.next();null!==p&&!m.done;v++,m=s.next()){p.index>v?(g=p,p=null):g=p.sibling;var y=f(o,p,m.value,l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),a=i(y,a,v),null===c?u=y:c.sibling=y,c=y,p=g}if(m.done)return n(o,p),oD&&QN(o,v),u;if(null===p){for(;!m.done;v++,m=s.next())null!==(m=d(o,m.value,l))&&(a=i(m,a,v),null===c?u=m:c.sibling=m,c=m);return oD&&QN(o,v),u}for(p=r(o,p);!m.done;v++,m=s.next())null!==(m=h(p,o,v,m.value,l))&&(e&&null!==m.alternate&&p.delete(null===m.key?v:m.key),a=i(m,a,v),null===c?u=m:c.sibling=m,c=m);return e&&p.forEach((function(e){return t(o,e)})),oD&&QN(o,v),u}return function e(r,i,s,l){if("object"===kn(s)&&null!==s&&s.type===_A&&null===s.key&&(s=s.props.children),"object"===kn(s)&&null!==s){switch(s.$$typeof){case SA:e:{for(var u=s.key,c=i;null!==c;){if(c.key===u){if((u=s.type)===_A){if(7===c.tag){n(r,c.sibling),(i=o(c,s.props.children)).return=r,r=i;break e}}else if(c.elementType===u||"object"===kn(u)&&null!==u&&u.$$typeof===RA&&ZD(u)===c.type){n(r,c.sibling),(i=o(c,s.props)).ref=qD(r,c,s),i.return=r,r=i;break e}n(r,c);break}t(r,c),c=c.sibling}s.type===_A?((i=RF(s.props.children,r.mode,l,s.key)).return=r,r=i):((l=IF(s.type,s.key,s.props,null,r.mode,l)).ref=qD(r,i,s),l.return=r,r=l)}return a(r);case CA:e:{for(c=s.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){n(r,i.sibling),(i=o(i,s.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=zF(s,r.mode,l)).return=r,r=i}return a(r);case RA:return e(r,i,(c=s._init)(s._payload),l)}if(rM(s))return p(r,i,s,l);if(zA(s))return v(r,i,s,l);YD(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,s)).return=r,r=i):(n(r,i),(i=DF(s,r.mode,l)).return=r,r=i),a(r)):n(r,i)}}var $D=XD(!0),KD=XD(!1),QD={},JD=CN(QD),ez=CN(QD),tz=CN(QD);function nz(e){if(e===QD)throw Error(aA(174));return e}function rz(e,t){switch(EN(tz,t),EN(ez,e),EN(JD,QD),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cM(null,"");break;default:t=cM(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_N(JD),EN(JD,t)}function oz(){_N(JD),_N(ez),_N(tz)}function iz(e){nz(tz.current);var t=nz(JD.current),n=cM(t,e.type);t!==n&&(EN(ez,e),EN(JD,n))}function az(e){ez.current===e&&(_N(JD),_N(ez))}var sz=CN(0);function lz(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uz=[];function cz(){for(var e=0;e<uz.length;e++)uz[e]._workInProgressVersionPrimary=null;uz.length=0}var dz=xA.ReactCurrentDispatcher,fz=xA.ReactCurrentBatchConfig,hz=0,pz=null,vz=null,gz=null,mz=!1,yz=!1,bz=0,wz=0;function kz(){throw Error(aA(321))}function xz(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sR(e[n],t[n]))return!1;return!0}function Sz(e,t,n,r,o,i){if(hz=i,pz=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dz.current=null===e||null===e.memoizedState?aj:sj,e=n(r,o),yz){i=0;do{if(yz=!1,bz=0,25<=i)throw Error(aA(301));i+=1,gz=vz=null,t.updateQueue=null,dz.current=lj,e=n(r,o)}while(yz)}if(dz.current=ij,t=null!==vz&&null!==vz.next,hz=0,gz=vz=pz=null,mz=!1,t)throw Error(aA(300));return e}function Cz(){var e=0!==bz;return bz=0,e}function _z(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===gz?pz.memoizedState=gz=e:gz=gz.next=e,gz}function Ez(){if(null===vz){var e=pz.alternate;e=null!==e?e.memoizedState:null}else e=vz.next;var t=null===gz?pz.memoizedState:gz.next;if(null!==t)gz=t,vz=e;else{if(null===e)throw Error(aA(310));e={memoizedState:(vz=e).memoizedState,baseState:vz.baseState,baseQueue:vz.baseQueue,queue:vz.queue,next:null},null===gz?pz.memoizedState=gz=e:gz=gz.next=e}return gz}function Pz(e,t){return"function"==typeof t?t(e):t}function Lz(e){var t=Ez(),n=t.queue;if(null===n)throw Error(aA(311));n.lastRenderedReducer=e;var r=vz,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var s=a=null,l=null,u=i;do{var c=u.lane;if((hz&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,pz.lanes|=c,NB|=c}u=u.next}while(null!==u&&u!==i);null===l?a=r:l.next=s,sR(r,t.memoizedState)||(bj=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,pz.lanes|=i,NB|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oz(e){var t=Ez(),n=t.queue;if(null===n)throw Error(aA(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);sR(i,t.memoizedState)||(bj=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Az(){}function Mz(e,t){var n=pz,r=Ez(),o=t(),i=!sR(r.memoizedState,o);if(i&&(r.memoizedState=o,bj=!0),r=r.queue,Wz(Rz.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==gz&&1&gz.memoizedState.tag){if(n.flags|=2048,jz(9,Iz.bind(null,n,r,o,t),void 0,null),null===LB)throw Error(aA(349));0!=(30&hz)||Tz(n,t,o)}return o}function Tz(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=pz.updateQueue)?(t={lastEffect:null,stores:null},pz.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Iz(e,t,n,r){t.value=n,t.getSnapshot=r,Nz(t)&&Dz(e)}function Rz(e,t,n){return n((function(){Nz(t)&&Dz(e)}))}function Nz(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sR(e,n)}catch(Kke){return!0}}function Dz(e){var t=OD(e,1);null!==t&&tF(t,e,1,-1)}function zz(e){var t=_z();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pz,lastRenderedState:e},t.queue=e,e=e.dispatch=tj.bind(null,pz,e),[t.memoizedState,e]}function jz(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=pz.updateQueue)?(t={lastEffect:null,stores:null},pz.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bz(){return Ez().memoizedState}function Fz(e,t,n,r){var o=_z();pz.flags|=e,o.memoizedState=jz(1|t,n,void 0,void 0===r?null:r)}function Hz(e,t,n,r){var o=Ez();r=void 0===r?null:r;var i=void 0;if(null!==vz){var a=vz.memoizedState;if(i=a.destroy,null!==r&&xz(r,a.deps))return void(o.memoizedState=jz(t,n,i,r))}pz.flags|=e,o.memoizedState=jz(1|t,n,i,r)}function Vz(e,t){return Fz(8390656,8,e,t)}function Wz(e,t){return Hz(2048,8,e,t)}function Uz(e,t){return Hz(4,2,e,t)}function Gz(e,t){return Hz(4,4,e,t)}function qz(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Yz(e,t,n){return n=null!=n?n.concat([e]):null,Hz(4,4,qz.bind(null,t,e),n)}function Zz(){}function Xz(e,t){var n=Ez();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xz(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $z(e,t){var n=Ez();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xz(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Kz(e,t,n){return 0==(21&hz)?(e.baseState&&(e.baseState=!1,bj=!0),e.memoizedState=n):(sR(n,t)||(n=gT(),pz.lanes|=n,NB|=n,e.baseState=!0),t)}function Qz(e,t){var n=wT;wT=0!==n&&4>n?n:4,e(!0);var r=fz.transition;fz.transition={};try{e(!1),t()}finally{wT=n,fz.transition=r}}function Jz(){return Ez().memoizedState}function ej(e,t,n){var r=eF(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},nj(e))rj(t,n);else if(null!==(n=LD(e,t,n,r))){tF(n,e,r,JB()),oj(n,t,r)}}function tj(e,t,n){var r=eF(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(nj(e))rj(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sR(s,a)){var l=t.interleaved;return null===l?(o.next=o,PD(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(hpe){}null!==(n=LD(e,t,o,r))&&(tF(n,e,r,o=JB()),oj(n,t,r))}}function nj(e){var t=e.alternate;return e===pz||null!==t&&t===pz}function rj(e,t){yz=mz=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oj(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bT(e,n)}}var ij={readContext:_D,useCallback:kz,useContext:kz,useEffect:kz,useImperativeHandle:kz,useInsertionEffect:kz,useLayoutEffect:kz,useMemo:kz,useReducer:kz,useRef:kz,useState:kz,useDebugValue:kz,useDeferredValue:kz,useTransition:kz,useMutableSource:kz,useSyncExternalStore:kz,useId:kz,unstable_isNewReconciler:!1},aj={readContext:_D,useCallback:function(e,t){return _z().memoizedState=[e,void 0===t?null:t],e},useContext:_D,useEffect:Vz,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fz(4194308,4,qz.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fz(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fz(4,2,e,t)},useMemo:function(e,t){var n=_z();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_z();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ej.bind(null,pz,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},_z().memoizedState=e},useState:zz,useDebugValue:Zz,useDeferredValue:function(e){return _z().memoizedState=e},useTransition:function(){var e=zz(!1),t=e[0];return e=Qz.bind(null,e[1]),_z().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pz,o=_z();if(oD){if(void 0===n)throw Error(aA(407));n=n()}else{if(n=t(),null===LB)throw Error(aA(349));0!=(30&hz)||Tz(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Vz(Rz.bind(null,r,i,e),[e]),r.flags|=2048,jz(9,Iz.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=_z(),t=LB.identifierPrefix;if(oD){var n=KN;t=":"+t+"R"+(n=($N&~(1<<32-sT($N)-1)).toString(32)+n),0<(n=bz++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wz++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sj={readContext:_D,useCallback:Xz,useContext:_D,useEffect:Wz,useImperativeHandle:Yz,useInsertionEffect:Uz,useLayoutEffect:Gz,useMemo:$z,useReducer:Lz,useRef:Bz,useState:function(){return Lz(Pz)},useDebugValue:Zz,useDeferredValue:function(e){return Kz(Ez(),vz.memoizedState,e)},useTransition:function(){return[Lz(Pz)[0],Ez().memoizedState]},useMutableSource:Az,useSyncExternalStore:Mz,useId:Jz,unstable_isNewReconciler:!1},lj={readContext:_D,useCallback:Xz,useContext:_D,useEffect:Wz,useImperativeHandle:Yz,useInsertionEffect:Uz,useLayoutEffect:Gz,useMemo:$z,useReducer:Oz,useRef:Bz,useState:function(){return Oz(Pz)},useDebugValue:Zz,useDeferredValue:function(e){var t=Ez();return null===vz?t.memoizedState=e:Kz(t,vz.memoizedState,e)},useTransition:function(){return[Oz(Pz)[0],Ez().memoizedState]},useMutableSource:Az,useSyncExternalStore:Mz,useId:Jz,unstable_isNewReconciler:!1};function uj(e,t){try{var n="",r=t;do{n+=WA(r),r=r.return}while(r);var o=n}catch(Xke){o="\nError generating stack: "+Xke.message+"\n"+Xke.stack}return{value:e,source:t,stack:o,digest:null}}function cj(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function dj(e,t){try{console.error(t.value)}catch(qke){setTimeout((function(){throw qke}))}}var fj="function"==typeof WeakMap?WeakMap:Map;function hj(e,t,n){(n=ID(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){WB||(WB=!0,UB=r),dj(0,t)},n}function pj(e,t,n){(n=ID(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){dj(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){dj(0,t),"function"!=typeof r&&(null===GB?GB=new Set([this]):GB.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vj(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fj;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=CF.bind(null,e,t,n),t.then(e,e))}function gj(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function mj(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=ID(-1,1)).tag=2,RD(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var yj=xA.ReactCurrentOwner,bj=!1;function wj(e,t,n,r){t.child=null===e?KD(t,null,n,r):$D(t,e.child,n,r)}function kj(e,t,n,r,o){n=n.render;var i=t.ref;return CD(t,o),r=Sz(e,t,n,r,i,o),n=Cz(),null===e||bj?(oD&&n&&eD(t),t.flags|=1,wj(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wj(e,t,o))}function xj(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||MF(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=IF(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Sj(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:lR)(a,r)&&e.ref===t.ref)return Wj(e,t,o)}return t.flags|=1,(e=TF(i,r)).ref=t.ref,e.return=t,t.child=e}function Sj(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(lR(i,r)&&e.ref===t.ref){if(bj=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,Wj(e,t,o);0!=(131072&e.flags)&&(bj=!0)}}return Ej(e,t,n,r,o)}function Cj(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},EN(TB,MB),MB|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,EN(TB,MB),MB|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,EN(TB,MB),MB|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,EN(TB,MB),MB|=r;return wj(e,t,o,n),t.child}function _j(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ej(e,t,n,r,o){var i=TN(n)?AN:LN.current;return i=MN(t,i),CD(t,o),n=Sz(e,t,n,r,i,o),r=Cz(),null===e||bj?(oD&&r&&eD(t),t.flags|=1,wj(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wj(e,t,o))}function Pj(e,t,n,r,o){if(TN(n)){var i=!0;DN(t)}else i=!1;if(CD(t,o),null===t.stateNode)Vj(e,t),WD(t,n,r),GD(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===kn(u)&&null!==u?u=_D(u):u=MN(t,u=TN(n)?AN:LN.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&UD(t,a,r,u),AD=!1;var f=t.memoizedState;a.state=f,zD(t,r,a,o),l=t.memoizedState,s!==r||f!==l||ON.current||AD?("function"==typeof c&&(FD(t,n,c,r),l=t.memoizedState),(s=AD||VD(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,TD(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:gD(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===kn(l=n.contextType)&&null!==l?l=_D(l):l=MN(t,l=TN(n)?AN:LN.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&UD(t,a,r,l),AD=!1,f=t.memoizedState,a.state=f,zD(t,r,a,o);var p=t.memoizedState;s!==d||f!==p||ON.current||AD?("function"==typeof h&&(FD(t,n,h,r),p=t.memoizedState),(u=AD||VD(t,n,u,r,f,p,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Lj(e,t,n,r,i,o)}function Lj(e,t,n,r,o,i){_j(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&zN(t,n,!1),Wj(e,t,i);r=t.stateNode,yj.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=$D(t,e.child,null,i),t.child=$D(t,null,s,i)):wj(e,t,s,i),t.memoizedState=r.state,o&&zN(t,n,!0),t.child}function Oj(e){var t=e.stateNode;t.pendingContext?RN(0,t.pendingContext,t.pendingContext!==t.context):t.context&&RN(0,t.context,!1),rz(e,t.containerInfo)}function Aj(e,t,n,r,o){return hD(),pD(o),t.flags|=256,wj(e,t,n,r),t.child}var Mj,Tj,Ij,Rj={dehydrated:null,treeContext:null,retryLane:0};function Nj(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dj(e,t,n){var r,o=t.pendingProps,i=sz.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),EN(sz,1&i),null===e)return uD(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=o.children,e=o.fallback,a?(o=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=NF(s,o,0,null),e=RF(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Nj(n),t.memoizedState=Rj,e):zj(t,s));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,a){if(n)return 256&t.flags?(t.flags&=-257,jj(e,t,a,r=cj(Error(aA(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=NF({mode:"visible",children:r.children},o,0,null),(i=RF(i,o,a,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&$D(t,e.child,null,a),t.child.memoizedState=Nj(a),t.memoizedState=Rj,i);if(0==(1&t.mode))return jj(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,jj(e,t,a,r=cj(i=Error(aA(419)),r,void 0))}if(s=0!=(a&e.childLanes),bj||s){if(null!==(r=LB)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|a))?0:o)&&o!==i.retryLane&&(i.retryLane=o,OD(e,o),tF(r,e,o,-1))}return pF(),jj(e,t,a,r=cj(Error(aA(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=EF.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,rD=uN(o.nextSibling),nD=t,oD=!0,iD=null,null!==e&&(YN[ZN++]=$N,YN[ZN++]=KN,YN[ZN++]=XN,$N=e.id,KN=e.overflow,XN=t),t=zj(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,i,n);if(a){a=o.fallback,s=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&s)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=TF(i,l)).subtreeFlags=14680064&i.subtreeFlags,null!==r?a=TF(r,a):(a=RF(a,s,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,s=null===(s=e.child.memoizedState)?Nj(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Rj,o}return e=(a=e.child).sibling,o=TF(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function zj(e,t){return(t=NF({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function jj(e,t,n,r){return null!==r&&pD(r),$D(t,e.child,null,n),(e=zj(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bj(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),SD(e.return,t,n)}function Fj(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Hj(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(wj(e,t,r.children,n),0!=(2&(r=sz.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bj(e,n,t);else if(19===e.tag)Bj(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(EN(sz,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===lz(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Fj(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===lz(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Fj(t,!0,n,null,i);break;case"together":Fj(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vj(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wj(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),NB|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(aA(153));if(null!==t.child){for(n=TF(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=TF(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Uj(e,t){if(!oD)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gj(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qj(e,t,n){var r=t.pendingProps;switch(tD(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gj(t),null;case 1:case 17:return TN(t.type)&&IN(),Gj(t),null;case 3:return r=t.stateNode,oz(),_N(ON),_N(LN),cz(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(dD(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==iD&&(iF(iD),iD=null))),Gj(t),null;case 5:az(t);var o=nz(tz.current);if(n=t.type,null!==e&&null!=t.stateNode)Tj(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(aA(166));return Gj(t),null}if(e=nz(JD.current),dD(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fN]=t,r[hN]=i,e=0!=(1&t.mode),n){case"dialog":BR("cancel",r),BR("close",r);break;case"iframe":case"object":case"embed":BR("load",r);break;case"video":case"audio":for(o=0;o<NR.length;o++)BR(NR[o],r);break;case"source":BR("error",r);break;case"img":case"image":case"link":BR("error",r),BR("load",r);break;case"details":BR("toggle",r);break;case"input":QA(r,i),BR("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},BR("invalid",r);break;case"textarea":aM(r,i),BR("invalid",r)}for(var a in bM(n,i),o=null,i)if(i.hasOwnProperty(a)){var s=i[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&QR(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&QR(r.textContent,s,e),o=["children",""+s]):lA.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&BR("scroll",r)}switch(n){case"input":ZA(r),tM(r,i,!0);break;case"textarea":ZA(r),lM(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=JR)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=uM(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[fN]=t,e[hN]=r,Mj(e,t),t.stateNode=e;e:{switch(a=wM(n,r),n){case"dialog":BR("cancel",e),BR("close",e),o=r;break;case"iframe":case"object":case"embed":BR("load",e),o=r;break;case"video":case"audio":for(o=0;o<NR.length;o++)BR(NR[o],e);o=r;break;case"source":BR("error",e),o=r;break;case"img":case"image":case"link":BR("error",e),BR("load",e),o=r;break;case"details":BR("toggle",e),o=r;break;case"input":QA(e,r),o=KA(e,r),BR("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=BA({},r,{value:void 0}),BR("invalid",e);break;case"textarea":aM(e,r),o=iM(e,r),BR("invalid",e)}for(i in bM(n,o),s=o)if(s.hasOwnProperty(i)){var l=s[i];"style"===i?mM(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&fM(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&hM(e,l):"number"==typeof l&&hM(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(lA.hasOwnProperty(i)?null!=l&&"onScroll"===i&&BR("scroll",e):null!=l&&kA(e,i,l,a))}switch(n){case"input":ZA(e),tM(e,r,!1);break;case"textarea":ZA(e),lM(e);break;case"option":null!=r.value&&e.setAttribute("value",""+qA(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?oM(e,!!r.multiple,i,!1):null!=r.defaultValue&&oM(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=JR)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Gj(t),null;case 6:if(e&&null!=t.stateNode)Ij(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(aA(166));if(n=nz(tz.current),nz(JD.current),dD(t)){if(r=t.stateNode,n=t.memoizedProps,r[fN]=t,(i=r.nodeValue!==n)&&null!==(e=nD))switch(e.tag){case 3:QR(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&QR(r.nodeValue,n,0!=(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fN]=t,t.stateNode=r}return Gj(t),null;case 13:if(_N(sz),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oD&&null!==rD&&0!=(1&t.mode)&&0==(128&t.flags))fD(),hD(),t.flags|=98560,i=!1;else if(i=dD(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(aA(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(aA(317));i[fN]=t}else hD(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gj(t),i=!1}else null!==iD&&(iF(iD),iD=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&sz.current)?0===IB&&(IB=3):pF())),null!==t.updateQueue&&(t.flags|=4),Gj(t),null);case 4:return oz(),null===e&&VR(t.stateNode.containerInfo),Gj(t),null;case 10:return xD(t.type._context),Gj(t),null;case 19:if(_N(sz),null===(i=t.memoizedState))return Gj(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)Uj(i,!1);else{if(0!==IB||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=lz(e))){for(t.flags|=128,Uj(i,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(a=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return EN(sz,1&sz.current|2),t.child}e=e.sibling}null!==i.tail&&QM()>HB&&(t.flags|=128,r=!0,Uj(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=lz(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Uj(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!oD)return Gj(t),null}else 2*QM()-i.renderingStartTime>HB&&1073741824!==n&&(t.flags|=128,r=!0,Uj(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=i.last)?n.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=QM(),t.sibling=null,n=sz.current,EN(sz,r?1&n|2:1&n),t):(Gj(t),null);case 22:case 23:return cF(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&MB)&&(Gj(t),6&t.subtreeFlags&&(t.flags|=8192)):Gj(t),null;case 24:case 25:return null}throw Error(aA(156,t.tag))}function Yj(e,t){switch(tD(t),t.tag){case 1:return TN(t.type)&&IN(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return oz(),_N(ON),_N(LN),cz(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return az(t),null;case 13:if(_N(sz),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(aA(340));hD()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _N(sz),null;case 4:return oz(),null;case 10:return xD(t.type._context),null;case 22:case 23:return cF(),null;default:return null}}Mj=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Tj=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,nz(JD.current);var i,a=null;switch(n){case"input":o=KA(e,o),r=KA(e,r),a=[];break;case"select":o=BA({},o,{value:void 0}),r=BA({},r,{value:void 0}),a=[];break;case"textarea":o=iM(e,o),r=iM(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=JR)}for(u in bM(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(lA.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(lA.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&BR("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ij=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zj=!1,Xj=!1,$j="function"==typeof WeakSet?WeakSet:Set,Kj=null;function Qj(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(Kke){SF(e,t,Kke)}else n.current=null}function Jj(e,t,n){try{n()}catch(Kke){SF(e,t,Kke)}}var eB=!1;function tB(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&Jj(t,n,i)}o=o.next}while(o!==r)}}function nB(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rB(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function oB(e){var t=e.alternate;null!==t&&(e.alternate=null,oB(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fN],delete t[hN],delete t[vN],delete t[gN],delete t[mN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function iB(e){return 5===e.tag||3===e.tag||4===e.tag}function aB(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||iB(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sB(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=JR));else if(4!==r&&null!==(e=e.child))for(sB(e,t,n),e=e.sibling;null!==e;)sB(e,t,n),e=e.sibling}function lB(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(lB(e,t,n),e=e.sibling;null!==e;)lB(e,t,n),e=e.sibling}var uB=null,cB=!1;function dB(e,t,n){for(n=n.child;null!==n;)fB(e,t,n),n=n.sibling}function fB(e,t,n){if(aT&&"function"==typeof aT.onCommitFiberUnmount)try{aT.onCommitFiberUnmount(iT,n)}catch(Qke){}switch(n.tag){case 5:Xj||Qj(n,t);case 6:var r=uB,o=cB;uB=null,dB(e,t,n),cB=o,null!==(uB=r)&&(cB?(e=uB,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):uB.removeChild(n.stateNode));break;case 18:null!==uB&&(cB?(e=uB,n=n.stateNode,8===e.nodeType?lN(e.parentNode,n):1===e.nodeType&&lN(e,n),WT(e)):lN(uB,n.stateNode));break;case 4:r=uB,o=cB,uB=n.stateNode.containerInfo,cB=!0,dB(e,t,n),uB=r,cB=o;break;case 0:case 11:case 14:case 15:if(!Xj&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&Jj(n,t,a),o=o.next}while(o!==r)}dB(e,t,n);break;case 1:if(!Xj&&(Qj(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(Qke){SF(n,t,Qke)}dB(e,t,n);break;case 21:dB(e,t,n);break;case 22:1&n.mode?(Xj=(r=Xj)||null!==n.memoizedState,dB(e,t,n),Xj=r):dB(e,t,n);break;default:dB(e,t,n)}}function hB(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $j),t.forEach((function(t){var r=PF.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function pB(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:uB=s.stateNode,cB=!1;break e;case 3:case 4:uB=s.stateNode.containerInfo,cB=!0;break e}s=s.return}if(null===uB)throw Error(aA(160));fB(i,a,o),uB=null,cB=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(hpe){SF(o,t,hpe)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vB(t,e),t=t.sibling}function vB(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pB(t,e),gB(e),4&r){try{tB(3,e,e.return),nB(3,e)}catch(Nhe){SF(e,e.return,Nhe)}try{tB(5,e,e.return)}catch(Nhe){SF(e,e.return,Nhe)}}break;case 1:pB(t,e),gB(e),512&r&&null!==n&&Qj(n,n.return);break;case 5:if(pB(t,e),gB(e),512&r&&null!==n&&Qj(n,n.return),32&e.flags){var o=e.stateNode;try{hM(o,"")}catch(Nhe){SF(e,e.return,Nhe)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,a=null!==n?n.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===i.type&&null!=i.name&&JA(o,i),wM(s,a);var u=wM(s,i);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];"style"===c?mM(o,d):"dangerouslySetInnerHTML"===c?fM(o,d):"children"===c?hM(o,d):kA(o,c,d,u)}switch(s){case"input":eM(o,i);break;case"textarea":sM(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?oM(o,!!i.multiple,h,!1):f!==!!i.multiple&&(null!=i.defaultValue?oM(o,!!i.multiple,i.defaultValue,!0):oM(o,!!i.multiple,i.multiple?[]:"",!1))}o[hN]=i}catch(Nhe){SF(e,e.return,Nhe)}}break;case 6:if(pB(t,e),gB(e),4&r){if(null===e.stateNode)throw Error(aA(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(Nhe){SF(e,e.return,Nhe)}}break;case 3:if(pB(t,e),gB(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{WT(t.containerInfo)}catch(Nhe){SF(e,e.return,Nhe)}break;case 4:default:pB(t,e),gB(e);break;case 13:pB(t,e),gB(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(FB=QM())),4&r&&hB(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Xj=(u=Xj)||c,pB(t,e),Xj=u):pB(t,e),gB(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&0!=(1&e.mode))for(Kj=e,c=e.child;null!==c;){for(d=Kj=c;null!==Kj;){switch(h=(f=Kj).child,f.tag){case 0:case 11:case 14:case 15:tB(4,f,f.return);break;case 1:Qj(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(Nhe){SF(r,n,Nhe)}}break;case 5:Qj(f,f.return);break;case 22:if(null!==f.memoizedState){wB(d);continue}}null!==h?(h.return=f,Kj=h):wB(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=gM("display",a))}catch(Nhe){SF(e,e.return,Nhe)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(Nhe){SF(e,e.return,Nhe)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:pB(t,e),gB(e),4&r&&hB(e);case 21:}}function gB(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(iB(n)){var r=n;break e}n=n.return}throw Error(aA(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(hM(o,""),r.flags&=-33),lB(e,aB(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;sB(e,aB(e),i);break;default:throw Error(aA(161))}}catch(ixe){SF(e,e.return,ixe)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function mB(e,t,n){Kj=e,yB(e)}function yB(e,t,n){for(var r=0!=(1&e.mode);null!==Kj;){var o=Kj,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Zj;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Xj;s=Zj;var u=Xj;if(Zj=a,(Xj=l)&&!u)for(Kj=o;null!==Kj;)l=(a=Kj).child,22===a.tag&&null!==a.memoizedState?kB(o):null!==l?(l.return=a,Kj=l):kB(o);for(;null!==i;)Kj=i,yB(i),i=i.sibling;Kj=o,Zj=s,Xj=u}bB(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,Kj=i):bB(e)}}function bB(e){for(;null!==Kj;){var t=Kj;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xj||nB(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xj)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:gD(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&jD(t,i,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}jD(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&WT(d)}}}break;default:throw Error(aA(163))}Xj||512&t.flags&&rB(t)}catch(fpe){SF(t,t.return,fpe)}}if(t===e){Kj=null;break}if(null!==(n=t.sibling)){n.return=t.return,Kj=n;break}Kj=t.return}}function wB(e){for(;null!==Kj;){var t=Kj;if(t===e){Kj=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Kj=n;break}Kj=t.return}}function kB(e){for(;null!==Kj;){var t=Kj;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nB(4,t)}catch(ixe){SF(t,n,ixe)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(ixe){SF(t,o,ixe)}}var i=t.return;try{rB(t)}catch(ixe){SF(t,i,ixe)}break;case 5:var a=t.return;try{rB(t)}catch(ixe){SF(t,a,ixe)}}}catch(ixe){SF(t,t.return,ixe)}if(t===e){Kj=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Kj=s;break}Kj=t.return}}var xB,SB=Math.ceil,CB=xA.ReactCurrentDispatcher,_B=xA.ReactCurrentOwner,EB=xA.ReactCurrentBatchConfig,PB=0,LB=null,OB=null,AB=0,MB=0,TB=CN(0),IB=0,RB=null,NB=0,DB=0,zB=0,jB=null,BB=null,FB=0,HB=1/0,VB=null,WB=!1,UB=null,GB=null,qB=!1,YB=null,ZB=0,XB=0,$B=null,KB=-1,QB=0;function JB(){return 0!=(6&PB)?QM():-1!==KB?KB:KB=QM()}function eF(e){return 0==(1&e.mode)?1:0!=(2&PB)&&0!==AB?AB&-AB:null!==vD.transition?(0===QB&&(QB=gT()),QB):0!==(e=wT)?e:e=void 0===(e=window.event)?16:KT(e.type)}function tF(e,t,n,r){if(50<XB)throw XB=0,$B=null,Error(aA(185));yT(e,n,r),0!=(2&PB)&&e===LB||(e===LB&&(0==(2&PB)&&(DB|=n),4===IB&&aF(e,AB)),nF(e,r),1===n&&0===PB&&0==(1&t.mode)&&(HB=QM()+500,BN&&VN()))}function nF(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-sT(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=pT(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=hT(e,e===LB?AB:0);if(0===r)null!==n&&XM(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&XM(n),1===t)0===e.tag?function(e){BN=!0,HN(e)}(sF.bind(null,e)):HN(sF.bind(null,e)),aN((function(){0==(6&PB)&&VN()})),n=null;else{switch(kT(r)){case 1:n=eT;break;case 4:n=tT;break;case 16:default:n=nT;break;case 536870912:n=oT}n=LF(n,rF.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rF(e,t){if(KB=-1,QB=0,0!=(6&PB))throw Error(aA(327));var n=e.callbackNode;if(kF()&&e.callbackNode!==n)return null;var r=hT(e,e===LB?AB:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=vF(e,r);else{t=r;var o=PB;PB|=2;var i=hF();for(LB===e&&AB===t||(VB=null,HB=QM()+500,dF(e,t));;)try{mF();break}catch(Qke){fF(e,Qke)}kD(),CB.current=i,PB=o,null!==OB?t=0:(LB=null,AB=0,t=IB)}if(0!==t){if(2===t&&(0!==(o=vT(e))&&(r=o,t=oF(e,o))),1===t)throw n=RB,dF(e,0),aF(e,r),nF(e,QM()),n;if(6===t)aF(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sR(i(),o))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vF(e,r))&&(0!==(i=vT(e))&&(r=i,t=oF(e,i))),1===t))throw n=RB,dF(e,0),aF(e,r),nF(e,QM()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(aA(345));case 2:case 5:wF(e,BB,VB);break;case 3:if(aF(e,r),(130023424&r)===r&&10<(t=FB+500-QM())){if(0!==hT(e,0))break;if(((o=e.suspendedLanes)&r)!==r){JB(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rN(wF.bind(null,e,BB,VB),t);break}wF(e,BB,VB);break;case 4:if(aF(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-sT(r);i=1<<a,(a=t[a])>o&&(o=a),r&=~i}if(r=o,10<(r=(120>(r=QM()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SB(r/1960))-r)){e.timeoutHandle=rN(wF.bind(null,e,BB,VB),r);break}wF(e,BB,VB);break;default:throw Error(aA(329))}}}return nF(e,QM()),e.callbackNode===n?rF.bind(null,e):null}function oF(e,t){var n=jB;return e.current.memoizedState.isDehydrated&&(dF(e,t).flags|=256),2!==(e=vF(e,t))&&(t=BB,BB=n,null!==t&&iF(t)),e}function iF(e){null===BB?BB=e:BB.push.apply(BB,e)}function aF(e,t){for(t&=~zB,t&=~DB,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sT(t),r=1<<n;e[n]=-1,t&=~r}}function sF(e){if(0!=(6&PB))throw Error(aA(327));kF();var t=hT(e,0);if(0==(1&t))return nF(e,QM()),null;var n=vF(e,t);if(0!==e.tag&&2===n){var r=vT(e);0!==r&&(t=r,n=oF(e,r))}if(1===n)throw n=RB,dF(e,0),aF(e,t),nF(e,QM()),n;if(6===n)throw Error(aA(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wF(e,BB,VB),nF(e,QM()),null}function lF(e,t){var n=PB;PB|=1;try{return e(t)}finally{0===(PB=n)&&(HB=QM()+500,BN&&VN())}}function uF(e){null!==YB&&0===YB.tag&&0==(6&PB)&&kF();var t=PB;PB|=1;var n=EB.transition,r=wT;try{if(EB.transition=null,wT=1,e)return e()}finally{wT=r,EB.transition=n,0==(6&(PB=t))&&VN()}}function cF(){MB=TB.current,_N(TB)}function dF(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oN(n)),null!==OB)for(n=OB.return;null!==n;){var r=n;switch(tD(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&IN();break;case 3:oz(),_N(ON),_N(LN),cz();break;case 5:az(r);break;case 4:oz();break;case 13:case 19:_N(sz);break;case 10:xD(r.type._context);break;case 22:case 23:cF()}n=n.return}if(LB=e,OB=e=TF(e.current,null),AB=MB=t,IB=0,RB=null,zB=DB=NB=0,BB=jB=null,null!==ED){for(t=0;t<ED.length;t++)if(null!==(r=(n=ED[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}ED=null}return e}function fF(e,t){for(;;){var n=OB;try{if(kD(),dz.current=ij,mz){for(var r=pz.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}mz=!1}if(hz=0,gz=vz=pz=null,yz=!1,bz=0,_B.current=null,null===n||null===n.return){IB=1,RB=t,OB=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=AB,s.flags|=32768,null!==l&&"object"===kn(l)&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=gj(a);if(null!==h){h.flags&=-257,mj(h,a,s,0,t),1&h.mode&&vj(i,u,t),l=u;var p=(t=h).updateQueue;if(null===p){var v=new Set;v.add(l),t.updateQueue=v}else p.add(l);break e}if(0==(1&t)){vj(i,u,t),pF();break e}l=Error(aA(426))}else if(oD&&1&s.mode){var g=gj(a);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),mj(g,a,s,0,t),pD(uj(l,s));break e}}i=l=uj(l,s),4!==IB&&(IB=2),null===jB?jB=[i]:jB.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,DD(i,hj(0,l,t));break e;case 1:s=l;var m=i.type,y=i.stateNode;if(0==(128&i.flags)&&("function"==typeof m.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===GB||!GB.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,DD(i,pj(i,s,t));break e}}i=i.return}while(null!==i)}bF(n)}catch(b){t=b,OB===n&&null!==n&&(OB=n=n.return);continue}break}}function hF(){var e=CB.current;return CB.current=ij,null===e?ij:e}function pF(){0!==IB&&3!==IB&&2!==IB||(IB=4),null===LB||0==(268435455&NB)&&0==(268435455&DB)||aF(LB,AB)}function vF(e,t){var n=PB;PB|=2;var r=hF();for(LB===e&&AB===t||(VB=null,dF(e,t));;)try{gF();break}catch(Dhe){fF(e,Dhe)}if(kD(),PB=n,CB.current=r,null!==OB)throw Error(aA(261));return LB=null,AB=0,IB}function gF(){for(;null!==OB;)yF(OB)}function mF(){for(;null!==OB&&!$M();)yF(OB)}function yF(e){var t=xB(e.alternate,e,MB);e.memoizedProps=e.pendingProps,null===t?bF(e):OB=t,_B.current=null}function bF(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=qj(n,t,MB)))return void(OB=n)}else{if(null!==(n=Yj(n,t)))return n.flags&=32767,void(OB=n);if(null===e)return IB=6,void(OB=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(OB=t);OB=t=e}while(null!==t);0===IB&&(IB=5)}function wF(e,t,n){var r=wT,o=EB.transition;try{EB.transition=null,wT=1,function(e,t,n,r){do{kF()}while(null!==YB);if(0!=(6&PB))throw Error(aA(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(aA(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-sT(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===LB&&(OB=LB=null,AB=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||qB||(qB=!0,LF(nT,(function(){return kF(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=EB.transition,EB.transition=null;var a=wT;wT=1;var s=PB;PB|=4,_B.current=null,function(e,t){if(eN=GT,hR(e=fR())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(lxe){n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==o&&3!==d.nodeType||(s=a+o),d!==i||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=a),f===i&&++c===r&&(l=a),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(tN={focusedElem:e,selectionRange:n},GT=!1,Kj=t;null!==Kj;)if(e=(t=Kj).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Kj=e;else for(;null!==Kj;){t=Kj;try{var p=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var v=p.memoizedProps,g=p.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:gD(t.type,v),g);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(aA(163))}}catch(lxe){SF(t,t.return,lxe)}if(null!==(e=t.sibling)){e.return=t.return,Kj=e;break}Kj=t.return}p=eB,eB=!1}(e,n),vB(n,e),pR(tN),GT=!!eN,tN=eN=null,e.current=n,mB(n),KM(),PB=s,wT=a,EB.transition=i}else e.current=n;if(qB&&(qB=!1,YB=e,ZB=o),i=e.pendingLanes,0===i&&(GB=null),function(e){if(aT&&"function"==typeof aT.onCommitFiberRoot)try{aT.onCommitFiberRoot(iT,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),nF(e,QM()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(WB)throw WB=!1,e=UB,UB=null,e;0!=(1&ZB)&&0!==e.tag&&kF(),i=e.pendingLanes,0!=(1&i)?e===$B?XB++:(XB=0,$B=e):XB=0,VN()}(e,t,n,r)}finally{EB.transition=o,wT=r}return null}function kF(){if(null!==YB){var e=kT(ZB),t=EB.transition,n=wT;try{if(EB.transition=null,wT=16>e?16:e,null===YB)var r=!1;else{if(e=YB,YB=null,ZB=0,0!=(6&PB))throw Error(aA(331));var o=PB;for(PB|=4,Kj=e.current;null!==Kj;){var i=Kj,a=i.child;if(0!=(16&Kj.flags)){var s=i.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(Kj=u;null!==Kj;){var c=Kj;switch(c.tag){case 0:case 11:case 15:tB(8,c,i)}var d=c.child;if(null!==d)d.return=c,Kj=d;else for(;null!==Kj;){var f=(c=Kj).sibling,h=c.return;if(oB(c),c===u){Kj=null;break}if(null!==f){f.return=h,Kj=f;break}Kj=h}}}var p=i.alternate;if(null!==p){var v=p.child;if(null!==v){p.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Kj=i}}if(0!=(2064&i.subtreeFlags)&&null!==a)a.return=i,Kj=a;else e:for(;null!==Kj;){if(0!=(2048&(i=Kj).flags))switch(i.tag){case 0:case 11:case 15:tB(9,i,i.return)}var m=i.sibling;if(null!==m){m.return=i.return,Kj=m;break e}Kj=i.return}}var y=e.current;for(Kj=y;null!==Kj;){var b=(a=Kj).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,Kj=b;else e:for(a=y;null!==Kj;){if(0!=(2048&(s=Kj).flags))try{switch(s.tag){case 0:case 11:case 15:nB(9,s)}}catch(k){SF(s,s.return,k)}if(s===a){Kj=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Kj=w;break e}Kj=s.return}}if(PB=o,VN(),aT&&"function"==typeof aT.onPostCommitFiberRoot)try{aT.onPostCommitFiberRoot(iT,e)}catch(k){}r=!0}return r}finally{wT=n,EB.transition=t}}return!1}function xF(e,t,n){e=RD(e,t=hj(0,t=uj(n,t),1),1),t=JB(),null!==e&&(yT(e,1,t),nF(e,t))}function SF(e,t,n){if(3===e.tag)xF(e,e,n);else for(;null!==t;){if(3===t.tag){xF(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===GB||!GB.has(r))){t=RD(t,e=pj(t,e=uj(n,e),1),1),e=JB(),null!==t&&(yT(t,1,e),nF(t,e));break}}t=t.return}}function CF(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=JB(),e.pingedLanes|=e.suspendedLanes&n,LB===e&&(AB&n)===n&&(4===IB||3===IB&&(130023424&AB)===AB&&500>QM()-FB?dF(e,0):zB|=n),nF(e,t)}function _F(e,t){0===t&&(0==(1&e.mode)?t=1:(t=dT,0==(130023424&(dT<<=1))&&(dT=4194304)));var n=JB();null!==(e=OD(e,t))&&(yT(e,t,n),nF(e,n))}function EF(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_F(e,n)}function PF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(aA(314))}null!==r&&r.delete(t),_F(e,n)}function LF(e,t){return ZM(e,t)}function OF(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function AF(e,t,n,r){return new OF(e,t,n,r)}function MF(e){return!(!(e=e.prototype)||!e.isReactComponent)}function TF(e,t){var n=e.alternate;return null===n?((n=AF(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function IF(e,t,n,r,o,i){var a=2;if(r=e,"function"==typeof e)MF(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case _A:return RF(n.children,o,i,t);case EA:a=8,o|=8;break;case PA:return(e=AF(12,n,t,2|o)).elementType=PA,e.lanes=i,e;case MA:return(e=AF(13,n,t,o)).elementType=MA,e.lanes=i,e;case TA:return(e=AF(19,n,t,o)).elementType=TA,e.lanes=i,e;case NA:return NF(n,o,i,t);default:if("object"===kn(e)&&null!==e)switch(e.$$typeof){case LA:a=10;break e;case OA:a=9;break e;case AA:a=11;break e;case IA:a=14;break e;case RA:a=16,r=null;break e}throw Error(aA(130,null==e?e:kn(e),""))}return(t=AF(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function RF(e,t,n,r){return(e=AF(7,e,r,t)).lanes=n,e}function NF(e,t,n,r){return(e=AF(22,e,r,t)).elementType=NA,e.lanes=n,e.stateNode={isHidden:!1},e}function DF(e,t,n){return(e=AF(6,e,null,t)).lanes=n,e}function zF(e,t,n){return(t=AF(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jF(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mT(0),this.expirationTimes=mT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mT(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function BF(e,t,n,r,o,i,a,s,l){return e=new jF(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=AF(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},MD(i),e}function FF(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:CA,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function HF(e){if(!e)return PN;e:{if(WM(e=e._reactInternals)!==e||1!==e.tag)throw Error(aA(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(TN(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(aA(171))}if(1===e.tag){var n=e.type;if(TN(n))return NN(e,n,t)}return t}function VF(e,t,n,r,o,i,a,s,l){return(e=BF(n,r,!0,e,0,i,0,s,l)).context=HF(null),n=e.current,(i=ID(r=JB(),o=eF(n))).callback=null!=t?t:null,RD(n,i,o),e.current.lanes=o,yT(e,o,r),nF(e,r),e}function WF(e,t,n,r){var o=t.current,i=JB(),a=eF(o);return n=HF(n),null===t.context?t.context=n:t.pendingContext=n,(t=ID(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=RD(o,t,a))&&(tF(e,o,a,i),ND(e,o,a)),a}function UF(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function GF(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qF(e,t){GF(e,t),(e=e.alternate)&&GF(e,t)}xB=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ON.current)bj=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return bj=!1,function(e,t,n){switch(t.tag){case 3:Oj(t),hD();break;case 5:iz(t);break;case 1:TN(t.type)&&DN(t);break;case 4:rz(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;EN(mD,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(EN(sz,1&sz.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Dj(e,t,n):(EN(sz,1&sz.current),null!==(e=Wj(e,t,n))?e.sibling:null);EN(sz,1&sz.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Hj(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),EN(sz,sz.current),r)break;return null;case 22:case 23:return t.lanes=0,Cj(e,t,n)}return Wj(e,t,n)}(e,t,n);bj=0!=(131072&e.flags)}else bj=!1,oD&&0!=(1048576&t.flags)&&JN(t,qN,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vj(e,t),e=t.pendingProps;var o=MN(t,LN.current);CD(t,n),o=Sz(null,t,r,e,o,n);var i=Cz();return t.flags|=1,"object"===kn(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,TN(r)?(i=!0,DN(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,MD(t),o.updater=HD,t.stateNode=o,o._reactInternals=t,GD(t,r,e,n),t=Lj(null,t,r,!0,i,n)):(t.tag=0,oD&&i&&eD(t),wj(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vj(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return MF(e)?1:0;if(null!=e){if((e=e.$$typeof)===AA)return 11;if(e===IA)return 14}return 2}(r),e=gD(r,e),o){case 0:t=Ej(null,t,r,e,n);break e;case 1:t=Pj(null,t,r,e,n);break e;case 11:t=kj(null,t,r,e,n);break e;case 14:t=xj(null,t,r,gD(r.type,e),n);break e}throw Error(aA(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ej(e,t,r,o=t.elementType===r?o:gD(r,o),n);case 1:return r=t.type,o=t.pendingProps,Pj(e,t,r,o=t.elementType===r?o:gD(r,o),n);case 3:e:{if(Oj(t),null===e)throw Error(aA(387));r=t.pendingProps,o=(i=t.memoizedState).element,TD(e,t),zD(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Aj(e,t,r,n,o=uj(Error(aA(423)),t));break e}if(r!==o){t=Aj(e,t,r,n,o=uj(Error(aA(424)),t));break e}for(rD=uN(t.stateNode.containerInfo.firstChild),nD=t,oD=!0,iD=null,n=KD(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(hD(),r===o){t=Wj(e,t,n);break e}wj(e,t,r,n)}t=t.child}return t;case 5:return iz(t),null===e&&uD(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children,nN(r,o)?a=null:null!==i&&nN(r,i)&&(t.flags|=32),_j(e,t),wj(e,t,a,n),t.child;case 6:return null===e&&uD(t),null;case 13:return Dj(e,t,n);case 4:return rz(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=$D(t,null,r,n):wj(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,kj(e,t,r,o=t.elementType===r?o:gD(r,o),n);case 7:return wj(e,t,t.pendingProps,n),t.child;case 8:case 12:return wj(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,EN(mD,r._currentValue),r._currentValue=a,null!==i)if(sR(i.value,a)){if(i.children===o.children&&!ON.current){t=Wj(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var s=i.dependencies;if(null!==s){a=i.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=ID(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),SD(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===i.tag)a=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(a=i.return))throw Error(aA(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),SD(a,n,t),a=i.sibling}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===t){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}wj(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,CD(t,n),r=r(o=_D(o)),t.flags|=1,wj(e,t,r,n),t.child;case 14:return o=gD(r=t.type,t.pendingProps),xj(e,t,r,o=gD(r.type,o),n);case 15:return Sj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gD(r,o),Vj(e,t),t.tag=1,TN(r)?(e=!0,DN(t)):e=!1,CD(t,n),WD(t,r,o),GD(t,r,o,n),Lj(null,t,r,!0,e,n);case 19:return Hj(e,t,n);case 22:return Cj(e,t,n)}throw Error(aA(156,t.tag))};var YF="function"==typeof reportError?reportError:function(e){console.error(e)};function ZF(e){this._internalRoot=e}function XF(e){this._internalRoot=e}function $F(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function KF(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function QF(){}function JF(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=UF(a);s.call(e)}}WF(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=UF(a);i.call(e)}}var a=VF(t,r,e,0,null,!1,0,"",QF);return e._reactRootContainer=a,e[pN]=a.current,VR(8===e.nodeType?e.parentNode:e),uF(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=UF(l);s.call(e)}}var l=BF(e,0,!1,null,0,!1,0,"",QF);return e._reactRootContainer=l,e[pN]=l.current,VR(8===e.nodeType?e.parentNode:e),uF((function(){WF(t,l,n,r)})),l}(n,t,e,o,r);return UF(a)}XF.prototype.render=ZF.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(aA(409));WF(e,t,null,null)},XF.prototype.unmount=ZF.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uF((function(){WF(null,e,null,null)})),t[pN]=null}},XF.prototype.unstable_scheduleHydration=function(e){if(e){var t=_T();e={blockedOn:null,target:e,priority:t};for(var n=0;n<RT.length&&0!==t&&t<RT[n].priority;n++);RT.splice(n,0,e),0===n&&jT(e)}},xT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fT(t.pendingLanes);0!==n&&(bT(t,1|n),nF(t,QM()),0==(6&PB)&&(HB=QM()+500,VN()))}break;case 13:uF((function(){var t=OD(e,1);if(null!==t){var n=JB();tF(t,e,1,n)}})),qF(e,1)}},ST=function(e){if(13===e.tag){var t=OD(e,134217728);if(null!==t)tF(t,e,134217728,JB());qF(e,134217728)}},CT=function(e){if(13===e.tag){var t=eF(e),n=OD(e,t);if(null!==n)tF(n,e,t,JB());qF(e,t)}},_T=function(){return wT},ET=function(e,t){var n=wT;try{return wT=e,t()}finally{wT=n}},SM=function(e,t,n){switch(t){case"input":if(eM(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=kN(r);if(!o)throw Error(aA(90));XA(r),eM(r,o)}}}break;case"textarea":sM(e,n);break;case"select":null!=(t=n.value)&&oM(e,!!n.multiple,t,!1)}},OM=lF,AM=uF;var eH={usingClientEntryPoint:!1,Events:[bN,wN,kN,PM,LM,lF]},tH={findFiberByHostInstance:yN,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},nH={bundleType:tH.bundleType,version:tH.version,rendererPackageName:tH.rendererPackageName,rendererConfig:tH.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xA.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qM(e))?null:e.stateNode},findFiberByHostInstance:tH.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rH=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rH.isDisabled&&rH.supportsFiber)try{iT=rH.inject(nH),aT=rH}catch(wpe){}}eA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eH,eA.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$F(t))throw Error(aA(200));return FF(e,t,null,n)},eA.createRoot=function(e,t){if(!$F(e))throw Error(aA(299));var n=!1,r="",o=YF;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=BF(e,1,!1,null,0,n,0,r,o),e[pN]=t.current,VR(8===e.nodeType?e.parentNode:e),new ZF(t)},eA.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(aA(188));throw e=Object.keys(e).join(","),Error(aA(268,e))}return e=null===(e=qM(t))?null:e.stateNode},eA.flushSync=function(e){return uF(e)},eA.hydrate=function(e,t,n){if(!KF(t))throw Error(aA(200));return JF(null,e,t,!0,n)},eA.hydrateRoot=function(e,t,n){if(!$F(e))throw Error(aA(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",a=YF;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=VF(t,null,e,1,null!=n?n:null,o,0,i,a),e[pN]=t.current,VR(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new XF(t)},eA.render=function(e,t,n){if(!KF(t))throw Error(aA(200));return JF(null,e,t,!1,n)},eA.unmountComponentAtNode=function(e){if(!KF(e))throw Error(aA(40));return!!e._reactRootContainer&&(uF((function(){JF(null,null,e,!1,(function(){e._reactRootContainer=null,e[pN]=null}))})),!0)},eA.unstable_batchedUpdates=lF,eA.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!KF(n))throw Error(aA(200));if(null==e||void 0===e._reactInternals)throw Error(aA(38));return JF(e,t,n,!1,r)},eA.version="18.2.0-next-9e3b772b8-20220608",function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=eA}(JO);var oH=ar(QO),iH=yn(Av({strict:!1,name:"PortalManagerContext"}),2),aH=iH[0],sH=iH[1];function lH(e){var t=e.children,n=e.zIndex;return qr.createElement(aH,{value:{zIndex:n}},t)}lH.displayName="PortalManager";var uH=yn(Av({strict:!1,name:"PortalContext"}),2),cH=uH[0],dH=uH[1],fH="chakra-portal",hH=function(e){return qr.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children)},pH=function(e){var t=e.appendToParentPortal,n=e.children,r=yn(cr.useState(null),2),o=r[0],i=r[1],a=cr.useRef(null),s=yn(cr.useState({}),2)[1];cr.useEffect((function(){return s({})}),[]);var l=dH(),u=sH();oo((function(){if(o){var e=o.ownerDocument,n=t&&null!=l?l:e.body;if(n){a.current=e.createElement("div"),a.current.className=fH,n.appendChild(a.current),s({});var r=a.current;return function(){n.contains(r)&&n.removeChild(r)}}}}),[o]);var c=(null==u?void 0:u.zIndex)?qr.createElement(hH,{zIndex:null==u?void 0:u.zIndex},n):n;return a.current?QO.createPortal(qr.createElement(cH,{value:a.current},c),a.current):qr.createElement("span",{ref:function(e){e&&i(e)}})},vH=function(e){var t=e.children,n=e.containerRef,r=e.appendToParentPortal,o=n.current,i=null!=o?o:"undefined"!=typeof window?document.body:void 0,a=cr.useMemo((function(){var e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=fH),e}),[o]),s=yn(cr.useState({}),2)[1];return oo((function(){return s({})}),[]),oo((function(){if(a&&i)return i.appendChild(a),function(){i.removeChild(a)}}),[a,i]),i&&a?QO.createPortal(qr.createElement(cH,{value:r?a:null},t),a):null};function gH(e){var t=e.containerRef,n=sn(e,Se);return t?qr.createElement(vH,un({containerRef:t},n)):qr.createElement(pH,un({},n))}gH.defaultProps={appendToParentPortal:!0},gH.className=fH,gH.selector=".chakra-portal",gH.displayName="Portal";var mH=new WeakMap,yH=new WeakMap,bH={},wH=0,kH=function e(t){return t&&(t.host||e(t.parentNode))},xH=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=kH(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);bH[n]||(bH[n]=new WeakMap);var i=bH[n],a=[],s=new Set,l=new Set(o);o.forEach((function e(t){t&&!s.has(t)&&(s.add(t),e(t.parentNode))}));return function e(t){t&&!l.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(s.has(t))e(t);else{var o=t.getAttribute(r),l=null!==o&&"false"!==o,u=(mH.get(t)||0)+1,c=(i.get(t)||0)+1;mH.set(t,u),i.set(t,c),a.push(t),1===u&&l&&yH.set(t,!0),1===c&&t.setAttribute(n,"true"),l||t.setAttribute(r,"true")}}))}(t),s.clear(),wH++,function(){a.forEach((function(e){var t=mH.get(e)-1,o=i.get(e)-1;mH.set(e,t),i.set(e,o),t||(yH.has(e)||e.removeAttribute(r),yH.delete(e)),o||e.removeAttribute(n)})),--wH||(mH=new WeakMap,mH=new WeakMap,yH=new WeakMap,bH={})}},SH=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xH(r,o,n,"aria-hidden")):function(){return null}};function CH(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 _H={},EH={get exports(){return _H},set exports(e){_H=e}};function PH(){}function LH(){}LH.resetWarningCache=PH;EH.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:LH,resetWarningCache:PH};return n.PropTypes=n,n}();var OH="data-focus-lock",AH="data-focus-lock-disabled";function MH(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},o=cr.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0],o.callback=r,o.facade;var n,r,o}var TH={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function IH(e){return e}function RH(e,t){void 0===t&&(t=IH);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}function NH(e,t){return void 0===t&&(t=IH),RH(e,t)}function DH(e){void 0===e&&(e={});var t=RH(null);return t.options=YS({async:!0,ssr:!1},e),t}var zH=function(e){var t=e.sideCar,n=ZS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return cr.createElement(r,YS({},n))};zH.isSideCarExport=!0;var jH=NH({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),BH=NH(),FH=NH(),HH=DH({async:!0}),VH=[],WH=cr.forwardRef((function(e,t){var n,r=cr.useState(),o=r[0],i=r[1],a=cr.useRef(),s=cr.useRef(!1),l=cr.useRef(null),u=e.children,c=e.disabled,d=e.noFocusGuards,f=e.persistentFocus,h=e.crossFrame,p=e.autoFocus;e.allowTextSelection;var v=e.group,g=e.className,m=e.whiteList,y=e.hasPositiveIndices,b=e.shards,w=void 0===b?VH:b,k=e.as,x=void 0===k?"div":k,S=e.lockProps,C=void 0===S?{}:S,_=e.sideCar,E=e.returnFocus,P=e.focusOptions,L=e.onActivation,O=e.onDeactivation,A=cr.useState({})[0],M=cr.useCallback((function(){l.current=l.current||document&&document.activeElement,a.current&&L&&L(a.current),s.current=!0}),[L]),T=cr.useCallback((function(){s.current=!1,O&&O(a.current)}),[O]);cr.useEffect((function(){c||(l.current=null)}),[]);var I=cr.useCallback((function(e){var t=l.current;if(t&&t.focus){var n="function"==typeof E?E(t):E;if(n){var r="object"===kn(n)?n:void 0;l.current=null,e?Promise.resolve().then((function(){return t.focus(r)})):t.focus(r)}}}),[E]),R=cr.useCallback((function(e){s.current&&jH.useMedium(e)}),[]),N=BH.useMedium,D=cr.useCallback((function(e){a.current!==e&&(a.current=e,i(e))}),[]),z=ps(((n={})[AH]=c&&"disabled",n[OH]=v,n),C),j=!0!==d,B=j&&"tail"!==d,F=MH([t,D]);return cr.createElement(cr.Fragment,null,j&&[cr.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:c?-1:0,style:TH}),y?cr.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:c?-1:1,style:TH}):null],!c&&cr.createElement(_,{id:A,sideCar:HH,observed:o,disabled:c,persistentFocus:f,crossFrame:h,autoFocus:p,whiteList:m,shards:w,onActivation:M,onDeactivation:T,returnFocus:I,focusOptions:P}),cr.createElement(x,ps({ref:F},z,{className:g,onBlur:N,onFocus:R}),u),B&&cr.createElement("div",{"data-focus-guard":!0,tabIndex:c?-1:0,style:TH}))}));WH.propTypes={},WH.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var UH=WH;function GH(e,t){return GH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},GH(e,t)}function qH(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,GH(e,t)}function YH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZH=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},XH=function(e){return Array.isArray(e)?e:[e]},$H=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},KH=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},QH=function(e,t){return!e||KH(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(e)&&t($H(e))},JH=function e(t,n){var r=t.get(n);if(void 0!==r)return r;var o=QH(n,e.bind(void 0,t));return t.set(n,o),o},eV=function e(t,n){var r=t.get(n);if(void 0!==r)return r;var o=function(e,t){return!(e&&!KH(e))||!!oV(e)&&t($H(e))}(n,e.bind(void 0,t));return t.set(n,o),o},tV=function(e){return e.dataset},nV=function(e){return"INPUT"===e.tagName},rV=function(e){return nV(e)&&"radio"===e.type},oV=function(e){var t=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(t)},iV=function(e){var t;return Boolean(e&&(null===(t=tV(e))||void 0===t?void 0:t.focusGuard))},aV=function(e){return!iV(e)},sV=function(e){return Boolean(e)},lV=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},uV=function(e,t,n){return ZH(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(lV)},cV=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),dV="".concat(cV,", [data-focus-guard]"),fV=function e(t,n){var r;return ZH((null===(r=t.shadowRoot)||void 0===r?void 0:r.children)||t.children).reduce((function(t,r){return t.concat(r.matches(n?dV:cV)?[r]:[],e(r))}),[])},hV=function(e,t){return e.reduce((function(e,n){return e.concat(fV(n,t),n.parentNode?ZH(n.parentNode.querySelectorAll(cV)).filter((function(e){return e===n})):[])}),[])},pV=function(e,t){return ZH(e).filter((function(e){return JH(t,e)})).filter((function(e){return function(e){return!((nV(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},vV=function(e,t){return void 0===t&&(t=new Map),ZH(e).filter((function(e){return eV(t,e)}))},gV=function(e,t,n){return uV(pV(hV(e,n),t),!0,n)},mV=function(e,t){return uV(pV(hV(e),t),!1)},yV=function(e,t){return pV(function(e){var t=e.querySelectorAll("[".concat("data-autofocus-inside","]"));return ZH(t).map((function(e){return hV([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e),t)},bV=function e(t,n){return t.shadowRoot?e(t.shadowRoot,n):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,n))||ZH(t.children).some((function(t){return e(t,n)}))},wV=function e(t){return t.parentNode?e(t.parentNode):t},kV=function(e){return XH(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(OH);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var o=r+1;o<n;o+=1){var i=e[r].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(ZH(wV(t).querySelectorAll("[".concat(OH,'="').concat(n,'"]:not([').concat(AH,'="disabled"])')))):[t]),e}),[])},xV=function e(t){return t.activeElement?t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement:void 0},SV=function(){return document.activeElement?document.activeElement.shadowRoot?xV(document.activeElement.shadowRoot):document.activeElement:void 0},CV=function(e){return Boolean(ZH(e.querySelectorAll("iframe")).some((function(e){return function(e){return e===document.activeElement}(e)})))},_V=function(e){var t=document&&SV();return!(!t||t.dataset&&t.dataset.focusGuard)&&kV(e).some((function(e){return bV(e,t)||CV(e)}))},EV=function(e,t){return rV(e)&&e.name?function(e,t){return t.filter(rV).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},PV=function(e){return e[0]&&e.length>1?EV(e[0],e):e[0]},LV=function(e,t){return e.length>1?e.indexOf(EV(e[t],e)):t},OV="NEW_FOCUS",AV=function(e,t,n,r){var o=e.length,i=e[0],a=e[o-1],s=iV(n);if(!(n&&e.indexOf(n)>=0)){var l,u,c=void 0!==n?t.indexOf(n):-1,d=r?t.indexOf(r):c,f=r?e.indexOf(r):-1,h=c-d,p=t.indexOf(i),v=t.indexOf(a),g=(l=t,u=new Set,l.forEach((function(e){return u.add(EV(e,l))})),l.filter((function(e){return u.has(e)}))),m=(void 0!==n?g.indexOf(n):-1)-(r?g.indexOf(r):c),y=LV(e,0),b=LV(e,o-1);return-1===c||-1===f?OV:!h&&f>=0?f:c<=p&&s&&Math.abs(h)>1?b:c>=v&&s&&Math.abs(h)>1?y:h&&Math.abs(m)>1?f:c<=p?b:c>v?y:h?Math.abs(h)>1?f:(o+f+h)%o:void 0}},MV=function(e,t,n){var r,o=e.map((function(e){return e.node})),i=vV(o.filter((r=n,function(e){var t,n=null===(t=tV(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return i&&i.length?PV(i):PV(vV(t))},TV=function e(t,n){return void 0===n&&(n=[]),n.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,n),n},IV=function(e,t){for(var n=TV(e),r=TV(t),o=0;o<n.length;o+=1){var i=n[o];if(r.indexOf(i)>=0)return i}return!1},RV=function(e,t,n){var r=XH(e),o=XH(t),i=r[0],a=!1;return o.filter(Boolean).forEach((function(e){a=IV(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=IV(i,e);t&&(a=!a||bV(t,a)?t:IV(t,a))}))})),a},NV=function(e,t){return e.reduce((function(e,n){return e.concat(yV(n,t))}),[])},DV=function(e,t){var n=document&&SV(),r=kV(e).filter(aV),o=RV(n||e,e,r),i=new Map,a=mV(r,i),s=gV(r,i).filter((function(e){var t=e.node;return aV(t)}));if(s[0]||(s=a)[0]){var l=mV([o],i).map((function(e){return e.node})),u=function(e,t){var n=new Map;return t.forEach((function(e){return n.set(e.node,e)})),e.map((function(e){return n.get(e)})).filter(sV)}(l,s),c=u.map((function(e){return e.node})),d=AV(c,l,n,t);return d===OV?{node:MV(a,c,NV(r,i))}:void 0===d?d:u[d]}},zV=0,jV=!1,BV=function(e,t,n){void 0===n&&(n={});var r,o,i=DV(e,t);if(!jV&&i){if(zV>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),jV=!0,void setTimeout((function(){jV=!1}),1);zV++,r=i.node,o=n.focusOptions,"focus"in r&&r.focus(o),"contentWindow"in r&&r.contentWindow&&r.contentWindow.focus(),zV--}};function FV(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}var HV=function(){return document&&document.activeElement===document.body||!!(e=document&&SV())&&ZH(document.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(t){return bV(t,e)}));var e},VV=null,WV=null,UV=null,GV=!1,qV=function(){return!0};function YV(e,t,n,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=n)!==t);o&&(o.node.tabIndex=0)}var ZV=function(e){return e&&"current"in e?e.current:e},XV=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},$V=function(){var e,t,n,r,o,i,a,s=!1;if(VV){var l=VV,u=l.observed,c=l.persistentFocus,d=l.autoFocus,f=l.shards,h=l.crossFrame,p=l.focusOptions,v=u||UV&&UV.portaledElement,g=document&&document.activeElement;if(v){var m=[v].concat(f.map(ZV).filter(Boolean));if(g&&!function(e){return(VV.whiteList||qV)(e)}(g)||(c||(h?Boolean(GV):"meanwhile"===GV)||!HV()||!WV&&d)&&(v&&!(_V(m)||g&&function(e,t){return t.some((function(t){return XV(e,t,t)}))}(g,m)||(a=g,UV&&UV.portaledElement===a))&&(document&&!WV&&g&&!d?(g.blur&&g.blur(),document.body.focus()):(s=BV(m,WV,{focusOptions:p}),UV={})),GV=!1,WV=document&&document.activeElement),document){var y=document&&document.activeElement,b=(t=kV(e=m).filter(aV),n=RV(e,e,t),r=new Map,o=gV([n],r,!0),i=gV(t,r).filter((function(e){var t=e.node;return aV(t)})).map((function(e){return e.node})),o.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:iV(t)}}))),w=b.map((function(e){return e.node})).indexOf(y);w>-1&&(b.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),YV(w,b.length,1,b),YV(w,-1,-1,b))}}}return s},KV=function(e){$V()&&e&&(e.stopPropagation(),e.preventDefault())},QV=function(){return FV($V)},JV=function(){GV="just",setTimeout((function(){GV="meanwhile"}),0)};jH.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(UV={observerNode:n,portaledElement:t})})),BH.assignMedium(QV),FH.assignMedium((function(e){return e({moveFocusInside:BV,focusInside:_V})}));var eW=function(e,t){return function(n){var r,o=[];function i(){r=e(o.map((function(e){return e.props}))),t(r)}var a=function(e){function t(){return e.apply(this,arguments)||this}qH(t,e),t.peek=function(){return r};var a=t.prototype;return a.componentDidMount=function(){o.push(this),i()},a.componentDidUpdate=function(){i()},a.componentWillUnmount=function(){var e=o.indexOf(this);o.splice(e,1),i()},a.render=function(){return qr.createElement(n,this.props)},t}(cr.PureComponent);return YH(a,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),a}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!VV&&(document.addEventListener("focusin",KV),document.addEventListener("focusout",QV),window.addEventListener("blur",JV));var n=VV,r=n&&t&&t.id===n.id;VV=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(WV=null,r&&n.observed===t.observed||t.onActivation(),$V(),FV($V)):(document.removeEventListener("focusin",KV),document.removeEventListener("focusout",QV),window.removeEventListener("blur",JV),WV=null)}))((function(){return null})),tW=cr.forwardRef((function(e,t){return cr.createElement(UH,ps({sideCar:eW,ref:t},e))})),nW=UH.propTypes||{};nW.sideCar,CH(nW,["sideCar"]),tW.propTypes={};var rW=tW,oW=function(e){var t=e.initialFocusRef,n=e.finalFocusRef,r=e.contentRef,o=e.restoreFocus,i=e.children,a=e.isDisabled,s=e.autoFocus,l=e.persistentFocus,u=e.lockFocusAcrossFrames,c=cr.useCallback((function(){if(null==t?void 0:t.current)t.current.focus();else if(null==r?void 0:r.current){0===iL(r.current).length&&requestAnimationFrame((function(){var e;null==(e=r.current)||e.focus()}))}}),[t,r]),d=cr.useCallback((function(){var e;null==(e=null==n?void 0:n.current)||e.focus()}),[n]),f=o&&!n;return qr.createElement(rW,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:c,onDeactivation:d,returnFocus:f},i)};oW.displayName="FocusLock";var iW="right-scroll-bar-position",aW="width-before-scroll-bar",sW=DH(),lW=function(){},uW=cr.forwardRef((function(e,t){var n=cr.useRef(null),r=cr.useState({onScrollCapture:lW,onWheelCapture:lW,onTouchMoveCapture:lW}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,v=e.allowPinchZoom,g=e.as,m=void 0===g?"div":g,y=ZS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=f,w=MH([n,t]),k=YS(YS({},y),o);return cr.createElement(cr.Fragment,null,c&&cr.createElement(b,{sideCar:sW,removeScrollBar:u,shards:d,noIsolation:h,inert:p,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?cr.cloneElement(cr.Children.only(s),YS(YS({},k),{ref:w})):cr.createElement(m,YS({},k,{className:l,ref:w}),s))}));uW.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},uW.classNames={fullWidth:aW,zeroRight:iW};function cW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var dW=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=cW())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fW=function(){var e,t=(e=dW(),function(t,n){cr.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},hW={left:0,top:0,right:0,gap:0},pW=function(e){return parseInt(e||"",10)||0},vW=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return hW;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[pW(n),pW(r),pW(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},gW=fW(),mW=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(iW," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(aW," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(iW," .").concat(iW," {\n right: 0 ").concat(r,";\n }\n \n .").concat(aW," .").concat(aW," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},yW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,i=cr.useMemo((function(){return vW(o)}),[o]);return cr.createElement(gW,{styles:mW(i,!t,o,n?"":"!important")})},bW=!1;if("undefined"!=typeof window)try{var wW=Object.defineProperty({},"passive",{get:function(){return bW=!0,!0}});window.addEventListener("test",wW,wW),window.removeEventListener("test",wW,wW)}catch(COe){bW=!1}var kW=!!bW&&{passive:!1},xW=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},SW=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),CW(e,n)){var r=_W(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},CW=function(e,t){return"v"===e?function(e){return xW(e,"overflowY")}(t):function(e){return xW(e,"overflowX")}(t)},_W=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},EW=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},PW=function(e){return[e.deltaX,e.deltaY]},LW=function(e){return e&&"current"in e?e.current:e},OW=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},AW=0,MW=[];var TW,IW=(TW=function(e){var t=cr.useRef([]),n=cr.useRef([0,0]),r=cr.useRef(),o=cr.useState(AW++)[0],i=cr.useState((function(){return fW()}))[0],a=cr.useRef(e);cr.useEffect((function(){a.current=e}),[e]),cr.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=QS([e.lockRef.current],(e.shards||[]).map(LW),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=cr.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=EW(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],u="deltaY"in e?e.deltaY:s[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=SW(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=SW(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var h=_W(e,s),p=h[0],v=h[1]-h[2]-i*p;(p||v)&&CW(e,s)&&(d+=v,f+=p),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(u=!0),u}(h,t,e,"h"===h?l:u,!0)}),[]),l=cr.useCallback((function(e){var n=e;if(MW.length&&MW[MW.length-1]===i){var r="deltaY"in n?PW(n):EW(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(a.current.shards||[]).map(LW).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=cr.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=cr.useCallback((function(e){n.current=EW(e),r.current=void 0}),[]),d=cr.useCallback((function(t){u(t.type,PW(t),t.target,s(t,e.lockRef.current))}),[]),f=cr.useCallback((function(t){u(t.type,EW(t),t.target,s(t,e.lockRef.current))}),[]);cr.useEffect((function(){return MW.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,kW),document.addEventListener("touchmove",l,kW),document.addEventListener("touchstart",c,kW),function(){MW=MW.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,kW),document.removeEventListener("touchmove",l,kW),document.removeEventListener("touchstart",c,kW)}}),[]);var h=e.removeScrollBar,p=e.inert;return cr.createElement(cr.Fragment,null,p?cr.createElement(i,{styles:OW(o)}):null,h?cr.createElement(yW,{gapMode:"margin"}):null)},sW.useMedium(TW),zH),RW=cr.forwardRef((function(e,t){return cr.createElement(uW,YS({},e,{ref:t,sideCar:IW}))}));RW.classNames=uW.classNames;var NW=RW,DW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function zW(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var jW=new(function(){function e(){an(this,e),gn(this,"modals",void 0),this.modals=[]}return on(e,[{key:"add",value:function(e){this.modals.push(e)}},{key:"remove",value:function(e){this.modals=this.modals.filter((function(t){return t!==e}))}},{key:"isTopModal",value:function(e){return this.modals[this.modals.length-1]===e}}]),e}());function BW(e){var t,n,r,o=e.isOpen,i=e.onClose,a=e.id,s=e.closeOnOverlayClick,l=void 0===s||s,u=e.closeOnEsc,c=void 0===u||u,d=e.useInert,f=void 0===d||d,h=e.onOverlayClick,p=e.onEsc,v=cr.useRef(null),g=cr.useRef(null),m=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=cr.useId(),i=e||o;return cr.useMemo((function(){return n.map((function(e){return"".concat(e,"-").concat(i)}))}),[i,n])}(a,"chakra-modal","chakra-modal--header","chakra-modal--body"),y=yn(m,3),b=y[0],w=y[1],k=y[2];n=o&&f,r=(t=v).current,cr.useEffect((function(){if(t.current&&n)return SH(t.current)}),[n,t,r]),function(e,t){cr.useEffect((function(){return t&&jW.add(e),function(){jW.remove(e)}}),[t,e])}(v,o);var x=cr.useRef(null),S=cr.useCallback((function(e){x.current=e.target}),[]),C=cr.useCallback((function(e){"Escape"===e.key&&(e.stopPropagation(),c&&(null==i||i()),null==p||p())}),[c,i,p]),_=yn(cr.useState(!1),2),E=_[0],P=_[1],L=yn(cr.useState(!1),2),O=L[0],A=L[1],M=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({role:"dialog"},e),{},{ref:Tv(t,v),id:b,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?w:void 0,"aria-describedby":O?k:void 0,onClick:zW(e.onClick,(function(e){return e.stopPropagation()}))})}),[k,O,b,w,E]),T=cr.useCallback((function(e){e.stopPropagation(),x.current===e.target&&jW.isTopModal(v)&&(l&&(null==i||i()),null==h||h())}),[i,l,h]),I=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(t,g),onClick:zW(e.onClick,T),onKeyDown:zW(e.onKeyDown,C),onMouseDown:zW(e.onMouseDown,S)})}),[C,S,T]);return{isOpen:o,onClose:i,headerId:w,bodyId:k,setBodyMounted:A,setHeaderMounted:P,dialogRef:v,overlayRef:g,getDialogProps:M,getDialogContainerProps:I}}var FW=yn(Av({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" "}),2),HW=FW[0],VW=FW[1],WW=yn(Av({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),2),UW=WW[0],GW=WW[1],qW=function(e){var t=e.portalProps,n=e.children,r=e.autoFocus,o=e.trapFocus,i=e.initialFocusRef,a=e.finalFocusRef,s=e.returnFocusOnClose,l=e.blockScrollOnMount,u=e.allowPinchZoom,c=e.preserveScrollBarGap,d=e.motionPreset,f=e.lockFocusAcrossFrames,h=e.onCloseComplete,p=Pv("Modal",e),v=un(un({},BW(e)),{},{autoFocus:r,trapFocus:o,initialFocusRef:i,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:c,motionPreset:d,lockFocusAcrossFrames:f});return qr.createElement(UW,{value:v},qr.createElement(HW,{value:p},qr.createElement(qS,{onExitComplete:h},v.isOpen&&qr.createElement(gH,un({},t),n))))};qW.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"},qW.displayName="Modal";var YW=Cv((function(e,t){var n=e.className,r=sn(e,Ce),o=GW(),i=o.bodyId,a=o.setBodyMounted;cr.useEffect((function(){return a(!0),function(){return a(!1)}}),[a]);var s=DW("chakra-modal__body",n),l=VW();return qr.createElement(Lv.div,un(un({ref:t,className:s,id:i},r),{},{__css:l.body}))}));YW.displayName="ModalBody";var ZW=Cv((function(e,t){var n=e.onClick,r=e.className,o=sn(e,_e),i=GW().onClose,a=DW("chakra-modal__close-btn",r),s=VW();return qr.createElement(xE,un({ref:t,__css:s.closeButton,className:a,onClick:zW(n,(function(e){e.stopPropagation(),i()}))},o))}));function XW(e){var t=GW(),n=t.autoFocus,r=t.trapFocus,o=t.dialogRef,i=t.initialFocusRef,a=t.blockScrollOnMount,s=t.allowPinchZoom,l=t.finalFocusRef,u=t.returnFocusOnClose,c=t.preserveScrollBarGap,d=t.lockFocusAcrossFrames,f=yn(nw(),2),h=f[0],p=f[1];return cr.useEffect((function(){!h&&p&&setTimeout(p)}),[h,p]),qr.createElement(oW,{autoFocus:n,isDisabled:!r,initialFocusRef:i,finalFocusRef:l,restoreFocus:u,contentRef:o,lockFocusAcrossFrames:d},qr.createElement(NW,{removeScrollBar:!c,allowPinchZoom:s,enabled:a,forwardProps:!0},e.children))}ZW.displayName="ModalCloseButton";var $W={slideInBottom:un(un({},SC),{},{custom:{offsetY:16,reverse:!0}}),slideInRight:un(un({},SC),{},{custom:{offsetX:16,reverse:!0}}),scale:un(un({},mC),{},{custom:{initialScale:.95,reverse:!0}}),none:{}},KW=Lv(BS.section),QW=cr.forwardRef((function(e,t){var n=e.preset,r=e.motionProps,o=void 0===r?function(e){return $W[e||"none"]}(n):r,i=sn(e,Ee);return qr.createElement(KW,un(un({ref:t},o),i))}));QW.displayName="ModalTransition";var JW=Cv((function(e,t){var n=e.className,r=e.children,o=e.containerProps,i=e.motionProps,a=sn(e,Pe),s=GW(),l=s.getDialogProps,u=s.getDialogContainerProps,c=l(a,t),d=u(o),f=DW("chakra-modal__content",n),h=VW(),p=un({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},h.dialog),v=un({display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0},h.dialogContainer),g=GW().motionPreset;return qr.createElement(XW,null,qr.createElement(Lv.div,un(un({},d),{},{className:"chakra-modal__content-container",tabIndex:-1,__css:v}),qr.createElement(QW,un(un({preset:g,motionProps:i,className:f},c),{},{__css:p}),r)))}));JW.displayName="ModalContent";var eU=Cv((function(e,t){var n=e.className,r=sn(e,Le),o=DW("chakra-modal__footer",n),i=un({display:"flex",alignItems:"center",justifyContent:"flex-end"},VW().footer);return qr.createElement(Lv.footer,un(un({ref:t},r),{},{__css:i,className:o}))}));eU.displayName="ModalFooter";var tU=Cv((function(e,t){var n=e.className,r=sn(e,Oe),o=GW(),i=o.headerId,a=o.setHeaderMounted;cr.useEffect((function(){return a(!0),function(){return a(!1)}}),[a]);var s=DW("chakra-modal__header",n),l=un({flex:0},VW().header);return qr.createElement(Lv.header,un(un({ref:t,className:s,id:i},r),{},{__css:l}))}));tU.displayName="ModalHeader";var nU=Lv(BS.div),rU=Cv((function(e,t){var n=e.className,r=(e.transition,e.motionProps),o=sn(e,Ae),i=DW("chakra-modal__overlay",n),a=un({pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh"},VW().overlay),s=GW().motionPreset,l=r||("none"===s?{}:pC);return qr.createElement(nU,un(un({},l),{},{__css:a,ref:t,className:i},o))}));function oU(e){var t=e.leastDestructiveRef,n=sn(e,Me);return qr.createElement(qW,un(un({},n),{},{initialFocusRef:t}))}rU.displayName="ModalOverlay";var iU=Cv((function(e,t){return qr.createElement(JW,un({ref:t,role:"alertdialog"},e))})),aU=yn(Av(),2),sU=(aU[0],aU[1]),lU=Lv(kC),uU=Cv((function(e,t){var n=e.className,r=e.children,o=e.motionProps,i=e.containerProps,a=sn(e,Te),s=GW(),l=s.getDialogProps,u=s.getDialogContainerProps,c=s.isOpen,d=l(a,t),f=u(i),h=DW("chakra-modal__content",n),p=VW(),v=un({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},p.dialog),g=un({display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0},p.dialogContainer),m=sU().placement;return qr.createElement(XW,null,qr.createElement(Lv.div,un(un({},f),{},{className:"chakra-modal__content-container",__css:g}),qr.createElement(lU,un(un({motionProps:o,direction:m,in:c,className:h},d),{},{__css:v}),r)))}));uU.displayName="DrawerContent";var cU=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},dU=function(e){return!!e||void 0};function fU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var hU=function(e){return qr.createElement(Gv,un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"}))},pU=function(e){return qr.createElement(Gv,un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"}))};function vU(e,t,n,r){cr.useEffect((function(){var o;if(e.current&&r){var i=null!==(o=e.current.ownerDocument.defaultView)&&void 0!==o?o:window,a=Array.isArray(t)?t:[t],s=new i.MutationObserver((function(e){var t,r=xn(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;"attributes"===o.type&&o.attributeName&&a.includes(o.attributeName)&&n(o)}}catch(COe){r.e(COe)}finally{r.f()}}));return s.observe(e.current,{attributes:!0,attributeFilter:a}),function(){return s.disconnect()}}}))}function gU(e,t){var n=yn(cr.useState(!1),2),r=n[0],o=n[1],i=yn(cr.useState(null),2),a=i[0],s=i[1],l=yn(cr.useState(!0),2),u=l[0],c=l[1],d=cr.useRef(null),f=function(){return clearTimeout(d.current)};!function(e,t){var n=Yv(e);cr.useEffect((function(){var e=null;return null!==t&&(e=window.setInterval((function(){return n()}),t)),function(){e&&window.clearInterval(e)}}),[t,n])}((function(){"increment"===a&&e(),"decrement"===a&&t()}),r?50:null);var h=cr.useCallback((function(){u&&e(),d.current=setTimeout((function(){c(!1),o(!0),s("increment")}),300)}),[e,u]),p=cr.useCallback((function(){u&&t(),d.current=setTimeout((function(){c(!1),o(!0),s("decrement")}),300)}),[t,u]),v=cr.useCallback((function(){c(!0),o(!1),f()}),[]);return cr.useEffect((function(){return function(){return f()}}),[]),{up:h,down:p,stop:v,isSpinning:r}}var mU=/^[Ee0-9+\-.]$/;function yU(e){return mU.test(e)}function bU(e,t){if(null==e.key)return!0;var n=e.ctrlKey||e.altKey||e.metaKey;return!(1===e.key.length&&!n)||t(e.key)}var wU=yn(Av({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<NumberInput />\" "}),2),kU=wU[0],xU=wU[1],SU=yn(Av({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),2),CU=SU[0],_U=SU[1],EU=Cv((function(e,t){var n=Pv("NumberInput",e),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.focusInputOnChange,n=void 0===t||t,r=e.clampValueOnBlur,o=void 0===r||r,i=e.keepWithinRange,a=void 0===i||i,s=e.min,l=void 0===s?Number.MIN_SAFE_INTEGER:s,u=e.max,c=void 0===u?Number.MAX_SAFE_INTEGER:u,d=e.step,f=void 0===d?1:d,h=e.isReadOnly,p=e.isDisabled,v=e.isRequired,g=e.isInvalid,m=e.pattern,y=void 0===m?"[0-9]*(.[0-9]+)?":m,b=e.inputMode,w=void 0===b?"decimal":b,k=e.allowMouseWheel,x=e.id,S=(e.onChange,e.precision,e.name),C=e["aria-describedby"],_=e["aria-label"],E=e["aria-labelledby"],P=e.onFocus,L=e.onBlur,O=e.onInvalid,A=e.getAriaValueText,M=e.isValidCharacter,T=e.format,I=e.parse,R=sn(e,Ie),N=Yv(P),D=Yv(L),z=Yv(O),j=Yv(null!=M?M:yU),B=Yv(A),F=OE(e),H=F.update,V=F.increment,W=F.decrement,U=yn(cr.useState(!1),2),G=U[0],q=U[1],Y=!(h||p),Z=cr.useRef(null),X=cr.useRef(null),$=cr.useRef(null),K=cr.useRef(null),Q=cr.useCallback((function(e){return e.split("").filter(j).join("")}),[j]),J=cr.useCallback((function(e){var t;return null!==(t=null==I?void 0:I(e))&&void 0!==t?t:e}),[I]),ee=cr.useCallback((function(e){var t;return(null!==(t=null==T?void 0:T(e))&&void 0!==t?t:e).toString()}),[T]);U_((function(){(F.valueAsNumber>c||F.valueAsNumber<l)&&(null==z||z("rangeOverflow",ee(F.value),F.valueAsNumber))}),[F.valueAsNumber,F.value,ee,z]),oo((function(){if(Z.current&&Z.current.value!=F.value){var e=J(Z.current.value);F.setValue(Q(e))}}),[J,Q]);var te=cr.useCallback((function(){Y&&V(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f)}),[V,Y,f]),ne=cr.useCallback((function(){Y&&W(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f)}),[W,Y,f]),re=gU(te,ne);vU($,"disabled",re.stop,re.isSpinning),vU(K,"disabled",re.stop,re.isSpinning);var oe=cr.useCallback((function(e){if(!e.nativeEvent.isComposing){var t=J(e.currentTarget.value);H(Q(t)),X.current={start:e.currentTarget.selectionStart,end:e.currentTarget.selectionEnd}}}),[H,Q,J]),ie=cr.useCallback((function(e){var t,n,r;null==N||N(e),X.current&&(e.target.selectionStart=null!==(t=X.current.start)&&void 0!==t?t:null==(r=e.currentTarget.value)?void 0:r.length,e.currentTarget.selectionEnd=null!==(n=X.current.end)&&void 0!==n?n:e.currentTarget.selectionStart)}),[N]),ae=cr.useCallback((function(e){if(!e.nativeEvent.isComposing){bU(e,j)||e.preventDefault();var t=se(e)*f,n={ArrowUp:function(){return te(t)},ArrowDown:function(){return ne(t)},Home:function(){return H(l)},End:function(){return H(c)}}[e.key];n&&(e.preventDefault(),n(e))}}),[j,f,te,ne,H,l,c]),se=function(e){var t=1;return(e.metaKey||e.ctrlKey)&&(t=.1),e.shiftKey&&(t=10),t},le=cr.useMemo((function(){var e=null==B?void 0:B(F.value);return null!=e?e:F.value.toString()||void 0}),[F.value,B]),ue=cr.useCallback((function(){var e=F.value;""!==F.value&&(/^[eE]/.test(F.value.toString())?F.setValue(""):(F.valueAsNumber<l&&(e=l),F.valueAsNumber>c&&(e=c),F.cast(e)))}),[F,c,l]),ce=cr.useCallback((function(){q(!1),o&&ue()}),[o,q,ue]),de=cr.useCallback((function(){n&&requestAnimationFrame((function(){var e;null==(e=Z.current)||e.focus()}))}),[n]),fe=cr.useCallback((function(e){e.preventDefault(),re.up(),de()}),[de,re]),he=cr.useCallback((function(e){e.preventDefault(),re.down(),de()}),[de,re]);DE((function(){return Z.current}),"wheel",(function(e){var t,n,r=(null!==(t=null==(n=Z.current)?void 0:n.ownerDocument)&&void 0!==t?t:document).activeElement===Z.current;if(k&&r){e.preventDefault();var o=se(e)*f,i=Math.sign(e.deltaY);-1===i?te(o):1===i&&ne(o)}}),{passive:!1});var pe=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=p||a&&F.isAtMax;return un(un({},e),{},{ref:Tv(t,$),role:"button",tabIndex:-1,onPointerDown:fU(e.onPointerDown,(function(e){0!==e.button||n||fe(e)})),onPointerLeave:fU(e.onPointerLeave,re.stop),onPointerUp:fU(e.onPointerUp,re.stop),disabled:n,"aria-disabled":dU(n)})}),[F.isAtMax,a,fe,re.stop,p]),ve=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=p||a&&F.isAtMin;return un(un({},e),{},{ref:Tv(t,K),role:"button",tabIndex:-1,onPointerDown:fU(e.onPointerDown,(function(e){0!==e.button||n||he(e)})),onPointerLeave:fU(e.onPointerLeave,re.stop),onPointerUp:fU(e.onPointerUp,re.stop),disabled:n,"aria-disabled":dU(n)})}),[F.isAtMin,a,he,re.stop,p]),ge=cr.useCallback((function(){var e,t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({name:S,inputMode:w,type:"text",pattern:y,"aria-labelledby":E,"aria-label":_,"aria-describedby":C,id:x,disabled:p},o),{},{readOnly:null!==(e=o.readOnly)&&void 0!==e?e:h,"aria-readonly":null!==(t=o.readOnly)&&void 0!==t?t:h,"aria-required":null!==(n=o.required)&&void 0!==n?n:v,required:null!==(r=o.required)&&void 0!==r?r:v,ref:Tv(Z,i),value:ee(F.value),role:"spinbutton","aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":Number.isNaN(F.valueAsNumber)?void 0:F.valueAsNumber,"aria-invalid":dU(null!=g?g:F.isOutOfRange),"aria-valuetext":le,autoComplete:"off",autoCorrect:"off",onChange:fU(o.onChange,oe),onKeyDown:fU(o.onKeyDown,ae),onFocus:fU(o.onFocus,ie,(function(){return q(!0)})),onBlur:fU(o.onBlur,D,ce)})}),[S,w,y,E,_,ee,C,x,p,v,h,g,F.value,F.valueAsNumber,F.isOutOfRange,l,c,le,oe,ae,ie,D,ce]);return{value:ee(F.value),valueAsNumber:F.valueAsNumber,isFocused:G,isDisabled:p,isReadOnly:h,getIncrementButtonProps:pe,getDecrementButtonProps:ve,getInputProps:ge,htmlProps:R}}(D_(ua(e))),o=r.htmlProps,i=sn(r,Re),a=cr.useMemo((function(){return i}),[i]);return qr.createElement(CU,{value:a},qr.createElement(kU,{value:n},qr.createElement(Lv.div,un(un({},o),{},{ref:t,className:cU("chakra-numberinput",e.className),__css:un({position:"relative",zIndex:0},n.root)}))))}));EU.displayName="NumberInput";var PU=Cv((function(e,t){var n=xU();return qr.createElement(Lv.div,un(un({"aria-hidden":!0,ref:t},e),{},{__css:un({display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1},n.stepperGroup)}))}));PU.displayName="NumberInputStepper";var LU=Cv((function(e,t){var n=(0,_U().getInputProps)(e,t),r=xU();return qr.createElement(Lv.input,un(un({},n),{},{className:cU("chakra-numberinput__field",e.className),__css:un({width:"100%"},r.field)}))}));LU.displayName="NumberInputField";var OU=Lv("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),AU=Cv((function(e,t){var n,r=xU(),o=(0,_U().getDecrementButtonProps)(e,t);return qr.createElement(OU,un(un({},o),{},{__css:r.stepper}),null!==(n=e.children)&&void 0!==n?n:qr.createElement(hU,null))}));AU.displayName="NumberDecrementStepper";var MU=Cv((function(e,t){var n,r=(0,_U().getIncrementButtonProps)(e,t),o=xU();return qr.createElement(OU,un(un({},r),{},{__css:o.stepper}),null!==(n=e.children)&&void 0!==n?n:qr.createElement(pU,null))}));MU.displayName="NumberIncrementStepper";var TU=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};var IU=function(e){return"function"==typeof e};function RU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}function NU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){null==t||t(e)}))}}var DU=yn(Av({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),2),zU=DU[0],jU=DU[1],BU=yn(Av({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Popover />\" "}),2),FU=BU[0],HU=BU[1],VU="click",WU="hover";function UU(e,t){return e===t||(null==e?void 0:e.contains(t))}function GU(e){var t,n=e.currentTarget.ownerDocument.activeElement;return null!==(t=e.relatedTarget)&&void 0!==t?t:n}function qU(e){var t=Pv("Popover",e),n=ua(e),r=n.children,o=sn(n,De),i=vv(),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.closeOnBlur,n=void 0===t||t,r=e.closeOnEsc,o=void 0===r||r,i=e.initialFocusRef,a=e.id,s=e.returnFocusOnClose,l=void 0===s||s,u=e.autoFocus,c=void 0===u||u,d=e.arrowSize,f=e.arrowShadowColor,h=e.trigger,p=void 0===h?VU:h,v=e.openDelay,g=void 0===v?200:v,m=e.closeDelay,y=void 0===m?200:m,b=e.isLazy,w=e.lazyBehavior,k=void 0===w?"unmount":w,x=e.computePositionOnMount,S=sn(e,Ne),C=XO(e),_=C.isOpen,E=C.onClose,P=C.onOpen,L=C.onToggle,O=cr.useRef(null),A=cr.useRef(null),M=cr.useRef(null),T=cr.useRef(!1),I=cr.useRef(!1);_&&(I.current=!0);var R=yn(cr.useState(!1),2),N=R[0],D=R[1],z=yn(cr.useState(!1),2),j=z[0],B=z[1],F=cr.useId(),H=null!=a?a:F,V=yn(["popover-trigger","popover-content","popover-header","popover-body"].map((function(e){return"".concat(e,"-").concat(H)})),4),W=V[0],U=V[1],G=V[2],q=V[3],Y=YO(un(un({},S),{},{enabled:_||!!x})),Z=Y.referenceRef,X=Y.getArrowProps,$=Y.getPopperProps,K=Y.getArrowInnerProps,Q=Y.forceUpdate,J=$O({isOpen:_,ref:M});FE({enabled:_,ref:A}),sL(M,{focusRef:A,visible:_,shouldFocus:l&&p===VU}),uL(M,{focusRef:i,visible:_,shouldFocus:c&&p===VU});var ee=KO({wasSelected:I.current,enabled:b,mode:k,isSelected:J.present}),te=cr.useCallback((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=un(un({},t),{},{style:un(un({},t.style),{},(e={transformOrigin:TO.transformOrigin.varRef},gn(e,TO.arrowSize.var,d?"".concat(d,"px"):void 0),gn(e,TO.arrowShadowColor.var,f),e)),ref:Tv(M,r),children:ee?t.children:null,id:U,tabIndex:-1,role:"dialog",onKeyDown:RU(t.onKeyDown,(function(e){o&&"Escape"===e.key&&E()})),onBlur:RU(t.onBlur,(function(e){var t=GU(e),r=UU(M.current,t),o=UU(A.current,t);_&&n&&!r&&!o&&E()})),"aria-labelledby":N?G:void 0,"aria-describedby":j?q:void 0});return p===WU&&(i.role="tooltip",i.onMouseEnter=RU(t.onMouseEnter,(function(){T.current=!0})),i.onMouseLeave=RU(t.onMouseLeave,(function(e){null!==e.nativeEvent.relatedTarget&&(T.current=!1,setTimeout((function(){return E()}),y))}))),i}),[ee,U,N,G,j,q,p,o,E,_,n,y,f,d]),ne=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return $(un(un({},e),{},{style:un({visibility:_?"visible":"hidden"},e.style)}),t)}),[_,$]),re=cr.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(t,O,Z)})}),[O,Z]),oe=cr.useRef(),ie=cr.useRef(),ae=cr.useCallback((function(e){null==O.current&&Z(e)}),[Z]),se=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=un(un({},e),{},{ref:Tv(A,t,ae),id:W,"aria-haspopup":"dialog","aria-expanded":_,"aria-controls":U});return p===VU&&(r.onClick=RU(e.onClick,L)),p===WU&&(r.onFocus=RU(e.onFocus,(function(){void 0===oe.current&&P()})),r.onBlur=RU(e.onBlur,(function(e){var t=GU(e),r=!UU(M.current,t);_&&n&&r&&E()})),r.onKeyDown=RU(e.onKeyDown,(function(e){"Escape"===e.key&&E()})),r.onMouseEnter=RU(e.onMouseEnter,(function(){T.current=!0,oe.current=window.setTimeout((function(){return P()}),g)})),r.onMouseLeave=RU(e.onMouseLeave,(function(){T.current=!1,oe.current&&(clearTimeout(oe.current),oe.current=void 0),ie.current=window.setTimeout((function(){!1===T.current&&E()}),y)}))),r}),[W,_,U,p,ae,L,P,n,E,g,y]);cr.useEffect((function(){return function(){oe.current&&clearTimeout(oe.current),ie.current&&clearTimeout(ie.current)}}),[]);var le=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{id:G,ref:Tv(e,(function(e){D(!!e)}))})}),[G]),ue=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{id:q,ref:Tv(e,(function(e){B(!!e)}))})}),[q]);return{forceUpdate:Q,isOpen:_,onAnimationComplete:J.onComplete,onClose:E,getAnchorProps:re,getArrowProps:X,getArrowInnerProps:K,getPopoverPositionerProps:ne,getPopoverProps:te,getTriggerProps:se,getHeaderProps:le,getBodyProps:ue}}(un(un({},o),{},{direction:i.direction}));return qr.createElement(zU,{value:a},qr.createElement(FU,{value:t},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];return IU(e)?e.apply(void 0,n):e}(r,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})))}function YU(e){var t,n=e.bg,r=e.bgColor,o=e.backgroundColor,i=jU(),a=i.getArrowProps,s=i.getArrowInnerProps,l=HU(),u=null!==(t=null!=n?n:r)&&void 0!==t?t:o;return qr.createElement(Lv.div,un(un({},a()),{},{className:"chakra-popover__arrow-positioner"}),qr.createElement(Lv.div,un(un({className:TU("chakra-popover__arrow",e.className)},s(e)),{},{__css:un(un({},l.arrow),{},{"--popper-arrow-bg":u?"colors.".concat(u,", ").concat(u):void 0})})))}qU.displayName="Popover",YU.displayName="PopoverArrow";var ZU=Cv((function(e,t){var n=jU().getBodyProps,r=HU();return qr.createElement(Lv.div,un(un({},n(e,t)),{},{className:TU("chakra-popover__body",e.className),__css:r.body}))}));ZU.displayName="PopoverBody";var XU=Cv((function(e,t){var n=jU().onClose,r=HU();return qr.createElement(xE,un({size:"sm",onClick:n,className:TU("chakra-popover__close-btn",e.className),__css:r.closeButton,ref:t},e))}));function $U(e){if(e)return{enter:un(un({},e.enter),{},{visibility:"visible"}),exit:un(un({},e.exit),{},{transitionEnd:{visibility:"hidden"}})}}XU.displayName="PopoverCloseButton";var KU={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},QU=Lv(BS.section),JU=Cv((function(e,t){var n=e.variants,r=void 0===n?KU:n,o=sn(e,ze),i=jU().isOpen;return qr.createElement(QU,un({ref:t,variants:$U(r),initial:!1,animate:i?"enter":"exit"},o))}));JU.displayName="PopoverTransition";var eG=Cv((function(e,t){var n=e.rootProps,r=e.motionProps,o=sn(e,je),i=jU(),a=i.getPopoverProps,s=i.getPopoverPositionerProps,l=i.onAnimationComplete,u=HU(),c=un({position:"relative",display:"flex",flexDirection:"column"},u.content);return qr.createElement(Lv.div,un(un({},s(n)),{},{__css:u.popper,className:"chakra-popover__popper"}),qr.createElement(JU,un(un(un({},r),a(o,t)),{},{onAnimationComplete:NU(l,o.onAnimationComplete),className:TU("chakra-popover__content",e.className),__css:c})))}));eG.displayName="PopoverContent";var tG=Cv((function(e,t){var n=jU().getHeaderProps,r=HU();return qr.createElement(Lv.header,un(un({},n(e,t)),{},{className:TU("chakra-popover__header",e.className),__css:r.header}))}));function nG(e){var t=cr.Children.only(e.children),n=jU().getTriggerProps;return cr.cloneElement(t,n(t.props,t.ref))}tG.displayName="PopoverHeader",nG.displayName="PopoverTrigger";var rG=fl({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),oG=fl({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),iG=fl({"0%":{left:"-40%"},"100%":{left:"100%"}}),aG=fl({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function sG(e){var t=e.value,n=void 0===t?0:t,r=e.min,o=e.max,i=e.valueText,a=e.getValueText,s=e.isIndeterminate,l=e.role,u=void 0===l?"progressbar":l,c=function(e,t,n){return 100*(e-t)/(n-t)}(n,r,o);return{bind:{"data-indeterminate":s?"":void 0,"aria-valuemax":o,"aria-valuemin":r,"aria-valuenow":s?void 0:n,"aria-valuetext":function(){if(null!=n)return"function"==typeof a?a(n,c):i}(),role:u},percent:c,value:n}}var lG=function(e){var t=e.size,n=e.isIndeterminate,r=sn(e,Be);return qr.createElement(Lv.svg,un({viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?"".concat(oG," 2s linear infinite"):void 0}},r))};lG.displayName="Shape";var uG=function(e){return qr.createElement(Lv.circle,un({cx:50,cy:50,r:42,fill:"transparent"},e))};uG.displayName="Circle";var cG=Cv((function(e,t){var n,r=e.size,o=void 0===r?"48px":r,i=e.max,a=void 0===i?100:i,s=e.min,l=void 0===s?0:s,u=e.valueText,c=e.getValueText,d=e.value,f=e.capIsRound,h=e.children,p=e.thickness,v=void 0===p?"10px":p,g=e.color,m=void 0===g?"#0078d4":g,y=e.trackColor,b=void 0===y?"#edebe9":y,w=e.isIndeterminate,k=sn(e,Fe),x=sG({min:l,max:a,value:d,valueText:u,getValueText:c,isIndeterminate:w}),S=w?void 0:2.64*(null!==(n=x.percent)&&void 0!==n?n:0),C=null==S?void 0:"".concat(S," ").concat(264-S),_=w?{css:{animation:"".concat(rG," 1.5s linear infinite")}}:{strokeDashoffset:66,strokeDasharray:C,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},E={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:o};return qr.createElement(Lv.div,un(un(un({ref:t,className:"chakra-progress"},x.bind),k),{},{__css:E}),qr.createElement(lG,{size:o,isIndeterminate:w},qr.createElement(uG,{stroke:b,strokeWidth:v,className:"chakra-progress__track"}),qr.createElement(uG,un({stroke:m,strokeWidth:v,className:"chakra-progress__indicator",strokeLinecap:f?"round":void 0,opacity:0!==x.value||w?void 0:0},_))),h)}));cG.displayName="CircularProgress";var dG=yn(Av({name:"ProgressStylesContext",errorMessage:"useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Progress />\" "}),2),fG=dG[0],hG=dG[1],pG=Cv((function(e,t){var n=e.min,r=e.max,o=e.value,i=e.isIndeterminate,a=e.role,s=sn(e,He),l=sG({value:o,min:n,max:r,isIndeterminate:i,role:a}),u=un({height:"100%"},hG().filledTrack);return qr.createElement(Lv.div,un(un(un({ref:t,style:un({width:"".concat(l.percent,"%")},s.style)},l.bind),s),{},{__css:u}))})),vG=Cv((function(e,t){var n,r=ua(e),o=r.value,i=r.min,a=void 0===i?0:i,s=r.max,l=void 0===s?100:s,u=r.hasStripe,c=r.isAnimated,d=r.children,f=r.borderRadius,h=r.isIndeterminate,p=r["aria-label"],v=r["aria-labelledby"],g=r.title,m=r.role,y=sn(r,Ve),b=Pv("Progress",e),w=null!=f?f:null==(n=b.track)?void 0:n.borderRadius,k={animation:"".concat(aG," 1s linear infinite")},x=un(un({},!h&&u&&c&&k),h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:"".concat(iG," 1s ease infinite normal none running")}),S=un({overflow:"hidden",position:"relative"},b.track);return qr.createElement(Lv.div,un({ref:t,borderRadius:w,__css:S},y),qr.createElement(fG,{value:b},qr.createElement(pG,{"aria-label":p,"aria-labelledby":v,min:a,max:l,value:o,isIndeterminate:h,css:x,borderRadius:w,title:g,role:m}),d))}));vG.displayName="Progress",Lv("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}}).displayName="CircularProgressLabel";var gG=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};var mG=Cv((function(e,t){var n=e.children,r=e.placeholder,o=e.className,i=sn(e,We);return qr.createElement(Lv.select,un(un({},i),{},{ref:t,className:gG("chakra-select",o)}),r&&qr.createElement("option",{value:""},r),n)}));mG.displayName="SelectField";var yG=Cv((function(e,t){var n,r,o=Pv("Select",e),i=ua(e),a=i.rootProps,s=i.placeholder,l=i.icon,u=i.color,c=i.height,d=i.h,f=i.minH,h=i.minHeight,p=i.iconColor,v=i.iconSize,g=function(e,t){for(var n={},r={},o=0,i=Object.entries(e);o<i.length;o++){var a=yn(i[o],2),s=a[0],l=a[1];t.includes(s)?n[s]=l:r[s]=l}return[n,r]}(sn(i,Ue),Qi),m=yn(g,2),y=m[0],b=N_(m[1]),w={width:"100%",height:"fit-content",position:"relative",color:u},k=un(un({paddingEnd:"2rem"},o.field),{},{_focus:un({zIndex:"unset"},null==(n=o.field)?void 0:n._focus)});return qr.createElement(Lv.div,un(un({className:"chakra-select__wrapper",__css:w},y),a),qr.createElement(mG,un(un({ref:t,height:null!=d?d:c,minH:null!=f?f:h,placeholder:s},b),{},{__css:k}),e.children),qr.createElement(kG,un(un({"data-disabled":(r=b.disabled,r?"":void 0)},(p||u)&&{color:p||u}),{},{__css:o.icon},v&&{fontSize:v}),l))}));yG.displayName="Select";var bG=function(e){return qr.createElement("svg",un({viewBox:"0 0 24 24"},e),qr.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))},wG=Lv("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),kG=function(e){var t=e.children,n=void 0===t?qr.createElement(bG,null):t,r=sn(e,Ge),o=cr.cloneElement(n,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return qr.createElement(wG,un(un({},r),{},{className:"chakra-select__icon-wrapper"}),cr.isValidElement(n)?o:null)};function xG(e){var t=function(e){var t;return null!==(t=e.view)&&void 0!==t?t:window}(e);return void 0!==t.PointerEvent&&e instanceof t.PointerEvent?!("mouse"!==e.pointerType):e instanceof t.MouseEvent}function SG(e){return!!e.touches}function CG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page",n=e.touches[0]||e.changedTouches[0];return{x:n["".concat(t,"X")],y:n["".concat(t,"Y")]}}function _G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{x:e["".concat(t,"X")],y:e["".concat(t,"Y")]}}function EG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return SG(e)?CG(e,t):_G(e,t)}function PG(e){return function(t){var n=xG(t);(!n||n&&0===t.button)&&e(t)}}function LG(e,t,n,r){return function(e,t,n,r){return e.addEventListener(t,n,r),function(){e.removeEventListener(t,n,r)}}(e,t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(t){e(t,{point:EG(t)})}var r=t?PG(n):n;return r}(n,"pointerdown"===t),r)}function OG(e){var t=cr.useRef(null);return t.current=e,t}kG.displayName="SelectIcon";var AG=function(){function e(t,n,r){var o,i=this;if(an(this,e),gn(this,"history",[]),gn(this,"startEvent",null),gn(this,"lastEvent",null),gn(this,"lastEventInfo",null),gn(this,"handlers",{}),gn(this,"removeListeners",(function(){})),gn(this,"threshold",3),gn(this,"win",void 0),gn(this,"updatePoint",(function(){if(i.lastEvent&&i.lastEventInfo){var e=TG(i.lastEventInfo,i.history),t=null!==i.startEvent,n=function(e,t){if("number"==typeof e&&"number"==typeof t)return NG(e,t);if(DG(e)&&DG(t)){var n=NG(e.x,t.x),r=NG(e.y,t.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}return 0}(e.offset,{x:0,y:0})>=i.threshold;if(t||n){var r=Pl().timestamp;i.history.push(un(un({},e.point),{},{timestamp:r}));var o=i.handlers,a=o.onStart,s=o.onMove;t||(null==a||a(i.lastEvent,e),i.startEvent=i.lastEvent),null==s||s(i.lastEvent,e)}}})),gn(this,"onPointerMove",(function(e,t){i.lastEvent=e,i.lastEventInfo=t,xl.update(i.updatePoint,!0)})),gn(this,"onPointerUp",(function(e,t){var n=TG(t,i.history),r=i.handlers,o=r.onEnd,a=r.onSessionEnd;null==a||a(e,n),i.end(),o&&i.startEvent&&(null==o||o(e,n))})),this.win=null!==(o=t.view)&&void 0!==o?o:window,!(SG(a=t)&&a.touches.length>1)){var a;this.handlers=n,r&&(this.threshold=r),t.stopPropagation(),t.preventDefault();var s={point:EG(t)},l=Pl().timestamp;this.history=[un(un({},s.point),{},{timestamp:l})];var u=n.onSessionStart;null==u||u(t,TG(s,this.history)),this.removeListeners=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}}(LG(this.win,"pointermove",this.onPointerMove),LG(this.win,"pointerup",this.onPointerUp),LG(this.win,"pointercancel",this.onPointerUp))}}return on(e,[{key:"updateHandlers",value:function(e){this.handlers=e}},{key:"end",value:function(){var e;null==(e=this.removeListeners)||e.call(this),Sl.update(this.updatePoint)}}]),e}();function MG(e,t){return{x:e.x-t.x,y:e.y-t.y}}function TG(e,t){return{point:e.point,delta:MG(e.point,t[t.length-1]),offset:MG(e.point,t[0]),velocity:RG(t,.1)}}var IG=function(e){return 1e3*e};function RG(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=e[e.length-1];n>=0&&(r=e[n],!(o.timestamp-r.timestamp>IG(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function NG(e,t){return Math.abs(e-t)}function DG(e){return"x"in e&&"y"in e}function zG(e,t){var n=t.onPan,r=t.onPanStart,o=t.onPanEnd,i=t.onPanSessionStart,a=t.onPanSessionEnd,s=t.threshold,l=Boolean(n||r||o||i||a),u=cr.useRef(null),c=OG({onSessionStart:i,onSessionEnd:a,onStart:r,onMove:n,onEnd:function(e,t){u.current=null,null==o||o(e,t)}});cr.useEffect((function(){var e;null==(e=u.current)||e.updateHandlers(c.current)})),cr.useEffect((function(){var t=e.current;if(t&&l)return LG(t,"pointerdown",(function(e){u.current=new AG(e,c.current,s)}))}),[e,l,c,s]),cr.useEffect((function(){return function(){var e;null==(e=u.current)||e.end(),u.current=null}}),[])}var jG=Boolean(null==globalThis?void 0:globalThis.document)?cr.useLayoutEffect:cr.useEffect;function BG(e){var t=e.getNodes,n=e.observeMutation,r=void 0===n||n,o=yn(cr.useState([]),2),i=o[0],a=o[1],s=yn(cr.useState(0),2),l=s[0],u=s[1];return jG((function(){var e=t(),n=e.map((function(e,t){return function(e,t){var n;if(e){t({width:e.offsetWidth,height:e.offsetHeight});var r=new(null!==(n=e.ownerDocument.defaultView)&&void 0!==n?n:window).ResizeObserver((function(n){if(Array.isArray(n)&&n.length){var r,o,i=yn(n,1)[0];if("borderBoxSize"in i){var a=i.borderBoxSize,s=Array.isArray(a)?a[0]:a;r=s.inlineSize,o=s.blockSize}else r=e.offsetWidth,o=e.offsetHeight;t({width:r,height:o})}}));return r.observe(e,{box:"border-box"}),function(){return r.unobserve(e)}}t(void 0)}(e,(function(e){a((function(n){return[].concat(cn(n.slice(0,t)),[e],cn(n.slice(t+1)))}))}))}));if(r){var o=e[0];n.push(function(e,t){var n,r;if(e&&e.parentElement){var o=new(null!==(n=null==(r=e.ownerDocument)?void 0:r.defaultView)&&void 0!==n?n:window).MutationObserver((function(){t()}));return o.observe(e.parentElement,{childList:!0}),function(){o.disconnect()}}}(o,(function(){u((function(e){return e+1}))})))}return function(){n.forEach((function(e){null==e||e()}))}}),[l]),i}function FG(e){return yn(BG({observeMutation:!1,getNodes:function(){var t;return["object"===kn(t=e)&&null!==t&&"current"in t?e.current:e]}}),1)[0]}var HG=Object.getOwnPropertyNames,VG=function(e,t){return function(){return e&&(t=(0,e[HG(e)[0]])(e=0)),t}}({"../../../react-shim.js":function(){}});VG(),VG(),VG();var WG=function(e){return e?"":void 0},UG=function(e){return!!e||void 0},GG=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function qG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}function YG(e){var t=e.orientation,n=e.vertical,r=e.horizontal;return"vertical"===t?n:r}VG(),VG(),VG();var ZG={width:0,height:0},XG=function(e){return e||ZG};function $G(e){var t=e.orientation,n=e.thumbPercents,r=e.thumbRects,o=e.isReversed,i="vertical"===t?r.reduce((function(e,t){return XG(e).height>XG(t).height?e:t}),ZG):r.reduce((function(e,t){return XG(e).width>XG(t).width?e:t}),ZG),a=un({position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0},YG({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})),s=un({position:"absolute"},YG({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})),l=1===n.length,u=[0,o?100-n[0]:n[0]],c=l?u:n,d=c[0];!l&&o&&(d=100-d);var f=Math.abs(c[c.length-1]-c[0]);return{trackStyle:s,innerTrackStyle:un(un({},s),YG({orientation:t,vertical:o?{height:"".concat(f,"%"),top:"".concat(d,"%")}:{height:"".concat(f,"%"),bottom:"".concat(d,"%")},horizontal:o?{width:"".concat(f,"%"),right:"".concat(d,"%")}:{width:"".concat(f,"%"),left:"".concat(d,"%")}})),rootStyle:a,getThumbStyle:function(e){var o,i=null!==(o=r[e])&&void 0!==o?o:ZG;return un({position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none"},YG({orientation:t,vertical:{bottom:"calc(".concat(n[e],"% - ").concat(i.height/2,"px)")},horizontal:{left:"calc(".concat(n[e],"% - ").concat(i.width/2,"px)")}}))}}}function KG(e){var t=e.isReversed,n=e.direction,r=e.orientation;return"ltr"===n||"vertical"===r?t:!t}function QG(e){var t=e.min,n=void 0===t?0:t,r=e.max,o=void 0===r?100:r,i=e.onChange,a=e.value,s=e.defaultValue,l=e.isReversed,u=e.direction,c=void 0===u?"ltr":u,d=e.orientation,f=void 0===d?"horizontal":d,h=e.id,p=e.isDisabled,v=e.isReadOnly,g=e.onChangeStart,m=e.onChangeEnd,y=e.step,b=void 0===y?1:y,w=e.getAriaValueText,k=e["aria-valuetext"],x=e["aria-label"],S=e["aria-labelledby"],C=e.name,_=e.focusThumbOnChange,E=void 0===_||_,P=e.minStepsBetweenThumbs,L=void 0===P?0:P,O=sn(e,qe),A=Yv(g),M=Yv(m),T=Yv(w),I=KG({isReversed:l,direction:c,orientation:f}),R=yn(Zv({value:a,defaultValue:null!=s?s:[25,75],onChange:i}),2),N=R[0],D=R[1];if(!Array.isArray(N))throw new TypeError("[range-slider] You passed an invalid value for `value` or `defaultValue`, expected `Array` but got `".concat(kn(N),"`"));var z=yn(cr.useState(!1),2),j=z[0],B=z[1],F=yn(cr.useState(!1),2),H=F[0],V=F[1],W=yn(cr.useState(-1),2),U=W[0],G=W[1],q=!(p||v),Y=cr.useRef(N),Z=N.map((function(e){return LE(e,n,o)})),X=function(e,t,n,r){return e.map((function(o,i){return{min:0===i?t:e[i-1]+r,max:i===e.length-1?n:e[i+1]-r}}))}(Z,n,o,L*b),$=cr.useRef({eventSource:null,value:[],valueBounds:[]});$.current.value=Z,$.current.valueBounds=X;var K=Z.map((function(e){return o-e+n})),Q=(I?K:Z).map((function(e){return _E(e,n,o)})),J="vertical"===f,ee=cr.useRef(null),te=cr.useRef(null),ne=BG({getNodes:function(){var e=te.current,t=null==e?void 0:e.querySelectorAll("[role=slider]");return t?Array.from(t):[]}}),re=cr.useId(),oe=function(e){return{root:"slider-root-".concat(e),getThumb:function(t){return"slider-thumb-".concat(e,"-").concat(t)},getInput:function(t){return"slider-input-".concat(e,"-").concat(t)},track:"slider-track-".concat(e),innerTrack:"slider-filled-track-".concat(e),getMarker:function(t){return"slider-marker-".concat(e,"-").concat(t)},output:"slider-output-".concat(e)}}(null!=h?h:re),ie=cr.useCallback((function(e){var t,r;if(ee.current){$.current.eventSource="pointer";var i=ee.current.getBoundingClientRect(),a=null!==(t=null==(r=e.touches)?void 0:r[0])&&void 0!==t?t:e,s=a.clientX,l=a.clientY,u=(J?i.bottom-l:s-i.left)/(J?i.height:i.width);return I&&(u=1-u),EE(u,n,o)}}),[J,I,o,n]),ae=(o-n)/10,se=b||(o-n)/100,le=cr.useMemo((function(){return{setValueAtIndex:function(e,t){if(q){var n=$.current.valueBounds[e];t=LE(t=parseFloat(PE(t,n.min,se)),n.min,n.max);var r=cn($.current.value);r[e]=t,D(r)}},setActiveIndex:G,stepUp:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se,n=$.current.value[e],r=I?n-t:n+t;le.setValueAtIndex(e,r)},stepDown:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se,n=$.current.value[e],r=I?n+t:n-t;le.setValueAtIndex(e,r)},reset:function(){D(Y.current)}}}),[se,I,D,q]),ue=cr.useCallback((function(e){var t={ArrowRight:function(){return le.stepUp(U)},ArrowUp:function(){return le.stepUp(U)},ArrowLeft:function(){return le.stepDown(U)},ArrowDown:function(){return le.stepDown(U)},PageUp:function(){return le.stepUp(U,ae)},PageDown:function(){return le.stepDown(U,ae)},Home:function(){var e=X[U].min;le.setValueAtIndex(U,e)},End:function(){var e=X[U].max;le.setValueAtIndex(U,e)}}[e.key];t&&(e.preventDefault(),e.stopPropagation(),t(e),$.current.eventSource="keyboard")}),[le,U,ae,X]),ce=cr.useMemo((function(){return $G({isReversed:I,orientation:f,thumbRects:ne,thumbPercents:Q})}),[I,f,Q,ne]),de=ce.getThumbStyle,fe=ce.rootStyle,he=ce.trackStyle,pe=ce.innerTrackStyle,ve=cr.useCallback((function(e){var t,n=null!=e?e:U;if(-1!==n&&E){var r=oe.getThumb(n),o=null==(t=te.current)?void 0:t.ownerDocument.getElementById(r);o&&setTimeout((function(){return o.focus()}))}}),[E,U,oe]);U_((function(){"keyboard"===$.current.eventSource&&(null==M||M($.current.value))}),[Z,M]);zG(te,{onPanSessionStart:function(e){q&&(B(!0),function(e){var t=ie(e)||0,n=$.current.value.map((function(e){return Math.abs(e-t)})),r=Math.min.apply(Math,cn(n)),o=n.indexOf(r),i=n.filter((function(e){return e===r}));i.length>1&&t>$.current.value[o]&&(o=o+i.length-1),G(o),le.setValueAtIndex(o,t),ve(o)}(e),null==A||A($.current.value))},onPanSessionEnd:function(){q&&(B(!1),null==M||M($.current.value))},onPan:function(e){q&&function(e){if(-1!=U){var t=ie(e)||0;G(U),le.setValueAtIndex(U,t),ve(U)}}(e)}});var ge=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un(un({},e),O),{},{id:oe.root,ref:Tv(t,te),tabIndex:-1,"aria-disabled":UG(p),"data-focused":WG(H),style:un(un({},e.style),fe)})}),[O,p,H,fe,oe]),me=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(t,ee),id:oe.track,"data-disabled":WG(p),style:un(un({},e.style),he)})}),[p,he,oe]),ye=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,id:oe.innerTrack,style:un(un({},e.style),pe)})}),[pe,oe]),be=cr.useCallback((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.index,o=sn(e,Ye),i=Z[r];if(null==i)throw new TypeError("[range-slider > thumb] Cannot find value at index `".concat(r,"`. The `value` or `defaultValue` length is : ").concat(Z.length));var a=X[r];return un(un({},o),{},{ref:n,role:"slider",tabIndex:q?0:void 0,id:oe.getThumb(r),"data-active":WG(j&&U===r),"aria-valuetext":null!==(t=null==T?void 0:T(i))&&void 0!==t?t:null==k?void 0:k[r],"aria-valuemin":a.min,"aria-valuemax":a.max,"aria-valuenow":i,"aria-orientation":f,"aria-disabled":UG(p),"aria-readonly":UG(v),"aria-label":null==x?void 0:x[r],"aria-labelledby":(null==x?void 0:x[r])||null==S?void 0:S[r],style:un(un({},e.style),de(r)),onKeyDown:qG(e.onKeyDown,ue),onFocus:qG(e.onFocus,(function(){V(!0),G(r)})),onBlur:qG(e.onBlur,(function(){V(!1),G(-1)}))})}),[oe,Z,X,q,j,U,T,k,f,p,v,x,S,de,ue,V]),we=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,id:oe.output,htmlFor:Z.map((function(e,t){return oe.getThumb(t)})).join(" "),"aria-live":"off"})}),[oe,Z]),ke=cr.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.value,i=sn(e,Ze),a=!(r<n||r>o),s=r>=Z[0]&&r<=Z[Z.length-1],l=_E(r,n,o),u=un({position:"absolute",pointerEvents:"none"},YG({orientation:f,vertical:{bottom:"".concat(l=I?100-l:l,"%")},horizontal:{left:"".concat(l,"%")}}));return un(un({},i),{},{ref:t,id:oe.getMarker(e.value),role:"presentation","aria-hidden":!0,"data-disabled":WG(p),"data-invalid":WG(!a),"data-highlighted":WG(s),style:un(un({},e.style),u)})}),[p,I,o,n,f,Z,oe]),xe=cr.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.index,r=sn(e,Xe);return un(un({},r),{},{ref:t,id:oe.getInput(n),type:"hidden",value:Z[n],name:Array.isArray(C)?C[n]:"".concat(C,"-").concat(n)})}),[C,Z,oe]);return{state:{value:Z,isFocused:H,isDragging:j,getThumbPercent:function(e){return Q[e]},getThumbMinValue:function(e){return X[e].min},getThumbMaxValue:function(e){return X[e].max}},actions:le,getRootProps:ge,getTrackProps:me,getInnerTrackProps:ye,getThumbProps:be,getMarkerProps:ke,getInputProps:xe,getOutputProps:we}}var JG=yn(Av({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),2),eq=JG[0],tq=JG[1],nq=yn(Av({name:"RangeSliderStylesContext",errorMessage:"useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<RangeSlider />\" "}),2),rq=nq[0],oq=nq[1],iq=Cv((function(e,t){var n=Pv("Slider",e),r=ua(e),o=vv().direction;r.direction=o;var i=QG(r),a=i.getRootProps,s=sn(i,$e),l=cr.useMemo((function(){return un(un({},s),{},{name:e.name})}),[s,e.name]);return qr.createElement(eq,{value:l},qr.createElement(rq,{value:n},qr.createElement(Lv.div,un(un({},a({},t)),{},{className:"chakra-slider",__css:n.container}),e.children)))}));iq.defaultProps={orientation:"horizontal"},iq.displayName="RangeSlider";var aq=Cv((function(e,t){var n=tq(),r=n.getThumbProps,o=n.getInputProps,i=n.name,a=oq(),s=r(e,t);return qr.createElement(Lv.div,un(un({},s),{},{className:GG("chakra-slider__thumb",e.className),__css:a.thumb}),s.children,i&&qr.createElement("input",un({},o({index:e.index}))))}));aq.displayName="RangeSliderThumb";var sq=Cv((function(e,t){var n=tq().getTrackProps,r=oq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:GG("chakra-slider__track",e.className),__css:r.track,"data-testid":"chakra-range-slider-track"}))}));sq.displayName="RangeSliderTrack";var lq=Cv((function(e,t){var n=tq().getInnerTrackProps,r=oq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:"chakra-slider__filled-track",__css:r.filledTrack}))}));function uq(e){var t=e.orientation,n=e.vertical,r=e.horizontal;return"vertical"===t?n:r}function cq(e,t){return t<e?e:e+(t-e)/2}lq.displayName="RangeSliderFilledTrack",Cv((function(e,t){var n=(0,tq().getMarkerProps)(e,t);return qr.createElement(Lv.div,un(un({},n),{},{className:GG("chakra-slider__marker",e.className)}))})).displayName="RangeSliderMark",VG(),VG();var dq=yn(Av({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),2),fq=dq[0],hq=dq[1],pq=yn(Av({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),2),vq=pq[0],gq=pq[1],mq=Cv((function(e,t){var n=Pv("Slider",e),r=ua(e),o=vv().direction;r.direction=o;var i=function(e){var t,n=e.min,r=void 0===n?0:n,o=e.max,i=void 0===o?100:o,a=e.onChange,s=e.value,l=e.defaultValue,u=e.isReversed,c=e.direction,d=void 0===c?"ltr":c,f=e.orientation,h=void 0===f?"horizontal":f,p=e.id,v=e.isDisabled,g=e.isReadOnly,m=e.onChangeStart,y=e.onChangeEnd,b=e.step,w=void 0===b?1:b,k=e.getAriaValueText,x=e["aria-valuetext"],S=e["aria-label"],C=e["aria-labelledby"],_=e.name,E=e.focusThumbOnChange,P=void 0===E||E,L=sn(e,Ke),O=Yv(m),A=Yv(y),M=Yv(k),T=KG({isReversed:u,direction:d,orientation:h}),I=yn(Zv({value:s,defaultValue:null!=l?l:cq(r,i),onChange:a}),2),R=I[0],N=I[1],D=yn(cr.useState(!1),2),z=D[0],j=D[1],B=yn(cr.useState(!1),2),F=B[0],H=B[1],V=!(v||g),W=(i-r)/10,U=w||(i-r)/100,G=LE(R,r,i),q=_E(T?i-G+r:G,r,i),Y="vertical"===h,Z=OG({min:r,max:i,step:w,isDisabled:v,value:G,isInteractive:V,isReversed:T,isVertical:Y,eventSource:null,focusThumbOnChange:P,orientation:h}),X=cr.useRef(null),$=cr.useRef(null),K=cr.useRef(null),Q=cr.useId(),J=null!=p?p:Q,ee="slider-thumb-".concat(J),te="slider-track-".concat(J),ne=cr.useCallback((function(e){var t,n;if(X.current){var r=Z.current;r.eventSource="pointer";var o=X.current.getBoundingClientRect(),i=null!==(t=null==(n=e.touches)?void 0:n[0])&&void 0!==t?t:e,a=i.clientX,s=i.clientY,l=(Y?o.bottom-s:a-o.left)/(Y?o.height:o.width);T&&(l=1-l);var u=EE(l,r.min,r.max);return r.step&&(u=parseFloat(PE(u,r.min,r.step))),LE(u,r.min,r.max)}}),[Y,T,Z]),re=cr.useCallback((function(e){var t=Z.current;t.isInteractive&&(e=LE(e=parseFloat(PE(e,t.min,U)),t.min,t.max),N(e))}),[U,N,Z]),oe=cr.useMemo((function(){return{stepUp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;re(T?G-e:G+e)},stepDown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;re(T?G+e:G-e)},reset:function(){re(l||0)},stepTo:function(e){re(e)}}}),[re,T,G,U,l]),ie=cr.useCallback((function(e){var t=Z.current,n={ArrowRight:function(){return oe.stepUp()},ArrowUp:function(){return oe.stepUp()},ArrowLeft:function(){return oe.stepDown()},ArrowDown:function(){return oe.stepDown()},PageUp:function(){return oe.stepUp(W)},PageDown:function(){return oe.stepDown(W)},Home:function(){return re(t.min)},End:function(){return re(t.max)}}[e.key];n&&(e.preventDefault(),e.stopPropagation(),n(e),t.eventSource="keyboard")}),[oe,re,W,Z]),ae=null!==(t=null==M?void 0:M(G))&&void 0!==t?t:x,se=FG($),le=cr.useMemo((function(){var e=Z.current,t=null!=se?se:{width:0,height:0};return $G({isReversed:T,orientation:e.orientation,thumbRects:[t],thumbPercents:[q]})}),[T,se,q,Z]),ue=le.getThumbStyle,ce=le.rootStyle,de=le.trackStyle,fe=le.innerTrackStyle,he=cr.useCallback((function(){Z.current.focusThumbOnChange&&setTimeout((function(){var e;return null==(e=$.current)?void 0:e.focus()}))}),[Z]);function pe(e){var t=ne(e);null!=t&&t!==Z.current.value&&N(t)}U_((function(){var e=Z.current;he(),"keyboard"===e.eventSource&&(null==A||A(e.value))}),[G,A]),zG(K,{onPanSessionStart:function(e){var t=Z.current;t.isInteractive&&(j(!0),he(),pe(e),null==O||O(t.value))},onPanSessionEnd:function(){var e=Z.current;e.isInteractive&&(j(!1),null==A||A(e.value))},onPan:function(e){Z.current.isInteractive&&pe(e)}});var ve=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un(un({},e),L),{},{ref:Tv(t,K),tabIndex:-1,"aria-disabled":UG(v),"data-focused":WG(F),style:un(un({},e.style),ce)})}),[L,v,F,ce]),ge=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(t,X),id:te,"data-disabled":WG(v),style:un(un({},e.style),de)})}),[v,te,de]),me=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:t,style:un(un({},e.style),fe)})}),[fe]),ye=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},e),{},{ref:Tv(t,$),role:"slider",tabIndex:V?0:void 0,id:ee,"data-active":WG(z),"aria-valuetext":ae,"aria-valuemin":r,"aria-valuemax":i,"aria-valuenow":G,"aria-orientation":h,"aria-disabled":UG(v),"aria-readonly":UG(g),"aria-label":S,"aria-labelledby":S?void 0:C,style:un(un({},e.style),ue(0)),onKeyDown:qG(e.onKeyDown,ie),onFocus:qG(e.onFocus,(function(){return H(!0)})),onBlur:qG(e.onBlur,(function(){return H(!1)}))})}),[V,ee,z,ae,r,i,G,h,v,g,S,C,ue,ie]),be=cr.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=!(e.value<r||e.value>i),o=G>=e.value,a=_E(e.value,r,i),s=un({position:"absolute",pointerEvents:"none"},uq({orientation:h,vertical:{bottom:"".concat(T?100-a:a,"%")},horizontal:{left:"".concat(T?100-a:a,"%")}}));return un(un({},e),{},{ref:t,role:"presentation","aria-hidden":!0,"data-disabled":WG(v),"data-invalid":WG(!n),"data-highlighted":WG(o),style:un(un({},e.style),s)})}),[v,T,i,r,h,G]),we=cr.useCallback((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return un(un({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,type:"hidden",value:G,name:_})}),[_,G]);return{state:{value:G,isFocused:F,isDragging:z},actions:oe,getRootProps:ve,getTrackProps:ge,getInnerTrackProps:me,getThumbProps:ye,getMarkerProps:be,getInputProps:we}}(r),a=i.getInputProps,s=i.getRootProps,l=sn(i,Qe),u=s(),c=a({},t);return qr.createElement(fq,{value:l},qr.createElement(vq,{value:n},qr.createElement(Lv.div,un(un({},u),{},{className:GG("chakra-slider",e.className),__css:n.container}),e.children,qr.createElement("input",un({},c)))))}));mq.defaultProps={orientation:"horizontal"},mq.displayName="Slider";var yq=Cv((function(e,t){var n=hq().getThumbProps,r=gq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:GG("chakra-slider__thumb",e.className),__css:r.thumb}))}));yq.displayName="SliderThumb";var bq=Cv((function(e,t){var n=hq().getTrackProps,r=gq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:GG("chakra-slider__track",e.className),__css:r.track}))}));bq.displayName="SliderTrack";var wq=Cv((function(e,t){var n=hq().getInnerTrackProps,r=gq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:GG("chakra-slider__filled-track",e.className),__css:r.filledTrack}))}));wq.displayName="SliderFilledTrack";var kq=Cv((function(e,t){var n=hq().getMarkerProps,r=gq(),o=n(e,t);return qr.createElement(Lv.div,un(un({},o),{},{className:GG("chakra-slider__marker",e.className),__css:r.mark}))}));kq.displayName="SliderMark";var xq=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},Sq=function(e){return e?"":void 0},Cq=Cv((function(e,t){var n=Pv("Switch",e),r=ua(e),o=r.spacing,i=void 0===o?"0.5rem":o,a=r.children,s=hE(sn(r,Je)),l=s.state,u=s.getInputProps,c=s.getCheckboxProps,d=s.getRootProps,f=s.getLabelProps,h=cr.useMemo((function(){return un({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0},n.container)}),[n.container]),p=cr.useMemo((function(){return un({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},n.track)}),[n.track]),v=cr.useMemo((function(){return un({userSelect:"none",marginStart:i},n.label)}),[i,n.label]);return qr.createElement(Lv.label,un(un({},d()),{},{className:xq("chakra-switch",e.className),__css:h}),qr.createElement("input",un({className:"chakra-switch__input"},u({},t))),qr.createElement(Lv.span,un(un({},c()),{},{className:"chakra-switch__track",__css:p}),qr.createElement(Lv.span,{__css:n.thumb,className:"chakra-switch__thumb","data-checked":Sq(l.isChecked),"data-hover":Sq(l.isHovered)})),a&&qr.createElement(Lv.span,un(un({className:"chakra-switch__label"},f()),{},{__css:v}),a))}));Cq.displayName="Switch";var _q=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function Eq(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var Pq=yn(Vv(),4),Lq=Pq[0],Oq=Pq[1],Aq=Pq[2],Mq=Pq[3];var Tq=yn(Av({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"}),2),Iq=Tq[0],Rq=Tq[1];function Nq(e){var t=e.isDisabled,n=e.isFocusable,r=sn(e,tt),o=Rq(),i=o.setSelectedIndex,a=o.isManual,s=o.id,l=o.setFocusedIndex,u=o.selectedIndex,c=Mq({disabled:t&&!n}),d=c.index,f=c.register,h=d===u,p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ref,n=e.isDisabled,r=e.isFocusable,o=e.clickOnEnter,i=void 0===o||o,a=e.clickOnSpace,s=void 0===a||a,l=e.onMouseDown,u=e.onMouseUp,c=e.onClick,d=e.onKeyDown,f=e.onKeyUp,h=e.tabIndex,p=e.onMouseOver,v=e.onMouseLeave,g=sn(e,ke),m=yn(cr.useState(!0),2),y=m[0],b=m[1],w=yn(cr.useState(!1),2),k=w[0],x=w[1],S=XP(),C=function(e){e&&"BUTTON"!==e.tagName&&b(!1)},_=y?h:h||0,E=n&&!r,P=cr.useCallback((function(e){if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==c||c(e)}),[n,c]),L=cr.useCallback((function(e){k&&$P(e)&&(e.preventDefault(),e.stopPropagation(),x(!1),S.remove(document,"keyup",L,!1))}),[k,S]),O=cr.useCallback((function(e){if(null==d||d(e),!(n||e.defaultPrevented||e.metaKey)&&$P(e.nativeEvent)&&!y){var t=i&&"Enter"===e.key;s&&" "===e.key&&(e.preventDefault(),x(!0)),t&&(e.preventDefault(),e.currentTarget.click()),S.add(document,"keyup",L,!1)}}),[n,y,d,i,s,S,L]),A=cr.useCallback((function(e){null==f||f(e),n||e.defaultPrevented||e.metaKey||$P(e.nativeEvent)&&!y&&s&&" "===e.key&&(e.preventDefault(),x(!1),e.currentTarget.click())}),[s,y,n,f]),M=cr.useCallback((function(e){0===e.button&&(x(!1),S.remove(document,"mouseup",M,!1))}),[S]),T=cr.useCallback((function(e){if(0===e.button){if(n)return e.stopPropagation(),void e.preventDefault();y||x(!0),e.currentTarget.focus({preventScroll:!0}),S.add(document,"mouseup",M,!1),null==l||l(e)}}),[n,y,l,S,M]),I=cr.useCallback((function(e){0===e.button&&(y||x(!1),null==u||u(e))}),[u,y]),R=cr.useCallback((function(e){n?e.preventDefault():null==p||p(e)}),[n,p]),N=cr.useCallback((function(e){k&&(e.preventDefault(),x(!1)),null==v||v(e)}),[k,v]),D=Tv(t,C);return un(un({},g),{},y?{ref:D,type:"button","aria-disabled":E?void 0:n,disabled:E,onClick:P,onMouseDown:l,onMouseUp:u,onKeyUp:f,onKeyDown:d,onMouseOver:p,onMouseLeave:v}:{ref:D,role:"button","data-active":ZP(k),"aria-disabled":n?"true":void 0,tabIndex:E?void 0:_,onClick:P,onMouseDown:T,onMouseUp:I,onKeyUp:A,onKeyDown:O,onMouseOver:R,onMouseLeave:N})}(un(un({},r),{},{ref:Tv(f,e.ref),isDisabled:t,isFocusable:n,onClick:Eq(e.onClick,(function(){i(d)}))}));return un(un({},p),{},{id:Bq(s,d),role:"tab",tabIndex:h?0:-1,type:"button","aria-selected":h,"aria-controls":Fq(s,d),onFocus:t?void 0:Eq(e.onFocus,(function(){l(d),!a&&!(t&&n)&&i(d)}))})}var Dq=yn(Av({}),2),zq=Dq[0],jq=Dq[1];function Bq(e,t){return"".concat(e,"--tab-").concat(t)}function Fq(e,t){return"".concat(e,"--tabpanel-").concat(t)}var Hq=yn(Av({name:"TabsStylesContext",errorMessage:"useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Tabs />\" "}),2),Vq=Hq[0],Wq=Hq[1],Uq=Cv((function(e,t){var n=Pv("Tabs",e),r=ua(e),o=r.children,i=r.className,a=function(e){var t,n=e.defaultIndex,r=e.onChange,o=e.index,i=e.isManual,a=e.isLazy,s=e.lazyBehavior,l=void 0===s?"unmount":s,u=e.orientation,c=void 0===u?"horizontal":u,d=e.direction,f=void 0===d?"ltr":d,h=sn(e,et),p=yn(cr.useState(null!=n?n:0),2),v=p[0],g=p[1],m=yn(Zv({defaultValue:null!=n?n:0,value:o,onChange:r}),2),y=m[0],b=m[1];cr.useEffect((function(){null!=o&&g(o)}),[o]);var w=Aq(),k=cr.useId(),x=null!==(t=e.id)&&void 0!==t?t:k;return{id:"tabs-".concat(x),selectedIndex:y,focusedIndex:v,setSelectedIndex:b,setFocusedIndex:g,isManual:i,isLazy:a,lazyBehavior:l,orientation:c,descendants:w,direction:f,htmlProps:h}}(sn(r,rt)),s=a.htmlProps,l=a.descendants,u=sn(a,ot),c=cr.useMemo((function(){return u}),[u]),d=(s.isFitted,sn(s,it));return qr.createElement(Lq,{value:l},qr.createElement(Iq,{value:c},qr.createElement(Vq,{value:n},qr.createElement(Lv.div,un(un({className:_q("chakra-tabs",i),ref:t},d),{},{__css:n.root}),o))))}));Uq.displayName="Tabs";var Gq=Cv((function(e,t){var n,r,o,i,a,s,l,u,c,d,f,h,p=(n=Rq(),r=Oq(),o=n.selectedIndex,i=n.orientation,a="horizontal"===i,s="vertical"===i,l=yn(cr.useState((function(){return a?{left:0,width:0}:s?{top:0,height:0}:void 0})),2),u=l[0],c=l[1],d=yn(cr.useState(!1),2),f=d[0],h=d[1],oo((function(){if(null!=o){var e=r.item(o);if(null!=e){a&&c({left:e.node.offsetLeft,width:e.node.offsetWidth}),s&&c({top:e.node.offsetTop,height:e.node.offsetHeight});var t=requestAnimationFrame((function(){h(!0)}));return function(){t&&cancelAnimationFrame(t)}}}}),[o,a,s,r]),un({position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:f?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"},u)),v=un(un({},e.style),p),g=Wq();return qr.createElement(Lv.div,un(un({ref:t},e),{},{className:_q("chakra-tabs__tab-indicator",e.className),style:v,__css:g.indicator}))}));Gq.displayName="TabIndicator";var qq=Cv((function(e,t){var n=function(e){var t=Rq(),n=t.focusedIndex,r=t.orientation,o=t.direction,i=Oq(),a=cr.useCallback((function(e){var t,a=function(){var e,t=i.nextEnabled(n);t&&(null==(e=t.node)||e.focus())},s=function(){var e,t=i.prevEnabled(n);t&&(null==(e=t.node)||e.focus())},l="horizontal"===r,u="vertical"===r,c=e.key,d="ltr"===o?"ArrowRight":"ArrowLeft",f=(gn(t={},"ltr"===o?"ArrowLeft":"ArrowRight",(function(){return l&&s()})),gn(t,d,(function(){return l&&a()})),gn(t,"ArrowDown",(function(){return u&&a()})),gn(t,"ArrowUp",(function(){return u&&s()})),gn(t,"Home",(function(){var e,t=i.firstEnabled();t&&(null==(e=t.node)||e.focus())})),gn(t,"End",(function(){var e,t=i.lastEnabled();t&&(null==(e=t.node)||e.focus())})),t),h=f[c];h&&(e.preventDefault(),h(e))}),[i,n,r,o]);return un(un({},e),{},{role:"tablist","aria-orientation":r,onKeyDown:Eq(e.onKeyDown,a)})}(un(un({},e),{},{ref:t})),r=un({display:"flex"},Wq().tablist);return qr.createElement(Lv.div,un(un({},n),{},{className:_q("chakra-tabs__tablist",e.className),__css:r}))}));qq.displayName="TabList";var Yq=Cv((function(e,t){var n=function(e){var t=e.children,n=sn(e,nt),r=Rq(),o=r.isLazy,i=r.lazyBehavior,a=jq(),s=a.isSelected,l=a.id,u=a.tabId,c=cr.useRef(!1);s&&(c.current=!0);var d=KO({wasSelected:c.current,isSelected:s,enabled:o,mode:i});return un(un({tabIndex:0},n),{},{children:d?t:null,role:"tabpanel","aria-labelledby":u,hidden:!s,id:l})}(un(un({},e),{},{ref:t})),r=Wq();return qr.createElement(Lv.div,un(un({outline:"0"},n),{},{className:_q("chakra-tabs__tab-panel",e.className),__css:r.tabpanel}))}));Yq.displayName="TabPanel";var Zq=Cv((function(e,t){var n=function(e){var t=Rq(),n=t.id,r=t.selectedIndex,o=d_(e.children).map((function(e,t){return cr.createElement(zq,{key:t,value:{isSelected:t===r,id:Fq(n,t),tabId:Bq(n,t),selectedIndex:r}},e)}));return un(un({},e),{},{children:o})}(e),r=Wq();return qr.createElement(Lv.div,un(un({},n),{},{width:"100%",ref:t,className:_q("chakra-tabs__tab-panels",e.className),__css:r.tabpanels}))}));Zq.displayName="TabPanels";var Xq=Cv((function(e,t){var n=Wq(),r=Nq(un(un({},e),{},{ref:t})),o=un({outline:"0",display:"flex",alignItems:"center",justifyContent:"center"},n.tab);return qr.createElement(Lv.button,un(un({},r),{},{className:_q("chakra-tabs__tab",e.className),__css:o}))}));Xq.displayName="Tab";var $q=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};var Kq=["h","minH","height","minHeight"],Qq=Cv((function(e,t){var n=Ev("Textarea",e),r=ua(e),o=r.className,i=r.rows,a=N_(sn(r,at)),s=i?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=xn(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(COe){o.e(COe)}finally{o.f()}return r}(n,Kq):n;return qr.createElement(Lv.textarea,un(un({ref:t,rows:i},a),{},{className:$q("chakra-textarea",o),__css:s}))}));function Jq(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 eY(e)?e.apply(void 0,n):e}Qq.displayName="Textarea";var eY=function(e){return"function"==typeof e};function tY(e,t){var n,r=null!=e?e:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return null!==(n=null==o?void 0:o[t])&&void 0!==n?n:r}var nY=function(e,t){return e.find((function(e){return e.id===t}))};function rY(e,t){var n=oY(e,t);return{position:n,index:n?e[n].findIndex((function(e){return e.id===t})):-1}}function oY(e,t){for(var n=0,r=Object.entries(e);n<r.length;n++){var o=yn(r[n],2),i=o[0],a=o[1];if(nY(a,t))return i}}function iY(e){return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,bottom:e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,right:e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:e.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}}var aY=function(e){var t=e,n=new Set,r=function(e){t=e(t),n.forEach((function(e){return e()}))};return{getState:function(){return t},subscribe:function(t){return n.add(t),function(){r((function(){return e})),n.delete(t)}},removeToast:function(e,t){r((function(n){return un(un({},n),{},gn({},t,n[t].filter((function(t){return t.id!=e}))))}))},notify:function(e,t){var n=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};sY+=1;var o=null!==(t=r.id)&&void 0!==t?t:sY,i=null!==(n=r.position)&&void 0!==n?n:"bottom";return{id:o,message:e,position:i,duration:r.duration,onCloseComplete:r.onCloseComplete,onRequestRemove:function(){return aY.removeToast(String(o),i)},status:r.status,requestClose:!1,containerStyle:r.containerStyle}}(e,t),o=n.position,i=n.id;return r((function(e){var t,r,i=o.includes("top")?[n].concat(cn(null!==(t=e[o])&&void 0!==t?t:[])):[].concat(cn(null!==(r=e[o])&&void 0!==r?r:[]),[n]);return un(un({},e),{},gn({},o,i))})),i},update:function(e,t){e&&r((function(n){var r=un({},n),o=rY(r,e),i=o.position,a=o.index;return i&&-1!==a&&(r[i][a]=un(un(un({},r[i][a]),t),{},{message:uY(t)})),r}))},closeAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.positions;r((function(e){return(null!=t?t:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((function(t,n){return t[n]=e[n].map((function(e){return un(un({},e),{},{requestClose:!0})})),t}),un({},e))}))},close:function(e){r((function(t){var n=oY(t,e);return n?un(un({},t),{},gn({},n,t[n].map((function(t){return t.id==e?un(un({},t),{},{requestClose:!0}):t})))):t}))},isActive:function(e){return Boolean(rY(aY.getState(),e).position)}}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});var sY=0;var lY=function(e){var t=e.status,n=e.variant,r=void 0===n?"solid":n,o=e.id,i=e.title,a=e.isClosable,s=e.onClose,l=e.description,u=e.icon,c=o?{root:"toast-".concat(o),title:"toast-".concat(o,"-title"),description:"toast-".concat(o,"-description")}:void 0;return qr.createElement(i_,{addRole:!1,status:t,variant:r,id:null==c?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},qr.createElement(s_,null,u),qr.createElement(Lv.div,{flex:"1",maxWidth:"100%"},i&&qr.createElement(l_,{id:null==c?void 0:c.title},i),l&&qr.createElement(a_,{id:null==c?void 0:c.description,display:"block"},l)),a&&qr.createElement(xE,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1}))};function uY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.render,n=e.toastComponent,r=void 0===n?lY:n,o=function(n){return"function"==typeof t?t(un(un({},n),e)):qr.createElement(r,un(un({},n),e))};return o}function cY(e){var t=gv().theme;return cr.useMemo((function(){return function(e,t){var n=function(n){var r;return un(un(un({},t),n),{},{position:tY(null!==(r=null==n?void 0:n.position)&&void 0!==r?r:null==t?void 0:t.position,e)})},r=function(e){var t=n(e),r=uY(t);return aY.notify(r,t)};return r.update=function(e,t){aY.update(e,n(t))},r.promise=function(e,t){var n=r(un(un({},t.loading),{},{status:"loading",duration:null}));e.then((function(e){return r.update(n,un({status:"success",duration:5e3},Jq(t.success,e)))})).catch((function(e){return r.update(n,un({status:"error",duration:5e3},Jq(t.error,e)))}))},r.closeAll=aY.closeAll,r.close=aY.close,r.isActive=aY.isActive,r}(t.direction,e)}),[e,t.direction])}var dY={initial:function(e){var t=e.position,n=["top","bottom"].includes(t)?"y":"x",r=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(r=1),gn({opacity:0},n,24*r)},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},fY=cr.memo((function(e){var t=e.id,n=e.message,r=e.onCloseComplete,o=e.onRequestRemove,i=e.requestClose,a=void 0!==i&&i,s=e.position,l=void 0===s?"bottom":s,u=e.duration,c=void 0===u?5e3:u,d=e.containerStyle,f=e.motionVariants,h=void 0===f?dY:f,p=e.toastSpacing,v=void 0===p?"0.5rem":p,g=yn(cr.useState(c),2),m=g[0],y=g[1],b=rw();U_((function(){b||null==r||r()}),[b]),U_((function(){y(c)}),[c]);var w=function(){b&&o()};cr.useEffect((function(){b&&a&&o()}),[b,a,o]),function(e,t){var n=Yv(e);cr.useEffect((function(){var e;if(null!=t)return e=window.setTimeout((function(){n()}),t),function(){e&&window.clearTimeout(e)}}),[t,n])}(w,m);var k=cr.useMemo((function(){return un({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:v},d)}),[d,v]),x=cr.useMemo((function(){return function(e){var t="center";return e.includes("right")&&(t="flex-end"),e.includes("left")&&(t="flex-start"),{display:"flex",flexDirection:"column",alignItems:t}}(l)}),[l]);return qr.createElement(BS.li,{layout:!0,className:"chakra-toast",variants:h,initial:"initial",animate:"animate",exit:"exit",onHoverStart:function(){return y(null)},onHoverEnd:function(){return y(c)},custom:{position:l},style:x},qr.createElement(Lv.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:k},Jq(n,{id:t,onClose:w})))}));fY.displayName="ToastComponent";var hY=function(e){var t=cr.useSyncExternalStore(aY.subscribe,aY.getState,aY.getState),n=e.children,r=e.motionVariants,o=e.component,i=void 0===o?fY:o,a=e.portalProps,s=Object.keys(t).map((function(e){var n=t[e];return qr.createElement("ul",{role:"region","aria-live":"polite",key:e,id:"chakra-toast-manager-".concat(e),style:iY(e)},qr.createElement(qS,{initial:!1},n.map((function(e){return qr.createElement(i,un({key:e.id,motionVariants:r},e))}))))}));return qr.createElement(qr.Fragment,null,n,qr.createElement(gH,un({},a),s))};var pY={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function vY(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((function(t){return null==t||t(e),null==e?void 0:e.defaultPrevented}))}}var gY=function(e){var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},mY=function(e){var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window};var yY="chakra-ui:close-tooltip";function bY(e,t){return cr.useEffect((function(){var n=gY(e);return n.addEventListener(yY,t),function(){return n.removeEventListener(yY,t)}}),[t,e]),function(){var t=gY(e),n=mY(e);t.dispatchEvent(new n.CustomEvent(yY))}}var wY=Lv(BS.div),kY=Cv((function(e,t){var n,r,o=Ev("Tooltip",e),i=ua(e),a=vv(),s=i.children,l=i.label,u=i.shouldWrapChildren,c=i["aria-label"],d=i.hasArrow,f=i.bg,h=i.portalProps,p=i.background,v=i.backgroundColor,g=i.bgColor,m=i.motionProps,y=sn(i,lt),b=null!==(n=null!==(r=null!=p?p:v)&&void 0!==r?r:f)&&void 0!==n?n:g;if(b){o.bg=b;var w=function(e,t,n){var r,o,i;return null!==(r=null==(i=null==(o=e.__cssMap)?void 0:o["".concat(t,".").concat(n)])?void 0:i.varRef)&&void 0!==r?r:n}(a,"colors",b);o[TO.arrowBg.var]=w}var k,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.openDelay,n=void 0===t?0:t,r=e.closeDelay,o=void 0===r?0:r,i=e.closeOnClick,a=void 0===i||i,s=e.closeOnMouseDown,l=e.closeOnScroll,u=e.closeOnPointerDown,c=void 0===u?s:u,d=e.closeOnEsc,f=void 0===d||d,h=e.onOpen,p=e.onClose,v=e.placement,g=e.id,m=e.isOpen,y=e.defaultIsOpen,b=e.arrowSize,w=void 0===b?10:b,k=e.arrowShadowColor,x=e.arrowPadding,S=e.modifiers,C=e.isDisabled,_=e.gutter,E=e.offset,P=e.direction,L=sn(e,st),O=XO({isOpen:m,defaultIsOpen:y,onOpen:h,onClose:p}),A=O.isOpen,M=O.onOpen,T=O.onClose,I=YO({enabled:A,placement:v,arrowPadding:x,modifiers:S,gutter:_,offset:E,direction:P}),R=I.referenceRef,N=I.getPopperProps,D=I.getArrowInnerProps,z=I.getArrowProps,j=cr.useId(),B=null!=g?g:j,F="tooltip-".concat(B),H=cr.useRef(null),V=cr.useRef(),W=cr.useCallback((function(){V.current&&(clearTimeout(V.current),V.current=void 0)}),[]),U=cr.useRef(),G=cr.useCallback((function(){U.current&&(clearTimeout(U.current),U.current=void 0)}),[]),q=cr.useCallback((function(){G(),T()}),[T,G]),Y=bY(H,q),Z=cr.useCallback((function(){if(!C&&!V.current){Y();var e=mY(H);V.current=e.setTimeout(M,n)}}),[Y,C,M,n]),X=cr.useCallback((function(){W();var e=mY(H);U.current=e.setTimeout(q,o)}),[o,q,W]),$=cr.useCallback((function(){A&&a&&X()}),[a,X,A]),K=cr.useCallback((function(){A&&c&&X()}),[c,X,A]),Q=cr.useCallback((function(e){A&&"Escape"===e.key&&X()}),[A,X]);DE((function(){return gY(H)}),"keydown",f?Q:void 0),DE((function(){return gY(H)}),"scroll",(function(){A&&l&&q()})),cr.useEffect((function(){C&&(W(),A&&T())}),[C,A,T,W]),cr.useEffect((function(){return function(){W(),G()}}),[W,G]),DE((function(){return H.current}),"pointerleave",X);var J=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=un(un({},e),{},{ref:Tv(H,t,R),onPointerEnter:vY(e.onPointerEnter,(function(e){"touch"!==e.pointerType&&Z()})),onClick:vY(e.onClick,$),onPointerDown:vY(e.onPointerDown,K),onFocus:vY(e.onFocus,Z),onBlur:vY(e.onBlur,X),"aria-describedby":A?F:void 0});return n}),[Z,X,K,A,F,$,R]),ee=cr.useCallback((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return N(un(un({},t),{},{style:un(un({},t.style),{},(e={},gn(e,TO.arrowSize.var,w?"".concat(w,"px"):void 0),gn(e,TO.arrowShadowColor.var,k),e))}),n)}),[N,w,k]),te=cr.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=un(un({},e.style),{},{position:"relative",transformOrigin:TO.transformOrigin.varRef});return un(un(un({ref:t},L),e),{},{id:F,role:"tooltip",style:n})}),[L,F]);return{isOpen:A,show:Z,hide:X,getTriggerProps:J,getTooltipProps:te,getTooltipPositionerProps:ee,getArrowProps:z,getArrowInnerProps:D}}(un(un({},y),{},{direction:a.direction}));if("string"==typeof s||u)k=qr.createElement(Lv.span,un({display:"inline-block",tabIndex:0},x.getTriggerProps()),s);else{var S=cr.Children.only(s);k=cr.cloneElement(S,x.getTriggerProps(S.props,S.ref))}var C=!!c,_=x.getTooltipProps({},t),E=C?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=xn(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(COe){o.e(COe)}finally{o.f()}return r}(_,["role","id"]):_,P=function(e,t){var n,r={},o=xn(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;i in e&&(r[i]=e[i])}}catch(COe){o.e(COe)}finally{o.f()}return r}(_,["role","id"]);return l?qr.createElement(qr.Fragment,null,k,qr.createElement(qS,null,x.isOpen&&qr.createElement(gH,un({},h),qr.createElement(Lv.div,un(un({},x.getTooltipPositionerProps()),{},{__css:{zIndex:o.zIndex,pointerEvents:"none"}}),qr.createElement(wY,un(un(un({variants:pY,initial:"exit",animate:"enter",exit:"exit"},m),E),{},{__css:o}),l,C&&qr.createElement(Lv.span,un({srOnly:!0},P),c),d&&qr.createElement(Lv.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},qr.createElement(Lv.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}}))))))):qr.createElement(qr.Fragment,null,s)}));kY.displayName="Tooltip";var xY=function(e){var t=e.children,n=e.colorModeManager,r=e.portalZIndex,o=e.resetCSS,i=void 0===o||o,a=e.theme,s=void 0===a?{}:a,l=e.environment,u=e.cssVarsRoot,c=qr.createElement(YP,{environment:l},t);return qr.createElement(mv,{theme:s,cssVarsRoot:u},qr.createElement(po,{colorModeManager:n,options:s.config},i?qr.createElement(NE,null):qr.createElement(RE,null),qr.createElement(bv,null),r?qr.createElement(lH,{zIndex:r},c):c))};function SY(e){var t=e.children,n=e.theme,r=void 0===n?lv:n,o=e.toastOptions,i=sn(e,ut);return qr.createElement(xY,un({theme:r},i),t,qr.createElement(hY,un({},o)))}var CY={},_Y=QO;CY.createRoot=_Y.createRoot,CY.hydrateRoot=_Y.hydrateRoot;var EY={},PY={get exports(){return EY},set exports(e){EY=e}},LY={},OY=cr;var AY="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},MY=OY.useState,TY=OY.useEffect,IY=OY.useLayoutEffect,RY=OY.useDebugValue;function NY(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!AY(e,n)}catch(Xke){return!0}}var DY="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=MY({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return IY((function(){o.value=n,o.getSnapshot=t,NY(o)&&i({inst:o})}),[e,n,t]),TY((function(){return NY(o)&&i({inst:o}),e((function(){NY(o)&&i({inst:o})}))}),[e]),RY(n),n};LY.useSyncExternalStore=void 0!==OY.useSyncExternalStore?OY.useSyncExternalStore:DY,function(e){e.exports=LY}(PY);var zY={},jY={get exports(){return zY},set exports(e){zY=e}},BY={},FY=cr,HY=EY;var VY="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},WY=HY.useSyncExternalStore,UY=FY.useRef,GY=FY.useEffect,qY=FY.useMemo,YY=FY.useDebugValue;BY.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=UY(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=qY((function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,VY(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,s=n)}var i,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var s=WY(e,i[0],i[1]);return GY((function(){a.hasValue=!0,a.value=s}),[s]),YY(s),s},function(e){e.exports=BY}(jY);var ZY=function(e){e()},XY=function(){return ZY},$Y=cr.createContext(null);function KY(){return cr.useContext($Y)}var QY=function(){throw new Error("uSES not initialized!")},JY=function(e,t){return e===t};function eZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$Y,t=e===$Y?KY:function(){return cr.useContext(e)};return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JY,r=t(),o=r.store,i=r.subscription,a=r.getServerState,s=QY(i.addNestedSub,o.getState,a||o.getState,e,n);return cr.useDebugValue(s),s}}var tZ,nZ=eZ(),rZ={},oZ={get exports(){return rZ},set exports(e){rZ=e}},iZ={},aZ=Symbol.for("react.element"),sZ=Symbol.for("react.portal"),lZ=Symbol.for("react.fragment"),uZ=Symbol.for("react.strict_mode"),cZ=Symbol.for("react.profiler"),dZ=Symbol.for("react.provider"),fZ=Symbol.for("react.context"),hZ=Symbol.for("react.server_context"),pZ=Symbol.for("react.forward_ref"),vZ=Symbol.for("react.suspense"),gZ=Symbol.for("react.suspense_list"),mZ=Symbol.for("react.memo"),yZ=Symbol.for("react.lazy"),bZ=Symbol.for("react.offscreen");function wZ(e){if("object"===kn(e)&&null!==e){var t=e.$$typeof;switch(t){case aZ:switch(e=e.type){case lZ:case cZ:case uZ:case vZ:case gZ:return e;default:switch(e=e&&e.$$typeof){case hZ:case fZ:case pZ:case yZ:case mZ:case dZ:return e;default:return t}}case sZ:return t}}}tZ=Symbol.for("react.module.reference"),iZ.ContextConsumer=fZ,iZ.ContextProvider=dZ,iZ.Element=aZ,iZ.ForwardRef=pZ,iZ.Fragment=lZ,iZ.Lazy=yZ,iZ.Memo=mZ,iZ.Portal=sZ,iZ.Profiler=cZ,iZ.StrictMode=uZ,iZ.Suspense=vZ,iZ.SuspenseList=gZ,iZ.isAsyncMode=function(){return!1},iZ.isConcurrentMode=function(){return!1},iZ.isContextConsumer=function(e){return wZ(e)===fZ},iZ.isContextProvider=function(e){return wZ(e)===dZ},iZ.isElement=function(e){return"object"===kn(e)&&null!==e&&e.$$typeof===aZ},iZ.isForwardRef=function(e){return wZ(e)===pZ},iZ.isFragment=function(e){return wZ(e)===lZ},iZ.isLazy=function(e){return wZ(e)===yZ},iZ.isMemo=function(e){return wZ(e)===mZ},iZ.isPortal=function(e){return wZ(e)===sZ},iZ.isProfiler=function(e){return wZ(e)===cZ},iZ.isStrictMode=function(e){return wZ(e)===uZ},iZ.isSuspense=function(e){return wZ(e)===vZ},iZ.isSuspenseList=function(e){return wZ(e)===gZ},iZ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===lZ||e===cZ||e===uZ||e===vZ||e===gZ||e===bZ||"object"===kn(e)&&null!==e&&(e.$$typeof===yZ||e.$$typeof===mZ||e.$$typeof===dZ||e.$$typeof===fZ||e.$$typeof===pZ||e.$$typeof===tZ||void 0!==e.getModuleId)},iZ.typeOf=wZ,function(e){e.exports=iZ}(oZ);var kZ={notify:function(){},get:function(){return[]}};function xZ(e,t){var n,r=kZ;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=XY(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=kZ)},getListeners:function(){return r}};return a}var SZ=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?cr.useLayoutEffect:cr.useEffect;function CZ(e){var t=e.store,n=e.context,r=e.children,o=e.serverState,i=cr.useMemo((function(){var e=xZ(t);return{store:t,subscription:e,getServerState:o?function(){return o}:void 0}}),[t,o]),a=cr.useMemo((function(){return t.getState()}),[t]);SZ((function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=void 0}}),[i,a]);var s=n||$Y;return qr.createElement(s.Provider,{value:i},r)}function _Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$Y,t=e===$Y?KY:function(){return cr.useContext(e)};return function(){return t().store}}var EZ=_Z();function PZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$Y,t=e===$Y?EZ:_Z(e);return function(){return t().dispatch}}var LZ,OZ=PZ();function AZ(e){return AZ="function"==typeof Symbol&&"symbol"===kn(Symbol.iterator)?function(e){return kn(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":kn(e)},AZ(e)}function MZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TZ(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,r.key,r)}}function IZ(e,t){return!t||"object"!==AZ(t)&&"function"!=typeof t?NZ(e):t}function RZ(e){return RZ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},RZ(e)}function NZ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DZ(e,t){return DZ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},DZ(e,t)}function zZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){QY=e}(zY.useSyncExternalStoreWithSelector),LZ=QO.unstable_batchedUpdates,ZY=LZ;var jZ=function(e){function t(){var e,n;MZ(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return zZ(NZ(n=IZ(this,(e=RZ(t)).call.apply(e,[this].concat(o)))),"state",{bootstrapped:!1}),zZ(NZ(n),"_unsubscribe",void 0),zZ(NZ(n),"handlePersistorState",(function(){n.props.persistor.getState().bootstrapped&&(n.props.onBeforeLift?Promise.resolve(n.props.onBeforeLift()).finally((function(){return n.setState({bootstrapped:!0})})):n.setState({bootstrapped:!0}),n._unsubscribe&&n._unsubscribe())})),n}var n,r,o;return 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}}),t&&DZ(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return"function"==typeof this.props.children?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}])&&TZ(n.prototype,r),o&&TZ(n,o),t}(cr.PureComponent);function BZ(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function FZ(e){return!!e&&!!e[EX]}function HZ(e){var t;return!!e&&(function(e){if(!e||"object"!=kn(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===PX}(e)||Array.isArray(e)||!!e[_X]||!!(null===(t=e.constructor)||void 0===t?void 0:t[_X])||YZ(e)||ZZ(e))}function VZ(e,t,n){void 0===n&&(n=!1),0===WZ(e)?(n?Object.keys:LX)(e).forEach((function(r){n&&"symbol"==kn(r)||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function WZ(e){var t=e[EX];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:YZ(e)?2:ZZ(e)?3:0}function UZ(e,t){return 2===WZ(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function GZ(e,t,n){var r=WZ(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function qZ(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function YZ(e){return kX&&e instanceof Map}function ZZ(e){return xX&&e instanceof Set}function XZ(e){return e.o||e.t}function $Z(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=OX(e);delete t[EX];for(var n=LX(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function KZ(e,t){return void 0===t&&(t=!1),JZ(e)||FZ(e)||!HZ(e)||(WZ(e)>1&&(e.set=e.add=e.clear=e.delete=QZ),Object.freeze(e),t&&VZ(e,(function(e,t){return KZ(t,!0)}),!0)),e}function QZ(){BZ(2)}function JZ(e){return null==e||"object"!=kn(e)||Object.isFrozen(e)}function eX(e){var t=AX[e];return t||BZ(18,e),t}function tX(){return bX}function nX(e,t){t&&(eX("Patches"),e.u=[],e.s=[],e.v=t)}function rX(e){oX(e),e.p.forEach(aX),e.p=null}function oX(e){e===bX&&(bX=e.l)}function iX(e){return bX={p:[],l:bX,h:e,m:!0,_:0}}function aX(e){var t=e[EX];0===t.i||1===t.i?t.j():t.O=!0}function sX(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||eX("ES5").S(t,e,r),r?(n[EX].P&&(rX(t),BZ(4)),HZ(e)&&(e=lX(t,e),t.l||cX(t,e)),t.u&&eX("Patches").M(n[EX].t,e,t.u,t.s)):e=lX(t,n,[]),rX(t),t.u&&t.v(t.u,t.s),e!==CX?e:void 0}function lX(e,t,n){if(JZ(t))return t;var r=t[EX];if(!r)return VZ(t,(function(o,i){return uX(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return cX(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=$Z(r.k):r.o;VZ(3===r.i?new Set(o):o,(function(t,i){return uX(e,r,o,t,i,n)})),cX(e,o,!1),n&&e.u&&eX("Patches").R(r,n,e.u,e.s)}return r.o}function uX(e,t,n,r,o,i){if(FZ(o)){var a=lX(e,o,i&&t&&3!==t.i&&!UZ(t.D,r)?i.concat(r):void 0);if(GZ(n,r,a),!FZ(a))return;e.m=!1}if(HZ(o)&&!JZ(o)){if(!e.h.F&&e._<1)return;lX(e,o),t&&t.A.l||cX(e,o)}}function cX(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&KZ(t,n)}function dX(e,t){var n=e[EX];return(n?XZ(n):e)[t]}function fX(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function hX(e){e.P||(e.P=!0,e.l&&hX(e.l))}function pX(e){e.o||(e.o=$Z(e.t))}function vX(e,t,n){var r=YZ(t)?eX("MapSet").N(t,n):ZZ(t)?eX("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:tX(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=MX;n&&(o=[r],i=TX);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):eX("ES5").J(t,n);return(n?n.A:tX()).p.push(r),r}function gX(e){return FZ(e)||BZ(22,e),function e(t){if(!HZ(t))return t;var n,r=t[EX],o=WZ(t);if(r){if(!r.P&&(r.i<4||!eX("ES5").K(r)))return r.t;r.I=!0,n=mX(t,o),r.I=!1}else n=mX(t,o);return VZ(n,(function(t,o){r&&function(e,t){return 2===WZ(e)?e.get(t):e[t]}(r.t,t)===o||GZ(n,t,e(o))})),3===o?new Set(n):n}(e)}function mX(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $Z(e)}zZ(jZ,"defaultProps",{children:null,loading:null});var yX,bX,wX="undefined"!=typeof Symbol&&"symbol"==kn(Symbol("x")),kX="undefined"!=typeof Map,xX="undefined"!=typeof Set,SX="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,CX=wX?Symbol.for("immer-nothing"):((yX={})["immer-nothing"]=!0,yX),_X=wX?Symbol.for("immer-draftable"):"__$immer_draftable",EX=wX?Symbol.for("immer-state"):"__$immer_state",PX=""+Object.prototype.constructor,LX="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,OX=Object.getOwnPropertyDescriptors||function(e){var t={};return LX(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},AX={},MX={get:function(e,t){if(t===EX)return e;var n=XZ(e);if(!UZ(n,t))return function(e,t,n){var r,o=fX(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!HZ(r)?r:r===dX(e.t,t)?(pX(e),e.o[t]=vX(e.A.h,r,e)):r},has:function(e,t){return t in XZ(e)},ownKeys:function(e){return Reflect.ownKeys(XZ(e))},set:function(e,t,n){var r=fX(XZ(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=dX(XZ(e),t),i=null==o?void 0:o[EX];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(qZ(n,o)&&(void 0!==n||UZ(e.t,t)))return!0;pX(e),hX(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==dX(e.t,t)||t in e.t?(e.D[t]=!1,pX(e),hX(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=XZ(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){BZ(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){BZ(12)}},TX={};VZ(MX,(function(e,t){TX[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),TX.deleteProperty=function(e,t){return TX.set.call(this,e,t,void 0)},TX.set=function(e,t,n){return MX.set.call(this,e[0],t,n,e[0])};var IX=function(){function e(e){var t=this;this.g=SX,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&BZ(6),void 0!==r&&"function"!=typeof r&&BZ(7),HZ(e)){var s=iX(t),l=vX(t,e,void 0),u=!0;try{a=n(l),u=!1}finally{u?rX(s):oX(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return nX(s,r),sX(e,s)}),(function(e){throw rX(s),e})):(nX(s,r),sX(a,s))}if(!e||"object"!=kn(e)){if(void 0===(a=n(e))&&(a=e),a===CX&&(a=void 0),t.F&&KZ(a,!0),r){var c=[],d=[];eX("Patches").M(e,a,c,d),r(c,d)}return a}BZ(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){HZ(e)||BZ(8),FZ(e)&&(e=gX(e));var t=iX(this),n=vX(this,e,void 0);return n[EX].C=!0,oX(t),n},t.finishDraft=function(e,t){var n=(e&&e[EX]).A;return nX(n,t),sX(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!SX&&BZ(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=eX("Patches").$;return FZ(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),RX=new IX,NX=RX.produce;function DX(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 zX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DX(Object(n),!0).forEach((function(t){YH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jX(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}RX.produceWithPatches.bind(RX),RX.setAutoFreeze.bind(RX),RX.setUseProxies.bind(RX),RX.applyPatches.bind(RX),RX.createDraft.bind(RX),RX.finishDraft.bind(RX);var BX="function"==typeof Symbol&&Symbol.observable||"@@observable",FX=function(){return Math.random().toString(36).substring(7).split("").join(".")},HX={INIT:"@@redux/INIT"+FX(),REPLACE:"@@redux/REPLACE"+FX(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+FX()}};function VX(e){if("object"!==kn(e)||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function WX(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(jX(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(jX(1));return n(WX)(e,t)}if("function"!=typeof e)throw new Error(jX(2));var o=e,i=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(jX(3));return i}function d(e){if("function"!=typeof e)throw new Error(jX(4));if(l)throw new Error(jX(5));var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error(jX(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),a=null}}}function f(e){if(!VX(e))throw new Error(jX(7));if(void 0===e.type)throw new Error(jX(8));if(l)throw new Error(jX(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}function h(e){if("function"!=typeof e)throw new Error(jX(10));o=e,f({type:HX.REPLACE})}function p(){var e,t=d;return(e={subscribe:function(e){if("object"!==kn(e)||null===e)throw new Error(jX(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[BX]=function(){return this},e}return f({type:HX.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:h})[BX]=p,r}function UX(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:HX.INIT}))throw new Error(jX(12));if(void 0===n(void 0,{type:HX.PROBE_UNKNOWN_ACTION()}))throw new Error(jX(13))}))}(n)}catch(Dhe){i=Dhe}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},s=0;s<a.length;s++){var l=a[s],u=n[l],c=e[l],d=u(c,t);if(void 0===d)throw t&&t.type,new Error(jX(14));o[l]=d,r=r||d!==c}return(r=r||a.length!==Object.keys(e).length)?o:e}}function GX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function qX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(jX(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=GX.apply(void 0,i)(n.dispatch),zX(zX({},n),{},{dispatch:r})}}}var YX="NOT_FOUND";var ZX=function(e,t){return e===t};function XX(e,t){var n,r,o="object"===kn(t)?t:{equalityCheck:t},i=o.equalityCheck,a=void 0===i?ZX:i,s=o.maxSize,l=void 0===s?1:s,u=o.resultEqualityCheck,c=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(a),d=1===l?(n=c,{get:function(e){return r&&n(r.key,e)?r.value:YX},put:function(e,t){r={key:e,value:t}},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return YX}return{get:r,put:function(t,o){r(t)===YX&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(l,c);function f(){var t=d.get(arguments);if(t===YX){if(t=e.apply(null,arguments),u){var n=d.getEntries(),r=n.find((function(e){return u(e.value,t)}));r&&(t=r.value)}d.put(arguments,t)}return t}return f.clearCache=function(){return d.clear()},f}function $X(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":kn(e)})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function KX(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=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,a=0,s={memoizeOptions:void 0},l=r.pop();if("object"===kn(l)&&(s=l,l=r.pop()),"function"!=typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+kn(l)+"]");var u=s,c=u.memoizeOptions,d=void 0===c?n:c,f=Array.isArray(d)?d:[d],h=$X(r),p=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(f)),v=e((function(){for(var e=[],t=h.length,n=0;n<t;n++)e.push(h[n].apply(null,arguments));return i=p.apply(null,e)}));return Object.assign(v,{resultFunc:l,memoizedResultFunc:p,dependencies:h,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),v};return o}var QX=KX(XX);function JX(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var e$=JX();e$.withExtraArgument=JX;var t$,n$=e$,r$=globalThis&&globalThis.__extends||(t$=function(e,t){return t$=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t$(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}t$(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o$=globalThis&&globalThis.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(Dhe){i=[6,Dhe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i$=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},a$=Object.defineProperty,s$=Object.defineProperties,l$=Object.getOwnPropertyDescriptors,u$=Object.getOwnPropertySymbols,c$=Object.prototype.hasOwnProperty,d$=Object.prototype.propertyIsEnumerable,f$=function(e,t,n){return t in e?a$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},h$=function(e,t){for(var n in t||(t={}))c$.call(t,n)&&f$(e,n,t[n]);if(u$)for(var r=0,o=u$(t);r<o.length;r++){n=o[r];d$.call(t,n)&&f$(e,n,t[n])}return e},p$=function(e,t){return s$(e,l$(t))},v$="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===kn(arguments[0])?GX:GX.apply(null,arguments)};var g$=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return r$(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,i$([void 0],e[0].concat(this)))):new(t.bind.apply(t,i$([void 0],e.concat(this))))},t}(Array);function m$(e){return HZ(e)?NX(e,(function(){})):e}function y$(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t;e.immutableCheck,e.serializableCheck;var r=new g$;n&&(!function(e){return"boolean"==typeof e}(n)?r.push(n$.withExtraArgument(n.extraArgument)):r.push(n$));return r}(e)}}function b$(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return h$(h$({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function w$(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function k$(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:m$(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},s={},l={};function u(){var t="function"==typeof e.extraReducers?w$(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],a=void 0===i?[]:i,l=t[2],u=void 0===l?void 0:l,c=h$(h$({},o),s);return function(e,t,n,r){void 0===n&&(n=[]);var o,i="function"==typeof t?w$(t):[t,n,r],a=i[0],s=i[1],l=i[2];if(function(e){return"function"==typeof e}(e))o=function(){return m$(e())};else{var u=m$(e);o=function(){return u}}function c(e,t){void 0===e&&(e=o());var n=i$([a[t.type]],s.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[l]),n.reduce((function(e,n){if(n){var r;if(FZ(e))return void 0===(r=n(e,t))?e:r;if(HZ(e))return NX(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return c.getInitialState=o,c}(r,(function(e){for(var t in c)e.addCase(t,c[t]);for(var n=0,r=a;n<r.length;n++){var o=r[n];e.addMatcher(o.matcher,o.reducer)}u&&e.addDefaultCase(u)}))}return i.forEach((function(e){var n,r,i=o[e],u=function(e,t){return e+"/"+t}(t,e);"reducer"in i?(n=i.reducer,r=i.prepare):n=i,a[e]=n,s[u]=n,l[e]=r?b$(u,r):b$(u)})),{name:t,reducer:function(e,t){return n||(n=u()),n(e,t)},actions:l,caseReducers:a,getInitialState:function(){return n||(n=u()),n.getInitialState()}}}var x$=["name","message","stack","code"],S$=function(e,t){this.payload=e,this.meta=t},C$=function(e,t){this.payload=e,this.meta=t},_$=function(e){if("object"===kn(e)&&null!==e){for(var t={},n=0,r=x$;n<r.length;n++){var o=r[n];"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};function E$(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}!function(){function e(e,t,n){var r=b$(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:p$(h$({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=b$(e+"/pending",(function(e,t,n){return{payload:void 0,meta:p$(h$({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=b$(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||_$)(e||"Rejected"),meta:p$(h$({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(s,l,u){var c,d=(null==n?void 0:n.idGenerator)?n.idGenerator(e):function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}(),f=new a,h=new Promise((function(e,t){return f.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:c||"Aborted"})}))})),p=!1;function v(e){p&&(c=e,f.abort())}var g=function(){return a=this,c=null,g=function(){var a,c,g,m,y;return o$(this,(function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),function(e){return null!==e&&"object"===kn(e)&&"function"==typeof e.then}(m=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:l,extra:u}))?[4,m]:[3,2];case 1:m=b.sent(),b.label=2;case 2:if(!1===m)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return p=!0,s(o(d,e,null==(c=null==n?void 0:n.getPendingMeta)?void 0:c.call(n,{requestId:d,arg:e},{getState:l,extra:u}))),[4,Promise.race([h,Promise.resolve(t(e,{dispatch:s,getState:l,extra:u,requestId:d,signal:f.signal,abort:v,rejectWithValue:function(e,t){return new S$(e,t)},fulfillWithValue:function(e,t){return new C$(e,t)}})).then((function(t){if(t instanceof S$)throw t;return t instanceof C$?r(t.payload,d,e,t.meta):r(t,d,e)}))])];case 3:return g=b.sent(),[3,5];case 4:return y=b.sent(),g=y instanceof S$?i(null,d,e,y.payload,y.meta):i(y,d,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(g)&&g.meta.condition||s(g),[2,g]}}))},new Promise((function(e,t){var n=function(e){try{o(g.next(e))}catch(Dhe){t(Dhe)}},r=function(e){try{o(g.throw(e))}catch(Dhe){t(Dhe)}},o=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(n,r)};o((g=g.apply(a,c)).next())}));var a,c,g}();return Object.assign(g,{abort:v,requestId:d,arg:e,unwrap:function(){return g.then(E$)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}e.withTypes=e}();var P$="listenerMiddleware";b$(P$+"/add"),b$(P$+"/removeAll"),b$(P$+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:global),function(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[EX];return MX.get(t,e)},set:function(t){var n=this[EX];MX.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][EX];if(!o.P)switch(o.i){case 5:r(o)&&hX(o);break;case 4:n(o)&&hX(o)}}}function n(e){for(var t=e.t,n=e.k,r=LX(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==EX){var a=t[i];if(void 0===a&&!UZ(t,i))return!0;var s=n[i],l=s&&s[EX];if(l?l.t!==a:!qZ(s,a))return!0}}var u=!!t[EX];return r.length!==LX(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var o={};!function(e,t){AX[e]||(AX[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=OX(n);delete i[EX];for(var a=LX(i),s=0;s<a.length;s++){var l=a[s];i[l]=e(l,t||!!i[l].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={i:r?5:4,A:n?n.A:tX(),P:!1,I:!1,D:{},l:n,t:t,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,EX,{value:i,writable:!0}),o},S:function(e,n,o){o?FZ(n)&&n[EX].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==kn(t)){var n=t[EX];if(n){var o=n.t,i=n.k,a=n.D,s=n.i;if(4===s)VZ(i,(function(t){t!==EX&&(void 0!==o[t]||UZ(o,t)?a[t]||e(i[t]):(a[t]=!0,hX(n)))})),VZ(o,(function(e){void 0!==i[e]||UZ(i,e)||(a[e]=!1,hX(n))}));else if(5===s){if(r(n)&&(hX(n),a.length=!0),i.length<o.length)for(var l=i.length;l<o.length;l++)a[l]=!1;else for(var u=o.length;u<i.length;u++)a[u]=!0;for(var c=Math.min(i.length,o.length),d=0;d<c;d++)i.hasOwnProperty(d)||(a[d]=!0),void 0===a[d]&&e(i[d])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}();var L$="persist:",O$="persist/FLUSH",A$="persist/REHYDRATE",M$="persist/PAUSE",T$="persist/PERSIST",I$="persist/PURGE",R$="persist/REGISTER";function N$(e){return N$="function"==typeof Symbol&&"symbol"===kn(Symbol.iterator)?function(e){return kn(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":kn(e)},N$(e)}function D$(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 z$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j$(e,t,n,r){r.debug;var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D$(n,!0).forEach((function(t){z$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return e&&"object"===N$(e)&&Object.keys(e).forEach((function(r){"_persist"!==r&&t[r]===n[r]&&(o[r]=e[r])})),o}function B$(e){var t,n=e.blacklist||null,r=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,a=e.debounce||0,s="".concat(void 0!==e.keyPrefix?e.keyPrefix:L$).concat(e.key),l=e.storage;t=!1===e.serialize?function(e){return e}:"function"==typeof e.serialize?e.serialize:F$;var u=e.writeFailHandler||null,c={},d={},f=[],h=null,p=null,v=0;function g(){if(0===f.length)return h&&clearInterval(h),void(h=null);var e=f.shift(),n=o.reduce((function(t,n){return n.in(t,e,c)}),c[e]);if(void 0!==n)try{d[e]=t(n)}catch(COe){console.error("redux-persist/createPersistoid: error serializing state",COe)}else delete d[e];0===f.length&&(Object.keys(d).forEach((function(e){void 0===c[e]&&delete d[e]})),p=l.setItem(s,t(d)).catch(y))}function m(e){return(!r||-1!==r.indexOf(e)||"_persist"===e)&&(!n||-1===n.indexOf(e))}function y(e){u&&u(e)}return{update:function(e){clearTimeout(v),v=setTimeout((function(){Object.keys(e).forEach((function(t){m(t)&&c[t]!==e[t]&&-1===f.indexOf(t)&&f.push(t)})),Object.keys(c).forEach((function(t){void 0===e[t]&&m(t)&&-1===f.indexOf(t)&&void 0!==c[t]&&f.push(t)})),null===h&&(h=setInterval(g,i)),c=e}),a)},flush:function(){for(;0!==f.length;)g();return p||Promise.resolve()}}}function F$(e){return JSON.stringify(e)}function H$(e){var t,n=e.transforms||[],r="".concat(void 0!==e.keyPrefix?e.keyPrefix:L$).concat(e.key),o=e.storage;return e.debug,t=!1===e.deserialize?function(e){return e}:"function"==typeof e.deserialize?e.deserialize:V$,o.getItem(r).then((function(e){if(e)try{var r={},o=t(e);return Object.keys(o).forEach((function(e){r[e]=n.reduceRight((function(t,n){return n.out(t,e,o)}),t(o[e]))})),r}catch(COe){throw COe}}))}function V$(e){return JSON.parse(e)}function W$(e){0}function U$(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 G$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U$(n,!0).forEach((function(t){q$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y$(e,t){if(null==e)return{};var n,r,o=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,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Z$(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function X$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X$(n,!0).forEach((function(t){K$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q$={registry:[],bootstrapped:!1},J$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q$,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case R$:return $$({},e,{registry:[].concat(Z$(e.registry),[t.key])});case A$:var n=e.registry.indexOf(t.key),r=Z$(e.registry);return r.splice(n,1),$$({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var eK={},tK={};function nK(e){return nK="function"==typeof Symbol&&"symbol"===kn(Symbol.iterator)?function(e){return kn(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":kn(e)},nK(e)}function rK(){}tK.__esModule=!0,tK.default=function(e){var t="".concat(e,"Storage");return function(e){if("object"!==("undefined"==typeof self?"undefined":nK(self))||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch(Dhe){return!1}return!0}(t)?self[t]:oK};var oK={getItem:rK,setItem:rK,removeItem:rK};eK.__esModule=!0,eK.default=function(e){var t=(0,aK.default)(e);return{getItem:function(e){return new Promise((function(n,r){n(t.getItem(e))}))},setItem:function(e,n){return new Promise((function(r,o){r(t.setItem(e,n))}))},removeItem:function(e){return new Promise((function(n,r){n(t.removeItem(e))}))}}};var iK,aK=(iK=tK)&&iK.__esModule?iK:{default:iK};var sK,lK=function(e){return e&&e.__esModule?e:{default:e}}(eK);sK=(0,lK.default)("local");var uK={},cK={},dK={};Object.defineProperty(dK,"__esModule",{value:!0}),dK.PLACEHOLDER_UNDEFINED=dK.PACKAGE_NAME=void 0,dK.PACKAGE_NAME="redux-deep-persist",dK.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var fK={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,(t=e.ConfigType||(e.ConfigType={}))[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(fK),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;var t=dK,n=fK;e.isObjectLike=function(e){return"object"===kn(e)&&null!==e};e.isLength=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Number.MAX_SAFE_INTEGER},e.isArray=Array.isArray||function(t){return(0,e.isLength)(t&&t.length)&&"[object Array]"===Object.prototype.toString.call(t)};e.isPlainObject=function(t){return!!t&&"object"===kn(t)&&!(0,e.isArray)(t)};e.isIntegerString=function(e){return String(~~e)===e&&Number(e)>=0};e.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)};e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)};e.isEmpty=function(e){return 0===Object.keys(e).length};var r=Object.prototype.hasOwnProperty;e.getCircularPath=function(t,n,r){for(var o in r||(r=new Set([t])),n||(n=""),t){var i=n?"".concat(n,".").concat(o):o,a=t[o];if((0,e.isObjectLike)(a))return r.has(a)?"".concat(n,".").concat(o,":<Circular>"):(r.add(a),(0,e.getCircularPath)(a,i,r))}return null};e._cloneDeep=function(t){if(!(0,e.isObjectLike)(t))return t;if((0,e.isDate)(t))return new Date(+t);var n=(0,e.isArray)(t)?[]:{};for(var r in t){var o=t[r];n[r]=(0,e._cloneDeep)(o)}return n};e.cloneDeep=function(n){var r=(0,e.getCircularPath)(n);if(r)throw new Error("".concat(t.PACKAGE_NAME,": circular dependency detected under the path '").concat(r,"' of object you're trying to persist: ").concat(n));return(0,e._cloneDeep)(n)};e.difference=function(t,n){if(t===n)return{};if(!(0,e.isObjectLike)(t)||!(0,e.isObjectLike)(n))return n;var o=(0,e.cloneDeep)(t),i=(0,e.cloneDeep)(n),a=Object.keys(o).reduce((function(e,t){return r.call(i,t)||(e[t]=void 0),e}),{});if((0,e.isDate)(o)||(0,e.isDate)(i))return o.valueOf()===i.valueOf()?{}:i;var s=Object.keys(i).reduce((function(t,n){if(!r.call(o,n))return t[n]=i[n],t;var a=(0,e.difference)(o[n],i[n]);return(0,e.isObjectLike)(a)&&(0,e.isEmpty)(a)&&!(0,e.isDate)(a)?(0,e.isArray)(o)&&!(0,e.isArray)(i)||!(0,e.isArray)(o)&&(0,e.isArray)(i)?i:t:(t[n]=a,t)}),a);return delete s._persist,s};e.path=function(t,n){return n.reduce((function(t,n){if(t){var r=parseInt(n,10),o=(0,e.isIntegerString)(n)&&r<0?t.length+r:n;return(0,e.isString)(t)?t.charAt(o):t[o]}}),t)};e.assocPath=function(t,n){var r=cn(t).reverse().reduce((function(t,r,o){var i=(0,e.isIntegerString)(r)?[]:{};return i[r]=0===o?n:t,i}),{});return r};e.dissocPath=function(t,n){var r=(0,e.cloneDeep)(t);return n.reduce((function(t,r,o){return o===n.length-1&&t&&(0,e.isObjectLike)(t)&&delete t[r],t&&t[r]}),r),r};var o=function n(r,o){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];if(!a||!a.length)return o;var l=a.shift(),u=r.preservePlaceholder,c=r.preserveUndefined;if((0,e.isObjectLike)(o)&&(0,e.isObjectLike)(l))for(var d in l)if((0,e.isObjectLike)(l[d])&&(0,e.isObjectLike)(o[d]))o[d]||(o[d]={}),n(r,o[d],l[d]);else if((0,e.isArray)(o)){var f=l[d],h=u?t.PLACEHOLDER_UNDEFINED:void 0;c||(f=void 0!==f?f:o[parseInt(d,10)]),f=f!==t.PLACEHOLDER_UNDEFINED?f:h,o[parseInt(d,10)]=f}else{var p=l[d]!==t.PLACEHOLDER_UNDEFINED?l[d]:void 0;o[d]=p}return n.apply(void 0,[r,o].concat(a))};e.mergeDeep=function(t,n,r){return o({preservePlaceholder:null==r?void 0:r.preservePlaceholder,preserveUndefined:null==r?void 0:r.preserveUndefined},(0,e.cloneDeep)(t),(0,e.cloneDeep)(n))};var i=function r(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;if(!(0,e.isObjectLike)(o))return o;for(var u in o){var c=o[u],d=(0,e.isArray)(o),f=s?s+"."+u:u;null===c&&(a===n.ConfigType.WHITELIST&&-1===i.indexOf(f)||a===n.ConfigType.BLACKLIST&&-1!==i.indexOf(f))&&d&&(o[parseInt(u,10)]=void 0),void 0===c&&l&&a===n.ConfigType.BLACKLIST&&-1===i.indexOf(f)&&d&&(o[parseInt(u,10)]=t.PLACEHOLDER_UNDEFINED),r(c,i,a,f,l)}};e.preserveUndefined=function(t,n,r,o){var a=(0,e.cloneDeep)(t);return i(a,n,r,"",o),a};e.unique=function(e,t,n){return n.indexOf(e)===t};e.findDuplicatesAndSubsets=function(t){return t.reduce((function(n,r){var o=t.filter((function(e){return e===r})),i=t.filter((function(e){return 0===(r+".").indexOf(e+".")})),a=n.duplicates,s=n.subsets,l=o.length>1&&-1===a.indexOf(r),u=i.length>1;return{duplicates:[].concat(cn(a),cn(l?o:[])),subsets:[].concat(cn(s),cn(u?i:[])).filter(e.unique).sort()}}),{duplicates:[],subsets:[]})};e.singleTransformValidator=function(r,o,i){var a=i===n.ConfigType.WHITELIST?"whitelist":"blacklist",s="".concat(t.PACKAGE_NAME,": incorrect ").concat(a," configuration."),l="Check your create".concat(i===n.ConfigType.WHITELIST?"White":"Black","list arguments.\n\n");if(!(0,e.isString)(o)||o.length<1)throw new Error("".concat(s," Name (key) of reducer is required. ").concat(l));if(r&&r.length){var u=(0,e.findDuplicatesAndSubsets)(r),c=u.duplicates,d=u.subsets;if(c.length>1)throw new Error("".concat(s," Duplicated paths.\n\n ").concat(JSON.stringify(c),"\n\n ").concat(l));if(d.length>1)throw new Error("".concat(s," You are trying to persist an entire property and also some of its subset.\n\n").concat(JSON.stringify(d),"\n\n ").concat(l))}};e.transformsValidator=function(n){if((0,e.isArray)(n)){var r=(null==n?void 0:n.map((function(e){return e.deepPersistKey})).filter((function(e){return e})))||[];if(r.length){var o=r.filter((function(e,t){return r.indexOf(e)!==t}));if(o.length)throw new Error("".concat(t.PACKAGE_NAME,": found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed.\n\n Duplicates: ").concat(JSON.stringify(o)))}}};e.configValidator=function(n){var r=n.whitelist,o=n.blacklist;if(r&&r.length&&o&&o.length)throw new Error("".concat(t.PACKAGE_NAME,": you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config."));if(r){var i=(0,e.findDuplicatesAndSubsets)(r),a=i.duplicates,s=i.subsets;(0,e.throwError)({duplicates:a,subsets:s},"whitelist")}if(o){var l=(0,e.findDuplicatesAndSubsets)(o),u=l.duplicates,c=l.subsets;(0,e.throwError)({duplicates:u,subsets:c},"blacklist")}};e.throwError=function(e,n){var r=e.duplicates,o=e.subsets;if(r.length)throw new Error("".concat(t.PACKAGE_NAME,": duplicates of paths found in your ").concat(n,".\n\n ").concat(JSON.stringify(r)));if(o.length)throw new Error("".concat(t.PACKAGE_NAME,": subsets of some parent keys found in your ").concat(n,". You must decide if you want to persist an entire path or its specific subset.\n\n ").concat(JSON.stringify(o)))};e.getRootKeysGroup=function(t){return(0,e.isArray)(t)?t.filter(e.unique).reduce((function(e,t){var n=t.split("."),r=n[0],o=n.slice(1).join(".")||void 0,i=e.filter((function(e){return Object.keys(e)[0]===r}))[0],a=i?Object.values(i)[0]:void 0;return i||e.push(gn({},r,o?[o]:void 0)),i&&!a&&o&&(i[r]=[o]),i&&a&&o&&a.push(o),e}),[]):[]}}(cK),function(e){var t=ir&&ir.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;var n=cK,r=dK,o=fK,i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.whitelist||null,o=n.blacklist||null;function i(e){return!(!r||-1!==r.indexOf(e))||!(!o||-1===o.indexOf(e))}return{in:function(t,n,r){return!i(n)&&e?e(t,n,r):t},out:function(e,n,r){return!i(n)&&t?t(e,n,r):e},deepPersistKey:r&&r[0]}};e.autoMergeDeep=function(e,t,o,i){var a=i.debug,s=i.whitelist,l=i.blacklist,u=i.transforms;if(s||l)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(u);var c=(0,n.cloneDeep)(o),d=e;if(d&&(0,n.isObjectLike)(d)){var f=(0,n.difference)(t,o);(0,n.isEmpty)(f)||(d=(0,n.mergeDeep)(e,f,{preserveUndefined:!0}),a&&console.log("".concat(r.PACKAGE_NAME,"/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ").concat(JSON.stringify(f)))),Object.keys(d).forEach((function(e){"_persist"!==e&&((0,n.isObjectLike)(c[e])?c[e]=(0,n.mergeDeep)(c[e],d[e]):c[e]=d[e])}))}return a&&d&&(0,n.isObjectLike)(d)&&console.log("".concat(r.PACKAGE_NAME,"/autoMergeDeep: rehydrated keys ").concat(JSON.stringify(d))),c};e.createWhitelist=function(e,t){return(0,n.singleTransformValidator)(t,e,o.ConfigType.WHITELIST),i((function(e){if(!t||!t.length)return e;var o,i=null;return t.forEach((function(t){var a=t.split(".");void 0===(o=(0,n.path)(e,a))&&(0,n.isIntegerString)(a[a.length-1])&&(o=r.PLACEHOLDER_UNDEFINED);var s=(0,n.assocPath)(a,o),l=(0,n.isArray)(s)?[]:{};i=(0,n.mergeDeep)(i||l,s,{preservePlaceholder:!0})})),i||e}),(function(e){return(0,n.preserveUndefined)(e,t,o.ConfigType.WHITELIST)}),{whitelist:[e]})};e.createBlacklist=function(e,t){return(0,n.singleTransformValidator)(t,e,o.ConfigType.BLACKLIST),i((function(e){if(t&&t.length){var r=(0,n.preserveUndefined)(e,t,o.ConfigType.BLACKLIST,!0);return t.map((function(e){return e.split(".")})).reduce((function(e,t){return(0,n.dissocPath)(e,t)}),r)}}),(function(e){return(0,n.preserveUndefined)(e,t,o.ConfigType.BLACKLIST)}),{whitelist:[e]})};e.getTransforms=function(t,n){return n.map((function(n){var r=Object.keys(n)[0],i=n[r];return t===o.ConfigType.WHITELIST?(0,e.createWhitelist)(r,i):(0,e.createBlacklist)(r,i)}))};e.getPersistConfig=function(r){var i=r.key,a=r.whitelist,s=r.blacklist,l=r.storage,u=r.transforms,c=r.rootReducer,d=t(r,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:a,blacklist:s});var f=(0,n.getRootKeysGroup)(a),h=(0,n.getRootKeysGroup)(s),p=Object.keys(c(void 0,{type:""})),v=f.map((function(e){return Object.keys(e)[0]})),g=h.map((function(e){return Object.keys(e)[0]})),m=p.filter((function(e){return-1===v.indexOf(e)&&-1===g.indexOf(e)})),y=(0,e.getTransforms)(o.ConfigType.WHITELIST,f),b=(0,e.getTransforms)(o.ConfigType.BLACKLIST,h),w=(0,n.isArray)(a)?m.map((function(t){return(0,e.createBlacklist)(t)})):[];return Object.assign(Object.assign({},d),{key:i,storage:l,transforms:[].concat(cn(y),cn(b),cn(w),cn(u||[])),stateReconciler:e.autoMergeDeep})}}(uK);var hK=function(e,t){return Math.floor(e/t)*t},pK=function(e,t){return Math.round(e/t)*t};var vK=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e},gK=/\s/;var mK=function(e){for(var t=e.length;t--&&gK.test(e.charAt(t)););return t},yK=mK,bK=/^\s+/;var wK=function(e){return e?e.slice(0,yK(e)+1).replace(bK,""):e};var kK=function(e){var t=kn(e);return null!=e&&("object"==t||"function"==t)},xK="object"==kn(ir)&&ir&&ir.Object===Object&&ir,SK=xK,CK="object"==("undefined"==typeof self?"undefined":kn(self))&&self&&self.Object===Object&&self,_K=SK||CK||Function("return this")(),EK=_K.Symbol,PK=EK,LK=Object.prototype,OK=LK.hasOwnProperty,AK=LK.toString,MK=PK?PK.toStringTag:void 0;var TK=function(e){var t=OK.call(e,MK),n=e[MK];try{e[MK]=void 0;var r=!0}catch(Dhe){}var o=AK.call(e);return r&&(t?e[MK]=n:delete e[MK]),o},IK=Object.prototype.toString;var RK=function(e){return IK.call(e)},NK=TK,DK=RK,zK=EK?EK.toStringTag:void 0;var jK=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":zK&&zK in Object(e)?NK(e):DK(e)};var BK=function(e){return null!=e&&"object"==kn(e)},FK=jK,HK=BK;var VK=function(e){return"symbol"==kn(e)||HK(e)&&"[object Symbol]"==FK(e)},WK=wK,UK=kK,GK=VK,qK=/^[-+]0x[0-9a-f]+$/i,YK=/^0b[01]+$/i,ZK=/^0o[0-7]+$/i,XK=parseInt;var $K=function(e){if("number"==typeof e)return e;if(GK(e))return NaN;if(UK(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=UK(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=WK(e);var n=YK.test(e);return n||ZK.test(e)?XK(e.slice(2),n?2:8):qK.test(e)?NaN:+e},KK=vK,QK=$K;var JK=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=QK(n))==n?n:0),void 0!==t&&(t=(t=QK(t))==t?t:0),KK(QK(e),t,n)};var eQ=function(){this.__data__=[],this.size=0};var tQ=function(e,t){return e===t||e!=e&&t!=t},nQ=tQ;var rQ=function(e,t){for(var n=e.length;n--;)if(nQ(e[n][0],t))return n;return-1},oQ=rQ,iQ=Array.prototype.splice;var aQ=function(e){var t=this.__data__,n=oQ(t,e);return!(n<0)&&(n==t.length-1?t.pop():iQ.call(t,n,1),--this.size,!0)},sQ=rQ;var lQ=function(e){var t=this.__data__,n=sQ(t,e);return n<0?void 0:t[n][1]},uQ=rQ;var cQ=function(e){return uQ(this.__data__,e)>-1},dQ=rQ;var fQ=function(e,t){var n=this.__data__,r=dQ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},hQ=eQ,pQ=aQ,vQ=lQ,gQ=cQ,mQ=fQ;function yQ(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])}}yQ.prototype.clear=hQ,yQ.prototype.delete=pQ,yQ.prototype.get=vQ,yQ.prototype.has=gQ,yQ.prototype.set=mQ;var bQ=yQ,wQ=bQ;var kQ=function(){this.__data__=new wQ,this.size=0};var xQ=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var SQ=function(e){return this.__data__.get(e)};var CQ=function(e){return this.__data__.has(e)},_Q=jK,EQ=kK;var PQ,LQ=function(e){if(!EQ(e))return!1;var t=_Q(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},OQ=_K["__core-js_shared__"],AQ=(PQ=/[^.]+$/.exec(OQ&&OQ.keys&&OQ.keys.IE_PROTO||""))?"Symbol(src)_1."+PQ:"";var MQ=function(e){return!!AQ&&AQ in e},TQ=Function.prototype.toString;var IQ=function(e){if(null!=e){try{return TQ.call(e)}catch(Dhe){}try{return e+""}catch(Dhe){}}return""},RQ=LQ,NQ=MQ,DQ=kK,zQ=IQ,jQ=/^\[object .+?Constructor\]$/,BQ=Function.prototype,FQ=Object.prototype,HQ=BQ.toString,VQ=FQ.hasOwnProperty,WQ=RegExp("^"+HQ.call(VQ).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var UQ=function(e){return!(!DQ(e)||NQ(e))&&(RQ(e)?WQ:jQ).test(zQ(e))};var GQ=function(e,t){return null==e?void 0:e[t]},qQ=UQ,YQ=GQ;var ZQ=function(e,t){var n=YQ(e,t);return qQ(n)?n:void 0},XQ=ZQ(_K,"Map"),$Q=ZQ(Object,"create"),KQ=$Q;var QQ=function(){this.__data__=KQ?KQ(null):{},this.size=0};var JQ=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},eJ=$Q,tJ=Object.prototype.hasOwnProperty;var nJ=function(e){var t=this.__data__;if(eJ){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return tJ.call(t,e)?t[e]:void 0},rJ=$Q,oJ=Object.prototype.hasOwnProperty;var iJ=function(e){var t=this.__data__;return rJ?void 0!==t[e]:oJ.call(t,e)},aJ=$Q;var sJ=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=aJ&&void 0===t?"__lodash_hash_undefined__":t,this},lJ=QQ,uJ=JQ,cJ=nJ,dJ=iJ,fJ=sJ;function hJ(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])}}hJ.prototype.clear=lJ,hJ.prototype.delete=uJ,hJ.prototype.get=cJ,hJ.prototype.has=dJ,hJ.prototype.set=fJ;var pJ=hJ,vJ=bQ,gJ=XQ;var mJ=function(e){var t=kn(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yJ=mJ;var bJ=function(e,t){var n=e.__data__;return yJ(t)?n["string"==typeof t?"string":"hash"]:n.map},wJ=bJ;var kJ=function(e){var t=wJ(this,e).delete(e);return this.size-=t?1:0,t},xJ=bJ;var SJ=function(e){return xJ(this,e).get(e)},CJ=bJ;var _J=function(e){return CJ(this,e).has(e)},EJ=bJ;var PJ=function(e,t){var n=EJ(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},LJ=function(){this.size=0,this.__data__={hash:new pJ,map:new(gJ||vJ),string:new pJ}},OJ=kJ,AJ=SJ,MJ=_J,TJ=PJ;function IJ(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])}}IJ.prototype.clear=LJ,IJ.prototype.delete=OJ,IJ.prototype.get=AJ,IJ.prototype.has=MJ,IJ.prototype.set=TJ;var RJ=IJ,NJ=bQ,DJ=XQ,zJ=RJ;var jJ=function(e,t){var n=this.__data__;if(n instanceof NJ){var r=n.__data__;if(!DJ||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zJ(r)}return n.set(e,t),this.size=n.size,this},BJ=bQ,FJ=kQ,HJ=xQ,VJ=SQ,WJ=CQ,UJ=jJ;function GJ(e){var t=this.__data__=new BJ(e);this.size=t.size}GJ.prototype.clear=FJ,GJ.prototype.delete=HJ,GJ.prototype.get=VJ,GJ.prototype.has=WJ,GJ.prototype.set=UJ;var qJ=GJ;var YJ=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},ZJ=ZQ,XJ=function(){try{var e=ZJ(Object,"defineProperty");return e({},"",{}),e}catch(Dhe){}}();var $J=function(e,t,n){"__proto__"==t&&XJ?XJ(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},KJ=$J,QJ=tQ,JJ=Object.prototype.hasOwnProperty;var e0=function(e,t,n){var r=e[t];JJ.call(e,t)&&QJ(r,n)&&(void 0!==n||t in e)||KJ(e,t,n)},t0=e0,n0=$J;var r0=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?n0(n,s,l):t0(n,s,l)}return n};var o0=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},i0=jK,a0=BK;var s0=function(e){return a0(e)&&"[object Arguments]"==i0(e)},l0=s0,u0=BK,c0=Object.prototype,d0=c0.hasOwnProperty,f0=c0.propertyIsEnumerable,h0=l0(function(){return arguments}())?l0:function(e){return u0(e)&&d0.call(e,"callee")&&!f0.call(e,"callee")},p0=h0,v0=Array.isArray,g0={},m0={get exports(){return g0},set exports(e){g0=e}};var y0=function(){return!1};!function(e,t){var n=_K,r=y0,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(m0,g0);var b0=/^(?:0|[1-9]\d*)$/;var w0=function(e,t){var n=kn(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&b0.test(e))&&e>-1&&e%1==0&&e<t};var k0=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},x0=jK,S0=k0,C0=BK,_0={};_0["[object Float32Array]"]=_0["[object Float64Array]"]=_0["[object Int8Array]"]=_0["[object Int16Array]"]=_0["[object Int32Array]"]=_0["[object Uint8Array]"]=_0["[object Uint8ClampedArray]"]=_0["[object Uint16Array]"]=_0["[object Uint32Array]"]=!0,_0["[object Arguments]"]=_0["[object Array]"]=_0["[object ArrayBuffer]"]=_0["[object Boolean]"]=_0["[object DataView]"]=_0["[object Date]"]=_0["[object Error]"]=_0["[object Function]"]=_0["[object Map]"]=_0["[object Number]"]=_0["[object Object]"]=_0["[object RegExp]"]=_0["[object Set]"]=_0["[object String]"]=_0["[object WeakMap]"]=!1;var E0=function(e){return C0(e)&&S0(e.length)&&!!_0[x0(e)]};var P0=function(e){return function(t){return e(t)}},L0={},O0={get exports(){return L0},set exports(e){L0=e}};!function(e,t){var n=xK,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(Dhe){}}();e.exports=a}(O0,L0);var A0=E0,M0=P0,T0=L0&&L0.isTypedArray,I0=T0?M0(T0):A0,R0=o0,N0=p0,D0=v0,z0=g0,j0=w0,B0=I0,F0=Object.prototype.hasOwnProperty;var H0=function(e,t){var n=D0(e),r=!n&&N0(e),o=!n&&!r&&z0(e),i=!n&&!r&&!o&&B0(e),a=n||r||o||i,s=a?R0(e.length,String):[],l=s.length;for(var u in e)!t&&!F0.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||j0(u,l))||s.push(u);return s},V0=Object.prototype;var W0=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||V0)};var U0=function(e,t){return function(n){return e(t(n))}},G0=U0(Object.keys,Object),q0=W0,Y0=G0,Z0=Object.prototype.hasOwnProperty;var X0=function(e){if(!q0(e))return Y0(e);var t=[];for(var n in Object(e))Z0.call(e,n)&&"constructor"!=n&&t.push(n);return t},$0=LQ,K0=k0;var Q0=function(e){return null!=e&&K0(e.length)&&!$0(e)},J0=H0,e1=X0,t1=Q0;var n1=function(e){return t1(e)?J0(e):e1(e)},r1=r0,o1=n1;var i1=function(e,t){return e&&r1(t,o1(t),e)};var a1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},s1=kK,l1=W0,u1=a1,c1=Object.prototype.hasOwnProperty;var d1=function(e){if(!s1(e))return u1(e);var t=l1(e),n=[];for(var r in e)("constructor"!=r||!t&&c1.call(e,r))&&n.push(r);return n},f1=H0,h1=d1,p1=Q0;var v1=function(e){return p1(e)?f1(e,!0):h1(e)},g1=r0,m1=v1;var y1=function(e,t){return e&&g1(t,m1(t),e)},b1={},w1={get exports(){return b1},set exports(e){b1=e}};!function(e,t){var n=_K,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}(w1,b1);var k1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var x1=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};var S1=function(){return[]},C1=x1,_1=S1,E1=Object.prototype.propertyIsEnumerable,P1=Object.getOwnPropertySymbols,L1=P1?function(e){return null==e?[]:(e=Object(e),C1(P1(e),(function(t){return E1.call(e,t)})))}:_1,O1=r0,A1=L1;var M1=function(e,t){return O1(e,A1(e),t)};var T1=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},I1=U0(Object.getPrototypeOf,Object),R1=T1,N1=I1,D1=L1,z1=S1,j1=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)R1(t,D1(e)),e=N1(e);return t}:z1,B1=r0,F1=j1;var H1=function(e,t){return B1(e,F1(e),t)},V1=T1,W1=v0;var U1=function(e,t,n){var r=t(e);return W1(e)?r:V1(r,n(e))},G1=U1,q1=L1,Y1=n1;var Z1=function(e){return G1(e,Y1,q1)},X1=U1,$1=j1,K1=v1;var Q1=function(e){return X1(e,K1,$1)},J1=ZQ(_K,"DataView"),e2=XQ,t2=ZQ(_K,"Promise"),n2=ZQ(_K,"Set"),r2=ZQ(_K,"WeakMap"),o2=jK,i2=IQ,a2="[object Map]",s2="[object Promise]",l2="[object Set]",u2="[object WeakMap]",c2="[object DataView]",d2=i2(J1),f2=i2(e2),h2=i2(t2),p2=i2(n2),v2=i2(r2),g2=o2;(J1&&g2(new J1(new ArrayBuffer(1)))!=c2||e2&&g2(new e2)!=a2||t2&&g2(t2.resolve())!=s2||n2&&g2(new n2)!=l2||r2&&g2(new r2)!=u2)&&(g2=function(e){var t=o2(e),n="[object Object]"==t?e.constructor:void 0,r=n?i2(n):"";if(r)switch(r){case d2:return c2;case f2:return a2;case h2:return s2;case p2:return l2;case v2:return u2}return t});var m2=g2,y2=Object.prototype.hasOwnProperty;var b2=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&y2.call(e,"index")&&(n.index=e.index,n.input=e.input),n},w2=_K.Uint8Array,k2=w2;var x2=function(e){var t=new e.constructor(e.byteLength);return new k2(t).set(new k2(e)),t},S2=x2;var C2=function(e,t){var n=t?S2(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},_2=/\w*$/;var E2=function(e){var t=new e.constructor(e.source,_2.exec(e));return t.lastIndex=e.lastIndex,t},P2=EK?EK.prototype:void 0,L2=P2?P2.valueOf:void 0;var O2=x2;var A2=x2,M2=C2,T2=E2,I2=function(e){return L2?Object(L2.call(e)):{}},R2=function(e,t){var n=t?O2(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var N2=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return A2(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return M2(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 R2(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 T2(e);case"[object Symbol]":return I2(e)}},D2=kK,z2=Object.create,j2=function(){function e(){}return function(t){if(!D2(t))return{};if(z2)return z2(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),B2=I1,F2=W0;var H2=function(e){return"function"!=typeof e.constructor||F2(e)?{}:j2(B2(e))},V2=m2,W2=BK;var U2=function(e){return W2(e)&&"[object Map]"==V2(e)},G2=U2,q2=P0,Y2=L0&&L0.isMap,Z2=Y2?q2(Y2):G2,X2=m2,$2=BK;var K2=function(e){return $2(e)&&"[object Set]"==X2(e)},Q2=K2,J2=P0,e5=L0&&L0.isSet,t5=e5?J2(e5):Q2,n5=qJ,r5=YJ,o5=e0,i5=i1,a5=y1,s5=b1,l5=k1,u5=M1,c5=H1,d5=Z1,f5=Q1,h5=m2,p5=b2,v5=N2,g5=H2,m5=v0,y5=g0,b5=Z2,w5=kK,k5=t5,x5=n1,S5=v1,C5="[object Arguments]",_5="[object Function]",E5="[object Object]",P5={};P5[C5]=P5["[object Array]"]=P5["[object ArrayBuffer]"]=P5["[object DataView]"]=P5["[object Boolean]"]=P5["[object Date]"]=P5["[object Float32Array]"]=P5["[object Float64Array]"]=P5["[object Int8Array]"]=P5["[object Int16Array]"]=P5["[object Int32Array]"]=P5["[object Map]"]=P5["[object Number]"]=P5[E5]=P5["[object RegExp]"]=P5["[object Set]"]=P5["[object String]"]=P5["[object Symbol]"]=P5["[object Uint8Array]"]=P5["[object Uint8ClampedArray]"]=P5["[object Uint16Array]"]=P5["[object Uint32Array]"]=!0,P5["[object Error]"]=P5[_5]=P5["[object WeakMap]"]=!1;var L5=function e(t,n,r,o,i,a){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),void 0!==s)return s;if(!w5(t))return t;var d=m5(t);if(d){if(s=p5(t),!l)return l5(t,s)}else{var f=h5(t),h=f==_5||"[object GeneratorFunction]"==f;if(y5(t))return s5(t,l);if(f==E5||f==C5||h&&!i){if(s=u||h?{}:g5(t),!l)return u?c5(t,a5(s,t)):u5(t,i5(s,t))}else{if(!P5[f])return i?t:{};s=v5(t,f,l)}}a||(a=new n5);var p=a.get(t);if(p)return p;a.set(t,s),k5(t)?t.forEach((function(o){s.add(e(o,n,r,o,t,a))})):b5(t)&&t.forEach((function(o,i){s.set(i,e(o,n,r,i,t,a))}));var v=d?void 0:(c?u?f5:d5:u?S5:x5)(t);return r5(v||t,(function(o,i){v&&(o=t[i=o]),o5(s,i,e(o,n,r,i,t,a))})),s},O5=L5;var A5=function(e){return O5(e,5)},M5=function(e,t,n,r,o,i,a){return{x:e/2-(n+o/2)*a,y:t/2-(r+i/2)*a}},T5=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.95,i=e*o/n,a=t*o/r,s=Math.min(1,Math.min(i,a));return s},I5=.95,R5=function(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}},N5=function(e){for(var t=e.width,n=e.height,r={width:t,height:n},o=t/n,i=t*n,a=448;i<262144;){if(a+=64,t===n){r.width=512,r.height=512;break}o>1?(r.width=a,r.height=pK(a/o,64)):o<1&&(r.height=a,r.width=pK(a*o,64)),i=r.width*r.height}return r},D5=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],z5=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],j5=function(e){return"line"===e.kind&&"mask"===e.layer},B5=function(e){return"image"===e.kind&&"base"===e.layer},F5=function(e){return"line"===e.kind},H5={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},V5=k$({name:"canvas",initialState:{boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:H5,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},reducers:{setTool:function(e,t){var n=t.payload;e.tool=t.payload,"move"!==n&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:function(e,t){e.layer=t.payload},toggleTool:function(e){var t=e.tool;"move"!==t&&(e.tool="brush"===t?"eraser":"brush")},setMaskColor:function(e,t){e.maskColor=t.payload},setBrushColor:function(e,t){e.brushColor=t.payload},setBrushSize:function(e,t){e.brushSize=t.payload},clearMask:function(e){e.pastLayerStates.push(A5(e.layerState)),e.layerState.objects=e.layerState.objects.filter((function(e){return!j5(e)})),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:function(e){e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:function(e){e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:function(e,t){e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:function(e,t){e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:function(e,t){e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:function(e,t){e.shouldShowBrushPreview=t.payload},setShouldShowBrush:function(e,t){e.shouldShowBrush=t.payload},setCursorPosition:function(e,t){e.cursorPosition=t.payload},setInitialCanvasImage:function(e,t){var n=t.payload,r=e.stageDimensions,o={width:hK(JK(n.width,64,512),64),height:hK(JK(n.height,64,512),64)},i={x:pK(n.width/2-o.width/2,64),y:pK(n.height/2-o.height/2,64)};if("auto"===e.boundingBoxScaleMethod){var a=N5(o);e.scaledBoundingBoxDimensions=a}e.boundingBoxDimensions=o,e.boundingBoxCoordinates=i,e.pastLayerStates.push(A5(e.layerState)),e.layerState=un(un({},H5),{},{objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]}),e.futureLayerStates=[],e.isCanvasInitialized=!1;var s=T5(r.width,r.height,n.width,n.height,I5),l=M5(r.width,r.height,0,0,n.width,n.height,s);e.stageScale=s,e.stageCoordinates=l,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:function(e,t){var n,r=(n=t.payload,{width:pK(n.width,64),height:pK(n.height,64)});if(e.boundingBoxDimensions=r,"auto"===e.boundingBoxScaleMethod){var o=N5(r);e.scaledBoundingBoxDimensions=o}},setBoundingBoxCoordinates:function(e,t){e.boundingBoxCoordinates=R5(t.payload)},setStageCoordinates:function(e,t){e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:function(e,t){e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:function(e,t){e.doesCanvasNeedScaling=t.payload},setStageScale:function(e,t){e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:function(e,t){e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:function(e,t){e.isDrawing=t.payload},clearCanvasHistory:function(e){e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:function(e,t){e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:function(e){e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:function(e,t){e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:function(e,t){e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:function(e,t){e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:function(e,t){e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:function(e,t){e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:function(e,t){e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:function(e,t){var n=t.payload,r=n.boundingBox,o=n.image;r&&o&&(e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push(un(un({kind:"image",layer:"base"},r),{},{image:o})),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:function(e){e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea=un({},H5.stagingArea),e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:function(e){var t=e.boundingBoxCoordinates,n=e.boundingBoxDimensions,r=e.brushColor;e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push(un(un(un({kind:"fillRect",layer:"base"},t),n),{},{color:r})),e.futureLayerStates=[]},addEraseRect:function(e){var t=e.boundingBoxCoordinates,n=e.boundingBoxDimensions;e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push(un(un({kind:"eraseRect",layer:"base"},t),n)),e.futureLayerStates=[]},addLine:function(e,t){var n=e.tool,r=e.layer,o=e.brushColor,i=e.brushSize,a=e.shouldRestrictStrokesToBox;if("move"!==n&&"colorPicker"!==n){var s=i/2,l="base"===r&&"brush"===n?{color:o}:{};e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();var u=un({kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload},l);a&&(u.clip=un(un({},e.boundingBoxCoordinates),e.boundingBoxDimensions)),e.layerState.objects.push(u),e.futureLayerStates=[]}},addPointToCurrentLine:function(e,t){var n,r=e.layerState.objects.findLast(F5);r&&(n=r.points).push.apply(n,cn(t.payload))},undo:function(e){var t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(A5(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:function(e){var t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:function(e,t){e.shouldShowGrid=t.payload},setIsMovingStage:function(e,t){e.isMovingStage=t.payload},setShouldSnapToGrid:function(e,t){e.shouldSnapToGrid=t.payload},setShouldAutoSave:function(e,t){e.shouldAutoSave=t.payload},setShouldShowIntermediates:function(e,t){e.shouldShowIntermediates=t.payload},resetCanvas:function(e){e.pastLayerStates.push(A5(e.layerState)),e.layerState=H5,e.futureLayerStates=[]},setCanvasContainerDimensions:function(e,t){e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:function(e){var t=e.canvasContainerDimensions,n=t.width,r=t.height,o=e.layerState.objects.find(B5),i={width:Math.floor(n),height:Math.floor(r)};if(o){var a=o.width,s=o.height,l=T5(n,r,a,s,.95),u=M5(i.width,i.height,0,0,a,s,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=R5(u),e.stageDimensions=i,e.isCanvasInitialized=!0}else{var c=T5(i.width,i.height,512,512,I5),d=M5(i.width,i.height,0,0,512,512,c),f={width:512,height:512};if(e.stageScale=c,e.stageCoordinates=d,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=f,"auto"===e.boundingBoxScaleMethod){var h=N5(f);e.scaledBoundingBoxDimensions=h}}},resizeCanvas:function(e){var t=e.canvasContainerDimensions,n=t.width,r=t.height,o={width:Math.floor(n),height:Math.floor(r)};if(e.stageDimensions=o,!e.layerState.objects.find(B5)){var i=T5(o.width,o.height,512,512,I5),a=M5(o.width,o.height,0,0,512,512,i),s={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=a,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=s,"auto"===e.boundingBoxScaleMethod){var l=N5(s);e.scaledBoundingBoxDimensions=l}}},resetCanvasView:function(e,t){var n=t.payload,r=n.contentRect,o=n.shouldScaleTo1,i=e.stageDimensions,a=i.width,s=i.height,l=r.x,u=r.y,c=r.width,d=r.height;if(0!==c&&0!==d){var f=o?1:T5(a,s,c,d,I5),h=M5(a,s,l,u,c,d,f);e.stageScale=f,e.stageCoordinates=h}else{var p=T5(a,s,512,512,I5),v=M5(a,s,0,0,512,512,p),g={width:512,height:512};if(e.stageScale=p,e.stageCoordinates=v,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=g,"auto"===e.boundingBoxScaleMethod){var m=N5(g);e.scaledBoundingBoxDimensions=m}}},nextStagingAreaImage:function(e){var t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:function(e){var t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:function(e){var t=e.layerState.stagingArea,n=t.images,r=t.selectedImageIndex;e.pastLayerStates.push(A5(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push(un({},n[r])),e.layerState.stagingArea=un({},H5.stagingArea),e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:function(e){var t=e.boundingBoxDimensions,n=e.boundingBoxCoordinates,r=e.stageDimensions,o=e.stageScale,i=r.width/o,a=r.height/o;if(n.x<0||n.x+t.width>i||n.y<0||n.y+t.height>a){var s={width:hK(JK(i,64,512),64),height:hK(JK(a,64,512),64)},l={x:pK(i/2-s.width/2,64),y:pK(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,"auto"===e.boundingBoxScaleMethod){var u=N5(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:function(e,t){if(e.boundingBoxScaleMethod=t.payload,"auto"===t.payload){var n=N5(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:function(e,t){e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:function(e,t){e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:function(e,t){e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:function(e,t){e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:function(e,t){e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:function(e,t){e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:function(e,t){e.colorPickerColor=t.payload},commitColorPickerColor:function(e){e.brushColor=un(un({},e.colorPickerColor),{},{a:e.brushColor.a}),e.tool="brush"},setMergedCanvas:function(e,t){e.pastLayerStates.push(A5(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:function(e){e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:function(e){e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),W5=V5.actions,U5=W5.addEraseRect,G5=W5.addFillRect,q5=W5.addImageToStagingArea,Y5=W5.addLine,Z5=W5.addPointToCurrentLine,X5=W5.clearCanvasHistory,$5=W5.clearMask,K5=W5.commitColorPickerColor,Q5=W5.commitStagingAreaImage,J5=W5.discardStagedImages,e3=(W5.fitBoundingBoxToStage,W5.mouseLeftCanvas),t3=W5.nextStagingAreaImage,n3=W5.prevStagingAreaImage,r3=W5.redo,o3=W5.resetCanvas,i3=W5.resetCanvasInteractionState,a3=W5.resetCanvasView,s3=W5.resizeAndScaleCanvas,l3=W5.resizeCanvas,u3=W5.setBoundingBoxCoordinates,c3=W5.setBoundingBoxDimensions,d3=(W5.setBoundingBoxPreviewFill,W5.setBoundingBoxScaleMethod),f3=W5.setBrushColor,h3=W5.setBrushSize,p3=W5.setCanvasContainerDimensions,v3=W5.setColorPickerColor,g3=W5.setCursorPosition,m3=W5.setDoesCanvasNeedScaling,y3=W5.setInitialCanvasImage,b3=W5.setIsDrawing,w3=W5.setIsMaskEnabled,k3=W5.setIsMouseOverBoundingBox,x3=(W5.setIsMoveBoundingBoxKeyHeld,W5.setIsMoveStageKeyHeld,W5.setIsMovingBoundingBox),S3=W5.setIsMovingStage,C3=W5.setIsTransformingBoundingBox,_3=W5.setLayer,E3=W5.setMaskColor,P3=W5.setMergedCanvas,L3=W5.setShouldAutoSave,O3=W5.setShouldCropToBoundingBoxOnSave,A3=W5.setShouldDarkenOutsideBoundingBox,M3=(W5.setShouldLockBoundingBox,W5.setShouldPreserveMaskedArea),T3=W5.setShouldShowBoundingBox,I3=(W5.setShouldShowBrush,W5.setShouldShowBrushPreview,W5.setShouldShowCanvasDebugInfo),R3=(W5.setShouldShowCheckboardTransparency,W5.setShouldShowGrid),N3=W5.setShouldShowIntermediates,D3=W5.setShouldShowStagingImage,z3=W5.setShouldShowStagingOutline,j3=W5.setShouldSnapToGrid,B3=W5.setStageCoordinates,F3=W5.setStageScale,H3=W5.setTool,V3=(W5.toggleShouldLockBoundingBox,W5.toggleTool,W5.undo),W3=W5.setScaledBoundingBoxDimensions,U3=W5.setShouldRestrictStrokesToBox,G3=V5.reducer,q3=k$({name:"gallery",initialState:{currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},reducers:{setCurrentImage:function(e,t){e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:function(e,t){var n=t.payload,r=n.uuid,o=n.category,i=e.categories[o].images,a=i.filter((function(e){return e.uuid!==r}));if(r===e.currentImageUuid){var s=i.findIndex((function(e){return e.uuid===r})),l=JK(s,0,a.length-1);e.currentImage=a.length?a[l]:void 0,e.currentImageUuid=a.length?a[l].uuid:""}e.categories[o].images=a},addImage:function(e,t){var n=t.payload,r=n.image,o=n.category,i=r.uuid,a=r.url,s=r.mtime,l=e.categories[o];l.images.find((function(e){return e.url===a&&e.mtime===s}))||(l.images.unshift(r),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=r,e.currentCategory=o),e.intermediateImage=void 0,l.latest_mtime=s)},setIntermediateImage:function(e,t){e.intermediateImage=t.payload},clearIntermediateImage:function(e){e.intermediateImage=void 0},selectNextImage:function(e){var t=e.currentImage;if(t){var n=e.categories[t.category].images;if(t){var r=n.findIndex((function(e){return e.uuid===t.uuid}));if(r<n.length-1){var o=n[r+1];e.currentImage=o,e.currentImageUuid=o.uuid}}}},selectPrevImage:function(e){var t=e.currentImage;if(t){var n=e.categories[t.category].images;if(t){var r=n.findIndex((function(e){return e.uuid===t.uuid}));if(r>0){var o=n[r-1];e.currentImage=o,e.currentImageUuid=o.uuid}}}},addGalleryImages:function(e,t){var n=t.payload,r=n.images,o=n.areMoreImagesAvailable,i=n.category,a=e.categories[i].images;if(r.length>0){var s=r.filter((function(e){return!a.find((function(t){return t.url===e.url&&t.mtime===e.mtime}))}));if(e.categories[i].images=a.concat(s).sort((function(e,t){return t.mtime-e.mtime})),!e.currentImage){var l=r[0];e.currentImage=l,e.currentImageUuid=l.uuid}e.categories[i].latest_mtime=r[0].mtime,e.categories[i].earliest_mtime=r[r.length-1].mtime}void 0!==o&&(e.categories[i].areMoreImagesAvailable=o)},setShouldPinGallery:function(e,t){e.shouldPinGallery=t.payload},setShouldShowGallery:function(e,t){e.shouldShowGallery=t.payload},setGalleryScrollPosition:function(e,t){e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:function(e,t){e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:function(e,t){e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:function(e,t){e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:function(e,t){e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:function(e,t){e.currentCategory=t.payload},setGalleryWidth:function(e,t){e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:function(e,t){e.shouldUseSingleGalleryColumn=t.payload}}}),Y3=q3.actions,Z3=Y3.addImage,X3=Y3.clearIntermediateImage,$3=Y3.removeImage,K3=Y3.setCurrentImage,Q3=Y3.addGalleryImages,J3=Y3.setIntermediateImage,e4=Y3.selectNextImage,t4=Y3.selectPrevImage,n4=Y3.setShouldPinGallery,r4=Y3.setShouldShowGallery,o4=Y3.setGalleryScrollPosition,i4=Y3.setGalleryImageMinimumWidth,a4=Y3.setGalleryImageObjectFit,s4=Y3.setShouldHoldGalleryOpen,l4=Y3.setShouldAutoSwitchToNewImages,u4=Y3.setCurrentCategory,c4=Y3.setGalleryWidth,d4=Y3.setShouldUseSingleGalleryColumn,f4=q3.reducer,h4=k$({name:"lightbox",initialState:{isLightboxOpen:!1},reducers:{setIsLightboxOpen:function(e,t){e.isLightboxOpen=t.payload}}}),p4=h4.actions.setIsLightboxOpen,v4=h4.reducer,g4=function(e){return 1===e.length?e[0].prompt:e.map((function(e){return"".concat(e.prompt,":").concat(e.weight)})).join(" ")};function m4(e){var t=g4(e),n=null,r=new RegExp(/(?<=\[)[^\][]*(?=])/,"gi"),o=cn(t.matchAll(r));return o&&o.length>0&&(n=o.join(", "),t=t.replaceAll(r,"").replaceAll("[]","").trim()),[t,n]}var y4=function(e){var t=e.split(",").map((function(e){return e.split(":")})),n=t.map((function(e){return{seed:Number(e[0]),weight:Number(e[1])}}));return!!b4(n)&&n},b4=function(e){return"string"==typeof e?Boolean(y4(e)):Boolean(e.length&&!e.some((function(e){var t=e.seed,n=e.weight,r=!isNaN(parseInt(t.toString(),10)),o=!isNaN(parseInt(n.toString(),10))&&n>=0&&n<=1;return!(r&&o)})))},w4=function(e){return e.reduce((function(e,t,n,r){var o=t.seed,i=t.weight;return e+="".concat(o,":").concat(i),n!==r.length-1&&(e+=","),e}),"")},k4={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512},x4=k$({name:"generation",initialState:k4,reducers:{setPrompt:function(e,t){var n=t.payload;e.prompt="string"==typeof n?n:g4(n)},setNegativePrompt:function(e,t){var n=t.payload;e.negativePrompt="string"==typeof n?n:g4(n)},setIterations:function(e,t){e.iterations=t.payload},setSteps:function(e,t){e.steps=t.payload},setCfgScale:function(e,t){e.cfgScale=t.payload},setThreshold:function(e,t){e.threshold=t.payload},setPerlin:function(e,t){e.perlin=t.payload},setHeight:function(e,t){e.height=t.payload},setWidth:function(e,t){e.width=t.payload},setSampler:function(e,t){e.sampler=t.payload},setSeed:function(e,t){e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:function(e,t){e.img2imgStrength=t.payload},setMaskPath:function(e,t){e.maskPath=t.payload},setSeamless:function(e,t){e.seamless=t.payload},setShouldFitToWidthHeight:function(e,t){e.shouldFitToWidthHeight=t.payload},resetSeed:function(e){e.seed=-1},setParameter:function(e,t){var n=t.payload,r=n.key,o=n.value,i=un(un({},e),{},gn({},r,o));return"seed"===r&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:function(e,t){e.shouldGenerateVariations=t.payload},setVariationAmount:function(e,t){e.variationAmount=t.payload},setSeedWeights:function(e,t){e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:function(e,t){var n=t.payload.image,r=n.sampler,o=n.prompt,i=n.seed,a=n.variations,s=n.steps,l=n.cfg_scale,u=n.threshold,c=n.perlin,d=n.seamless,f=(n.hires_fix,n.width),h=n.height;a&&a.length>0?(e.seedWeights=w4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),o&&(e.prompt=g4(o)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),e.threshold=void 0===u?0:u,c&&(e.perlin=c),void 0===c&&(e.perlin=0),"boolean"==typeof d&&(e.seamless=d),f&&(e.width=f),h&&(e.height=h)},setAllImageToImageParameters:function(e,t){var n=t.payload.image,r=n.type,o=n.strength,i=n.fit,a=n.init_image_path,s=n.mask_image_path;"img2img"===r&&(a&&(e.initialImage=a),s&&(e.maskPath=s),o&&(e.img2imgStrength=o),"boolean"==typeof i&&(e.shouldFitToWidthHeight=i))},setAllParameters:function(e,t){var n=t.payload.image,r=n.type,o=n.sampler,i=n.prompt,a=n.seed,s=n.variations,l=n.steps,u=n.cfg_scale,c=n.threshold,d=n.perlin,f=n.seamless,h=(n.hires_fix,n.width),p=n.height,v=n.strength,g=n.fit,m=n.init_image_path,y=n.mask_image_path;if("img2img"===r&&(m&&(e.initialImage=m),y&&(e.maskPath=y),v&&(e.img2imgStrength=v),"boolean"==typeof g&&(e.shouldFitToWidthHeight=g)),s&&s.length>0?(e.seedWeights=w4(s),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,a&&(e.seed=a,e.shouldRandomizeSeed=!1),i){var b=yn(m4(i),2),w=b[0],k=b[1];w&&(e.prompt=w),e.negativePrompt=k||""}o&&(e.sampler=o),l&&(e.steps=l),u&&(e.cfgScale=u),c&&(e.threshold=c),void 0===c&&(e.threshold=0),d&&(e.perlin=d),void 0===d&&(e.perlin=0),"boolean"==typeof f&&(e.seamless=f),h&&(e.width=h),p&&(e.height=p)},resetParametersState:function(e){return un(un({},e),k4)},setShouldRandomizeSeed:function(e,t){e.shouldRandomizeSeed=t.payload},setInitialImage:function(e,t){e.initialImage=t.payload},clearInitialImage:function(e){e.initialImage=void 0},setSeamSize:function(e,t){e.seamSize=t.payload},setSeamBlur:function(e,t){e.seamBlur=t.payload},setSeamStrength:function(e,t){e.seamStrength=t.payload},setSeamSteps:function(e,t){e.seamSteps=t.payload},setTileSize:function(e,t){e.tileSize=t.payload},setInfillMethod:function(e,t){e.infillMethod=t.payload}}}),S4=x4.actions,C4=S4.clearInitialImage,_4=(S4.resetParametersState,S4.resetSeed,S4.setAllImageToImageParameters),E4=S4.setAllParameters,P4=(S4.setAllTextToImageParameters,S4.setCfgScale),L4=S4.setHeight,O4=S4.setImg2imgStrength,A4=S4.setInfillMethod,M4=S4.setInitialImage,T4=S4.setIterations,I4=S4.setMaskPath,R4=(S4.setParameter,S4.setPerlin),N4=S4.setPrompt,D4=S4.setNegativePrompt,z4=S4.setSampler,j4=S4.setSeamBlur,B4=S4.setSeamless,F4=S4.setSeamSize,H4=S4.setSeamSteps,V4=S4.setSeamStrength,W4=S4.setSeed,U4=S4.setSeedWeights,G4=S4.setShouldFitToWidthHeight,q4=S4.setShouldGenerateVariations,Y4=S4.setShouldRandomizeSeed,Z4=S4.setSteps,X4=S4.setThreshold,$4=S4.setTileSize,K4=S4.setVariationAmount,Q4=S4.setWidth,J4=x4.reducer,e6={codeformerFidelity:.75,facetoolStrength:.8,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingStrength:.75},t6=k$({name:"postprocessing",initialState:e6,reducers:{setFacetoolStrength:function(e,t){e.facetoolStrength=t.payload},setCodeformerFidelity:function(e,t){e.codeformerFidelity=t.payload},setUpscalingLevel:function(e,t){e.upscalingLevel=t.payload},setUpscalingStrength:function(e,t){e.upscalingStrength=t.payload},setHiresFix:function(e,t){e.hiresFix=t.payload},setHiresStrength:function(e,t){e.hiresStrength=t.payload},resetPostprocessingState:function(e){return un(un({},e),e6)},setShouldRunFacetool:function(e,t){e.shouldRunFacetool=t.payload},setFacetoolType:function(e,t){e.facetoolType=t.payload},setShouldRunESRGAN:function(e,t){e.shouldRunESRGAN=t.payload},setShouldLoopback:function(e,t){e.shouldLoopback=t.payload}}}),n6=t6.actions,r6=(n6.resetPostprocessingState,n6.setCodeformerFidelity),o6=n6.setFacetoolStrength,i6=n6.setFacetoolType,a6=n6.setHiresFix,s6=n6.setHiresStrength,l6=n6.setShouldLoopback,u6=n6.setShouldRunESRGAN,c6=n6.setShouldRunFacetool,d6=n6.setUpscalingLevel,f6=n6.setUpscalingStrength,h6=t6.reducer;function p6(e){return p6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p6(e)}function v6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g6(e){var t=function(e,t){if("object"!==p6(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==p6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p6(t)?t:String(t)}function m6(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,g6(r.key),r)}}function y6(e,t,n){return t&&m6(e.prototype,t),n&&m6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b6(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w6(e,t){return w6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w6(e,t)}function k6(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&&w6(e,t)}function x6(e,t){if(t&&("object"===p6(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b6(e)}function S6(e){return S6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S6(e)}function C6(e,t,n){return(t=g6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E6(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _6(e,t);var n=Object.prototype.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)?_6(e,t):void 0}}(e)||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 P6(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 L6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P6(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O6={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},A6=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v6(this,e),this.init(t,n)}return y6(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||O6,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,L6(L6({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),M6=new A6,T6=function(){function e(){v6(this,e),this.observers={}}return y6(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value: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];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function I6(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function R6(e){return null==e?"":""+e}function N6(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function D6(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function z6(e,t,n){var r=D6(e,t,Object);r.obj[r.k]=n}function j6(e,t){var n=D6(e,t),r=n.obj,o=n.k;if(r)return r[o]}function B6(e,t,n){var r=j6(e,n);return void 0!==r?r:j6(t,n)}function F6(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):F6(e[r],t[r],n):e[r]=t[r]);return e}function H6(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var V6={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function W6(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return V6[e]})):e}var U6="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,G6=[" ",",","?","!",";"];function q6(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 Y6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q6(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z6(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Dhe){return!1}}();return function(){var n,r=S6(e);if(t){var o=S6(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x6(this,n)}}function X6(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];void 0===l&&r.length>i+a;)a++,l=o[s=r.slice(i,i+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s]}var u=r.slice(i+a).join(n);return u?X6(l,u,n):void 0}o=o[r[i]]}return o}}var $6=function(e){k6(n,e);var t=Z6(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return v6(this,n),r=t.call(this),U6&&T6.call(b6(r)),r.data=e||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return y6(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=j6(this.data,a);return s||!i||"string"!=typeof n?s:X6(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),z6(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=j6(this.data,a)||{};r?F6(s,n,o):s=Y6(Y6({},s),n),z6(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Y6(Y6({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(T6),K6={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function Q6(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 J6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q6(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function e7(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Dhe){return!1}}();return function(){var n,r=S6(e);if(t){var o=S6(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x6(this,n)}}var t7={},n7=function(e){k6(n,e);var t=e7(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return v6(this,n),r=t.call(this),U6&&T6.call(b6(r)),N6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,b6(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=M6.create("translator"),r}return y6(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=G6.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==p6(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var h=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(c).concat(h).concat(l),p):"".concat(c).concat(h).concat(l)}return i?(p.res=l,p):l}var p=this.resolve(e,t),v=p&&p.res,g=p&&p.usedKey||l,m=p&&p.exactUsedKey||l,y=Object.prototype.toString.apply(v),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&x&&b.indexOf(y)<0&&("string"!=typeof w||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,J6(J6({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=S,p):S}if(a){var C="[object Array]"===y,_=C?[]:{},E=C?m:g;for(var P in v)if(Object.prototype.hasOwnProperty.call(v,P)){var L="".concat(E).concat(a).concat(P);_[P]=this.translate(L,J6(J6({},t),{joinArrays:!1,ns:u})),_[P]===L&&(_[P]=v[P])}v=_}}else if(k&&"string"==typeof w&&"[object Array]"===y)(v=v.join(w))&&(v=this.extendTranslation(v,e,t,r));else{var O=!1,A=!1,M=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),I=M?this.pluralResolver.getSuffix(d,t.count,t):"",R=t["defaultValue".concat(I)]||t.defaultValue;!this.isValidLookup(v)&&T&&(O=!0,v=R),this.isValidLookup(v)||(A=!0,v=l);var N=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=N&&A?void 0:v,z=T&&R!==v&&this.options.updateMissing;if(A||O||z){if(this.logger.log(z?"updateKey":"missingKey",d,c,l,z?R:v),a){var j=this.resolve(l,J6(J6({},t),{},{keySeparator:!1}));j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var H=0;H<F.length;H++)B.push(F[H]);else"all"===this.options.saveMissingTo?B=this.languageUtils.toResolveHierarchy(t.lng||this.language):B.push(t.lng||this.language);var V=function(e,n,r){var i=T&&r!==v?r:D;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,n,i,z,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,n,i,z,t),o.emit("missingKey",e,c,n,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?B.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){V([e],l+n,t["defaultValue".concat(n)]||R)}))})):V(B,l,R))}v=this.extendTranslation(v,e,t,p,r),A&&v===l&&this.options.appendNamespaceToMissingKey&&(v="".concat(c,":").concat(l)),(A||O)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,O?v:void 0):this.options.parseMissingKeyHandler(v))}return i?(p.res=v,p):v}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,J6(J6({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(J6(J6({},n),{interpolation:J6(J6({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=J6(J6({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=K6.handle(f,e,t,this.options&&this.options.postProcessPassResolved?J6({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(i=e,!t7["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(t7["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,l=[u];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,u,n,e,s);else{var c;d&&(c=a.pluralResolver.getSuffix(n,s.count,s));var p="".concat(a.options.pluralSeparator,"zero");if(d&&(l.push(u+c),f&&l.push(u+p)),h){var v="".concat(u).concat(a.options.contextSeparator).concat(s.context);l.push(v),d&&(l.push(v+c),f&&l.push(v+p))}}for(;i=l.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(T6);function r7(e){return e.charAt(0).toUpperCase()+e.slice(1)}var o7=function(){function e(t){v6(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=M6.create("languageUtils")}return y6(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=r7(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=r7(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=r7(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),i7=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],a7={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},s7=["v1","v2","v3"],l7={zero:0,one:1,two:2,few:3,many:4,other:5};function u7(){var e={};return i7.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:a7[t.fc]}}))})),e}var c7=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v6(this,e),this.languageUtils=t,this.options=n,this.logger=M6.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=u7()}return y6(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return l7[e]-l7[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!s7.includes(this.options.compatibilityJSON)}}]),e}();function d7(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 f7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d7(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h7=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v6(this,e),this.logger=M6.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return y6(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:W6,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?H6(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?H6(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?H6(t.nestingPrefix):t.nestingPrefixEscaped||H6("$t("),this.nestingSuffix=t.nestingSuffix?H6(t.nestingSuffix):t.nestingSuffixEscaped||H6(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var o=B6(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,f7(f7(f7({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(B6(t,l,a),u,n,f7(f7(f7({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=c(n)))if("function"==typeof d){var l=d(e,o,r);i="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))i="";else{if(f){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=R6(i));var u=t.safeValue(i);if(e=e.replace(o[0],u),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var a=(i=this.interpolate(i,o)).match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o=f7(f7({},t),o))}catch(Dhe){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),Dhe),"".concat(e).concat(n).concat(i)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var l=[];(o=f7({},a)).applyPostProcessor=!1,delete o.defaultValue;var u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=c.shift(),l=c,u=!0}if((r=t(s.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=R6(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),u&&(r=l.reduce((function(e,t){return i.format(e,t,a.lng,f7(f7({},a),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function p7(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 v7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p7(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g7(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var m7=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v6(this,e),this.logger=M6.create("formatter"),this.options=t,this.formats={number:g7((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:g7((function(e,t){var n=new Intl.NumberFormat(e,v7(v7({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:g7((function(e,t){var n=new Intl.DateTimeFormat(e,v7({},t));return function(e){return n.format(e)}})),relativetime:g7((function(e,t){var n=new Intl.RelativeTimeFormat(e,v7({},t));return function(e){return n.format(e,t.range||"day")}})),list:g7((function(e,t){var n=new Intl.ListFormat(e,v7({},t));return function(e){return n.format(e)}}))},this.init(t)}return y6(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=g7(t)}},{key:"format",value:function(e,t,n,r){var o=this,i=t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=E6(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var l=e;try{var u=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},c=u.locale||u.lng||r.locale||r.lng||n;l=o.formats[a](e,c,v7(v7(v7({},s),r),u))}catch(d){o.logger.warn(d)}return l}return o.logger.warn("there was no format function for ".concat(a)),e}),e);return i}}]),e}();function y7(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 b7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y7(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w7(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Dhe){return!1}}();return function(){var n,r=S6(e);if(t){var o=S6(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x6(this,n)}}var k7=function(e){k6(n,e);var t=w7(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return v6(this,n),i=t.call(this),U6&&T6.call(b6(i)),i.backend=e,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=M6.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return y6(n,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){!function(e,t,n,r){var o=D6(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a});else{this.readingCalls++;var s=function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var u=r.waitingReads.shift();r.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,s);try{var u=l(e,t);u&&"function"==typeof u.then?u.then((function(e){return s(null,e)})).catch(s):s(null,u)}catch(COe){s(COe)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var s=b7(b7({},i),{},{isUpdate:o}),l=this.backend.create.bind(this.backend);if(l.length<6)try{var u;(u=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof u.then?u.then((function(e){return a(null,e)})).catch(a):a(null,u)}catch(COe){a(COe)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),n}(T6);function x7(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===p6(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===p6(e[2])||"object"===p6(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function S7(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function C7(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 _7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C7(Object(n),!0).forEach((function(t){C6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E7(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Dhe){return!1}}();return function(){var n,r=S6(e);if(t){var o=S6(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x6(this,n)}}function P7(){}function L7(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var O7=function(e){k6(n,e);var t=E7(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(v6(this,n),e=t.call(this),U6&&T6.call(b6(e)),e.options=S7(r),e.services={},e.logger=M6,e.modules={external:[]},L7(b6(e)),o&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,o),x6(e,b6(e));setTimeout((function(){e.init(r,o)}),0)}return e}return y6(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=x7();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=_7(_7(_7({},r),this.options),S7(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=_7(_7({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?M6.init(o(this.modules.logger),this.options):M6.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=m7);var a=new o7(this.options);this.store=new $6(this.options.resources,this.options);var s=this.services;s.logger=M6,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new c7(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new h7(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new k7(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new n7(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=P7),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=I6(),f=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P7,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=I6();return e||(e=this.languages),t||(t=this.options.ns),n||(n=P7),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&K6.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=I6();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==p6(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=_7({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var u=r.options.keySeparator||".",c=i.keyPrefix?"".concat(i.keyPrefix).concat(u).concat(t):t;return r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=I6();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=I6();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new o7(x7());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P7,o=_7(_7(_7({},this.options),t),{isClone:!0}),i=new n(o);void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t));var a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=_7({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new n7(i.services,i.options),i.translator.on("*",(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];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(T6);C6(O7,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new O7(e,t)}));var A7=O7.createInstance();function M7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T7(e){return T7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T7(e)}function I7(e){var t=function(e,t){if("object"!==T7(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==T7(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===T7(t)?t:String(t)}function R7(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,I7(r.key),r)}}A7.createInstance=O7.createInstance,A7.createInstance,A7.dir,A7.init,A7.loadResources,A7.reloadResources,A7.use,A7.changeLanguage,A7.getFixedT,A7.t,A7.exists,A7.setDefaultNamespace,A7.hasLoadedNamespace,A7.loadNamespaces,A7.loadLanguages;var N7=[],D7=N7.forEach,z7=N7.slice;function j7(e){return D7.call(z7.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var B7=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,F7=function(e,t,n){var r=n||{};r.path=r.path||"/";var o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!B7.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!B7.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},H7=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=F7(e,encodeURIComponent(t),o)},V7=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},W7={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=V7(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&H7(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},U7={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),o=0;o<r.length;o++){var i=r[o].indexOf("=");if(i>0)r[o].substring(0,i)===e.lookupQuerystring&&(t=r[o].substring(i+1))}}return t}},G7=null,q7=function(){if(null!==G7)return G7;try{G7="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(Dhe){G7=!1}return G7},Y7={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&q7()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&q7()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Z7=null,X7=function(){if(null!==Z7)return Z7;try{Z7="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(Dhe){Z7=!1}return Z7},$7={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&X7()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&X7()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},K7={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Q7={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},J7={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},e9={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var t9=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M7(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=j7(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(W7),this.addDetector(U7),this.addDetector(Y7),this.addDetector($7),this.addDetector(K7),this.addDetector(Q7),this.addDetector(J7),this.addDetector(e9)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}],n&&R7(t.prototype,n),r&&R7(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function n9(e){return n9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n9(e)}t9.type="languageDetector";var r9=[],o9=r9.forEach,i9=r9.slice;function a9(e){return o9.call(i9.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function s9(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":n9(XMLHttpRequest))}function l9(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var u9,c9={},d9={get exports(){return c9},set exports(e){c9=e}},f9={},h9={get exports(){return f9},set exports(e){f9=e}};function p9(){return u9||(u9=1,function(e,t){var n="undefined"!=typeof self?self:ir,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(Dhe){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=c(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=c(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function k(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];k.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(COe){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new k(o,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=b,e.Response=k),t.Headers=f,t.Request=b,t.Response=k,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(h9,f9)),f9}!function(e,t){var n;if("function"==typeof fetch&&(n=void 0!==ir&&ir.fetch?ir.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),void 0!==l9&&("undefined"==typeof window||void 0===window.document)){var r=n||p9();r.default&&(r=r.default),t.default=r,e.exports=t.default}}(d9,c9);var v9,g9,m9,y9=c9,b9=or({__proto__:null,default:y9},[c9]);function w9(e){return w9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w9(e)}"function"==typeof fetch&&(v9="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),s9()&&("undefined"!=typeof global&&global.XMLHttpRequest?g9=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(g9=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?m9=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(m9=window.ActiveXObject)),v9||!b9||g9||m9||(v9=y9||b9),"function"!=typeof v9&&(v9=void 0);var k9=function(e,t){if(t&&"object"===w9(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},x9=function(e,t,n){v9(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},S9=!1,C9=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},v9&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=k9(t,e.queryStringParams));var o=a9({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=a9({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},S9?{}:i);try{x9(t,a,r)}catch(Dhe){if(!i||0===Object.keys(i).length||!Dhe.message||Dhe.message.indexOf("not implemented")<0)return r(Dhe);try{Object.keys(i).forEach((function(e){delete a[e]})),x9(t,a,r),S9=!0}catch(COe){r(COe)}}}(e,t,n,r):s9()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===w9(n)&&(n=k9("",n).slice(1)),e.queryStringParams&&(t=k9(t,e.queryStringParams));try{var o;(o=g9?new g9:new m9("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var a in i)o.setRequestHeader(a,i[a]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(Dhe){console&&console.log(Dhe)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function _9(e){return _9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_9(e)}function E9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P9(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,L9(r.key),r)}}function L9(e){var t=function(e,t){if("object"!==_9(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_9(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_9(t)?t:String(t)}var O9=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return(t=L9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:C9,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},A9=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E9(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=a9(n,this.options||{},O9()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(i=s)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var s=a.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this;this.options.request(this.options,e,void 0,(function(i,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);var s,l;try{s="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(Dhe){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),s=0,l=[],u=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var c=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,c,a,(function(t,n){s+=1,l.push(t),u.push(n),s===e.length&&o&&o(l,u)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){r.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}],n&&P9(t.prototype,n),r&&P9(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function M9(e){return M9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M9(e)}function T9(e){var t=function(e,t){if("object"!==M9(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==M9(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===M9(t)?t:String(t)}function I9(e,t,n){return(t=T9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R9(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}A9.type="backend";var N9={};function D9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&N9[t[0]]||("string"==typeof t[0]&&(N9[t[0]]=new Date),R9.apply(void 0,t))}function z9(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function j9(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e))))}function B9(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return D9("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):j9(e,t,n)}var F9=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,H9={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},V9=function(e){return H9[e]};function W9(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 U9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W9(Object(n),!0).forEach((function(t){I9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W9(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G9,q9={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(F9,V9)}};function Y9(){return q9}function Z9(){return G9}function X9(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,T9(r.key),r)}}var $9={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};q9=U9(U9({},q9),e)}(e.options.react),function(e){G9=e}(e)}},K9=cr.createContext(),Q9=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var t,n,r;return t=e,(n=[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&X9(t.prototype,n),r&&X9(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function J9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function e8(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(COe){u=!0,o=COe}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return J9(e,t);var n=Object.prototype.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)?J9(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t8(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 n8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t8(Object(n),!0).forEach((function(t){I9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t8(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var r8=function(e,t){var n=cr.useRef();return cr.useEffect((function(){n.current=t?n.current:e}),[e,t]),n.current};function o8(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=cr.useContext(K9)||{},o=r.i18n,i=r.defaultNS,a=n||o||Z9();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Q9),!a){D9("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&void 0!==a.options.react.wait&&D9("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=n8(n8(n8({},Y9()),a.options.react),t),c=u.useSuspense,d=u.keyPrefix,f=e||i||a.options&&a.options.defaultNS;f="string"==typeof f?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var h=(a.isInitialized||a.initializedStoreOnce)&&f.every((function(e){return B9(e,a,u)}));function p(){return a.getFixedT(null,"fallback"===u.nsMode?f:f[0],d)}var v=cr.useState(p),g=e8(v,2),m=g[0],y=g[1],b=f.join(),w=r8(b),k=cr.useRef(!0);cr.useEffect((function(){var e=u.bindI18n,t=u.bindI18nStore;function n(){k.current&&y(p)}return k.current=!0,h||c||z9(a,f,(function(){k.current&&y(p)})),h&&w&&w!==b&&k.current&&y(p),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){k.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,n)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,n)}))}}),[a,b]);var x=cr.useRef(!0);cr.useEffect((function(){k.current&&!x.current&&y(p),x.current=!1}),[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h)return S;if(!h&&!c)return S;throw new Promise((function(e){z9(a,f,(function(){e()}))}))}A7.use(A9).use(t9).use($9).init({fallbackLng:"en",debug:!1,ns:["common","gallery","hotkeys","parameters","settings","modelmanager","toast","tooltip","unifiedcanvas"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});var i8=k$({name:"system",initialState:{isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:A7.isInitialized?A7.t("common:statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null},reducers:{setShouldDisplayInProgressType:function(e,t){e.shouldDisplayInProgressType=t.payload},setIsProcessing:function(e,t){e.isProcessing=t.payload},setCurrentStatus:function(e,t){e.currentStatus=t.payload},setSystemStatus:function(e,t){return un(un({},e),t.payload)},errorOccurred:function(e){e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=A7.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:function(e){e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?A7.t("common:statusConnected"):A7.t("common:statusDisconnected")},addLogEntry:function(e,t){var n=t.payload,r={timestamp:n.timestamp,message:n.message,level:n.level||"info"};e.log.push(r)},setShouldShowLogViewer:function(e,t){e.shouldShowLogViewer=t.payload},setIsConnected:function(e,t){e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:function(e,t){e.socketId=t.payload},setShouldConfirmOnDelete:function(e,t){e.shouldConfirmOnDelete=t.payload},setOpenAccordions:function(e,t){e.openAccordions=t.payload},setSystemConfig:function(e,t){return un(un({},e),t.payload)},setShouldDisplayGuides:function(e,t){e.shouldDisplayGuides=t.payload},processingCanceled:function(e){e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=A7.t("common:statusProcessingCanceled")},generationRequested:function(e){e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=A7.t("common:statusPreparing")},setModelList:function(e,t){e.model_list=t.payload},setIsCancelable:function(e,t){e.isCancelable=t.payload},modelChangeRequested:function(e){e.currentStatus=A7.t("common:statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:function(e,t){e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:function(e,t){e.enableImageDebugging=t.payload},addToast:function(e,t){e.toastQueue.push(t.payload)},clearToastQueue:function(e){e.toastQueue=[]},setProcessingIndeterminateTask:function(e,t){e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1},setSearchFolder:function(e,t){e.searchFolder=t.payload},setFoundModels:function(e,t){e.foundModels=t.payload},setOpenModel:function(e,t){e.openModel=t.payload}}}),a8=i8.actions,s8=a8.setShouldDisplayInProgressType,l8=a8.setIsProcessing,u8=a8.addLogEntry,c8=a8.setShouldShowLogViewer,d8=a8.setIsConnected,f8=(a8.setSocketId,a8.setShouldConfirmOnDelete),h8=a8.setOpenAccordions,p8=a8.setSystemStatus,v8=a8.setCurrentStatus,g8=a8.setSystemConfig,m8=a8.setShouldDisplayGuides,y8=a8.processingCanceled,b8=a8.errorOccurred,w8=a8.errorSeen,k8=a8.setModelList,x8=a8.setIsCancelable,S8=a8.modelChangeRequested,C8=a8.setSaveIntermediatesInterval,_8=a8.setEnableImageDebugging,E8=a8.generationRequested,P8=a8.addToast,L8=a8.clearToastQueue,O8=a8.setProcessingIndeterminateTask,A8=a8.setSearchFolder,M8=a8.setFoundModels,T8=a8.setOpenModel,I8=i8.reducer,R8=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],N8=k$({name:"ui",initialState:{activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowDualDisplay:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,addNewModelUIOption:null},reducers:{setActiveTab:function(e,t){"number"==typeof t.payload?e.activeTab=t.payload:e.activeTab=R8.indexOf(t.payload)},setCurrentTheme:function(e,t){e.currentTheme=t.payload},setParametersPanelScrollPosition:function(e,t){e.parametersPanelScrollPosition=t.payload},setShouldPinParametersPanel:function(e,t){e.shouldPinParametersPanel=t.payload},setShouldShowParametersPanel:function(e,t){e.shouldShowParametersPanel=t.payload},setShouldHoldParametersPanelOpen:function(e,t){e.shouldHoldParametersPanelOpen=t.payload},setShouldShowDualDisplay:function(e,t){e.shouldShowDualDisplay=t.payload},setShouldShowImageDetails:function(e,t){e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:function(e,t){e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:function(e,t){e.shouldShowExistingModelsInSearch=t.payload},setAddNewModelUIOption:function(e,t){e.addNewModelUIOption=t.payload}}}),D8=N8.actions,z8=D8.setActiveTab,j8=D8.setCurrentTheme,B8=D8.setParametersPanelScrollPosition,F8=D8.setShouldHoldParametersPanelOpen,H8=D8.setShouldPinParametersPanel,V8=D8.setShouldShowParametersPanel,W8=D8.setShouldShowDualDisplay,U8=D8.setShouldShowImageDetails,G8=D8.setShouldUseCanvasBetaLayout,q8=D8.setShouldShowExistingModelsInSearch,Y8=D8.setAddNewModelUIOption,Z8=N8.reducer,X8=Object.create(null);X8.open="0",X8.close="1",X8.ping="2",X8.pong="3",X8.message="4",X8.upgrade="5",X8.noop="6";var $8=Object.create(null);Object.keys(X8).forEach((function(e){$8[X8[e]]=e}));for(var K8={type:"error",data:"parser error"},Q8="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),J8="function"==typeof ArrayBuffer,eee=function(e,t,n){var r=e.type,o=e.data;return Q8&&o instanceof Blob?t?n(o):tee(o,n):J8&&(o instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(o))?t?n(o):tee(new Blob([o]),n):n(X8[r]+(o||""))},tee=function(e,t){var n=new FileReader;return n.onload=function(){var e=n.result.split(",")[1];t("b"+e)},n.readAsDataURL(e)},nee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ree="undefined"==typeof Uint8Array?[]:new Uint8Array(256),oee=0;oee<nee.length;oee++)ree[nee.charCodeAt(oee)]=oee;var iee="function"==typeof ArrayBuffer,aee=function(e,t){if("string"!=typeof e)return{type:"message",data:lee(e,t)};var n=e.charAt(0);return"b"===n?{type:"message",data:see(e.substring(1),t)}:$8[n]?e.length>1?{type:$8[n],data:e.substring(1)}:{type:$8[n]}:K8},see=function(e,t){if(iee){var n=function(e){var t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=ree[e.charCodeAt(t)],r=ree[e.charCodeAt(t+1)],o=ree[e.charCodeAt(t+2)],i=ree[e.charCodeAt(t+3)],c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|o>>2,c[l++]=(3&o)<<6|63&i;return u}(e);return lee(n,t)}return{base64:!0,data:e}},lee=function(e,t){return"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e},uee=String.fromCharCode(30);function cee(e){if(e)return function(e){for(var t in cee.prototype)e[t]=cee.prototype[t];return e}(e)}cee.prototype.on=cee.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},cee.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},cee.prototype.off=cee.prototype.removeListener=cee.prototype.removeAllListeners=cee.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},cee.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},cee.prototype.emitReserved=cee.prototype.emit,cee.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},cee.prototype.hasListeners=function(e){return!!this.listeners(e).length};var dee="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function fee(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 n.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}var hee=setTimeout,pee=clearTimeout;function vee(e,t){t.useNativeTimers?(e.setTimeoutFn=hee.bind(dee),e.clearTimeoutFn=pee.bind(dee)):(e.setTimeoutFn=setTimeout.bind(dee),e.clearTimeoutFn=clearTimeout.bind(dee))}function gee(e){return"string"==typeof e?function(e){for(var t=0,n=0,r=0,o=e.length;r<o;r++)(t=e.charCodeAt(r))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}var mee,yee=function(e){pn(n,e);var t=Qt(n);function n(e,r,o){var i;return an(this,n),(i=t.call(this,e)).description=r,i.context=o,i.type="TransportError",i}return on(n)}(Xt(Error)),bee=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this)).writable=!1,vee(en(r),e),r.opts=e,r.query=e.query,r.readyState="",r.socket=e.socket,r}return on(n,[{key:"onError",value:function(e,t,r){return Yt(nn(n.prototype),"emitReserved",this).call(this,"error",new yee(e,t,r)),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(e){"open"===this.readyState&&this.write(e)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,Yt(nn(n.prototype),"emitReserved",this).call(this,"open")}},{key:"onData",value:function(e){var t=aee(e,this.socket.binaryType);this.onPacket(t)}},{key:"onPacket",value:function(e){Yt(nn(n.prototype),"emitReserved",this).call(this,"packet",e)}},{key:"onClose",value:function(e){this.readyState="closed",Yt(nn(n.prototype),"emitReserved",this).call(this,"close",e)}}]),n}(cee),wee="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),kee={},xee=0,See=0;function Cee(e){var t="";do{t=wee[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function _ee(){var e=Cee(+new Date);return e!==mee?(xee=0,mee=e):e+"."+Cee(xee++)}for(;See<64;See++)kee[wee[See]]=See;function Eee(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Pee(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var Lee=!1;try{Lee="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(COe){}var Oee=Lee;function Aee(e){var t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Oee))return new XMLHttpRequest}catch(Dhe){}if(!t)try{return new(dee[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(Dhe){}}function Mee(){}var Tee=null!=new Aee({xdomain:!1}).responseType,Iee=function(e){pn(n,e);var t=Qt(n);function n(e){var r;if(an(this,n),(r=t.call(this,e)).polling=!1,"undefined"!=typeof location){var o="https:"===location.protocol,i=location.port;i||(i=o?"443":"80"),r.xd="undefined"!=typeof location&&e.hostname!==location.hostname||i!==e.port,r.xs=e.secure!==o}var a=e&&e.forceBase64;return r.supportsBinary=Tee&&!a,r}return on(n,[{key:"name",get:function(){return"polling"}},{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(e){var t=this;this.readyState="pausing";var n=function(){t.readyState="paused",e()};if(this.polling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})))}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(e){var t=this;(function(e,t){for(var n=e.split(uee),r=[],o=0;o<n.length;o++){var i=aee(n[o],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach((function(e){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose({description:"transport closed by the server"}),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var e=this,t=function(){e.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}},{key:"write",value:function(e){var t=this;this.writable=!1,function(e,t){var n=e.length,r=new Array(n),o=0;e.forEach((function(e,i){eee(e,!1,(function(e){r[i]=e,++o===n&&t(r.join(uee))}))}))}(e,(function(e){t.doWrite(e,(function(){t.writable=!0,t.emitReserved("drain")}))}))}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"https":"http",n="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=_ee()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);var r=Eee(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}},{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new Ree(this.uri(),e)}},{key:"doWrite",value:function(e,t){var n=this,r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(function(e,t){n.onError("xhr post error",e,t)}))}},{key:"doPoll",value:function(){var e=this,t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(function(t,n){e.onError("xhr poll error",t,n)})),this.pollXhr=t}}]),n}(bee),Ree=function(e){pn(n,e);var t=Qt(n);function n(e,r){var o;return an(this,n),vee(en(o=t.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=e,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return on(n,[{key:"create",value:function(){var e=this,t=fee(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;var r=this.xhr=new Aee(t);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var o in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}catch(Dhe){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(Dhe){}try{r.setRequestHeader("Accept","*/*")}catch(Dhe){}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=function(){4===r.readyState&&(200===r.status||1223===r.status?e.onLoad():e.setTimeoutFn((function(){e.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(Dhe){return void this.setTimeoutFn((function(){e.onError(Dhe)}),0)}"undefined"!=typeof document&&(this.index=n.requestsCount++,n.requests[this.index]=this)}},{key:"onError",value:function(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Mee,e)try{this.xhr.abort()}catch(Dhe){}"undefined"!=typeof document&&delete n.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),n}(cee);if(Ree.requestsCount=0,Ree.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Nee);else if("function"==typeof addEventListener){addEventListener("onpagehide"in dee?"pagehide":"unload",Nee,!1)}function Nee(){for(var e in Ree.requests)Ree.requests.hasOwnProperty(e)&&Ree.requests[e].abort()}var Dee="function"==typeof Promise&&"function"==typeof Promise.resolve?function(e){return Promise.resolve().then(e)}:function(e,t){return t(e,0)},zee=dee.WebSocket||dee.MozWebSocket,jee="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Bee=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).supportsBinary=!e.forceBase64,r}return on(n,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var e=this.uri(),t=this.opts.protocols,n=jee?{}:fee(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=jee?new zee(e,t,n):t?new zee(e,t):new zee(e)}catch(COe){return this.emitReserved("error",COe)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var e=this;this.ws.onopen=function(){e.opts.autoUnref&&e.ws._socket.unref(),e.onOpen()},this.ws.onclose=function(t){return e.onClose({description:"websocket connection closed",context:t})},this.ws.onmessage=function(t){return e.onData(t.data)},this.ws.onerror=function(t){return e.onError("websocket error",t)}}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=function(){var n=e[r],o=r===e.length-1;eee(n,t.supportsBinary,(function(e){try{t.ws.send(e)}catch(Dhe){}o&&Dee((function(){t.writable=!0,t.emitReserved("drain")}),t.setTimeoutFn)}))},r=0;r<e.length;r++)n()}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"wss":"ws",n="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=_ee()),this.supportsBinary||(e.b64=1);var r=Eee(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}},{key:"check",value:function(){return!!zee}}]),n}(bee),Fee={websocket:Bee,polling:Iee},Hee=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Vee=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wee(e){var t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));for(var o,i,a=Hee.exec(e||""),s={},l=14;l--;)s[Vee[l]]=a[l]||"";return-1!=n&&-1!=r&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(e,t){var n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,s.path),s.queryKey=(o=s.query,i={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(i[t]=n)})),i),s}var Uee=function(e){pn(n,e);var t=Qt(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return an(this,n),r=t.call(this),e&&"object"===kn(e)&&(o=e,e=null),e?(e=Wee(e),o.hostname=e.host,o.secure="https"===e.protocol||"wss"===e.protocol,o.port=e.port,e.query&&(o.query=e.query)):o.host&&(o.hostname=Wee(o.host).host),vee(en(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket"],r.readyState="",r.writeBuffer=[],r.prevBufferLen=0,r.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),r.opts.path=r.opts.path.replace(/\/$/,"")+"/","string"==typeof r.opts.query&&(r.opts.query=Pee(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"==typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return on(n,[{key:"createTransport",value:function(e){var t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);var n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Fee[e](n)}},{key:"open",value:function(){var e,t=this;if(this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(Dhe){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}},{key:"setTransport",value:function(e){var t=this;this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(e){return t.onClose("transport close",e)}))}},{key:"probe",value:function(e){var t=this,r=this.createTransport(e),o=!1;n.priorWebsocketSuccess=!1;var i=function(){o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(function(e){if(!o)if("pong"===e.type&&"probe"===e.data){if(t.upgrading=!0,t.emitReserved("upgrading",r),!r)return;n.priorWebsocketSuccess="websocket"===r.name,t.transport.pause((function(){o||"closed"!==t.readyState&&(d(),t.setTransport(r),r.send([{type:"upgrade"}]),t.emitReserved("upgrade",r),r=null,t.upgrading=!1,t.flush())}))}else{var i=new Error("probe error");i.transport=r.name,t.emitReserved("upgradeError",i)}})))};function a(){o||(o=!0,d(),r.close(),r=null)}var s=function(e){var n=new Error("probe error: "+e);n.transport=r.name,a(),t.emitReserved("upgradeError",n)};function l(){s("transport closed")}function u(){s("socket closed")}function c(e){r&&e.name!==r.name&&a()}var d=function(){r.removeListener("open",i),r.removeListener("error",s),r.removeListener("close",l),t.off("close",u),t.off("upgrading",c)};r.once("open",i),r.once("error",s),r.once("close",l),this.once("close",u),this.once("upgrading",c),r.open()}},{key:"onOpen",value:function(){if(this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},{key:"onPacket",value:function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}},{key:"onHandshake",value:function(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var e=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){e.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var e=1,t=0;t<this.writeBuffer.length;t++){var n=this.writeBuffer[t].data;if(n&&(e+=gee(n)),t>0&&e>this.maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}},{key:"write",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"send",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"sendPacket",value:function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var e=this,t=function(){e.onClose("forced close"),e.transport.close()},n=function n(){e.off("upgrade",n),e.off("upgradeError",n),t()},r=function(){e.once("upgrade",n),e.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){e.upgrading?r():t()})):this.upgrading?r():t()),this}},{key:"onError",value:function(e){n.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}},{key:"onClose",value:function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(e){for(var t=[],n=0,r=e.length;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}]),n}(cee);Uee.protocol=4;var Gee="function"==typeof ArrayBuffer,qee=Object.prototype.toString,Yee="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===qee.call(Blob),Zee="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===qee.call(File);function Xee(e){return Gee&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))||Yee&&e instanceof Blob||Zee&&e instanceof File}function $ee(e,t){if(!e||"object"!==kn(e))return!1;if(Array.isArray(e)){for(var n=0,r=e.length;n<r;n++)if($ee(e[n]))return!0;return!1}if(Xee(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return $ee(e.toJSON(),!0);for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&$ee(e[o]))return!0;return!1}function Kee(e){var t=[],n=e.data,r=e;return r.data=Qee(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qee(e,t){if(!e)return e;if(Xee(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){for(var r=new Array(e.length),o=0;o<e.length;o++)r[o]=Qee(e[o],t);return r}if("object"===kn(e)&&!(e instanceof Date)){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=Qee(e[a],t));return i}return e}function Jee(e,t){return e.data=ete(e.data,t),e.attachments=void 0,e}function ete(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=ete(e[n],t);else if("object"===kn(e))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=ete(e[r],t));return e}var tte;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(tte||(tte={}));var nte=function(){function e(t){an(this,e),this.replacer=t}return on(e,[{key:"encode",value:function(e){return e.type!==tte.EVENT&&e.type!==tte.ACK||!$ee(e)?[this.encodeAsString(e)]:(e.type=e.type===tte.EVENT?tte.BINARY_EVENT:tte.BINARY_ACK,this.encodeAsBinary(e))}},{key:"encodeAsString",value:function(e){var t=""+e.type;return e.type!==tte.BINARY_EVENT&&e.type!==tte.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}},{key:"encodeAsBinary",value:function(e){var t=Kee(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}]),e}(),rte=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this)).reviver=e,r}return on(n,[{key:"add",value:function(e){var t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");(t=this.decodeString(e)).type===tte.BINARY_EVENT||t.type===tte.BINARY_ACK?(this.reconstructor=new ote(t),0===t.attachments&&Yt(nn(n.prototype),"emitReserved",this).call(this,"decoded",t)):Yt(nn(n.prototype),"emitReserved",this).call(this,"decoded",t)}else{if(!Xee(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,Yt(nn(n.prototype),"emitReserved",this).call(this,"decoded",t))}}},{key:"decodeString",value:function(e){var t=0,r={type:Number(e.charAt(0))};if(void 0===tte[r.type])throw new Error("unknown packet type "+r.type);if(r.type===tte.BINARY_EVENT||r.type===tte.BINARY_ACK){for(var o=t+1;"-"!==e.charAt(++t)&&t!=e.length;);var i=e.substring(o,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(t+1)){for(var a=t+1;++t;){if(","===e.charAt(t))break;if(t===e.length)break}r.nsp=e.substring(a,t)}else r.nsp="/";var s=e.charAt(t+1);if(""!==s&&Number(s)==s){for(var l=t+1;++t;){var u=e.charAt(t);if(null==u||Number(u)!=u){--t;break}if(t===e.length)break}r.id=Number(e.substring(l,t+1))}if(e.charAt(++t)){var c=this.tryParse(e.substr(t));if(!n.isPayloadValid(r.type,c))throw new Error("invalid payload");r.data=c}return r}},{key:"tryParse",value:function(e){try{return JSON.parse(e,this.reviver)}catch(Dhe){return!1}}},{key:"destroy",value:function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}],[{key:"isPayloadValid",value:function(e,t){switch(e){case tte.CONNECT:return"object"===kn(t);case tte.DISCONNECT:return void 0===t;case tte.CONNECT_ERROR:return"string"==typeof t||"object"===kn(t);case tte.EVENT:case tte.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case tte.ACK:case tte.BINARY_ACK:return Array.isArray(t)}}}]),n}(cee),ote=function(){function e(t){an(this,e),this.packet=t,this.buffers=[],this.reconPack=t}return on(e,[{key:"takeBinaryData",value:function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=Jee(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),e}(),ite=Object.freeze(Object.defineProperty({__proto__:null,Decoder:rte,Encoder:nte,get PacketType(){return tte},protocol:5},Symbol.toStringTag,{value:"Module"}));function ate(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var ste=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),lte=function(e){pn(n,e);var t=Qt(n);function n(e,r,o){var i;return an(this,n),(i=t.call(this)).connected=!1,i.receiveBuffer=[],i.sendBuffer=[],i.ids=0,i.acks={},i.flags={},i.io=e,i.nsp=r,o&&o.auth&&(i.auth=o.auth),i.io._autoConnect&&i.open(),i}return on(n,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var e=this.io;this.subs=[ate(e,"open",this.onopen.bind(this)),ate(e,"packet",this.onpacket.bind(this)),ate(e,"error",this.onerror.bind(this)),ate(e,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}},{key:"emit",value:function(e){if(ste.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.unshift(e);var o={type:tte.EVENT,data:n,options:{}};if(o.options.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]){var i=this.ids++,a=n.pop();this._registerAckCallback(i,a),o.id=i}var s=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable,l=this.flags.volatile&&(!s||!this.connected);return l||(this.connected?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}},{key:"_registerAckCallback",value:function(e,t){var n=this,r=this.flags.timeout;if(void 0!==r){var o=this.io.setTimeoutFn((function(){delete n.acks[e];for(var r=0;r<n.sendBuffer.length;r++)n.sendBuffer[r].id===e&&n.sendBuffer.splice(r,1);t.call(n,new Error("operation has timed out"))}),r);this.acks[e]=function(){n.io.clearTimeoutFn(o);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];t.apply(n,[null].concat(r))}}else this.acks[e]=t}},{key:"packet",value:function(e){e.nsp=this.nsp,this.io._packet(e)}},{key:"onopen",value:function(){var e=this;"function"==typeof this.auth?this.auth((function(t){e.packet({type:tte.CONNECT,data:t})})):this.packet({type:tte.CONNECT,data:this.auth})}},{key:"onerror",value:function(e){this.connected||this.emitReserved("connect_error",e)}},{key:"onclose",value:function(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}},{key:"onpacket",value:function(e){if(e.nsp===this.nsp)switch(e.type){case tte.CONNECT:if(e.data&&e.data.sid){var t=e.data.sid;this.onconnect(t)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tte.EVENT:case tte.BINARY_EVENT:this.onevent(e);break;case tte.ACK:case tte.BINARY_ACK:this.onack(e);break;case tte.DISCONNECT:this.ondisconnect();break;case tte.CONNECT_ERROR:this.destroy();var n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n)}}},{key:"onevent",value:function(e){var t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}},{key:"emitEvent",value:function(e){if(this._anyListeners&&this._anyListeners.length){var t,r=xn(this._anyListeners.slice());try{for(r.s();!(t=r.n()).done;){t.value.apply(this,e)}}catch(COe){r.e(COe)}finally{r.f()}}Yt(nn(n.prototype),"emit",this).apply(this,e)}},{key:"ack",value:function(e){var t=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t.packet({type:tte.ACK,id:e,data:o})}}}},{key:"onack",value:function(e){var t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}},{key:"onconnect",value:function(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}},{key:"emitBuffered",value:function(){var e=this;this.receiveBuffer.forEach((function(t){return e.emitEvent(t)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(t){e.notifyOutgoingListeners(t),e.packet(t)})),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.destroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach((function(e){return e()})),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&this.packet({type:tte.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect()}},{key:"compress",value:function(e){return this.flags.compress=e,this}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}},{key:"timeout",value:function(e){return this.flags.timeout=e,this}},{key:"onAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}},{key:"prependAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}},{key:"offAny",value:function(e){if(!this._anyListeners)return this;if(e){for(var t=this._anyListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){return this._anyListeners||[]}},{key:"onAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}},{key:"prependAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}},{key:"offAnyOutgoing",value:function(e){if(!this._anyOutgoingListeners)return this;if(e){for(var t=this._anyOutgoingListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}},{key:"listenersAnyOutgoing",value:function(){return this._anyOutgoingListeners||[]}},{key:"notifyOutgoingListeners",value:function(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){var t,n=xn(this._anyOutgoingListeners.slice());try{for(n.s();!(t=n.n()).done;){t.value.apply(this,e.data)}}catch(COe){n.e(COe)}finally{n.f()}}}}]),n}(cee);function ute(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ute.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},ute.prototype.reset=function(){this.attempts=0},ute.prototype.setMin=function(e){this.ms=e},ute.prototype.setMax=function(e){this.max=e},ute.prototype.setJitter=function(e){this.jitter=e};var cte=function(e){pn(n,e);var t=Qt(n);function n(e,r){var o,i;an(this,n),(o=t.call(this)).nsps={},o.subs=[],e&&"object"===kn(e)&&(r=e,e=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,vee(en(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(i=r.randomizationFactor)&&void 0!==i?i:.5),o.backoff=new ute({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=e;var a=r.parser||ite;return o.encoder=new a.Encoder,o.decoder=new a.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return on(n,[{key:"reconnection",value:function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}},{key:"reconnectionAttempts",value:function(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}},{key:"reconnectionDelay",value:function(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}},{key:"randomizationFactor",value:function(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}},{key:"reconnectionDelayMax",value:function(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}},{key:"timeout",value:function(e){return arguments.length?(this._timeout=e,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(e){var t=this;if(~this._readyState.indexOf("open"))return this;this.engine=new Uee(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var o=ate(n,"open",(function(){r.onopen(),e&&e()})),i=ate(n,"error",(function(n){r.cleanup(),r._readyState="closed",t.emitReserved("error",n),e?e(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var a=this._timeout;0===a&&o();var s=this.setTimeoutFn((function(){o(),n.close(),n.emit("error",new Error("timeout"))}),a);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(o),this.subs.push(i),this}},{key:"connect",value:function(e){return this.open(e)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var e=this.engine;this.subs.push(ate(e,"ping",this.onping.bind(this)),ate(e,"data",this.ondata.bind(this)),ate(e,"error",this.onerror.bind(this)),ate(e,"close",this.onclose.bind(this)),ate(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(e){try{this.decoder.add(e)}catch(Dhe){this.onclose("parse error",Dhe)}}},{key:"ondecoded",value:function(e){var t=this;Dee((function(){t.emitReserved("packet",e)}),this.setTimeoutFn)}},{key:"onerror",value:function(e){this.emitReserved("error",e)}},{key:"socket",value:function(e,t){var n=this.nsps[e];return n||(n=new lte(this,e,t),this.nsps[e]=n),n}},{key:"_destroy",value:function(e){for(var t=0,n=Object.keys(this.nsps);t<n.length;t++){var r=n[t];if(this.nsps[r].active)return}this._close()}},{key:"_packet",value:function(e){for(var t=this.encoder.encode(e),n=0;n<t.length;n++)this.engine.write(t[n],e.options)}},{key:"cleanup",value:function(){this.subs.forEach((function(e){return e()})),this.subs.length=0,this.decoder.destroy()}},{key:"_close",value:function(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}},{key:"disconnect",value:function(){return this._close()}},{key:"onclose",value:function(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:function(){var e=this;if(this._reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){t.skipReconnect||(e.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((function(n){n?(t._reconnecting=!1,t.reconnect(),e.emitReserved("reconnect_error",n)):t.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}]),n}(cee),dte={};function fte(e,t){"object"===kn(e)&&(t=e,e=void 0);var n,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Wee(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var o=-1!==r.host.indexOf(":"),i=o?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),o=r.source,i=r.id,a=r.path,s=dte[i]&&a in dte[i].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?n=new cte(o,t):(dte[i]||(dte[i]=new cte(o,t)),n=dte[i]),r.query&&!t.query&&(t.query=r.queryKey),n.socket(r.path,t)}Object.assign(fte,{Manager:cte,Socket:lte,io:fte,connect:fte});var hte=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],pte=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],vte=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],gte=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],mte=[{key:"2x",value:2},{key:"4x",value:4}],yte=4294967295,bte=["gfpgan","codeformer"],wte=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],kte=Math.PI/180;var xte="undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},Ste={_global:xte,version:"8.3.14",isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:function(e){return Ste.angleDeg?e*kte:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:function(){return Ste.DD.isDragging},isDragReady:function(){return!!Ste.DD.node},releaseCanvasOnDestroy:!0,document:xte.document,_injectGlobal:function(e){xte.Konva=e}},Cte=function(e){Ste[e.prototype.getClassName()]=e};Ste._injectGlobal(Ste);var _te=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1,0,0,1,0,0];an(this,e),this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}return on(e,[{key:"reset",value:function(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}},{key:"copy",value:function(){return new e(this.m)}},{key:"copyInto",value:function(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}},{key:"point",value:function(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}},{key:"translate",value:function(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}},{key:"scale",value:function(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}},{key:"rotate",value:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,o=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,a=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=a,this}},{key:"getTranslation",value:function(){return{x:this.m[4],y:this.m[5]}}},{key:"skew",value:function(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,o=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this}},{key:"multiply",value:function(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],o=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],a=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}},{key:"invert",value:function(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,o=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}},{key:"getMatrix",value:function(){return this.m}},{key:"decompose",value:function(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],o=e*r-t*n,i={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=t){var a=Math.sqrt(e*e+t*t);i.rotation=t>0?Math.acos(e/a):-Math.acos(e/a),i.scaleX=a,i.scaleY=o/a,i.skewX=(e*n+t*r)/o,i.skewY=0}else if(0!=n||0!=r){var s=Math.sqrt(n*n+r*r);i.rotation=Math.PI/2-(r>0?Math.acos(-n/s):-Math.acos(n/s)),i.scaleX=o/s,i.scaleY=s,i.skewX=0,i.skewY=(e*n+t*r)/o}return i.rotation=Ite._getRotation(i.rotation),i}}]),e}(),Ete=Math.PI/180,Pte=180/Math.PI,Lte="Konva error: ",Ote={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Ate=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Mte=[],Tte="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)},Ite={_isElement:function(e){return!(!e||1!=e.nodeType)},_isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject:function(e){return!!e&&e.constructor===Object},_isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},_isNumber:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e)},_isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},_isBoolean:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},isObject:function(e){return e instanceof Object},isValidSelector:function(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:function(e){return 0===e||e>0?1:-1},requestAnimFrame:function(e){Mte.push(e),1===Mte.length&&Tte((function(){var e=Mte;Mte=[],e.forEach((function(e){e()}))}))},createCanvasElement:function(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(Dhe){}return e},createImageElement:function(){return document.createElement("img")},_isInDocument:function(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage:function(e,t){var n=Ite.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex:function(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb:function(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor:function(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB:function(e){var t;return e in Ote?{r:(t=Ote[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=Ate.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(e){return e=e||"black",Ite._namedColorToRBA(e)||Ite._hex3ColorToRGBA(e)||Ite._hex6ColorToRGBA(e)||Ite._rgbColorToRGBA(e)||Ite._rgbaColorToRGBA(e)||Ite._hslColorToRGBA(e)},_namedColorToRBA:function(e){var t=Ote[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA:function(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA:function(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((function(e,t){return"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)}));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA:function(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA:function(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA:function(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){var t,n,r,o=dn(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)),i=(o[0],o.slice(1)),a=Number(i[0])/360,s=Number(i[1])/100,l=Number(i[2])/100;if(0===s)return r=255*l,{r:Math.round(r),g:Math.round(r),b:Math.round(r),a:1};for(var u=2*l-(t=l<.5?l*(1+s):l+s-l*s),c=[0,0,0],d=0;d<3;d++)(n=a+1/3*-(d-1))<0&&n++,n>1&&n--,r=6*n<1?u+6*(t-u)*n:2*n<1?t:3*n<2?u+(t-u)*(2/3-n)*6:u,c[d]=255*r;return{r:Math.round(c[0]),g:Math.round(c[1]),b:Math.round(c[2]),a:1}}},haveIntersection:function(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject:function(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray:function(e){return e.slice(0)},degToRad:function(e){return e*Ete},radToDeg:function(e){return e*Pte},_degToRad:function(e){return Ite.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),Ite.degToRad(e)},_radToDeg:function(e){return Ite.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),Ite.radToDeg(e)},_getRotation:function(e){return Ste.angleDeg?Ite.radToDeg(e):e},_capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw:function(e){throw new Error(Lte+e)},error:function(e){console.error(Lte+e)},warn:function(e){Ste.showWarnings&&console.warn("Konva warning: "+e)},each:function(e,t){for(var n in e)t(n,e[n])},_inRange:function(e,t,n){return t<=e&&e<n},_getProjectionToSegment:function(e,t,n,r,o,i){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(0==u)a=e,s=t,l=(o-n)*(o-n)+(i-r)*(i-r);else{var c=((o-e)*(n-e)+(i-t)*(r-t))/u;c<0?(a=e,s=t,l=(e-o)*(e-o)+(t-i)*(t-i)):c>1?(a=n,s=r,l=(n-o)*(n-o)+(r-i)*(r-i)):l=((a=e+c*(n-e))-o)*(a-o)+((s=t+c*(r-t))-i)*(s-i)}return[a,s,l]},_getProjectionToLine:function(e,t,n){var r=Ite.cloneObject(e),o=Number.MAX_VALUE;return t.forEach((function(i,a){if(n||a!==t.length-1){var s=t[(a+1)%t.length],l=Ite._getProjectionToSegment(i.x,i.y,s.x,s.y,e.x,e.y),u=l[0],c=l[1],d=l[2];d<o&&(r.x=u,r.y=c,o=d)}})),r},_prepareArrayForTween:function(e,t,n){var r,o=[],i=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)o.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)i.push({x:t[r],y:t[r+1]});var s=[];return i.forEach((function(e){var t=Ite._getProjectionToLine(e,o,n);s.push(t.x),s.push(t.y)})),s},_prepareToStringify:function(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&"object"==kn(e[n]))if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||Ite._isElement(e[n])){if(!t.configurable)return null;delete e[n]}else if(null===Ite._prepareToStringify(e[n])){if(!t.configurable)return null;delete e[n]}return delete e.visitedByCircularReferenceRemoval,e},_assign:function(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId:function(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas:function(){if(Ste.releaseCanvasOnDestroy){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach((function(e){e.width=0,e.height=0}))}}};function Rte(e){return Ite._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||Ite._isBoolean(e)?e:Object.prototype.toString.call(e)}function Nte(e){return e>255?255:e<0?0:Math.round(e)}function Dte(){if(Ste.isUnminified)return function(e,t){return Ite._isNumber(e)||Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function zte(e){if(Ste.isUnminified)return function(t,n){var r=Ite._isNumber(t),o=Ite._isArray(t)&&t.length==e;return r||o||Ite.warn(Rte(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function jte(){if(Ste.isUnminified)return function(e,t){return Ite._isNumber(e)||"auto"===e||Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function Bte(){if(Ste.isUnminified)return function(e,t){return Ite._isString(e)||Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function Fte(){if(Ste.isUnminified)return function(e,t){var n=Ite._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Hte(){if(Ste.isUnminified)return function(e,t){return!0===e||!1===e||Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}var Vte="get",Wte="set",Ute={addGetterSetter:function(e,t,n,r,o){Ute.addGetter(e,t,n),Ute.addSetter(e,t,r,o),Ute.addOverloadedGetterSetter(e,t)},addGetter:function(e,t,n){var r=Vte+Ite._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter:function(e,t,n,r){var o=Wte+Ite._capitalize(t);e.prototype[o]||Ute.overWriteSetter(e,t,n,r)},overWriteSetter:function(e,t,n,r){var o=Wte+Ite._capitalize(t);e.prototype[o]=function(e){return n&&null!=e&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter:function(e,t,n,r,o){var i,a,s=n.length,l=Ite._capitalize,u=Vte+l(t),c=Wte+l(t);e.prototype[u]=function(){var e={};for(i=0;i<s;i++)e[a=n[i]]=this.getAttr(t+l(a));return e};var d=function(e){if(Ste.isUnminified)return function(t,n){return null==t||Ite.isObject(t)||Ite.warn(Rte(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}(n);e.prototype[c]=function(e){var i,a=this,s=this.attrs[t];for(i in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(i)&&this._setAttr(t+l(i),e[i]);return e||n.forEach((function(e){a._setAttr(t+l(e),void 0)})),this._fireChangeEvent(t,s,e),o&&o.call(this),this},Ute.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter:function(e,t){var n=Ite._capitalize(t),r=Wte+n,o=Vte+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter:function(e,t,n,r){Ite.error("Adding deprecated "+t);var o=Vte+Ite._capitalize(t),i=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[o]=function(){Ite.error(i);var e=this.attrs[t];return void 0===e?n:e},Ute.addSetter(e,t,r,(function(){Ite.error(i)})),Ute.addOverloadedGetterSetter(e,t)},backCompat:function(e,t){Ite.each(t,(function(t,n){var r=e.prototype[n],o=Vte+Ite._capitalize(t),i=Wte+Ite._capitalize(t);function a(){r.apply(this,arguments),Ite.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=a,e.prototype[o]=a,e.prototype[i]=a}))},afterSetFilter:function(){this._filterUpToDate=!1}};function Gte(e){var t,n,r=[],o=e.length,i=Ite;for(t=0;t<o;t++)n=e[t],i._isNumber(n)?n=Math.round(1e3*n)/1e3:i._isString(n)||(n+=""),r.push(n);return r}var qte=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Yte=function(){function e(t){an(this,e),this.canvas=t,Ste.enableTrace&&(this.traceArr=[],this._enableTrace())}return on(e,[{key:"fillShape",value:function(e){e.fillEnabled()&&this._fill(e)}},{key:"_fill",value:function(e){}},{key:"strokeShape",value:function(e){e.hasStroke()&&this._stroke(e)}},{key:"_stroke",value:function(e){}},{key:"fillStrokeShape",value:function(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}},{key:"getTrace",value:function(e,t){var n,r,o,i,a=this.traceArr,s=a.length,l="";for(n=0;n<s;n++)(o=(r=a[n]).method)?(i=r.args,l+=o,e?l+="()":Ite._isArray(i[0])?l+="(["+i.join(",")+"])":(t&&(i=i.map((function(e){return"number"==typeof e?Math.floor(e):e}))),l+="("+i.join(",")+")")):(l+=r.property,e||(l+="="+r.val)),l+=";";return l}},{key:"clearTrace",value:function(){this.traceArr=[]}},{key:"_trace",value:function(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}},{key:"reset",value:function(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}},{key:"getCanvas",value:function(){return this.canvas}},{key:"clear",value:function(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}},{key:"_applyLineCap",value:function(e){var t=e.getLineCap();t&&this.setAttr("lineCap",t)}},{key:"_applyOpacity",value:function(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}},{key:"_applyLineJoin",value:function(e){var t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}},{key:"setAttr",value:function(e,t){this._context[e]=t}},{key:"arc",value:function(e,t,n,r,o,i){this._context.arc(e,t,n,r,o,i)}},{key:"arcTo",value:function(e,t,n,r,o){this._context.arcTo(e,t,n,r,o)}},{key:"beginPath",value:function(){this._context.beginPath()}},{key:"bezierCurveTo",value:function(e,t,n,r,o,i){this._context.bezierCurveTo(e,t,n,r,o,i)}},{key:"clearRect",value:function(e,t,n,r){this._context.clearRect(e,t,n,r)}},{key:"clip",value:function(){this._context.clip()}},{key:"closePath",value:function(){this._context.closePath()}},{key:"createImageData",value:function(e,t){var n=arguments;return 2===n.length?this._context.createImageData(e,t):1===n.length?this._context.createImageData(e):void 0}},{key:"createLinearGradient",value:function(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}},{key:"createPattern",value:function(e,t){return this._context.createPattern(e,t)}},{key:"createRadialGradient",value:function(e,t,n,r,o,i){return this._context.createRadialGradient(e,t,n,r,o,i)}},{key:"drawImage",value:function(e,t,n,r,o,i,a,s,l){var u=arguments,c=this._context;3===u.length?c.drawImage(e,t,n):5===u.length?c.drawImage(e,t,n,r,o):9===u.length&&c.drawImage(e,t,n,r,o,i,a,s,l)}},{key:"ellipse",value:function(e,t,n,r,o,i,a,s){this._context.ellipse(e,t,n,r,o,i,a,s)}},{key:"isPointInPath",value:function(e,t){return this._context.isPointInPath(e,t)}},{key:"fill",value:function(e){e?this._context.fill(e):this._context.fill()}},{key:"fillRect",value:function(e,t,n,r){this._context.fillRect(e,t,n,r)}},{key:"strokeRect",value:function(e,t,n,r){this._context.strokeRect(e,t,n,r)}},{key:"fillText",value:function(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}},{key:"measureText",value:function(e){return this._context.measureText(e)}},{key:"getImageData",value:function(e,t,n,r){return this._context.getImageData(e,t,n,r)}},{key:"lineTo",value:function(e,t){this._context.lineTo(e,t)}},{key:"moveTo",value:function(e,t){this._context.moveTo(e,t)}},{key:"rect",value:function(e,t,n,r){this._context.rect(e,t,n,r)}},{key:"putImageData",value:function(e,t,n){this._context.putImageData(e,t,n)}},{key:"quadraticCurveTo",value:function(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}},{key:"restore",value:function(){this._context.restore()}},{key:"rotate",value:function(e){this._context.rotate(e)}},{key:"save",value:function(){this._context.save()}},{key:"scale",value:function(e,t){this._context.scale(e,t)}},{key:"setLineDash",value:function(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}},{key:"getLineDash",value:function(){return this._context.getLineDash()}},{key:"setTransform",value:function(e,t,n,r,o,i){this._context.setTransform(e,t,n,r,o,i)}},{key:"stroke",value:function(e){e?this._context.stroke(e):this._context.stroke()}},{key:"strokeText",value:function(e,t,n,r){this._context.strokeText(e,t,n,r)}},{key:"transform",value:function(e,t,n,r,o,i){this._context.transform(e,t,n,r,o,i)}},{key:"translate",value:function(e,t){this._context.translate(e,t)}},{key:"_enableTrace",value:function(){var e,t,n=this,r=qte.length,o=this.setAttr,i=function(e){var r,o=n[e];n[e]=function(){return t=Gte(Array.prototype.slice.call(arguments,0)),r=o.apply(n,arguments),n._trace({method:e,args:t}),r}};for(e=0;e<r;e++)i(qte[e]);n.setAttr=function(){o.apply(n,arguments);var e=arguments[0],t=arguments[1];"shadowOffsetX"!==e&&"shadowOffsetY"!==e&&"shadowBlur"!==e||(t/=this.canvas.getPixelRatio()),n._trace({property:e,val:t})}}},{key:"_applyGlobalCompositeOperation",value:function(e){var t=e.attrs.globalCompositeOperation;!t||"source-over"===t||this.setAttr("globalCompositeOperation",t)}}]),e}();["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach((function(e){Object.defineProperty(Yte.prototype,e,{get:function(){return this._context[e]},set:function(t){this._context[e]=t}})}));var Zte,Xte=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e))._context=e._canvas.getContext("2d"),r}return on(n,[{key:"_fillColor",value:function(e){var t=e.fill();this.setAttr("fillStyle",t),e._fillFunc(this)}},{key:"_fillPattern",value:function(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}},{key:"_fillLinearGradient",value:function(e){var t=e._getLinearGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}},{key:"_fillRadialGradient",value:function(e){var t=e._getRadialGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}},{key:"_fill",value:function(e){var t=e.fill(),n=e.getFillPriority();if(t&&"color"===n)this._fillColor(e);else{var r=e.getFillPatternImage();if(r&&"pattern"===n)this._fillPattern(e);else{var o=e.getFillLinearGradientColorStops();if(o&&"linear-gradient"===n)this._fillLinearGradient(e);else{var i=e.getFillRadialGradientColorStops();i&&"radial-gradient"===n?this._fillRadialGradient(e):t?this._fillColor(e):r?this._fillPattern(e):o?this._fillLinearGradient(e):i&&this._fillRadialGradient(e)}}}}},{key:"_strokeLinearGradient",value:function(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var i=0;i<r.length;i+=2)o.addColorStop(r[i],r[i+1]);this.setAttr("strokeStyle",o)}}},{key:"_stroke",value:function(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),n||this.restore()}}},{key:"_applyShadow",value:function(e){var t,n,r,o=null!==(t=e.getShadowRGBA())&&void 0!==t?t:"black",i=null!==(n=e.getShadowBlur())&&void 0!==n?n:5,a=null!==(r=e.getShadowOffset())&&void 0!==r?r:{x:0,y:0},s=e.getAbsoluteScale(),l=this.canvas.getPixelRatio(),u=s.x*l,c=s.y*l;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",i*Math.min(Math.abs(u),Math.abs(c))),this.setAttr("shadowOffsetX",a.x*u),this.setAttr("shadowOffsetY",a.y*c)}}]),n}(Yte),$te=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e))._context=e._canvas.getContext("2d",{willReadFrequently:!0}),r}return on(n,[{key:"_fill",value:function(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}},{key:"strokeShape",value:function(e){e.hasHitStroke()&&this._stroke(e)}},{key:"_stroke",value:function(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),o="auto"===r?e.strokeWidth():r;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),t||this.restore()}}}]),n}(Yte);var Kte=function(){function e(t){an(this,e),this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=(t||{}).pixelRatio||Ste.pixelRatio||function(){if(Zte)return Zte;var e=Ite.createCanvasElement(),t=e.getContext("2d");return Zte=(Ste._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),Ite.releaseCanvas(e),Zte}();this.pixelRatio=n,this._canvas=Ite.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}return on(e,[{key:"getContext",value:function(){return this.context}},{key:"getPixelRatio",value:function(){return this.pixelRatio}},{key:"setPixelRatio",value:function(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}},{key:"setWidth",value:function(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}},{key:"setHeight",value:function(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}},{key:"getWidth",value:function(){return this.width}},{key:"getHeight",value:function(){return this.height}},{key:"setSize",value:function(e,t){this.setWidth(e||0),this.setHeight(t||0)}},{key:"toDataURL",value:function(e,t){try{return this._canvas.toDataURL(e,t)}catch(Dhe){try{return this._canvas.toDataURL()}catch(COe){return Ite.error("Unable to get data URL. "+COe.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}]),e}();Ute.addGetterSetter(Kte,"pixelRatio",void 0,Dte());var Qte=function(e){pn(n,e);var t=Qt(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0};return an(this,n),(e=t.call(this,r)).context=new Xte(en(e)),e.setSize(r.width,r.height),e}return on(n)}(Kte),Jte=function(e){pn(n,e);var t=Qt(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0};return an(this,n),(e=t.call(this,r)).hitCanvas=!0,e.context=new $te(en(e)),e.setSize(r.width,r.height),e}return on(n)}(Kte),ene={get isDragging(){var e=!1;return ene._dragElements.forEach((function(t){"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return ene._dragElements.forEach((function(t){e=t.node})),e},_dragElements:new Map,_drag:function(e){var t=[];ene._dragElements.forEach((function(n,r){var o=n.node,i=o.getStage();i.setPointersPositions(e),void 0===n.pointerId&&(n.pointerId=Ite._getFirstPointerId(e));var a=i._changedPointerPositions.find((function(e){return e.id===n.pointerId}));if(a){if("dragging"!==n.dragStatus){var s=o.dragDistance();if(Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y))<s)return;if(o.startDrag({evt:e}),!o.isDragging())return}o._setDragPosition(e,n),t.push(o)}})),t.forEach((function(t){t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore:function(e){var t=[];ene._dragElements.forEach((function(n){var r=n.node.getStage();if(e&&r.setPointersPositions(e),r._changedPointerPositions.find((function(e){return e.id===n.pointerId}))){"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(ene.justDragged=!0,Ste._mouseListenClick=!1,Ste._touchListenClick=!1,Ste._pointerListenClick=!1,n.dragStatus="stopped");var o=n.node.getLayer()||n.node instanceof Ste.Stage&&n.node;o&&-1===t.indexOf(o)&&t.push(o)}})),t.forEach((function(e){e.draw()}))},_endDragAfter:function(e){ene._dragElements.forEach((function(t,n){"stopped"===t.dragStatus&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),"dragging"!==t.dragStatus&&ene._dragElements.delete(n)}))}};Ste.isBrowser&&(window.addEventListener("mouseup",ene._endDragBefore,!0),window.addEventListener("touchend",ene._endDragBefore,!0),window.addEventListener("mousemove",ene._drag),window.addEventListener("touchmove",ene._drag),window.addEventListener("mouseup",ene._endDragAfter,!1),window.addEventListener("touchend",ene._endDragAfter,!1));var tne="absoluteOpacity",nne="allEventListeners",rne="absoluteTransform",one="absoluteScale",ine="canvas",ane="listening",sne="mouseenter",lne="mouseleave",une="Shape",cne=" ",dne="stage",fne="transform",hne="visible",pne=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(cne),vne=1,gne=function(){function e(t){an(this,e),this._id=vne++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}return on(e,[{key:"hasChildren",value:function(){return!1}},{key:"_clearCache",value:function(e){e!==fne&&e!==rne||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}},{key:"_getCache",value:function(e,t){var n=this._cache.get(e);return(void 0===n||(e===fne||e===rne)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}},{key:"_calculate",value:function(e,t,n){var r=this;if(!this._attachedDepsListeners.get(e)){var o=t.map((function(e){return e+"Change.konva"})).join(cne);this.on(o,(function(){r._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}},{key:"_getCanvasCache",value:function(){return this._cache.get(ine)}},{key:"_clearSelfAndDescendantCache",value:function(e){this._clearCache(e),e===rne&&this.fire("absoluteTransformChange")}},{key:"clearCache",value:function(){if(this._cache.has(ine)){var e=this._cache.get(ine),t=e.scene,n=e.filter,r=e.hit;Ite.releaseCanvas(t,n,r),this._cache.delete(ine)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}},{key:"cache",value:function(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),o=Math.ceil(t.height||n.height),i=t.pixelRatio,a=void 0===t.x?Math.floor(n.x):t.x,s=void 0===t.y?Math.floor(n.y):t.y,l=t.offset||0,u=t.drawBorder||!1,c=t.hitCanvasPixelRatio||1;if(r&&o){a-=l,s-=l;var d=new Qte({pixelRatio:i,width:r+=2*l+1,height:o+=2*l+1}),f=new Qte({pixelRatio:i,width:0,height:0}),h=new Jte({pixelRatio:c,width:r,height:o}),p=d.getContext(),v=h.getContext();return h.isCache=!0,d.isCache=!0,this._cache.delete(ine),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),p.save(),v.save(),p.translate(-a,-s),v.translate(-a,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(tne),this._clearSelfAndDescendantCache(one),this.drawScene(d,this),this.drawHit(h,this),this._isUnderCache=!1,p.restore(),v.restore(),u&&(p.save(),p.beginPath(),p.rect(0,0,r,o),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(ine,{scene:d,filter:f,hit:h,x:a,y:s}),this._requestDraw(),this}Ite.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}},{key:"isCached",value:function(){return this._cache.has(ine)}},{key:"getClientRect",value:function(e){throw new Error('abstract "getClientRect" method call')}},{key:"_transformedRect",value:function(e,t){var n,r,o,i,a=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=this.getAbsoluteTransform(t);return a.forEach((function(e){var t=s.point(e);void 0===n&&(n=o=t.x,r=i=t.y),n=Math.min(n,t.x),r=Math.min(r,t.y),o=Math.max(o,t.x),i=Math.max(i,t.y)})),{x:n,y:r,width:o-n,height:i-r}}},{key:"_drawCachedSceneCanvas",value:function(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);var t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}},{key:"_drawCachedHitCanvas",value:function(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}},{key:"_getCachedSceneCanvas",value:function(){var e,t,n,r,o=this.filters(),i=this._getCanvasCache(),a=i.scene,s=i.filter,l=s.getContext();if(o){if(!this._filterUpToDate){var u=a.pixelRatio;s.setSize(a.width/a.pixelRatio,a.height/a.pixelRatio);try{for(e=o.length,l.clear(),l.drawImage(a._canvas,0,0,a.getWidth()/u,a.getHeight()/u),t=l.getImageData(0,0,s.getWidth(),s.getHeight()),n=0;n<e;n++)"function"==typeof(r=o[n])?(r.call(this,t),l.putImageData(t,0,0)):Ite.error("Filter should be type of function, but got "+kn(r)+" instead. Please check correct filters")}catch(Dhe){Ite.error("Unable to apply filter. "+Dhe.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return a}},{key:"on",value:function(e,t){if(this._cache&&this._cache.delete(nne),3===arguments.length)return this._delegate.apply(this,arguments);var n,r,o,i,a=e.split(cne),s=a.length;for(n=0;n<s;n++)o=(r=a[n].split("."))[0],i=r[1]||"",this.eventListeners[o]||(this.eventListeners[o]=[]),this.eventListeners[o].push({name:i,handler:t});return this}},{key:"off",value:function(e,t){var n,r,o,i,a,s=(e||"").split(cne),l=s.length;if(this._cache&&this._cache.delete(nne),!e)for(r in this.eventListeners)this._off(r);for(n=0;n<l;n++)if(i=(o=s[n].split("."))[0],a=o[1],i)this.eventListeners[i]&&this._off(i,a,t);else for(r in this.eventListeners)this._off(r,a,t);return this}},{key:"dispatchEvent",value:function(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}},{key:"addEventListener",value:function(e,t){return this.on(e,(function(e){t.call(this,e.evt)})),this}},{key:"removeEventListener",value:function(e){return this.off(e),this}},{key:"_delegate",value:function(e,t,n){var r=this;this.on(e,(function(e){for(var o=e.target.findAncestors(t,!0,r),i=0;i<o.length;i++)(e=Ite.cloneObject(e)).currentTarget=o[i],n.call(o[i],e)}))}},{key:"remove",value:function(){return this.isDragging()&&this.stopDrag(),ene._dragElements.delete(this._id),this._remove(),this}},{key:"_clearCaches",value:function(){this._clearSelfAndDescendantCache(rne),this._clearSelfAndDescendantCache(tne),this._clearSelfAndDescendantCache(one),this._clearSelfAndDescendantCache(dne),this._clearSelfAndDescendantCache(hne),this._clearSelfAndDescendantCache(ane)}},{key:"_remove",value:function(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}},{key:"destroy",value:function(){return this.remove(),this.clearCache(),this}},{key:"getAttr",value:function(e){var t="get"+Ite._capitalize(e);return Ite._isFunction(this[t])?this[t]():this.attrs[e]}},{key:"getAncestors",value:function(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}},{key:"getAttrs",value:function(){return this.attrs||{}}},{key:"setAttrs",value:function(e){var t=this;return this._batchTransformChanges((function(){var n,r;if(!e)return t;for(n in e)"children"!==n&&(r="set"+Ite._capitalize(n),Ite._isFunction(t[r])?t[r](e[n]):t._setAttr(n,e[n]))})),this}},{key:"isListening",value:function(){return this._getCache(ane,this._isListening)}},{key:"_isListening",value:function(e){if(!this.listening())return!1;var t=this.getParent();return!t||t===e||this===e||t._isListening(e)}},{key:"isVisible",value:function(){return this._getCache(hne,this._isVisible)}},{key:"_isVisible",value:function(e){if(!this.visible())return!1;var t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}},{key:"shouldDrawHit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;ene._dragElements.forEach((function(e){"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var o=!t&&!Ste.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!o}},{key:"show",value:function(){return this.visible(!0),this}},{key:"hide",value:function(){return this.visible(!1),this}},{key:"getZIndex",value:function(){return this.index||0}},{key:"getAbsoluteZIndex",value:function(){var e,t,n,r,o=this.getDepth(),i=this,a=0;return"Stage"!==i.nodeType&&function s(l){for(e=[],t=l.length,n=0;n<t;n++)r=l[n],a++,r.nodeType!==une&&(e=e.concat(r.getChildren().slice())),r._id===i._id&&(n=t);e.length>0&&e[0].getDepth()<=o&&s(e)}(i.getStage().getChildren()),a}},{key:"getDepth",value:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}},{key:"_batchTransformChanges",value:function(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(fne),this._clearSelfAndDescendantCache(rne)),this._needClearTransformCache=!1}},{key:"setPosition",value:function(e){var t=this;return this._batchTransformChanges((function(){t.x(e.x),t.y(e.y)})),this}},{key:"getPosition",value:function(){return{x:this.x(),y:this.y()}}},{key:"getRelativePointerPosition",value:function(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}},{key:"getAbsolutePosition",value:function(e){for(var t=!1,n=this.parent;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),o=new _te,i=this.offset();return o.m=r.slice(),o.translate(i.x,i.y),o.getTranslation()}},{key:"setAbsolutePosition",value:function(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache(fne);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache(fne),this._clearSelfAndDescendantCache(rne),this}},{key:"_setTransform",value:function(e){var t;for(t in e)this.attrs[t]=e[t]}},{key:"_clearTransform",value:function(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}},{key:"move",value:function(e){var t=e.x,n=e.y,r=this.x(),o=this.y();return void 0!==t&&(r+=t),void 0!==n&&(o+=n),this.setPosition({x:r,y:o}),this}},{key:"_eachAncestorReverse",value:function(e,t){var n,r,o=[],i=this.getParent();if(!t||t._id!==this._id){for(o.unshift(this);i&&(!t||i._id!==t._id);)o.unshift(i),i=i.parent;for(n=o.length,r=0;r<n;r++)e(o[r])}}},{key:"rotate",value:function(e){return this.rotation(this.rotation()+e),this}},{key:"moveToTop",value:function(){if(!this.parent)return Ite.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}},{key:"moveUp",value:function(){if(!this.parent)return Ite.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)}},{key:"moveDown",value:function(){if(!this.parent)return Ite.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}},{key:"moveToBottom",value:function(){if(!this.parent)return Ite.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}},{key:"setZIndex",value:function(e){if(!this.parent)return Ite.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&Ite.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}},{key:"getAbsoluteOpacity",value:function(){return this._getCache(tne,this._getAbsoluteOpacity)}},{key:"_getAbsoluteOpacity",value:function(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}},{key:"moveTo",value:function(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}},{key:"toObject",value:function(){var e,t,n,r,o={},i=this.getAttrs();for(e in o.attrs={},i)t=i[e],Ite.isObject(t)&&!Ite._isPlainObject(t)&&!Ite._isArray(t)||(n="function"==typeof this[e]&&this[e],delete i[e],r=n?n.call(this):null,i[e]=t,r!==t&&(o.attrs[e]=t));return o.className=this.getClassName(),Ite._prepareToStringify(o)}},{key:"toJSON",value:function(){return JSON.stringify(this.toObject())}},{key:"getParent",value:function(){return this.parent}},{key:"findAncestors",value:function(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var o=this.parent;o;){if(o===n)return r;o._isMatch(e)&&r.push(o),o=o.parent}return r}},{key:"isAncestorOf",value:function(e){return!1}},{key:"findAncestor",value:function(e,t,n){return this.findAncestors(e,t,n)[0]}},{key:"_isMatch",value:function(e){if(!e)return!1;if("function"==typeof e)return e(this);var t,n,r=e.replace(/ /g,"").split(","),o=r.length;for(t=0;t<o;t++)if(n=r[t],Ite.isValidSelector(n)||(Ite.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Ite.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Ite.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}},{key:"getLayer",value:function(){var e=this.getParent();return e?e.getLayer():null}},{key:"getStage",value:function(){return this._getCache(dne,this._getStage)}},{key:"_getStage",value:function(){var e=this.getParent();return e?e.getStage():void 0}},{key:"fire",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}},{key:"getAbsoluteTransform",value:function(e){return e?this._getAbsoluteTransform(e):this._getCache(rne,this._getAbsoluteTransform)}},{key:"_getAbsoluteTransform",value:function(e){var t;if(e)return t=new _te,this._eachAncestorReverse((function(e){var n=e.transformsEnabled();"all"===n?t.multiply(e.getTransform()):"position"===n&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())}),e),t;t=this._cache.get(rne)||new _te,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if("all"===n)t.multiply(this.getTransform());else if("position"===n){var r=this.attrs.x||0,o=this.attrs.y||0,i=this.attrs.offsetX||0,a=this.attrs.offsetY||0;t.translate(r-i,o-a)}return t.dirty=!1,t}},{key:"getAbsoluteScale",value:function(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();var n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}},{key:"getAbsoluteRotation",value:function(){return this.getAbsoluteTransform().decompose().rotation}},{key:"getTransform",value:function(){return this._getCache(fne,this._getTransform)}},{key:"_getTransform",value:function(){var e,t,n=this._cache.get(fne)||new _te;n.reset();var r=this.x(),o=this.y(),i=Ste.getAngle(this.rotation()),a=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,s=null!==(t=this.attrs.scaleY)&&void 0!==t?t:1,l=this.attrs.skewX||0,u=this.attrs.skewY||0,c=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return 0===r&&0===o||n.translate(r,o),0!==i&&n.rotate(i),0===l&&0===u||n.skew(l,u),1===a&&1===s||n.scale(a,s),0===c&&0===d||n.translate(-1*c,-1*d),n.dirty=!1,n}},{key:"clone",value:function(e){var t,n,r,o,i,a=Ite.cloneObject(this.attrs);for(t in e)a[t]=e[t];var s=new this.constructor(a);for(t in this.eventListeners)for(r=(n=this.eventListeners[t]).length,o=0;o<r;o++)(i=n[o]).name.indexOf("konva")<0&&(s.eventListeners[t]||(s.eventListeners[t]=[]),s.eventListeners[t].push(i));return s}},{key:"_toKonvaCanvas",value:function(e){e=e||{};var t=this.getClientRect(),n=this.getStage(),r=void 0!==e.x?e.x:Math.floor(t.x),o=void 0!==e.y?e.y:Math.floor(t.y),i=e.pixelRatio||1,a=new Qte({width:e.width||Math.ceil(t.width)||(n?n.width():0),height:e.height||Math.ceil(t.height)||(n?n.height():0),pixelRatio:i}),s=a.getContext();return!1===e.imageSmoothingEnabled&&(s._context.imageSmoothingEnabled=!1),s.save(),(r||o)&&s.translate(-1*r,-1*o),this.drawScene(a),s.restore(),a}},{key:"toCanvas",value:function(e){return this._toKonvaCanvas(e)._canvas}},{key:"toDataURL",value:function(e){var t=(e=e||{}).mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}},{key:"toImage",value:function(e){var t=this;return new Promise((function(n,r){try{var o=null==e?void 0:e.callback;o&&delete e.callback,Ite._urlToImage(t.toDataURL(e),(function(e){n(e),null==o||o(e)}))}catch(COe){r(COe)}}))}},{key:"toBlob",value:function(e){var t=this;return new Promise((function(n,r){try{var o=null==e?void 0:e.callback;o&&delete e.callback,t.toCanvas(e).toBlob((function(e){n(e),null==o||o(e)}))}catch(COe){r(COe)}}))}},{key:"setSize",value:function(e){return this.width(e.width),this.height(e.height),this}},{key:"getSize",value:function(){return{width:this.width(),height:this.height()}}},{key:"getClassName",value:function(){return this.className||this.nodeType}},{key:"getType",value:function(){return this.nodeType}},{key:"getDragDistance",value:function(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ste.dragDistance}},{key:"_off",value:function(e,t,n){var r,o,i,a=this.eventListeners[e];for(r=0;r<a.length;r++)if(o=a[r].name,i=a[r].handler,!("konva"===o&&"konva"!==t||t&&o!==t||n&&n!==i)){if(a.splice(r,1),0===a.length){delete this.eventListeners[e];break}r--}}},{key:"_fireChangeEvent",value:function(e,t,n){this._fire(e+"Change",{oldVal:t,newVal:n})}},{key:"addName",value:function(e){if(!this.hasName(e)){var t=this.name(),n=t?t+" "+e:e;this.name(n)}return this}},{key:"hasName",value:function(e){if(!e)return!1;var t=this.name();return!!t&&-1!==(t||"").split(/\s/g).indexOf(e)}},{key:"removeName",value:function(e){var t=(this.name()||"").split(/\s/g),n=t.indexOf(e);return-1!==n&&(t.splice(n,1),this.name(t.join(" "))),this}},{key:"setAttr",value:function(e,t){var n=this["set"+Ite._capitalize(e)];return Ite._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}},{key:"_requestDraw",value:function(){if(Ste.autoDrawEnabled){var e=this.getLayer()||this.getStage();null==e||e.batchDraw()}}},{key:"_setAttr",value:function(e,t){var n=this.attrs[e];(n!==t||Ite.isObject(t))&&(null==t?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}},{key:"_setComponentAttr",value:function(e,t,n){var r;void 0!==n&&((r=this.attrs[e])||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}},{key:"_fireAndBubble",value:function(e,t,n){if(t&&this.nodeType===une&&(t.target=this),!((e===sne||e===lne)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n))){this._fire(e,t);var r=(e===sne||e===lne)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}},{key:"_getProtoListeners",value:function(e){var t=this._cache.get(nne);if(!t){t={};for(var n=Object.getPrototypeOf(this);n;)if(n.eventListeners){for(var r in n.eventListeners){var o=n.eventListeners[r],i=t[r]||[];t[r]=o.concat(i)}n=Object.getPrototypeOf(n)}else n=Object.getPrototypeOf(n);this._cache.set(nne,t)}return t[e]}},{key:"_fire",value:function(e,t){(t=t||{}).currentTarget=this,t.type=e;var n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);var o=this.eventListeners[e];if(o)for(r=0;r<o.length;r++)o[r].handler.call(this,t)}},{key:"draw",value:function(){return this.drawScene(),this.drawHit(),this}},{key:"_createDragElement",value:function(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),o=n._getPointerById(t)||n._changedPointerPositions[0]||r;ene._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-r.x,y:o.y-r.y},dragStatus:"ready",pointerId:t})}},{key:"startDrag",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ene._dragElements.has(this._id)||this._createDragElement(e);var n=ene._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},t)}},{key:"_setDragPosition",value:function(e,t){var n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},o=this.dragBoundFunc();if(void 0!==o){var i=o.call(this,r,e);i?r=i:Ite.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}},{key:"stopDrag",value:function(e){var t=ene._dragElements.get(this._id);t&&(t.dragStatus="stopped"),ene._endDragBefore(e),ene._endDragAfter(e)}},{key:"setDraggable",value:function(e){this._setAttr("draggable",e),this._dragChange()}},{key:"isDragging",value:function(){var e=ene._dragElements.get(this._id);return!!e&&"dragging"===e.dragStatus}},{key:"_listenDrag",value:function(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(e){var t=this;if((!(void 0!==e.evt.button)||Ste.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var n=!1;ene._dragElements.forEach((function(e){t.isAncestorOf(e.node)&&(n=!0)})),n||this._createDragElement(e)}}))}},{key:"_dragChange",value:function(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;var e=ene._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&ene._dragElements.delete(this._id)}}},{key:"_dragCleanup",value:function(){this.off("mousedown.konva"),this.off("touchstart.konva")}},{key:"isClientRectOnScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},t=this.getStage();if(!t)return!1;var n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return Ite.haveIntersection(n,this.getClientRect())}}],[{key:"create",value:function(e,t){return Ite._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}},{key:"_createNode",value:function(t,n){var r,o,i,a=e.prototype.getClassName.call(t),s=t.children;if(n&&(t.attrs.container=n),Ste[a]||(Ite.warn('Can not find a node with class name "'+a+'". Fallback to "Shape".'),a="Shape"),r=new(0,Ste[a])(t.attrs),s)for(o=s.length,i=0;i<o;i++)r.add(e._createNode(s[i]));return r}}]),e}();gne.prototype.nodeType="Node",gne.prototype._attrsAffectingSize=[],gne.prototype.eventListeners={},gne.prototype.on.call(gne.prototype,pne,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(fne),this._clearSelfAndDescendantCache(rne))})),gne.prototype.on.call(gne.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(hne)})),gne.prototype.on.call(gne.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(ane)})),gne.prototype.on.call(gne.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(tne)}));var mne=Ute.addGetterSetter;mne(gne,"zIndex"),mne(gne,"absolutePosition"),mne(gne,"position"),mne(gne,"x",0,Dte()),mne(gne,"y",0,Dte()),mne(gne,"globalCompositeOperation","source-over",Bte()),mne(gne,"opacity",1,Dte()),mne(gne,"name","",Bte()),mne(gne,"id","",Bte()),mne(gne,"rotation",0,Dte()),Ute.addComponentsGetterSetter(gne,"scale",["x","y"]),mne(gne,"scaleX",1,Dte()),mne(gne,"scaleY",1,Dte()),Ute.addComponentsGetterSetter(gne,"skew",["x","y"]),mne(gne,"skewX",0,Dte()),mne(gne,"skewY",0,Dte()),Ute.addComponentsGetterSetter(gne,"offset",["x","y"]),mne(gne,"offsetX",0,Dte()),mne(gne,"offsetY",0,Dte()),mne(gne,"dragDistance",null,Dte()),mne(gne,"width",0,Dte()),mne(gne,"height",0,Dte()),mne(gne,"listening",!0,Hte()),mne(gne,"preventDefault",!0,Hte()),mne(gne,"filters",null,(function(e){return this._filterUpToDate=!1,e})),mne(gne,"visible",!0,Hte()),mne(gne,"transformsEnabled","all",Bte()),mne(gne,"size"),mne(gne,"dragBoundFunc"),mne(gne,"draggable",!1,Hte()),Ute.backCompat(gne,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var yne=function(e){pn(n,e);var t=Qt(n);function n(){var e;return an(this,n),(e=t.apply(this,arguments)).children=[],e}return on(n,[{key:"getChildren",value:function(e){if(!e)return this.children||[];var t=this.children||[],n=[];return t.forEach((function(t){e(t)&&n.push(t)})),n}},{key:"hasChildren",value:function(){return this.getChildren().length>0}},{key:"removeChildren",value:function(){return this.getChildren().forEach((function(e){e.parent=null,e.index=0,e.remove()})),this.children=[],this._requestDraw(),this}},{key:"destroyChildren",value:function(){return this.getChildren().forEach((function(e){e.parent=null,e.index=0,e.destroy()})),this.children=[],this._requestDraw(),this}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}var o=t[0];return o.getParent()?(o.moveTo(this),this):(this._validateAdd(o),o.index=this.getChildren().length,o.parent=this,o._clearCaches(),this.getChildren().push(o),this._fire("add",{child:o}),this._requestDraw(),this)}},{key:"destroy",value:function(){return this.hasChildren()&&this.destroyChildren(),Yt(nn(n.prototype),"destroy",this).call(this),this}},{key:"find",value:function(e){return this._generalFind(e,!1)}},{key:"findOne",value:function(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}},{key:"_generalFind",value:function(e,t){var n=[];return this._descendants((function(r){var o=r._isMatch(e);return o&&n.push(r),!(!o||!t)})),n}},{key:"_descendants",value:function(e){var t,n=xn(this.getChildren());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e(r))return!0;if(r.hasChildren()&&r._descendants(e))return!0}}catch(COe){n.e(COe)}finally{n.f()}return!1}},{key:"toObject",value:function(){var e=gne.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((function(t){e.children.push(t.toObject())})),e}},{key:"isAncestorOf",value:function(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}},{key:"clone",value:function(e){var t=gne.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}},{key:"getAllIntersections",value:function(e){var t=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(e)&&t.push(n)})),t}},{key:"_clearSelfAndDescendantCache",value:function(e){var t;Yt(nn(n.prototype),"_clearSelfAndDescendantCache",this).call(this,e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}},{key:"_setChildrenIndices",value:function(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}},{key:"drawScene",value:function(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),o=r&&r.getContext(),i=this._getCanvasCache(),a=i&&i.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(a){o.save();var l=this.getAbsoluteTransform(t).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",r,t);return this}},{key:"drawHit",value:function(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,o=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){o.save();var a=this.getAbsoluteTransform(t).getMatrix();o.transform(a[0],a[1],a[2],a[3],a[4],a[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",r,t);return this}},{key:"_drawChildren",value:function(e,t,n){var r,o=t&&t.getContext(),i=this.clipWidth(),a=this.clipHeight(),s=this.clipFunc(),l=i&&a||s,u=n===this;if(l){o.save();var c=this.getAbsoluteTransform(n),d=c.getMatrix();if(o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),o.beginPath(),s)s.call(this,o,this);else{var f=this.clipX(),h=this.clipY();o.rect(f,h,i,a)}o.clip(),d=c.copy().invert().getMatrix(),o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var p=!u&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;p&&(o.save(),o._applyGlobalCompositeOperation(this)),null===(r=this.children)||void 0===r||r.forEach((function(r){r[e](t,n)})),p&&o.restore(),l&&o.restore()}},{key:"getClientRect",value:function(e){var t,n,r,o,i,a=(e=e||{}).skipTransform,s=e.relativeTo,l={x:1/0,y:1/0,width:0,height:0},u=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var a=t.getClientRect({relativeTo:u,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===a.width&&0===a.height||(void 0===n?(n=a.x,r=a.y,o=a.x+a.width,i=a.y+a.height):(n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x+a.width),i=Math.max(i,a.y+a.height)))}}));for(var c=this.find("Shape"),d=!1,f=0;f<c.length;f++){if(c[f]._isVisible(this)){d=!0;break}}return l=d&&void 0!==n?{x:n,y:r,width:o-n,height:i-r}:{x:0,y:0,width:0,height:0},a?l:this._transformedRect(l,s)}}]),n}(gne);Ute.addComponentsGetterSetter(yne,"clip",["x","y","width","height"]),Ute.addGetterSetter(yne,"clipX",void 0,Dte()),Ute.addGetterSetter(yne,"clipY",void 0,Dte()),Ute.addGetterSetter(yne,"clipWidth",void 0,Dte()),Ute.addGetterSetter(yne,"clipHeight",void 0,Dte()),Ute.addGetterSetter(yne,"clipFunc");var bne=new Map,wne=void 0!==Ste._global.PointerEvent;function kne(e){return bne.get(e)}function xne(e){return{evt:e,pointerId:e.pointerId}}function Sne(e,t){return bne.get(e)===t}function Cne(e,t){_ne(e),t.getStage()&&(bne.set(e,t),wne&&t._fire("gotpointercapture",xne(new PointerEvent("gotpointercapture"))))}function _ne(e,t){var n=bne.get(e);if(n){var r=n.getStage();r&&r.content,bne.delete(e),wne&&n._fire("lostpointercapture",xne(new PointerEvent("lostpointercapture")))}}var Ene="mouseleave",Pne="mouseover",Lne="mouseenter",One="mousemove",Ane="mousedown",Mne="mouseup",Tne="pointermove",Ine="pointerdown",Rne="pointerup",Nne="pointercancel",Dne="pointerout",zne="pointerleave",jne="pointerover",Bne="pointerenter",Fne="contextmenu",Hne="touchstart",Vne="touchend",Wne="touchmove",Une="touchcancel",Gne="wheel",qne=[[Lne,"_pointerenter"],[Ane,"_pointerdown"],[One,"_pointermove"],[Mne,"_pointerup"],[Ene,"_pointerleave"],[Hne,"_pointerdown"],[Wne,"_pointermove"],[Vne,"_pointerup"],[Une,"_pointercancel"],[Pne,"_pointerover"],[Gne,"_wheel"],[Fne,"_contextmenu"],[Ine,"_pointerdown"],[Tne,"_pointermove"],[Rne,"_pointerup"],[Nne,"_pointercancel"],["lostpointercapture","_lostpointercapture"]],Yne={mouse:(tr={},gn(tr,Dne,"mouseout"),gn(tr,zne,Ene),gn(tr,jne,Pne),gn(tr,Bne,Lne),gn(tr,Tne,One),gn(tr,Ine,Ane),gn(tr,Rne,Mne),gn(tr,Nne,"mousecancel"),gn(tr,"pointerclick","click"),gn(tr,"pointerdblclick","dblclick"),tr),touch:(nr={},gn(nr,Dne,"touchout"),gn(nr,zne,"touchleave"),gn(nr,jne,"touchover"),gn(nr,Bne,"touchenter"),gn(nr,Tne,Wne),gn(nr,Ine,Hne),gn(nr,Rne,Vne),gn(nr,Nne,Une),gn(nr,"pointerclick","tap"),gn(nr,"pointerdblclick","dbltap"),nr),pointer:(rr={},gn(rr,Dne,Dne),gn(rr,zne,zne),gn(rr,jne,jne),gn(rr,Bne,Bne),gn(rr,Tne,Tne),gn(rr,Ine,Ine),gn(rr,Rne,Rne),gn(rr,Nne,Nne),gn(rr,"pointerclick","pointerclick"),gn(rr,"pointerdblclick","pointerdblclick"),rr)},Zne=function(e){return e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse"},Xne=function(e){var t=Zne(e);return"pointer"===t?Ste.pointerEventsEnabled&&Yne.pointer:"touch"===t?Yne.touch:"mouse"===t?Yne.mouse:void 0};function $ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.clipFunc||e.clipWidth||e.clipHeight)&&Ite.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}var Kne=[],Qne=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,$ne(e)))._pointerPositions=[],r._changedPointerPositions=[],r._buildDOM(),r._bindContentEvents(),Kne.push(en(r)),r.on("widthChange.konva heightChange.konva",r._resizeDOM),r.on("visibleChange.konva",r._checkVisibility),r.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(function(){$ne(r.attrs)})),r._checkVisibility(),r}return on(n,[{key:"_validateAdd",value:function(e){var t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||Ite.throw("You may only add layers to the stage.")}},{key:"_checkVisibility",value:function(){if(this.content){var e=this.visible()?"":"none";this.content.style.display=e}}},{key:"setContainer",value:function(e){if("string"===kn(e)){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}},{key:"shouldDrawHit",value:function(){return!0}},{key:"clear",value:function(){var e,t=this.children,n=t.length;for(e=0;e<n;e++)t[e].clear();return this}},{key:"clone",value:function(e){return e||(e={}),e.container="undefined"!=typeof document&&document.createElement("div"),yne.prototype.clone.call(this,e)}},{key:"destroy",value:function(){Yt(nn(n.prototype),"destroy",this).call(this);var e=this.content;e&&Ite._isInDocument(e)&&this.container().removeChild(e);var t=Kne.indexOf(this);return t>-1&&Kne.splice(t,1),Ite.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}},{key:"getPointerPosition",value:function(){var e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Ite.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}},{key:"_getPointerById",value:function(e){return this._pointerPositions.find((function(t){return t.id===e}))}},{key:"getPointersPositions",value:function(){return this._pointerPositions}},{key:"getStage",value:function(){return this}},{key:"getContent",value:function(){return this.content}},{key:"_toKonvaCanvas",value:function(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new Qte({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}},{key:"getIntersection",value:function(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){var r=n[t].getIntersection(e);if(r)return r}return null}},{key:"_resizeDOM",value:function(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((function(n){n.setSize({width:e,height:t}),n.draw()}))}},{key:"add",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(arguments.length>1){for(var i=0;i<arguments.length;i++)this.add(arguments[i]);return this}Yt(nn(n.prototype),"add",this).call(this,e);var a=this.children.length;return a>5&&Ite.warn("The stage has "+a+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),Ste.isBrowser&&this.content.appendChild(e.canvas._canvas),this}},{key:"getParent",value:function(){return null}},{key:"getLayer",value:function(){return null}},{key:"hasPointerCapture",value:function(e){return Sne(e,this)}},{key:"setPointerCapture",value:function(e){Cne(e,this)}},{key:"releaseCapture",value:function(e){_ne(e)}},{key:"getLayers",value:function(){return this.children}},{key:"_bindContentEvents",value:function(){var e=this;Ste.isBrowser&&qne.forEach((function(t){var n=yn(t,2),r=n[0],o=n[1];e.content.addEventListener(r,(function(t){e[o](t)}),{passive:!1})}))}},{key:"_pointerenter",value:function(e){this.setPointersPositions(e);var t=Xne(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}},{key:"_pointerover",value:function(e){this.setPointersPositions(e);var t=Xne(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}},{key:"_getTargetShape",value:function(e){var t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}},{key:"_pointerleave",value:function(e){var t=Xne(e.type),n=Zne(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),o=!ene.isDragging||Ste.hitOnDragEnabled;r&&o?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):o&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}},{key:"_pointerdown",value:function(e){var t=this,n=Xne(e.type),r=Zne(e.type);if(n){this.setPointersPositions(e);var o=!1;this._changedPointerPositions.forEach((function(i){var a=t.getIntersection(i);if(ene.justDragged=!1,Ste["_"+r+"ListenClick"]=!0,a&&a.isListening()){Ste.capturePointerEventsEnabled&&a.setPointerCapture(i.id),t[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:e,pointerId:i.id}),o=!0;var s=e.type.indexOf("touch")>=0;a.preventDefault()&&e.cancelable&&s&&e.preventDefault()}})),o||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}},{key:"_pointermove",value:function(e){var t=this,n=Xne(e.type),r=Zne(e.type);if(n&&(ene.isDragging&&ene.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!ene.isDragging||Ste.hitOnDragEnabled)){var o={},i=!1,a=this._getTargetShape(r);this._changedPointerPositions.forEach((function(s){var l=kne(s.id)||t.getIntersection(s),u=s.id,c={evt:e,pointerId:u},d=a!==l;if(d&&a&&(a._fireAndBubble(n.pointerout,Object.assign({},c),l),a._fireAndBubble(n.pointerleave,Object.assign({},c),l)),l){if(o[l._id])return;o[l._id]=!0}l&&l.isListening()?(i=!0,d&&(l._fireAndBubble(n.pointerover,Object.assign({},c),a),l._fireAndBubble(n.pointerenter,Object.assign({},c),a),t[r+"targetShape"]=l),l._fireAndBubble(n.pointermove,Object.assign({},c))):a&&(t._fire(n.pointerover,{evt:e,target:t,currentTarget:t,pointerId:u}),t[r+"targetShape"]=null)})),i||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}}},{key:"_pointerup",value:function(e){var t=this,n=Xne(e.type),r=Zne(e.type);if(n){this.setPointersPositions(e);var o=this[r+"ClickStartShape"],i=this[r+"ClickEndShape"],a={},s=!1;this._changedPointerPositions.forEach((function(l){var u=kne(l.id)||t.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}var c=l.id,d={evt:e,pointerId:c},f=!1;Ste["_"+r+"InDblClickWindow"]?(f=!0,clearTimeout(t[r+"DblTimeout"])):ene.justDragged||(Ste["_"+r+"InDblClickWindow"]=!0,clearTimeout(t[r+"DblTimeout"])),t[r+"DblTimeout"]=setTimeout((function(){Ste["_"+r+"InDblClickWindow"]=!1}),Ste.dblClickWindow),u&&u.isListening()?(s=!0,t[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},d)),Ste["_"+r+"ListenClick"]&&o&&o===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},d)),f&&i&&i===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},d)))):(t[r+"ClickEndShape"]=null,Ste["_"+r+"ListenClick"]&&t._fire(n.pointerclick,{evt:e,target:t,currentTarget:t,pointerId:c}),f&&t._fire(n.pointerdblclick,{evt:e,target:t,currentTarget:t,pointerId:c}))})),s||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Ste["_"+r+"ListenClick"]=!1,e.cancelable&&"touch"!==r&&e.preventDefault()}}},{key:"_contextmenu",value:function(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Fne,{evt:e}):this._fire(Fne,{evt:e,target:this,currentTarget:this})}},{key:"_wheel",value:function(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Gne,{evt:e}):this._fire(Gne,{evt:e,target:this,currentTarget:this})}},{key:"_pointercancel",value:function(e){this.setPointersPositions(e);var t=kne(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(Rne,xne(e)),_ne(e.pointerId)}},{key:"_lostpointercapture",value:function(e){_ne(e.pointerId)}},{key:"setPointersPositions",value:function(e){var t=this,n=this._getContentPosition(),r=null,o=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(function(e){t._pointerPositions.push({id:e.identifier,x:(e.clientX-n.left)/n.scaleX,y:(e.clientY-n.top)/n.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(function(e){t._changedPointerPositions.push({id:e.identifier,x:(e.clientX-n.left)/n.scaleX,y:(e.clientY-n.top)/n.scaleY})}))):(r=(e.clientX-n.left)/n.scaleX,o=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:o},this._pointerPositions=[{x:r,y:o,id:Ite._getFirstPointerId(e)}],this._changedPointerPositions=[{x:r,y:o,id:Ite._getFirstPointerId(e)}])}},{key:"_setPointerPosition",value:function(e){Ite.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}},{key:"_getContentPosition",value:function(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}},{key:"_buildDOM",value:function(){if(this.bufferCanvas=new Qte({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Jte({pixelRatio:1,width:this.width(),height:this.height()}),Ste.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}}},{key:"cache",value:function(){return Ite.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}},{key:"clearCache",value:function(){return this}},{key:"batchDraw",value:function(){return this.getChildren().forEach((function(e){e.batchDraw()})),this}}]),n}(yne);Qne.prototype.nodeType="Stage",Cte(Qne),Ute.addGetterSetter(Qne,"container");var Jne,ere="hasShadow",tre="shadowRGBA",nre="patternImage",rre="linearGradient",ore="radialGradient";function ire(){return Jne||(Jne=Ite.createCanvasElement().getContext("2d"))}var are={};var sre=function(e){pn(n,e);var t=Qt(n);function n(e){var r,o;for(an(this,n),r=t.call(this,e);!(o=Ite.getRandomColor())||o in are;);return r.colorKey=o,are[o]=en(r),r}return on(n,[{key:"getContext",value:function(){return Ite.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}},{key:"getCanvas",value:function(){return Ite.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}},{key:"getSceneFunc",value:function(){return this.attrs.sceneFunc||this._sceneFunc}},{key:"getHitFunc",value:function(){return this.attrs.hitFunc||this._hitFunc}},{key:"hasShadow",value:function(){return this._getCache(ere,this._hasShadow)}},{key:"_hasShadow",value:function(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}},{key:"_getFillPattern",value:function(){return this._getCache(nre,this.__getFillPattern)}},{key:"__getFillPattern",value:function(){if(this.fillPatternImage()){var e=ire().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){var t=new _te;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(Ste.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());var n=t.getMatrix(),r="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(r)}return e}}},{key:"_getLinearGradient",value:function(){return this._getCache(rre,this.__getLinearGradient)}},{key:"__getLinearGradient",value:function(){var e=this.fillLinearGradientColorStops();if(e){for(var t=ire(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),o=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;i<e.length;i+=2)o.addColorStop(e[i],e[i+1]);return o}}},{key:"_getRadialGradient",value:function(){return this._getCache(ore,this.__getRadialGradient)}},{key:"__getRadialGradient",value:function(){var e=this.fillRadialGradientColorStops();if(e){for(var t=ire(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),o=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),i=0;i<e.length;i+=2)o.addColorStop(e[i],e[i+1]);return o}}},{key:"getShadowRGBA",value:function(){return this._getCache(tre,this._getShadowRGBA)}},{key:"_getShadowRGBA",value:function(){if(this.hasShadow()){var e=Ite.colorToRGBA(this.shadowColor());return e?"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.shadowOpacity()||1)+")":void 0}}},{key:"hasFill",value:function(){var e=this;return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],(function(){return e.fillEnabled()&&!!(e.fill()||e.fillPatternImage()||e.fillLinearGradientColorStops()||e.fillRadialGradientColorStops())}))}},{key:"hasStroke",value:function(){var e=this;return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(function(){return e.strokeEnabled()&&e.strokeWidth()&&!(!e.stroke()&&!e.strokeLinearGradientColorStops())}))}},{key:"hasHitStroke",value:function(){var e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}},{key:"intersects",value:function(e){var t=this.getStage().bufferHitCanvas;return t.getContext().clear(),this.drawHit(t,null,!0),t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}},{key:"destroy",value:function(){return gne.prototype.destroy.call(this),delete are[this.colorKey],delete this.colorKey,this}},{key:"_useBufferCanvas",value:function(e){var t;if(!this.getStage())return!1;if(!(null===(t=this.attrs.perfectDrawEnabled)||void 0===t||t))return!1;var n=e||this.hasFill(),r=this.hasStroke(),o=1!==this.getAbsoluteOpacity();if(n&&r&&o)return!0;var i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(n&&r&&i&&a)}},{key:"setStrokeHitEnabled",value:function(e){Ite.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}},{key:"getStrokeHitEnabled",value:function(){return 0!==this.hitStrokeWidth()}},{key:"getSelfRect",value:function(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}},{key:"getClientRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),o=!e.skipStroke&&this.hasStroke(),i=o&&this.strokeWidth()||0,a=r.width+i,s=r.height+i,l=!e.skipShadow&&this.hasShadow(),u=l?this.shadowOffsetX():0,c=l?this.shadowOffsetY():0,d=a+Math.abs(u),f=s+Math.abs(c),h=l&&this.shadowBlur()||0,p=d+2*h,v=f+2*h,g={width:p,height:v,x:-(i/2+h)+Math.min(u,0)+r.x,y:-(i/2+h)+Math.min(c,0)+r.y};return t?g:this._transformedRect(g,n)}},{key:"drawScene",value:function(e,t){var n,r,o=this.getLayer(),i=e||o.getCanvas(),a=i.getContext(),s=this._getCanvasCache(),l=this.getSceneFunc(),u=this.hasShadow(),c=i.isCache,d=t===this;if(!this.isVisible()&&!d)return this;if(s){a.save();var f=this.getAbsoluteTransform(t).getMatrix();return a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!l)return this;if(a.save(),this._useBufferCanvas()&&!c){(r=(n=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var h=this.getAbsoluteTransform(t).getMatrix();r.transform(h[0],h[1],h[2],h[3],h[4],h[5]),l.call(this,r,this),r.restore();var p=n.pixelRatio;u&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(n._canvas,0,0,n.width/p,n.height/p)}else{if(a._applyLineJoin(this),!d){h=this.getAbsoluteTransform(t).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}u&&a._applyShadow(this),l.call(this,a,this)}return a.restore(),this}},{key:"drawHit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),o=e||r.hitCanvas,i=o&&o.getContext(),a=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),l=s&&s.hit;if(this.colorKey||Ite.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),l){i.save();var u=this.getAbsoluteTransform(t).getMatrix();return i.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(i),i.restore(),this}if(!a)return this;i.save(),i._applyLineJoin(this);var c=this===t;if(!c){var d=this.getAbsoluteTransform(t).getMatrix();i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return a.call(this,i,this),i.restore(),this}},{key:"drawHitFromCache",value:function(){var e,t,n,r,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=this._getCanvasCache(),s=this._getCachedSceneCanvas(),l=a.hit,u=l.getContext(),c=l.getWidth(),d=l.getHeight();u.clear(),u.drawImage(s._canvas,0,0,c,d);try{for(n=(t=(e=u.getImageData(0,0,c,d)).data).length,r=Ite._hexToRgb(this.colorKey),o=0;o<n;o+=4)t[o+3]>i?(t[o]=r.r,t[o+1]=r.g,t[o+2]=r.b,t[o+3]=255):t[o+3]=0;u.putImageData(e,0,0)}catch(Dhe){Ite.error("Unable to draw hit graph from cached scene canvas. "+Dhe.message)}return this}},{key:"hasPointerCapture",value:function(e){return Sne(e,this)}},{key:"setPointerCapture",value:function(e){Cne(e,this)}},{key:"releaseCapture",value:function(e){_ne(e)}}]),n}(gne);sre.prototype._fillFunc=function(e){e.fill()},sre.prototype._strokeFunc=function(e){e.stroke()},sre.prototype._fillFuncHit=function(e){e.fill()},sre.prototype._strokeFuncHit=function(e){e.stroke()},sre.prototype._centroid=!1,sre.prototype.nodeType="Shape",Cte(sre),sre.prototype.eventListeners={},sre.prototype.on.call(sre.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(ere)})),sre.prototype.on.call(sre.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(tre)})),sre.prototype.on.call(sre.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(nre)})),sre.prototype.on.call(sre.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(rre)})),sre.prototype.on.call(sre.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(ore)})),Ute.addGetterSetter(sre,"stroke",void 0,Fte()),Ute.addGetterSetter(sre,"strokeWidth",2,Dte()),Ute.addGetterSetter(sre,"fillAfterStrokeEnabled",!1),Ute.addGetterSetter(sre,"hitStrokeWidth","auto",jte()),Ute.addGetterSetter(sre,"strokeHitEnabled",!0,Hte()),Ute.addGetterSetter(sre,"perfectDrawEnabled",!0,Hte()),Ute.addGetterSetter(sre,"shadowForStrokeEnabled",!0,Hte()),Ute.addGetterSetter(sre,"lineJoin"),Ute.addGetterSetter(sre,"lineCap"),Ute.addGetterSetter(sre,"sceneFunc"),Ute.addGetterSetter(sre,"hitFunc"),Ute.addGetterSetter(sre,"dash"),Ute.addGetterSetter(sre,"dashOffset",0,Dte()),Ute.addGetterSetter(sre,"shadowColor",void 0,Bte()),Ute.addGetterSetter(sre,"shadowBlur",0,Dte()),Ute.addGetterSetter(sre,"shadowOpacity",1,Dte()),Ute.addComponentsGetterSetter(sre,"shadowOffset",["x","y"]),Ute.addGetterSetter(sre,"shadowOffsetX",0,Dte()),Ute.addGetterSetter(sre,"shadowOffsetY",0,Dte()),Ute.addGetterSetter(sre,"fillPatternImage"),Ute.addGetterSetter(sre,"fill",void 0,Fte()),Ute.addGetterSetter(sre,"fillPatternX",0,Dte()),Ute.addGetterSetter(sre,"fillPatternY",0,Dte()),Ute.addGetterSetter(sre,"fillLinearGradientColorStops"),Ute.addGetterSetter(sre,"strokeLinearGradientColorStops"),Ute.addGetterSetter(sre,"fillRadialGradientStartRadius",0),Ute.addGetterSetter(sre,"fillRadialGradientEndRadius",0),Ute.addGetterSetter(sre,"fillRadialGradientColorStops"),Ute.addGetterSetter(sre,"fillPatternRepeat","repeat"),Ute.addGetterSetter(sre,"fillEnabled",!0),Ute.addGetterSetter(sre,"strokeEnabled",!0),Ute.addGetterSetter(sre,"shadowEnabled",!0),Ute.addGetterSetter(sre,"dashEnabled",!0),Ute.addGetterSetter(sre,"strokeScaleEnabled",!0),Ute.addGetterSetter(sre,"fillPriority","color"),Ute.addComponentsGetterSetter(sre,"fillPatternOffset",["x","y"]),Ute.addGetterSetter(sre,"fillPatternOffsetX",0,Dte()),Ute.addGetterSetter(sre,"fillPatternOffsetY",0,Dte()),Ute.addComponentsGetterSetter(sre,"fillPatternScale",["x","y"]),Ute.addGetterSetter(sre,"fillPatternScaleX",1,Dte()),Ute.addGetterSetter(sre,"fillPatternScaleY",1,Dte()),Ute.addComponentsGetterSetter(sre,"fillLinearGradientStartPoint",["x","y"]),Ute.addComponentsGetterSetter(sre,"strokeLinearGradientStartPoint",["x","y"]),Ute.addGetterSetter(sre,"fillLinearGradientStartPointX",0),Ute.addGetterSetter(sre,"strokeLinearGradientStartPointX",0),Ute.addGetterSetter(sre,"fillLinearGradientStartPointY",0),Ute.addGetterSetter(sre,"strokeLinearGradientStartPointY",0),Ute.addComponentsGetterSetter(sre,"fillLinearGradientEndPoint",["x","y"]),Ute.addComponentsGetterSetter(sre,"strokeLinearGradientEndPoint",["x","y"]),Ute.addGetterSetter(sre,"fillLinearGradientEndPointX",0),Ute.addGetterSetter(sre,"strokeLinearGradientEndPointX",0),Ute.addGetterSetter(sre,"fillLinearGradientEndPointY",0),Ute.addGetterSetter(sre,"strokeLinearGradientEndPointY",0),Ute.addComponentsGetterSetter(sre,"fillRadialGradientStartPoint",["x","y"]),Ute.addGetterSetter(sre,"fillRadialGradientStartPointX",0),Ute.addGetterSetter(sre,"fillRadialGradientStartPointY",0),Ute.addComponentsGetterSetter(sre,"fillRadialGradientEndPoint",["x","y"]),Ute.addGetterSetter(sre,"fillRadialGradientEndPointX",0),Ute.addGetterSetter(sre,"fillRadialGradientEndPointY",0),Ute.addGetterSetter(sre,"fillPatternRotation",0),Ute.backCompat(sre,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var lre=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],ure=lre.length,cre=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).canvas=new Qte,r.hitCanvas=new Jte({pixelRatio:1}),r._waitingForDraw=!1,r.on("visibleChange.konva",r._checkVisibility),r._checkVisibility(),r.on("imageSmoothingEnabledChange.konva",r._setSmoothEnabled),r._setSmoothEnabled(),r}return on(n,[{key:"createPNGStream",value:function(){return this.canvas._canvas.createPNGStream()}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getNativeCanvasElement",value:function(){return this.canvas._canvas}},{key:"getHitCanvas",value:function(){return this.hitCanvas}},{key:"getContext",value:function(){return this.getCanvas().getContext()}},{key:"clear",value:function(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}},{key:"setZIndex",value:function(e){Yt(nn(n.prototype),"setZIndex",this).call(this,e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}},{key:"moveToTop",value:function(){gne.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}},{key:"moveUp",value:function(){if(!gne.prototype.moveUp.call(this))return!1;var e=this.getStage();return!(!e||!e.content)&&(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}},{key:"moveDown",value:function(){if(gne.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}},{key:"moveToBottom",value:function(){if(gne.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}},{key:"getLayer",value:function(){return this}},{key:"remove",value:function(){var e=this.getNativeCanvasElement();return gne.prototype.remove.call(this),e&&e.parentNode&&Ite._isInDocument(e)&&e.parentNode.removeChild(e),this}},{key:"getStage",value:function(){return this.parent}},{key:"setSize",value:function(e){var t=e.width,n=e.height;return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}},{key:"_validateAdd",value:function(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&Ite.throw("You may only add groups and shapes to a layer.")}},{key:"_toKonvaCanvas",value:function(e){return(e=e||{}).width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=void 0!==e.x?e.x:this.x(),e.y=void 0!==e.y?e.y:this.y(),gne.prototype._toKonvaCanvas.call(this,e)}},{key:"_checkVisibility",value:function(){var e=this.visible();this.canvas._canvas.style.display=e?"block":"none"}},{key:"_setSmoothEnabled",value:function(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}},{key:"getWidth",value:function(){if(this.parent)return this.parent.width()}},{key:"setWidth",value:function(){Ite.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}},{key:"getHeight",value:function(){if(this.parent)return this.parent.height()}},{key:"setHeight",value:function(){Ite.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}},{key:"batchDraw",value:function(){var e=this;return this._waitingForDraw||(this._waitingForDraw=!0,Ite.requestAnimFrame((function(){e.draw(),e._waitingForDraw=!1}))),this}},{key:"getIntersection",value:function(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(var r=0;r<ure;r++){var o=lre[r],i=this._getIntersection({x:e.x+o.x*t,y:e.y+o.y*t}),a=i.shape;if(a)return a;if(n=!!i.antialiased,!i.antialiased)break}if(!n)return null;t+=1}}},{key:"_getIntersection",value:function(e){var t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(255===r){var o=Ite._rgbToHex(n[0],n[1],n[2]),i=are["#"+o];return i?{shape:i}:{antialiased:!0}}return r>0?{antialiased:!0}:{}}},{key:"drawScene",value:function(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),yne.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}},{key:"drawHit",value:function(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),yne.prototype.drawHit.call(this,r,t),this}},{key:"enableHitGraph",value:function(){return this.hitGraphEnabled(!0),this}},{key:"disableHitGraph",value:function(){return this.hitGraphEnabled(!1),this}},{key:"setHitGraphEnabled",value:function(e){Ite.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}},{key:"getHitGraphEnabled",value:function(e){return Ite.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}},{key:"toggleHitCanvas",value:function(){if(this.parent&&this.parent.content){var e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}},{key:"destroy",value:function(){return Ite.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),Yt(nn(n.prototype),"destroy",this).call(this)}}]),n}(yne);cre.prototype.nodeType="Layer",Cte(cre),Ute.addGetterSetter(cre,"imageSmoothingEnabled",!0),Ute.addGetterSetter(cre,"clearBeforeDraw",!0),Ute.addGetterSetter(cre,"hitGraphEnabled",!0,Hte());var dre=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).listening(!1),Ite.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.'),r}return on(n)}(cre);dre.prototype.nodeType="FastLayer",Cte(dre);var fre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_validateAdd",value:function(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&Ite.throw("You may only add groups and shapes to groups.")}}]),n}(yne);fre.prototype.nodeType="Group",Cte(fre);var hre=xte.performance&&xte.performance.now?function(){return xte.performance.now()}:function(){return(new Date).getTime()},pre=function(){function e(t,n){an(this,e),this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:hre(),frameRate:0},this.func=t,this.setLayers(n)}return on(e,[{key:"setLayers",value:function(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}},{key:"getLayers",value:function(){return this.layers}},{key:"addLayer",value:function(e){var t,n=this.layers,r=n.length;for(t=0;t<r;t++)if(n[t]._id===e._id)return!1;return this.layers.push(e),!0}},{key:"isRunning",value:function(){var t,n=e.animations,r=n.length;for(t=0;t<r;t++)if(n[t].id===this.id)return!0;return!1}},{key:"start",value:function(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=hre(),e._addAnimation(this),this}},{key:"stop",value:function(){return e._removeAnimation(this),this}},{key:"_updateFrameObject",value:function(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}}],[{key:"_addAnimation",value:function(e){this.animations.push(e),this._handleAnimation()}},{key:"_removeAnimation",value:function(e){var t,n=e.id,r=this.animations,o=r.length;for(t=0;t<o;t++)if(r[t].id===n){this.animations.splice(t,1);break}}},{key:"_runFrames",value:function(){var e,t,n,r,o,i,a,s,l={},u=this.animations;for(r=0;r<u.length;r++)if(t=(e=u[r]).layers,n=e.func,e._updateFrameObject(hre()),i=t.length,!n||!1!==n.call(e,e.frame))for(o=0;o<i;o++)void 0!==(a=t[o])._id&&(l[a._id]=a);for(s in l)l.hasOwnProperty(s)&&l[s].batchDraw()}},{key:"_animationLoop",value:function(){var t=e;t.animations.length?(t._runFrames(),Ite.requestAnimFrame(t._animationLoop)):t.animRunning=!1}},{key:"_handleAnimation",value:function(){this.animRunning||(this.animRunning=!0,Ite.requestAnimFrame(this._animationLoop))}}]),e}();pre.animations=[],pre.animIdCounter=0,pre.animRunning=!1;var vre={node:1,duration:1,easing:1,onFinish:1,yoyo:1},gre=0,mre=["fill","stroke","shadowColor"],yre=function(){function e(t,n,r,o,i,a,s){an(this,e),this.prop=t,this.propFunc=n,this.begin=o,this._pos=o,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=i-this.begin,this.pause()}return on(e,[{key:"fire",value:function(e){var t=this[e];t&&t()}},{key:"setTime",value:function(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}},{key:"getTime",value:function(){return this._time}},{key:"setPosition",value:function(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}},{key:"getPosition",value:function(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}},{key:"play",value:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}},{key:"reverse",value:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}},{key:"seek",value:function(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}},{key:"reset",value:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")}},{key:"finish",value:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}},{key:"update",value:function(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}},{key:"onEnterFrame",value:function(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}},{key:"pause",value:function(){this.state=1,this.fire("onPause")}},{key:"getTimer",value:function(){return(new Date).getTime()}}]),e}(),bre=function(){function e(t){an(this,e);var n,r,o=this,i=t.node,a=i._id,s=t.easing||wre.Linear,l=!!t.yoyo;n=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=i,this._id=gre++;var u=i.getLayer()||(i instanceof Ste.Stage?i.getLayers():null);for(r in u||Ite.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new pre((function(){o.tween.onEnterFrame()}),u),this.tween=new yre(r,(function(e){o._tweenFunc(e)}),s,0,1,1e3*n,l),this._addListeners(),e.attrs[a]||(e.attrs[a]={}),e.attrs[a][this._id]||(e.attrs[a][this._id]={}),e.tweens[a]||(e.tweens[a]={}),t)void 0===vre[r]&&this._addAttr(r,t[r]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}return on(e,[{key:"_addAttr",value:function(t,n){var r,o,i,a,s,l,u,c,d=this.node,f=d._id;if((i=e.tweens[f][t])&&delete e.attrs[f][i][t],r=d.getAttr(t),Ite._isArray(n))if(o=[],s=Math.max(n.length,r.length),"points"===t&&n.length!==r.length&&(n.length>r.length?(u=r,r=Ite._prepareArrayForTween(r,n,d.closed())):(l=n,n=Ite._prepareArrayForTween(n,r,d.closed()))),0===t.indexOf("fill"))for(a=0;a<s;a++)if(a%2==0)o.push(n[a]-r[a]);else{var h=Ite.colorToRGBA(r[a]);c=Ite.colorToRGBA(n[a]),r[a]=h,o.push({r:c.r-h.r,g:c.g-h.g,b:c.b-h.b,a:c.a-h.a})}else for(a=0;a<s;a++)o.push(n[a]-r[a]);else-1!==mre.indexOf(t)?(r=Ite.colorToRGBA(r),o={r:(c=Ite.colorToRGBA(n)).r-r.r,g:c.g-r.g,b:c.b-r.b,a:c.a-r.a}):o=n-r;e.attrs[f][this._id][t]={start:r,diff:o,end:n,trueEnd:l,trueStart:u},e.tweens[f][t]=this._id}},{key:"_tweenFunc",value:function(t){var n,r,o,i,a,s,l,u,c=this.node,d=e.attrs[c._id][this._id];for(n in d){if(o=(r=d[n]).start,i=r.diff,u=r.end,Ite._isArray(o))if(a=[],l=Math.max(o.length,u.length),0===n.indexOf("fill"))for(s=0;s<l;s++)s%2==0?a.push((o[s]||0)+i[s]*t):a.push("rgba("+Math.round(o[s].r+i[s].r*t)+","+Math.round(o[s].g+i[s].g*t)+","+Math.round(o[s].b+i[s].b*t)+","+(o[s].a+i[s].a*t)+")");else for(s=0;s<l;s++)a.push((o[s]||0)+i[s]*t);else a=-1!==mre.indexOf(n)?"rgba("+Math.round(o.r+i.r*t)+","+Math.round(o.g+i.g*t)+","+Math.round(o.b+i.b*t)+","+(o.a+i.a*t)+")":o+i*t;c.setAttr(n,a)}}},{key:"_addListeners",value:function(){var t=this;this.tween.onPlay=function(){t.anim.start()},this.tween.onReverse=function(){t.anim.start()},this.tween.onPause=function(){t.anim.stop()},this.tween.onFinish=function(){var n=t.node,r=e.attrs[n._id][t._id];r.points&&r.points.trueEnd&&n.setAttr("points",r.points.trueEnd),t.onFinish&&t.onFinish.call(t)},this.tween.onReset=function(){var n=t.node,r=e.attrs[n._id][t._id];r.points&&r.points.trueStart&&n.points(r.points.trueStart),t.onReset&&t.onReset()},this.tween.onUpdate=function(){t.onUpdate&&t.onUpdate.call(t)}}},{key:"play",value:function(){return this.tween.play(),this}},{key:"reverse",value:function(){return this.tween.reverse(),this}},{key:"reset",value:function(){return this.tween.reset(),this}},{key:"seek",value:function(e){return this.tween.seek(1e3*e),this}},{key:"pause",value:function(){return this.tween.pause(),this}},{key:"finish",value:function(){return this.tween.finish(),this}},{key:"destroy",value:function(){var t,n=this.node._id,r=this._id,o=e.tweens[n];for(t in this.pause(),o)delete e.tweens[n][t];delete e.attrs[n][r]}}]),e}();bre.attrs={},bre.tweens={},gne.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new bre(e).play()};var wre={BackEaseIn:function(e,t,n,r){var o=1.70158;return n*(e/=r)*e*((o+1)*e-o)+t},BackEaseOut:function(e,t,n,r){var o=1.70158;return n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},BackEaseInOut:function(e,t,n,r){var o=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},ElasticEaseIn:function(e,t,n,r,o,i){var a=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),-o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)+t)},ElasticEaseOut:function(e,t,n,r,o,i){var a=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),o*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/i)+n+t)},ElasticEaseInOut:function(e,t,n,r,o,i){var a=0;return 0===e?t:2==(e/=r/2)?t+n:(i||(i=r*(.3*1.5)),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),e<1?o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*-.5+t:o*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*.5+n+t)},BounceEaseOut:function(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn:function(e,t,n,r){return n-wre.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut:function(e,t,n,r){return e<r/2?.5*wre.BounceEaseIn(2*e,0,n,r)+t:.5*wre.BounceEaseOut(2*e-r,0,n,r)+.5*n+t},EaseIn:function(e,t,n,r){return n*(e/=r)*e+t},EaseOut:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn:function(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut:function(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear:function(e,t,n,r){return n*e/r+t}},kre=Ite._assign(Ste,{Util:Ite,Transform:_te,Node:gne,Container:yne,Stage:Qne,stages:Kne,Layer:cre,FastLayer:dre,Group:fre,DD:ene,Shape:sre,shapes:are,Animation:pre,Tween:bre,Easings:wre,Context:Yte,Canvas:Kte}),xre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=Ste.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(e){this.outerRadius(e/2)}},{key:"setHeight",value:function(e){this.outerRadius(e/2)}},{key:"getSelfRect",value:function(){var e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=Ste.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(r,Math.PI)),i=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),a=Math.sin(Math.min(r,Math.PI/2)),s=o*(o>0?e:t),l=i*(i>0?e:t),u=a*(a>0?t:e);return{x:s,y:n?-1*u:l,width:1*t-s,height:u-l}}}]),n}(sre);function Sre(e,t,n,r,o,i,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),u=a*s/(s+l),c=a*l/(s+l);return[n-u*(o-e),r-u*(i-t),n+c*(o-e),r+c*(i-t)]}function Cre(e,t){var n,r,o=e.length,i=[];for(n=2;n<o-2;n+=2)r=Sre(e[n-2],e[n-1],e[n],e[n+1],e[n+2],e[n+3],t),isNaN(r[0])||(i.push(r[0]),i.push(r[1]),i.push(e[n]),i.push(e[n+1]),i.push(r[2]),i.push(r[3]));return i}xre.prototype._centroid=!0,xre.prototype.className="Arc",xre.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Cte(xre),Ute.addGetterSetter(xre,"innerRadius",0,Dte()),Ute.addGetterSetter(xre,"outerRadius",0,Dte()),Ute.addGetterSetter(xre,"angle",0,Dte()),Ute.addGetterSetter(xre,"clockwise",!1,Hte());var _re=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")})),r}return on(n,[{key:"_sceneFunc",value:function(e){var t,n,r,o=this.points(),i=o.length,a=this.tension(),s=this.closed(),l=this.bezier();if(i){if(e.beginPath(),e.moveTo(o[0],o[1]),0!==a&&i>4){for(n=(t=this.getTensionPoints()).length,r=s?0:4,s||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);r<n-2;)e.bezierCurveTo(t[r++],t[r++],t[r++],t[r++],t[r++],t[r++]);s||e.quadraticCurveTo(t[n-2],t[n-1],o[i-2],o[i-1])}else if(l)for(r=2;r<i;)e.bezierCurveTo(o[r++],o[r++],o[r++],o[r++],o[r++],o[r++]);else for(r=2;r<i;r+=2)e.lineTo(o[r],o[r+1]);s?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}},{key:"getTensionPoints",value:function(){return this._getCache("tensionPoints",this._getTensionPoints)}},{key:"_getTensionPoints",value:function(){return this.closed()?this._getTensionPointsClosed():Cre(this.points(),this.tension())}},{key:"_getTensionPointsClosed",value:function(){var e=this.points(),t=e.length,n=this.tension(),r=Sre(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),o=Sre(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),i=Cre(e,n);return[r[2],r[3]].concat(i).concat([o[0],o[1],e[t-2],e[t-1],o[2],o[3],r[0],r[1],e[0],e[1]])}},{key:"getWidth",value:function(){return this.getSelfRect().width}},{key:"getHeight",value:function(){return this.getSelfRect().height}},{key:"getSelfRect",value:function(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};for(var t,n,r=(e=0!==this.tension()?[e[0],e[1]].concat(cn(this._getTensionPoints()),[e[e.length-2],e[e.length-1]]):this.points())[0],o=e[0],i=e[1],a=e[1],s=0;s<e.length/2;s++)t=e[2*s],n=e[2*s+1],r=Math.min(r,t),o=Math.max(o,t),i=Math.min(i,n),a=Math.max(a,n);return{x:r,y:i,width:o-r,height:a-i}}}]),n}(sre);_re.prototype.className="Line",_re.prototype._attrsAffectingSize=["points","bezier","tension"],Cte(_re),Ute.addGetterSetter(_re,"closed",!1),Ute.addGetterSetter(_re,"bezier",!1),Ute.addGetterSetter(_re,"tension",0,Dte()),Ute.addGetterSetter(_re,"points",[],function(){if(Ste.isUnminified)return function(e,t){var n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(Ite._isArray(e)?e.forEach((function(e){Ite._isNumber(e)||Ite.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")})):Ite.warn(Rte(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}());var Ere=function(e){pn(n,e);var t=Qt(n);function n(e){var r;an(this,n),(r=t.call(this,e)).dataArray=[],r.pathLength=0,r.dataArray=n.parsePathData(r.data()),r.pathLength=0;for(var o=0;o<r.dataArray.length;++o)r.pathLength+=r.dataArray[o].pathLength;return r.on("dataChange.konva",(function(){this.dataArray=n.parsePathData(this.data()),this.pathLength=0;for(var e=0;e<this.dataArray.length;++e)this.pathLength+=this.dataArray[e].pathLength})),r}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var o=t[r].command,i=t[r].points;switch(o){case"L":e.lineTo(i[0],i[1]);break;case"M":e.moveTo(i[0],i[1]);break;case"C":e.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);break;case"Q":e.quadraticCurveTo(i[0],i[1],i[2],i[3]);break;case"A":var a=i[0],s=i[1],l=i[2],u=i[3],c=i[4],d=i[5],f=i[6],h=i[7],p=l>u?l:u,v=l>u?1:l/u,g=l>u?u/l:1;e.translate(a,s),e.rotate(f),e.scale(v,g),e.arc(0,0,p,c,c+d,1-h),e.scale(1/v,1/g),e.rotate(-f),e.translate(-a,-s);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}},{key:"getSelfRect",value:function(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var r=t.points[4],o=t.points[5],i=t.points[4]+o,a=Math.PI/180;if(Math.abs(r-i)<a&&(a=Math.abs(r-i)),o<0)for(var s=r-a;s>i;s-=a){var l=n.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],s,0);e.push(l.x,l.y)}else for(var u=r+a;u<i;u+=a){var c=n.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],u,0);e.push(c.x,c.y)}}else if("C"===t.command)for(var d=0;d<=1;d+=.01){var f=n.getPointOnCubicBezier(d,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);e.push(f.x,f.y)}else e=e.concat(t.points)}));for(var t,r,o=e[0],i=e[0],a=e[1],s=e[1],l=0;l<e.length/2;l++)t=e[2*l],r=e[2*l+1],isNaN(t)||(o=Math.min(o,t),i=Math.max(i,t)),isNaN(r)||(a=Math.min(a,r),s=Math.max(s,r));return{x:o,y:a,width:i-o,height:s-a}}},{key:"getLength",value:function(){return this.pathLength}},{key:"getPointAtLength",value:function(e){var t,r=0,o=this.dataArray.length;if(!o)return null;for(;r<o&&e>this.dataArray[r].pathLength;)e-=this.dataArray[r].pathLength,++r;if(r===o)return{x:(t=this.dataArray[r-1].points.slice(-2))[0],y:t[1]};if(e<.01)return{x:(t=this.dataArray[r].points.slice(0,2))[0],y:t[1]};var i=this.dataArray[r],a=i.points;switch(i.command){case"L":return n.getPointOnLine(e,i.start.x,i.start.y,a[0],a[1]);case"C":return n.getPointOnCubicBezier(e/i.pathLength,i.start.x,i.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return n.getPointOnQuadraticBezier(e/i.pathLength,i.start.x,i.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],c=a[3],d=a[4],f=a[5],h=a[6];return d+=f*e/i.pathLength,n.getPointOnEllipticalArc(s,l,u,c,d,h)}return null}}],[{key:"getLineLength",value:function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}},{key:"getPointOnLine",value:function(e,t,n,r,o,i,a){void 0===i&&(i=t),void 0===a&&(a=n);var s=(o-n)/(r-t+1e-8),l=Math.sqrt(e*e/(1+s*s));r<t&&(l*=-1);var u,c=s*l;if(r===t)u={x:i,y:a+c};else if((a-n)/(i-t+1e-8)===s)u={x:i+l,y:a+c};else{var d,f,h=this.getLineLength(t,n,r,o),p=(i-t)*(r-t)+(a-n)*(o-n);d=t+(p/=h*h)*(r-t),f=n+p*(o-n);var v=this.getLineLength(i,a,d,f),g=Math.sqrt(e*e-v*v);l=Math.sqrt(g*g/(1+s*s)),r<t&&(l*=-1),u={x:d+l,y:f+(c=s*l)}}return u}},{key:"getPointOnCubicBezier",value:function(e,t,n,r,o,i,a,s,l){function u(e){return e*e*e}function c(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*u(e)+i*c(e)+r*d(e)+t*f(e),y:l*u(e)+a*c(e)+o*d(e)+n*f(e)}}},{key:"getPointOnQuadraticBezier",value:function(e,t,n,r,o,i,a){function s(e){return e*e}function l(e){return 2*e*(1-e)}function u(e){return(1-e)*(1-e)}return{x:i*s(e)+r*l(e)+t*u(e),y:a*s(e)+o*l(e)+n*u(e)}}},{key:"getPointOnEllipticalArc",value:function(e,t,n,r,o,i){var a=Math.cos(i),s=Math.sin(i),l=n*Math.cos(o),u=r*Math.sin(o);return{x:e+(l*a-u*s),y:t+(l*s+u*a)}}},{key:"parsePathData",value:function(e){if(!e)return[];var t=e,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];t=t.replace(new RegExp(" ","g"),",");for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],"g"),"|"+n[r]);var o,i=t.split("|"),a=[],s=[],l=0,u=0,c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(r=1;r<i.length;r++){var d=i[r],f=d.charAt(0);for(d=d.slice(1),s.length=0;o=c.exec(d);)s.push(o[0]);for(var h=[],p=0,v=s.length;p<v;p++)if("00"!==s[p]){var g=parseFloat(s[p]);isNaN(g)?h.push(0):h.push(g)}else h.push(0,0);for(;h.length>0&&!isNaN(h[0]);){var m,y,b,w,k,x,S,C,_,E,P=null,L=[],O=l,A=u;switch(f){case"l":l+=h.shift(),u+=h.shift(),P="L",L.push(l,u);break;case"L":l=h.shift(),u=h.shift(),L.push(l,u);break;case"m":var M=h.shift(),T=h.shift();if(l+=M,u+=T,P="M",a.length>2&&"z"===a[a.length-1].command)for(var I=a.length-2;I>=0;I--)if("M"===a[I].command){l=a[I].points[0]+M,u=a[I].points[1]+T;break}L.push(l,u),f="l";break;case"M":l=h.shift(),u=h.shift(),P="M",L.push(l,u),f="L";break;case"h":l+=h.shift(),P="L",L.push(l,u);break;case"H":l=h.shift(),P="L",L.push(l,u);break;case"v":u+=h.shift(),P="L",L.push(l,u);break;case"V":u=h.shift(),P="L",L.push(l,u);break;case"C":L.push(h.shift(),h.shift(),h.shift(),h.shift()),l=h.shift(),u=h.shift(),L.push(l,u);break;case"c":L.push(l+h.shift(),u+h.shift(),l+h.shift(),u+h.shift()),l+=h.shift(),u+=h.shift(),P="C",L.push(l,u);break;case"S":y=l,b=u,"C"===(m=a[a.length-1]).command&&(y=l+(l-m.points[2]),b=u+(u-m.points[3])),L.push(y,b,h.shift(),h.shift()),l=h.shift(),u=h.shift(),P="C",L.push(l,u);break;case"s":y=l,b=u,"C"===(m=a[a.length-1]).command&&(y=l+(l-m.points[2]),b=u+(u-m.points[3])),L.push(y,b,l+h.shift(),u+h.shift()),l+=h.shift(),u+=h.shift(),P="C",L.push(l,u);break;case"Q":L.push(h.shift(),h.shift()),l=h.shift(),u=h.shift(),L.push(l,u);break;case"q":L.push(l+h.shift(),u+h.shift()),l+=h.shift(),u+=h.shift(),P="Q",L.push(l,u);break;case"T":y=l,b=u,"Q"===(m=a[a.length-1]).command&&(y=l+(l-m.points[0]),b=u+(u-m.points[1])),l=h.shift(),u=h.shift(),P="Q",L.push(y,b,l,u);break;case"t":y=l,b=u,"Q"===(m=a[a.length-1]).command&&(y=l+(l-m.points[0]),b=u+(u-m.points[1])),l+=h.shift(),u+=h.shift(),P="Q",L.push(y,b,l,u);break;case"A":w=h.shift(),k=h.shift(),x=h.shift(),S=h.shift(),C=h.shift(),_=l,E=u,l=h.shift(),u=h.shift(),P="A",L=this.convertEndpointToCenterParameterization(_,E,l,u,S,C,w,k,x);break;case"a":w=h.shift(),k=h.shift(),x=h.shift(),S=h.shift(),C=h.shift(),_=l,E=u,l+=h.shift(),u+=h.shift(),P="A",L=this.convertEndpointToCenterParameterization(_,E,l,u,S,C,w,k,x)}a.push({command:P||f,points:L,start:{x:O,y:A},pathLength:this.calcLength(O,A,P||f,L)})}"z"!==f&&"Z"!==f||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}},{key:"calcLength",value:function(e,t,r,o){var i,a,s,l,u=n;switch(r){case"L":return u.getLineLength(e,t,o[0],o[1]);case"C":for(i=0,a=u.getPointOnCubicBezier(0,e,t,o[0],o[1],o[2],o[3],o[4],o[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,e,t,o[0],o[1],o[2],o[3],o[4],o[5]),i+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case"Q":for(i=0,a=u.getPointOnQuadraticBezier(0,e,t,o[0],o[1],o[2],o[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,e,t,o[0],o[1],o[2],o[3]),i+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case"A":i=0;var c=o[4],d=o[5],f=o[4]+d,h=Math.PI/180;if(Math.abs(c-f)<h&&(h=Math.abs(c-f)),a=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],c,0),d<0)for(l=c-h;l>f;l-=h)s=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],l,0),i+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=c+h;l<f;l+=h)s=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],l,0),i+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],f,0),i+=u.getLineLength(a.x,a.y,s.x,s.y)}return 0}},{key:"convertEndpointToCenterParameterization",value:function(e,t,n,r,o,i,a,s,l){var u=l*(Math.PI/180),c=Math.cos(u)*(e-n)/2+Math.sin(u)*(t-r)/2,d=-1*Math.sin(u)*(e-n)/2+Math.cos(u)*(t-r)/2,f=c*c/(a*a)+d*d/(s*s);f>1&&(a*=Math.sqrt(f),s*=Math.sqrt(f));var h=Math.sqrt((a*a*(s*s)-a*a*(d*d)-s*s*(c*c))/(a*a*(d*d)+s*s*(c*c)));o===i&&(h*=-1),isNaN(h)&&(h=0);var p=h*a*d/s,v=h*-s*c/a,g=(e+n)/2+Math.cos(u)*p-Math.sin(u)*v,m=(t+r)/2+Math.sin(u)*p+Math.cos(u)*v,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},w=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(b(e,t))},k=w([1,0],[(c-p)/a,(d-v)/s]),x=[(c-p)/a,(d-v)/s],S=[(-1*c-p)/a,(-1*d-v)/s],C=w(x,S);return b(x,S)<=-1&&(C=Math.PI),b(x,S)>=1&&(C=0),0===i&&C>0&&(C-=2*Math.PI),1===i&&C<0&&(C+=2*Math.PI),[g,m,a,s,k,C,u,i]}}]),n}(sre);Ere.prototype.className="Path",Ere.prototype._attrsAffectingSize=["data"],Cte(Ere),Ute.addGetterSetter(Ere,"data");var Pre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){Yt(nn(n.prototype),"_sceneFunc",this).call(this,e);var t=2*Math.PI,r=this.points(),o=r,i=0!==this.tension()&&r.length>4;i&&(o=this.getTensionPoints());var a,s,l=this.pointerLength(),u=r.length;if(i){var c=[o[o.length-4],o[o.length-3],o[o.length-2],o[o.length-1],r[u-2],r[u-1]],d=Ere.calcLength(o[o.length-4],o[o.length-3],"C",c),f=Ere.getPointOnQuadraticBezier(Math.min(1,1-l/d),c[0],c[1],c[2],c[3],c[4],c[5]);a=r[u-2]-f.x,s=r[u-1]-f.y}else a=r[u-2]-r[u-4],s=r[u-1]-r[u-3];var h=(Math.atan2(s,a)+t)%t,p=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[u-2],r[u-1]),e.rotate(h),e.moveTo(0,0),e.lineTo(-l,p/2),e.lineTo(-l,-p/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),i?(a=(o[0]+o[2])/2-r[0],s=(o[1]+o[3])/2-r[1]):(a=r[2]-r[0],s=r[3]-r[1]),e.rotate((Math.atan2(-s,-a)+t)%t),e.moveTo(0,0),e.lineTo(-l,p/2),e.lineTo(-l,-p/2),e.closePath(),e.restore(),this.__fillStroke(e))}},{key:"__fillStroke",value:function(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}},{key:"getSelfRect",value:function(){var e=Yt(nn(n.prototype),"getSelfRect",this).call(this),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}]),n}(_re);Pre.prototype.className="Arrow",Cte(Pre),Ute.addGetterSetter(Pre,"pointerLength",10,Dte()),Ute.addGetterSetter(Pre,"pointerWidth",10,Dte()),Ute.addGetterSetter(Pre,"pointerAtBeginning",!1),Ute.addGetterSetter(Pre,"pointerAtEnding",!0);var Lre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(e){this.radius()!==e/2&&this.radius(e/2)}},{key:"setHeight",value:function(e){this.radius()!==e/2&&this.radius(e/2)}}]),n}(sre);Lre.prototype._centroid=!0,Lre.prototype.className="Circle",Lre.prototype._attrsAffectingSize=["radius"],Cte(Lre),Ute.addGetterSetter(Lre,"radius",0,Dte());var Ore=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.radiusX()}},{key:"getHeight",value:function(){return 2*this.radiusY()}},{key:"setWidth",value:function(e){this.radiusX(e/2)}},{key:"setHeight",value:function(e){this.radiusY(e/2)}}]),n}(sre);Ore.prototype.className="Ellipse",Ore.prototype._centroid=!0,Ore.prototype._attrsAffectingSize=["radiusX","radiusY"],Cte(Ore),Ute.addComponentsGetterSetter(Ore,"radius",["x","y"]),Ute.addGetterSetter(Ore,"radiusX",0,Dte()),Ute.addGetterSetter(Ore,"radiusY",0,Dte());var Are=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).on("imageChange.konva",(function(){r._setImageLoad()})),r._setImageLoad(),r}return on(n,[{key:"_setImageLoad",value:function(){var e=this,t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",(function(){e._requestDraw()}))}},{key:"_useBufferCanvas",value:function(){return Yt(nn(n.prototype),"_useBufferCanvas",this).call(this,!0)}},{key:"_sceneFunc",value:function(e){var t,n=this.getWidth(),r=this.getHeight(),o=this.attrs.image;if(o){var i=this.attrs.cropWidth,a=this.attrs.cropHeight;t=i&&a?[o,this.cropX(),this.cropY(),i,a,0,0,n,r]:[o,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),o&&e.drawImage.apply(e,t)}},{key:"_hitFunc",value:function(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}},{key:"getHeight",value:function(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}}],[{key:"fromURL",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=Ite.createImageElement();o.onload=function(){var e=new n({image:o});t(e)},o.onerror=r,o.crossOrigin="Anonymous",o.src=e}}]),n}(sre);Are.prototype.className="Image",Cte(Are),Ute.addGetterSetter(Are,"image"),Ute.addComponentsGetterSetter(Are,"crop",["x","y","width","height"]),Ute.addGetterSetter(Are,"cropX",0,Dte()),Ute.addGetterSetter(Are,"cropY",0,Dte()),Ute.addGetterSetter(Are,"cropWidth",0,Dte()),Ute.addGetterSetter(Are,"cropHeight",0,Dte());var Mre=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Tre="up",Ire="right",Rre="down",Nre="left",Dre=Mre.length,zre=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).on("add.konva",(function(e){this._addListeners(e.child),this._sync()})),r}return on(n,[{key:"getText",value:function(){return this.find("Text")[0]}},{key:"getTag",value:function(){return this.find("Tag")[0]}},{key:"_addListeners",value:function(e){var t,n=this,r=function(){n._sync()};for(t=0;t<Dre;t++)e.on(Mre[t]+"Change.konva",r)}},{key:"getWidth",value:function(){return this.getText().width()}},{key:"getHeight",value:function(){return this.getText().height()}},{key:"_sync",value:function(){var e,t,n,r,o,i,a,s=this.getText(),l=this.getTag();if(s&&l){switch(e=s.width(),t=s.height(),n=l.pointerDirection(),r=l.pointerWidth(),a=l.pointerHeight(),o=0,i=0,n){case Tre:o=e/2,i=-1*a;break;case Ire:o=e+r,i=t/2;break;case Rre:o=e/2,i=t+a;break;case Nre:o=-1*r,i=t/2}l.setAttrs({x:-1*o,y:-1*i,width:e,height:t}),s.setAttrs({x:-1*o,y:-1*i})}}}]),n}(fre);zre.prototype.className="Label",Cte(zre);var jre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),o=this.pointerWidth(),i=this.pointerHeight(),a=this.cornerRadius(),s=0,l=0,u=0,c=0;"number"==typeof a?s=l=u=c=Math.min(a,t/2,n/2):(s=Math.min(a[0]||0,t/2,n/2),l=Math.min(a[1]||0,t/2,n/2),c=Math.min(a[2]||0,t/2,n/2),u=Math.min(a[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===Tre&&(e.lineTo((t-o)/2,0),e.lineTo(t/2,-1*i),e.lineTo((t+o)/2,0)),e.lineTo(t-l,0),e.arc(t-l,l,l,3*Math.PI/2,0,!1),r===Ire&&(e.lineTo(t,(n-i)/2),e.lineTo(t+o,n/2),e.lineTo(t,(n+i)/2)),e.lineTo(t,n-c),e.arc(t-c,n-c,c,0,Math.PI/2,!1),r===Rre&&(e.lineTo((t+o)/2,n),e.lineTo(t/2,n+i),e.lineTo((t-o)/2,n)),e.lineTo(u,n),e.arc(u,n-u,u,Math.PI/2,Math.PI,!1),r===Nre&&(e.lineTo(0,(n+i)/2),e.lineTo(-1*o,n/2),e.lineTo(0,(n-i)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,3*Math.PI/2,!1),e.closePath(),e.fillStrokeShape(this)}},{key:"getSelfRect",value:function(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),o=this.pointerDirection(),i=this.width(),a=this.height();return o===Tre?(t-=r,a+=r):o===Rre?a+=r:o===Nre?(e-=1.5*n,i+=n):o===Ire&&(i+=1.5*n),{x:e,y:t,width:i,height:a}}}]),n}(sre);jre.prototype.className="Tag",Cte(jre),Ute.addGetterSetter(jre,"pointerDirection","none"),Ute.addGetterSetter(jre,"pointerWidth",0,Dte()),Ute.addGetterSetter(jre,"pointerHeight",0,Dte()),Ute.addGetterSetter(jre,"cornerRadius",0,zte(4));var Bre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),t){var o=0,i=0,a=0,s=0;"number"==typeof t?o=i=a=s=Math.min(t,n/2,r/2):(o=Math.min(t[0]||0,n/2,r/2),i=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),a=Math.min(t[3]||0,n/2,r/2)),e.moveTo(o,0),e.lineTo(n-i,0),e.arc(n-i,i,i,3*Math.PI/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(a,r),e.arc(a,r-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,o),e.arc(o,o,o,Math.PI,3*Math.PI/2,!1)}else e.rect(0,0,n,r);e.closePath(),e.fillStrokeShape(this)}}]),n}(sre);Bre.prototype.className="Rect",Cte(Bre),Ute.addGetterSetter(Bre,"cornerRadius",0,zte(4));var Fre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}},{key:"_getPoints",value:function(){for(var e=this.attrs.sides,t=this.attrs.radius||0,n=[],r=0;r<e;r++)n.push({x:t*Math.sin(2*r*Math.PI/e),y:-1*t*Math.cos(2*r*Math.PI/e)});return n}},{key:"getSelfRect",value:function(){var e=this._getPoints(),t=e[0].x,n=e[0].y,r=e[0].x,o=e[0].y;return e.forEach((function(e){t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.y)})),{x:t,y:r,width:n-t,height:o-r}}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(e){this.radius(e/2)}},{key:"setHeight",value:function(e){this.radius(e/2)}}]),n}(sre);Fre.prototype.className="RegularPolygon",Fre.prototype._centroid=!0,Fre.prototype._attrsAffectingSize=["radius"],Cte(Fre),Ute.addGetterSetter(Fre,"radius",0,Dte()),Ute.addGetterSetter(Fre,"sides",0,Dte());var Hre=2*Math.PI,Vre=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Hre,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Hre,0,!0),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(e){this.outerRadius(e/2)}},{key:"setHeight",value:function(e){this.outerRadius(e/2)}}]),n}(sre);Vre.prototype.className="Ring",Vre.prototype._centroid=!0,Vre.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Cte(Vre),Ute.addGetterSetter(Vre,"innerRadius",0,Dte()),Ute.addGetterSetter(Vre,"outerRadius",0,Dte());var Wre=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e))._updated=!0,r.anim=new pre((function(){var e=r._updated;return r._updated=!1,e})),r.on("animationChange.konva",(function(){this.frameIndex(0)})),r.on("frameIndexChange.konva",(function(){this._updated=!0})),r.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})),r}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+0],s=o[r+1],l=o[r+2],u=o[r+3],c=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,l,u),e.closePath(),e.fillStrokeShape(this)),c)if(i){var d=i[t],f=2*n;e.drawImage(c,a,s,l,u,d[f+0],d[f+1],l,u)}else e.drawImage(c,a,s,l,u,0,0,l,u)}},{key:"_hitFunc",value:function(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+2],s=o[r+3];if(e.beginPath(),i){var l=i[t],u=2*n;e.rect(l[u+0],l[u+1],a,s)}else e.rect(0,0,a,s);e.closePath(),e.fillShape(this)}},{key:"_useBufferCanvas",value:function(){return Yt(nn(n.prototype),"_useBufferCanvas",this).call(this,!0)}},{key:"_setInterval",value:function(){var e=this;this.interval=setInterval((function(){e._updateIndex()}),1e3/this.frameRate())}},{key:"start",value:function(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}},{key:"stop",value:function(){this.anim.stop(),clearInterval(this.interval)}},{key:"isRunning",value:function(){return this.anim.isRunning()}},{key:"_updateIndex",value:function(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}}]),n}(sre);Wre.prototype.className="Sprite",Cte(Wre),Ute.addGetterSetter(Wre,"animation"),Ute.addGetterSetter(Wre,"animations"),Ute.addGetterSetter(Wre,"frameOffsets"),Ute.addGetterSetter(Wre,"image"),Ute.addGetterSetter(Wre,"frameIndex",0,Dte()),Ute.addGetterSetter(Wre,"frameRate",17,Dte()),Ute.backCompat(Wre,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var Ure=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var o=1;o<2*r;o++){var i=o%2==0?n:t,a=i*Math.sin(o*Math.PI/r),s=-1*i*Math.cos(o*Math.PI/r);e.lineTo(a,s)}e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(e){this.outerRadius(e/2)}},{key:"setHeight",value:function(e){this.outerRadius(e/2)}}]),n}(sre);function Gre(e){return Array.from(e)}Ure.prototype.className="Star",Ure.prototype._centroid=!0,Ure.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Cte(Ure),Ute.addGetterSetter(Ure,"numPoints",5,Dte()),Ute.addGetterSetter(Ure,"innerRadius",0,Dte()),Ute.addGetterSetter(Ure,"outerRadius",0,Dte());var qre,Yre="auto",Zre="justify",Xre="left",$re="middle",Kre="normal",Qre=" ",Jre="none",eoe=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],toe=eoe.length;function noe(){return qre||(qre=Ite.createCanvasElement().getContext("2d"))}var roe=function(e){pn(n,e);var t=Qt(n);function n(e){var r;an(this,n),r=t.call(this,function(e){return(e=e||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e}(e)),r._partialTextX=0,r._partialTextY=0;for(var o=0;o<toe;o++)r.on(eoe[o]+"Change.konva",r._setTextData);return r._setTextData(),r}return on(n,[{key:"_sceneFunc",value:function(e){var t=this.textArr,n=t.length;if(this.text()){var r,o=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,s=this.verticalAlign(),l=0,u=this.align(),c=this.getWidth(),d=this.letterSpacing(),f=this.fill(),h=this.textDecoration(),p=-1!==h.indexOf("underline"),v=-1!==h.indexOf("line-through"),g=0,m=(g=a/2,0),y=0;for(e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",$re),e.setAttr("textAlign",Xre),s===$re?l=(this.getHeight()-n*a-2*o)/2:"bottom"===s&&(l=this.getHeight()-n*a-2*o),e.translate(o,l+o),r=0;r<n;r++){m=0,y=0;var b,w,k,x=t[r],S=x.text,C=x.width,_=x.lastInParagraph;if(e.save(),"right"===u?m+=c-C-2*o:"center"===u&&(m+=(c-C-2*o)/2),p&&(e.save(),e.beginPath(),e.moveTo(m,g+y+Math.round(i/2)),w=0===(b=S.split(" ").length-1),k=u===Zre&&_&&!w?c-2*o:C,e.lineTo(m+Math.round(k),g+y+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=f,e.stroke(),e.restore()),v&&(e.save(),e.beginPath(),e.moveTo(m,g+y),w=0===(b=S.split(" ").length-1),k=u===Zre&&_&&!w?c-2*o:C,e.lineTo(m+Math.round(k),g+y),e.lineWidth=i/15,e.strokeStyle=f,e.stroke(),e.restore()),0!==d||u===Zre){b=S.split(" ").length-1;for(var E=Gre(S),P=0;P<E.length;P++){var L=E[P];" "!==L||_||u!==Zre||(m+=(c-2*o-C)/b),this._partialTextX=m,this._partialTextY=g+y,this._partialText=L,e.fillStrokeShape(this),m+=this.measureSize(L).width+d}}else this._partialTextX=m,this._partialTextY=g+y,this._partialText=S,e.fillStrokeShape(this);e.restore(),n>1&&(g+=a)}}}},{key:"_hitFunc",value:function(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}},{key:"setText",value:function(e){var t=Ite._isString(e)?e:null==e?"":e+"";return this._setAttr("text",t),this}},{key:"getWidth",value:function(){return this.attrs.width===Yre||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}},{key:"getHeight",value:function(){return this.attrs.height===Yre||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}},{key:"getTextWidth",value:function(){return this.textWidth}},{key:"getTextHeight",value:function(){return Ite.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}},{key:"measureSize",value:function(e){var t,n=noe(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{width:t.width,height:r}}},{key:"_getContextFont",value:function(){return this.fontStyle()+Qre+this.fontVariant()+Qre+(this.fontSize()+"px ")+this.fontFamily().split(",").map((function(e){var t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e='"'.concat(e,'"')),e})).join(", ")}},{key:"_addTextLine",value:function(e){this.align()===Zre&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}},{key:"_getTextWidth",value:function(e){var t=this.letterSpacing(),n=e.length;return noe().measureText(e).width+(n?t*(n-1):0)}},{key:"_setTextData",value:function(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,o=this.attrs.width,i=this.attrs.height,a=o!==Yre&&void 0!==o,s=i!==Yre&&void 0!==i,l=this.padding(),u=o-2*l,c=i-2*l,d=0,f=this.wrap(),h="char"!==f&&f!==Jre,p=this.ellipsis();this.textArr=[],noe().font=this._getContextFont();for(var v=p?this._getTextWidth("…"):0,g=0,m=e.length;g<m;++g){var y=e[g],b=this._getTextWidth(y);if(a&&b>u)for(;y.length>0;){for(var w=0,k=y.length,x="",S=0;w<k;){var C=w+k>>>1,_=y.slice(0,C+1),E=this._getTextWidth(_)+v;E<=u?(w=C+1,x=_,S=E):k=C}if(!x)break;if(h){var P,L=y[x.length];(P=(L===Qre||"-"===L)&&S<=u?x.length:Math.max(x.lastIndexOf(Qre),x.lastIndexOf("-"))+1)>0&&(w=P,x=x.slice(0,w),S=this._getTextWidth(x))}if(x=x.trimRight(),this._addTextLine(x),n=Math.max(n,S),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}if((y=(y=y.slice(w)).trimLeft()).length>0&&(b=this._getTextWidth(y))<=u){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else this._addTextLine(y),d+=r,n=Math.max(n,b),this._shouldHandleEllipsis(d)&&g<m-1&&this._tryToAddEllipsisToLastLine();if(s&&d+r>c)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=t,this.textWidth=n}},{key:"_shouldHandleEllipsis",value:function(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,o=r!==Yre&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==Jre)||o&&e+n>i}},{key:"_tryToAddEllipsisToLastLine",value:function(){var e=this.attrs.width,t=e!==Yre&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(o&&r){if(t)this._getTextWidth(o.text+"…")<n||(o.text=o.text.slice(0,o.text.length-3));this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+"…")}}},{key:"getStrokeScaleEnabled",value:function(){return!0}}]),n}(sre);roe.prototype._fillFunc=function(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)},roe.prototype._strokeFunc=function(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)},roe.prototype.className="Text",roe.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],Cte(roe),Ute.overWriteSetter(roe,"width",jte()),Ute.overWriteSetter(roe,"height",jte()),Ute.addGetterSetter(roe,"fontFamily","Arial"),Ute.addGetterSetter(roe,"fontSize",12,Dte()),Ute.addGetterSetter(roe,"fontStyle",Kre),Ute.addGetterSetter(roe,"fontVariant",Kre),Ute.addGetterSetter(roe,"padding",0,Dte()),Ute.addGetterSetter(roe,"align",Xre),Ute.addGetterSetter(roe,"verticalAlign","top"),Ute.addGetterSetter(roe,"lineHeight",1,Dte()),Ute.addGetterSetter(roe,"wrap","word"),Ute.addGetterSetter(roe,"ellipsis",!1,Hte()),Ute.addGetterSetter(roe,"letterSpacing",0,Dte()),Ute.addGetterSetter(roe,"text","",Bte()),Ute.addGetterSetter(roe,"textDecoration","");var ooe="normal";function ioe(e){e.fillText(this.partialText,0,0)}function aoe(e){e.strokeText(this.partialText,0,0)}var soe=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e)).dummyCanvas=Ite.createCanvasElement(),r.dataArray=[],r.dataArray=Ere.parsePathData(r.attrs.data),r.on("dataChange.konva",(function(){this.dataArray=Ere.parsePathData(this.attrs.data),this._setTextData()})),r.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",r._setTextData),r._setTextData(),r}return on(n,[{key:"_sceneFunc",value:function(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),o=this.glyphInfo;"underline"===t&&e.beginPath();for(var i=0;i<o.length;i++){e.save();var a=o[i].p0;e.translate(a.x,a.y),e.rotate(o[i].rotation),this.partialText=o[i].text,e.fillStrokeShape(this),"underline"===t&&(0===i&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}"underline"===t&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}},{key:"_hitFunc",value:function(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var o=t[r].p1;e.lineTo(o.x,o.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}},{key:"getTextWidth",value:function(){return this.textWidth}},{key:"getTextHeight",value:function(){return Ite.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}},{key:"setText",value:function(e){return roe.prototype.setText.call(this,e)}},{key:"_getContextFont",value:function(){return roe.prototype._getContextFont.call(this)}},{key:"_getTextSize",value:function(e){var t=this.dummyCanvas.getContext("2d");t.save(),t.font=this._getContextFont();var n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}}},{key:"_setTextData",value:function(){var e=this,t=this._getTextSize(this.attrs.text),n=this.letterSpacing(),r=this.align(),o=this.kerningFunc();this.textWidth=t.width,this.textHeight=t.height;var i=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var a=0,s=0;s<e.dataArray.length;s++)e.dataArray[s].pathLength>0&&(a+=e.dataArray[s].pathLength);var l=0;"center"===r&&(l=Math.max(0,a/2-i/2)),"right"===r&&(l=Math.max(0,a-i));for(var u,c,d,f=Gre(this.text()),h=this.text().split(" ").length-1,p=-1,v=0,g=function(){v=0;for(var t=e.dataArray,n=p+1;n<t.length;n++){if(t[n].pathLength>0)return p=n,t[n];"M"===t[n].command&&(u={x:t[n].points[0],y:t[n].points[1]})}return{}},m=function(t){var o=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(o+=(a-i)/h);var s=0,l=0;for(c=void 0;Math.abs(o-s)/o>.01&&l<20;){l++;for(var f=s;void 0===d;)(d=g())&&f+d.pathLength<o&&(f+=d.pathLength,d=void 0);if(0===Object.keys(d).length||void 0===u)return;var p=!1;switch(d.command){case"L":Ere.getLineLength(u.x,u.y,d.points[0],d.points[1])>o?c=Ere.getPointOnLine(o,u.x,u.y,d.points[0],d.points[1],u.x,u.y):d=void 0;break;case"A":var m=d.points[4],y=d.points[5],b=d.points[4]+y;0===v?v=m+1e-8:o>s?v+=Math.PI/180*y/Math.abs(y):v-=Math.PI/360*y/Math.abs(y),(y<0&&v<b||y>=0&&v>b)&&(v=b,p=!0),c=Ere.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],v,d.points[6]);break;case"C":0===v?v=o>d.pathLength?1e-8:o/d.pathLength:o>s?v+=(o-s)/d.pathLength/2:v=Math.max(v-(s-o)/d.pathLength/2,0),v>1&&(v=1,p=!0),c=Ere.getPointOnCubicBezier(v,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);break;case"Q":0===v?v=o/d.pathLength:o>s?v+=(o-s)/d.pathLength:v-=(s-o)/d.pathLength,v>1&&(v=1,p=!0),c=Ere.getPointOnQuadraticBezier(v,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3])}void 0!==c&&(s=Ere.getLineLength(u.x,u.y,c.x,c.y)),p&&(p=!1,d=void 0)}},y=l/(e._getTextSize("C").width+n)-1,b=0;b<y&&(m("C"),void 0!==u&&void 0!==c);b++)u=c;for(var w=0;w<f.length&&(m(f[w]),void 0!==u&&void 0!==c);w++){var k=Ere.getLineLength(u.x,u.y,c.x,c.y),x=0;if(o)try{x=o(f[w-1],f[w])*this.fontSize()}catch(Dhe){x=0}u.x+=x,c.x+=x,this.textWidth+=x;var S=Ere.getPointOnLine(x+k/2,u.x,u.y,c.x,c.y),C=Math.atan2(c.y-u.y,c.x-u.x);this.glyphInfo.push({transposeX:S.x,transposeY:S.y,text:f[w],rotation:C,p0:u,p1:c}),u=c}}},{key:"getSelfRect",value:function(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach((function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)}));for(var t,n,r=e[0]||0,o=e[0]||0,i=e[1]||0,a=e[1]||0,s=0;s<e.length/2;s++)t=e[2*s],n=e[2*s+1],r=Math.min(r,t),o=Math.max(o,t),i=Math.min(i,n),a=Math.max(a,n);var l=this.fontSize();return{x:r-l/2,y:i-l/2,width:o-r+l,height:a-i+l}}},{key:"destroy",value:function(){return Ite.releaseCanvas(this.dummyCanvas),Yt(nn(n.prototype),"destroy",this).call(this)}}]),n}(sre);soe.prototype._fillFunc=ioe,soe.prototype._strokeFunc=aoe,soe.prototype._fillFuncHit=ioe,soe.prototype._strokeFuncHit=aoe,soe.prototype.className="TextPath",soe.prototype._attrsAffectingSize=["text","fontSize","data"],Cte(soe),Ute.addGetterSetter(soe,"data"),Ute.addGetterSetter(soe,"fontFamily","Arial"),Ute.addGetterSetter(soe,"fontSize",12,Dte()),Ute.addGetterSetter(soe,"fontStyle",ooe),Ute.addGetterSetter(soe,"align","left"),Ute.addGetterSetter(soe,"letterSpacing",0,Dte()),Ute.addGetterSetter(soe,"textBaseline","middle"),Ute.addGetterSetter(soe,"fontVariant",ooe),Ute.addGetterSetter(soe,"text",""),Ute.addGetterSetter(soe,"textDecoration",null),Ute.addGetterSetter(soe,"kerningFunc",null);var loe="tr-konva",uoe=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map((function(e){return e+".".concat(loe)})).join(" "),coe="nodesRect",doe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],foe={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},hoe="ontouchstart"in Ste._global;var poe=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function voe(e,t,n){var r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:o})}function goe(e,t){var n=function(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}(e);return voe(e,t,n)}var moe=function(e){pn(n,e);var t=Qt(n);function n(e){var r;return an(this,n),(r=t.call(this,e))._transforming=!1,r._createElements(),r._handleMouseMove=r._handleMouseMove.bind(en(r)),r._handleMouseUp=r._handleMouseUp.bind(en(r)),r.update=r.update.bind(en(r)),r.on(uoe,r.update),r.getNode()&&r.update(),r}return on(n,[{key:"attachTo",value:function(e){return this.setNode(e),this}},{key:"setNode",value:function(e){return Ite.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}},{key:"getNode",value:function(){return this._nodes&&this._nodes[0]}},{key:"_getEventNamespace",value:function(){return loe+this._id}},{key:"setNodes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((function(t){var n=function(){1===e.nodes().length&&e.useSingleNodeRotation()&&e.rotation(e.nodes()[0].getAbsoluteRotation()),e._resetTransformCache(),e._transforming||e.isDragging()||e.update()},r=t._attrsAffectingSize.map((function(t){return t+"Change."+e._getEventNamespace()})).join(" ");t.on(r,n),t.on(doe.map((function(t){return t+".".concat(e._getEventNamespace())})).join(" "),n),t.on("absoluteTransformChange.".concat(e._getEventNamespace()),n),e._proxyDrag(t)})),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}},{key:"_proxyDrag",value:function(e){var t,n=this;e.on("dragstart.".concat(this._getEventNamespace()),(function(r){t=e.getAbsolutePosition(),n.isDragging()||e===n.findOne(".back")||n.startDrag(r,!1)})),e.on("dragmove.".concat(this._getEventNamespace()),(function(r){if(t){var o=e.getAbsolutePosition(),i=o.x-t.x,a=o.y-t.y;n.nodes().forEach((function(t){if(t!==e&&!t.isDragging()){var n=t.getAbsolutePosition();t.setAbsolutePosition({x:n.x+i,y:n.y+a}),t.startDrag(r)}})),t=null}}))}},{key:"getNodes",value:function(){return this._nodes||[]}},{key:"getActiveAnchor",value:function(){return this._movingAnchorName}},{key:"detach",value:function(){var e=this;this._nodes&&this._nodes.forEach((function(t){t.off("."+e._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}},{key:"_resetTransformCache",value:function(){this._clearCache(coe),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}},{key:"_getNodeRect",value:function(){return this._getCache(coe,this.__getNodeRect)}},{key:"__getNodeShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rotation(),n=arguments.length>2?arguments[2]:void 0,r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),a=r.x*o.x-e.offsetX()*o.x,s=r.y*o.y-e.offsetY()*o.y,l=(Ste.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI),u={x:i.x+a*Math.cos(l)+s*Math.sin(-l),y:i.y+s*Math.cos(l)+a*Math.sin(l),width:r.width*o.x,height:r.height*o.y,rotation:l};return voe(u,-Ste.getAngle(t),{x:0,y:0})}},{key:"__getNodeRect",value:function(){var e=this;if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};var t=[];this.nodes().map((function(n){var r=n.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:e.ignoreStroke()}),o=[{x:r.x,y:r.y},{x:r.x+r.width,y:r.y},{x:r.x+r.width,y:r.y+r.height},{x:r.x,y:r.y+r.height}],i=n.getAbsoluteTransform();o.forEach((function(e){var n=i.point(e);t.push(n)}))}));var n,r,o,i,a=new _te;a.rotate(-Ste.getAngle(this.rotation())),t.forEach((function(e){var t=a.point(e);void 0===n&&(n=o=t.x,r=i=t.y),n=Math.min(n,t.x),r=Math.min(r,t.y),o=Math.max(o,t.x),i=Math.max(i,t.y)})),a.invert();var s=a.point({x:n,y:r});return{x:s.x,y:s.y,width:o-n,height:i-r,rotation:Ste.getAngle(this.rotation())}}},{key:"getX",value:function(){return this._getNodeRect().x}},{key:"getY",value:function(){return this._getNodeRect().y}},{key:"getWidth",value:function(){return this._getNodeRect().width}},{key:"getHeight",value:function(){return this._getNodeRect().height}},{key:"_createElements",value:function(){this._createBack(),poe.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}},{key:"_createAnchor",value:function(e){var t=this,n=new Bre({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:hoe?10:"auto"}),r=this;n.on("mousedown touchstart",(function(e){r._handleMouseDown(e)})),n.on("dragstart",(function(e){n.stopDrag(),e.cancelBubble=!0})),n.on("dragend",(function(e){e.cancelBubble=!0})),n.on("mouseenter",(function(){var r=Ste.getAngle(t.rotation()),o=function(e,t){if("rotater"===e)return"crosshair";t+=Ite.degToRad(foe[e]||0);var n=(Ite.radToDeg(t)%360+360)%360;return Ite._inRange(n,337.5,360)||Ite._inRange(n,0,22.5)?"ns-resize":Ite._inRange(n,22.5,67.5)?"nesw-resize":Ite._inRange(n,67.5,112.5)?"ew-resize":Ite._inRange(n,112.5,157.5)?"nwse-resize":Ite._inRange(n,157.5,202.5)?"ns-resize":Ite._inRange(n,202.5,247.5)?"nesw-resize":Ite._inRange(n,247.5,292.5)?"ew-resize":Ite._inRange(n,292.5,337.5)?"nwse-resize":(Ite.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}(e,r);n.getStage().content&&(n.getStage().content.style.cursor=o),t._cursorChange=!0})),n.on("mouseout",(function(){n.getStage().content&&(n.getStage().content.style.cursor=""),t._cursorChange=!1})),this.add(n)}},{key:"_createBack",value:function(){var e=this,t=new sre({name:"back",width:0,height:0,draggable:!0,sceneFunc:function(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+2*n,this.height()+2*n),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*Ite._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:function(t,n){if(e.shouldOverdrawWholeArea()){var r=e.padding();t.beginPath(),t.rect(-r,-r,n.width()+2*r,n.height()+2*r),t.fillStrokeShape(n)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",(function(e){e.cancelBubble=!0})),t.on("dragmove",(function(e){e.cancelBubble=!0})),t.on("dragend",(function(e){e.cancelBubble=!0})),this.on("dragmove",(function(t){e.update()}))}},{key:"_handleMouseDown",value:function(e){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/o),this.cos=Math.abs(n/o),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var i=e.target.getAbsolutePosition(),a=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-i.x,y:a.y-i.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((function(t){t._fire("transformstart",{evt:e.evt,target:t})}))}},{key:"_handleMouseMove",value:function(e){var t,n,r,o=this.findOne("."+this._movingAnchorName),i=o.getStage();i.setPointersPositions(e);var a=i.getPointerPosition(),s={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y},l=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(l,s,e)),o.setAbsolutePosition(s);var u=o.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var c=this.keepRatio()||e.shiftKey,d=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(c){var f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(f.x-o.x(),2)+Math.pow(f.y-o.y(),2));var h=this.findOne(".top-left").x()>f.x?-1:1,p=this.findOne(".top-left").y()>f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,this.findOne(".top-left").x(f.x-t),this.findOne(".top-left").y(f.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(o.y());else if("top-right"===this._movingAnchorName){if(c){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(o.x()-f.x,2)+Math.pow(f.y-o.y(),2));h=this.findOne(".top-right").x()<f.x?-1:1,p=this.findOne(".top-right").y()>f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,this.findOne(".top-right").x(f.x+t),this.findOne(".top-right").y(f.y-n)}var v=o.position();this.findOne(".top-left").y(v.y),this.findOne(".bottom-right").x(v.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(o.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(o.x());else if("bottom-left"===this._movingAnchorName){if(c){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(f.x-o.x(),2)+Math.pow(o.y()-f.y,2));h=f.x<o.x()?-1:1,p=o.y()<f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,o.x(f.x-t),o.y(f.y+n)}v=o.position(),this.findOne(".top-left").x(v.x),this.findOne(".bottom-right").y(v.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(o.y());else if("bottom-right"===this._movingAnchorName){if(c){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(o.x()-f.x,2)+Math.pow(o.y()-f.y,2));h=this.findOne(".bottom-right").x()<f.x?-1:1,p=this.findOne(".bottom-right").y()<f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,this.findOne(".bottom-right").x(f.x+t),this.findOne(".bottom-right").y(f.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(d=this.centeredScaling()||e.altKey){var g=this.findOne(".top-left"),m=this.findOne(".bottom-right"),y=g.x(),b=g.y(),w=this.getWidth()-m.x(),k=this.getHeight()-m.y();m.move({x:-y,y:-b}),g.move({x:w,y:k})}var x=this.findOne(".top-left").getAbsolutePosition();t=x.x,n=x.y;var S=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:t,y:n,width:S,height:C,rotation:Ste.getAngle(this.rotation())},e)}else{var _=this._getNodeRect();t=o.x()-_.width/2,n=-o.y()+_.height/2;var E=Math.atan2(-n,t)+Math.PI/2;_.height<0&&(E-=Math.PI);var P=Ste.getAngle(this.rotation())+E,L=Ste.getAngle(this.rotationSnapTolerance()),O=function(e,t,n){for(var r=t,o=0;o<e.length;o++){var i=Ste.getAngle(e[o]),a=Math.abs(i-t)%(2*Math.PI);Math.min(a,2*Math.PI-a)<n&&(r=i)}return r}(this.rotationSnaps(),P,L),A=goe(_,O-_.rotation);this._fitNodesInto(A,e)}}},{key:"_handleMouseUp",value:function(e){this._removeEvents(e)}},{key:"getAbsoluteTransform",value:function(){return this.getTransform()}},{key:"_removeEvents",value:function(e){if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var t=this.getNode();this._fire("transformend",{evt:e,target:t}),t&&this._nodes.forEach((function(t){t._fire("transformend",{evt:e,target:t})})),this._movingAnchorName=null}}},{key:"_fitNodesInto",value:function(e,t){var n=this,r=this._getNodeRect();if(Ite._inRange(e.width,2*-this.padding()-1,1))this.update();else if(Ite._inRange(e.height,2*-this.padding()-1,1))this.update();else{var o=this.flipEnabled(),i=new _te;if(i.rotate(Ste.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){var a=i.point({x:2*-this.padding(),y:0});if(e.x+=a.x,e.y+=a.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=a.x,this._anchorDragOffset.y-=a.y,!o)return void this.update()}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){var s=i.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=s.x,this._anchorDragOffset.y-=s.y,e.width+=2*this.padding(),!o)return void this.update()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){var l=i.point({x:0,y:2*-this.padding()});if(e.x+=l.x,e.y+=l.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=l.x,this._anchorDragOffset.y-=l.y,e.height+=2*this.padding(),!o)return void this.update()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){var u=i.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,e.height+=2*this.padding(),!o)return void this.update()}if(this.boundBoxFunc()){var c=this.boundBoxFunc()(r,e);c?e=c:Ite.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}var d=1e7,f=new _te;f.translate(r.x,r.y),f.rotate(r.rotation),f.scale(r.width/d,r.height/d);var h=new _te;h.translate(e.x,e.y),h.rotate(e.rotation),h.scale(e.width/d,e.height/d);var p=h.multiply(f.invert());this._nodes.forEach((function(e){var r,o=e.getParent().getAbsoluteTransform(),i=e.getTransform().copy();i.translate(e.offsetX(),e.offsetY());var a=new _te;a.multiply(o.copy().invert()).multiply(p).multiply(o).multiply(i);var s=a.decompose();e.setAttrs(s),n._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e}),null===(r=e.getLayer())||void 0===r||r.batchDraw()})),this.rotation(Ite._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}}},{key:"forceUpdate",value:function(){this._resetTransformCache(),this.update()}},{key:"_batchChangeChild",value:function(e,t){this.findOne(e).setAttrs(t)}},{key:"update",value:function(){var e,t=this,n=this._getNodeRect();this.rotation(Ite._getRotation(n.rotation));var r=n.width,o=n.height,i=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach((function(e){e.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:t.anchorStroke(),strokeWidth:t.anchorStrokeWidth(),fill:t.anchorFill(),cornerRadius:t.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:o/2,offsetX:l/2+s,visible:a&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:o/2,offsetX:l/2-s,visible:a&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:o,offsetX:l/2+s,offsetY:l/2-s,visible:a&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:o,offsetY:l/2-s,visible:a&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:o,offsetX:l/2-s,offsetY:l/2-s,visible:a&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*Ite._sign(o)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:o,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(e=this.getLayer())||void 0===e||e.batchDraw()}},{key:"isTransforming",value:function(){return this._transforming}},{key:"stopTransform",value:function(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}},{key:"destroy",value:function(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),fre.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}},{key:"toObject",value:function(){return gne.prototype.toObject.call(this)}},{key:"getClientRect",value:function(){return this.nodes().length>0?Yt(nn(n.prototype),"getClientRect",this).call(this):{x:0,y:0,width:0,height:0}}}]),n}(fre);moe.prototype.className="Transformer",Cte(moe),Ute.addGetterSetter(moe,"enabledAnchors",poe,(function(e){return e instanceof Array||Ite.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===poe.indexOf(e)&&Ite.warn("Unknown anchor name: "+e+". Available names are: "+poe.join(", "))})),e||[]})),Ute.addGetterSetter(moe,"flipEnabled",!0,Hte()),Ute.addGetterSetter(moe,"resizeEnabled",!0),Ute.addGetterSetter(moe,"anchorSize",10,Dte()),Ute.addGetterSetter(moe,"rotateEnabled",!0),Ute.addGetterSetter(moe,"rotationSnaps",[]),Ute.addGetterSetter(moe,"rotateAnchorOffset",50,Dte()),Ute.addGetterSetter(moe,"rotationSnapTolerance",5,Dte()),Ute.addGetterSetter(moe,"borderEnabled",!0),Ute.addGetterSetter(moe,"anchorStroke","rgb(0, 161, 255)"),Ute.addGetterSetter(moe,"anchorStrokeWidth",1,Dte()),Ute.addGetterSetter(moe,"anchorFill","white"),Ute.addGetterSetter(moe,"anchorCornerRadius",0,Dte()),Ute.addGetterSetter(moe,"borderStroke","rgb(0, 161, 255)"),Ute.addGetterSetter(moe,"borderStrokeWidth",1,Dte()),Ute.addGetterSetter(moe,"borderDash"),Ute.addGetterSetter(moe,"keepRatio",!0),Ute.addGetterSetter(moe,"centeredScaling",!1),Ute.addGetterSetter(moe,"ignoreStroke",!1),Ute.addGetterSetter(moe,"padding",0,Dte()),Ute.addGetterSetter(moe,"node"),Ute.addGetterSetter(moe,"nodes"),Ute.addGetterSetter(moe,"boundBoxFunc"),Ute.addGetterSetter(moe,"anchorDragBoundFunc"),Ute.addGetterSetter(moe,"shouldOverdrawWholeArea",!1),Ute.addGetterSetter(moe,"useSingleNodeRotation",!0),Ute.backCompat(moe,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var yoe=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"_sceneFunc",value:function(e){e.beginPath(),e.arc(0,0,this.radius(),0,Ste.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(e){this.radius(e/2)}},{key:"setHeight",value:function(e){this.radius(e/2)}}]),n}(sre);function boe(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}yoe.prototype.className="Wedge",yoe.prototype._centroid=!0,yoe.prototype._attrsAffectingSize=["radius"],Cte(yoe),Ute.addGetterSetter(yoe,"radius",0,Dte()),Ute.addGetterSetter(yoe,"angle",0,Dte()),Ute.addGetterSetter(yoe,"clockwise",!1),Ute.backCompat(yoe,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var woe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],koe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];Ute.addGetterSetter(gne,"blurRadius",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"brightness",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"contrast",0,Dte(),Ute.afterSetFilter);function xoe(e,t,n,r,o){var i=n-t,a=o-r;return 0===i?r+a/2:0===a?r:a*((e-t)/i)+r}Ute.addGetterSetter(gne,"embossStrength",.5,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"embossWhiteLevel",.5,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"embossDirection","top-left",null,Ute.afterSetFilter),Ute.addGetterSetter(gne,"embossBlend",!1,null,Ute.afterSetFilter);Ute.addGetterSetter(gne,"enhance",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"hue",0,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"saturation",0,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"luminance",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"hue",0,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"saturation",0,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"value",0,Dte(),Ute.afterSetFilter);function Soe(e,t,n){var r=4*(n*e.width+t),o=[];return o.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),o}function Coe(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}Ute.addGetterSetter(gne,"kaleidoscopePower",2,Dte(),Ute.afterSetFilter),Ute.addGetterSetter(gne,"kaleidoscopeAngle",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"threshold",0,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"noise",.2,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"pixelSize",8,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"levels",.5,Dte(),Ute.afterSetFilter);Ute.addGetterSetter(gne,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),Ute.addGetterSetter(gne,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),Ute.addGetterSetter(gne,"blue",0,Nte,Ute.afterSetFilter);Ute.addGetterSetter(gne,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),Ute.addGetterSetter(gne,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),Ute.addGetterSetter(gne,"blue",0,Nte,Ute.afterSetFilter),Ute.addGetterSetter(gne,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}));Ute.addGetterSetter(gne,"threshold",.5,Dte(),Ute.afterSetFilter);var _oe=kre.Util._assign(kre,{Arc:xre,Arrow:Pre,Circle:Lre,Ellipse:Ore,Image:Are,Label:zre,Tag:jre,Line:_re,Path:Ere,Rect:Bre,RegularPolygon:Fre,Ring:Vre,Sprite:Wre,Star:Ure,Text:roe,TextPath:soe,Transformer:moe,Wedge:yoe,Filters:{Blur:function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S,C,_,E=e.data,P=e.width,L=e.height,O=t+t+1,A=P-1,M=L-1,T=t+1,I=T*(T+1)/2,R=new boe,N=null,D=R,z=null,j=null,B=woe[t],F=koe[t];for(o=1;o<O;o++)D=D.next=new boe,o===T&&(N=D);for(D.next=R,l=s=0,r=0;r<L;r++){for(m=y=b=w=u=c=d=f=0,h=T*(k=E[s]),p=T*(x=E[s+1]),v=T*(S=E[s+2]),g=T*(C=E[s+3]),u+=I*k,c+=I*x,d+=I*S,f+=I*C,D=R,o=0;o<T;o++)D.r=k,D.g=x,D.b=S,D.a=C,D=D.next;for(o=1;o<T;o++)i=s+((A<o?A:o)<<2),u+=(D.r=k=E[i])*(_=T-o),c+=(D.g=x=E[i+1])*_,d+=(D.b=S=E[i+2])*_,f+=(D.a=C=E[i+3])*_,m+=k,y+=x,b+=S,w+=C,D=D.next;for(z=R,j=N,n=0;n<P;n++)E[s+3]=C=f*B>>F,0!==C?(C=255/C,E[s]=(u*B>>F)*C,E[s+1]=(c*B>>F)*C,E[s+2]=(d*B>>F)*C):E[s]=E[s+1]=E[s+2]=0,u-=h,c-=p,d-=v,f-=g,h-=z.r,p-=z.g,v-=z.b,g-=z.a,i=l+((i=n+t+1)<A?i:A)<<2,u+=m+=z.r=E[i],c+=y+=z.g=E[i+1],d+=b+=z.b=E[i+2],f+=w+=z.a=E[i+3],z=z.next,h+=k=j.r,p+=x=j.g,v+=S=j.b,g+=C=j.a,m-=k,y-=x,b-=S,w-=C,j=j.next,s+=4;l+=P}for(n=0;n<P;n++){for(y=b=w=m=c=d=f=u=0,h=T*(k=E[s=n<<2]),p=T*(x=E[s+1]),v=T*(S=E[s+2]),g=T*(C=E[s+3]),u+=I*k,c+=I*x,d+=I*S,f+=I*C,D=R,o=0;o<T;o++)D.r=k,D.g=x,D.b=S,D.a=C,D=D.next;for(a=P,o=1;o<=t;o++)s=a+n<<2,u+=(D.r=k=E[s])*(_=T-o),c+=(D.g=x=E[s+1])*_,d+=(D.b=S=E[s+2])*_,f+=(D.a=C=E[s+3])*_,m+=k,y+=x,b+=S,w+=C,D=D.next,o<M&&(a+=P);for(s=n,z=R,j=N,r=0;r<L;r++)E[3+(i=s<<2)]=C=f*B>>F,C>0?(C=255/C,E[i]=(u*B>>F)*C,E[i+1]=(c*B>>F)*C,E[i+2]=(d*B>>F)*C):E[i]=E[i+1]=E[i+2]=0,u-=h,c-=p,d-=v,f-=g,h-=z.r,p-=z.g,v-=z.b,g-=z.a,i=n+((i=r+T)<M?i:M)*P<<2,u+=m+=z.r=E[i],c+=y+=z.g=E[i+1],d+=b+=z.b=E[i+2],f+=w+=z.a=E[i+3],z=z.next,h+=k=j.r,p+=x=j.g,v+=S=j.b,g+=C=j.a,m-=k,y-=x,b-=S,w-=C,j=j.next,s+=P}}(e,t)},Brighten:function(e){var t,n=255*this.brightness(),r=e.data,o=r.length;for(t=0;t<o;t+=4)r[t]+=n,r[t+1]+=n,r[t+2]+=n},Contrast:function(e){var t,n=Math.pow((this.contrast()+100)/100,2),r=e.data,o=r.length,i=150,a=150,s=150;for(t=0;t<o;t+=4)i=r[t],a=r[t+1],s=r[t+2],i/=255,i-=.5,i*=n,i+=.5,a/=255,a-=.5,a*=n,a+=.5,s/=255,s-=.5,s*=n,s+=.5,i=(i*=255)<0?0:i>255?255:i,a=(a*=255)<0?0:a>255?255:a,s=(s*=255)<0?0:s>255?255:s,r[t]=i,r[t+1]=a,r[t+2]=s},Emboss:function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),o=this.embossBlend(),i=0,a=0,s=e.data,l=e.width,u=e.height,c=4*l,d=u;switch(r){case"top-left":i=-1,a=-1;break;case"top":i=-1,a=0;break;case"top-right":i=-1,a=1;break;case"right":i=0,a=1;break;case"bottom-right":i=1,a=1;break;case"bottom":i=1,a=0;break;case"bottom-left":i=1,a=-1;break;case"left":i=0,a=-1;break;default:Ite.error("Unknown emboss direction: "+r)}do{var f=(d-1)*c,h=i;d+h<1&&(h=0),d+h>u&&(h=0);var p=(d-1+h)*l*4,v=l;do{var g=f+4*(v-1),m=a;v+m<1&&(m=0),v+m>l&&(m=0);var y=p+4*(v-1+m),b=s[g]-s[y],w=s[g+1]-s[y+1],k=s[g+2]-s[y+2],x=b,S=x>0?x:-x;if((w>0?w:-w)>S&&(x=w),(k>0?k:-k)>S&&(x=k),x*=t,o){var C=s[g]+x,_=s[g+1]+x,E=s[g+2]+x;s[g]=C>255?255:C<0?0:C,s[g+1]=_>255?255:_<0?0:_,s[g+2]=E>255?255:E<0?0:E}else{var P=n-x;P<0?P=0:P>255&&(P=255),s[g]=s[g+1]=s[g+2]=P}}while(--v)}while(--d)},Enhance:function(e){var t,n,r,o,i=e.data,a=i.length,s=i[0],l=s,u=i[1],c=u,d=i[2],f=d,h=this.enhance();if(0!==h){for(o=0;o<a;o+=4)(t=i[o+0])<s?s=t:t>l&&(l=t),(n=i[o+1])<u?u=n:n>c&&(c=n),(r=i[o+2])<d?d=r:r>f&&(f=r);var p,v,g,m,y,b,w,k,x;for(l===s&&(l=255,s=0),c===u&&(c=255,u=0),f===d&&(f=255,d=0),h>0?(v=l+h*(255-l),g=s-h*(s-0),y=c+h*(255-c),b=u-h*(u-0),k=f+h*(255-f),x=d-h*(d-0)):(v=l+h*(l-(p=.5*(l+s))),g=s+h*(s-p),y=c+h*(c-(m=.5*(c+u))),b=u+h*(u-m),k=f+h*(f-(w=.5*(f+d))),x=d+h*(d-w)),o=0;o<a;o+=4)i[o+0]=xoe(i[o+0],s,l,g,v),i[o+1]=xoe(i[o+1],u,c,b,y),i[o+2]=xoe(i[o+2],d,f,x,k)}},Grayscale:function(e){var t,n,r=e.data,o=r.length;for(t=0;t<o;t+=4)n=.34*r[t]+.5*r[t+1]+.16*r[t+2],r[t]=n,r[t+1]=n,r[t+2]=n},HSL:function(e){var t,n,r,o,i,a=e.data,s=a.length,l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,c=127*this.luminance(),d=1*l*Math.cos(u*Math.PI/180),f=1*l*Math.sin(u*Math.PI/180),h=.299+.701*d+.167*f,p=.587-.587*d+.33*f,v=.114-.114*d-.497*f,g=.299-.299*d-.328*f,m=.587+.413*d+.035*f,y=.114-.114*d+.293*f,b=.299-.3*d+1.25*f,w=.587-.586*d-1.05*f,k=.114+.886*d-.2*f;for(t=0;t<s;t+=4)n=a[t+0],r=a[t+1],o=a[t+2],i=a[t+3],a[t+0]=h*n+p*r+v*o+c,a[t+1]=g*n+m*r+y*o+c,a[t+2]=b*n+w*r+k*o+c,a[t+3]=i},HSV:function(e){var t,n,r,o,i,a=e.data,s=a.length,l=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,d=l*u*Math.cos(c*Math.PI/180),f=l*u*Math.sin(c*Math.PI/180),h=.299*l+.701*d+.167*f,p=.587*l-.587*d+.33*f,v=.114*l-.114*d-.497*f,g=.299*l-.299*d-.328*f,m=.587*l+.413*d+.035*f,y=.114*l-.114*d+.293*f,b=.299*l-.3*d+1.25*f,w=.587*l-.586*d-1.05*f,k=.114*l+.886*d-.2*f;for(t=0;t<s;t+=4)n=a[t+0],r=a[t+1],o=a[t+2],i=a[t+3],a[t+0]=h*n+p*r+v*o,a[t+1]=g*n+m*r+y*o,a[t+2]=b*n+w*r+k*o,a[t+3]=i},Invert:function(e){var t,n=e.data,r=n.length;for(t=0;t<r;t+=4)n[t]=255-n[t],n[t+1]=255-n[t+1],n[t+2]=255-n[t+2]},Kaleidoscope:function(e){var t,n,r,o,i,a,s,l,u,c=e.width,d=e.height,f=Math.round(this.kaleidoscopePower()),h=Math.round(this.kaleidoscopeAngle()),p=Math.floor(c*(h%360)/360);if(!(f<1)){var v=Ite.createCanvasElement();v.width=c,v.height=d;var g=v.getContext("2d").getImageData(0,0,c,d);Ite.releaseCanvas(v),function(e,t,n){var r,o,i,a,s=e.data,l=t.data,u=e.width,c=e.height,d=n.polarCenterX||u/2,f=n.polarCenterY||c/2,h=0,p=0,v=0,g=0,m=Math.sqrt(d*d+f*f);o=u-d,i=c-f,m=(a=Math.sqrt(o*o+i*i))>m?a:m;var y,b,w,k,x=c,S=u,C=360/S*Math.PI/180;for(b=0;b<S;b+=1)for(w=Math.sin(b*C),k=Math.cos(b*C),y=0;y<x;y+=1)o=Math.floor(d+m*y/x*k),h=s[0+(r=4*((i=Math.floor(f+m*y/x*w))*u+o))],p=s[r+1],v=s[r+2],g=s[r+3],l[0+(r=4*(b+y*u))]=h,l[r+1]=p,l[r+2]=v,l[r+3]=g}(e,g,{polarCenterX:c/2,polarCenterY:d/2});for(var m=c/Math.pow(2,f);m<=8;)m*=2,f-=1;var y=m=Math.ceil(m),b=0,w=y,k=1;for(p+m>c&&(b=y,w=0,k=-1),n=0;n<d;n+=1)for(t=b;t!==w;t+=k)l=4*(c*n+Math.round(t+p)%c),o=g.data[l+0],i=g.data[l+1],a=g.data[l+2],s=g.data[l+3],u=4*(c*n+t),g.data[u+0]=o,g.data[u+1]=i,g.data[u+2]=a,g.data[u+3]=s;for(n=0;n<d;n+=1)for(y=Math.floor(m),r=0;r<f;r+=1){for(t=0;t<y+1;t+=1)l=4*(c*n+t),o=g.data[l+0],i=g.data[l+1],a=g.data[l+2],s=g.data[l+3],u=4*(c*n+2*y-t-1),g.data[u+0]=o,g.data[u+1]=i,g.data[u+2]=a,g.data[u+3]=s;y*=2}!function(e,t,n){var r,o,i,a,s,l,u=e.data,c=t.data,d=e.width,f=e.height,h=n.polarCenterX||d/2,p=n.polarCenterY||f/2,v=0,g=0,m=0,y=0,b=Math.sqrt(h*h+p*p);o=d-h,i=f-p,b=(l=Math.sqrt(o*o+i*i))>b?l:b;var w,k,x,S=f,C=d,_=n.polarRotation||0;for(o=0;o<d;o+=1)for(i=0;i<f;i+=1)a=o-h,s=i-p,w=Math.sqrt(a*a+s*s)*S/b,k=(k=(180*Math.atan2(s,a)/Math.PI+360+_)%360)*C/360,x=Math.floor(k),v=u[0+(r=4*(Math.floor(w)*d+x))],g=u[r+1],m=u[r+2],y=u[r+3],c[0+(r=4*(i*d+o))]=v,c[r+1]=g,c[r+2]=m,c[r+3]=y}(g,e,{polarRotation:0})}},Mask:function(e){var t=function(e,t){var n=Soe(e,0,0),r=Soe(e,e.width-1,0),o=Soe(e,0,e.height-1),i=Soe(e,e.width-1,e.height-1),a=t||10;if(Coe(n,r)<a&&Coe(r,i)<a&&Coe(i,o)<a&&Coe(o,n)<a){for(var s=function(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}([r,n,i,o]),l=[],u=0;u<e.width*e.height;u++){var c=Coe(s,[e.data[4*u],e.data[4*u+1],e.data[4*u+2]]);l[u]=c<a?0:255}return l}}(e,this.threshold());return t&&(t=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,c=0,d=0;d<o;d++)for(var f=0;f<o;f++){var h=s+d-i,p=l+f-i;if(h>=0&&h<n&&p>=0&&p<t){var v=r[d*o+f];c+=e[h*t+p]*v}}a[u]=2040===c?255:0}return a}(t,e.width,e.height),t=function(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,c=0,d=0;d<o;d++)for(var f=0;f<o;f++){var h=s+d-i,p=l+f-i;if(h>=0&&h<n&&p>=0&&p<t){var v=r[d*o+f];c+=e[h*t+p]*v}}a[u]=c>=1020?255:0}return a}(t,e.width,e.height),t=function(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,c=0,d=0;d<o;d++)for(var f=0;f<o;f++){var h=s+d-i,p=l+f-i;if(h>=0&&h<n&&p>=0&&p<t){var v=r[d*o+f];c+=e[h*t+p]*v}}a[u]=c}return a}(t,e.width,e.height),function(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}(e,t)),e},Noise:function(e){var t,n=255*this.noise(),r=e.data,o=r.length,i=n/2;for(t=0;t<o;t+=4)r[t+0]+=i-2*i*Math.random(),r[t+1]+=i-2*i*Math.random(),r[t+2]+=i-2*i*Math.random()},Pixelate:function(e){var t,n,r,o,i,a,s,l,u,c,d,f,h,p,v=Math.ceil(this.pixelSize()),g=e.width,m=e.height,y=Math.ceil(g/v),b=Math.ceil(m/v),w=e.data;if(v<=0)Ite.error("pixelSize value can not be <= 0");else for(f=0;f<y;f+=1)for(h=0;h<b;h+=1){for(o=0,i=0,a=0,s=0,u=(l=f*v)+v,d=(c=h*v)+v,p=0,t=l;t<u;t+=1)if(!(t>=g))for(n=c;n<d;n+=1)n>=m||(o+=w[(r=4*(g*n+t))+0],i+=w[r+1],a+=w[r+2],s+=w[r+3],p+=1);for(o/=p,i/=p,a/=p,s/=p,t=l;t<u;t+=1)if(!(t>=g))for(n=c;n<d;n+=1)n>=m||(w[(r=4*(g*n+t))+0]=o,w[r+1]=i,w[r+2]=a,w[r+3]=s)}},Posterize:function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,o=r.length,i=255/n;for(t=0;t<o;t+=1)r[t]=Math.floor(r[t]/i)*i},RGB:function(e){var t,n,r=e.data,o=r.length,i=this.red(),a=this.green(),s=this.blue();for(t=0;t<o;t+=4)n=(.34*r[t]+.5*r[t+1]+.16*r[t+2])/255,r[t]=n*i,r[t+1]=n*a,r[t+2]=n*s,r[t+3]=r[t+3]},RGBA:function(e){var t,n,r=e.data,o=r.length,i=this.red(),a=this.green(),s=this.blue(),l=this.alpha();for(t=0;t<o;t+=4)n=1-l,r[t]=i*l+r[t]*n,r[t+1]=a*l+r[t+1]*n,r[t+2]=s*l+r[t+2]*n},Sepia:function(e){var t,n,r,o,i=e.data,a=i.length;for(t=0;t<a;t+=4)n=i[t+0],r=i[t+1],o=i[t+2],i[t+0]=Math.min(255,.393*n+.769*r+.189*o),i[t+1]=Math.min(255,.349*n+.686*r+.168*o),i[t+2]=Math.min(255,.272*n+.534*r+.131*o)},Solarize:function(e){var t=e.data,n=e.width,r=4*n,o=e.height;do{var i=(o-1)*r,a=n;do{var s=i+4*(a-1),l=t[s],u=t[s+1],c=t[s+2];l>127&&(l=255-l),u>127&&(u=255-u),c>127&&(c=255-c),t[s]=l,t[s+1]=u,t[s+2]=c}while(--a)}while(--o)},Threshold:function(e){var t,n=255*this.threshold(),r=e.data,o=r.length;for(t=0;t<o;t+=1)r[t]=r[t]<n?0:255}}}),Eoe=null,Poe=null,Loe=function(){return Eoe},Ooe=function(){return Poe},Aoe=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},Moe=function(e){var t,n=Loe(),r=e.generationMode,o=e.generationState,i=e.postprocessingState,a=e.canvasState,s=e.systemState,l=i.codeformerFidelity,u=i.facetoolStrength,c=i.facetoolType,d=i.hiresFix,f=i.hiresStrength,h=i.shouldRunESRGAN,p=i.shouldRunFacetool,v=i.upscalingLevel,g=i.upscalingStrength,m=o.cfgScale,y=o.height,b=o.img2imgStrength,w=o.infillMethod,k=o.initialImage,x=o.iterations,S=o.perlin,C=o.prompt,_=o.negativePrompt,E=o.sampler,P=o.seamBlur,L=o.seamless,O=o.seamSize,A=o.seamSteps,M=o.seamStrength,T=o.seed,I=o.seedWeights,R=o.shouldFitToWidthHeight,N=o.shouldGenerateVariations,D=o.shouldRandomizeSeed,z=o.steps,j=o.threshold,B=o.tileSize,F=o.variationAmount,H=o.width,V=s.shouldDisplayInProgressType,W=s.saveIntermediatesInterval,U=s.enableImageDebugging,G={prompt:C,iterations:x,steps:z,cfg_scale:m,threshold:j,perlin:S,height:y,width:H,sampler_name:E,seed:T,progress_images:"full-res"===V,progress_latents:"latents"===V,save_intermediates:W,generation_mode:r,init_mask:""},q=!1,Y=!1;if(""!==_&&(G.prompt="".concat(C," [").concat(_,"]")),G.seed=D?Aoe(0,yte):T,["txt2img","img2img"].includes(r)&&(G.seamless=L,G.hires_fix=d,d&&(G.strength=f),h&&(q={level:v,strength:g}),p&&(Y={type:c,strength:u},"codeformer"===c&&(Y.codeformer_fidelity=l))),"img2img"===r&&k&&(G.init_img="string"==typeof k?k:k.url,G.strength=b,G.fit=R),"unifiedCanvas"===r&&n){var Z=a.layerState.objects,X=a.boundingBoxCoordinates,$=a.boundingBoxDimensions,K=a.stageScale,Q=a.isMaskEnabled,J=a.shouldPreserveMaskedArea,ee=a.boundingBoxScaleMethod,te=a.scaledBoundingBoxDimensions,ne=un(un({},X),$),re=function(e,t){var n=t.width,r=t.height,o=document.createElement("div"),i=new _oe.Stage({container:o,width:n,height:r}),a=new _oe.Layer,s=new _oe.Layer;a.add(new _oe.Rect(un(un({},t),{},{fill:"white"}))),e.forEach((function(e){return s.add(new _oe.Line({points:e.points,stroke:"black",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"}))})),i.add(a),i.add(s);var l=i.toDataURL(un({},t));return o.remove(),l}(Q?Z.filter(j5):[],ne);G.init_mask=re,G.fit=!1,G.strength=b,G.invert_mask=J,G.bounding_box=ne;var oe=n.scale();n.scale({x:1/K,y:1/K});var ie=n.getAbsolutePosition(),ae=n.toDataURL({x:ne.x+ie.x,y:ne.y+ie.y,width:ne.width,height:ne.height});U&&function(e){var t=window.open("");t&&e.forEach((function(e){var n=new Image;n.src=e.base64,t.document.write(e.caption),t.document.write("</br>"),t.document.write(n.outerHTML),t.document.write("</br></br>")}))}([{base64:re,caption:"mask sent as init_mask"},{base64:ae,caption:"image sent as init_img"}]),n.scale(oe),G.init_img=ae,G.progress_images=!1,"none"!==ee&&(G.inpaint_width=te.width,G.inpaint_height=te.height),G.seam_size=O,G.seam_blur=P,G.seam_strength=M,G.seam_steps=A,G.tile_size=B,G.infill_method=w,G.force_outpaint=!1}return N?(G.variation_amount=F,I&&(G.with_variations=(t=I.split(",").map((function(e){return e.split(":")})),t.map((function(e){return[parseInt(e[0],10),parseFloat(e[1])]}))))):G.variation_amount=0,U&&(G.enable_image_debugging=U),{generationParameters:G,esrganParameters:q,facetoolParameters:Y}},Toe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Ioe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Roe=/[^-+\dA-Z]/g;function Noe(e,t,n,r){if(1!==arguments.length||"string"!=typeof e||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(zoe[t]||t||zoe.default)).slice(0,4);"UTC:"!==o&&"GMT:"!==o||(t=t.slice(4),n=!0,"GMT:"===o&&(r=!0));var i=function(){return n?"getUTC":"get"},a=function(){return e[i()+"Date"]()},s=function(){return e[i()+"Day"]()},l=function(){return e[i()+"Month"]()},u=function(){return e[i()+"FullYear"]()},c=function(){return e[i()+"Hours"]()},d=function(){return e[i()+"Minutes"]()},f=function(){return e[i()+"Seconds"]()},h=function(){return e[i()+"Milliseconds"]()},p=function(){return n?0:e.getTimezoneOffset()},v=function(){return Hoe(e)},g=function(){return Voe(e)},m={d:function(){return a()},dd:function(){return Boe(a())},ddd:function(){return joe.dayNames[s()]},DDD:function(){return Foe({y:u(),m:l(),d:a(),_:i(),dayName:joe.dayNames[s()],short:!0})},dddd:function(){return joe.dayNames[s()+7]},DDDD:function(){return Foe({y:u(),m:l(),d:a(),_:i(),dayName:joe.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Boe(l()+1)},mmm:function(){return joe.monthNames[l()]},mmmm:function(){return joe.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Boe(u(),4)},h:function(){return c()%12||12},hh:function(){return Boe(c()%12||12)},H:function(){return c()},HH:function(){return Boe(c())},M:function(){return d()},MM:function(){return Boe(d())},s:function(){return f()},ss:function(){return Boe(f())},l:function(){return Boe(h(),3)},L:function(){return Boe(Math.floor(h()/10))},t:function(){return c()<12?joe.timeNames[0]:joe.timeNames[1]},tt:function(){return c()<12?joe.timeNames[2]:joe.timeNames[3]},T:function(){return c()<12?joe.timeNames[4]:joe.timeNames[5]},TT:function(){return c()<12?joe.timeNames[6]:joe.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Woe(e)},o:function(){return(p()>0?"-":"+")+Boe(100*Math.floor(Math.abs(p())/60)+Math.abs(p())%60,4)},p:function(){return(p()>0?"-":"+")+Boe(Math.floor(Math.abs(p())/60),2)+":"+Boe(Math.floor(Math.abs(p())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return v()},WW:function(){return Boe(v())},N:function(){return g()}};return t.replace(Toe,(function(e){return e in m?m[e]():e.slice(1,e.length-1)}))}var Doe,zoe={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},joe={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Boe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return String(e).padStart(t,"0")},Foe=function(e){var t=e.y,n=e.m,r=e.d,o=e._,i=e.dayName,a=e.short,s=void 0!==a&&a,l=new Date,u=new Date;u.setDate(u[o+"Date"]()-1);var c=new Date;c.setDate(c[o+"Date"]()+1);return l[o+"FullYear"]()===t&&l[o+"Month"]()===n&&l[o+"Date"]()===r?s?"Tdy":"Today":u[o+"FullYear"]()===t&&u[o+"Month"]()===n&&u[o+"Date"]()===r?s?"Ysd":"Yesterday":c[o+"FullYear"]()===t&&c[o+"Month"]()===n&&c[o+"Date"]()===r?s?"Tmw":"Tomorrow":i},Hoe=function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var o=(t-n)/6048e5;return 1+Math.floor(o)},Voe=function(e){var t=e.getDay();return 0===t&&(t=7),t},Woe=function(e){return(String(e).match(Ioe)||[""]).pop().replace(Roe,"").replace(/GMT\+0000/g,"UTC")},Uoe=new Uint8Array(16);function Goe(){if(!Doe&&!(Doe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Doe(Uoe)}for(var qoe=[],Yoe=0;Yoe<256;++Yoe)qoe.push((Yoe+256).toString(16).slice(1));var Zoe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xoe(e,t,n){if(Zoe.randomUUID&&!t&&!e)return Zoe.randomUUID();var r=(e=e||{}).random||(e.rng||Goe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(qoe[e[t+0]]+qoe[e[t+1]]+qoe[e[t+2]]+qoe[e[t+3]]+"-"+qoe[e[t+4]]+qoe[e[t+5]]+"-"+qoe[e[t+6]]+qoe[e[t+7]]+"-"+qoe[e[t+8]]+qoe[e[t+9]]+"-"+qoe[e[t+10]]+qoe[e[t+11]]+qoe[e[t+12]]+qoe[e[t+13]]+qoe[e[t+14]]+qoe[e[t+15]]).toLowerCase()}(r)}var $oe,Koe=b$("socketio/generateImage"),Qoe=b$("socketio/runESRGAN"),Joe=b$("socketio/runFacetool"),eie=b$("socketio/deleteImage"),tie=b$("socketio/requestImages"),nie=b$("socketio/requestNewImages"),rie=b$("socketio/cancelProcessing"),oie=b$("socketio/requestSystemConfig"),iie=b$("socketio/searchForModels"),aie=b$("socketio/addNewModel"),sie=b$("socketio/deleteModel"),lie=b$("socketio/requestModelChange"),uie=b$("socketio/saveStagingAreaImageToGallery"),cie=b$("socketio/requestEmptyTempFolder"),die=function(){var e=fte(new URL(window.location.href).origin,{timeout:6e4,path:"".concat(window.location.pathname,"socket.io")}),t=!1;return function(n){return function(r){return function(o){var i=function(e){var t=e.dispatch,n=e.getState;return{onConnect:function(){try{t(d8(!0)),t(v8(A7.t("common:statusConnected"))),t(oie());var e=n().gallery;e.categories.result.latest_mtime?t(nie("result")):t(tie("result")),e.categories.user.latest_mtime?t(nie("user")):t(tie("user"))}catch(Dhe){console.error(Dhe)}},onDisconnect:function(){try{t(d8(!1)),t(v8(A7.t("common:statusDisconnected"))),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(Dhe){console.error(Dhe)}},onGenerationResult:function(e){try{var r=n(),o=r.ui.activeTab,i=r.postprocessing.shouldLoopback,a=(e.boundingBox,e.generationMode),s=sn(e,ct),l=un({uuid:Xoe()},s);if(["txt2img","img2img"].includes(a)&&t(Z3({category:"result",image:un(un({},l),{},{category:"result"})})),"unifiedCanvas"===a&&e.boundingBox){var u=e.boundingBox;t(q5({image:un(un({},l),{},{category:"temp"}),boundingBox:u})),r.canvas.shouldAutoSave&&t(Z3({image:un(un({},l),{},{category:"result"}),category:"result"}))}i&&"img2img"===R8[o]&&t(M4(l)),t(X3()),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Image generated: ".concat(e.url)}))}catch(Dhe){console.error(Dhe)}},onIntermediateResult:function(e){try{t(J3(un(un({uuid:Xoe()},e),{},{category:"result"}))),e.isBase64||t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Intermediate image generated: ".concat(e.url)}))}catch(Dhe){console.error(Dhe)}},onPostprocessingResult:function(e){try{t(Z3({category:"result",image:un(un({uuid:Xoe()},e),{},{category:"result"})})),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Postprocessed: ".concat(e.url)}))}catch(Dhe){console.error(Dhe)}},onProgressUpdate:function(e){try{t(l8(!0)),t(p8(e))}catch(Dhe){console.error(Dhe)}},onError:function(e){var n=e.message;e.additionalData;try{t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Server error: ".concat(n),level:"error"})),t(b8()),t(X3())}catch(Dhe){console.error(Dhe)}},onGalleryImages:function(e){var n=e.images,r=e.areMoreImagesAvailable,o=e.category,i=n.map((function(e){return un({uuid:Xoe()},e)}));t(Q3({images:i,areMoreImagesAvailable:r,category:o})),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Loaded ".concat(n.length," images")}))},onProcessingCanceled:function(){t(y8());var e=n().gallery.intermediateImage;e&&(e.isBase64||(t(Z3({category:"result",image:e})),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Intermediate image saved: ".concat(e.url)}))),t(X3())),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:function(e){var r=e.url;t($3(e));var o=n().generation,i=o.initialImage,a=o.maskPath;i!==r&&(null==i?void 0:i.url)!==r||t(C4()),a===r&&t(I4("")),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Image deleted: ".concat(r)}))},onSystemConfig:function(e){t(g8(e)),e.infill_methods.includes("patchmatch")||t(A4(e.infill_methods[0]))},onFoundModels:function(e){var n=e.search_folder,r=e.found_models;t(A8(n)),t(M8(r))},onNewModelAdded:function(e){var n=e.new_model_name,r=e.model_list,o=e.update;t(k8(r)),t(l8(!1)),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Model Added: ".concat(n),level:"info"})),t(P8({title:o?"".concat(A7.t("modelmanager:modelUpdated"),": ").concat(n):"".concat(A7.t("modelmanager:modelAdded"),": ").concat(n),status:"success",duration:2500,isClosable:!0}))},onModelDeleted:function(e){var n=e.deleted_model_name,r=e.model_list;t(k8(r)),t(l8(!1)),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"".concat(A7.t("modelmanager:modelAdded"),": ").concat(n),level:"info"})),t(P8({title:"".concat(A7.t("modelmanager:modelEntryDeleted"),": ").concat(n),status:"success",duration:2500,isClosable:!0}))},onModelChanged:function(e){var n=e.model_name,r=e.model_list;t(k8(r)),t(v8(A7.t("common:statusModelChanged"))),t(l8(!1)),t(x8(!0)),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Model changed: ".concat(n),level:"info"}))},onModelChangeFailed:function(e){var n=e.model_name,r=e.model_list;t(k8(r)),t(l8(!1)),t(x8(!0)),t(b8()),t(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Model change failed: ".concat(n),level:"error"}))},onTempFolderEmptied:function(){t(P8({title:A7.t("toast:tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}}(n),a=i.onConnect,s=i.onDisconnect,l=i.onError,u=i.onPostprocessingResult,c=i.onGenerationResult,d=i.onIntermediateResult,f=i.onProgressUpdate,h=i.onGalleryImages,p=i.onProcessingCanceled,v=i.onImageDeleted,g=i.onSystemConfig,m=i.onModelChanged,y=i.onFoundModels,b=i.onNewModelAdded,w=i.onModelDeleted,k=i.onModelChangeFailed,x=i.onTempFolderEmptied,S=function(e,t){var n=e.dispatch,r=e.getState;return{emitGenerateImage:function(e){n(l8(!0));var o=r(),i=o.generation,a=o.postprocessing,s=o.system,l={generationMode:e,generationState:i,postprocessingState:a,canvasState:o.canvas,systemState:s};n(E8());var u=Moe(l),c=u.generationParameters,d=u.esrganParameters,f=u.facetoolParameters;t.emit("generateImage",c,d,f),c.init_mask&&(c.init_mask=c.init_mask.substr(0,64).concat("...")),c.init_img&&(c.init_img=c.init_img.substr(0,64).concat("...")),n(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Image generation requested: ".concat(JSON.stringify(un(un(un({},c),d),f)))}))},emitRunESRGAN:function(e){n(l8(!0));var o=r().postprocessing,i={upscale:[o.upscalingLevel,o.upscalingStrength]};t.emit("runPostprocessing",e,un({type:"esrgan"},i)),n(u8({timestamp:Noe(new Date,"isoDateTime"),message:"ESRGAN upscale requested: ".concat(JSON.stringify(un({file:e.url},i)))}))},emitRunFacetool:function(e){n(l8(!0));var o=r().postprocessing,i=o.facetoolType,a=o.facetoolStrength,s=o.codeformerFidelity,l={facetool_strength:a};"codeformer"===i&&(l.codeformer_fidelity=s),t.emit("runPostprocessing",e,un({type:i},l)),n(u8({timestamp:Noe(new Date,"isoDateTime"),message:"Face restoration (".concat(i,") requested: ").concat(JSON.stringify(un({file:e.url},l)))}))},emitDeleteImage:function(e){var r=e.url,o=e.uuid,i=e.category,a=e.thumbnail;n($3(e)),t.emit("deleteImage",r,a,o,i)},emitRequestImages:function(e){var n=r().gallery.categories[e].earliest_mtime;t.emit("requestImages",e,n)},emitRequestNewImages:function(e){var n=r().gallery.categories[e].latest_mtime;t.emit("requestLatestImages",e,n)},emitCancelProcessing:function(){t.emit("cancel")},emitRequestSystemConfig:function(){t.emit("requestSystemConfig")},emitSearchForModels:function(e){t.emit("searchForModels",e)},emitAddNewModel:function(e){t.emit("addNewModel",e)},emitDeleteModel:function(e){t.emit("deleteModel",e)},emitRequestModelChange:function(e){n(S8()),t.emit("requestModelChange",e)},emitSaveStagingAreaImageToGallery:function(e){t.emit("requestSaveStagingAreaImageToGallery",e)},emitRequestEmptyTempFolder:function(){t.emit("requestEmptyTempFolder")}}}(n,e),C=S.emitGenerateImage,_=S.emitRunESRGAN,E=S.emitRunFacetool,P=S.emitDeleteImage,L=S.emitRequestImages,O=S.emitRequestNewImages,A=S.emitCancelProcessing,M=S.emitRequestSystemConfig,T=S.emitSearchForModels,I=S.emitAddNewModel,R=S.emitDeleteModel,N=S.emitRequestModelChange,D=S.emitSaveStagingAreaImageToGallery,z=S.emitRequestEmptyTempFolder;switch(t||(e.on("connect",(function(){return a()})),e.on("disconnect",(function(){return s()})),e.on("error",(function(e){return l(e)})),e.on("generationResult",(function(e){return c(e)})),e.on("postprocessingResult",(function(e){return u(e)})),e.on("intermediateResult",(function(e){return d(e)})),e.on("progressUpdate",(function(e){return f(e)})),e.on("galleryImages",(function(e){return h(e)})),e.on("processingCanceled",(function(){p()})),e.on("imageDeleted",(function(e){v(e)})),e.on("systemConfig",(function(e){g(e)})),e.on("foundModels",(function(e){y(e)})),e.on("newModelAdded",(function(e){b(e)})),e.on("modelDeleted",(function(e){w(e)})),e.on("modelChanged",(function(e){m(e)})),e.on("modelChangeFailed",(function(e){k(e)})),e.on("tempFolderEmptied",(function(){x()})),t=!0),o.type){case"socketio/generateImage":C(o.payload);break;case"socketio/runESRGAN":_(o.payload);break;case"socketio/runFacetool":E(o.payload);break;case"socketio/deleteImage":P(o.payload);break;case"socketio/requestImages":L(o.payload);break;case"socketio/requestNewImages":O(o.payload);break;case"socketio/cancelProcessing":A();break;case"socketio/requestSystemConfig":M();break;case"socketio/searchForModels":T(o.payload);break;case"socketio/addNewModel":I(o.payload);break;case"socketio/deleteModel":R(o.payload);break;case"socketio/requestModelChange":N(o.payload);break;case"socketio/saveStagingAreaImageToGallery":D(o.payload);break;case"socketio/requestEmptyTempFolder":z()}r(o)}}}},fie=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map((function(e){return"canvas.".concat(e)})),hie=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel"].map((function(e){return"system.".concat(e)})),pie=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map((function(e){return"gallery.".concat(e)})),vie=UX({generation:J4,postprocessing:h6,gallery:f4,system:I8,canvas:G3,ui:Z8,lightbox:v4}),gie=function(e,t){var n=void 0!==e.version?e.version:-1;e.debug;var r=void 0===e.stateReconciler?j$:e.stateReconciler,o=e.getStoredState||H$,i=void 0!==e.timeout?e.timeout:5e3,a=null,s=!1,l=!0,u=function(e){return e._persist.rehydrated&&a&&!l&&a.update(e),e};return function(c,d){var f=c||{},h=f._persist,p=Y$(f,["_persist"]);if(d.type===T$){var v=!1,g=function(t,n){v||(d.rehydrate(e.key,t,n),v=!0)};if(i&&setTimeout((function(){!v&&g(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))}),i),l=!1,a||(a=B$(e)),h)return G$({},t(p,d),{_persist:h});if("function"!=typeof d.rehydrate||"function"!=typeof d.register)throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then((function(t){var r=e.migrate||function(e,t){return Promise.resolve(e)};r(t,n).then((function(e){g(e)}),(function(e){g(void 0,e)}))}),(function(e){g(void 0,e)})),G$({},t(p,d),{_persist:{version:n,rehydrated:!1}})}if(d.type===I$)return s=!0,d.result(function(e){var t=e.storage,n="".concat(void 0!==e.keyPrefix?e.keyPrefix:L$).concat(e.key);return t.removeItem(n,W$)}(e)),G$({},t(p,d),{_persist:h});if(d.type===O$)return d.result(a&&a.flush()),G$({},t(p,d),{_persist:h});if(d.type===M$)l=!0;else if(d.type===A$){if(s)return G$({},p,{_persist:G$({},h,{rehydrated:!0})});if(d.key===e.key){var m=t(p,d),y=d.payload,b=G$({},!1!==r&&void 0!==y?r(y,c,m,e):m,{_persist:G$({},h,{rehydrated:!0})});return u(b)}}if(!h)return t(c,d);var w=t(p,d);return w===p?c:u(G$({},w,{_persist:h}))}}(uK.getPersistConfig({key:"root",storage:sK,rootReducer:vie,blacklist:[].concat(cn(fie),cn(hie),cn(pie)),debounce:300}),vie),mie=function(e){var t,n=y$(),r=e||{},o=r.reducer,i=void 0===o?void 0:o,a=r.middleware,s=void 0===a?n():a,l=r.devTools,u=void 0===l||l,c=r.preloadedState,d=void 0===c?void 0:c,f=r.enhancers,h=void 0===f?void 0:f;if("function"==typeof i)t=i;else{if(!function(e){if("object"!==kn(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=UX(i)}var p=s;"function"==typeof p&&(p=p(n));var v=qX.apply(void 0,p),g=GX;u&&(g=v$(h$({trace:!1},"object"===kn(u)&&u)));var m=[v];return Array.isArray(h)?m=i$([v],h):"function"==typeof h&&(m=h(m)),WX(t,d,g.apply(void 0,m))}({reducer:gie,middleware:function(e){return e({immutableCheck:!1,serializableCheck:!1}).concat(die())},devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),yie=function(e,t,n){var r=n||!1,o=WX(J$,Q$,t&&t.enhancer?t.enhancer:void 0),i=function(e){o.dispatch({type:R$,key:e})},a=function(t,n,i){var a={type:A$,payload:n,err:i,key:t};e.dispatch(a),o.dispatch(a),r&&s.getState().bootstrapped&&(r(),r=!1)},s=$$({},o,{purge:function(){var t=[];return e.dispatch({type:I$,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:O$,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:M$})},persist:function(){e.dispatch({type:T$,register:i,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}(mie),bie=cr.createContext(null),wie=OZ,kie=nZ,xie=function(){return{setOpenUploader:function(e){e&&($oe=e)},openUploader:$oe}};var Sie=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Cie=function(e){return this.__data__.has(e)},_ie=RJ,Eie=Sie,Pie=Cie;function Lie(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _ie;++t<n;)this.add(e[t])}Lie.prototype.add=Lie.prototype.push=Eie,Lie.prototype.has=Pie;var Oie=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Aie=function(e,t){return e.has(t)},Mie=Lie,Tie=Oie,Iie=Aie;var Rie=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=2&n?new Mie:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var p=e[d],v=t[d];if(r)var g=a?r(v,p,d,t,e,i):r(p,v,d,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!Tie(t,(function(e,t){if(!Iie(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){f=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var Nie=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var Die=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},zie=w2,jie=tQ,Bie=Rie,Fie=Nie,Hie=Die,Vie=EK?EK.prototype:void 0,Wie=Vie?Vie.valueOf:void 0;var Uie=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new zie(e),new zie(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jie(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Fie;case"[object Set]":var l=1&r;if(s||(s=Hie),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Bie(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Wie)return Wie.call(e)==Wie.call(t)}return!1},Gie=Z1,qie=Object.prototype.hasOwnProperty;var Yie=function(e,t,n,r,o,i){var a=1&n,s=Gie(e),l=s.length;if(l!=Gie(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:qie.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++u<l;){var v=e[c=s[u]],g=t[c];if(r)var m=a?r(g,v,c,t,e,i):r(v,g,c,e,t,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h},Zie=qJ,Xie=Rie,$ie=Uie,Kie=Yie,Qie=m2,Jie=v0,eae=g0,tae=I0,nae="[object Arguments]",rae="[object Array]",oae="[object Object]",iae=Object.prototype.hasOwnProperty;var aae=function(e,t,n,r,o,i){var a=Jie(e),s=Jie(t),l=a?rae:Qie(e),u=s?rae:Qie(t),c=(l=l==nae?oae:l)==oae,d=(u=u==nae?oae:u)==oae,f=l==u;if(f&&eae(e)){if(!eae(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new Zie),a||tae(e)?Xie(e,t,n,r,o,i):$ie(e,t,l,n,r,o,i);if(!(1&n)){var h=c&&iae.call(e,"__wrapped__"),p=d&&iae.call(t,"__wrapped__");if(h||p){var v=h?e.value():e,g=p?t.value():t;return i||(i=new Zie),o(v,g,n,r,i)}}return!!f&&(i||(i=new Zie),Kie(e,t,n,r,o,i))},sae=aae,lae=BK;var uae=function e(t,n,r,o,i){return t===n||(null==t||null==n||!lae(t)&&!lae(n)?t!=t&&n!=n:sae(t,n,r,o,e,i))},cae=uae;var dae=function(e,t){return cae(e,t)},fae=QX((function(e){return e.ui}),(function(e){return R8[e.activeTab]}),{memoizeOptions:{equalityCheck:dae}}),hae=QX((function(e){return e.ui}),(function(e){return e.activeTab}),{memoizeOptions:{equalityCheck:dae}}),pae=QX((function(e){return e.ui}),(function(e){return e}),{memoizeOptions:{equalityCheck:dae}}),vae=function(e){return function(){var t=qt(Ut().mark((function t(n,r){var o,i,a,s,l,u,c;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.imageFile,i=r(),a=fae(i),(s=new FormData).append("file",o,o.name),s.append("data",JSON.stringify({kind:"init"})),t.next=8,fetch("".concat(window.location.origin,"/upload"),{method:"POST",body:s});case 8:return l=t.sent,t.next=11,l.json();case 11:u=t.sent,c=un({uuid:Xoe(),category:"user"},u),n(Z3({image:c,category:"user"})),"unifiedCanvas"===a?n(y3(c)):"img2img"===a&&n(M4(c));case 15:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()};function gae(){var e=o8().t;return ro("div",{className:"work-in-progress nodes-work-in-progress",children:[no("h1",{children:e("common:nodes")}),no("p",{children:e("common:nodesDesc")})]})}var mae=function(){var e=o8().t;return ro("div",{className:"work-in-progress post-processing-work-in-progress",children:[no("h1",{children:e("common:postProcessing")}),no("p",{children:e("common:postProcessDesc1")}),no("p",{children:e("common:postProcessDesc2")}),no("p",{children:e("common:postProcessDesc3")})]})};function yae(){var e=o8().t;return ro("div",{className:"work-in-progress nodes-work-in-progress",children:[no("h1",{children:e("common:training")}),ro("p",{children:[e("common:trainingDesc1"),no("br",{}),no("br",{}),e("common:trainingDesc2")]})]})}var bae=qv({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:no("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:no("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),wae=qv({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:no("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),kae=qv({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:no("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),xae=qv({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:no("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:no("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})}),Sae=qv({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:no("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),Cae=qv({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:no("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),_ae=Cv((function(e,t){var n=e.tooltip,r=void 0===n?"":n,o=e.styleClass,i=e.tooltipProps,a=e.asCheckbox,s=e.isChecked,l=sn(e,dt);return no(kY,un(un(un({label:r,hasArrow:!0},i),null!=i&&i.placement?{placement:i.placement}:{placement:"top"}),{},{children:no(x_,un({ref:t,className:o?"invokeai__icon-button ".concat(o):"invokeai__icon-button","data-as-checkbox":a,"data-selected":void 0!==s?s:void 0},l))}))})),Eae=Cv((function(e,t){var n=e.children,r=e.tooltip,o=void 0===r?"":r,i=e.tooltipProps,a=e.styleClass,s=sn(e,ft);return no(kY,un(un({label:o},i),{},{children:no(b_,un(un({ref:t,className:["invokeai__button",a].join(" ")},s),{},{children:n}))}))})),Pae=function(e){var t=e.triggerComponent,n=e.children,r=e.styleClass,o=e.hasArrow,i=void 0===o||o,a=sn(e,ht);return ro(qU,un(un({},a),{},{children:[no(nG,{children:t}),ro(eG,{className:"invokeai__popover-content ".concat(r),children:[i&&no(YU,{className:"invokeai__popover-arrow"}),n]})]}))},Lae=QX((function(e){return e.lightbox}),(function(e){return e}),{memoizeOptions:{equalityCheck:dae}}),Oae=/^-?(0\.)?\.?$/,Aae=function(e){var t=e.label,n=e.labelFontSize,r=void 0===n?"sm":n,o=e.styleClass,i=e.isDisabled,a=void 0!==i&&i,s=e.showStepper,l=void 0===s||s,u=e.width,c=e.textAlign,d=e.isInvalid,f=e.value,h=e.onChange,p=e.min,v=e.max,g=e.isInteger,m=void 0===g||g,y=e.formControlProps,b=e.formLabelProps,w=e.numberInputFieldProps,k=e.numberInputStepperProps,x=e.tooltipProps,S=sn(e,pt),C=yn(cr.useState(String(f)),2),_=C[0],E=C[1];cr.useEffect((function(){_.match(Oae)||f===Number(_)||E(String(f))}),[f,_]);return no(kY,un(un({},x),{},{children:ro(I_,un(un({isDisabled:a,isInvalid:d,className:o?"invokeai__number-input-form-control ".concat(o):"invokeai__number-input-form-control"},y),{},{children:[t&&no(V_,un(un({className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:r,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap"},b),{},{children:t})),ro(EU,un(un({className:"invokeai__number-input-root",value:_,min:p,max:v,keepWithinRange:!0,clampValueOnBlur:!1,onChange:function(e){E(e),e.match(Oae)||h(m?Math.floor(Number(e)):Number(e))},onBlur:function(e){var t=JK(m?Math.floor(Number(e.target.value)):Number(e.target.value),p,v);E(String(t)),h(t)},width:u},S),{},{children:[no(LU,un({className:"invokeai__number-input-field",textAlign:c},w)),l&&ro("div",{className:"invokeai__number-input-stepper",children:[no(MU,un(un({},k),{},{className:"invokeai__number-input-stepper-button"})),no(AU,un(un({},k),{},{className:"invokeai__number-input-stepper-button"}))]})]}))]}))}))},Mae=function(e){var t=e.label,n=e.isDisabled,r=e.validValues,o=e.tooltip,i=e.tooltipProps,a=e.size,s=void 0===a?"sm":a,l=e.fontSize,u=void 0===l?"sm":l,c=e.styleClass,d=sn(e,vt);return ro(I_,{isDisabled:n,className:"invokeai__select ".concat(c),onClick:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.cancelBubble=!0},children:[t&&no(V_,{className:"invokeai__select-label",fontSize:u,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),no(kY,un(un({label:o},i),{},{children:no(yG,un(un({className:"invokeai__select-picker",fontSize:u,size:s},d),{},{children:r.map((function(e){return"string"==typeof e||"number"==typeof e?no("option",{value:e,className:"invokeai__select-option",children:e},e):no("option",{value:e.value,className:"invokeai__select-option",children:e.key},e.value)}))}))}))]})},Tae=function(e){return e.postprocessing};var Iae=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n};var Rae=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}},Nae=Rae(),Dae=n1;var zae=Q0;var jae=function(e,t){return function(n,r){if(null==n)return n;if(!zae(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},Bae=jae((function(e,t){return e&&Nae(e,t,Dae)})),Fae=qJ,Hae=uae;var Vae=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new Fae;if(r)var f=r(u,c,l,e,t,d);if(!(void 0===f?Hae(c,u,3,r,d):f))return!1}}return!0},Wae=kK;var Uae=function(e){return e==e&&!Wae(e)},Gae=Uae,qae=n1;var Yae=function(e){for(var t=qae(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Gae(o)]}return t};var Zae=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},Xae=Vae,$ae=Yae,Kae=Zae;var Qae=function(e){var t=$ae(e);return 1==t.length&&t[0][2]?Kae(t[0][0],t[0][1]):function(n){return n===e||Xae(n,e,t)}},Jae=v0,ese=VK,tse=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nse=/^\w*$/;var rse=function(e,t){if(Jae(e))return!1;var n=kn(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ese(e))||(nse.test(e)||!tse.test(e)||null!=t&&e in Object(t))},ose=RJ;function ise(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){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(ise.Cache||ose),n}ise.Cache=ose;var ase=ise;var sse=function(e){var t=ase(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},lse=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,use=/\\(\\)?/g,cse=sse((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(lse,(function(e,n,r,o){t.push(r?o.replace(use,"$1"):n||e)})),t})),dse=cse;var fse=function(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},hse=fse,pse=v0,vse=VK,gse=EK?EK.prototype:void 0,mse=gse?gse.toString:void 0;var yse=function e(t){if("string"==typeof t)return t;if(pse(t))return hse(t,e)+"";if(vse(t))return mse?mse.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},bse=yse;var wse=function(e){return null==e?"":bse(e)},kse=v0,xse=rse,Sse=dse,Cse=wse;var _se=function(e,t){return kse(e)?e:xse(e,t)?[e]:Sse(Cse(e))},Ese=VK;var Pse=function(e){if("string"==typeof e||Ese(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Lse=_se,Ose=Pse;var Ase=function(e,t){for(var n=0,r=(t=Lse(t,e)).length;null!=e&&n<r;)e=e[Ose(t[n++])];return n&&n==r?e:void 0},Mse=Ase;var Tse=function(e,t,n){var r=null==e?void 0:Mse(e,t);return void 0===r?n:r};var Ise=function(e,t){return null!=e&&t in Object(e)},Rse=_se,Nse=p0,Dse=v0,zse=w0,jse=k0,Bse=Pse;var Fse=function(e,t,n){for(var r=-1,o=(t=Rse(t,e)).length,i=!1;++r<o;){var a=Bse(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&jse(o)&&zse(a,o)&&(Dse(e)||Nse(e))},Hse=Ise,Vse=Fse;var Wse=function(e,t){return null!=e&&Vse(e,t,Hse)},Use=uae,Gse=Tse,qse=Wse,Yse=rse,Zse=Uae,Xse=Zae,$se=Pse;var Kse=function(e,t){return Yse(e)&&Zse(t)?Xse($se(e),t):function(n){var r=Gse(n,e);return void 0===r&&r===t?qse(n,e):Use(t,r,3)}};var Qse=function(e){return e};var Jse=function(e){return function(t){return null==t?void 0:t[e]}},ele=Ase;var tle=function(e){return function(t){return ele(t,e)}},nle=Jse,rle=tle,ole=rse,ile=Pse;var ale=function(e){return ole(e)?nle(ile(e)):rle(e)},sle=Qae,lle=Kse,ule=Qse,cle=v0,dle=ale;var fle=function(e){return"function"==typeof e?e:null==e?ule:"object"==kn(e)?cle(e)?lle(e[0],e[1]):sle(e):dle(e)};var hle=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},ple=Iae,vle=Bae,gle=fle,mle=hle,yle=v0;var ble=function(e,t,n){var r=yle(e)?ple:mle,o=arguments.length<3;return r(e,gle(t),n,o,vle)},wle=function(e){return e.system},kle=function(e){return e.system.toastQueue},xle=QX(wle,(function(e){var t=e.model_list,n=ble(t,(function(e,t,n){return"active"===t.status&&(e=n),e}),"");return un(un({},t[n]),{},{name:n})}),{memoizeOptions:{resultEqualityCheck:dae}}),Sle=QX([Tae,wle],(function(e,t){return{facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity,isGFPGANAvailable:t.isGFPGANAvailable}}),{memoizeOptions:{resultEqualityCheck:dae}}),Cle=function(){var e=wie(),t=kie(Sle),n=t.facetoolStrength,r=t.facetoolType,o=t.codeformerFidelity,i=t.isGFPGANAvailable,a=o8().t;return ro(yP,{direction:"column",gap:2,children:[no(Mae,{label:a("parameters:type"),validValues:bte.concat(),value:r,onChange:function(t){return e(i6(t.target.value))}}),no(Aae,{isDisabled:!i,label:a("parameters:strength"),step:.05,min:0,max:1,onChange:function(t){return e(o6(t))},value:n,width:"90px",isInteger:!1}),"codeformer"===r&&no(Aae,{isDisabled:!i,label:a("parameters:codeformerFidelity"),step:.05,min:0,max:1,onChange:function(t){return e(r6(t))},value:o,width:"90px",isInteger:!1})]})},_le=QX([Tae,wle],(function(e,t){return{upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength,isESRGANAvailable:t.isESRGANAvailable}}),{memoizeOptions:{resultEqualityCheck:dae}}),Ele=function(){var e=wie(),t=kie(_le),n=t.upscalingLevel,r=t.upscalingStrength,o=t.isESRGANAvailable,i=o8().t;return ro("div",{className:"upscale-settings",children:[no(Mae,{isDisabled:!o,label:i("parameters:scale"),value:n,onChange:function(t){return e(d6(Number(t.target.value)))},validValues:mte}),no(Aae,{isDisabled:!o,label:i("parameters:strength"),step:.05,min:0,max:1,onChange:function(t){return e(f6(t))},value:r,isInteger:!1})]})},Ple=Object.create,Lle=Object.defineProperty,Ole=Object.getOwnPropertyDescriptor,Ale=Object.getOwnPropertyNames,Mle=Object.getPrototypeOf,Tle=Object.prototype.hasOwnProperty,Ile=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},Rle=function(e,t,n){return n=null!=e?Ple(Mle(e)):{},function(e,t,n,r){if(t&&"object"==kn(t)||"function"==typeof t){var o,i=xn(Ale(t));try{var a=function(){var i=o.value;!Tle.call(e,i)&&i!==n&&Lle(e,i,{get:function(){return t[i]},enumerable:!(r=Ole(t,i))||r.enumerable})};for(i.s();!(o=i.n()).done;)a()}catch(COe){i.e(COe)}finally{i.f()}}return e}(!t&&e&&e.__esModule?n:Lle(n,"default",{value:e,enumerable:!0}),e)},Nle=Ile((function(e,t){t.exports=function(){this.__data__=[],this.size=0}})),Dle=Ile((function(e,t){t.exports=function(e,t){return e===t||e!=e&&t!=t}})),zle=Ile((function(e,t){var n=Dle();t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}})),jle=Ile((function(e,t){var n=zle(),r=Array.prototype.splice;t.exports=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)}})),Ble=Ile((function(e,t){var n=zle();t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}})),Fle=Ile((function(e,t){var n=zle();t.exports=function(e){return n(this.__data__,e)>-1}})),Hle=Ile((function(e,t){var n=zle();t.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}})),Vle=Ile((function(e,t){var n=Nle(),r=jle(),o=Ble(),i=Fle(),a=Hle();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Wle=Ile((function(e,t){var n=Vle();t.exports=function(){this.__data__=new n,this.size=0}})),Ule=Ile((function(e,t){t.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}})),Gle=Ile((function(e,t){t.exports=function(e){return this.__data__.get(e)}})),qle=Ile((function(e,t){t.exports=function(e){return this.__data__.has(e)}})),Yle=Ile((function(e,t){var n="object"==("undefined"==typeof global?"undefined":kn(global))&&global&&global.Object===Object&&global;t.exports=n})),Zle=Ile((function(e,t){var n=Yle(),r="object"==("undefined"==typeof self?"undefined":kn(self))&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o})),Xle=Ile((function(e,t){var n=Zle().Symbol;t.exports=n})),$le=Ile((function(e,t){var n=Xle(),r=Object.prototype,o=r.hasOwnProperty,i=r.toString,a=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(l){}var s=i.call(e);return r&&(t?e[a]=n:delete e[a]),s}})),Kle=Ile((function(e,t){var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}})),Qle=Ile((function(e,t){var n=Xle(),r=$le(),o=Kle(),i=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?r(e):o(e)}})),Jle=Ile((function(e,t){t.exports=function(e){var t=kn(e);return null!=e&&("object"==t||"function"==t)}})),eue=Ile((function(e,t){var n=Qle(),r=Jle();t.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}})),tue=Ile((function(e,t){var n=Zle()["__core-js_shared__"];t.exports=n})),nue=Ile((function(e,t){var n=tue(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=function(e){return!!r&&r in e}})),rue=Ile((function(e,t){var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(r){}}return""}})),oue=Ile((function(e,t){var n=eue(),r=nue(),o=Jle(),i=rue(),a=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,u=s.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||r(e))&&(n(e)?d:a).test(i(e))}})),iue=Ile((function(e,t){t.exports=function(e,t){return null==e?void 0:e[t]}})),aue=Ile((function(e,t){var n=oue(),r=iue();t.exports=function(e,t){var o=r(e,t);return n(o)?o:void 0}})),sue=Ile((function(e,t){var n=aue()(Zle(),"Map");t.exports=n})),lue=Ile((function(e,t){var n=aue()(Object,"create");t.exports=n})),uue=Ile((function(e,t){var n=lue();t.exports=function(){this.__data__=n?n(null):{},this.size=0}})),cue=Ile((function(e,t){t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}})),due=Ile((function(e,t){var n=lue(),r=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0}})),fue=Ile((function(e,t){var n=lue(),r=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:r.call(t,e)}})),hue=Ile((function(e,t){var n=lue();t.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}})),pue=Ile((function(e,t){var n=uue(),r=cue(),o=due(),i=fue(),a=hue();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),vue=Ile((function(e,t){var n=pue(),r=Vle(),o=sue();t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||r),string:new n}}})),gue=Ile((function(e,t){t.exports=function(e){var t=kn(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}})),mue=Ile((function(e,t){var n=gue();t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}})),yue=Ile((function(e,t){var n=mue();t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}})),bue=Ile((function(e,t){var n=mue();t.exports=function(e){return n(this,e).get(e)}})),wue=Ile((function(e,t){var n=mue();t.exports=function(e){return n(this,e).has(e)}})),kue=Ile((function(e,t){var n=mue();t.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}})),xue=Ile((function(e,t){var n=vue(),r=yue(),o=bue(),i=wue(),a=kue();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Sue=Ile((function(e,t){var n=Vle(),r=sue(),o=xue();t.exports=function(e,t){var i=this.__data__;if(i instanceof n){var a=i.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++i.size,this;i=this.__data__=new o(a)}return i.set(e,t),this.size=i.size,this}})),Cue=Ile((function(e,t){var n=Vle(),r=Wle(),o=Ule(),i=Gle(),a=qle(),s=Sue();function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,t.exports=l})),_ue=Ile((function(e,t){t.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}})),Eue=Ile((function(e,t){t.exports=function(e){return this.__data__.has(e)}})),Pue=Ile((function(e,t){var n=xue(),r=_ue(),o=Eue();function i(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}i.prototype.add=i.prototype.push=r,i.prototype.has=o,t.exports=i})),Lue=Ile((function(e,t){t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}})),Oue=Ile((function(e,t){t.exports=function(e,t){return e.has(t)}})),Aue=Ile((function(e,t){var n=Pue(),r=Lue(),o=Oue();t.exports=function(e,t,i,a,s,l){var u=1&i,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,v=!0,g=2&i?new n:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var m=e[p],y=t[p];if(a)var b=u?a(y,m,p,t,e,l):a(m,y,p,e,t,l);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!r(t,(function(e,t){if(!o(g,t)&&(m===e||s(m,e,i,a,l)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!s(m,y,i,a,l)){v=!1;break}}return l.delete(e),l.delete(t),v}})),Mue=Ile((function(e,t){var n=Zle().Uint8Array;t.exports=n})),Tue=Ile((function(e,t){t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}})),Iue=Ile((function(e,t){t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}})),Rue=Ile((function(e,t){var n=Xle(),r=Mue(),o=Dle(),i=Aue(),a=Tue(),s=Iue(),l=n?n.prototype:void 0,u=l?l.valueOf:void 0;t.exports=function(e,t,n,l,c,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&l;if(h||(h=s),e.size!=t.size&&!p)return!1;var v=f.get(e);if(v)return v==t;l|=2,f.set(e,t);var g=i(h(e),h(t),l,c,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}})),Nue=Ile((function(e,t){t.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}})),Due=Ile((function(e,t){var n=Array.isArray;t.exports=n})),zue=Ile((function(e,t){var n=Nue(),r=Due();t.exports=function(e,t,o){var i=t(e);return r(e)?i:n(i,o(e))}})),jue=Ile((function(e,t){t.exports=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}})),Bue=Ile((function(e,t){t.exports=function(){return[]}})),Fue=Ile((function(e,t){var n=jue(),r=Bue(),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(e){return null==e?[]:(e=Object(e),n(i(e),(function(t){return o.call(e,t)})))}:r;t.exports=a})),Hue=Ile((function(e,t){t.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}})),Vue=Ile((function(e,t){t.exports=function(e){return null!=e&&"object"==kn(e)}})),Wue=Ile((function(e,t){var n=Qle(),r=Vue();t.exports=function(e){return r(e)&&"[object Arguments]"==n(e)}})),Uue=Ile((function(e,t){var n=Wue(),r=Vue(),o=Object.prototype,i=o.hasOwnProperty,a=o.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return r(e)&&i.call(e,"callee")&&!a.call(e,"callee")};t.exports=s})),Gue=Ile((function(e,t){t.exports=function(){return!1}})),que=Ile((function(e,t){var n=Zle(),r=Gue(),o="object"==kn(e)&&e&&!e.nodeType&&e,i=o&&"object"==kn(t)&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;t.exports=s})),Yue=Ile((function(e,t){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){var r,o=kn(e);return!!(t=null!==(r=t)&&void 0!==r?r:9007199254740991)&&("number"==o||"symbol"!=o&&n.test(e))&&e>-1&&e%1==0&&e<t}})),Zue=Ile((function(e,t){t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}})),Xue=Ile((function(e,t){var n=Qle(),r=Zue(),o=Vue(),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&r(e.length)&&!!i[n(e)]}})),$ue=Ile((function(e,t){t.exports=function(e){return function(t){return e(t)}}})),Kue=Ile((function(e,t){var n=Yle(),r="object"==kn(e)&&e&&!e.nodeType&&e,o=r&&"object"==kn(t)&&t&&!t.nodeType&&t,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();t.exports=a})),Que=Ile((function(e,t){var n=Xue(),r=$ue(),o=Kue(),i=o&&o.isTypedArray,a=i?r(i):n;t.exports=a})),Jue=Ile((function(e,t){var n=Hue(),r=Uue(),o=Due(),i=que(),a=Yue(),s=Que(),l=Object.prototype.hasOwnProperty;t.exports=function(e,t){var u=o(e),c=!u&&r(e),d=!u&&!c&&i(e),f=!u&&!c&&!d&&s(e),h=u||c||d||f,p=h?n(e.length,String):[],v=p.length;for(var g in e)(t||l.call(e,g))&&(!h||!("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,v)))&&p.push(g);return p}})),ece=Ile((function(e,t){var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}})),tce=Ile((function(e,t){t.exports=function(e,t){return function(n){return e(t(n))}}})),nce=Ile((function(e,t){var n=tce()(Object.keys,Object);t.exports=n})),rce=Ile((function(e,t){var n=ece(),r=nce(),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return r(e);var t=[];for(var i in Object(e))o.call(e,i)&&"constructor"!=i&&t.push(i);return t}})),oce=Ile((function(e,t){var n=eue(),r=Zue();t.exports=function(e){return null!=e&&r(e.length)&&!n(e)}})),ice=Ile((function(e,t){var n=Jue(),r=rce(),o=oce();t.exports=function(e){return o(e)?n(e):r(e)}})),ace=Ile((function(e,t){var n=zue(),r=Fue(),o=ice();t.exports=function(e){return n(e,o,r)}})),sce=Ile((function(e,t){var n=ace(),r=Object.prototype.hasOwnProperty;t.exports=function(e,t,o,i,a,s){var l=1&o,u=n(e),c=u.length;if(c!=n(t).length&&!l)return!1;for(var d=c;d--;){var f=u[d];if(!(l?f in t:r.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<c;){var m=e[f=u[d]],y=t[f];if(i)var b=l?i(y,m,f,t,e,s):i(m,y,f,e,t,s);if(!(void 0===b?m===y||a(m,y,o,i,s):b)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var w=e.constructor,k=t.constructor;w!=k&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k)&&(v=!1)}return s.delete(e),s.delete(t),v}})),lce=Ile((function(e,t){var n=aue()(Zle(),"DataView");t.exports=n})),uce=Ile((function(e,t){var n=aue()(Zle(),"Promise");t.exports=n})),cce=Ile((function(e,t){var n=aue()(Zle(),"Set");t.exports=n})),dce=Ile((function(e,t){var n=aue()(Zle(),"WeakMap");t.exports=n})),fce=Ile((function(e,t){var n=lce(),r=sue(),o=uce(),i=cce(),a=dce(),s=Qle(),l=rue(),u="[object Map]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=l(n),v=l(r),g=l(o),m=l(i),y=l(a),b=s;(n&&b(new n(new ArrayBuffer(1)))!=h||r&&b(new r)!=u||o&&b(o.resolve())!=c||i&&b(new i)!=d||a&&b(new a)!=f)&&(b=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case p:return h;case v:return u;case g:return c;case m:return d;case y:return f}return t}),t.exports=b})),hce=Ile((function(e,t){var n=Cue(),r=Aue(),o=Rue(),i=sce(),a=fce(),s=Due(),l=que(),u=Que(),c="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(e,t,p,v,g,m){var y=s(e),b=s(t),w=y?d:a(e),k=b?d:a(t),x=(w=w==c?f:w)==f,S=(k=k==c?f:k)==f,C=w==k;if(C&&l(e)){if(!l(t))return!1;y=!0,x=!1}if(C&&!x)return m||(m=new n),y||u(e)?r(e,t,p,v,g,m):o(e,t,w,p,v,g,m);if(!(1&p)){var _=x&&h.call(e,"__wrapped__"),E=S&&h.call(t,"__wrapped__");if(_||E){var P=_?e.value():e,L=E?t.value():t;return m||(m=new n),g(P,L,p,v,m)}}return!!C&&(m||(m=new n),i(e,t,p,v,g,m))}})),pce=Ile((function(e,t){var n=hce(),r=Vue();t.exports=function e(t,o,i,a,s){return t===o||(null==t||null==o||!r(t)&&!r(o)?t!=t&&o!=o:n(t,o,i,a,e,s))}})),vce=Ile((function(e,t){var n=pce();t.exports=function(e,t){return n(e,t)}})),gce=["ctrl","shift","alt","meta","mod"],mce={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function yce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return"string"==typeof e?e.split(t):e}function bce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",n=e.toLocaleLowerCase().split(t).map((function(e){return e.trim()})).map((function(e){return mce[e]||e})),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},o=n.filter((function(e){return!gce.includes(e)}));return un(un({},r),{},{keys:o})}function wce(e){var t=e.target,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t&&t.tagName;return n instanceof Array?Boolean(r&&n&&n.some((function(e){return e.toLowerCase()===r.toLowerCase()}))):Boolean(r&&n&&!0===n)}var kce=cr.createContext(void 0),xce=cr.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Sce=Rle(vce());var Cce=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function _ce(e,t,n,r){var o=cr.useRef(null),i=cr.useRef(new Set).current,a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=cr.useCallback(t,cn(s)),u=function(e){var t=cr.useRef(void 0);return(0,Sce.default)(t.current,e)||(t.current=e),t.current}(a),c=cr.useContext(xce).enabledScopes,d=cr.useContext(kce);return cr.useLayoutEffect((function(){if(!1!==(null==u?void 0:u.enabled)&&function(e,t){return 0===e.length&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!t||e.some((function(e){return t.includes(e)}))||e.includes("*")}(c,null==u?void 0:u.scopes)){var t=function(t){if(!function(e){return wce(e,["input","textarea","select"])}(t)||wce(t,null==u?void 0:u.enableOnFormTags)){var n;if(null!==o.current&&document.activeElement!==o.current&&!o.current.contains(document.activeElement))return void Cce(t);(null===(n=t.target)||void 0===n?void 0:n.isContentEditable)&&(null==u||!u.enableOnContentEditable)||yce(e,null==u?void 0:u.splitKey).forEach((function(e){var n,r=bce(e,null==u?void 0:u.combinationKey);if(function(e,t,n){var r=t.alt,o=t.ctrl,i=t.meta,a=t.mod,s=t.shift,l=t.keys,u=e.altKey,c=e.ctrlKey,d=e.metaKey,f=e.shiftKey,h=e.key,p=e.code.toLowerCase().replace("key",""),v=h.toLowerCase();if(u!==r&&"alt"!==v||f!==s&&"shift"!==v)return!1;if(a){if(!d&&!c)return!1}else if(d!==i&&"meta"!==p||c!==o&&"ctrl"!==p)return!1;return!(!l||1!==l.length||!l.includes(v)&&!l.includes(p))||(l?l.every((function(e){return n.has(e)})):!l)}(t,r,i)||null!==(n=r.keys)&&void 0!==n&&n.includes("*")){if(function(e,t,n){("function"==typeof n&&n(e,t)||!0===n)&&e.preventDefault()}(t,r,null==u?void 0:u.preventDefault),!function(e,t,n){return"function"==typeof n?n(e,t):!0===n||void 0===n}(t,r,null==u?void 0:u.enabled))return void Cce(t);l(t,r)}}))}},n=function(e){i.add(e.key.toLowerCase()),(void 0===(null==u?void 0:u.keydown)&&!0!==(null==u?void 0:u.keyup)||(null==u?void 0:u.keydown))&&t(e)},r=function(e){"meta"!==e.key.toLowerCase()?i.delete(e.key.toLowerCase()):i.clear(),(null==u?void 0:u.keyup)&&t(e)};return(o.current||document).addEventListener("keyup",r),(o.current||document).addEventListener("keydown",n),d&&yce(e,null==u?void 0:u.splitKey).forEach((function(e){return d.addHotkey(bce(e,null==u?void 0:u.combinationKey))})),function(){(o.current||document).removeEventListener("keyup",r),(o.current||document).removeEventListener("keydown",n),d&&yce(e,null==u?void 0:u.splitKey).forEach((function(e){return d.removeHotkey(bce(e,null==u?void 0:u.combinationKey))}))}}}),[e,l,u,c]),o}Rle(vce());var Ece=new Set;window.addEventListener("DOMContentLoaded",(function(){document.addEventListener("keydown",(function(e){!function(e){(Array.isArray(e)?e:[e]).forEach((function(e){return Ece.add(bce(e))}))}(e.key)})),document.addEventListener("keyup",(function(e){!function(e){(Array.isArray(e)?e:[e]).forEach((function(e){var t,n=bce(e),r=xn(Ece);try{for(r.s();!(t=r.n()).done;){var o,i=t.value;(null===(o=i.keys)||void 0===o?void 0:o.every((function(e){var t;return null===(t=n.keys)||void 0===t?void 0:t.includes(e)})))&&Ece.delete(i)}}catch(COe){r.e(COe)}finally{r.f()}}))}(e.key)}))}));var Pce={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Lce=qr.createContext&&qr.createContext(Pce),Oce=globalThis&&globalThis.__assign||function(){return Oce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Oce.apply(this,arguments)},Ace=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Mce(e){return e&&e.map((function(e,t){return qr.createElement(e.tag,Oce({key:t},e.attr),Mce(e.child))}))}function Tce(e){return function(t){return qr.createElement(Ice,Oce({attr:Oce({},e.attr)},t),Mce(e.child))}}function Ice(e){var t=function(t){var n,r=e.attr,o=e.size,i=e.title,a=Ace(e,["attr","size","title"]),s=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),qr.createElement("svg",Oce({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:n,style:Oce(Oce({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&qr.createElement("title",null,i),e.children)};return void 0!==Lce?qr.createElement(Lce.Consumer,null,(function(e){return t(e)})):t(Pce)}function Rce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function Nce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function Dce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function zce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function jce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function Bce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function Fce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function Hce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function Vce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function Wce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function Uce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function Gce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function qce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function Yce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function Zce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function Xce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function $ce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function Kce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function Qce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function Jce(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function ede(e){return Tce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function tde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function nde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function rde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function ode(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function ide(e){return Tce({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function ade(e){return Tce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function sde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function lde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function ude(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function cde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function dde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function fde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function hde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function pde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function vde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function gde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function mde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function yde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function bde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function wde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function kde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function xde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function Sde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Cde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function _de(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Ede(e){return Tce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function Pde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}var Lde=function(e){return e.canvas},Ode=QX([Lde,fae,wle],(function(e,t,n){return e.layerState.stagingArea.images.length>0||"unifiedCanvas"===t&&n.isProcessing})),Ade=function(e){return e.canvas.layerState.objects.find(B5)},Mde=function(e){return e.gallery},Tde=QX([Mde,Lae,Ode,fae],(function(e,t,n,r){var o=e.categories,i=e.currentCategory,a=e.currentImageUuid,s=e.shouldPinGallery,l=e.shouldShowGallery,u=e.galleryScrollPosition,c=e.galleryImageMinimumWidth,d=e.galleryImageObjectFit,f=e.shouldHoldGalleryOpen,h=e.shouldAutoSwitchToNewImages,p=e.galleryWidth,v=e.shouldUseSingleGalleryColumn,g=t.isLightboxOpen;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:c,galleryImageObjectFit:d,galleryGridTemplateColumns:v?"auto":"repeat(auto-fill, minmax(".concat(c,"px, auto))"),activeTabName:r,shouldHoldGalleryOpen:f,shouldAutoSwitchToNewImages:h,images:o[i].images,areMoreImagesAvailable:o[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:p,isLightboxOpen:g,isStaging:n,shouldEnableResize:!(g||"unifiedCanvas"===r&&s),shouldUseSingleGalleryColumn:v}}),{memoizeOptions:{resultEqualityCheck:dae}}),Ide=QX([Mde,wle,Lae,fae],(function(e,t,n,r){return{mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}}),{memoizeOptions:{resultEqualityCheck:dae}}),Rde=QX(wle,(function(e){return{shouldConfirmOnDelete:e.shouldConfirmOnDelete,isConnected:e.isConnected,isProcessing:e.isProcessing}}),{memoizeOptions:{resultEqualityCheck:dae}}),Nde=cr.forwardRef((function(e,t){var n=e.image,r=e.children,o=GE(),i=o.isOpen,a=o.onOpen,s=o.onClose,l=wie(),u=kie(Rde),c=u.shouldConfirmOnDelete,d=u.isConnected,f=u.isProcessing,h=cr.useRef(null),p=function(){d&&!f&&n&&l(eie(n)),s()};_ce("delete",(function(){c?a():p()}),[n,c]);return ro(to,{children:[cr.cloneElement(r,{onClick:n?function(e){e.stopPropagation(),c?a():p()}:void 0,ref:t}),no(oU,{isOpen:i,leastDestructiveRef:h,onClose:s,children:no(rU,{children:ro(iU,{className:"modal",children:[no(tU,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),no(YW,{children:ro(yP,{direction:"column",gap:5,children:[no(jP,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),no(I_,{children:ro(yP,{alignItems:"center",children:[no(V_,{mb:0,children:"Don't ask me again"}),no(Cq,{checked:!c,onChange:function(e){return l(f8(!e.target.checked))}})]})})]})}),ro(eU,{children:[no(b_,{ref:h,onClick:s,className:"modal-close-btn",children:"Cancel"}),no(b_,{colorScheme:"red",onClick:p,ml:3,children:"Delete"})]})]})})})]})}));Nde.displayName="DeleteImageModal";var Dde=QX([wle,Mde,Tae,pae,Lae,fae],(function(e,t,n,r,o,i){var a=e.isProcessing,s=e.isConnected,l=e.isGFPGANAvailable,u=e.isESRGANAvailable,c=n.upscalingLevel,d=n.facetoolStrength,f=o.isLightboxOpen,h=r.shouldShowImageDetails,p=t.intermediateImage,v=t.currentImage;return{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u,upscalingLevel:c,facetoolStrength:d,shouldDisableToolbarButtons:Boolean(p)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:i,isLightboxOpen:f}}),{memoizeOptions:{resultEqualityCheck:dae}}),zde=function(){var e,t,n,r,o,i,a=wie(),s=kie(Dde),l=s.isProcessing,u=s.isConnected,c=s.isGFPGANAvailable,d=s.isESRGANAvailable,f=s.upscalingLevel,h=s.facetoolStrength,p=s.shouldDisableToolbarButtons,v=s.shouldShowImageDetails,g=s.currentImage,m=s.isLightboxOpen,y=s.activeTabName,b=cY(),w=o8().t,k=function(){g&&(m&&a(p4(!1)),a(M4(g)),a(z8("img2img")))},x=function(){var e=qt(Ut().mark((function e(){var t,n;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,fetch(g.url).then((function(e){return e.blob()}));case 4:return t=e.sent,n=[new ClipboardItem(gn({},t.type,t))],e.next=8,navigator.clipboard.write(n);case 8:b({title:w("toast:imageCopied"),status:"success",duration:2500,isClosable:!0});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();_ce("shift+i",(function(){g?(k(),b({title:w("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):b({title:w("toast:imageNotLoaded"),description:w("toast:imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})}),[g]);var S=function(){var e,t;g&&(g.metadata&&a(E4(g.metadata)),"img2img"===(null===(e=g.metadata)||void 0===e?void 0:e.image.type)?a(z8("img2img")):"txt2img"===(null===(t=g.metadata)||void 0===t?void 0:t.image.type)&&a(z8("txt2img")))};_ce("a",(function(){var e,t;["txt2img","img2img"].includes(null==g||null===(e=g.metadata)||void 0===e||null===(t=e.image)||void 0===t?void 0:t.type)?(S(),b({title:w("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})):b({title:w("toast:parametersNotSet"),description:w("toast:parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[g]);var C=function(){(null==g?void 0:g.metadata)&&a(W4(g.metadata.image.seed))};_ce("s",(function(){var e,t;null!=g&&null!==(e=g.metadata)&&void 0!==e&&null!==(t=e.image)&&void 0!==t&&t.seed?(C(),b({title:w("toast:seedSet"),status:"success",duration:2500,isClosable:!0})):b({title:w("toast:seedNotSet"),description:w("toast:seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[g]);var _=function(){var e,t;if(null!=g&&null!==(e=g.metadata)&&void 0!==e&&null!==(t=e.image)&&void 0!==t&&t.prompt){var n,r,o=yn(m4(null==g||null===(n=g.metadata)||void 0===n||null===(r=n.image)||void 0===r?void 0:r.prompt),2),i=o[0],s=o[1];i&&a(N4(i)),a(D4(s||""))}};_ce("p",(function(){var e,t;null!=g&&null!==(e=g.metadata)&&void 0!==e&&null!==(t=e.image)&&void 0!==t&&t.prompt?(_(),b({title:w("toast:promptSet"),status:"success",duration:2500,isClosable:!0})):b({title:w("toast:promptNotSet"),description:w("toast:promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[g]);var E=function(){g&&a(Qoe(g))};_ce("Shift+U",(function(){d&&!p&&u&&!l&&f?E():b({title:w("toast:upscalingFailed"),status:"error",duration:2500,isClosable:!0})}),[g,d,p,u,l,f]);var P=function(){g&&a(Joe(g))};_ce("Shift+R",(function(){c&&!p&&u&&!l&&h?P():b({title:w("toast:faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})}),[g,c,p,u,l,h]);var L=function(){return a(U8(!v))};_ce("i",(function(){g?L():b({title:w("toast:metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})}),[g,v]);return ro("div",{className:"current-image-options",children:[ro(k_,{isAttached:!0,children:[no(Pae,{trigger:"hover",triggerComponent:no(_ae,{"aria-label":"".concat(w("parameters:sendTo"),"..."),icon:no(bde,{})}),children:ro("div",{className:"current-image-send-to-popover",children:[no(Eae,{size:"sm",onClick:k,leftIcon:no(wde,{}),children:w("parameters:sendToImg2Img")}),no(Eae,{size:"sm",onClick:function(){g&&(m&&a(p4(!1)),a(y3(g)),a(m3(!0)),"unifiedCanvas"!==y&&a(z8("unifiedCanvas")),b({title:w("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))},leftIcon:no(wde,{}),children:w("parameters:sendToUnifiedCanvas")}),no(Eae,{size:"sm",onClick:x,leftIcon:no(qce,{}),children:w("parameters:copyImage")}),no(Eae,{size:"sm",onClick:function(){navigator.clipboard.writeText(g?window.location.toString()+g.url:"").then((function(){b({title:w("toast:imageLinkCopied"),status:"success",duration:2500,isClosable:!0})}))},leftIcon:no(qce,{}),children:w("parameters:copyImageToLink")}),no(CP,{download:!0,href:null==g?void 0:g.url,children:no(Eae,{leftIcon:no(Xce,{}),size:"sm",w:"100%",children:w("parameters:downloadImage")})})]})}),no(_ae,{icon:no(Qce,{}),tooltip:"".concat(w(m?"parameters:closeViewer":"parameters:openInViewer")," (Z)"),"aria-label":"".concat(w(m?"parameters:closeViewer":"parameters:openInViewer")," (Z)"),"data-selected":m,onClick:function(){a(p4(!m))}})]}),ro(k_,{isAttached:!0,children:[no(_ae,{icon:no(pde,{}),tooltip:"".concat(w("parameters:usePrompt")," (P)"),"aria-label":"".concat(w("parameters:usePrompt")," (P)"),isDisabled:!(null!=g&&null!==(e=g.metadata)&&void 0!==e&&null!==(t=e.image)&&void 0!==t&&t.prompt),onClick:_}),no(_ae,{icon:no(yde,{}),tooltip:"".concat(w("parameters:useSeed")," (S)"),"aria-label":"".concat(w("parameters:useSeed")," (S)"),isDisabled:!(null!=g&&null!==(n=g.metadata)&&void 0!==n&&null!==(r=n.image)&&void 0!==r&&r.seed),onClick:C}),no(_ae,{icon:no(Vce,{}),tooltip:"".concat(w("parameters:useAll")," (A)"),"aria-label":"".concat(w("parameters:useAll")," (A)"),isDisabled:!["txt2img","img2img"].includes(null==g||null===(o=g.metadata)||void 0===o||null===(i=o.image)||void 0===i?void 0:i.type),onClick:S})]}),ro(k_,{isAttached:!0,children:[no(Pae,{trigger:"hover",triggerComponent:no(_ae,{icon:no(rde,{}),"aria-label":w("parameters:restoreFaces")}),children:ro("div",{className:"current-image-postprocessing-popover",children:[no(Cle,{}),no(Eae,{isDisabled:!(c&&g&&u&&!l&&h),onClick:P,children:w("parameters:restoreFaces")})]})}),no(Pae,{trigger:"hover",triggerComponent:no(_ae,{icon:no(Kce,{}),"aria-label":w("parameters:upscale")}),children:ro("div",{className:"current-image-postprocessing-popover",children:[no(Ele,{}),no(Eae,{isDisabled:!(d&&g&&u&&!l&&f),onClick:E,children:w("parameters:upscaleImage")})]})})]}),no(k_,{isAttached:!0,children:no(_ae,{icon:no(Gce,{}),tooltip:"".concat(w("parameters:info")," (I)"),"aria-label":"".concat(w("parameters:info")," (I)"),"data-selected":v,onClick:L})}),no(Nde,{image:g,children:no(_ae,{icon:no(Sde,{}),tooltip:"".concat(w("parameters:deleteImage")," (Del)"),"aria-label":"".concat(w("parameters:deleteImage")," (Del)"),isDisabled:!g||!u||l,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};qv({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),qv({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),qv({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"}),qv({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"}),qv({displayName:"SunIcon",path:qr.createElement("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor"},qr.createElement("circle",{cx:"12",cy:"12",r:"5"}),qr.createElement("path",{d:"M12 1v2"}),qr.createElement("path",{d:"M12 21v2"}),qr.createElement("path",{d:"M4.22 4.22l1.42 1.42"}),qr.createElement("path",{d:"M18.36 18.36l1.42 1.42"}),qr.createElement("path",{d:"M1 12h2"}),qr.createElement("path",{d:"M21 12h2"}),qr.createElement("path",{d:"M4.22 19.78l1.42-1.42"}),qr.createElement("path",{d:"M18.36 5.64l1.42-1.42"}))}),qv({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"}),qv({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:qr.createElement("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})}),qv({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"}),qv({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}),qv({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"}),qv({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"}),qv({displayName:"ViewIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),qr.createElement("circle",{cx:"12",cy:"12",r:"2"}))}),qv({displayName:"ViewOffIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),qr.createElement("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"}))}),qv({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});var jde=qv({displayName:"DeleteIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"}))});qv({displayName:"RepeatIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),qr.createElement("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"}))}),qv({displayName:"RepeatClockIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),qr.createElement("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"}))});var Bde=qv({displayName:"EditIcon",path:qr.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},qr.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),qr.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});qv({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"}),qv({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"}),qv({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),qv({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),qv({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"}),qv({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"}),qv({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"}),qv({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"}),qv({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Fde=qv({displayName:"ExternalLinkIcon",path:qr.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},qr.createElement("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),qr.createElement("path",{d:"M15 3h6v6"}),qr.createElement("path",{d:"M10 14L21 3"}))});function Hde(e){return Tce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}qv({displayName:"LinkIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),qr.createElement("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"}))}),qv({displayName:"PlusSquareIcon",path:qr.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},qr.createElement("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),qr.createElement("path",{d:"M12 8v8"}),qr.createElement("path",{d:"M8 12h8"}))}),qv({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}),qv({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"}),qv({displayName:"TimeIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),qr.createElement("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"}))}),qv({displayName:"ArrowRightIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),qr.createElement("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"}))}),qv({displayName:"ArrowLeftIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),qr.createElement("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"}))}),qv({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"}),qv({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"}),qv({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"}),qv({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"}),qv({displayName:"EmailIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),qr.createElement("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"}))}),qv({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"}),qv({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"}),qv({displayName:"SpinnerIcon",path:qr.createElement(qr.Fragment,null,qr.createElement("defs",null,qr.createElement("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a"},qr.createElement("stop",{stopColor:"currentColor",offset:"0%"}),qr.createElement("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"}))),qr.createElement("g",{transform:"translate(2)",fill:"none"},qr.createElement("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),qr.createElement("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),qr.createElement("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})))}),qv({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),qv({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:qr.createElement("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})}),qv({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"}),qv({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"}),qv({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"}),qv({displayName:"InfoOutlineIcon",path:qr.createElement("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2"},qr.createElement("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),qr.createElement("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),qr.createElement("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"}))}),qv({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}),qv({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"}),qv({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"}),qv({displayName:"QuestionOutlineIcon",path:qr.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},qr.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),qr.createElement("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),qr.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"}))}),qv({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"}),qv({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),qv({viewBox:"0 0 14 14",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))}),qv({displayName:"MinusIcon",path:qr.createElement("g",{fill:"currentColor"},qr.createElement("rect",{height:"4",width:"20",x:"2",y:"10"}))}),qv({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});var Vde=function(e){var t=e.label,n=e.value,r=e.onClick,o=e.isLink,i=e.labelPosition,a=e.withCopy,s=void 0!==a&&a;return ro(yP,{gap:2,children:[r&&no(kY,{label:"Recall ".concat(t),children:no(x_,{"aria-label":"Use this parameter",icon:no(Hde,{}),size:"xs",variant:"ghost",fontSize:20,onClick:r})}),s&&no(kY,{label:"Copy ".concat(t),children:no(x_,{"aria-label":"Copy ".concat(t),icon:no(qce,{}),size:"xs",variant:"ghost",fontSize:14,onClick:function(){return navigator.clipboard.writeText(n.toString())}})}),ro(yP,{direction:i?"column":"row",children:[ro(jP,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[t,":"]}),o?ro(CP,{href:n.toString(),isExternal:!0,wordBreak:"break-all",children:[n.toString()," ",no(Fde,{mx:"2px"})]}):no(jP,{overflowY:"scroll",wordBreak:"break-all",children:n.toString()})]})]})},Wde=cr.memo((function(e){var t,n,r=e.image,o=e.styleClass,i=wie();_ce("esc",(function(){i(U8(!1))}));var a=(null==r||null===(t=r.metadata)||void 0===t?void 0:t.image)||{},s=null==r?void 0:r.dreamPrompt,l=a.cfg_scale,u=a.fit,c=a.height,d=a.hires_fix,f=a.init_image_path,h=a.mask_image_path,p=a.orig_path,v=a.perlin,g=a.postprocessing,m=a.prompt,y=a.sampler,b=a.scale,w=a.seamless,k=a.seed,x=a.steps,S=a.strength,C=a.threshold,_=a.type,E=a.variations,P=a.width,L=JSON.stringify(r.metadata,null,2);return no("div",{className:"image-metadata-viewer ".concat(o),children:ro(yP,{gap:1,direction:"column",width:"100%",children:[ro(yP,{gap:2,children:[no(jP,{fontWeight:"semibold",children:"File:"}),ro(CP,{href:r.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[r.url.length>64?r.url.substring(0,64).concat("..."):r.url,no(Fde,{mx:"2px"})]})]}),Object.keys(a).length>0?ro(to,{children:[_&&no(Vde,{label:"Generation type",value:_}),(null===(n=r.metadata)||void 0===n?void 0:n.model_weights)&&no(Vde,{label:"Model",value:r.metadata.model_weights}),["esrgan","gfpgan"].includes(_)&&no(Vde,{label:"Original image",value:p}),"gfpgan"===_&&void 0!==S&&no(Vde,{label:"Fix faces strength",value:S,onClick:function(){return i(o6(S))}}),"esrgan"===_&&void 0!==b&&no(Vde,{label:"Upscaling scale",value:b,onClick:function(){return i(d6(b))}}),"esrgan"===_&&void 0!==S&&no(Vde,{label:"Upscaling strength",value:S,onClick:function(){return i(f6(S))}}),m&&no(Vde,{label:"Prompt",labelPosition:"top",value:g4(m),onClick:function(){return i(N4(m))}}),void 0!==k&&no(Vde,{label:"Seed",value:k,onClick:function(){return i(W4(k))}}),void 0!==C&&no(Vde,{label:"Noise Threshold",value:C,onClick:function(){return i(X4(C))}}),void 0!==v&&no(Vde,{label:"Perlin Noise",value:v,onClick:function(){return i(R4(v))}}),y&&no(Vde,{label:"Sampler",value:y,onClick:function(){return i(z4(y))}}),x&&no(Vde,{label:"Steps",value:x,onClick:function(){return i(Z4(x))}}),void 0!==l&&no(Vde,{label:"CFG scale",value:l,onClick:function(){return i(P4(l))}}),E&&E.length>0&&no(Vde,{label:"Seed-weight pairs",value:w4(E),onClick:function(){return i(U4(w4(E)))}}),w&&no(Vde,{label:"Seamless",value:w,onClick:function(){return i(B4(w))}}),d&&no(Vde,{label:"High Resolution Optimization",value:d,onClick:function(){return i(a6(d))}}),P&&no(Vde,{label:"Width",value:P,onClick:function(){return i(Q4(P))}}),c&&no(Vde,{label:"Height",value:c,onClick:function(){return i(L4(c))}}),f&&no(Vde,{label:"Initial image",value:f,isLink:!0,onClick:function(){return i(M4(f))}}),h&&no(Vde,{label:"Mask image",value:h,isLink:!0,onClick:function(){return i(I4(h))}}),"img2img"===_&&S&&no(Vde,{label:"Image to image strength",value:S,onClick:function(){return i(O4(S))}}),u&&no(Vde,{label:"Image to image fit",value:u,onClick:function(){return i(G4(u))}}),g&&g.length>0&&ro(to,{children:[no(xP,{size:"sm",children:"Postprocessing"}),g.map((function(e,t){if("esrgan"===e.type){var n=e.scale,r=e.strength;return ro(yP,{pl:"2rem",gap:1,direction:"column",children:[no(jP,{size:"md",children:"".concat(t+1,": Upscale (ESRGAN)")}),no(Vde,{label:"Scale",value:n,onClick:function(){return i(d6(n))}}),no(Vde,{label:"Strength",value:r,onClick:function(){return i(f6(r))}})]},t)}if("gfpgan"===e.type){var o=e.strength;return ro(yP,{pl:"2rem",gap:1,direction:"column",children:[no(jP,{size:"md",children:"".concat(t+1,": Face restoration (GFPGAN)")}),no(Vde,{label:"Strength",value:o,onClick:function(){i(o6(o)),i(i6("gfpgan"))}})]},t)}if("codeformer"===e.type){var a=e.strength,s=e.fidelity;return ro(yP,{pl:"2rem",gap:1,direction:"column",children:[no(jP,{size:"md",children:"".concat(t+1,": Face restoration (Codeformer)")}),no(Vde,{label:"Strength",value:a,onClick:function(){i(o6(a)),i(i6("codeformer"))}}),s&&no(Vde,{label:"Fidelity",value:s,onClick:function(){i(r6(s)),i(i6("codeformer"))}})]},t)}}))]}),s&&no(Vde,{withCopy:!0,label:"Dream Prompt",value:s}),ro(yP,{gap:2,direction:"column",children:[ro(yP,{gap:2,children:[no(kY,{label:"Copy metadata JSON",children:no(x_,{"aria-label":"Copy metadata JSON",icon:no(qce,{}),size:"xs",variant:"ghost",fontSize:14,onClick:function(){return navigator.clipboard.writeText(L)}})}),no(jP,{fontWeight:"semibold",children:"Metadata JSON:"})]}),no("div",{className:"image-json-viewer",children:no("pre",{children:L})})]})]}):no(hP,{width:"100%",pt:10,children:no(jP,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})}),(function(e,t){return e.image.uuid===t.image.uuid}));Wde.displayName="ImageMetadataViewer";var Ude=QX([Mde,pae],(function(e,t){var n=e.currentCategory,r=e.currentImage,o=e.intermediateImage,i=t.shouldShowImageDetails,a=e.categories[r?r.category:"result"].images,s=a.findIndex((function(t){var n;return t.uuid===(null==e||null===(n=e.currentImage)||void 0===n?void 0:n.uuid)})),l=a.length;return{imageToDisplay:o||r,isIntermediate:Boolean(o),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:0===s,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:i,shouldShowPrevImageButton:0===s,shouldShowNextImageButton:!isNaN(s)&&s===l-1}}),{memoizeOptions:{resultEqualityCheck:dae}});function Gde(){var e=wie(),t=kie(Ude),n=t.isOnFirstImage,r=t.isOnLastImage,o=t.shouldShowImageDetails,i=t.imageToDisplay,a=t.isIntermediate,s=yn(cr.useState(!1),2),l=s[0],u=s[1],c=function(){u(!0)},d=function(){u(!1)};return ro("div",{className:"current-image-preview",children:[i&&no(c_,{src:i.url,width:i.width,height:i.height,style:{imageRendering:a?"pixelated":"initial"}}),!o&&ro("div",{className:"current-image-next-prev-buttons",children:[no("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:c,onMouseOut:d,children:l&&!n&&no(x_,{"aria-label":"Previous image",icon:no(zce,{className:"next-prev-button"}),variant:"unstyled",onClick:function(){e(t4())}})}),no("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:c,onMouseOut:d,children:l&&!r&&no(x_,{"aria-label":"Next image",icon:no(jce,{className:"next-prev-button"}),variant:"unstyled",onClick:function(){e(e4())}})})]}),o&&i&&no(Wde,{image:i,styleClass:"current-image-metadata"})]})}var qde,Yde,Zde=globalThis&&globalThis.__extends||(qde=function(e,t){return qde=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qde(e,t)},function(e,t){function n(){this.constructor=e}qde(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Xde=globalThis&&globalThis.__assign||function(){return Xde=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xde.apply(this,arguments)},$de={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Kde={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Qde={width:"20px",height:"20px",position:"absolute"},Jde={top:Xde(Xde({},$de),{top:"-5px"}),right:Xde(Xde({},Kde),{left:void 0,right:"-5px"}),bottom:Xde(Xde({},$de),{top:void 0,bottom:"-5px"}),left:Xde(Xde({},Kde),{left:"-5px"}),topRight:Xde(Xde({},Qde),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Xde(Xde({},Qde),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Xde(Xde({},Qde),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Xde(Xde({},Qde),{left:"-10px",top:"-10px",cursor:"nw-resize"})},efe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return Zde(t,e),t.prototype.render=function(){return cr.createElement("div",{className:this.props.className||"",style:Xde(Xde({position:"absolute",userSelect:"none"},Jde[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(cr.PureComponent),tfe=globalThis&&globalThis.__extends||(Yde=function(e,t){return Yde=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Yde(e,t)},function(e,t){function n(){this.constructor=e}Yde(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),nfe=globalThis&&globalThis.__assign||function(){return nfe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nfe.apply(this,arguments)},rfe={width:"auto",height:"auto"},ofe=function(e,t,n){return Math.max(Math.min(e,n),t)},ife=function(e,t){return Math.round(e/t)*t},afe=function(e,t){return new RegExp(e,"i").test(t)},sfe=function(e){return Boolean(e.touches&&e.touches.length)},lfe=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},ufe=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},cfe=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},dfe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],ffe="__resizable_base__",hfe=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(ffe):t.className+=ffe,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return tfe(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||rfe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return ufe(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ufe(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ufe(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&afe("left",i),s=o&&afe("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,u=s.lockAspectRatioExtraHeight,c=s.lockAspectRatioExtraWidth,d=a.width,f=a.height,h=u||0,p=c||0;return afe("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+h)),afe("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+h)),afe("bottom",i)&&(f=a.height+(t-a.y)*r/n,l&&(d=(f-h)*this.ratio+p)),afe("top",i)&&(f=a.height-(t-a.y)*r/n,l&&(d=(f-h)*this.ratio+p)),{newWidth:d,newHeight:f}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,u=void 0===n.width||n.width<0?e:n.width,c=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,f=a||0,h=s||0;if(i){var p=(c-f)*this.ratio+h,v=(d-f)*this.ratio+h,g=(l-h)/this.ratio+f,m=(u-h)/this.ratio+f,y=Math.max(l,p),b=Math.min(u,v),w=Math.max(c,g),k=Math.min(d,m);e=ofe(e,y,b),t=ofe(t,w,k)}else e=ofe(e,l,u),t=ofe(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&sfe(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:nfe(nfe({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&sfe(e))try{e.preventDefault(),e.stopPropagation()}catch(Dhe){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=sfe(e)?e.touches[0].clientX:e.clientX,l=sfe(e)?e.touches[0].clientY:e.clientY,u=this.state,c=u.direction,d=u.original,f=u.width,h=u.height,p=this.getParentSize(),v=function(e,t,n,r,o,i,a){return r=cfe(r,e.width,t,n),o=cfe(o,e.height,t,n),i=cfe(i,e.width,t,n),a=cfe(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(p,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=v.maxWidth,o=v.maxHeight,i=v.minWidth,a=v.minHeight;var g=this.calculateNewSizeFromDirection(s,l),m=g.newHeight,y=g.newWidth,b=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(y=lfe(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=lfe(m,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,m,{width:b.maxWidth,height:b.maxHeight},{width:i,height:a});if(y=w.newWidth,m=w.newHeight,this.props.grid){var k=ife(y,this.props.grid[0]),x=ife(m,this.props.grid[1]),S=this.props.snapGap||0;y=0===S||Math.abs(k-y)<=S?k:y,m=0===S||Math.abs(x-m)<=S?x:m}var C={width:y-d.width,height:m-d.height};if(f&&"string"==typeof f)if(f.endsWith("%"))y=y/p.width*100+"%";else if(f.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))m=m/p.height*100+"%";else if(h.endsWith("vw")){m=m/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){m=m/this.window.innerHeight*100+"vh"}var _={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(m,"height")};"row"===this.flexDir?_.flexBasis=_.width:"column"===this.flexDir&&(_.flexBasis=_.height),QO.flushSync((function(){t.setState(_)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:nfe(nfe({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?cr.createElement(efe,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},s&&s[t]?s[t]:null):null}));return cr.createElement("div",{className:a,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==dfe.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=nfe(nfe(nfe({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return cr.createElement(r,nfe({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&cr.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(cr.PureComponent),pfe=function(e){var t=e.label,n=e.styleClass,r=sn(e,gt);return no(wE,un(un({className:"invokeai__checkbox ".concat(n)},r),{},{children:t}))};function vfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 11H6.414l5.293-5.293-1.414-1.414L2.586 12l7.707 7.707 1.414-1.414L6.414 13H21z"}}]})(e)}function gfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function mfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function yfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function bfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function wfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function kfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}function xfe(e){var t=yn(cr.useState(!1),2),n=t[0],r=t[1],o=e.label,i=e.value,a=e.min,s=void 0===a?1:a,l=e.max,u=void 0===l?100:l,c=e.step,d=void 0===c?1:c,f=e.onChange,h=e.width,p=void 0===h?"100%":h,v=e.tooltipSuffix,g=void 0===v?"":v,m=e.withSliderMarks,y=void 0!==m&&m,b=e.sliderMarkLeftOffset,w=void 0===b?0:b,k=e.sliderMarkRightOffset,x=void 0===k?-7:k,S=e.withInput,C=void 0!==S&&S,_=e.isInteger,E=void 0!==_&&_,P=e.inputWidth,L=void 0===P?"5.5rem":P,O=e.inputReadOnly,A=void 0!==O&&O,M=e.withReset,T=void 0!==M&&M,I=e.hideTooltip,R=void 0!==I&&I,N=e.isCompact,D=void 0!==N&&N,z=e.handleReset,j=e.isResetDisabled,B=e.isSliderDisabled,F=e.isInputDisabled,H=e.styleClass,V=e.sliderFormControlProps,W=e.sliderFormLabelProps,U=e.sliderMarkProps,G=e.sliderTrackProps,q=e.sliderThumbProps,Y=e.sliderNumberInputProps,Z=e.sliderNumberInputFieldProps,X=e.sliderNumberInputStepperProps,$=e.sliderTooltipProps,K=e.sliderIAIIconButtonProps,Q=sn(e,mt),J=yn(cr.useState(String(i)),2),ee=J[0],te=J[1];cr.useEffect((function(){te(i)}),[i]);var ne=cr.useMemo((function(){return null!=Y&&Y.max?Y.max:u}),[u,null==Y?void 0:Y.max]);return ro(I_,un(un({className:H?"invokeai__slider-component ".concat(H):"invokeai__slider-component","data-markers":y,style:D?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{}},V),{},{children:[no(V_,un(un({className:"invokeai__slider-component-label"},W),{},{children:o})),ro(DP,{w:"100%",gap:2,alignItems:"center",children:[ro(mq,un(un({"aria-label":o,value:i,min:s,max:u,step:d,onChange:function(e){f(e)},onMouseEnter:function(){return r(!0)},onMouseLeave:function(){return r(!1)},focusThumbOnChange:!1,isDisabled:B,width:p},Q),{},{children:[y&&ro(to,{children:[no(kq,un(un({value:s,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:w},U),{},{children:s})),no(kq,un(un({value:u,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:x},U),{},{children:u}))]}),no(bq,un(un({className:"invokeai__slider_track"},G),{},{children:no(wq,{className:"invokeai__slider_track-filled"})})),no(kY,un(un({hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:n,label:"".concat(i).concat(g),hidden:R},$),{},{children:no(yq,un({className:"invokeai__slider-thumb"},q))}))]})),C&&ro(EU,un(un({min:s,max:ne,step:d,value:ee,onChange:function(e){te(e)},onBlur:function(e){""===e.target.value&&(e.target.value=String(s));var t=JK(E?Math.floor(Number(e.target.value)):Number(ee),s,ne);f(t)},className:"invokeai__slider-number-field",isDisabled:F},Y),{},{children:[no(LU,un({className:"invokeai__slider-number-input",width:L,readOnly:A,minWidth:L},Z)),ro(PU,un(un({},X),{},{children:[no(MU,{onClick:function(){return f(Number(ee))},className:"invokeai__slider-number-stepper"}),no(AU,{onClick:function(){return f(Number(ee))},className:"invokeai__slider-number-stepper"})]}))]})),T&&no(_ae,un({size:"sm","aria-label":"Reset",tooltip:"Reset",icon:no(mfe,{}),onClick:function(){z&&z()},isDisabled:j},K))]})]}))}function Sfe(e){return Tce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function Cfe(e){return Tce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function _fe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"}}]})(e)}function Efe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function Pfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function Lfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function Ofe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function Afe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function Mfe(e){return Tce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}function Tfe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ife=!1,Rfe=qr.createContext(null),Nfe=function(e){return e.scrollTop},Dfe="unmounted",zfe="exited",jfe="entering",Bfe="entered",Ffe="exiting",Hfe=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=zfe,r.appearStatus=jfe):o=Bfe:o=t.unmountOnExit||t.mountOnEnter?Dfe:zfe,r.state={status:o},r.nextCallback=null,r}qH(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Dfe?{status:zfe}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==jfe&&n!==Bfe&&(t=jfe):n!==jfe&&n!==Bfe||(t=Ffe)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===jfe){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:oH.findDOMNode(this);n&&Nfe(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zfe&&this.setState({status:Dfe})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[oH.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Ife?this.safeSetState({status:Bfe},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:jfe},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Bfe},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:oH.findDOMNode(this);t&&!Ife?(this.props.onExit(r),this.safeSetState({status:Ffe},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:zfe},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:zfe},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:oH.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Dfe)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=CH(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return qr.createElement(Rfe.Provider,{value:null},"function"==typeof n?n(e,r):qr.cloneElement(qr.Children.only(n),r))},t}(qr.Component);function Vfe(){}Hfe.contextType=Rfe,Hfe.propTypes={},Hfe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vfe,onEntering:Vfe,onEntered:Vfe,onExit:Vfe,onExiting:Vfe,onExited:Vfe},Hfe.UNMOUNTED=Dfe,Hfe.EXITED=zfe,Hfe.ENTERING=jfe,Hfe.ENTERED=Bfe,Hfe.EXITING=Ffe;var Wfe=Hfe,Ufe=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))},Gfe=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Tfe(n.className,r):n.setAttribute("class",Tfe(n.className&&n.className.baseVal||"",r)));var n,r}))},qfe=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}qH(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&Nfe(e),r&&(this.appliedClasses[t][n]=r,Ufe(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&Gfe(e,r),o&&Gfe(e,o),i&&Gfe(e,i)},n.render=function(){var e=this.props;e.classNames;var t=CH(e,["classNames"]);return qr.createElement(Wfe,ps({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(qr.Component);qfe.defaultProps={classNames:""},qfe.propTypes={};var Yfe=qfe;function Zfe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.checkForDefaultPrevented,o=void 0===r||r;return function(n){if(null==e||e(n),!1===o||!n.defaultPrevented)return null==t?void 0:t(n)}}function Xfe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];function r(t,r){var o=cr.createContext(r),i=n.length;function a(t){var n=t.scope,r=t.children,a=sn(t,yt),s=(null==n?void 0:n[e][i])||o,l=cr.useMemo((function(){return a}),Object.values(a));return cr.createElement(s.Provider,{value:l},r)}return n=[].concat(cn(n),[r]),a.displayName=t+"Provider",[a,function(n,a){var s=(null==a?void 0:a[e][i])||o,l=cr.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error("`".concat(n,"` must be used within `").concat(t,"`"))}]}var o=function(){var t=n.map((function(e){return cr.createContext(e)}));return function(n){var r=(null==n?void 0:n[e])||t;return cr.useMemo((function(){return gn({},"__scope".concat(e),un(un({},n),{},gn({},e,r)))}),[n,r])}};return o.scopeName=e,[r,$fe.apply(void 0,[o].concat(cn(t)))]}function $fe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if(1===t.length)return r;var o=function(){var e=t.map((function(e){return{useScope:e(),scopeName:e.scopeName}}));return function(t){var n=e.reduce((function(e,n){var r=n.useScope,o=n.scopeName,i=r(t)["__scope".concat(o)];return un(un({},e),i)}),{});return cr.useMemo((function(){return gn({},"__scope".concat(r.scopeName),n)}),[n])}};return o.scopeName=r.scopeName,o}function Kfe(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Qfe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.forEach((function(t){return Kfe(t,e)}))}}function Jfe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cr.useCallback(Qfe.apply(void 0,t),t)}var ehe=cr.forwardRef((function(e,t){var n=e.children,r=sn(e,bt),o=cr.Children.toArray(n),i=o.find(rhe);if(i){var a=i.props.children,s=o.map((function(e){return e===i?cr.Children.count(a)>1?cr.Children.only(null):cr.isValidElement(a)?a.props.children:null:e}));return cr.createElement(the,ps({},r,{ref:t}),cr.isValidElement(a)?cr.cloneElement(a,void 0,s):null)}return cr.createElement(the,ps({},r,{ref:t}),n)}));ehe.displayName="Slot";var the=cr.forwardRef((function(e,t){var n=e.children,r=sn(e,wt);return cr.isValidElement(n)?cr.cloneElement(n,un(un({},function(e,t){var n=un({},t),r=function(){var r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=function(){i.apply(void 0,arguments),r.apply(void 0,arguments)}:r&&(n[o]=r):"style"===o?n[o]=un(un({},r),i):"className"===o&&(n[o]=[r,i].filter(Boolean).join(" "))};for(var o in t)r();return un(un({},e),n)}(r,n.props)),{},{ref:Qfe(t,n.ref)})):cr.Children.count(n)>1?cr.Children.only(null):null}));the.displayName="SlotClone";var nhe=function(e){var t=e.children;return cr.createElement(cr.Fragment,null,t)};function rhe(e){return cr.isValidElement(e)&&e.type===nhe}var ohe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((function(e,t){var n=cr.forwardRef((function(e,n){var r=e.asChild,o=sn(e,kt),i=r?ehe:t;return cr.useEffect((function(){window[Symbol.for("radix-ui")]=!0}),[]),cr.createElement(i,ps({},o,{ref:n}))}));return n.displayName="Primitive.".concat(t),un(un({},e),{},gn({},t,n))}),{});function ihe(e,t){e&&QO.flushSync((function(){return e.dispatchEvent(t)}))}function ahe(e){var t=e+"CollectionProvider",n=yn(Xfe(t),2),r=n[0],o=n[1],i=yn(r(t,{collectionRef:{current:null},itemMap:new Map}),2),a=i[0],s=i[1],l=e+"CollectionSlot",u=e+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:function(e){var t=e.scope,n=e.children,r=qr.useRef(null),o=qr.useRef(new Map).current;return qr.createElement(a,{scope:t,itemMap:o,collectionRef:r},n)},Slot:qr.forwardRef((function(e,t){var n=e.scope,r=e.children,o=Jfe(t,s(l,n).collectionRef);return qr.createElement(ehe,{ref:o},r)})),ItemSlot:qr.forwardRef((function(e,t){var n,r=e.scope,o=e.children,i=sn(e,xt),a=qr.useRef(null),l=Jfe(t,a),d=s(u,r);return qr.useEffect((function(){return d.itemMap.set(a,un({ref:a},i)),function(){d.itemMap.delete(a)}})),qr.createElement(ehe,(gn(n={},c,""),gn(n,"ref",l),n),o)}))},function(t){var n=s(e+"CollectionConsumer",t),r=qr.useCallback((function(){var e=n.collectionRef.current;if(!e)return[];var t=Array.from(e.querySelectorAll("[".concat(c,"]"))),r=Array.from(n.itemMap.values()).sort((function(e,n){return t.indexOf(e.ref.current)-t.indexOf(n.ref.current)}));return r}),[n.collectionRef,n.itemMap]);return r},o]}var she=cr.createContext(void 0);function lhe(e){var t=cr.useContext(she);return e||t||"ltr"}function uhe(e){var t=cr.useRef(e);return cr.useEffect((function(){t.current=e})),cr.useMemo((function(){return function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(n=t.current)||void 0===n?void 0:(e=n).call.apply(e,[t].concat(o))}}),[])}var che,dhe="dismissableLayer.update",fhe="dismissableLayer.pointerDownOutside",hhe="dismissableLayer.focusOutside",phe=cr.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vhe=cr.forwardRef((function(e,t){var n,r=e.disableOutsidePointerEvents,o=void 0!==r&&r,i=e.onEscapeKeyDown,a=e.onPointerDownOutside,s=e.onFocusOutside,l=e.onInteractOutside,u=e.onDismiss,c=sn(e,St),d=cr.useContext(phe),f=yn(cr.useState(null),2),h=f[0],p=f[1],v=null!==(n=null==h?void 0:h.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,g=yn(cr.useState({}),2)[1],m=Jfe(t,(function(e){return p(e)})),y=Array.from(d.layers),b=yn(cn(d.layersWithOutsidePointerEventsDisabled).slice(-1),1)[0],w=y.indexOf(b),k=h?y.indexOf(h):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=k>=w,C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document,n=uhe(e),r=cr.useRef(!1),o=cr.useRef((function(){}));return cr.useEffect((function(){var e=function(e){if(e.target&&!r.current){var i=function(){mhe(fhe,n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=i,t.addEventListener("click",o.current,{once:!0})):i()}r.current=!1},i=window.setTimeout((function(){t.addEventListener("pointerdown",e)}),0);return function(){window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:function(){return r.current=!0}}}((function(e){var t=e.target,n=cn(d.branches).some((function(e){return e.contains(t)}));S&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),v),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document,n=uhe(e),r=cr.useRef(!1);return cr.useEffect((function(){var e=function(e){e.target&&!r.current&&mhe(hhe,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),function(){return t.removeEventListener("focusin",e)}}),[t,n]),{onFocusCapture:function(){return r.current=!0},onBlurCapture:function(){return r.current=!1}}}((function(e){var t=e.target;cn(d.branches).some((function(e){return e.contains(t)}))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())}),v);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document,n=uhe(e);cr.useEffect((function(){var e=function(e){"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),function(){return t.removeEventListener("keydown",e)}}),[n,t])}((function(e){k===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),v),cr.useEffect((function(){if(h)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(che=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),ghe(),function(){o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(v.body.style.pointerEvents=che)}}),[h,v,o,d]),cr.useEffect((function(){return function(){h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),ghe())}}),[h,d]),cr.useEffect((function(){var e=function(){return g({})};return document.addEventListener(dhe,e),function(){return document.removeEventListener(dhe,e)}}),[]),cr.createElement(ohe.div,ps({},c,{ref:m,style:un({pointerEvents:x?S?"auto":"none":void 0},e.style),onFocusCapture:Zfe(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Zfe(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Zfe(e.onPointerDownCapture,C.onPointerDownCapture)}))}));function ghe(){var e=new CustomEvent(dhe);document.dispatchEvent(e)}function mhe(e,t,n,r){var o=r.discrete,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?ihe(i,a):i.dispatchEvent(a)}var yhe=0;function bhe(){var e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var whe="focusScope.autoFocusOnMount",khe="focusScope.autoFocusOnUnmount",xhe={bubbles:!1,cancelable:!0},She=cr.forwardRef((function(e,t){var n=e.loop,r=void 0!==n&&n,o=e.trapped,i=void 0!==o&&o,a=e.onMountAutoFocus,s=e.onUnmountAutoFocus,l=sn(e,Ct),u=yn(cr.useState(null),2),c=u[0],d=u[1],f=uhe(a),h=uhe(s),p=cr.useRef(null),v=Jfe(t,(function(e){return d(e)})),g=cr.useRef({paused:!1,pause:function(){this.paused=!0},resume:function(){this.paused=!1}}).current;cr.useEffect((function(){if(i){var e=function(e){if(!g.paused&&c){var t=e.target;c.contains(t)?p.current=t:Lhe(p.current,{select:!0})}},t=function(e){!g.paused&&c&&(c.contains(e.relatedTarget)||Lhe(p.current,{select:!0}))};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),function(){document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[i,c,g.paused]),cr.useEffect((function(){if(c){Ahe.add(g);var e=document.activeElement;if(!c.contains(e)){var t=new CustomEvent(whe,xhe);c.addEventListener(whe,f),c.dispatchEvent(t),t.defaultPrevented||(!function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.select,o=void 0!==r&&r,i=document.activeElement,a=xn(e);try{for(a.s();!(t=a.n()).done;){if(Lhe(t.value,{select:o}),document.activeElement!==i)return}}catch(COe){a.e(COe)}finally{a.f()}}((n=Che(c),n.filter((function(e){return"A"!==e.tagName}))),{select:!0}),document.activeElement===e&&Lhe(c))}return function(){c.removeEventListener(whe,f),setTimeout((function(){var t=new CustomEvent(khe,xhe);c.addEventListener(khe,h),c.dispatchEvent(t),t.defaultPrevented||Lhe(null!=e?e:document.body,{select:!0}),c.removeEventListener(khe,h),Ahe.remove(g)}),0)}}var n}),[c,f,h,g]);var m=cr.useCallback((function(e){if((r||i)&&!g.paused){var t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){var o=e.currentTarget,a=function(e){var t=Che(e),n=_he(t,e),r=_he(t.reverse(),e);return[n,r]}(o),s=yn(a,2),l=s[0],u=s[1];l&&u?e.shiftKey||n!==u?e.shiftKey&&n===l&&(e.preventDefault(),r&&Lhe(u,{select:!0})):(e.preventDefault(),r&&Lhe(l,{select:!0})):n===o&&e.preventDefault()}}}),[r,i,g.paused]);return cr.createElement(ohe.div,ps({tabIndex:-1},l,{ref:v,onKeyDown:m}))}));function Che(e){for(var t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});n.nextNode();)t.push(n.currentNode);return t}function _he(e,t){var n,r=xn(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!Ehe(o,{upTo:t}))return o}}catch(COe){r.e(COe)}finally{r.f()}}function Ehe(e,t){var n=t.upTo;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Phe(e){return e instanceof HTMLInputElement&&"select"in e}function Lhe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.select,r=void 0!==n&&n;if(e&&e.focus){var o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Phe(e)&&r&&e.select()}}var Ohe,Ahe=(Ohe=[],{add:function(e){var t=Ohe[0];e!==t&&(null==t||t.pause()),(Ohe=Mhe(Ohe,e)).unshift(e)},remove:function(e){var t;null===(t=(Ohe=Mhe(Ohe,e))[0])||void 0===t||t.resume()}});function Mhe(e,t){var n=cn(e),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var The=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?cr.useLayoutEffect:function(){},Ihe=Yr["useId".toString()]||function(){},Rhe=0;function Nhe(e){return e.split("-")[0]}function Dhe(e){return e.split("-")[1]}function zhe(e){return["top","bottom"].includes(Nhe(e))?"x":"y"}function jhe(e){return"y"===e?"height":"width"}function Bhe(e,t,n){var r,o=e.reference,i=e.floating,a=o.x+o.width/2-i.width/2,s=o.y+o.height/2-i.height/2,l=zhe(t),u=jhe(l),c=o[u]/2-i[u]/2,d="x"===l;switch(Nhe(t)){case"top":r={x:a,y:o.y-i.height};break;case"bottom":r={x:a,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:s};break;case"left":r={x:o.x-i.width,y:s};break;default:r={x:o.x,y:o.y}}switch(Dhe(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}var Fhe=function(){var e=qt(Ut().mark((function e(t,n,r){var o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S,C,_,E,P,L;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.placement,i=void 0===o?"bottom":o,a=r.strategy,s=void 0===a?"absolute":a,l=r.middleware,u=void 0===l?[]:l,c=r.platform,e.next=9,null==c.isRTL?void 0:c.isRTL(n);case 9:return d=e.sent,e.next=12,c.getElementRects({reference:t,floating:n,strategy:s});case 12:f=e.sent,h=Bhe(f,i,d),p=h.x,v=h.y,g=i,m={},y=0,b=0;case 20:if(!(b<u.length)){e.next=55;break}return k=u[b],x=k.name,S=k.fn,e.next=26,S({x:p,y:v,initialPlacement:i,placement:g,strategy:s,middlewareData:m,rects:f,platform:c,elements:{reference:t,floating:n}});case 26:if(C=e.sent,_=C.x,E=C.y,P=C.data,L=C.reset,p=null!=_?_:p,v=null!=E?E:v,m=un(un({},m),{},gn({},x,un(un({},m[x]),P))),e.t0=L&&y<=50,!e.t0){e.next=52;break}if(y++,e.t1="object"==kn(L),!e.t1){e.next=51;break}if(L.placement&&(g=L.placement),e.t2=L.rects,!e.t2){e.next=50;break}if(!0!==L.rects){e.next=48;break}return e.next=45,c.getElementRects({reference:t,floating:n,strategy:s});case 45:e.t3=e.sent,e.next=49;break;case 48:e.t3=L.rects;case 49:f=e.t3;case 50:w=Bhe(f,g,d),p=w.x,v=w.y;case 51:b=-1;case 52:b++,e.next=20;break;case 55:return e.abrupt("return",{x:p,y:v,placement:g,strategy:s,middlewareData:m});case 56:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();function Hhe(e){return"number"!=typeof e?function(e){return un({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function Vhe(e){return un(un({},e),{},{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Whe(e,t){return Uhe.apply(this,arguments)}function Uhe(){return Uhe=qt(Ut().mark((function e(t,n){var r,o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n={}),o=t.x,i=t.y,a=t.platform,s=t.rects,l=t.elements,u=t.strategy,d=(c=n).boundary,f=void 0===d?"clippingAncestors":d,h=c.rootBoundary,p=void 0===h?"viewport":h,v=c.elementContext,g=void 0===v?"floating":v,m=c.altBoundary,y=void 0!==m&&m,b=c.padding,w=Hhe(void 0===b?0:b),k=l[y?"floating"===g?"reference":"floating":g],e.t0=Vhe,e.t1=a,e.next=24,null==a.isElement?void 0:a.isElement(k);case 24:if(e.t3=r=e.sent,e.t2=null==e.t3,e.t2){e.next=28;break}e.t2=r;case 28:if(!e.t2){e.next=32;break}e.t4=k,e.next=38;break;case 32:if(e.t5=k.contextElement,e.t5){e.next=37;break}return e.next=36,null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating);case 36:e.t5=e.sent;case 37:e.t4=e.t5;case 38:return e.t6=e.t4,e.t7=f,e.t8=p,e.t9=u,e.t10={element:e.t6,boundary:e.t7,rootBoundary:e.t8,strategy:e.t9},e.next=45,e.t1.getClippingRect.call(e.t1,e.t10);case 45:if(e.t11=e.sent,x=(0,e.t0)(e.t11),e.t12=Vhe,!a.convertOffsetParentRelativeRectToViewportRelativeRect){e.next=61;break}return e.t14=a,e.t15="floating"===g?un(un({},s.floating),{},{x:o,y:i}):s.reference,e.next=53,null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating);case 53:return e.t16=e.sent,e.t17=u,e.t18={rect:e.t15,offsetParent:e.t16,strategy:e.t17},e.next=58,e.t14.convertOffsetParentRelativeRectToViewportRelativeRect.call(e.t14,e.t18);case 58:e.t13=e.sent,e.next=62;break;case 61:e.t13=s[g];case 62:return e.t19=e.t13,S=(0,e.t12)(e.t19),e.abrupt("return",{top:x.top-S.top+w.top,bottom:S.bottom-x.bottom+w.bottom,left:x.left-S.left+w.left,right:S.right-x.right+w.right});case 65:case"end":return e.stop()}}),e)}))),Uhe.apply(this,arguments)}var Ghe=Math.min,qhe=Math.max;function Yhe(e,t,n){return qhe(e,Ghe(t,n))}var Zhe=function(e){return{name:"arrow",options:e,fn:function(t){return qt(Ut().mark((function n(){var r,o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S,C,_,E,P,L,O,A,M;return Ut().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(i=null!=e?e:{}).element,s=i.padding,l=void 0===s?0:s,u=t.x,c=t.y,d=t.placement,f=t.rects,h=t.platform,null!=a){n.next=3;break}return n.abrupt("return",{});case 3:return p=Hhe(l),v={x:u,y:c},g=zhe(d),m=Dhe(d),y=jhe(g),n.next=10,h.getDimensions(a);case 10:return b=n.sent,w="y"===g?"top":"left",k="y"===g?"bottom":"right",x=f.reference[y]+f.reference[g]-v[g]-f.floating[y],S=v[g]-f.reference[g],n.next=17,null==h.getOffsetParent?void 0:h.getOffsetParent(a);case 17:return C=n.sent,0===(_=C?"y"===g?C.clientHeight||0:C.clientWidth||0:0)&&(_=f.floating[y]),E=x/2-S/2,P=p[w],L=_-b[y]-p[k],O=_/2-b[y]/2+E,A=Yhe(P,O,L),M=("start"===m?p[w]:p[k])>0&&O!==A&&f.reference[y]<=f.floating[y],n.abrupt("return",(gn(o={},g,v[g]-(M?O<P?P-O:L-O:0)),gn(o,"data",(gn(r={},g,A),gn(r,"centerOffset",O-A),r)),o));case 22:case"end":return n.stop()}}),n)})))()}}},Xhe={left:"right",right:"left",bottom:"top",top:"bottom"};function $he(e){return e.replace(/left|right|bottom|top/g,(function(e){return Xhe[e]}))}function Khe(e,t,n){void 0===n&&(n=!1);var r=Dhe(e),o=zhe(e),i=jhe(o),a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=$he(a)),{main:a,cross:$he(a)}}var Qhe={start:"end",end:"start"};function Jhe(e){return e.replace(/start|end/g,(function(e){return Qhe[e]}))}var epe=["top","right","bottom","left"];epe.reduce((function(e,t){return e.concat(t,t+"-start",t+"-end")}),[]);var tpe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn:function(t){return qt(Ut().mark((function n(){var r,o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S,C,_,E,P,L,O,A,M,T,I,R,N,D;return Ut().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.placement,i=t.middlewareData,a=t.rects,s=t.initialPlacement,l=t.platform,u=t.elements,d=(c=e).mainAxis,f=void 0===d||d,h=c.crossAxis,p=void 0===h||h,v=c.fallbackPlacements,g=c.fallbackStrategy,m=void 0===g?"bestFit":g,y=c.flipAlignment,b=void 0===y||y,w=sn(c,_t),k=Nhe(o),x=v||(k!==s&&b?function(e){var t=$he(e);return[Jhe(e),t,Jhe(t)]}(s):[$he(s)]),S=[s].concat(cn(x)),n.next=22,Whe(t,w);case 22:if(C=n.sent,_=[],E=(null==(r=i.flip)?void 0:r.overflows)||[],f&&_.push(C[k]),!p){n.next=36;break}return n.t0=Khe,n.t1=o,n.t2=a,n.next=31,null==l.isRTL?void 0:l.isRTL(u.floating);case 31:n.t3=n.sent,P=(0,n.t0)(n.t1,n.t2,n.t3),L=P.main,O=P.cross,_.push(C[L],C[O]);case 36:if(E=[].concat(cn(E),[{placement:o,overflows:_}]),_.every((function(e){return e<=0}))){n.next=50;break}if(T=(null!=(A=null==(M=i.flip)?void 0:M.index)?A:0)+1,!(I=S[T])){n.next=40;break}return n.abrupt("return",{data:{index:T,overflows:E},reset:{placement:I}});case 40:R="bottom",n.t4=m,n.next="bestFit"===n.t4?44:"initialPlacement"===n.t4?47:48;break;case 44:return D=null==(N=E.map((function(e){return[e,e.overflows.filter((function(e){return e>0})).reduce((function(e,t){return e+t}),0)]})).sort((function(e,t){return e[1]-t[1]}))[0])?void 0:N[0].placement,D&&(R=D),n.abrupt("break",48);case 47:R=s;case 48:if(o===R){n.next=50;break}return n.abrupt("return",{reset:{placement:R}});case 50:return n.abrupt("return",{});case 51:case"end":return n.stop()}}),n)})))()}}};function npe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rpe(e){return epe.some((function(t){return e[t]>=0}))}var ope=function(e){var t=void 0===e?{}:e,n=t.strategy,r=void 0===n?"referenceHidden":n,o=sn(t,Et);return{name:"hide",fn:function(e){return qt(Ut().mark((function t(){var n,i,a;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.rects,t.t0=r,t.next="referenceHidden"===t.t0?4:"escaped"===t.t0?11:18;break;case 4:return t.t1=npe,t.next=7,Whe(e,un(un({},o),{},{elementContext:"reference"}));case 7:return t.t2=t.sent,t.t3=n.reference,i=(0,t.t1)(t.t2,t.t3),t.abrupt("return",{data:{referenceHiddenOffsets:i,referenceHidden:rpe(i)}});case 11:return t.t4=npe,t.next=14,Whe(e,un(un({},o),{},{altBoundary:!0}));case 14:return t.t5=t.sent,t.t6=n.floating,a=(0,t.t4)(t.t5,t.t6),t.abrupt("return",{data:{escapedOffsets:a,escaped:rpe(a)}});case 18:return t.abrupt("return",{});case 19:case"end":return t.stop()}}),t)})))()}}},ipe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,fn:function(t){return qt(Ut().mark((function n(){var r,o,i;return Ut().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.x,o=t.y,n.next=4,function(){var e=qt(Ut().mark((function e(t,n){var r,o,i,a,s,l,u,c,d,f,h,p,v,g;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.placement,o=t.platform,i=t.elements,e.next=5,null==o.isRTL?void 0:o.isRTL(i.floating);case 5:return a=e.sent,s=Nhe(r),l=Dhe(r),u="x"===zhe(r),c=["left","top"].includes(s)?-1:1,d=a&&u?-1:1,f="function"==typeof n?n(t):n,h="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:un({mainAxis:0,crossAxis:0,alignmentAxis:null},f),p=h.mainAxis,v=h.crossAxis,g=h.alignmentAxis,e.abrupt("return",(l&&"number"==typeof g&&(v="end"===l?-1*g:g),u?{x:v*d,y:p*c}:{x:p*c,y:v*d}));case 14:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,e);case 4:return i=n.sent,n.abrupt("return",{x:r+i.x,y:o+i.y,data:i});case 6:case"end":return n.stop()}}),n)})))()}}};function ape(e){return"x"===e?"y":"x"}var spe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn:function(t){return qt(Ut().mark((function n(){var r,o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S;return Ut().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.x,i=t.y,a=t.placement,l=(s=e).mainAxis,u=void 0===l||l,c=s.crossAxis,d=void 0!==c&&c,f=s.limiter,h=void 0===f?{fn:function(e){return{x:e.x,y:e.y}}}:f,p=sn(s,Pt),v={x:o,y:i},n.next=14,Whe(t,p);case 14:return g=n.sent,m=zhe(Nhe(a)),y=ape(m),b=v[m],w=v[y],u&&(k="y"===m?"bottom":"right",b=Yhe(b+g["y"===m?"top":"left"],b,b-g[k])),d&&(x="y"===y?"bottom":"right",w=Yhe(w+g["y"===y?"top":"left"],w,w-g[x])),S=h.fn(un(un({},t),{},(gn(r={},m,b),gn(r,y,w),r))),n.abrupt("return",un(un({},S),{},{data:{x:S.x-o,y:S.y-i}}));case 22:case"end":return n.stop()}}),n)})))()}}},lpe=function(e){return void 0===e&&(e={}),{options:e,fn:function(t){var n,r=t.x,o=t.y,i=t.placement,a=t.rects,s=t.middlewareData,l=e,u=l.offset,c=void 0===u?0:u,d=l.mainAxis,f=void 0===d||d,h=l.crossAxis,p=void 0===h||h,v={x:r,y:o},g=zhe(i),m=ape(g),y=v[g],b=v[m],w="function"==typeof c?c(un(un({},a),{},{placement:i})):c,k="number"==typeof w?{mainAxis:w,crossAxis:0}:un({mainAxis:0,crossAxis:0},w);if(f){var x="y"===g?"height":"width",S=a.reference[g]-a.floating[x]+k.mainAxis,C=a.reference[g]+a.reference[x]-k.mainAxis;y<S?y=S:y>C&&(y=C)}if(p){var _,E,P,L,O="y"===g?"width":"height",A=["top","left"].includes(Nhe(i)),M=a.reference[m]-a.floating[O]+(A&&null!=(_=null==(E=s.offset)?void 0:E[m])?_:0)+(A?0:k.crossAxis),T=a.reference[m]+a.reference[O]+(A?0:null!=(P=null==(L=s.offset)?void 0:L[m])?P:0)-(A?k.crossAxis:0);b<M?b=M:b>T&&(b=T)}return gn(n={},g,y),gn(n,m,b),n}}};function upe(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function cpe(e){if(null==e)return window;if(!upe(e)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function dpe(e){return cpe(e).getComputedStyle(e)}function fpe(e){return upe(e)?"":e?(e.nodeName||"").toLowerCase():""}function hpe(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function ppe(e){return e instanceof cpe(e).HTMLElement}function vpe(e){return e instanceof cpe(e).Element}function gpe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof cpe(e).ShadowRoot||e instanceof ShadowRoot)}function mpe(e){var t=dpe(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ype(e){return["table","td","th"].includes(fpe(e))}function bpe(e){var t=/firefox/i.test(hpe()),n=dpe(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function wpe(){return!/^((?!chrome|android).)*safari/i.test(hpe())}var kpe=Math.min,xpe=Math.max,Spe=Math.round;function Cpe(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);var s=e.getBoundingClientRect(),l=1,u=1;t&&ppe(e)&&(l=e.offsetWidth>0&&Spe(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Spe(s.height)/e.offsetHeight||1);var c=vpe(e)?cpe(e):window,d=!wpe()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/u,p=s.width/l,v=s.height/u;return{width:p,height:v,top:h,right:f+p,bottom:h+v,left:f,x:f,y:h}}function _pe(e){return(t=e,(t instanceof cpe(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Epe(e){return vpe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ppe(e){return Cpe(_pe(e)).left+Epe(e).scrollLeft}function Lpe(e,t,n){var r=ppe(t),o=_pe(t),i=Cpe(e,r&&function(e){var t=Cpe(e);return Spe(t.width)!==e.offsetWidth||Spe(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==fpe(t)||mpe(o))&&(a=Epe(t)),ppe(t)){var l=Cpe(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=Ppe(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Ope(e){return"html"===fpe(e)?e:e.assignedSlot||e.parentNode||(gpe(e)?e.host:null)||_pe(e)}function Ape(e){return ppe(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Mpe(e){for(var t=cpe(e),n=Ape(e);n&&ype(n)&&"static"===getComputedStyle(n).position;)n=Ape(n);return n&&("html"===fpe(n)||"body"===fpe(n)&&"static"===getComputedStyle(n).position&&!bpe(n))?t:n||function(e){var t=Ope(e);for(gpe(t)&&(t=t.host);ppe(t)&&!["html","body"].includes(fpe(t));){if(bpe(t))return t;t=t.parentNode}return null}(e)||t}function Tpe(e){if(ppe(e))return{width:e.offsetWidth,height:e.offsetHeight};var t=Cpe(e);return{width:t.width,height:t.height}}function Ipe(e){var t=Ope(e);return["html","body","#document"].includes(fpe(t))?e.ownerDocument.body:ppe(t)&&mpe(t)?t:Ipe(t)}function Rpe(e,t){var n;void 0===t&&(t=[]);var r=Ipe(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=cpe(r),a=o?[i].concat(i.visualViewport||[],mpe(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Rpe(a))}function Npe(e,t,n){return"viewport"===t?Vhe(function(e,t){var n=cpe(e),r=_pe(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=wpe();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n)):vpe(t)?function(e,t){var n=Cpe(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):Vhe(function(e){var t,n=_pe(e),r=Epe(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=xpe(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=xpe(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ppe(e),l=-r.scrollTop;return"rtl"===dpe(o||n).direction&&(s+=xpe(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(_pe(e)))}function Dpe(e){var t=Rpe(e),n=["absolute","fixed"].includes(dpe(e).position)&&ppe(e)?Mpe(e):e;return vpe(n)?t.filter((function(e){return vpe(e)&&function(e,t){var n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&gpe(n)){var r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}(e,n)&&"body"!==fpe(e)})):[]}var zpe={getClippingRect:function(e){var t=e.element,n=e.boundary,r=e.rootBoundary,o=e.strategy,i=[].concat(cn("clippingAncestors"===n?Dpe(t):[].concat(n)),[r]),a=i[0],s=i.reduce((function(e,n){var r=Npe(t,n,o);return e.top=xpe(r.top,e.top),e.right=kpe(r.right,e.right),e.bottom=kpe(r.bottom,e.bottom),e.left=xpe(r.left,e.left),e}),Npe(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){var t=e.rect,n=e.offsetParent,r=e.strategy,o=ppe(n),i=_pe(n);if(n===i)return t;var a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==fpe(n)||mpe(i))&&(a=Epe(n)),ppe(n))){var l=Cpe(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return un(un({},t),{},{x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y})},isElement:vpe,getDimensions:Tpe,getOffsetParent:Mpe,getDocumentElement:_pe,getElementRects:function(e){var t=e.reference,n=e.floating,r=e.strategy;return{reference:Lpe(t,Mpe(n),r),floating:un(un({},Tpe(n)),{},{x:0,y:0})}},getClientRects:function(e){return Array.from(e.getClientRects())},isRTL:function(e){return"rtl"===dpe(e).direction}};function jpe(e,t,n,r){void 0===r&&(r={});var o=r,i=o.ancestorScroll,a=void 0===i||i,s=o.ancestorResize,l=void 0===s||s,u=o.elementResize,c=void 0===u||u,d=o.animationFrame,f=void 0!==d&&d,h=a&&!f,p=l&&!f,v=h||p?[].concat(cn(vpe(e)?Rpe(e):[]),cn(Rpe(t))):[];v.forEach((function(e){h&&e.addEventListener("scroll",n,{passive:!0}),p&&e.addEventListener("resize",n)}));var g,m=null;if(c){var y=!0;m=new ResizeObserver((function(){y||n(),y=!1})),vpe(e)&&!f&&m.observe(e),m.observe(t)}var b=f?Cpe(e):null;return f&&function t(){var r=Cpe(e);!b||r.x===b.x&&r.y===b.y&&r.width===b.width&&r.height===b.height||n(),b=r,g=requestAnimationFrame(t)}(),n(),function(){var e;v.forEach((function(e){h&&e.removeEventListener("scroll",n),p&&e.removeEventListener("resize",n)})),null==(e=m)||e.disconnect(),m=null,f&&cancelAnimationFrame(g)}}var Bpe="undefined"!=typeof document?cr.useLayoutEffect:cr.useEffect;function Fpe(e,t){if(e===t)return!0;if(kn(e)!==kn(t))return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;var n,r,o;if(e&&t&&"object"==kn(e)){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!Fpe(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){var i=o[r];if(("_owner"!==i||!e.$$typeof)&&!Fpe(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function Hpe(e){var t=void 0===e?{}:e,n=t.middleware,r=t.placement,o=void 0===r?"bottom":r,i=t.strategy,a=void 0===i?"absolute":i,s=t.whileElementsMounted,l=cr.useRef(null),u=cr.useRef(null),c=function(e){var t=cr.useRef(e);return Bpe((function(){t.current=e})),t}(s),d=cr.useRef(null),f=yn(cr.useState({x:null,y:null,strategy:a,placement:o,middlewareData:{}}),2),h=f[0],p=f[1],v=yn(cr.useState(n),2),g=v[0],m=v[1];Fpe(null==g?void 0:g.map((function(e){return e.options})),null==n?void 0:n.map((function(e){return e.options})))||m(n);var y=cr.useCallback((function(){l.current&&u.current&&function(e,t,n){return Fhe(e,t,un({platform:zpe},n))}(l.current,u.current,{middleware:g,placement:o,strategy:a}).then((function(e){b.current&&QO.flushSync((function(){p(e)}))}))}),[g,o,a]);Bpe((function(){b.current&&y()}),[y]);var b=cr.useRef(!1);Bpe((function(){return b.current=!0,function(){b.current=!1}}),[]);var w=cr.useCallback((function(){if("function"==typeof d.current&&(d.current(),d.current=null),l.current&&u.current)if(c.current){var e=c.current(l.current,u.current,y);d.current=e}else y()}),[y,c]),k=cr.useCallback((function(e){l.current=e,w()}),[w]),x=cr.useCallback((function(e){u.current=e,w()}),[w]),S=cr.useMemo((function(){return{reference:l,floating:u}}),[]);return cr.useMemo((function(){return un(un({},h),{},{update:y,refs:S,reference:k,floating:x})}),[h,y,S,k,x])}var Vpe=function(e){var t=e.element,n=e.padding;return{name:"arrow",options:e,fn:function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?Zhe({element:t.current,padding:n}).fn(e):{}:t?Zhe({element:t,padding:n}).fn(e):{}}}};var Wpe="Popper",Upe=yn(Xfe(Wpe),2),Gpe=Upe[0],qpe=Upe[1],Ype=yn(Gpe(Wpe),2),Zpe=Ype[0],Xpe=Ype[1],$pe=cr.forwardRef((function(e,t){var n=e.__scopePopper,r=e.virtualRef,o=sn(e,Lt),i=Xpe("PopperAnchor",n),a=cr.useRef(null),s=Jfe(t,a);return cr.useEffect((function(){i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:cr.createElement(ohe.div,ps({},o,{ref:s}))})),Kpe="PopperContent",Qpe=yn(Gpe(Kpe),2),Jpe=Qpe[0],eve=(Qpe[1],yn(Gpe(Kpe,{hasParent:!1,positionUpdateFns:new Set}),2)),tve=eve[0],nve=eve[1],rve=cr.forwardRef((function(e,t){var n,r,o,i,a,s,l,u,c=e.__scopePopper,d=e.side,f=void 0===d?"bottom":d,h=e.sideOffset,p=void 0===h?0:h,v=e.align,g=void 0===v?"center":v,m=e.alignOffset,y=void 0===m?0:m,b=e.arrowPadding,w=void 0===b?0:b,k=e.collisionBoundary,x=void 0===k?[]:k,S=e.collisionPadding,C=void 0===S?0:S,_=e.sticky,E=void 0===_?"partial":_,P=e.hideWhenDetached,L=void 0!==P&&P,O=e.avoidCollisions,A=void 0===O||O,M=sn(e,Ot),T=Xpe(Kpe,c),I=yn(cr.useState(null),2),R=I[0],N=I[1],D=Jfe(t,(function(e){return N(e)})),z=yn(cr.useState(null),2),j=z[0],B=z[1],F=function(e){var t=yn(cr.useState(void 0),2),n=t[0],r=t[1];return The((function(){if(e){r({width:e.offsetWidth,height:e.offsetHeight});var t=new ResizeObserver((function(t){if(Array.isArray(t)&&t.length){var n,o,i=t[0];if("borderBoxSize"in i){var a=i.borderBoxSize,s=Array.isArray(a)?a[0]:a;n=s.inlineSize,o=s.blockSize}else n=e.offsetWidth,o=e.offsetHeight;r({width:n,height:o})}}));return t.observe(e,{box:"border-box"}),function(){return t.unobserve(e)}}r(void 0)}),[e]),n}(j),H=null!==(n=null==F?void 0:F.width)&&void 0!==n?n:0,V=null!==(r=null==F?void 0:F.height)&&void 0!==r?r:0,W=f+("center"!==g?"-"+g:""),U="number"==typeof C?C:un({top:0,right:0,bottom:0,left:0},C),G=Array.isArray(x)?x:[x],q=G.length>0,Y={padding:U,boundary:G.filter(ive),altBoundary:q},Z=Hpe({strategy:"fixed",placement:W,whileElementsMounted:jpe,middleware:[ipe({mainAxis:p+V,alignmentAxis:y}),A?spe(un({mainAxis:!0,crossAxis:!1,limiter:"partial"===E?lpe():void 0},Y)):void 0,j?Vpe({element:j,padding:w}):void 0,A?tpe(un({},Y)):void 0,ave({arrowWidth:H,arrowHeight:V}),L?ope({strategy:"referenceHidden"}):void 0].filter(ove)}),X=Z.reference,$=Z.floating,K=Z.strategy,Q=Z.x,J=Z.y,ee=Z.placement,te=Z.middlewareData,ne=Z.update;The((function(){X(T.anchor)}),[X,T.anchor]);var re=null!==Q&&null!==J,oe=yn(sve(ee),2),ie=oe[0],ae=oe[1],se=null===(o=te.arrow)||void 0===o?void 0:o.x,le=null===(i=te.arrow)||void 0===i?void 0:i.y,ue=0!==(null===(a=te.arrow)||void 0===a?void 0:a.centerOffset),ce=yn(cr.useState(),2),de=ce[0],fe=ce[1];The((function(){R&&fe(window.getComputedStyle(R).zIndex)}),[R]);var he=nve(Kpe,c),pe=he.hasParent,ve=he.positionUpdateFns,ge=!pe;cr.useLayoutEffect((function(){if(!ge)return ve.add(ne),function(){ve.delete(ne)}}),[ge,ve,ne]),cr.useLayoutEffect((function(){ge&&re&&Array.from(ve).reverse().forEach((function(e){return requestAnimationFrame(e)}))}),[ge,re,ve]);var me=un(un({"data-side":ie,"data-align":ae},M),{},{ref:D,style:un(un({},M.style),{},{animation:re?void 0:"none",opacity:null!==(s=te.hide)&&void 0!==s&&s.referenceHidden?0:void 0})});return cr.createElement("div",{ref:$,"data-radix-popper-content-wrapper":"",style:gn({position:K,left:0,top:0,transform:re?"translate3d(".concat(Math.round(Q),"px, ").concat(Math.round(J),"px, 0)"):"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:de},"--radix-popper-transform-origin",[null===(l=te.transformOrigin)||void 0===l?void 0:l.x,null===(u=te.transformOrigin)||void 0===u?void 0:u.y].join(" "))},cr.createElement(Jpe,{scope:c,placedSide:ie,onArrowChange:B,arrowX:se,arrowY:le,shouldHideArrow:ue},ge?cr.createElement(tve,{scope:c,hasParent:!0,positionUpdateFns:ve},cr.createElement(ohe.div,me)):cr.createElement(ohe.div,me)))}));function ove(e){return void 0!==e}function ive(e){return null!==e}var ave=function(e){return{name:"transformOrigin",options:e,fn:function(t){var n,r,o,i,a,s=t.placement,l=t.rects,u=t.middlewareData,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,h=yn(sve(s),2),p=h[0],v={start:"0%",center:"50%",end:"100%"}[h[1]],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,m=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2,y="",b="";return"bottom"===p?(y=c?v:"".concat(g,"px"),b="".concat(-f,"px")):"top"===p?(y=c?v:"".concat(g,"px"),b="".concat(l.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),b=c?v:"".concat(m,"px")):"left"===p&&(y="".concat(l.floating.width+f,"px"),b=c?v:"".concat(m,"px")),{data:{x:y,y:b}}}}};function sve(e){var t=yn(e.split("-"),2),n=t[0],r=t[1];return[n,void 0===r?"center":r]}var lve=function(e){var t=e.__scopePopper,n=e.children,r=yn(cr.useState(null),2),o=r[0],i=r[1];return cr.createElement(Zpe,{scope:t,anchor:o,onAnchorChange:i},n)},uve=$pe,cve=rve;var dve=function(e){var t=e.present,n=e.children,r=function(e){var t=yn(cr.useState(),2),n=t[0],r=t[1],o=cr.useRef({}),i=cr.useRef(e),a=cr.useRef("none"),s=e?"mounted":"unmounted",l=function(e,t){return cr.useReducer((function(e,n){var r=t[e][n];return null!=r?r:e}),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=yn(l,2),c=u[0],d=u[1];return cr.useEffect((function(){var e=fve(o.current);a.current="mounted"===c?e:"none"}),[c]),The((function(){var t=o.current,n=i.current;if(n!==e){var r=a.current,s=fve(t);if(e)d("MOUNT");else if("none"===s||"none"===(null==t?void 0:t.display))d("UNMOUNT");else{d(n&&r!==s?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,d]),The((function(){if(n){var e=function(e){var t=fve(o.current).includes(e.animationName);e.target===n&&t&&QO.flushSync((function(){return d("ANIMATION_END")}))},t=function(e){e.target===n&&(a.current=fve(o.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),function(){n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}d("ANIMATION_END")}),[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:cr.useCallback((function(e){e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):cr.Children.only(n),i=Jfe(r.ref,o.ref);return"function"==typeof n||r.isPresent?cr.cloneElement(o,{ref:i}):null};function fve(e){return(null==e?void 0:e.animationName)||"none"}function hve(e){var t=e.prop,n=e.defaultProp,r=e.onChange,o=void 0===r?function(){}:r,i=function(e){var t=e.defaultProp,n=e.onChange,r=cr.useState(t),o=yn(r,1)[0],i=cr.useRef(o),a=uhe(n);return cr.useEffect((function(){i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:o}),a=yn(i,2),s=a[0],l=a[1],u=void 0!==t,c=u?t:s,d=uhe(o);return[c,cr.useCallback((function(e){if(u){var n="function"==typeof e?e(t):e;n!==t&&d(n)}else l(e)}),[u,t,l,d])]}dve.displayName="Presence";var pve="rovingFocusGroup.onEntryFocus",vve={bubbles:!1,cancelable:!0},gve="RovingFocusGroup",mve=yn(ahe(gve),3),yve=mve[0],bve=mve[1],wve=yn(Xfe(gve,[mve[2]]),2),kve=wve[0],xve=wve[1],Sve=yn(kve(gve),2),Cve=Sve[0],_ve=Sve[1],Eve=cr.forwardRef((function(e,t){return cr.createElement(yve.Provider,{scope:e.__scopeRovingFocusGroup},cr.createElement(yve.Slot,{scope:e.__scopeRovingFocusGroup},cr.createElement(Pve,ps({},e,{ref:t}))))})),Pve=cr.forwardRef((function(e,t){var n=e.__scopeRovingFocusGroup,r=e.orientation,o=e.loop,i=void 0!==o&&o,a=e.dir,s=e.currentTabStopId,l=e.defaultCurrentTabStopId,u=e.onCurrentTabStopIdChange,c=e.onEntryFocus,d=sn(e,At),f=cr.useRef(null),h=Jfe(t,f),p=lhe(a),v=yn(hve({prop:s,defaultProp:l,onChange:u}),2),g=v[0],m=void 0===g?null:g,y=v[1],b=yn(cr.useState(!1),2),w=b[0],k=b[1],x=uhe(c),S=bve(n),C=cr.useRef(!1),_=yn(cr.useState(0),2),E=_[0],P=_[1];return cr.useEffect((function(){var e=f.current;if(e)return e.addEventListener(pve,x),function(){return e.removeEventListener(pve,x)}}),[x]),cr.createElement(Cve,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:m,onItemFocus:cr.useCallback((function(e){return y(e)}),[y]),onItemShiftTab:cr.useCallback((function(){return k(!0)}),[]),onFocusableItemAdd:cr.useCallback((function(){return P((function(e){return e+1}))}),[]),onFocusableItemRemove:cr.useCallback((function(){return P((function(e){return e-1}))}),[])},cr.createElement(ohe.div,ps({tabIndex:w||0===E?-1:0,"data-orientation":r},d,{ref:h,style:un({outline:"none"},e.style),onMouseDown:Zfe(e.onMouseDown,(function(){C.current=!0})),onFocus:Zfe(e.onFocus,(function(e){var t=!C.current;if(e.target===e.currentTarget&&t&&!w){var n=new CustomEvent(pve,vve);if(e.currentTarget.dispatchEvent(n),!n.defaultPrevented){var r=S().filter((function(e){return e.focusable}));Ave([r.find((function(e){return e.active})),r.find((function(e){return e.id===m}))].concat(cn(r)).filter(Boolean).map((function(e){return e.ref.current})))}}C.current=!1})),onBlur:Zfe(e.onBlur,(function(){return k(!1)}))})))})),Lve=cr.forwardRef((function(e,t){var n=e.__scopeRovingFocusGroup,r=e.focusable,o=void 0===r||r,i=e.active,a=void 0!==i&&i,s=sn(e,Mt),l=function(e){var t=yn(cr.useState(Ihe()),2),n=t[0],r=t[1];return The((function(){e||r((function(e){return null!=e?e:String(Rhe++)}))}),[e]),e||(n?"radix-".concat(n):"")}(),u=_ve("RovingFocusGroupItem",n),c=u.currentTabStopId===l,d=bve(n),f=u.onFocusableItemAdd,h=u.onFocusableItemRemove;return cr.useEffect((function(){if(o)return f(),function(){return h()}}),[o,f,h]),cr.createElement(yve.ItemSlot,{scope:n,id:l,focusable:o,active:a},cr.createElement(ohe.span,ps({tabIndex:c?0:-1,"data-orientation":u.orientation},s,{ref:t,onMouseDown:Zfe(e.onMouseDown,(function(e){o?u.onItemFocus(l):e.preventDefault()})),onFocus:Zfe(e.onFocus,(function(){return u.onItemFocus(l)})),onKeyDown:Zfe(e.onKeyDown,(function(e){if("Tab"===e.key&&e.shiftKey)u.onItemShiftTab();else if(e.target===e.currentTarget){var t,n,r=function(e,t,n){var r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ove[r]}(e,u.orientation,u.dir);if(void 0!==r){e.preventDefault();var o=d().filter((function(e){return e.focusable})).map((function(e){return e.ref.current}));if("last"===r)o.reverse();else if("prev"===r||"next"===r){"prev"===r&&o.reverse();var i=o.indexOf(e.currentTarget);o=u.loop?(n=i+1,(t=o).map((function(e,r){return t[(n+r)%t.length]}))):o.slice(i+1)}setTimeout((function(){return Ave(o)}))}}}))})))})),Ove={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ave(e){var t,n=document.activeElement,r=xn(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o===n)return;if(o.focus(),document.activeElement!==n)return}}catch(COe){r.e(COe)}finally{r.f()}}var Mve=Eve,Tve=Lve,Ive=["Enter"," "],Rve=["ArrowUp","PageDown","End"],Nve=[].concat(["ArrowDown","PageUp","Home"],Rve),Dve="Menu",zve=yn(ahe(Dve),3),jve=zve[0],Bve=zve[1],Fve=yn(Xfe(Dve,[zve[2],qpe,xve]),2),Hve=Fve[0],Vve=Fve[1],Wve=qpe(),Uve=xve(),Gve=yn(Hve(Dve),2),qve=Gve[0],Yve=Gve[1],Zve=yn(Hve(Dve),2),Xve=Zve[0],$ve=Zve[1],Kve=cr.forwardRef((function(e,t){var n=e.__scopeMenu,r=sn(e,Tt),o=Wve(n);return cr.createElement(uve,ps({},o,r,{ref:t}))})),Qve=yn(Hve("MenuPortal",{forceMount:void 0}),2),Jve=(Qve[0],Qve[1]),ege="MenuContent",tge=yn(Hve(ege),2),nge=tge[0],rge=tge[1],oge=cr.forwardRef((function(e,t){var n=Jve(ege,e.__scopeMenu),r=e.forceMount,o=void 0===r?n.forceMount:r,i=sn(e,It),a=Yve(ege,e.__scopeMenu),s=$ve(ege,e.__scopeMenu);return cr.createElement(jve.Provider,{scope:e.__scopeMenu},cr.createElement(dve,{present:o||a.open},cr.createElement(jve.Slot,{scope:e.__scopeMenu},s.modal?cr.createElement(ige,ps({},i,{ref:t})):cr.createElement(age,ps({},i,{ref:t})))))})),ige=cr.forwardRef((function(e,t){var n=Yve(ege,e.__scopeMenu),r=cr.useRef(null),o=Jfe(t,r);return cr.useEffect((function(){var e=r.current;if(e)return SH(e)}),[]),cr.createElement(sge,ps({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Zfe(e.onFocusOutside,(function(e){return e.preventDefault()}),{checkForDefaultPrevented:!1}),onDismiss:function(){return n.onOpenChange(!1)}}))})),age=cr.forwardRef((function(e,t){var n=Yve(ege,e.__scopeMenu);return cr.createElement(sge,ps({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:function(){return n.onOpenChange(!1)}}))})),sge=cr.forwardRef((function(e,t){var n=e.__scopeMenu,r=e.loop,o=void 0!==r&&r,i=e.trapFocus,a=e.onOpenAutoFocus,s=e.onCloseAutoFocus,l=e.disableOutsidePointerEvents,u=e.onEscapeKeyDown,c=e.onPointerDownOutside,d=e.onFocusOutside,f=e.onInteractOutside,h=e.onDismiss,p=e.disableOutsideScroll,v=sn(e,Rt),g=Yve(ege,n),m=$ve(ege,n),y=Wve(n),b=Uve(n),w=Bve(n),k=yn(cr.useState(null),2),x=k[0],S=k[1],C=cr.useRef(null),_=Jfe(t,C,g.onContentChange),E=cr.useRef(0),P=cr.useRef(""),L=cr.useRef(0),O=cr.useRef(null),A=cr.useRef("right"),M=cr.useRef(0),T=p?NW:cr.Fragment,I=p?{as:ehe,allowPinchZoom:!0}:void 0,R=function(e){var t,n,r=P.current+e,o=w().filter((function(e){return!e.disabled})),i=document.activeElement,a=null===(t=o.find((function(e){return e.ref.current===i})))||void 0===t?void 0:t.textValue,s=function(e,t,n){var r=t.length>1&&Array.from(t).every((function(e){return e===t[0]})),o=r?t[0]:t,i=n?e.indexOf(n):-1,a=(s=e,l=Math.max(i,0),s.map((function(e,t){return s[(l+t)%s.length]})));var s,l;1===o.length&&(a=a.filter((function(e){return e!==n})));var u=a.find((function(e){return e.toLowerCase().startsWith(o.toLowerCase())}));return u!==n?u:void 0}(o.map((function(e){return e.textValue})),r,a),l=null===(n=o.find((function(e){return e.textValue===s})))||void 0===n?void 0:n.ref.current;!function e(t){P.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout((function(){return e("")}),1e3))}(r),l&&setTimeout((function(){return l.focus()}))};cr.useEffect((function(){return function(){return window.clearTimeout(E.current)}}),[]),cr.useEffect((function(){var e,t,n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:bhe()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:bhe()),yhe++,function(){1===yhe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((function(e){return e.remove()})),yhe--}}),[]);var N,D=cr.useCallback((function(e){var t,n;return A.current===(null===(t=O.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;var n={x:e.clientX,y:e.clientY};return function(e,t){for(var n=e.x,r=e.y,o=!1,i=0,a=t.length-1;i<t.length;a=i++){var s=t[i].x,l=t[i].y,u=t[a].x,c=t[a].y;l>r!=c>r&&n<(u-s)*(r-l)/(c-l)+s&&(o=!o)}return o}(n,t)}(e,null===(n=O.current)||void 0===n?void 0:n.area)}),[]);return cr.createElement(nge,{scope:n,searchRef:P,onItemEnter:cr.useCallback((function(e){D(e)&&e.preventDefault()}),[D]),onItemLeave:cr.useCallback((function(e){var t;D(e)||(null===(t=C.current)||void 0===t||t.focus(),S(null))}),[D]),onTriggerLeave:cr.useCallback((function(e){D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:L,onPointerGraceIntentChange:cr.useCallback((function(e){O.current=e}),[])},cr.createElement(T,I,cr.createElement(She,{asChild:!0,trapped:i,onMountAutoFocus:Zfe(a,(function(e){var t;e.preventDefault(),null===(t=C.current)||void 0===t||t.focus()})),onUnmountAutoFocus:s},cr.createElement(vhe,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:h},cr.createElement(Mve,ps({asChild:!0},b,{dir:m.dir,orientation:"vertical",loop:o,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:function(e){m.isUsingKeyboardRef.current||e.preventDefault()}}),cr.createElement(cve,ps({role:"menu","aria-orientation":"vertical","data-state":(N=g.open,N?"open":"closed"),"data-radix-menu-content":"",dir:m.dir},y,v,{ref:_,style:un({outline:"none"},v.style),onKeyDown:Zfe(v.onKeyDown,(function(e){var t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&R(e.key));var o=C.current;if(e.target===o&&Nve.includes(e.key)){e.preventDefault();var i=w().filter((function(e){return!e.disabled})).map((function(e){return e.ref.current}));Rve.includes(e.key)&&i.reverse(),function(e){var t,n=document.activeElement,r=xn(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o===n)return;if(o.focus(),document.activeElement!==n)return}}catch(COe){r.e(COe)}finally{r.f()}}(i)}})),onBlur:Zfe(e.onBlur,(function(e){e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),P.current="")})),onPointerMove:Zfe(e.onPointerMove,fge((function(e){var t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){var r=e.clientX>M.current?"right":"left";A.current=r,M.current=e.clientX}})))})))))))})),lge="MenuItem",uge="menu.itemSelect",cge=cr.forwardRef((function(e,t){var n=e.disabled,r=void 0!==n&&n,o=e.onSelect,i=sn(e,Nt),a=cr.useRef(null),s=$ve(lge,e.__scopeMenu),l=rge(lge,e.__scopeMenu),u=Jfe(t,a),c=cr.useRef(!1);return cr.createElement(dge,ps({},i,{ref:u,disabled:r,onClick:Zfe(e.onClick,(function(){var e=a.current;if(!r&&e){var t=new CustomEvent(uge,{bubbles:!0,cancelable:!0});e.addEventListener(uge,(function(e){return null==o?void 0:o(e)}),{once:!0}),ihe(e,t),t.defaultPrevented?c.current=!1:s.onClose()}})),onPointerDown:function(t){var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),c.current=!0},onPointerUp:Zfe(e.onPointerUp,(function(e){var t;c.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Zfe(e.onKeyDown,(function(e){var t=""!==l.searchRef.current;r||t&&" "===e.key||Ive.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),dge=cr.forwardRef((function(e,t){var n=e.__scopeMenu,r=e.disabled,o=void 0!==r&&r,i=e.textValue,a=sn(e,Dt),s=rge(lge,n),l=Uve(n),u=cr.useRef(null),c=Jfe(t,u),d=yn(cr.useState(!1),2),f=d[0],h=d[1],p=yn(cr.useState(""),2),v=p[0],g=p[1];return cr.useEffect((function(){var e,t=u.current;t&&g((null!==(e=t.textContent)&&void 0!==e?e:"").trim())}),[a.children]),cr.createElement(jve.ItemSlot,{scope:n,disabled:o,textValue:null!=i?i:v},cr.createElement(Tve,ps({asChild:!0},l,{focusable:!o}),cr.createElement(ohe.div,ps({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:c,onPointerMove:Zfe(e.onPointerMove,fge((function(e){o?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:Zfe(e.onPointerLeave,fge((function(e){return s.onItemLeave(e)}))),onFocus:Zfe(e.onFocus,(function(){return h(!0)})),onBlur:Zfe(e.onBlur,(function(){return h(!1)}))}))))}));Hve("MenuRadioGroup",{value:void 0,onValueChange:function(){}});Hve("MenuItemIndicator",{checked:!1});function fge(e){return function(t){return"mouse"===t.pointerType?e(t):void 0}}Hve("MenuSub");var hge=function(e){var t=e.__scopeMenu,n=e.open,r=void 0!==n&&n,o=e.children,i=e.dir,a=e.onOpenChange,s=e.modal,l=void 0===s||s,u=Wve(t),c=yn(cr.useState(null),2),d=c[0],f=c[1],h=cr.useRef(!1),p=uhe(a),v=lhe(i);return cr.useEffect((function(){var e=function(){h.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=function(){return h.current=!1};return document.addEventListener("keydown",e,{capture:!0}),function(){document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),cr.createElement(lve,u,cr.createElement(qve,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f},cr.createElement(Xve,{scope:t,onClose:cr.useCallback((function(){return p(!1)}),[p]),isUsingKeyboardRef:h,dir:v,modal:l},o)))},pge=Kve,vge=oge,gge=cge,mge="ContextMenu",yge=yn(Xfe(mge,[Vve]),2),bge=yge[0],wge=(yge[1],Vve()),kge=yn(bge(mge),2),xge=kge[0],Sge=kge[1];function Cge(e){return function(t){return"mouse"!==t.pointerType?e(t):void 0}}var _ge=function(e){var t=e.__scopeContextMenu,n=e.children,r=e.onOpenChange,o=e.dir,i=e.modal,a=void 0===i||i,s=yn(cr.useState(!1),2),l=s[0],u=s[1],c=wge(t),d=uhe(r),f=cr.useCallback((function(e){u(e),d(e)}),[d]);return cr.createElement(xge,{scope:t,open:l,onOpenChange:f,modal:a},cr.createElement(hge,ps({},c,{dir:o,open:l,onOpenChange:f,modal:a}),n))},Ege=cr.forwardRef((function(e,t){var n=e.__scopeContextMenu,r=sn(e,zt),o=Sge("ContextMenuTrigger",n),i=wge(n),a=cr.useRef({x:0,y:0}),s=cr.useRef({getBoundingClientRect:function(){return DOMRect.fromRect(un({width:0,height:0},a.current))}}),l=cr.useRef(0),u=cr.useCallback((function(){return window.clearTimeout(l.current)}),[]),c=function(e){a.current={x:e.clientX,y:e.clientY},o.onOpenChange(!0)};return cr.useEffect((function(){return u}),[u]),cr.createElement(cr.Fragment,null,cr.createElement(pge,ps({},i,{virtualRef:s})),cr.createElement(ohe.span,ps({"data-state":o.open?"open":"closed"},r,{ref:t,style:un({WebkitTouchCallout:"none"},e.style),onContextMenu:Zfe(e.onContextMenu,(function(e){u(),c(e),e.preventDefault()})),onPointerDown:Zfe(e.onPointerDown,Cge((function(e){u(),l.current=window.setTimeout((function(){return c(e)}),700)}))),onPointerMove:Zfe(e.onPointerMove,Cge(u)),onPointerCancel:Zfe(e.onPointerCancel,Cge(u)),onPointerUp:Zfe(e.onPointerUp,Cge(u))})))})),Pge=cr.forwardRef((function(e,t){var n=e.__scopeContextMenu,r=sn(e,jt),o=Sge("ContextMenuContent",n),i=wge(n),a=cr.useRef(!1);return cr.createElement(vge,ps({},i,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:function(t){var n;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),!t.defaultPrevented&&a.current&&t.preventDefault(),a.current=!1},onInteractOutside:function(t){var n;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||o.modal||(a.current=!0)},style:un(un({},e.style),{},gn({},"--radix-context-menu-content-transform-origin","var(--radix-popper-transform-origin)"))}))})),Lge=cr.forwardRef((function(e,t){var n=e.__scopeContextMenu,r=sn(e,Bt),o=wge(n);return cr.createElement(gge,ps({},o,r,{ref:t}))})),Oge=cr.memo((function(e){var t,n,r,o,i,a,s,l,u=wie(),c=kie(Ide),d=c.activeTabName,f=c.galleryImageObjectFit,h=c.galleryImageMinimumWidth,p=c.mayDeleteImage,v=c.shouldUseSingleGalleryColumn,g=e.image,m=e.isSelected,y=g.url,b=g.thumbnail,w=g.uuid,k=g.metadata,x=yn(cr.useState(!1),2),S=x[0],C=x[1],_=cY(),E=o8().t,P=function(){var e=qt(Ut().mark((function e(){var t;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==k||null===(t=k.image)||void 0===t||!t.init_image_path){e.next=9;break}return e.next=3,fetch(k.image.init_image_path);case 3:if(!e.sent.ok){e.next=9;break}return u(z8("img2img")),u(_4(k)),_({title:E("toast:initialImageSet"),status:"success",duration:2500,isClosable:!0}),e.abrupt("return");case 9:_({title:E("toast:initialImageNotSet"),description:E("toast:initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0});case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return ro(_ge,{onOpenChange:function(e){u(s4(e))},children:[no(Ege,{children:ro(cP,{position:"relative",className:"hoverable-image",onMouseOver:function(){return C(!0)},onMouseOut:function(){return C(!1)},userSelect:"none",draggable:!0,onDragStart:function(e){e.dataTransfer.setData("invokeai/imageUuid",w),e.dataTransfer.effectAllowed="move"},children:[no(c_,{className:"hoverable-image-image",objectFit:v?"contain":f,rounded:"md",src:b||y,loading:"lazy"}),no("div",{className:"hoverable-image-content",onClick:function(){return u(K3(g))},children:m&&no(Gv,{width:"50%",height:"50%",as:Uce,className:"hoverable-image-check"})}),S&&h>=64&&no("div",{className:"hoverable-image-delete-button",children:no(Nde,{image:g,children:no(x_,{"aria-label":E("parameters:deleteImage"),icon:no(xde,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!p})})})]},w)}),ro(Pge,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:function(e){e.detail.originalEvent.preventDefault()},children:[no(Lge,{onClickCapture:function(){u(K3(g))},children:E("parameters:openInViewer")}),no(Lge,{onClickCapture:function(){if(g.metadata){var e,t,n=yn(m4(null===(e=g.metadata)||void 0===e||null===(t=e.image)||void 0===t?void 0:t.prompt),2),r=n[0],o=n[1];r&&u(N4(r)),u(D4(o||""))}_({title:E("toast:promptSet"),status:"success",duration:2500,isClosable:!0})},disabled:void 0===(null==g||null===(t=g.metadata)||void 0===t||null===(n=t.image)||void 0===n?void 0:n.prompt),children:E("parameters:usePrompt")}),no(Lge,{onClickCapture:function(){g.metadata&&u(W4(g.metadata.image.seed)),_({title:E("toast:seedSet"),status:"success",duration:2500,isClosable:!0})},disabled:void 0===(null==g||null===(r=g.metadata)||void 0===r||null===(o=r.image)||void 0===o?void 0:o.seed),children:E("parameters:useSeed")}),no(Lge,{onClickCapture:function(){k&&u(E4(k)),_({title:E("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})},disabled:!["txt2img","img2img"].includes(null==g||null===(i=g.metadata)||void 0===i||null===(a=i.image)||void 0===a?void 0:a.type),children:E("parameters:useAll")}),no(Lge,{onClickCapture:P,disabled:"img2img"!==(null==g||null===(s=g.metadata)||void 0===s||null===(l=s.image)||void 0===l?void 0:l.type),children:E("parameters:useInitImg")}),no(Lge,{onClickCapture:function(){u(M4(g)),"img2img"!==d&&u(z8("img2img")),_({title:E("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},children:E("parameters:sendToImg2Img")}),no(Lge,{onClickCapture:function(){u(y3(g)),u(s3()),"unifiedCanvas"!==d&&u(z8("unifiedCanvas")),_({title:E("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},children:E("parameters:sendToUnifiedCanvas")}),no(Lge,{"data-warning":!0,children:no(Nde,{image:g,children:no("p",{children:E("parameters:deleteImage")})})})]})]})}),(function(e,t){return e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected}));Oge.displayName="HoverableImage";var Age=320,Mge={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}};function Tge(){var e=wie(),t=o8().t,n=kie(Tde),r=n.images,o=n.currentCategory,i=n.currentImageUuid,a=n.shouldPinGallery,s=n.shouldShowGallery,l=n.galleryScrollPosition,u=n.galleryImageMinimumWidth,c=n.galleryGridTemplateColumns,d=n.activeTabName,f=n.galleryImageObjectFit,h=n.shouldHoldGalleryOpen,p=n.shouldAutoSwitchToNewImages,v=n.areMoreImagesAvailable,g=n.galleryWidth,m=n.isLightboxOpen,y=n.isStaging,b=n.shouldEnableResize,w=n.shouldUseSingleGalleryColumn,k=m?{galleryMinWidth:400,galleryMaxWidth:400}:Mge[d],x=k.galleryMinWidth,S=k.galleryMaxWidth,C=yn(cr.useState(g>=Age),2),_=C[0],E=C[1],P=yn(cr.useState(!1),2),L=P[0],O=P[1],A=yn(cr.useState(0),2),M=A[0],T=A[1],I=cr.useRef(null),R=cr.useRef(null),N=cr.useRef(null);cr.useEffect((function(){g>=Age&&E(!1)}),[g]);var D=function(){e(n4(!a)),e(m3(!0))},z=function(){e(r4(!0)),a&&e(m3(!0))},j=cr.useCallback((function(){e(r4(!1)),e(s4(!1)),e(o4(R.current?R.current.scrollTop:0)),setTimeout((function(){return a&&e(m3(!0))}),400)}),[e,a]),B=function(){N.current&&window.clearTimeout(N.current)};_ce("g",(function(){s?j():z()}),[s,a]),_ce("left",(function(){e(t4())}),{enabled:!y||"unifiedCanvas"!==d},[y]),_ce("right",(function(){e(e4())}),{enabled:!y||"unifiedCanvas"!==d},[y]),_ce("shift+g",(function(){D()}),[a]),_ce("esc",(function(){e(r4(!1))}),{enabled:function(){return!a},preventDefault:!0},[a]);return _ce("shift+up",(function(){if(u<256){var t=JK(u+32,32,256);e(i4(t))}}),[u]),_ce("shift+down",(function(){if(u>32){var t=JK(u-32,32,256);e(i4(t))}}),[u]),cr.useEffect((function(){R.current&&(R.current.scrollTop=l)}),[l,s]),cr.useEffect((function(){function e(e){a||!I.current||I.current.contains(e.target)||j()}return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[j,a]),no(Yfe,{nodeRef:I,in:s||h,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ro("div",{className:"image-gallery-wrapper",style:{zIndex:a?1:100},"data-pinned":a,ref:I,onMouseLeave:a?void 0:function(){h||(N.current=window.setTimeout((function(){return j()}),500))},onMouseEnter:a?void 0:B,onMouseOver:a?void 0:B,children:[ro(hfe,{minWidth:x,maxWidth:a?S:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:b},size:{width:g,height:a?"100%":"100vh"},onResizeStart:function(e,t,n){T(n.clientHeight),n.style.height="".concat(n.clientHeight,"px"),a&&(n.style.position="fixed",n.style.right="1rem",O(!0))},onResizeStop:function(t,n,r,o){var i=a?JK(Number(g)+o.width,x,Number(S)):Number(g)+o.width;e(c4(i)),r.removeAttribute("data-resize-alert"),a&&(r.style.position="relative",r.style.removeProperty("right"),r.style.setProperty("height",a?"100%":"100vh"),O(!1),e(m3(!0)))},onResize:function(t,n,r,o){var i=JK(Number(g)+o.width,x,Number(a?S:.95*window.innerWidth));i>=Age&&!_?E(!0):i<Age&&_&&E(!1),u>i-40&&e(i4(i-40)),a&&(i>=S?r.setAttribute("data-resize-alert","true"):r.removeAttribute("data-resize-alert")),r.style.height="".concat(M,"px")},children:[ro("div",{className:"image-gallery-header",children:[no(k_,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:ro(to,_?{children:[no(Eae,{size:"sm","data-selected":"result"===o,onClick:function(){return e(u4("result"))},children:t("gallery:generations")}),no(Eae,{size:"sm","data-selected":"user"===o,onClick:function(){return e(u4("user"))},children:t("gallery:uploads")})]}:{children:[no(_ae,{"aria-label":t("gallery:showGenerations"),tooltip:t("gallery:showGenerations"),"data-selected":"result"===o,icon:no(ode,{}),onClick:function(){return e(u4("result"))}}),no(_ae,{"aria-label":t("gallery:showUploads"),tooltip:t("gallery:showUploads"),"data-selected":"user"===o,icon:no(Ede,{}),onClick:function(){return e(u4("user"))}})]})}),ro("div",{className:"image-gallery-header-right-icons",children:[no(Pae,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:no(_ae,{size:"sm","aria-label":t("gallery:gallerySettings"),icon:no(Pde,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ro("div",{className:"image-gallery-settings-popover",children:[ro("div",{children:[no(xfe,{value:u,onChange:function(t){e(i4(t))},min:32,max:256,hideTooltip:!0,label:t("gallery:galleryImageSize")}),no(_ae,{size:"sm","aria-label":t("gallery:galleryImageResetSize"),tooltip:t("gallery:galleryImageResetSize"),onClick:function(){return e(i4(64))},icon:no(mfe,{}),"data-selected":a,styleClass:"image-gallery-icon-btn"})]}),no("div",{children:no(pfe,{label:t("gallery:maintainAspectRatio"),isChecked:"contain"===f,onChange:function(){return e(a4("contain"===f?"cover":"contain"))}})}),no("div",{children:no(pfe,{label:t("gallery:autoSwitchNewImages"),isChecked:p,onChange:function(t){return e(l4(t.target.checked))}})}),no("div",{children:no(pfe,{label:t("gallery:singleColumnLayout"),isChecked:w,onChange:function(t){return e(d4(t.target.checked))}})})]})}),no(_ae,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery:pinGallery"),tooltip:"".concat(t("gallery:pinGallery")," (Shift+G)"),onClick:D,icon:no(a?Sfe:Cfe,{})})]})]}),no("div",{className:"image-gallery-container",ref:R,children:r.length||v?ro(to,{children:[no("div",{className:"image-gallery",style:{gridTemplateColumns:c},children:r.map((function(e){var t=e.uuid;return no(Oge,{image:e,isSelected:i===t},t)}))}),no(b_,{onClick:function(){e(tie(o))},isDisabled:!v,className:"image-gallery-load-more-btn",children:t(v?"gallery:loadMore":"gallery:allImagesLoaded")})]}):ro("div",{className:"image-gallery-container-placeholder",children:[no(Ofe,{}),no("p",{children:t("gallery:noImagesInGallery")})]})})]}),L&&no("div",{style:{width:"".concat(g,"px"),height:"100%"}})]})})}
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var Ige=function(e,t){return Ige=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ige(e,t)};var Rge=function(){return Rge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rge.apply(this,arguments)};function Nge(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||t)}var Dge=function(e,t){return Number(e.toFixed(t))},zge=function(e,t,n){n&&"function"==typeof n&&n(e,t)},jge={easeOut:function(e){return-Math.cos(e*Math.PI)/2+.5},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},Bge=function(e){"number"==typeof e&&cancelAnimationFrame(e)},Fge=function(e){e.mounted&&(Bge(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function Hge(e,t,n,r){if(e.mounted){var o=(new Date).getTime();Fge(e),e.animation=function(){if(!e.mounted)return Bge(e.animation);var i=(new Date).getTime()-o,a=(0,jge[t])(i/n);i>=n?(r(1),e.animation=null):e.animation&&(r(a),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Vge(e,t,n,r){var o=function(e){var t=e.scale,n=e.positionX,r=e.positionY;if(isNaN(t)||isNaN(n)||isNaN(r))return!1;return!0}(t);if(e.mounted&&o){var i=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,c=t.scale-s,d=t.positionX-l,f=t.positionY-u;0===n?i(t.scale,t.positionX,t.positionY):Hge(e,r,n,(function(e){i(s+c*e,l+d*e,u+f*e)}))}}var Wge=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,o=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var i=function(e,t,n){var r=e.offsetWidth,o=e.offsetHeight,i=t.offsetWidth*n,a=t.offsetHeight*n;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:i,newDiffWidth:r-i,newContentHeight:a,newDiffHeight:o-a}}(n,r,t),a=i.wrapperWidth,s=i.wrapperHeight,l=function(e,t,n,r,o,i,a){var s=e>t?n*(a?1:.5):0,l=r>o?i*(a?1:.5):0;return{minPositionX:e-t-s,maxPositionX:s,minPositionY:r-o-l,maxPositionY:l}}(a,i.newContentWidth,i.newDiffWidth,s,i.newContentHeight,i.newDiffHeight,Boolean(o));return l},Uge=function(e,t){var n=Wge(e,t);return e.bounds=n,n};function Gge(e,t,n,r,o,i,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,c=n.maxPositionY,d=0,f=0;return a&&(d=o,f=i),{x:qge(e,s-d,u+d,r),y:qge(t,l-f,c+f,r)}}var qge=function(e,t,n,r){return Dge(r?e<t?t:e>n?n:e:e,2)};function Yge(e,t,n,r,o,i){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,c=r-s;return"number"!=typeof t||"number"!=typeof n?(console.error("Mouse X and Y position were not provided!"),{x:l,y:u}):Gge(l-t*c,u-n*c,o,i,0,0,null)}function Zge(e,t,n,r,o){var i=t-(o?r:0);return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=i?i:e}var Xge=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,o=e.wrapperComponent,i=t.target,a=null==o?void 0:o.contains(i);return!!(r&&i&&a)&&!xme(i,n)},$ge=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup.panning.disabled;return!(!t||!n||r)};var Kge=function(e,t){var n=e.setup,r=e.transformState.scale,o=n.minScale;return t>0&&r>=o?t:0};function Qge(e,t,n,r,o,i,a,s,l,u){if(o){var c;if(t>a&&n>a)return(c=a+(e-a)*u)>l?l:c<a?a:c;if(t<i&&n<i)return(c=i+(e-i)*u)<s?s:c>i?i:c}return r?t:qge(e,i,a,o)}function Jge(e,t){var n=function(e){var t=e.mounted,n=e.setup,r=n.disabled,o=n.velocityAnimation,i=e.transformState.scale;return!(o.disabled&&!(i>1)&&r&&!t)}(e);if(n){var r=e.lastMousePosition,o=e.velocityTime,i=e.setup,a=e.wrapperComponent,s=i.velocityAnimation.equalToMove,l=Date.now();if(r&&o&&a){var u=function(e,t){return t?Math.min(1,e.offsetWidth/window.innerWidth):1}(a,s),c=t.x-r.x,d=t.y-r.y,f=c/u,h=d/u,p=l-o,v=c*c+d*d,g=Math.sqrt(v)/p;e.velocity={velocityX:f,velocityY:h,total:g}}e.lastMousePosition=t,e.velocityTime=l}}function eme(e,t){var n=e.transformState.scale;Fge(e),Uge(e,n),t.touches?function(e,t){var n=t.touches,r=e.transformState,o=r.positionX,i=r.positionY;if(e.isPanning=!0,1===n.length){var a=n[0].clientX,s=n[0].clientY;e.startCoords={x:a-o,y:s-i}}}(e,t):function(e,t){var n=e.transformState,r=n.positionX,o=n.positionY;e.isPanning=!0;var i=t.clientX,a=t.clientY;e.startCoords={x:i-r,y:a-o}}(e,t)}function tme(e,t,n){var r=e.startCoords,o=e.setup.alignmentAnimation,i=o.sizeX,a=o.sizeY;if(r){var s=function(e,t,n){var r=e.startCoords,o=e.transformState,i=e.setup.panning,a=i.lockAxisX,s=i.lockAxisY,l=o.positionX,u=o.positionY;if(!r)return{x:l,y:u};var c=t-r.x,d=n-r.y;return{x:a?l:c,y:s?u:d}}(e,t,n),l=s.x,u=s.y,c=Kge(e,i),d=Kge(e,a);Jge(e,{x:l,y:u}),function(e,t,n,r,o){var i=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,c=l.positionX,d=l.positionY;if(a&&t!==c&&n!==d&&s){var f=Gge(t,n,s,i,r,o,a),h=f.x,p=f.y;e.setTransformState(u,h,p)}}(e,l,u,c,d)}}function nme(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,o=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var i=null==r?void 0:r.getBoundingClientRect(),a=null==o?void 0:o.getBoundingClientRect(),s=(null==i?void 0:i.width)||0,l=(null==i?void 0:i.height)||0,u=(null==a?void 0:a.width)||0,c=(null==a?void 0:a.height)||0,d=s<u||l<c;!t&&n&&(null==n?void 0:n.total)>.1&&d?function(e){var t=e.velocity,n=e.bounds,r=e.setup,o=e.wrapperComponent,i=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,o=e.setup,i=o.disabled,a=o.velocityAnimation,s=e.transformState.scale;return!(a.disabled&&!(s>1)&&i&&!t||!n||!r)}(e);if(i&&t&&n&&o){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,c=n.minPositionX,d=n.maxPositionY,f=n.minPositionY,h=r.limitToBounds,p=r.alignmentAnimation,v=r.zoomAnimation,g=r.panning,m=g.lockAxisY,y=g.lockAxisX,b=v.animationType,w=p.sizeX,k=p.sizeY,x=p.velocityAlignmentTime,S=function(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,o=n.animationTime,i=n.sensitivity;return r?o*t*i:o}(e,l),C=Math.max(S,x),_=Kge(e,w),E=Kge(e,k),P=_*o.offsetWidth/100,L=E*o.offsetHeight/100,O=u+P,A=c-P,M=d+L,T=f-L,I=e.transformState,R=(new Date).getTime();Hge(e,b,C,(function(t){var n=e.transformState,r=n.scale,o=n.positionX,i=n.positionY,l=((new Date).getTime()-R)/x,v=1-(0,jge[p.animationType])(Math.min(1,l)),g=1-t,b=o+a*g,w=i+s*g,k=Qge(b,I.positionX,o,y,h,c,u,A,O,v),S=Qge(w,I.positionY,i,m,h,f,d,T,M,v);o===b&&i===w||e.setTransformState(r,k,S)}))}}(e):rme(e)}}function rme(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,o=n.alignmentAnimation,i=o.disabled,a=o.sizeX,s=o.sizeY,l=o.animationTime,u=o.animationType;if(!(i||t<r||!a&&!s)){var c=function(e){var t=e.transformState,n=t.positionX,r=t.positionY,o=t.scale,i=e.setup,a=i.disabled,s=i.limitToBounds,l=i.centerZoomedOut,u=e.wrapperComponent;if(!a&&u&&e.bounds){var c=e.bounds,d=c.maxPositionX,f=c.minPositionX,h=c.maxPositionY,p=c.minPositionY,v=n>d||n<f,g=r>h||r<p,m=Yge(e,n>d?u.offsetWidth:e.setup.minPositionX||0,r>h?u.offsetHeight:e.setup.minPositionY||0,o,e.bounds,s||l),y=m.x,b=m.y;return{scale:o,positionX:v?y:n,positionY:g?b:r}}}(e);c&&Vge(e,c,l,u)}}function ome(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,i=e.setup,a=i.minScale,s=i.limitToBounds,l=i.zoomAnimation,u=l.disabled,c=l.animationTime,d=l.animationType,f=u||r>=a;if((r>=1||s)&&rme(e),!f&&o&&e.mounted){var h=ime(e,a,t||o.offsetWidth/2,n||o.offsetHeight/2);h&&Vge(e,h,c,d)}}function ime(e,t,n,r){var o=e.setup,i=o.minScale,a=o.maxScale,s=o.limitToBounds,l=Zge(Dge(t,2),i,a,0,!1),u=Yge(e,n,r,l,Uge(e,l),s);return{scale:l,positionX:u.x,positionY:u.y}}var ame={previousScale:1,scale:1,positionX:0,positionY:0},sme=Rge(Rge({},ame),{setComponents:function(){},contextInstance:null}),lme={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},ume=function(e){var t,n,r,o;return{previousScale:null!==(t=e.initialScale)&&void 0!==t?t:ame.scale,scale:null!==(n=e.initialScale)&&void 0!==n?n:ame.scale,positionX:null!==(r=e.initialPositionX)&&void 0!==r?r:ame.positionX,positionY:null!==(o=e.initialPositionY)&&void 0!==o?o:ame.positionY}},cme=function(e){var t=Rge({},lme);return Object.keys(e).forEach((function(n){var r=void 0!==e[n];if(void 0!==lme[n]&&r){var o=Object.prototype.toString.call(lme[n]),i="[object Object]"===o,a="[object Array]"===o;t[n]=i?Rge(Rge({},lme[n]),e[n]):a?Nge(Nge([],lme[n]),e[n]):e[n]}})),t},dme=function(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,i=e.setup,a=i.maxScale,s=i.minScale,l=i.zoomAnimation.size;if(!o)throw new Error("Wrapper is not mounted");var u=r*Math.exp(t*n);return Zge(Dge(u,3),s,a,l,!1)};function fme(e,t,n,r,o){var i=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!i)return console.error("No WrapperComponent found");var c=(i.offsetWidth/2-l)/s,d=(i.offsetHeight/2-u)/s,f=ime(e,dme(e,t,n),c,d);if(!f)return console.error("Error during zoom event. New transformation state was not calculated.");Vge(e,f,r,o)}function hme(e,t,n){var r=e.setup,o=e.wrapperComponent,i=r.limitToBounds,a=ume(e.props),s=e.transformState,l=s.scale,u=s.positionX,c=s.positionY;if(o){var d=Wge(e,a.scale),f=Gge(a.positionX,a.positionY,d,i,0,0,o),h={scale:a.scale,positionX:f.x,positionY:f.y};l===a.scale&&u===a.positionX&&c===a.positionY||Vge(e,h,t,n)}}var pme=function(e){return function(t,n,r){void 0===t&&(t=.5),void 0===n&&(n=300),void 0===r&&(r="easeOut"),fme(e,1,t,n,r)}},vme=function(e){return function(t,n,r){void 0===t&&(t=.5),void 0===n&&(n=300),void 0===r&&(r="easeOut"),fme(e,-1,t,n,r)}},gme=function(e){return function(t,n,r,o,i){void 0===o&&(o=300),void 0===i&&(i="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,c=e.wrapperComponent,d=e.contentComponent;if(!e.setup.disabled&&c&&d){var f={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Vge(e,f,o,i)}}},mme=function(e){return function(t,n){void 0===t&&(t=200),void 0===n&&(n="easeOut"),hme(e,t,n)}},yme=function(e){return function(t,n,r){void 0===n&&(n=200),void 0===r&&(r="easeOut");var o=e.transformState,i=e.wrapperComponent,a=e.contentComponent;if(i&&a){var s=_me(t||o.scale,i,a);Vge(e,s,n,r)}}},bme=function(e){return function(t,n,r,o){void 0===r&&(r=600),void 0===o&&(o="easeOut"),Fge(e);var i=e.wrapperComponent,a="string"==typeof t?document.getElementById(t):t;if(i&&function(e){return e?void 0!==(null==e?void 0:e.offsetWidth)&&void 0!==(null==e?void 0:e.offsetHeight)||(console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1):(console.error("Zoom node not found"),!1)}(a)&&a&&i.contains(a)){var s=function(e,t,n){var r=e.wrapperComponent,o=e.setup,i=o.limitToBounds,a=o.minScale,s=o.maxScale;if(!r)return ame;var l=r.getBoundingClientRect(),u=function(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}(t),c=u.x,d=u.y,f=t.offsetWidth,h=t.offsetHeight,p=r.offsetWidth/f,v=r.offsetHeight/h,g=Zge(n||Math.min(p,v),a,s,0,!1),m=(l.width-f*g)/2,y=(l.height-h*g)/2,b=Gge((l.left-c)*g+m,(l.top-d)*g+y,Wge(e,g),i,0,0,r);return{positionX:b.x,positionY:b.y,scale:g}}(e,a,n);Vge(e,s,r,o)}}},wme=function(e){return{instance:e,state:e.transformState,zoomIn:pme(e),zoomOut:vme(e),setTransform:gme(e),resetTransform:mme(e),centerView:yme(e),zoomToElement:bme(e)}};function kme(){try{return{get passive(){return!0,!1}}}catch(COe){return!1}}var xme=function(e,t){var n=e.tagName.toUpperCase();return!!t.find((function(e){return e.toUpperCase()===n}))||!!t.find((function(t){return e.classList.contains(t)}))},Sme=function(e){e&&clearTimeout(e)},Cme=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},_me=function(e,t,n){var r=n.offsetWidth*e,o=n.offsetHeight*e;return{scale:e,positionX:(t.offsetWidth-r)/2,positionY:(t.offsetHeight-o)/2}},Eme=function(e,t){var n=e.setup.wheel,r=n.disabled,o=n.wheelDisabled,i=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target;return!(!s||l||r||!u)&&(!(o&&!t.ctrlKey)&&((!i||!t.ctrlKey)&&!xme(u,a)))};function Pme(e,t,n){var r=t.getBoundingClientRect(),o=0,i=0;if("clientX"in e)o=(e.clientX-r.left)/n,i=(e.clientY-r.top)/n;else{var a=e.touches[0];o=(a.clientX-r.left)/n,i=(a.clientY-r.top)/n}return(isNaN(o)||isNaN(i))&&console.error("No mouse or touch offset found"),{x:o,y:i}}var Lme=function(e,t){var n=e.setup.pinch,r=n.disabled,o=n.excluded,i=e.isInitialized,a=t.target;return!(!i||r||!a)&&!xme(a,o)},Ome=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance;return!(!n||t||!r)},Ame=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},Mme=function(e,t){var n=e.props,r=n.onWheelStart,o=n.onZoomStart;e.wheelStopEventTimer||(Fge(e),zge(wme(e),t,r),zge(wme(e),t,o))},Tme=function(e,t){var n=e.props,r=n.onWheel,o=n.onZoom,i=e.contentComponent,a=e.setup,s=e.transformState.scale,l=a.limitToBounds,u=a.centerZoomedOut,c=a.zoomAnimation,d=a.wheel,f=c.size,h=c.disabled,p=d.step;if(!i)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var v=function(e,t){var n,r,o=e?e.deltaY<0?1:-1:0;return r=o,"number"==typeof(n=t)?n:r}(t,null),g=function(e,t,n,r,o){var i=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,c=s.zoomAnimation,d=c.size,f=c.disabled;if(!a)throw new Error("Wrapper is not mounted");var h=i+t*(i-i*n)*n;if(o)return h;var p=!r&&!f;return Zge(Dge(h,3),u,l,d,p)}(e,v,p,!t.ctrlKey);if(s!==g){var m=Uge(e,g),y=Pme(t,i,s),b=l&&(h||0===f||u),w=Yge(e,y.x,y.y,g,m,b),k=w.x,x=w.y;e.previousWheelEvent=t,e.setTransformState(g,k,x),zge(wme(e),t,r),zge(wme(e),t,o)}},Ime=function(e,t){var n=e.props,r=n.onWheelStop,o=n.onZoomStop;Sme(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout((function(){e.mounted&&(ome(e,t.x,t.y),e.wheelAnimationTimer=null)}),100);var i=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,o=e.setup,i=o.maxScale,a=o.minScale;return!!n&&(r<i||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY))}(e,t);i&&(Sme(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout((function(){e.mounted&&(e.wheelStopEventTimer=null,zge(wme(e),t,r),zge(wme(e),t,o))}),160))},Rme=function(e,t){var n=Ame(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Fge(e)},Nme=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,o=e.transformState.scale,i=e.setup,a=i.limitToBounds,s=i.centerZoomedOut,l=i.zoomAnimation,u=l.disabled,c=l.size;if(null!==r&&n){var d=function(e,t,n){var r=n.getBoundingClientRect(),o=e.touches,i=Dge(o[0].clientX-r.left,5),a=Dge(o[0].clientY-r.top,5);return{x:(i+Dge(o[1].clientX-r.left,5))/2/t,y:(a+Dge(o[1].clientY-r.top,5))/2/t}}(t,o,n);if(isFinite(d.x)&&isFinite(d.y)){var f=Ame(t),h=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,o=e.setup,i=o.maxScale,a=o.minScale,s=o.zoomAnimation,l=s.size,u=s.disabled;if(!n||null===r||!t)throw new Error("Pinch touches distance was not provided");return t<0?e.transformState.scale:Zge(Dge(t/r*n,2),a,i,l,!u)}(e,f);if(h!==o){var p=Uge(e,h),v=a&&(u||0===c||s),g=Yge(e,d.x,d.y,h,p,v),m=g.x,y=g.y;e.pinchMidpoint=d,e.lastDistance=f,e.setTransformState(h,m,y)}}}},Dme=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ome(e,null==t?void 0:t.x,null==t?void 0:t.y)};function zme(e,t){var n=e.setup.doubleClick,r=n.disabled,o=n.mode,i=n.step,a=n.animationTime,s=n.animationType;if(!r){if("reset"===o)return hme(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var c=dme(e,"zoomOut"===o?-1:1,i),d=Pme(t,u,l),f=ime(e,c,d.x,d.y);if(!f)return console.error("Error during zoom event. New transformation state was not calculated.");Vge(e,f,a,s)}}var jme=function(e,t){var n=e.isInitialized,r=e.setup,o=e.wrapperComponent,i=r.doubleClick,a=i.disabled,s=i.excluded,l=t.target,u=null==o?void 0:o.contains(l),c=n&&l&&u&&!a;return!!c&&(!xme(l,s)&&!!c)},Bme=qr.createContext(sme),Fme=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!0,t.transformState=ume(t.props),t.setup=cme(t.props),t.wrapperComponent=null,t.contentComponent=null,t.isInitialized=!1,t.bounds=null,t.previousWheelEvent=null,t.wheelStopEventTimer=null,t.wheelAnimationTimer=null,t.isPanning=!1,t.startCoords=null,t.lastTouch=null,t.distance=null,t.lastDistance=null,t.pinchStartDistance=null,t.pinchStartScale=null,t.pinchMidpoint=null,t.velocity=null,t.velocityTime=null,t.lastMousePosition=null,t.animate=!1,t.animation=null,t.maxBounds=null,t.pressedKeys={},t.handleInitializeWrapperEvents=function(e){var n=kme();e.addEventListener("wheel",t.onWheelZoom,n),e.addEventListener("dblclick",t.onDoubleClick,n),e.addEventListener("touchstart",t.onTouchPanningStart,n),e.addEventListener("touchmove",t.onTouchPanning,n),e.addEventListener("touchend",t.onTouchPanningStop,n)},t.handleInitialize=function(){var e=t.setup.centerOnInit;t.applyTransformation(),t.forceUpdate(),e&&(setTimeout((function(){t.mounted&&t.setCenter()}),50),setTimeout((function(){t.mounted&&t.setCenter()}),100),setTimeout((function(){t.mounted&&t.setCenter()}),200))},t.onWheelZoom=function(e){t.setup.disabled||Eme(t,e)&&t.isPressingKeys(t.setup.wheel.activationKeys)&&(Mme(t,e),Tme(t,e),Ime(t,e))},t.onPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;n||Xge(t,e)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),Fge(t),eme(t,e),zge(wme(t),e,r))},t.onPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;n||$ge(t)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),tme(t,e.clientX,e.clientY),zge(wme(t),e,r))},t.onPanningStop=function(e){var n=t.props.onPanningStop;t.isPanning&&(nme(t),zge(wme(t),e,n))},t.onPinchStart=function(e){var n=t.setup.disabled,r=t.props,o=r.onPinchingStart,i=r.onZoomStart;n||Lme(t,e)&&(Rme(t,e),Fge(t),zge(wme(t),e,o),zge(wme(t),e,i))},t.onPinch=function(e){var n=t.setup.disabled,r=t.props,o=r.onPinching,i=r.onZoom;n||Ome(t)&&(e.preventDefault(),e.stopPropagation(),Nme(t,e),zge(wme(t),e,o),zge(wme(t),e,i))},t.onPinchStop=function(e){var n=t.props,r=n.onPinchingStop,o=n.onZoomStop;t.pinchStartScale&&(Dme(t),zge(wme(t),e,r),zge(wme(t),e,o))},t.onTouchPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;if(!n&&Xge(t,e))if(t.lastTouch&&+new Date-t.lastTouch<200&&1===e.touches.length)t.onDoubleClick(e);else{t.lastTouch=+new Date,Fge(t);var o=e.touches,i=1===o.length,a=2===o.length;i&&(Fge(t),eme(t,e),zge(wme(t),e,r)),a&&t.onPinchStart(e)}},t.onTouchPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;if(t.isPanning&&1===e.touches.length){if(n)return;if(!$ge(t))return;e.preventDefault(),e.stopPropagation();var o=e.touches[0];tme(t,o.clientX,o.clientY),zge(wme(t),e,r)}else e.touches.length>1&&t.onPinch(e)},t.onTouchPanningStop=function(e){t.onPanningStop(e),t.onPinchStop(e)},t.onDoubleClick=function(e){t.setup.disabled||jme(t,e)&&zme(t,e)},t.clearPanning=function(e){t.isPanning&&t.onPanningStop(e)},t.setKeyPressed=function(e){t.pressedKeys[e.key]=!0},t.setKeyUnPressed=function(e){t.pressedKeys[e.key]=!1},t.isPressingKeys=function(e){return!e.length||Boolean(e.find((function(e){return t.pressedKeys[e]})))},t.setComponents=function(e,n){t.wrapperComponent=e,t.contentComponent=n,Uge(t,t.transformState.scale),t.handleInitializeWrapperEvents(e),t.handleInitialize(),t.handleRef(),t.isInitialized=!0,zge(wme(t),void 0,t.props.onInit)},t.setTransformState=function(e,n,r){isNaN(e)||isNaN(n)||isNaN(r)?console.error("Detected NaN set state values"):(e!==t.transformState.scale&&(t.transformState.previousScale=t.transformState.scale,t.transformState.scale=e),t.transformState.positionX=n,t.transformState.positionY=r,t.applyTransformation())},t.setCenter=function(){if(t.wrapperComponent&&t.contentComponent){var e=_me(t.transformState.scale,t.wrapperComponent,t.contentComponent);t.setTransformState(e.scale,e.positionX,e.positionY)}},t.applyTransformation=function(){if(t.mounted&&t.contentComponent){var e=t.transformState,n=e.scale,r=e.positionX,o=e.positionY,i=Cme(r,o,n);t.contentComponent.style.transform=i,t.handleRef()}},t.handleRef=function(){t.props.setRef(wme(t))},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ige(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){var e=kme();window.addEventListener("mousedown",this.onPanningStart,e),window.addEventListener("mousemove",this.onPanning,e),window.addEventListener("mouseup",this.onPanningStop,e),document.addEventListener("mouseleave",this.clearPanning,e),window.addEventListener("keyup",this.setKeyUnPressed,e),window.addEventListener("keydown",this.setKeyPressed,e),this.handleRef()},t.prototype.componentWillUnmount=function(){var e=kme();window.removeEventListener("mousedown",this.onPanningStart,e),window.removeEventListener("mousemove",this.onPanning,e),window.removeEventListener("mouseup",this.onPanningStop,e),window.removeEventListener("keyup",this.setKeyUnPressed,e),window.removeEventListener("keydown",this.setKeyPressed,e),Fge(this)},t.prototype.componentDidUpdate=function(e){e!==this.props&&(Uge(this,this.transformState.scale),this.setup=cme(this.props))},t.prototype.render=function(){var e=wme(this),t=this.props.children,n="function"==typeof t?t(e):t;return qr.createElement(Bme.Provider,{value:Rge(Rge({},this.transformState),{setComponents:this.setComponents,contextInstance:this})},n)},t}(cr.Component),Hme=qr.forwardRef((function(e,t){var n=cr.useState(null),r=n[0],o=n[1];return cr.useImperativeHandle(t,(function(){return r}),[r]),qr.createElement(Fme,Rge({},e,{setRef:o}))}));var Vme="transform-component-module_wrapper__1_Fgj",Wme="transform-component-module_content__2jYgh";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".transform-component-module_wrapper__1_Fgj {\n position: relative;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n overflow: hidden;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n margin: 0;\n padding: 0;\n}\n.transform-component-module_content__2jYgh {\n display: flex;\n flex-wrap: wrap;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: 0;\n padding: 0;\n transform-origin: 0% 0%;\n}\n.transform-component-module_content__2jYgh img {\n pointer-events: none;\n}\n");var Ume=function(e){var t=e.children,n=e.wrapperClass,r=void 0===n?"":n,o=e.contentClass,i=void 0===o?"":o,a=e.wrapperStyle,s=e.contentStyle,l=cr.useContext(Bme).setComponents,u=cr.useRef(null),c=cr.useRef(null);return cr.useEffect((function(){var e=u.current,t=c.current;null!==e&&null!==t&&l&&l(e,t)}),[]),qr.createElement("div",{ref:u,className:"react-transform-wrapper "+Vme+" "+r,style:a},qr.createElement("div",{ref:c,className:"react-transform-component "+Wme+" "+i,style:s},t))};function Gme(e){var t=e.image,n=e.alt,r=e.ref,o=e.styleClass,i=yn(cr.useState(0),2),a=i[0],s=i[1],l=yn(cr.useState(!1),2),u=l[0],c=l[1],d=function(){s(-3===a?0:a-1)},f=function(){s(3===a?0:a+1)},h=function(){c(!u)};return no(Hme,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:function(e){var i=e.zoomIn,l=e.zoomOut,p=e.resetTransform,v=e.centerView;return ro(to,{children:[ro("div",{className:"lightbox-image-options",children:[no(_ae,{icon:no(wfe,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:function(){return i()},fontSize:20}),no(_ae,{icon:no(kfe,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:function(){return l()},fontSize:20}),no(_ae,{icon:no(yfe,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:d,fontSize:20}),no(_ae,{icon:no(bfe,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:f,fontSize:20}),no(_ae,{icon:no(Lfe,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),no(_ae,{icon:no(mfe,{}),"aria-label":"Reset",tooltip:"Reset",onClick:function(){p(),s(0),c(!1)},fontSize:20})]}),no(Ume,{wrapperStyle:{width:"100%",height:"100%"},children:no("img",{style:{transform:"rotate(".concat(90*a,"deg) scaleX(").concat(u?-1:1,")"),width:"100%"},src:t,alt:n,ref:r,className:o||"",onLoad:function(){return v(1,0,"easeOut")}})})]})}})}function qme(){var e=wie(),t=kie((function(e){return e.lightbox.isLightboxOpen})),n=kie(Ude),r=n.viewerImageToDisplay,o=n.shouldShowImageDetails,i=n.isOnFirstImage,a=n.isOnLastImage,s=yn(cr.useState(!1),2),l=s[0],u=s[1],c=function(){u(!0)},d=function(){u(!1)};return _ce("Esc",(function(){t&&e(p4(!1))}),[t]),ro("div",{className:"lightbox-container",children:[no(_ae,{icon:no(gfe,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:function(){e(p4(!1))},fontSize:20}),ro("div",{className:"lightbox-display-container",children:[ro("div",{className:"lightbox-preview-wrapper",children:[no(zde,{}),!o&&ro("div",{className:"current-image-next-prev-buttons",children:[no("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:c,onMouseOut:d,children:l&&!i&&no(x_,{"aria-label":"Previous image",icon:no(zce,{className:"next-prev-button"}),variant:"unstyled",onClick:function(){e(t4())}})}),no("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:c,onMouseOut:d,children:l&&!a&&no(x_,{"aria-label":"Next image",icon:no(jce,{className:"next-prev-button"}),variant:"unstyled",onClick:function(){e(e4())}})})]}),r&&ro(to,{children:[no(Gme,{image:r.url,styleClass:"lightbox-image"}),o&&no(Wde,{image:r})]})]}),no(Tge,{})]})]})}function Yme(e){return Tce({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Zme=QX(Mde,(function(e){return{resultImages:e.categories.result.images,userImages:e.categories.user.images}})),Xme=QX([pae,Lae,fae],(function(e,t,n){return{shouldShowDualDisplay:e.shouldShowDualDisplay,shouldPinParametersPanel:e.shouldPinParametersPanel,isLightboxOpen:t.isLightboxOpen,shouldShowDualDisplayButton:["inpainting"].includes(n),activeTabName:n}}),{memoizeOptions:{resultEqualityCheck:dae}}),$me=function(e){var t,n,r,o=wie(),i=e.optionsPanel,a=e.children,s=e.styleClass,l=kie(Xme),u=l.activeTabName,c=l.shouldShowDualDisplay,d=l.isLightboxOpen,f=l.shouldShowDualDisplayButton,h=(t=kie(Zme),n=t.resultImages,r=t.userImages,function(e){var t=n.find((function(t){return t.uuid===e}));return t||r.find((function(t){return t.uuid===e}))||void 0});return no("div",{className:s?"workarea-wrapper ".concat(s):"workarea-wrapper",children:ro("div",{className:"workarea-main",children:[i,ro("div",{className:"workarea-children-wrapper",onDrop:function(e){var t=e.dataTransfer.getData("invokeai/imageUuid"),n=h(t);n&&("img2img"===u?o(M4(n)):"unifiedCanvas"===u&&o(y3(n)))},children:[a,f&&no(kY,{label:"Toggle Split View",children:no("div",{className:"workarea-split-button","data-selected":c,onClick:function(){o(W8(!c)),o(m3(!0))},children:no(Yme,{})})})]}),!d&&no(Tge,{})]})})},Kme=function(e){var t=e.styleClass,n=cr.useContext(bie);return no("div",{className:"image-uploader-button-outer ".concat(t),onClick:function(){n&&n()},children:ro("div",{className:"image-upload-button",children:[no(_de,{}),no(xP,{size:"lg",children:"Click or Drag and Drop"})]})})},Qme=QX([Mde,pae,fae],(function(e,t,n){var r=e.currentImage,o=e.intermediateImage;return{activeTabName:n,shouldShowImageDetails:t.shouldShowImageDetails,hasAnImageToDisplay:r||o}}),{memoizeOptions:{resultEqualityCheck:dae}}),Jme=function(){var e=kie(Qme),t=e.hasAnImageToDisplay,n=e.activeTabName;return no("div",{className:"current-image-area","data-tab-name":n,children:t?ro(to,{children:[no(zde,{}),no(Gde,{})]}):no("div",{className:"current-image-display-placeholder",children:no(Afe,{})})})},eye=function(){var e=cr.useContext(bie);return no(_ae,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:no(_de,{}),onClick:e||void 0})};function tye(){var e=kie((function(e){return e.generation.initialImage})),t=o8().t,n=wie(),r=cY();return ro(to,{children:[ro("div",{className:"init-image-preview-header",children:[no("h2",{children:t("parameters:initialImage")}),no(eye,{})]}),e&&no("div",{className:"init-image-preview",children:no(c_,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:"string"==typeof e?e:e.url,onError:function(){r({title:t("toast:parametersFailed"),description:t("toast:parametersFailedDesc"),status:"error",isClosable:!0}),n(C4())}})})]})}var nye=function(){var e=kie((function(e){return e.generation.initialImage})),t=kie((function(e){return e.gallery})),n=t.currentImage;return ro("div",{className:"workarea-split-view",children:[no("div",{className:"workarea-split-view-left",children:e?no("div",{className:"image-to-image-area",children:no(tye,{})}):no(Kme,{})}),n&&no("div",{className:"workarea-split-view-right",children:no(Jme,{})})]})},rye=function(e){return e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e}(rye||{}),oye=function(e){var t=function(){var e=o8().t;return cr.useMemo((function(){var t;return gn(t={},0,{text:e("tooltip:feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,1,{text:e("tooltip:feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,2,{text:e("tooltip:feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,3,{text:e("tooltip:feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,4,{text:e("tooltip:feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,5,{text:e("tooltip:feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"}),gn(t,6,{text:e("tooltip:feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,7,{text:e("tooltip:feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,8,{text:e("tooltip:feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,9,{text:e("tooltip:feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),gn(t,10,{text:e("tooltip:feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}),t}),[e])}();return t[e]},iye=function(e){var t=e.label,n=e.isDisabled,r=void 0!==n&&n,o=e.width,i=void 0===o?"auto":o,a=e.formControlProps,s=e.formLabelProps,l=e.styleClass,u=sn(e,Ft);return ro(I_,un(un({isDisabled:r,width:i,className:"invokeai__switch-form-control ".concat(l),display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between"},a),{},{children:[no(V_,un(un({className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto"},s),{},{children:t})),no(Cq,un({className:"invokeai__switch-root"},u))]}))};function aye(){var e=kie((function(e){return e.system.isGFPGANAvailable})),t=kie((function(e){return e.postprocessing.shouldRunFacetool})),n=wie();return no(iye,{isDisabled:!e,isChecked:t,onChange:function(e){return n(c6(e.target.checked))}})}function sye(){var e=wie(),t=kie((function(e){return e.generation.shouldFitToWidthHeight})),n=o8().t;return no(iye,{label:n("parameters:imageFit"),isChecked:t,onChange:function(t){return e(G4(t.target.checked))}})}function lye(e){var t=o8().t,n=e.label,r=void 0===n?"".concat(t("parameters:strength")):n,o=e.styleClass,i=kie((function(e){return e.generation.img2imgStrength})),a=wie();return no(xfe,{label:r,step:.01,min:.01,max:.99,onChange:function(e){return a(O4(e))},value:i,isInteger:!1,styleClass:o,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:function(){a(O4(.75))}})}var uye=function(){var e=wie(),t=kie((function(e){return e.generation.seamless})),n=o8().t;return no(yP,{gap:2,direction:"column",children:no(iye,{label:n("parameters:seamlessTiling"),fontSize:"md",isChecked:t,onChange:function(t){return e(B4(t.target.checked))}})})},cye=function(){return no(yP,{gap:2,direction:"column",children:no(uye,{})})};function dye(){var e=wie(),t=kie((function(e){return e.generation.perlin})),n=o8().t;return no(Aae,{label:n("parameters:perlinNoise"),min:0,max:1,step:.05,onChange:function(t){return e(R4(t))},value:t,isInteger:!1})}function fye(){var e=wie(),t=o8().t,n=kie((function(e){return e.generation.shouldRandomizeSeed}));return no(iye,{label:t("parameters:randomizeSeed"),isChecked:n,onChange:function(t){return e(Y4(t.target.checked))}})}function hye(){var e=kie((function(e){return e.generation.seed})),t=kie((function(e){return e.generation.shouldRandomizeSeed})),n=kie((function(e){return e.generation.shouldGenerateVariations})),r=o8().t,o=wie();return no(Aae,{label:r("parameters:seed"),step:1,precision:0,flexGrow:1,min:0,max:yte,isDisabled:t,isInvalid:e<0&&n,onChange:function(e){return o(W4(e))},value:e,width:"auto"})}function pye(){var e=wie(),t=kie((function(e){return e.generation.shouldRandomizeSeed})),n=o8().t;return no(b_,{size:"sm",isDisabled:t,onClick:function(){return e(W4(Aoe(0,yte)))},padding:"0 1.5rem",children:no("p",{children:n("parameters:shuffle")})})}function vye(){var e=wie(),t=kie((function(e){return e.generation.threshold})),n=o8().t;return no(Aae,{label:n("parameters:noiseThreshold"),min:0,max:1e3,step:.1,onChange:function(t){return e(X4(t))},value:t,isInteger:!1})}var gye=function(){return ro(yP,{gap:2,direction:"column",children:[no(fye,{}),ro(yP,{gap:2,children:[no(hye,{}),no(pye,{})]}),no(yP,{gap:2,children:no(vye,{})}),no(yP,{gap:2,children:no(dye,{})})]})};function mye(){var e=kie((function(e){return e.system.isESRGANAvailable})),t=kie((function(e){return e.postprocessing.shouldRunESRGAN})),n=wie();return no(iye,{isDisabled:!e,isChecked:t,onChange:function(e){return n(u6(e.target.checked))}})}function yye(){var e=kie((function(e){return e.generation.shouldGenerateVariations})),t=wie();return no(iye,{isChecked:e,width:"auto",onChange:function(e){return t(q4(e.target.checked))}})}function bye(e){var t=e.label,n=void 0===t?"":t,r=e.styleClass,o=e.isDisabled,i=void 0!==o&&o,a=e.fontSize,s=void 0===a?"sm":a,l=e.width,u=e.size,c=void 0===u?"sm":u,d=e.isInvalid,f=sn(e,Ht);return ro(I_,{className:"input ".concat(r),isInvalid:d,isDisabled:i,children:[""!==n&&no(V_,{fontSize:s,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:n}),no(YE,un(un({},f),{},{className:"input-entry",size:c,width:l}))]})}function wye(){var e=kie((function(e){return e.generation.seedWeights})),t=kie((function(e){return e.generation.shouldGenerateVariations})),n=o8().t,r=wie();return no(bye,{label:n("parameters:seedWeights"),value:e,isInvalid:t&&!(b4(e)||""===e),isDisabled:!t,onChange:function(e){return r(U4(e.target.value))}})}function kye(){var e=kie((function(e){return e.generation.variationAmount})),t=kie((function(e){return e.generation.shouldGenerateVariations})),n=o8().t,r=wie();return no(Aae,{label:n("parameters:variationAmount"),value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:function(e){return r(K4(e))},isInteger:!1})}var xye=function(){return ro(yP,{gap:2,direction:"column",children:[no(kye,{}),no(wye,{})]})};function Sye(){var e=wie(),t=kie((function(e){return e.generation.cfgScale})),n=o8().t;return no(Aae,{label:n("parameters:cfgScale"),step:.5,min:1.01,max:200,onChange:function(t){return e(P4(t))},value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center",isInteger:!1})}function Cye(){var e=kie((function(e){return e.generation.height})),t=kie(fae),n=wie(),r=o8().t;return no(Mae,{isDisabled:"unifiedCanvas"===t,label:r("parameters:height"),value:e,flexGrow:1,onChange:function(e){return n(L4(Number(e.target.value)))},validValues:gte,styleClass:"main-settings-block"})}var _ye=QX([function(e){return e.generation}],(function(e){return{iterations:e.iterations}}),{memoizeOptions:{resultEqualityCheck:dae}});function Eye(){var e=wie(),t=kie(_ye).iterations,n=o8().t;return no(Aae,{label:n("parameters:images"),step:1,min:1,max:9999,onChange:function(t){return e(T4(t))},value:t,width:"auto",labelFontSize:.5,styleClass:"main-settings-block",textAlign:"center"})}function Pye(){var e=kie((function(e){return e.generation.sampler})),t=kie(xle),n=wie(),r=o8().t;return no(Mae,{label:r("parameters:sampler"),value:e,onChange:function(e){return n(z4(e.target.value))},validValues:"diffusers"===t.format?pte:hte,styleClass:"main-settings-block"})}function Lye(){var e=wie(),t=kie((function(e){return e.generation.steps})),n=o8().t;return no(Aae,{label:n("parameters:steps"),min:1,max:9999,step:1,onChange:function(t){return e(Z4(t))},value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center"})}function Oye(){var e=kie((function(e){return e.generation.width})),t=kie(fae),n=o8().t,r=wie();return no(Mae,{isDisabled:"unifiedCanvas"===t,label:n("parameters:width"),value:e,flexGrow:1,onChange:function(e){return r(Q4(Number(e.target.value)))},validValues:vte,styleClass:"main-settings-block"})}function Aye(){return no("div",{className:"main-settings",children:ro("div",{className:"main-settings-list",children:[ro("div",{className:"main-settings-row",children:[no(Eye,{}),no(Lye,{}),no(Sye,{})]}),ro("div",{className:"main-settings-row",children:[no(Oye,{}),no(Cye,{}),no(Pye,{})]})]})})}var Mye=QX(wle,(function(e){return e.shouldDisplayGuides})),Tye=function(e){var t=e.children,n=e.feature,r=kie(Mye),o=oye(n).text;return r?ro(qU,{trigger:"hover",children:[no(nG,{children:no(cP,{children:t})}),ro(eG,{className:"guide-popover-content",maxWidth:"400px",onClick:function(e){return e.preventDefault()},cursor:"initial",children:[no(YU,{className:"guide-popover-arrow"}),no("div",{className:"guide-popover-guide-content",children:o})]})]}):null},Iye=Cv((function(e,t){var n=e.feature,r=e.icon;return no(Tye,{feature:n,children:no(cP,{ref:t,children:no(Gv,{marginBottom:"-.15rem",as:void 0===r?Efe:r})})})}));function Rye(e){var t=e.header,n=e.feature,r=e.content,o=e.additionalHeaderComponents;return ro(GC,{className:"advanced-parameters-item",children:[no(jC,{className:"advanced-parameters-header",children:ro(yP,{width:"100%",gap:"0.5rem",align:"center",children:[no(cP,{flexGrow:1,textAlign:"left",children:t}),o,n&&no(Iye,{feature:n}),no(UC,{})]})}),no(qC,{className:"advanced-parameters-panel",children:r})]})}var Nye=function(e){var t,n=e.accordionInfo,r=kie((function(e){return e.system.openAccordions})),o=wie();return no(YC,{defaultIndex:r,allowMultiple:!0,reduceMotion:!0,onChange:function(e){return o(h8(e))},className:"advanced-parameters",children:(t=[],n&&Object.keys(n).forEach((function(e){var r=n[e],o=r.header,i=r.feature,a=r.content,s=r.additionalHeaderComponents;t.push(no(Rye,{header:o,feature:i,content:a,additionalHeaderComponents:s},e))})),t)})},Dye=QX(wle,(function(e){return{isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}}),{memoizeOptions:{resultEqualityCheck:dae}});function zye(e){var t=Object.assign({},(Kt(e),e)),n=wie(),r=kie(Dye),o=r.isProcessing,i=r.isConnected,a=r.isCancelable,s=function(){return n(rie())},l=o8().t;return _ce("shift+x",(function(){(i||o)&&a&&s()}),[i,o,a]),no(_ae,un({icon:no(Mfe,{}),tooltip:l("parameters:cancel"),"aria-label":l("parameters:cancel"),isDisabled:!i||!o||!a,onClick:s,styleClass:"cancel-btn"},t))}var jye=function(e){return e.generation};QX(jye,(function(e){var t=e.shouldRandomizeSeed,n=e.shouldGenerateVariations;return t||n}),{memoizeOptions:{resultEqualityCheck:dae}});var Bye=QX([jye,wle,Ade,fae],(function(e,t,n,r){var o=e.prompt,i=e.shouldGenerateVariations,a=e.seedWeights,s=e.initialImage,l=e.seed,u=t.isProcessing,c=t.isConnected,d=!0,f=[];return o&&!Boolean(o.match(/^[\s\r\n]+$/))||(d=!1,f.push("Missing prompt")),"img2img"!==r||s||(d=!1,f.push("No initial image selected")),u&&(d=!1,f.push("System Busy")),c||(d=!1,f.push("System Disconnected")),i&&(!b4(a)&&""!==a||-1===l)&&(d=!1,f.push("Seed-Weights badly formatted.")),{isReady:d,reasonsWhyNotReady:f}}),{memoizeOptions:{equalityCheck:dae,resultEqualityCheck:dae}});function Fye(e){var t=e.iconButton,n=void 0!==t&&t,r=sn(e,Vt),o=wie(),i=kie(Bye).isReady,a=kie(fae),s=function(){o(Koe(a))},l=o8().t;return _ce(["ctrl+enter","meta+enter"],(function(){o(Koe(a))}),{enabled:function(){return i},preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,a]),no("div",{style:{flexGrow:4},children:n?no(_ae,un({"aria-label":l("parameters:invoke"),type:"submit",icon:no(fde,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:l("parameters:invoke"),tooltipProps:{placement:"bottom"}},r)):no(Eae,un(un({"aria-label":l("parameters:invoke"),type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn"},r),{},{children:"Invoke"}))})}var Hye=QX(Tae,(function(e){return e.shouldLoopback})),Vye=function(){var e=wie(),t=kie(Hye),n=o8().t;return no(_ae,{"aria-label":n("parameters:toggleLoopback"),tooltip:n("parameters:toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:no(vde,{}),onClick:function(){e(l6(!t))}})},Wye=function(){var e=kie(fae);return ro("div",{className:"process-buttons",children:[no(Fye,{}),"img2img"===e&&no(Vye,{}),no(zye,{})]})},Uye=function(){var e=kie((function(e){return e.generation.negativePrompt})),t=wie(),n=o8().t;return no(I_,{children:no(Qq,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:function(e){return t(D4(e.target.value))},background:"var(--prompt-bg-color)",placeholder:n("parameters:negativePrompts"),_placeholder:{fontSize:"0.8rem"},borderColor:"var(--border-color)",_hover:{borderColor:"var(--border-color-light)"},_focusVisible:{borderColor:"var(--border-color-invalid)",boxShadow:"0 0 10px var(--box-shadow-color-invalid)"},fontSize:"0.9rem",color:"var(--text-color-secondary)"})})},Gye=QX([function(e){return e.generation},fae],(function(e,t){return{prompt:e.prompt,activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:dae}}),qye=function(){var e=wie(),t=kie(Gye),n=t.prompt,r=t.activeTabName,o=kie(Bye).isReady,i=cr.useRef(null),a=o8().t;_ce("alt+a",(function(){var e;null===(e=i.current)||void 0===e||e.focus()}),[]);return no("div",{className:"prompt-bar",children:no(I_,{isInvalid:0===n.length||Boolean(n.match(/^[\s\r\n]+$/)),children:no(Qq,{id:"prompt",name:"prompt",placeholder:a("parameters:promptPlaceholder"),size:"lg",value:n,onChange:function(t){e(N4(t.target.value))},onKeyDown:function(t){"Enter"===t.key&&!1===t.shiftKey&&o&&(t.preventDefault(),e(Koe(r)))},resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})},Yye=""+new URL("logo-13003d72.png",Zt.meta.url).href,Zye=QX(pae,(function(e){return{shouldShowParametersPanel:e.shouldShowParametersPanel,shouldHoldParametersPanelOpen:e.shouldHoldParametersPanelOpen,shouldPinParametersPanel:e.shouldPinParametersPanel,parametersPanelScrollPosition:e.parametersPanelScrollPosition}}),{memoizeOptions:{resultEqualityCheck:dae}}),Xye=function(e){var t=wie(),n=kie(Zye),r=n.shouldShowParametersPanel,o=n.shouldHoldParametersPanelOpen,i=n.shouldPinParametersPanel,a=cr.useRef(null),s=cr.useRef(null),l=cr.useRef(null),u=e.children;_ce("o",(function(){t(V8(!r)),i&&setTimeout((function(){return t(m3(!0))}),400)}),[r,i]),_ce("esc",(function(){t(V8(!1))}),{enabled:function(){return!i},preventDefault:!0},[i]),_ce("shift+o",(function(){f(),t(m3(!0))}),[i]);var c=cr.useCallback((function(){i||(t(B8(s.current?s.current.scrollTop:0)),t(V8(!1)),t(F8(!1)))}),[t,i]),d=function(){l.current&&window.clearTimeout(l.current)},f=function(){t(H8(!i)),t(m3(!0))};return cr.useEffect((function(){function e(e){a.current&&!a.current.contains(e.target)&&c()}return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[c]),no(Yfe,{nodeRef:a,in:r||o&&!i,unmountOnExit:!0,timeout:200,classNames:"parameters-panel-wrapper",children:no("div",{className:"parameters-panel-wrapper","data-pinned":i,tabIndex:1,ref:a,onMouseEnter:i?void 0:d,onMouseOver:i?void 0:d,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:no("div",{className:"parameters-panel-margin",children:ro("div",{className:"parameters-panel",ref:s,onMouseLeave:function(e){e.target!==s.current?d():!i&&(l.current=window.setTimeout((function(){return c()}),500))},children:[no(kY,{label:"Pin Options Panel",children:no("div",{className:"parameters-panel-pin-button","data-selected":i,onClick:f,children:no(i?Sfe:Cfe,{})})}),!i&&ro("div",{className:"invoke-ai-logo-wrapper",children:[no("img",{src:Yye,alt:"invoke-ai-logo"}),ro("h1",{children:["invoke ",no("strong",{children:"ai"})]})]}),u]})})})})};function $ye(){var e=o8().t,t={seed:{header:"".concat(e("parameters:seed")),feature:rye.SEED,content:no(gye,{})},variations:{header:"".concat(e("parameters:variations")),feature:rye.VARIATIONS,content:no(xye,{}),additionalHeaderComponents:no(yye,{})},face_restore:{header:"".concat(e("parameters:faceRestoration")),feature:rye.FACE_CORRECTION,content:no(Cle,{}),additionalHeaderComponents:no(aye,{})},upscale:{header:"".concat(e("parameters:upscaling")),feature:rye.UPSCALE,content:no(Ele,{}),additionalHeaderComponents:no(mye,{})},other:{header:"".concat(e("parameters:otherOptions")),feature:rye.OTHER,content:no(cye,{})}},n=wie(),r=kie(fae);return cr.useEffect((function(){if("img2img"===r){n(a6(!1))}}),[r,n]),ro(Xye,{children:[ro(yP,{flexDir:"column",rowGap:"0.5rem",children:[no(qye,{}),no(Uye,{})]}),no(Wye,{}),no(Aye,{}),no(lye,{label:e("parameters:img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),no(sye,{}),no(Nye,{accordionInfo:t})]})}function Kye(){return no($me,{optionsPanel:no($ye,{}),children:no(nye,{})})}var Qye=function(){return no("div",{className:"workarea-single-view",children:no("div",{className:"text-to-image-area",children:no(Jme,{})})})},Jye=QX([Tae],(function(e){return{hiresFix:e.hiresFix,hiresStrength:e.hiresStrength}}),{memoizeOptions:{resultEqualityCheck:dae}}),ebe=function(){var e=kie(Jye),t=e.hiresFix,n=e.hiresStrength,r=wie(),o=o8().t;return no(xfe,{label:o("parameters:hiresStrength"),step:.01,min:.01,max:.99,onChange:function(e){r(s6(e))},value:n,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:function(){r(s6(.75))},isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t})},tbe=function(){var e=wie(),t=kie((function(e){return e.postprocessing.hiresFix})),n=o8().t;return ro(yP,{gap:2,direction:"column",children:[no(iye,{label:n("parameters:hiresOptim"),fontSize:"md",isChecked:t,onChange:function(t){return e(a6(t.target.checked))}}),no(ebe,{})]})},nbe=function(){return ro(yP,{gap:2,direction:"column",children:[no(uye,{}),no(tbe,{})]})};function rbe(){var e=o8().t,t={seed:{header:"".concat(e("parameters:seed")),feature:rye.SEED,content:no(gye,{})},variations:{header:"".concat(e("parameters:variations")),feature:rye.VARIATIONS,content:no(xye,{}),additionalHeaderComponents:no(yye,{})},face_restore:{header:"".concat(e("parameters:faceRestoration")),feature:rye.FACE_CORRECTION,content:no(Cle,{}),additionalHeaderComponents:no(aye,{})},upscale:{header:"".concat(e("parameters:upscaling")),feature:rye.UPSCALE,content:no(Ele,{}),additionalHeaderComponents:no(mye,{})},other:{header:"".concat(e("parameters:otherOptions")),feature:rye.OTHER,content:no(nbe,{})}};return ro(Xye,{children:[ro(yP,{flexDir:"column",rowGap:"0.5rem",children:[no(qye,{}),no(Uye,{})]}),no(Wye,{}),no(Aye,{}),no(Nye,{accordionInfo:t})]})}function obe(){return no($me,{optionsPanel:no(rbe,{}),children:no(Qye,{})})}var ibe={},abe={get exports(){return ibe},set exports(e){ibe=e}},sbe=function(e){var t={},n=cr,r=tA,o=Object.assign;function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),w=Symbol.iterator;function k(e){return null===e||"object"!==kn(e)?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}function x(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case l:return"Portal";case d:return"Profiler";case c:return"StrictMode";case v:return"Suspense";case g:return"SuspenseList"}if("object"===kn(e))switch(e.$$typeof){case h:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case p:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case m:return null!==(t=e.displayName||null)?t:x(e.type)||"Memo";case y:t=e._payload,e=e._init;try{return x(e(t))}catch(qke){}}return null}function S(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return x(t);case 8:return t===c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function C(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function _(e){if(C(e)!==e)throw Error(i(188))}function E(e){var t=e.alternate;if(!t){if(null===(t=C(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return _(o),e;if(a===r)return _(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}function P(e){return null!==(e=E(e))?L(e):null}function L(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=L(e);if(null!==t)return t;e=e.sibling}return null}function O(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var t=O(e);if(null!==t)return t}e=e.sibling}return null}var A,M=Array.isArray,T=e.getPublicInstance,I=e.getRootHostContext,R=e.getChildHostContext,N=e.prepareForCommit,D=e.resetAfterCommit,z=e.createInstance,j=e.appendInitialChild,B=e.finalizeInitialChildren,F=e.prepareUpdate,H=e.shouldSetTextContent,V=e.createTextInstance,W=e.scheduleTimeout,U=e.cancelTimeout,G=e.noTimeout,q=e.isPrimaryRenderer,Y=e.supportsMutation,Z=e.supportsPersistence,X=e.supportsHydration,$=e.getInstanceFromNode,K=e.preparePortalMount,Q=e.getCurrentEventPriority,J=e.detachDeletedInstance,ee=e.supportsMicrotasks,te=e.scheduleMicrotask,ne=e.supportsTestSelectors,re=e.findFiberRoot,oe=e.getBoundingRect,ie=e.getTextContent,ae=e.isHiddenSubtree,se=e.matchAccessibilityRole,le=e.setFocusIfFocusable,ue=e.setupIntersectionObserver,ce=e.appendChild,de=e.appendChildToContainer,fe=e.commitTextUpdate,he=e.commitMount,pe=e.commitUpdate,ve=e.insertBefore,ge=e.insertInContainerBefore,me=e.removeChild,ye=e.removeChildFromContainer,be=e.resetTextContent,we=e.hideInstance,ke=e.hideTextInstance,xe=e.unhideInstance,Se=e.unhideTextInstance,Ce=e.clearContainer,_e=e.cloneInstance,Ee=e.createContainerChildSet,Pe=e.appendChildToContainerChildSet,Le=e.finalizeContainerChildren,Oe=e.replaceContainerChildren,Ae=e.cloneHiddenInstance,Me=e.cloneHiddenTextInstance,Te=e.canHydrateInstance,Ie=e.canHydrateTextInstance,Re=e.canHydrateSuspenseInstance,Ne=e.isSuspenseInstancePending,De=e.isSuspenseInstanceFallback,ze=e.getSuspenseInstanceFallbackErrorDetails,je=e.registerSuspenseInstanceRetry,Be=e.getNextHydratableSibling,Fe=e.getFirstHydratableChild,He=e.getFirstHydratableChildWithinContainer,Ve=e.getFirstHydratableChildWithinSuspenseInstance,We=e.hydrateInstance,Ue=e.hydrateTextInstance,Ge=e.hydrateSuspenseInstance,qe=e.getNextHydratableInstanceAfterSuspenseInstance,Ye=e.commitHydratedContainer,Ze=e.commitHydratedSuspenseInstance,Xe=e.clearSuspenseBoundary,$e=e.clearSuspenseBoundaryFromContainer,Ke=e.shouldDeleteUnhydratedTailInstances,Qe=e.didNotMatchHydratedContainerTextInstance,Je=e.didNotMatchHydratedTextInstance;function et(e){if(void 0===A)try{throw Error()}catch(qke){var t=qke.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var tt=!1;function nt(e,t){if(!e||tt)return"";tt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":kn(Reflect))&&Reflect.construct){try{Reflect.construct(t,[])}catch(hpe){var r=hpe}Reflect.construct(e,[],t)}else{try{t.call()}catch(hpe){r=hpe}e.call(t.prototype)}else{try{throw Error()}catch(hpe){r=hpe}e()}}catch(hpe){if(hpe&&r&&"string"==typeof hpe.stack){for(var o=hpe.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{tt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=Object.prototype.hasOwnProperty,ot=[],it=-1;function at(e){return{current:e}}function st(e){0>it||(e.current=ot[it],ot[it]=null,it--)}function lt(e,t){it++,ot[it]=e.current,e.current=t}var ut={},ct=at(ut),dt=at(!1),ft=ut;function ht(e,t){var n=e.type.contextTypes;if(!n)return ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pt(e){return null!=(e=e.childContextTypes)}function vt(){st(dt),st(ct)}function gt(e,t,n){if(ct.current!==ut)throw Error(i(168));lt(ct,t),lt(dt,n)}function mt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(i(108,S(e)||"Unknown",a));return o({},n,r)}function yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ut,ft=ct.current,lt(ct,e),lt(dt,dt.current),!0}function bt(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=mt(e,t,ft),r.__reactInternalMemoizedMergedChildContext=e,st(dt),st(ct),lt(ct,e)):st(dt),lt(dt,n)}var wt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(kt(e)/xt|0)|0},kt=Math.log,xt=Math.LN2;var St=64,Ct=4194304;function _t(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Et(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=_t(s):0!==(i&=a)&&(r=_t(i))}else 0!==(a=n&~o)?r=_t(a):0!==i&&(r=_t(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-wt(t)),r|=e[n],t&=~o;return r}function Pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Lt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ot(){var e=St;return 0==(4194240&(St<<=1))&&(St=64),e}function At(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-wt(t)]=n}function Tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var It=0;function Rt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Nt=r.unstable_scheduleCallback,Dt=r.unstable_cancelCallback,zt=r.unstable_shouldYield,jt=r.unstable_requestPaint,Bt=r.unstable_now,Ft=r.unstable_ImmediatePriority,Ht=r.unstable_UserBlockingPriority,Vt=r.unstable_NormalPriority,Wt=r.unstable_IdlePriority,Ut=null,Gt=null;var qt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Yt=null,Zt=!1,Xt=!1;function $t(e){null===Yt?Yt=[e]:Yt.push(e)}function Kt(){if(!Xt&&null!==Yt){Xt=!0;var e=0,t=It;try{var n=Yt;for(It=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Yt=null,Zt=!1}catch(Dhe){throw null!==Yt&&(Yt=Yt.slice(e+1)),Nt(Ft,Kt),Dhe}finally{It=t,Xt=!1}}return null}var Qt=[],Jt=0,en=null,tn=0,nn=[],rn=0,on=null,an=1,sn="";function ln(e,t){Qt[Jt++]=tn,Qt[Jt++]=en,en=e,tn=t}function un(e,t,n){nn[rn++]=an,nn[rn++]=sn,nn[rn++]=on,on=e;var r=an;e=sn;var o=32-wt(r)-1;r&=~(1<<o),n+=1;var i=32-wt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,an=1<<32-wt(t)+o|n<<o|r,sn=i+e}else an=1<<i|n<<o|r,sn=e}function cn(e){null!==e.return&&(ln(e,1),un(e,1,0))}function dn(e){for(;e===en;)en=Qt[--Jt],Qt[Jt]=null,tn=Qt[--Jt],Qt[Jt]=null;for(;e===on;)on=nn[--rn],nn[rn]=null,sn=nn[--rn],nn[rn]=null,an=nn[--rn],nn[rn]=null}var fn=null,hn=null,pn=!1,vn=!1,gn=null;function mn(e,t){var n=ls(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function yn(e,t){switch(e.tag){case 5:return null!==(t=Te(t,e.type,e.pendingProps))&&(e.stateNode=t,fn=e,hn=Fe(t),!0);case 6:return null!==(t=Ie(t,e.pendingProps))&&(e.stateNode=t,fn=e,hn=null,!0);case 13:if(null!==(t=Re(t))){var n=null!==on?{id:an,overflow:sn}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=ls(18,null,null,0)).stateNode=t,n.return=e,e.child=n,fn=e,hn=null,!0}return!1;default:return!1}}function bn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function wn(e){if(pn){var t=hn;if(t){var n=t;if(!yn(e,t)){if(bn(e))throw Error(i(418));t=Be(n);var r=fn;t&&yn(e,t)?mn(r,n):(e.flags=-4097&e.flags|2,pn=!1,fn=e)}}else{if(bn(e))throw Error(i(418));e.flags=-4097&e.flags|2,pn=!1,fn=e}}}function xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;fn=e}function Sn(e){if(!X||e!==fn)return!1;if(!pn)return xn(e),pn=!0,!1;if(3!==e.tag&&(5!==e.tag||Ke(e.type)&&!H(e.type,e.memoizedProps))){var t=hn;if(t){if(bn(e))throw Cn(),Error(i(418));for(;t;)mn(e,t),t=Be(t)}}if(xn(e),13===e.tag){if(!X)throw Error(i(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));hn=qe(e)}else hn=fn?Be(e.stateNode):null;return!0}function Cn(){for(var e=hn;e;)e=Be(e)}function _n(){X&&(hn=fn=null,vn=pn=!1)}function En(e){null===gn?gn=[e]:gn.push(e)}var Pn=a.ReactCurrentBatchConfig;function Ln(e,t){if(qt(e,t))return!0;if("object"!==kn(e)||null===e||"object"!==kn(t)||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!rt.call(t,o)||!qt(e[o],t[o]))return!1}return!0}function On(e){switch(e.tag){case 5:return et(e.type);case 16:return et("Lazy");case 13:return et("Suspense");case 19:return et("SuspenseList");case 0:case 2:case 15:return e=nt(e.type,!1);case 11:return e=nt(e.type.render,!1);case 1:return e=nt(e.type,!0);default:return""}}function An(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Mn=at(null),Tn=null,In=null,Rn=null;function Nn(){Rn=In=Tn=null}function Dn(e,t,n){q?(lt(Mn,t._currentValue),t._currentValue=n):(lt(Mn,t._currentValue2),t._currentValue2=n)}function zn(e){var t=Mn.current;st(Mn),q?e._currentValue=t:e._currentValue2=t}function jn(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bn(e,t){Tn=e,Rn=In=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Do=!0),e.firstContext=null)}function Fn(e){var t=q?e._currentValue:e._currentValue2;if(Rn!==e)if(e={context:e,memoizedValue:t,next:null},null===In){if(null===Tn)throw Error(i(308));In=e,Tn.dependencies={lanes:0,firstContext:e}}else In=In.next=e;return t}var Hn=null;function Vn(e){null===Hn?Hn=[e]:Hn.push(e)}function Wn(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Vn(t)):(n.next=o.next,o.next=n),t.interleaved=n,Un(e,r)}function Un(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Gn=!1;function qn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xn(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&oa)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Un(e,n)}return null===(o=r.interleaved)?(t.next=t,Vn(r)):(t.next=o.next,o.next=t),r.interleaved=t,Un(e,n)}function $n(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Tt(e,n)}}function Kn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qn(e,t,n,r){var i=e.updateQueue;Gn=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?a=c:s.next=c,s=u;var d=e.alternate;null!==d&&((l=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===l?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(null!==a){var f=i.baseState;for(s=0,d=c=u=null,l=a;;){var h=l.lane,p=l.eventTime;if((r&h)===h){null!==d&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,g=l;switch(h=t,p=n,g.tag){case 1:if("function"==typeof(v=g.payload)){f=v.call(p,f,h);break e}f=v;break e;case 3:v.flags=-65537&v.flags|128;case 0:if(null==(h="function"==typeof(v=g.payload)?v.call(p,f,h):v))break e;f=o({},f,h);break e;case 2:Gn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(c=d=p,u=f):d=d.next=p,s|=h;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(h=l).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===d&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);fa|=s,e.lanes=s,e.memoizedState=f}}function Jn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(i(191,o));o.call(r)}}}var er=(new n.Component).refs;function tr(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var nr={isMounted:function(e){return!!(e=e._reactInternals)&&C(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ta(),o=Ia(e),i=Zn(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Xn(e,i,o))&&(Ra(t,e,o,r),$n(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ta(),o=Ia(e),i=Zn(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Xn(e,i,o))&&(Ra(t,e,o,r),$n(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ta(),r=Ia(e),o=Zn(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Xn(e,o,r))&&(Ra(t,e,r,n),$n(t,e,r))}};function rr(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ln(n,r)||!Ln(o,i))}function or(e,t,n){var r=!1,o=ut,i=t.contextType;return"object"===kn(i)&&null!==i?i=Fn(i):(o=pt(t)?ft:ct.current,i=(r=null!=(r=t.contextTypes))?ht(e,o):ut),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=nr,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ir(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&nr.enqueueReplaceState(t,t.state,null)}function ar(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=er,qn(e);var i=t.contextType;"object"===kn(i)&&null!==i?o.context=Fn(i):(i=pt(t)?ft:ct.current,o.context=ht(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(tr(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&nr.enqueueReplaceState(o,o.state,null),Qn(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function sr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!==kn(e)){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===er&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function lr(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ur(e){return(0,e._init)(e._payload)}function dr(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=cs(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function c(t){return e&&null===t.alternate&&(t.flags|=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=ps(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n,r){var i=n.type;return i===u?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===kn(i)&&null!==i&&i.$$typeof===y&&ur(i)===t.type)?((r=o(t,n.props)).ref=sr(e,t,n),r.return=e,r):((r=ds(n.type,n.key,n.props,null,e.mode,r)).ref=sr(e,t,n),r.return=e,r)}function h(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=vs(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function p(e,t,n,r,i){return null===t||7!==t.tag?((t=fs(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function v(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=ps(""+t,e.mode,n)).return=e,t;if("object"===kn(t)&&null!==t){switch(t.$$typeof){case s:return(n=ds(t.type,t.key,t.props,null,e.mode,n)).ref=sr(e,null,t),n.return=e,n;case l:return(t=vs(t,e.mode,n)).return=e,t;case y:return v(e,(0,t._init)(t._payload),n)}if(M(t)||k(t))return(t=fs(t,e.mode,n,null)).return=e,t;lr(e,t)}return null}function g(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:d(e,t,""+n,r);if("object"===kn(n)&&null!==n){switch(n.$$typeof){case s:return n.key===o?f(e,t,n,r):null;case l:return n.key===o?h(e,t,n,r):null;case y:return g(e,t,(o=n._init)(n._payload),r)}if(M(n)||k(n))return null!==o?null:p(e,t,n,r,null);lr(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,o);if("object"===kn(r)&&null!==r){switch(r.$$typeof){case s:return f(t,e=e.get(null===r.key?n:r.key)||null,r,o);case l:return h(t,e=e.get(null===r.key?n:r.key)||null,r,o);case y:return m(e,t,n,(0,r._init)(r._payload),o)}if(M(r)||k(r))return p(t,e=e.get(n)||null,r,o,null);lr(t,r)}return null}function b(o,i,s,l){for(var u=null,c=null,d=i,f=i=0,h=null;null!==d&&f<s.length;f++){d.index>f?(h=d,d=null):h=d.sibling;var p=g(o,d,s[f],l);if(null===p){null===d&&(d=h);break}e&&d&&null===p.alternate&&t(o,d),i=a(p,i,f),null===c?u=p:c.sibling=p,c=p,d=h}if(f===s.length)return n(o,d),pn&&ln(o,f),u;if(null===d){for(;f<s.length;f++)null!==(d=v(o,s[f],l))&&(i=a(d,i,f),null===c?u=d:c.sibling=d,c=d);return pn&&ln(o,f),u}for(d=r(o,d);f<s.length;f++)null!==(h=m(d,o,f,s[f],l))&&(e&&null!==h.alternate&&d.delete(null===h.key?f:h.key),i=a(h,i,f),null===c?u=h:c.sibling=h,c=h);return e&&d.forEach((function(e){return t(o,e)})),pn&&ln(o,f),u}function w(o,s,l,u){var c=k(l);if("function"!=typeof c)throw Error(i(150));if(null==(l=c.call(l)))throw Error(i(151));for(var d=c=null,f=s,h=s=0,p=null,y=l.next();null!==f&&!y.done;h++,y=l.next()){f.index>h?(p=f,f=null):p=f.sibling;var b=g(o,f,y.value,u);if(null===b){null===f&&(f=p);break}e&&f&&null===b.alternate&&t(o,f),s=a(b,s,h),null===d?c=b:d.sibling=b,d=b,f=p}if(y.done)return n(o,f),pn&&ln(o,h),c;if(null===f){for(;!y.done;h++,y=l.next())null!==(y=v(o,y.value,u))&&(s=a(y,s,h),null===d?c=y:d.sibling=y,d=y);return pn&&ln(o,h),c}for(f=r(o,f);!y.done;h++,y=l.next())null!==(y=m(f,o,h,y.value,u))&&(e&&null!==y.alternate&&f.delete(null===y.key?h:y.key),s=a(y,s,h),null===d?c=y:d.sibling=y,d=y);return e&&f.forEach((function(e){return t(o,e)})),pn&&ln(o,h),c}return function e(r,i,a,d){if("object"===kn(a)&&null!==a&&a.type===u&&null===a.key&&(a=a.props.children),"object"===kn(a)&&null!==a){switch(a.$$typeof){case s:e:{for(var f=a.key,h=i;null!==h;){if(h.key===f){if((f=a.type)===u){if(7===h.tag){n(r,h.sibling),(i=o(h,a.props.children)).return=r,r=i;break e}}else if(h.elementType===f||"object"===kn(f)&&null!==f&&f.$$typeof===y&&ur(f)===h.type){n(r,h.sibling),(i=o(h,a.props)).ref=sr(r,h,a),i.return=r,r=i;break e}n(r,h);break}t(r,h),h=h.sibling}a.type===u?((i=fs(a.props.children,r.mode,d,a.key)).return=r,r=i):((d=ds(a.type,a.key,a.props,null,r.mode,d)).ref=sr(r,i,a),d.return=r,r=d)}return c(r);case l:e:{for(h=a.key;null!==i;){if(i.key===h){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=vs(a,r.mode,d)).return=r,r=i}return c(r);case y:return e(r,i,(h=a._init)(a._payload),d)}if(M(a))return b(r,i,a,d);if(k(a))return w(r,i,a,d);lr(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=ps(a,r.mode,d)).return=r,r=i),c(r)):n(r,i)}}var fr=dr(!0),hr=dr(!1),pr={},vr=at(pr),gr=at(pr),mr=at(pr);function yr(e){if(e===pr)throw Error(i(174));return e}function br(e,t){lt(mr,t),lt(gr,e),lt(vr,pr),e=I(t),st(vr),lt(vr,e)}function wr(){st(vr),st(gr),st(mr)}function kr(e){var t=yr(mr.current),n=yr(vr.current);n!==(t=R(n,e.type,t))&&(lt(gr,e),lt(vr,t))}function xr(e){gr.current===e&&(st(vr),st(gr))}var Sr=at(0);function Cr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ne(n)||De(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _r=[];function Er(){for(var e=0;e<_r.length;e++){var t=_r[e];q?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}_r.length=0}var Pr=a.ReactCurrentDispatcher,Lr=a.ReactCurrentBatchConfig,Or=0,Ar=null,Mr=null,Tr=null,Ir=!1,Rr=!1,Nr=0,Dr=0;function zr(){throw Error(i(321))}function jr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qt(e[n],t[n]))return!1;return!0}function Br(e,t,n,r,o,a){if(Or=a,Ar=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pr.current=null===e||null===e.memoizedState?So:Co,e=n(r,o),Rr){a=0;do{if(Rr=!1,Nr=0,25<=a)throw Error(i(301));a+=1,Tr=Mr=null,t.updateQueue=null,Pr.current=_o,e=n(r,o)}while(Rr)}if(Pr.current=xo,t=null!==Mr&&null!==Mr.next,Or=0,Tr=Mr=Ar=null,Ir=!1,t)throw Error(i(300));return e}function Fr(){var e=0!==Nr;return Nr=0,e}function Hr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Tr?Ar.memoizedState=Tr=e:Tr=Tr.next=e,Tr}function Vr(){if(null===Mr){var e=Ar.alternate;e=null!==e?e.memoizedState:null}else e=Mr.next;var t=null===Tr?Ar.memoizedState:Tr.next;if(null!==t)Tr=t,Mr=e;else{if(null===e)throw Error(i(310));e={memoizedState:(Mr=e).memoizedState,baseState:Mr.baseState,baseQueue:Mr.baseQueue,queue:Mr.queue,next:null},null===Tr?Ar.memoizedState=Tr=e:Tr=Tr.next=e}return Tr}function Wr(e,t){return"function"==typeof t?t(e):t}function Ur(e){var t=Vr(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=Mr,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=s=null,u=null,c=a;do{var d=c.lane;if((Or&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=r):u=u.next=f,Ar.lanes|=d,fa|=d}c=c.next}while(null!==c&&c!==a);null===u?s=r:u.next=l,qt(r,t.memoizedState)||(Do=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,Ar.lanes|=a,fa|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Gr(e){var t=Vr(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);qt(a,t.memoizedState)||(Do=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function qr(){}function Yr(e,t){var n=Ar,r=Vr(),o=t(),a=!qt(r.memoizedState,o);if(a&&(r.memoizedState=o,Do=!0),r=r.queue,io($r.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Tr&&1&Tr.memoizedState.tag){if(n.flags|=2048,eo(9,Xr.bind(null,n,r,o,t),void 0,null),null===ia)throw Error(i(349));0!=(30&Or)||Zr(n,t,o)}return o}function Zr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ar.updateQueue)?(t={lastEffect:null,stores:null},Ar.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Xr(e,t,n,r){t.value=n,t.getSnapshot=r,Kr(t)&&Qr(e)}function $r(e,t,n){return n((function(){Kr(t)&&Qr(e)}))}function Kr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qt(e,n)}catch(Kke){return!0}}function Qr(e){var t=Un(e,1);null!==t&&Ra(t,e,1,-1)}function Jr(e){var t=Hr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:e},t.queue=e,e=e.dispatch=yo.bind(null,Ar,e),[t.memoizedState,e]}function eo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ar.updateQueue)?(t={lastEffect:null,stores:null},Ar.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function to(){return Vr().memoizedState}function no(e,t,n,r){var o=Hr();Ar.flags|=e,o.memoizedState=eo(1|t,n,void 0,void 0===r?null:r)}function ro(e,t,n,r){var o=Vr();r=void 0===r?null:r;var i=void 0;if(null!==Mr){var a=Mr.memoizedState;if(i=a.destroy,null!==r&&jr(r,a.deps))return void(o.memoizedState=eo(t,n,i,r))}Ar.flags|=e,o.memoizedState=eo(1|t,n,i,r)}function oo(e,t){return no(8390656,8,e,t)}function io(e,t){return ro(2048,8,e,t)}function ao(e,t){return ro(4,2,e,t)}function so(e,t){return ro(4,4,e,t)}function lo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function uo(e,t,n){return n=null!=n?n.concat([e]):null,ro(4,4,lo.bind(null,t,e),n)}function co(){}function fo(e,t){var n=Vr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&jr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ho(e,t){var n=Vr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&jr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function po(e,t,n){return 0==(21&Or)?(e.baseState&&(e.baseState=!1,Do=!0),e.memoizedState=n):(qt(n,t)||(n=Ot(),Ar.lanes|=n,fa|=n,e.baseState=!0),t)}function vo(e,t){var n=It;It=0!==n&&4>n?n:4,e(!0);var r=Lr.transition;Lr.transition={};try{e(!1),t()}finally{It=n,Lr.transition=r}}function go(){return Vr().memoizedState}function mo(e,t,n){var r=Ia(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bo(e))wo(t,n);else if(null!==(n=Wn(e,t,n,r))){Ra(n,e,r,Ta()),ko(n,t,r)}}function yo(e,t,n){var r=Ia(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bo(e))wo(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,qt(s,a)){var l=t.interleaved;return null===l?(o.next=o,Vn(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(hpe){}null!==(n=Wn(e,t,o,r))&&(Ra(n,e,r,o=Ta()),ko(n,t,r))}}function bo(e){var t=e.alternate;return e===Ar||null!==t&&t===Ar}function wo(e,t){Rr=Ir=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ko(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Tt(e,n)}}var xo={readContext:Fn,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useInsertionEffect:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useSyncExternalStore:zr,useId:zr,unstable_isNewReconciler:!1},So={readContext:Fn,useCallback:function(e,t){return Hr().memoizedState=[e,void 0===t?null:t],e},useContext:Fn,useEffect:oo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,no(4194308,4,lo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return no(4194308,4,e,t)},useInsertionEffect:function(e,t){return no(4,2,e,t)},useMemo:function(e,t){var n=Hr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mo.bind(null,Ar,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Hr().memoizedState=e},useState:Jr,useDebugValue:co,useDeferredValue:function(e){return Hr().memoizedState=e},useTransition:function(){var e=Jr(!1),t=e[0];return e=vo.bind(null,e[1]),Hr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ar,o=Hr();if(pn){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===ia)throw Error(i(349));0!=(30&Or)||Zr(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,oo($r.bind(null,r,a,e),[e]),r.flags|=2048,eo(9,Xr.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Hr(),t=ia.identifierPrefix;if(pn){var n=sn;t=":"+t+"R"+(n=(an&~(1<<32-wt(an)-1)).toString(32)+n),0<(n=Nr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Dr++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Co={readContext:Fn,useCallback:fo,useContext:Fn,useEffect:io,useImperativeHandle:uo,useInsertionEffect:ao,useLayoutEffect:so,useMemo:ho,useReducer:Ur,useRef:to,useState:function(){return Ur(Wr)},useDebugValue:co,useDeferredValue:function(e){return po(Vr(),Mr.memoizedState,e)},useTransition:function(){return[Ur(Wr)[0],Vr().memoizedState]},useMutableSource:qr,useSyncExternalStore:Yr,useId:go,unstable_isNewReconciler:!1},_o={readContext:Fn,useCallback:fo,useContext:Fn,useEffect:io,useImperativeHandle:uo,useInsertionEffect:ao,useLayoutEffect:so,useMemo:ho,useReducer:Gr,useRef:to,useState:function(){return Gr(Wr)},useDebugValue:co,useDeferredValue:function(e){var t=Vr();return null===Mr?t.memoizedState=e:po(t,Mr.memoizedState,e)},useTransition:function(){return[Gr(Wr)[0],Vr().memoizedState]},useMutableSource:qr,useSyncExternalStore:Yr,useId:go,unstable_isNewReconciler:!1};function Eo(e,t){try{var n="",r=t;do{n+=On(r),r=r.return}while(r);var o=n}catch(Xke){o="\nError generating stack: "+Xke.message+"\n"+Xke.stack}return{value:e,source:t,stack:o,digest:null}}function Po(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Lo(e,t){try{console.error(t.value)}catch(qke){setTimeout((function(){throw qke}))}}var Oo="function"==typeof WeakMap?WeakMap:Map;function Ao(e,t,n){(n=Zn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xa||(xa=!0,Sa=r),Lo(0,t)},n}function Mo(e,t,n){(n=Zn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Lo(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){Lo(0,t),"function"!=typeof r&&(null===Ca?Ca=new Set([this]):Ca.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function To(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Oo;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=ns.bind(null,e,t,n),t.then(e,e))}function Io(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ro(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Zn(-1,1)).tag=2,Xn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var No=a.ReactCurrentOwner,Do=!1;function zo(e,t,n,r){t.child=null===e?hr(t,null,n,r):fr(t,e.child,n,r)}function jo(e,t,n,r,o){n=n.render;var i=t.ref;return Bn(t,o),r=Br(e,t,n,r,i,o),n=Fr(),null===e||Do?(pn&&n&&cn(t),t.flags|=1,zo(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,si(e,t,o))}function Bo(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||us(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ds(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Fo(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Ln)(a,r)&&e.ref===t.ref)return si(e,t,o)}return t.flags|=1,(e=cs(i,r)).ref=t.ref,e.return=t,t.child=e}function Fo(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Ln(i,r)&&e.ref===t.ref){if(Do=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,si(e,t,o);0!=(131072&e.flags)&&(Do=!0)}}return Wo(e,t,n,r,o)}function Ho(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(ua,la),la|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lt(ua,la),la|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,lt(ua,la),la|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,lt(ua,la),la|=r;return zo(e,t,o,n),t.child}function Vo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wo(e,t,n,r,o){var i=pt(n)?ft:ct.current;return i=ht(t,i),Bn(t,o),n=Br(e,t,n,r,i,o),r=Fr(),null===e||Do?(pn&&r&&cn(t),t.flags|=1,zo(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,si(e,t,o))}function Uo(e,t,n,r,o){if(pt(n)){var i=!0;yt(t)}else i=!1;if(Bn(t,o),null===t.stateNode)ai(e,t),or(t,n,r),ar(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===kn(u)&&null!==u?u=Fn(u):u=ht(t,u=pt(n)?ft:ct.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ir(t,a,r,u),Gn=!1;var f=t.memoizedState;a.state=f,Qn(t,r,a,o),l=t.memoizedState,s!==r||f!==l||dt.current||Gn?("function"==typeof c&&(tr(t,n,c,r),l=t.memoizedState),(s=Gn||rr(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Yn(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:An(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===kn(l=n.contextType)&&null!==l?l=Fn(l):l=ht(t,l=pt(n)?ft:ct.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ir(t,a,r,l),Gn=!1,f=t.memoizedState,a.state=f,Qn(t,r,a,o);var p=t.memoizedState;s!==d||f!==p||dt.current||Gn?("function"==typeof h&&(tr(t,n,h,r),p=t.memoizedState),(u=Gn||rr(t,n,u,r,f,p,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Go(e,t,n,r,i,o)}function Go(e,t,n,r,o,i){Vo(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&bt(t,n,!1),si(e,t,i);r=t.stateNode,No.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=fr(t,e.child,null,i),t.child=fr(t,null,s,i)):zo(e,t,s,i),t.memoizedState=r.state,o&&bt(t,n,!0),t.child}function qo(e){var t=e.stateNode;t.pendingContext?gt(0,t.pendingContext,t.pendingContext!==t.context):t.context&>(0,t.context,!1),br(e,t.containerInfo)}function Yo(e,t,n,r,o){return _n(),En(o),t.flags|=256,zo(e,t,n,r),t.child}var Zo,Xo,$o,Ko,Qo={dehydrated:null,treeContext:null,retryLane:0};function Jo(e){return{baseLanes:e,cachePool:null,transitions:null}}function ei(e,t,n){var r,o=t.pendingProps,a=Sr.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),lt(Sr,1&a),null===e)return wn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:De(e)?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=hs(l,o,0,null),e=fs(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Jo(n),t.memoizedState=Qo,e):ti(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,ni(e,t,s,r=Po(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=hs({mode:"visible",children:r.children},o,0,null),(a=fs(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&fr(t,e.child,null,s),t.child.memoizedState=Jo(s),t.memoizedState=Qo,a);if(0==(1&t.mode))return ni(e,t,s,null);if(De(o))return r=ze(o).digest,a=Error(i(419)),r=Po(a,r,void 0),ni(e,t,s,r);if(n=0!=(s&e.childLanes),Do||n){if(null!==(r=ia)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Un(e,o),Ra(r,e,o,-1))}return qa(),ni(e,t,s,r=Po(Error(i(421))))}return Ne(o)?(t.flags|=128,t.child=e.child,t=os.bind(null,e),je(o,t),null):(e=a.treeContext,X&&(hn=Ve(o),fn=t,pn=!0,gn=null,vn=!1,null!==e&&(nn[rn++]=an,nn[rn++]=sn,nn[rn++]=on,an=e.id,sn=e.overflow,on=t)),t=ti(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,a,n);if(s){s=o.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=cs(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=cs(r,s):(s=fs(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Jo(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Qo,o}return e=(s=e.child).sibling,o=cs(s,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function ti(e,t){return(t=hs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ni(e,t,n,r){return null!==r&&En(r),fr(t,e.child,null,n),(e=ti(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ri(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),jn(e.return,t,n)}function oi(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function ii(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(zo(e,t,r.children,n),0!=(2&(r=Sr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ri(e,n,t);else if(19===e.tag)ri(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(lt(Sr,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Cr(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),oi(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Cr(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}oi(t,!0,n,null,i);break;case"together":oi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ai(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function si(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),fa|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=cs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=cs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function li(e){e.flags|=4}function ui(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(Y)Zo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Xo=function(){},$o=function(e,t,n,r,o){if((e=e.memoizedProps)!==r){var i=t.stateNode,a=yr(vr.current);n=F(i,n,e,r,o,a),(t.updateQueue=n)&&li(t)}},Ko=function(e,t,n,r){n!==r&&li(t)};else if(Z){Zo=function(e,t,n,r){for(var o=t.child;null!==o;){if(5===o.tag){var i=o.stateNode;n&&r&&(i=Ae(i,o.type,o.memoizedProps,o)),j(e,i)}else if(6===o.tag)i=o.stateNode,n&&r&&(i=Me(i,o.memoizedProps,o)),j(e,i);else if(4!==o.tag)if(22===o.tag&&null!==o.memoizedState)null!==(i=o.child)&&(i.return=o),Zo(e,o,!0,!0);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};var ci=function e(t,n,r,o){for(var i=n.child;null!==i;){if(5===i.tag){var a=i.stateNode;r&&o&&(a=Ae(a,i.type,i.memoizedProps,i)),Pe(t,a)}else if(6===i.tag)a=i.stateNode,r&&o&&(a=Me(a,i.memoizedProps,i)),Pe(t,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),e(t,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===n)break;for(;null===i.sibling;){if(null===i.return||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};Xo=function(e,t){var n=t.stateNode;if(!ui(e,t)){e=n.containerInfo;var r=Ee(e);ci(r,t,!1,!1),n.pendingChildren=r,li(t),Le(e,r)}},$o=function(e,t,n,r,o){var i=e.stateNode,a=e.memoizedProps;if((e=ui(e,t))&&a===r)t.stateNode=i;else{var s=t.stateNode,l=yr(vr.current),u=null;a!==r&&(u=F(s,n,a,r,o,l)),e&&null===u?t.stateNode=i:(i=_e(i,u,n,a,r,t,e,s),B(i,n,r,o,l)&&li(t),t.stateNode=i,e?li(t):Zo(i,t,!1,!1))}},Ko=function(e,t,n,r){n!==r?(e=yr(mr.current),n=yr(vr.current),t.stateNode=V(r,e,n,t),li(t)):t.stateNode=e.stateNode}}else Xo=function(){},$o=function(){},Ko=function(){};function di(e,t){if(!pn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hi(e,t,n){var r=t.pendingProps;switch(dn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fi(t),null;case 1:case 17:return pt(t.type)&&vt(),fi(t),null;case 3:return n=t.stateNode,wr(),st(dt),st(ct),Er(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(Sn(t)?li(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==gn&&(ja(gn),gn=null))),Xo(e,t),fi(t),null;case 5:xr(t),n=yr(mr.current);var o=t.type;if(null!==e&&null!=t.stateNode)$o(e,t,o,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return fi(t),null}if(e=yr(vr.current),Sn(t)){if(!X)throw Error(i(175));e=We(t.stateNode,t.type,t.memoizedProps,n,e,t,!vn),t.updateQueue=e,null!==e&&li(t)}else{var a=z(o,r,n,e,t);Zo(a,t,!1,!1),t.stateNode=a,B(a,o,r,n,e)&&li(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return fi(t),null;case 6:if(e&&null!=t.stateNode)Ko(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=yr(mr.current),n=yr(vr.current),Sn(t)){if(!X)throw Error(i(176));if(e=t.stateNode,n=t.memoizedProps,(r=Ue(e,n,t,!vn))&&null!==(o=fn))switch(o.tag){case 3:Qe(o.stateNode.containerInfo,e,n,0!=(1&o.mode));break;case 5:Je(o.type,o.memoizedProps,o.stateNode,e,n,0!=(1&o.mode))}r&&li(t)}else t.stateNode=V(r,e,n,t)}return fi(t),null;case 13:if(st(Sr),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(pn&&null!==hn&&0!=(1&t.mode)&&0==(128&t.flags))Cn(),_n(),t.flags|=98560,o=!1;else if(o=Sn(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(i(318));if(!X)throw Error(i(344));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(i(317));Ge(o,t)}else _n(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fi(t),o=!1}else null!==gn&&(ja(gn),gn=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((n=null!==r)!==(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&Sr.current)?0===ca&&(ca=3):qa())),null!==t.updateQueue&&(t.flags|=4),fi(t),null);case 4:return wr(),Xo(e,t),null===e&&K(t.stateNode.containerInfo),fi(t),null;case 10:return zn(t.type._context),fi(t),null;case 19:if(st(Sr),null===(o=t.memoizedState))return fi(t),null;if(r=0!=(128&t.flags),null===(a=o.rendering))if(r)di(o,!1);else{if(0!==ca||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=Cr(e))){for(t.flags|=128,di(o,!1),null!==(e=a.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,n=t.child;null!==n;)o=e,(r=n).flags&=14680066,null===(a=r.alternate)?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,o=a.dependencies,r.dependencies=null===o?null:{lanes:o.lanes,firstContext:o.firstContext}),n=n.sibling;return lt(Sr,1&Sr.current|2),t.child}e=e.sibling}null!==o.tail&&Bt()>ya&&(t.flags|=128,r=!0,di(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Cr(a))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),di(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!pn)return fi(t),null}else 2*Bt()-o.renderingStartTime>ya&&1073741824!==n&&(t.flags|=128,r=!0,di(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=o.last)?e.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Bt(),t.sibling=null,e=Sr.current,lt(Sr,r?1&e|2:1&e),t):(fi(t),null);case 22:case 23:return Va(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!=(1&t.mode)?0!=(1073741824&la)&&(fi(t),Y&&6&t.subtreeFlags&&(t.flags|=8192)):fi(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function pi(e,t){switch(dn(t),t.tag){case 1:return pt(t.type)&&vt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return wr(),st(dt),st(ct),Er(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return xr(t),null;case 13:if(st(Sr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));_n()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return st(Sr),null;case 4:return wr(),null;case 10:return zn(t.type._context),null;case 22:case 23:return Va(),null;default:return null}}var vi=!1,gi=!1,mi="function"==typeof WeakSet?WeakSet:Set,yi=null;function bi(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(Kke){ts(e,t,Kke)}else n.current=null}function wi(e,t,n){try{n()}catch(Kke){ts(e,t,Kke)}}var ki=!1;function xi(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&wi(t,n,i)}o=o.next}while(o!==r)}}function Si(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ci(e){var t=e.ref;if(null!==t){var n=e.stateNode;if(5===e.tag)e=T(n);else e=n;"function"==typeof t?t(e):t.current=e}}function _i(e){var t=e.alternate;null!==t&&(e.alternate=null,_i(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&J(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ei(e){return 5===e.tag||3===e.tag||4===e.tag}function Pi(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Ei(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Li(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ge(n,e,t):de(n,e);else if(4!==r&&null!==(e=e.child))for(Li(e,t,n),e=e.sibling;null!==e;)Li(e,t,n),e=e.sibling}function Oi(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ve(n,e,t):ce(n,e);else if(4!==r&&null!==(e=e.child))for(Oi(e,t,n),e=e.sibling;null!==e;)Oi(e,t,n),e=e.sibling}var Ai=null,Mi=!1;function Ti(e,t,n){for(n=n.child;null!==n;)Ii(e,t,n),n=n.sibling}function Ii(e,t,n){if(Gt&&"function"==typeof Gt.onCommitFiberUnmount)try{Gt.onCommitFiberUnmount(Ut,n)}catch(Qke){}switch(n.tag){case 5:gi||bi(n,t);case 6:if(Y){var r=Ai,o=Mi;Ai=null,Ti(e,t,n),Mi=o,null!==(Ai=r)&&(Mi?ye(Ai,n.stateNode):me(Ai,n.stateNode))}else Ti(e,t,n);break;case 18:Y&&null!==Ai&&(Mi?$e(Ai,n.stateNode):Xe(Ai,n.stateNode));break;case 4:Y?(r=Ai,o=Mi,Ai=n.stateNode.containerInfo,Mi=!0,Ti(e,t,n),Ai=r,Mi=o):(Z&&(r=n.stateNode.containerInfo,o=Ee(r),Oe(r,o)),Ti(e,t,n));break;case 0:case 11:case 14:case 15:if(!gi&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&wi(n,t,a),o=o.next}while(o!==r)}Ti(e,t,n);break;case 1:if(!gi&&(bi(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(Qke){ts(n,t,Qke)}Ti(e,t,n);break;case 21:Ti(e,t,n);break;case 22:1&n.mode?(gi=(r=gi)||null!==n.memoizedState,Ti(e,t,n),gi=r):Ti(e,t,n);break;default:Ti(e,t,n)}}function Ri(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new mi),t.forEach((function(t){var r=is.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ni(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t;if(Y){var l=s;e:for(;null!==l;){switch(l.tag){case 5:Ai=l.stateNode,Mi=!1;break e;case 3:case 4:Ai=l.stateNode.containerInfo,Mi=!0;break e}l=l.return}if(null===Ai)throw Error(i(160));Ii(a,s,o),Ai=null,Mi=!1}else Ii(a,s,o);var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(hpe){ts(o,t,hpe)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Di(t,e),t=t.sibling}function Di(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ni(t,e),zi(e),4&r){try{xi(3,e,e.return),Si(3,e)}catch(txe){ts(e,e.return,txe)}try{xi(5,e,e.return)}catch(txe){ts(e,e.return,txe)}}break;case 1:Ni(t,e),zi(e),512&r&&null!==n&&bi(n,n.return);break;case 5:if(Ni(t,e),zi(e),512&r&&null!==n&&bi(n,n.return),Y){if(32&e.flags){var o=e.stateNode;try{be(o)}catch(txe){ts(e,e.return,txe)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps;if(n=null!==n?n.memoizedProps:a,r=e.type,t=e.updateQueue,e.updateQueue=null,null!==t)try{pe(o,t,r,n,a,e)}catch(txe){ts(e,e.return,txe)}}}break;case 6:if(Ni(t,e),zi(e),4&r&&Y){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps,n=null!==n?n.memoizedProps:a;try{fe(o,n,a)}catch(txe){ts(e,e.return,txe)}}break;case 3:if(Ni(t,e),zi(e),4&r){if(Y&&X&&null!==n&&n.memoizedState.isDehydrated)try{Ye(t.containerInfo)}catch(txe){ts(e,e.return,txe)}if(Z){o=t.containerInfo,a=t.pendingChildren;try{Oe(o,a)}catch(txe){ts(e,e.return,txe)}}}break;case 4:if(Ni(t,e),zi(e),4&r&&Z){o=(a=e.stateNode).containerInfo,a=a.pendingChildren;try{Oe(o,a)}catch(txe){ts(e,e.return,txe)}}break;case 13:Ni(t,e),zi(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(ma=Bt())),4&r&&Ri(e);break;case 22:var s=null!==n&&null!==n.memoizedState;if(1&e.mode?(gi=(n=gi)||s,Ni(t,e),gi=n):Ni(t,e),zi(e),8192&r){if(n=null!==e.memoizedState,(e.stateNode.isHidden=n)&&!s&&0!=(1&e.mode))for(yi=e,r=e.child;null!==r;){for(t=yi=r;null!==yi;){var l=(s=yi).child;switch(s.tag){case 0:case 11:case 14:case 15:xi(4,s,s.return);break;case 1:bi(s,s.return);var u=s.stateNode;if("function"==typeof u.componentWillUnmount){var c=s,d=s.return;try{var f=c;u.props=f.memoizedProps,u.state=f.memoizedState,u.componentWillUnmount()}catch(txe){ts(c,d,txe)}}break;case 5:bi(s,s.return);break;case 22:if(null!==s.memoizedState){Hi(t);continue}}null!==l?(l.return=s,yi=l):Hi(t)}r=r.sibling}if(Y)e:if(r=null,Y)for(t=e;;){if(5===t.tag){if(null===r){r=t;try{o=t.stateNode,n?we(o):xe(t.stateNode,t.memoizedProps)}catch(txe){ts(e,e.return,txe)}}}else if(6===t.tag){if(null===r)try{a=t.stateNode,n?ke(a):Se(a,t.memoizedProps)}catch(txe){ts(e,e.return,txe)}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}}break;case 19:Ni(t,e),zi(e),4&r&&Ri(e);break;case 21:break;default:Ni(t,e),zi(e)}}function zi(e){var t=e.flags;if(2&t){try{if(Y){e:{for(var n=e.return;null!==n;){if(Ei(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(be(o),r.flags&=-33),Oi(e,Pi(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;Li(e,Pi(e),a);break;default:throw Error(i(161))}}}catch(ixe){ts(e,e.return,ixe)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ji(e,t,n){yi=e,Bi(e)}function Bi(e,t,n){for(var r=0!=(1&e.mode);null!==yi;){var o=yi,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||vi;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||gi;s=vi;var u=gi;if(vi=a,(gi=l)&&!u)for(yi=o;null!==yi;)l=(a=yi).child,22===a.tag&&null!==a.memoizedState?Vi(o):null!==l?(l.return=a,yi=l):Vi(o);for(;null!==i;)yi=i,Bi(i),i=i.sibling;yi=o,vi=s,gi=u}Fi(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,yi=i):Fi(e)}}function Fi(e){for(;null!==yi;){var t=yi;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:gi||Si(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!gi)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:An(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Jn(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=T(t.child.stateNode);break;case 1:n=t.child.stateNode}Jn(t,s,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&he(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(X&&null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Ze(d)}}}break;default:throw Error(i(163))}gi||512&t.flags&&Ci(t)}catch(Nhe){ts(t,t.return,Nhe)}}if(t===e){yi=null;break}if(null!==(n=t.sibling)){n.return=t.return,yi=n;break}yi=t.return}}function Hi(e){for(;null!==yi;){var t=yi;if(t===e){yi=null;break}var n=t.sibling;if(null!==n){n.return=t.return,yi=n;break}yi=t.return}}function Vi(e){for(;null!==yi;){var t=yi;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Si(4,t)}catch(ixe){ts(t,n,ixe)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(ixe){ts(t,o,ixe)}}var i=t.return;try{Ci(t)}catch(ixe){ts(t,i,ixe)}break;case 5:var a=t.return;try{Ci(t)}catch(ixe){ts(t,a,ixe)}}}catch(ixe){ts(t,t.return,ixe)}if(t===e){yi=null;break}var s=t.sibling;if(null!==s){s.return=t.return,yi=s;break}yi=t.return}}var Wi=0,Ui=1,Gi=2,qi=3,Yi=4;if("function"==typeof Symbol&&Symbol.for){var Zi=Symbol.for;Wi=Zi("selector.component"),Ui=Zi("selector.has_pseudo_class"),Gi=Zi("selector.role"),qi=Zi("selector.test_id"),Yi=Zi("selector.text")}function Xi(e){var t=$(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(i(364));return t}if(null===(e=re(e)))throw Error(i(362));return e.stateNode.current}function $i(e,t){switch(t.$$typeof){case Wi:if(e.type===t.value)return!0;break;case Ui:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],o=e[n++],a=t[o];if(5!==r.tag||!ae(r)){for(;null!=a&&$i(r,a);)a=t[++o];if(o===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,o),r=r.sibling}}t=!1}return t;case Gi:if(5===e.tag&&se(e.stateNode,t.value))return!0;break;case Yi:if((5===e.tag||6===e.tag)&&(null!==(e=ie(e))&&0<=e.indexOf(t.value)))return!0;break;case qi:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(i(365))}return!1}function Ki(e){switch(e.$$typeof){case Wi:return"<"+(x(e.value)||"Unknown")+">";case Ui:return":has("+(Ki(e)||"")+")";case Gi:return'[role="'+e.value+'"]';case Yi:return'"'+e.value+'"';case qi:return'[data-testname="'+e.value+'"]';default:throw Error(i(365))}}function Qi(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var o=e[r++],i=e[r++],a=t[i];if(5!==o.tag||!ae(o)){for(;null!=a&&$i(o,a);)a=t[++i];if(i===t.length)n.push(o);else for(o=o.child;null!==o;)e.push(o,i),o=o.sibling}}return n}function Ji(e,t){if(!ne)throw Error(i(363));e=Qi(e=Xi(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)ae(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var ea=Math.ceil,ta=a.ReactCurrentDispatcher,na=a.ReactCurrentOwner,ra=a.ReactCurrentBatchConfig,oa=0,ia=null,aa=null,sa=0,la=0,ua=at(0),ca=0,da=null,fa=0,ha=0,pa=0,va=null,ga=null,ma=0,ya=1/0,ba=null;function wa(){ya=Bt()+500}var ka,xa=!1,Sa=null,Ca=null,_a=!1,Ea=null,Pa=0,La=0,Oa=null,Aa=-1,Ma=0;function Ta(){return 0!=(6&oa)?Bt():-1!==Aa?Aa:Aa=Bt()}function Ia(e){return 0==(1&e.mode)?1:0!=(2&oa)&&0!==sa?sa&-sa:null!==Pn.transition?(0===Ma&&(Ma=Ot()),Ma):0!==(e=It)?e:Q()}function Ra(e,t,n,r){if(50<La)throw La=0,Oa=null,Error(i(185));Mt(e,n,r),0!=(2&oa)&&e===ia||(e===ia&&(0==(2&oa)&&(ha|=n),4===ca&&Ba(e,sa)),Na(e,r),1===n&&0===oa&&0==(1&t.mode)&&(wa(),Zt&&Kt()))}function Na(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-wt(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=Pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=Et(e,e===ia?sa:0);if(0===r)null!==n&&Dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Dt(n),1===t)0===e.tag?function(e){Zt=!0,$t(e)}(Fa.bind(null,e)):$t(Fa.bind(null,e)),ee?te((function(){0==(6&oa)&&Kt()})):Nt(Ft,Kt),n=null;else{switch(Rt(r)){case 1:n=Ft;break;case 4:n=Ht;break;case 16:default:n=Vt;break;case 536870912:n=Wt}n=as(n,Da.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Da(e,t){if(Aa=-1,Ma=0,0!=(6&oa))throw Error(i(327));var n=e.callbackNode;if(Ja()&&e.callbackNode!==n)return null;var r=Et(e,e===ia?sa:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Ya(e,r);else{t=r;var o=oa;oa|=2;var a=Ga();for(ia===e&&sa===t||(ba=null,wa(),Wa(e,t));;)try{Xa();break}catch(Qke){Ua(e,Qke)}Nn(),ta.current=a,oa=o,null!==aa?t=0:(ia=null,sa=0,t=ca)}if(0!==t){if(2===t&&(0!==(o=Lt(e))&&(r=o,t=za(e,o))),1===t)throw n=da,Wa(e,0),Ba(e,r),Na(e,Bt()),n;if(6===t)Ba(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!qt(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=Ya(e,r))&&(0!==(a=Lt(e))&&(r=a,t=za(e,a))),1===t))throw n=da,Wa(e,0),Ba(e,r),Na(e,Bt()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Qa(e,ga,ba);break;case 3:if(Ba(e,r),(130023424&r)===r&&10<(t=ma+500-Bt())){if(0!==Et(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Ta(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=W(Qa.bind(null,e,ga,ba),t);break}Qa(e,ga,ba);break;case 4:if(Ba(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-wt(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Bt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ea(r/1960))-r)){e.timeoutHandle=W(Qa.bind(null,e,ga,ba),r);break}Qa(e,ga,ba);break;default:throw Error(i(329))}}}return Na(e,Bt()),e.callbackNode===n?Da.bind(null,e):null}function za(e,t){var n=va;return e.current.memoizedState.isDehydrated&&(Wa(e,t).flags|=256),2!==(e=Ya(e,t))&&(t=ga,ga=n,null!==t&&ja(t)),e}function ja(e){null===ga?ga=e:ga.push.apply(ga,e)}function Ba(e,t){for(t&=~pa,t&=~ha,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function Fa(e){if(0!=(6&oa))throw Error(i(327));Ja();var t=Et(e,0);if(0==(1&t))return Na(e,Bt()),null;var n=Ya(e,t);if(0!==e.tag&&2===n){var r=Lt(e);0!==r&&(t=r,n=za(e,r))}if(1===n)throw n=da,Wa(e,0),Ba(e,t),Na(e,Bt()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qa(e,ga,ba),Na(e,Bt()),null}function Ha(e){null!==Ea&&0===Ea.tag&&0==(6&oa)&&Ja();var t=oa;oa|=1;var n=ra.transition,r=It;try{if(ra.transition=null,It=1,e)return e()}finally{It=r,ra.transition=n,0==(6&(oa=t))&&Kt()}}function Va(){la=ua.current,st(ua)}function Wa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==G&&(e.timeoutHandle=G,U(n)),null!==aa)for(n=aa.return;null!==n;){var r=n;switch(dn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&vt();break;case 3:wr(),st(dt),st(ct),Er();break;case 5:xr(r);break;case 4:wr();break;case 13:case 19:st(Sr);break;case 10:zn(r.type._context);break;case 22:case 23:Va()}n=n.return}if(ia=e,aa=e=cs(e.current,null),sa=la=t,ca=0,da=null,pa=ha=fa=0,ga=va=null,null!==Hn){for(t=0;t<Hn.length;t++)if(null!==(r=(n=Hn[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Hn=null}return e}function Ua(e,t){for(;;){var n=aa;try{if(Nn(),Pr.current=xo,Ir){for(var r=Ar.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Ir=!1}if(Or=0,Tr=Mr=Ar=null,Rr=!1,Nr=0,na.current=null,null===n||null===n.return){ca=1,da=t,aa=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=sa,l.flags|=32768,null!==u&&"object"===kn(u)&&"function"==typeof u.then){var c=u,d=l,f=d.tag;if(0==(1&d.mode)&&(0===f||11===f||15===f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Io(s);if(null!==p){p.flags&=-257,Ro(p,s,l,0,t),1&p.mode&&To(a,c,t),u=c;var v=(t=p).updateQueue;if(null===v){var g=new Set;g.add(u),t.updateQueue=g}else v.add(u);break e}if(0==(1&t)){To(a,c,t),qa();break e}u=Error(i(426))}else if(pn&&1&l.mode){var m=Io(s);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),Ro(m,s,l,0,t),En(Eo(u,l));break e}}a=u=Eo(u,l),4!==ca&&(ca=2),null===va?va=[a]:va.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Kn(a,Ao(0,u,t));break e;case 1:l=u;var y=a.type,b=a.stateNode;if(0==(128&a.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Ca||!Ca.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Kn(a,Mo(a,l,t));break e}}a=a.return}while(null!==a)}Ka(n)}catch(uT){t=uT,aa===n&&null!==n&&(aa=n=n.return);continue}break}}function Ga(){var e=ta.current;return ta.current=xo,null===e?xo:e}function qa(){0!==ca&&3!==ca&&2!==ca||(ca=4),null===ia||0==(268435455&fa)&&0==(268435455&ha)||Ba(ia,sa)}function Ya(e,t){var n=oa;oa|=2;var r=Ga();for(ia===e&&sa===t||(ba=null,Wa(e,t));;)try{Za();break}catch(Dhe){Ua(e,Dhe)}if(Nn(),oa=n,ta.current=r,null!==aa)throw Error(i(261));return ia=null,sa=0,ca}function Za(){for(;null!==aa;)$a(aa)}function Xa(){for(;null!==aa&&!zt();)$a(aa)}function $a(e){var t=ka(e.alternate,e,la);e.memoizedProps=e.pendingProps,null===t?Ka(e):aa=t,na.current=null}function Ka(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=hi(n,t,la)))return void(aa=n)}else{if(null!==(n=pi(n,t)))return n.flags&=32767,void(aa=n);if(null===e)return ca=6,void(aa=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(aa=t);aa=t=e}while(null!==t);0===ca&&(ca=5)}function Qa(e,t,n){var r=It,o=ra.transition;try{ra.transition=null,It=1,function(e,t,n,r){do{Ja()}while(null!==Ea);if(0!=(6&oa))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-wt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===ia&&(aa=ia=null,sa=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||_a||(_a=!0,as(Vt,(function(){return Ja(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=ra.transition,ra.transition=null;var s=It;It=1;var l=oa;oa|=4,na.current=null,function(e,t){for(N(e.containerInfo),yi=t;null!==yi;)if(t=(e=yi).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,yi=t;else for(;null!==yi;){e=yi;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,o=n.memoizedState,a=e.stateNode,s=a.getSnapshotBeforeUpdate(e.elementType===e.type?r:An(e.type,r),o);a.__reactInternalSnapshotBeforeUpdate=s}break;case 3:Y&&Ce(e.stateNode.containerInfo);break;default:throw Error(i(163))}}catch(l){ts(e,e.return,l)}if(null!==(t=e.sibling)){t.return=e.return,yi=t;break}yi=e.return}n=ki,ki=!1}(e,n),Di(n,e),D(e.containerInfo),e.current=n,ji(n),jt(),oa=l,It=s,ra.transition=a}else e.current=n;if(_a&&(_a=!1,Ea=e,Pa=o),a=e.pendingLanes,0===a&&(Ca=null),function(e){if(Gt&&"function"==typeof Gt.onCommitFiberRoot)try{Gt.onCommitFiberRoot(Ut,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),Na(e,Bt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(xa)throw xa=!1,e=Sa,Sa=null,e;0!=(1&Pa)&&0!==e.tag&&Ja(),a=e.pendingLanes,0!=(1&a)?e===Oa?La++:(La=0,Oa=e):La=0,Kt()}(e,t,n,r)}finally{ra.transition=o,It=r}return null}function Ja(){if(null!==Ea){var e=Rt(Pa),t=ra.transition,n=It;try{if(ra.transition=null,It=16>e?16:e,null===Ea)var r=!1;else{if(e=Ea,Ea=null,Pa=0,0!=(6&oa))throw Error(i(331));var o=oa;for(oa|=4,yi=e.current;null!==yi;){var a=yi,s=a.child;if(0!=(16&yi.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(yi=c;null!==yi;){var d=yi;switch(d.tag){case 0:case 11:case 15:xi(8,d,a)}var f=d.child;if(null!==f)f.return=d,yi=f;else for(;null!==yi;){var h=(d=yi).sibling,p=d.return;if(_i(d),d===c){yi=null;break}if(null!==h){h.return=p,yi=h;break}yi=p}}}var v=a.alternate;if(null!==v){var g=v.child;if(null!==g){v.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(null!==g)}}yi=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,yi=s;else e:for(;null!==yi;){if(0!=(2048&(a=yi).flags))switch(a.tag){case 0:case 11:case 15:xi(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,yi=y;break e}yi=a.return}}var b=e.current;for(yi=b;null!==yi;){var w=(s=yi).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,yi=w;else e:for(s=b;null!==yi;){if(0!=(2048&(l=yi).flags))try{switch(l.tag){case 0:case 11:case 15:Si(9,l)}}catch(uT){ts(l,l.return,uT)}if(l===s){yi=null;break e}var k=l.sibling;if(null!==k){k.return=l.return,yi=k;break e}yi=l.return}}if(oa=o,Kt(),Gt&&"function"==typeof Gt.onPostCommitFiberRoot)try{Gt.onPostCommitFiberRoot(Ut,e)}catch(uT){}r=!0}return r}finally{It=n,ra.transition=t}}return!1}function es(e,t,n){e=Xn(e,t=Ao(0,t=Eo(n,t),1),1),t=Ta(),null!==e&&(Mt(e,1,t),Na(e,t))}function ts(e,t,n){if(3===e.tag)es(e,e,n);else for(;null!==t;){if(3===t.tag){es(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ca||!Ca.has(r))){t=Xn(t,e=Mo(t,e=Eo(n,e),1),1),e=Ta(),null!==t&&(Mt(t,1,e),Na(t,e));break}}t=t.return}}function ns(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Ta(),e.pingedLanes|=e.suspendedLanes&n,ia===e&&(sa&n)===n&&(4===ca||3===ca&&(130023424&sa)===sa&&500>Bt()-ma?Wa(e,0):pa|=n),Na(e,t)}function rs(e,t){0===t&&(0==(1&e.mode)?t=1:(t=Ct,0==(130023424&(Ct<<=1))&&(Ct=4194304)));var n=Ta();null!==(e=Un(e,t))&&(Mt(e,t,n),Na(e,n))}function os(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),rs(e,n)}function is(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),rs(e,n)}function as(e,t){return Nt(e,t)}function ss(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ls(e,t,n,r){return new ss(e,t,n,r)}function us(e){return!(!(e=e.prototype)||!e.isReactComponent)}function cs(e,t){var n=e.alternate;return null===n?((n=ls(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ds(e,t,n,r,o,a){var s=2;if(r=e,"function"==typeof e)us(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case u:return fs(n.children,o,a,t);case c:s=8,o|=8;break;case d:return(e=ls(12,n,t,2|o)).elementType=d,e.lanes=a,e;case v:return(e=ls(13,n,t,o)).elementType=v,e.lanes=a,e;case g:return(e=ls(19,n,t,o)).elementType=g,e.lanes=a,e;case b:return hs(n,o,a,t);default:if("object"===kn(e)&&null!==e)switch(e.$$typeof){case f:s=10;break e;case h:s=9;break e;case p:s=11;break e;case m:s=14;break e;case y:s=16,r=null;break e}throw Error(i(130,null==e?e:kn(e),""))}return(t=ls(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function fs(e,t,n,r){return(e=ls(7,e,r,t)).lanes=n,e}function hs(e,t,n,r){return(e=ls(22,e,r,t)).elementType=b,e.lanes=n,e.stateNode={isHidden:!1},e}function ps(e,t,n){return(e=ls(6,e,null,t)).lanes=n,e}function vs(e,t,n){return(t=ls(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gs(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=G,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=At(0),this.expirationTimes=At(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.identifierPrefix=r,this.onRecoverableError=o,X&&(this.mutableSourceEagerHydrationData=null)}function ms(e,t,n,r,o,i,a,s,l){return e=new gs(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=ls(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qn(i),e}function ys(e){if(!e)return ut;e:{if(C(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(pt(n))return mt(e,n,t)}return t}function bs(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return null===(e=P(t))?null:e.stateNode}function ws(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ks(e,t){ws(e,t),(e=e.alternate)&&ws(e,t)}function xs(e){return null===(e=P(e))?null:e.stateNode}function Ss(){return null}return ka=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||dt.current)Do=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Do=!1,function(e,t,n){switch(t.tag){case 3:qo(t),_n();break;case 5:kr(t);break;case 1:pt(t.type)&&yt(t);break;case 4:br(t,t.stateNode.containerInfo);break;case 10:Dn(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(lt(Sr,1&Sr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?ei(e,t,n):(lt(Sr,1&Sr.current),null!==(e=si(e,t,n))?e.sibling:null);lt(Sr,1&Sr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ii(e,t,n);t.flags|=128}var o=t.memoizedState;if(null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null),lt(Sr,Sr.current),r)break;return null;case 22:case 23:return t.lanes=0,Ho(e,t,n)}return si(e,t,n)}(e,t,n);Do=0!=(131072&e.flags)}else Do=!1,pn&&0!=(1048576&t.flags)&&un(t,tn,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ai(e,t),e=t.pendingProps;var o=ht(t,ct.current);Bn(t,n),o=Br(null,t,r,e,o,n);var a=Fr();return t.flags|=1,"object"===kn(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(a=!0,yt(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,qn(t),o.updater=nr,t.stateNode=o,o._reactInternals=t,ar(t,r,e,n),t=Go(null,t,r,!0,a,n)):(t.tag=0,pn&&a&&cn(t),zo(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ai(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return us(e)?1:0;if(null!=e){if((e=e.$$typeof)===p)return 11;if(e===m)return 14}return 2}(r),e=An(r,e),o){case 0:t=Wo(null,t,r,e,n);break e;case 1:t=Uo(null,t,r,e,n);break e;case 11:t=jo(null,t,r,e,n);break e;case 14:t=Bo(null,t,r,An(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Wo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 1:return r=t.type,o=t.pendingProps,Uo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 3:e:{if(qo(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Yn(e,t),Qn(t,r,null,n);var s=t.memoizedState;if(r=s.element,X&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Yo(e,t,r,n,o=Eo(Error(i(423)),t));break e}if(r!==o){t=Yo(e,t,r,n,o=Eo(Error(i(424)),t));break e}for(X&&(hn=He(t.stateNode.containerInfo),fn=t,pn=!0,gn=null,vn=!1),n=hr(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(_n(),r===o){t=si(e,t,n);break e}zo(e,t,r,n)}t=t.child}return t;case 5:return kr(t),null===e&&wn(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,H(r,o)?s=null:null!==a&&H(r,a)&&(t.flags|=32),Vo(e,t),zo(e,t,s,n),t.child;case 6:return null===e&&wn(t),null;case 13:return ei(e,t,n);case 4:return br(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=fr(t,null,r,n):zo(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,jo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 7:return zo(e,t,t.pendingProps,n),t.child;case 8:case 12:return zo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,Dn(0,r,s=o.value),null!==a)if(qt(a.value,s)){if(a.children===o.children&&!dt.current){t=si(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Zn(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),jn(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),jn(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}zo(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Bn(t,n),r=r(o=Fn(o)),t.flags|=1,zo(e,t,r,n),t.child;case 14:return o=An(r=t.type,t.pendingProps),Bo(e,t,r,o=An(r.type,o),n);case 15:return Fo(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:An(r,o),ai(e,t),t.tag=1,pt(r)?(e=!0,yt(t)):e=!1,Bn(t,n),or(t,r,o),ar(t,r,o,n),Go(null,t,r,!0,e,n);case 19:return ii(e,t,n);case 22:return Ho(e,t,n)}throw Error(i(156,t.tag))},t.attemptContinuousHydration=function(e){if(13===e.tag){var t=Un(e,134217728);if(null!==t)Ra(t,e,134217728,Ta());ks(e,134217728)}},t.attemptDiscreteHydration=function(e){if(13===e.tag){var t=Un(e,1);if(null!==t)Ra(t,e,1,Ta());ks(e,1)}},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Ia(e),n=Un(e,t);if(null!==n)Ra(n,e,t,Ta());ks(e,t)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_t(t.pendingLanes);0!==n&&(Tt(t,1|n),Na(t,Bt()),0==(6&oa)&&(wa(),Kt()))}break;case 13:Ha((function(){var t=Un(e,1);if(null!==t){var n=Ta();Ra(t,e,1,n)}})),ks(e,1)}},t.batchedUpdates=function(e,t){var n=oa;oa|=1;try{return e(t)}finally{0===(oa=n)&&(wa(),Zt&&Kt())}},t.createComponentSelector=function(e){return{$$typeof:Wi,value:e}},t.createContainer=function(e,t,n,r,o,i,a){return ms(e,t,!1,null,0,r,0,i,a)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Ui,value:e}},t.createHydrationContainer=function(e,t,n,r,o,i,a,s,l){return(e=ms(n,r,!0,e,0,i,0,s,l)).context=ys(null),n=e.current,(i=Zn(r=Ta(),o=Ia(n))).callback=null!=t?t:null,Xn(n,i,o),e.current.lanes=o,Mt(e,o,r),Na(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:l,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Gi,value:e}},t.createTestNameSelector=function(e){return{$$typeof:qi,value:e}},t.createTextSelector=function(e){return{$$typeof:Yi,value:e}},t.deferredUpdates=function(e){var t=It,n=ra.transition;try{return ra.transition=null,It=16,e()}finally{It=t,ra.transition=n}},t.discreteUpdates=function(e,t,n,r,o){var i=It,a=ra.transition;try{return ra.transition=null,It=1,e(t,n,r,o)}finally{It=i,ra.transition=a,0===oa&&wa()}},t.findAllNodes=Ji,t.findBoundingRects=function(e,t){if(!ne)throw Error(i(363));t=Ji(e,t),e=[];for(var n=0;n<t.length;n++)e.push(oe(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,o=r+n.width,a=n.y,s=a+n.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,d=c+u.width,f=u.y,h=f+u.height;if(r>=c&&a>=f&&o<=d&&s<=h){e.splice(t,1);break}if(!(r!==c||n.width!==u.width||h<a||f>s)){f>a&&(u.height+=f-a,u.y=a),h<s&&(u.height=s-f),e.splice(t,1);break}if(!(a!==f||n.height!==u.height||d<r||c>o)){c>r&&(u.width+=c-r,u.x=r),d<o&&(u.width=o-c),e.splice(t,1);break}}return e},t.findHostInstance=bs,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=E(e))?O(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return bs(e)},t.flushControlled=function(e){var t=oa;oa|=1;var n=ra.transition,r=It;try{ra.transition=null,It=1,e()}finally{It=r,ra.transition=n,0===(oa=t)&&(wa(),Kt())}},t.flushPassiveEffects=Ja,t.flushSync=Ha,t.focusWithin=function(e,t){if(!ne)throw Error(i(363));for(t=Qi(e=Xi(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!ae(n)){if(5===n.tag&&le(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return It},t.getFindAllNodesFailureDescription=function(e,t){if(!ne)throw Error(i(363));var n=0,r=[];e=[Xi(e),0];for(var o=0;o<e.length;){var a=e[o++],s=e[o++],l=t[s];if((5!==a.tag||!ae(a))&&($i(a,l)&&(r.push(Ki(l)),++s>n&&(n=s)),s<t.length))for(a=a.child;null!==a;)e.push(a,s),a=a.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ki(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?T(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:xs,findFiberByHostInstance:e.findFiberByHostInstance||Ss,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Ut=t.inject(e),Gt=t}catch(qke){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!ne)throw Error(i(363));e=Ji(e,t);var o=ue(e,n,r).disconnect;return{disconnect:function(){o()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=It;try{return It=e,t()}finally{It=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var o=t.current,i=Ta(),a=Ia(o);return n=ys(n),null===t.context?t.context=n:t.pendingContext=n,(t=Zn(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Xn(o,t,a))&&(Ra(e,o,a,i),$n(e,o,a)),a},t};!function(e){e.exports=sbe}(abe);var lbe=ar(ibe),ube={},cbe={get exports(){return ube},set exports(e){ube=e}},dbe={
|
||
/**
|
||
* @license React
|
||
* react-reconciler-constants.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
ConcurrentRoot:1,ContinuousEventPriority:4,DefaultEventPriority:16,DiscreteEventPriority:1,IdleEventPriority:536870912,LegacyRoot:0};!function(e){e.exports=dbe}(cbe);var fbe={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},hbe=!1,pbe=!1,vbe=".react-konva-event",gbe="ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n",mbe='ReactKonva: You are using "zIndex" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n',ybe={};function bbe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ybe;if(!hbe&&"zIndex"in t&&(console.warn(mbe),hbe=!0),!pbe&&t.draggable){var r=void 0!==t.x||void 0!==t.y,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(gbe),pbe=!0)}for(var i in n)if(!fbe[i]){var a="on"===i.slice(0,2),s=n[i]!==t[i];if(a&&s)"content"===(p=i.substr(2).toLowerCase()).substr(0,7)&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),e.off(p,n[i]);var l=!t.hasOwnProperty(i);l&&e.setAttr(i,void 0)}var u=t._useStrictMode,c={},d=!1,f={};for(var i in t)if(!fbe[i]){a="on"===i.slice(0,2);var h=n[i]!==t[i];if(a&&h)"content"===(p=i.substr(2).toLowerCase()).substr(0,7)&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),t[i]&&(f[p]=t[i]);!a&&(t[i]!==n[i]||u&&t[i]!==e.getAttr(i))&&(d=!0,c[i]=t[i])}for(var p in d&&(e.setAttrs(c),wbe(e)),f)e.on(p+vbe,f[p])}function wbe(e){if(!Ste.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var kbe={},xbe={};kre.Node.prototype._applyProps=bbe;var Sbe=setTimeout,Cbe=clearTimeout;function _be(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),wbe(e)}var Ebe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:function(e,t){t.parent===e?t.moveToTop():e.add(t),wbe(e)},appendChildToContainer:function(e,t){t.parent===e?t.moveToTop():e.add(t),wbe(e)},appendInitialChild:function(e,t){"string"!=typeof t?(e.add(t),wbe(e)):console.error("Do not use plain text as child of Konva.Node. You are using text: ".concat(t))},cancelTimeout:Cbe,clearContainer:function(e){},commitMount:function(e,t,n){},commitTextUpdate:function(e,t,n){console.error('Text components are not yet supported in ReactKonva. You text is: "'.concat(n,'"'))},commitUpdate:function(e,t,n,r,o){bbe(e,o,r)},createInstance:function(e,t,n){var r=kre[e];r||(console.error("Konva has no node with the type ".concat(e,'. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/').concat(e,'" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html')),r=kre.Group);var o={},i={};for(var a in t){"on"===a.slice(0,2)?i[a]=t[a]:o[a]=t[a]}var s=new r(o);return bbe(s,i),s},createTextInstance:function(e,t,n){console.error('Text components are not supported for now in ReactKonva. Your text is: "'.concat(e,'"'))},detachDeletedInstance:function(){},finalizeInitialChildren:function(e,t,n){return!1},getChildHostContext:function(){return kbe},getCurrentEventPriority:function(){return ube.DefaultEventPriority},getPublicInstance:function(e){return e},getRootHostContext:function(){return kbe},hideInstance:function(e){e.hide(),wbe(e)},hideTextInstance:function(e){},idlePriority:tA.unstable_IdlePriority,insertBefore:_be,insertInContainerBefore:function(e,t,n){_be(e,t,n)},isPrimaryRenderer:!1,noTimeout:-1,now:tA.unstable_now,prepareForCommit:function(){return null},preparePortalMount:function(){return null},prepareUpdate:function(e,t,n,r){return xbe},removeChild:function(e,t){t.destroy(),t.off(vbe),wbe(e)},removeChildFromContainer:function(e,t){t.destroy(),t.off(vbe),wbe(e)},resetAfterCommit:function(){},resetTextContent:function(e){},run:tA.unstable_runWithPriority,scheduleTimeout:Sbe,shouldDeprioritizeSubtree:function(e,t){return!1},shouldSetTextContent:function(e,t){return!1},supportsMutation:!0,unhideInstance:function(e,t){(null==t.visible||t.visible)&&e.show()},unhideTextInstance:function(e,t){},warnsIfNotActing:!0},Symbol.toStringTag,{value:"Module"})),Pbe=Object.defineProperty,Lbe=Object.defineProperties,Obe=Object.getOwnPropertyDescriptors,Abe=Object.getOwnPropertySymbols,Mbe=Object.prototype.hasOwnProperty,Tbe=Object.prototype.propertyIsEnumerable,Ibe=function(e,t,n){return t in e?Pbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Rbe=function(e,t){for(var n in t||(t={}))Mbe.call(t,n)&&Ibe(e,n,t[n]);if(Abe){var r,o=xn(Abe(t));try{for(o.s();!(r=o.n()).done;){n=r.value;Tbe.call(t,n)&&Ibe(e,n,t[n])}}catch(COe){o.e(COe)}finally{o.f()}}return e};function Nbe(e,t,n){if(e){if(!0===n(e))return e;for(var r=t?e.return:e.child;r;){var o=Nbe(r,t,n);if(o)return o;r=t?null:r.sibling}}}function Dbe(e){try{return Object.defineProperties(e,{_currentRenderer:{get:function(){return null},set:function(){}},_currentRenderer2:{get:function(){return null},set:function(){}}})}catch(bce){return e}}var zbe=Dbe(cr.createContext(null)),jbe=function(e){pn(n,e);var t=Qt(n);function n(){return an(this,n),t.apply(this,arguments)}return on(n,[{key:"render",value:function(){return cr.createElement(zbe.Provider,{value:this._reactInternals},this.props.children)}}]),n}(cr.Component),Bbe=cr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fbe=Bbe.ReactCurrentOwner,Hbe=Bbe.ReactCurrentDispatcher;var Vbe=[],Wbe=new WeakMap;function Ube(){var e,t=function(){var e=cr.useContext(zbe);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");var t=cr.useId(),n=cr.useMemo((function(){var n;return null!=(n=Fbe.current)?n:Nbe(e,!1,(function(e){for(var n=e.memoizedState;n;){if(n.memoizedState===t)return!0;n=n.next}}))}),[e,t]);return n}();Vbe.splice(0,Vbe.length),Nbe(t,!0,(function(e){var t,n=null==(t=e.type)?void 0:t._context;n&&n!==zbe&&Vbe.push(Dbe(n))}));for(var n=0,r=Vbe;n<r.length;n++){var o=r[n],i=null==(e=Hbe.current)?void 0:e.readContext(o);Wbe.set(o,i)}return cr.useMemo((function(){return Vbe.reduce((function(e,t){return function(n){return cr.createElement(e,null,cr.createElement(t.Provider,function(e,t){return Lbe(e,Obe(t))}(Rbe({},n),{value:Wbe.get(t)})))}}),(function(e){return cr.createElement(jbe,Rbe({},e))}))}),[])}var Gbe=function(e){var t=qr.useRef(),n=qr.useRef(),r=qr.useRef(),o=function(e){var t=qr.useRef();return qr.useLayoutEffect((function(){t.current=e})),t.current}(e),i=Ube(),a=function(t){var n=e.forwardedRef;n&&("function"==typeof n?n(t):n.current=t)};return qr.useLayoutEffect((function(){return n.current=new kre.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Qbe.createContainer(n.current,ube.LegacyRoot,!1,null),Qbe.updateContainer(qr.createElement(i,{},e.children),r.current),function(){kre.isBrowser&&(a(null),Qbe.updateContainer(null,r.current,null),n.current.destroy())}}),[]),qr.useLayoutEffect((function(){a(n.current),bbe(n.current,e,o),Qbe.updateContainer(qr.createElement(i,{},e.children),r.current,null)})),qr.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},qbe="Layer",Ybe="Group",Zbe="Rect",Xbe="Circle",$be="Line",Kbe="Image",Qbe=lbe(Ebe);Qbe.injectIntoDevTools({findHostInstanceByFiber:function(){return null},bundleType:0,version:qr.version,rendererPackageName:"react-konva"});var Jbe=qr.forwardRef((function(e,t){return qr.createElement(jbe,{},qr.createElement(Gbe,un(un({},e),{},{forwardedRef:t})))})),ewe=QX([Lde,Ode],(function(e,t){return{tool:e.tool,isStaging:t,isMovingBoundingBox:e.isMovingBoundingBox}}),{memoizeOptions:{resultEqualityCheck:dae}}),twe=QX([Lde,fae,Ode],(function(e,t,n){var r=e.cursorPosition,o=e.shouldLockBoundingBox,i=e.shouldShowBoundingBox,a=e.tool,s=e.isMaskEnabled,l=e.shouldSnapToGrid;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:o,shouldShowBoundingBox:i,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}}),{memoizeOptions:{resultEqualityCheck:dae}}),nwe=function(){var e=wie(),t=kie(twe),n=t.activeTabName,r=t.shouldShowBoundingBox,o=t.tool,i=t.isStaging,a=t.isMaskEnabled,s=t.shouldSnapToGrid,l=cr.useRef(null),u=Ooe();_ce(["shift+c"],(function(){e($5())}),{enabled:function(){return!i},preventDefault:!0},[]);_ce(["h"],(function(){e(w3(!a))}),{enabled:function(){return!i},preventDefault:!0},[a]),_ce(["n"],(function(){e(j3(!s))}),{enabled:!0,preventDefault:!0},[s]),_ce("esc",(function(){e(i3())}),{enabled:function(){return!0},preventDefault:!0}),_ce("shift+h",(function(){e(T3(!r))}),{enabled:function(){return!i},preventDefault:!0},[n,r]),_ce(["space"],(function(t){t.repeat||(null==u||u.container().focus(),"move"!==o&&(l.current=o,e(H3("move"))),"move"===o&&l.current&&"move"!==l.current&&(e(H3(l.current)),l.current="move"))}),{keyup:!0,keydown:!0,preventDefault:!0},[o,l])},rwe=function(e){var t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(t&&n){var r=n.invert().point(t);return{x:r.x,y:r.y}}},owe=function(){var e=wie(),t=Loe(),n=Ooe();return{updateColorUnderCursor:function(){if(n&&t){var r=n.getPointerPosition();if(r){var o=_oe.pixelRatio,i=yn(t.getContext().getImageData(r.x*o,r.y*o,1,1).data,4),a=i[0],s=i[1],l=i[2],u=i[3];e(v3({r:a,g:s,b:l,a:u}))}}},commitColorUnderCursor:function(){e(K5())}}},iwe=QX([fae,Lde,Ode],(function(e,t,n){return{tool:t.tool,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:dae}}),awe=QX([fae,Lde,Ode],(function(e,t,n){return{tool:t.tool,isDrawing:t.isDrawing,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:dae}}),swe=QX([fae,Lde,Ode],(function(e,t,n){return{tool:t.tool,isDrawing:t.isDrawing,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:dae}}),lwe=QX([Lde],(function(e){return{isMoveStageKeyHeld:e.isMoveStageKeyHeld,stageScale:e.stageScale}}),{memoizeOptions:{resultEqualityCheck:dae}}),uwe=QX(Lde,(function(e){var t=e.boundingBoxCoordinates,n=e.boundingBoxDimensions,r=e.stageDimensions,o=e.stageScale;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:e.shouldDarkenOutsideBoundingBox,stageCoordinates:e.stageCoordinates,stageDimensions:r,stageScale:o}}),{memoizeOptions:{resultEqualityCheck:dae}}),cwe=function(){var e=kie(uwe),t=e.boundingBoxCoordinates,n=e.boundingBoxDimensions,r=e.shouldDarkenOutsideBoundingBox,o=e.stageCoordinates,i=e.stageDimensions,a=e.stageScale;return ro(Ybe,{children:[no(Zbe,{offsetX:o.x/a,offsetY:o.y/a,height:i.height/a,width:i.width/a,fill:"rgba(0,0,0,0.4)",listening:!1,visible:r}),no(Zbe,{x:t.x,y:t.y,width:n.width,height:n.height,fill:"rgb(255,255,255)",listening:!1,visible:r,globalCompositeOperation:"destination-out"})]})},dwe=Math.ceil,fwe=Math.max;var hwe=function(e,t,n,r){for(var o=-1,i=fwe(dwe((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},pwe=tQ,vwe=Q0,gwe=w0,mwe=kK;var ywe=function(e,t,n){if(!mwe(n))return!1;var r=kn(t);return!!("number"==r?vwe(n)&&gwe(t,n.length):"string"==r&&t in n)&&pwe(n[t],e)},bwe=$K,wwe=1/0;var kwe=function(e){return e?(e=bwe(e))===wwe||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},xwe=hwe,Swe=ywe,Cwe=kwe;var _we=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Swe(t,n,r)&&(n=r=void 0),t=Cwe(t),void 0===n?(n=t,t=0):n=Cwe(n),r=void 0===r?t<n?1:-1:Cwe(r),xwe(t,n,r,e)}},Ewe=_we(),Pwe=QX([Lde],(function(e){return{stageScale:e.stageScale,stageCoordinates:e.stageCoordinates,stageDimensions:e.stageDimensions}}),{memoizeOptions:{resultEqualityCheck:dae}}),Lwe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},Owe=function(){var e=ao().colorMode,t=kie(Pwe),n=t.stageScale,r=t.stageCoordinates,o=t.stageDimensions,i=yn(cr.useState([]),2),a=i[0],s=i[1],l=cr.useCallback((function(e){return e/n}),[n]);return cr.useLayoutEffect((function(){var t=Lwe[e],n=o.width,i=o.height,a=r.x,u=r.y,c={x1:0,y1:0,x2:n,y2:i,offset:{x:l(a),y:l(u)}},d=64*Math.ceil(l(a)/64),f=64*Math.ceil(l(u)/64),h={x1:-d,y1:-f,x2:l(n)-d+64,y2:l(i)-f+64},p={x1:Math.min(c.x1,h.x1),y1:Math.min(c.y1,h.y1),x2:Math.max(c.x2,h.x2),y2:Math.max(c.y2,h.y2)},v=p.x2-p.x1,g=p.y2-p.y1,m=Math.round(v/64)+1,y=Math.round(g/64)+1,b=Ewe(0,m).map((function(e){return no($be,{x:p.x1+64*e,y:p.y1,points:[0,0,0,g],stroke:t,strokeWidth:1},"x_".concat(e))})),w=Ewe(0,y).map((function(e){return no($be,{x:p.x1,y:p.y1+64*e,points:[0,0,v,0],stroke:t,strokeWidth:1},"y_".concat(e))}));s(b.concat(w))}),[n,r,o,e,l]),no(Ybe,{children:a})},Awe=QX([function(e){return e.gallery}],(function(e){return e.intermediateImage?e.intermediateImage:null}),{memoizeOptions:{resultEqualityCheck:dae}}),Mwe=function(e){var t=Object.assign({},(Kt(e),e)),n=kie(Awe),r=yn(cr.useState(null),2),o=r[0],i=r[1];if(cr.useEffect((function(){if(n){var e=new Image;e.onload=function(){i(e)},e.src=n.url}}),[n]),null==n||!n.boundingBox)return null;var a=n.boundingBox,s=a.x,l=a.y,u=a.width,c=a.height;return o?no(Kbe,un({x:s,y:l,width:u,height:c,image:o,listening:!1},t)):null},Twe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a;return"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(o,")")},Iwe=jK,Rwe=BK;var Nwe=function(e){return"number"==typeof e||Rwe(e)&&"[object Number]"==Iwe(e)},Dwe=QX(Lde,(function(e){var t=e.maskColor;return{stageCoordinates:e.stageCoordinates,stageDimensions:e.stageDimensions,stageScale:e.stageScale,maskColorString:Twe(t)}})),zwe=function(e){return'data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n <svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">\n <g transform="matrix(0.5,0,0,0.5,0,0)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,2.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,7.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,10)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,12.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,15)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,17.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,20)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,22.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,25)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,27.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,30)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-2.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-7.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-10)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-12.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-15)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-17.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-20)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-22.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-25)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-27.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-30)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n</svg>'.replaceAll("black",e)},jwe=function(e){var t=Object.assign({},(Kt(e),e)),n=kie(Dwe),r=n.maskColorString,o=n.stageCoordinates,i=n.stageDimensions,a=n.stageScale,s=yn(cr.useState(null),2),l=s[0],u=s[1],c=yn(cr.useState(0),2),d=c[0],f=c[1],h=cr.useRef(null),p=cr.useCallback((function(){f(d+1),setTimeout(p,500)}),[d]);return cr.useEffect((function(){if(!l){var e=new Image;e.onload=function(){u(e)},e.src=zwe(r)}}),[l,r]),cr.useEffect((function(){l&&(l.src=zwe(r))}),[l,r]),cr.useEffect((function(){var e=setInterval((function(){return f((function(e){return(e+1)%5}))}),50);return function(){return clearInterval(e)}}),[]),l&&Nwe(o.x)&&Nwe(o.y)&&Nwe(a)&&Nwe(i.width)&&Nwe(i.height)?no(Zbe,un({ref:h,offsetX:o.x/a,offsetY:o.y/a,height:i.height/a,width:i.width/a,fillPatternImage:l,fillPatternOffsetY:Nwe(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/a,y:1/a},listening:!0,globalCompositeOperation:"source-in"},t)):null},Bwe=QX([Lde],(function(e){return{objects:e.layerState.objects}}),{memoizeOptions:{resultEqualityCheck:dae}}),Fwe=function(e){var t=Object.assign({},(Kt(e),e)),n=kie(Bwe).objects;return no(Ybe,un(un({listening:!1},t),{},{children:n.filter(j5).map((function(e,t){return no($be,{points:e.points,stroke:"rgb(0,0,0)",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"},t)}))}))},Hwe=cr,Vwe=function(e){var t=e.url,n=e.x,r=e.y,o=function(e,t,n){var r=Hwe.useRef("loading"),o=Hwe.useRef(),i=yn(Hwe.useState(0),2),a=(i[0],i[1]),s=Hwe.useRef(),l=Hwe.useRef(),u=Hwe.useRef();return s.current===e&&l.current===t&&u.current===n||(r.current="loading",o.current=void 0,s.current=e,l.current=t,u.current=n),Hwe.useLayoutEffect((function(){if(e){var i=document.createElement("img");return i.addEventListener("load",s),i.addEventListener("error",l),t&&(i.crossOrigin=t),n&&(i.referrerpolicy=n),i.src=e,function(){i.removeEventListener("load",s),i.removeEventListener("error",l)}}function s(){r.current="loaded",o.current=i,a(Math.random())}function l(){r.current="failed",o.current=void 0,a(Math.random())}}),[e,t,n]),[o.current,r.current]}(t),i=yn(o,1)[0];return no(Kbe,{x:n,y:r,image:i,listening:!1})},Wwe=QX([Lde],(function(e){return{objects:e.layerState.objects}}),{memoizeOptions:{resultEqualityCheck:dae}}),Uwe=function(){var e=kie(Wwe).objects;return e?no(Ybe,{name:"outpainting-objects",listening:!1,children:e.map((function(e,t){if(B5(e))return no(Vwe,{x:e.x,y:e.y,url:e.image.url},t);if(function(e){return"line"===e.kind&&"base"===e.layer}(e)){var n=no($be,{points:e.points,stroke:e.color?Twe(e.color):"rgb(0,0,0)",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"},t);return e.clip?no(Ybe,{clipX:e.clip.x,clipY:e.clip.y,clipWidth:e.clip.width,clipHeight:e.clip.height,children:n},t):n}return function(e){return"fillRect"===e.kind&&"base"===e.layer}(e)?no(Zbe,{x:e.x,y:e.y,width:e.width,height:e.height,fill:Twe(e.color)},t):function(e){return"eraseRect"===e.kind&&"base"===e.layer}(e)?no(Zbe,{x:e.x,y:e.y,width:e.width,height:e.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},t):void 0}))}):null},Gwe=QX([Lde],(function(e){var t=e.layerState.stagingArea,n=t.images,r=t.selectedImageIndex,o=e.shouldShowStagingImage,i=e.shouldShowStagingOutline,a=e.boundingBoxCoordinates,s=a.x,l=a.y,u=e.boundingBoxDimensions,c=u.width,d=u.height;return{currentStagingAreaImage:n.length>0?n[r]:void 0,isOnFirstImage:0===r,isOnLastImage:r===n.length-1,shouldShowStagingImage:o,shouldShowStagingOutline:i,x:s,y:l,width:c,height:d}}),{memoizeOptions:{resultEqualityCheck:dae}}),qwe=function(e){var t=Object.assign({},(Kt(e),e)),n=kie(Gwe),r=n.currentStagingAreaImage,o=n.shouldShowStagingImage,i=n.shouldShowStagingOutline,a=n.x,s=n.y,l=n.width,u=n.height;return ro(Ybe,un(un({},t),{},{children:[o&&r&&no(Vwe,{url:r.image.url,x:a,y:s}),i&&ro(Ybe,{children:[no(Zbe,{x:a,y:s,width:l,height:u,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),no(Zbe,{x:a,y:s,width:l,height:u,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]}))},Ywe=QX([Lde],(function(e){var t=e.layerState.stagingArea,n=t.images,r=t.selectedImageIndex,o=e.shouldShowStagingOutline,i=e.shouldShowStagingImage;return{currentStagingAreaImage:n.length>0?n[r]:void 0,isOnFirstImage:0===r,isOnLastImage:r===n.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:o}}),{memoizeOptions:{resultEqualityCheck:dae}}),Zwe=function(){var e=wie(),t=kie(Ywe),n=t.isOnFirstImage,r=t.isOnLastImage,o=t.currentStagingAreaImage,i=t.shouldShowStagingImage,a=o8().t,s=cr.useCallback((function(){e(z3(!0))}),[e]),l=cr.useCallback((function(){e(z3(!1))}),[e]);_ce(["left"],(function(){u()}),{enabled:function(){return!0},preventDefault:!0}),_ce(["right"],(function(){c()}),{enabled:function(){return!0},preventDefault:!0}),_ce(["enter"],(function(){d()}),{enabled:function(){return!0},preventDefault:!0});var u=function(){return e(n3())},c=function(){return e(t3())},d=function(){return e(Q5())};return o?no(yP,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:s,onMouseOut:l,children:ro(k_,{isAttached:!0,children:[no(_ae,{tooltip:"".concat(a("unifiedcanvas:previous")," (Left)"),"aria-label":"".concat(a("unifiedcanvas:previous")," (Left)"),icon:no(Bce,{}),onClick:u,"data-selected":!0,isDisabled:n}),no(_ae,{tooltip:"".concat(a("unifiedcanvas:next")," (Right)"),"aria-label":"".concat(a("unifiedcanvas:next")," (Right)"),icon:no(Fce,{}),onClick:c,"data-selected":!0,isDisabled:r}),no(_ae,{tooltip:"".concat(a("unifiedcanvas:accept")," (Enter)"),"aria-label":"".concat(a("unifiedcanvas:accept")," (Enter)"),icon:no(Uce,{}),onClick:d,"data-selected":!0}),no(_ae,{tooltip:a("unifiedcanvas:showHide"),"aria-label":a("unifiedcanvas:showHide"),"data-alert":!i,icon:no(i?tde:ede,{}),onClick:function(){return e(D3(!i))},"data-selected":!0}),no(_ae,{tooltip:a("unifiedcanvas:saveToGallery"),"aria-label":a("unifiedcanvas:saveToGallery"),icon:no(mde,{}),onClick:function(){return e(uie(o.image.url))},"data-selected":!0}),no(_ae,{tooltip:a("unifiedcanvas:discardAll"),"aria-label":a("unifiedcanvas:discardAll"),icon:no(hde,{style:{transform:"rotate(45deg)"}}),onClick:function(){return e(J5())},"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},Xwe=function(e){return Math.round(100*e)/100},$we=QX([Lde],(function(e){var t=e.cursorPosition,n=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1},r=n.cursorY;return{cursorCoordinatesString:"(".concat(Xwe(n.cursorX),", ").concat(Xwe(r),")")}}),{memoizeOptions:{resultEqualityCheck:dae}});function Kwe(){var e=kie($we).cursorCoordinatesString,t=o8().t;return no("div",{children:"".concat(t("unifiedcanvas:cursorPosition"),": ").concat(e)})}var Qwe=QX([Lde],(function(e){var t=e.stageDimensions,n=t.width,r=t.height,o=e.stageCoordinates,i=o.x,a=o.y,s=e.boundingBoxDimensions,l=s.width,u=s.height,c=e.scaledBoundingBoxDimensions,d=c.width,f=c.height,h=e.boundingBoxCoordinates,p=h.x,v=h.y,g=e.stageScale,m=e.shouldShowCanvasDebugInfo,y=e.layer,b=e.boundingBoxScaleMethod,w="inherit";return("none"===b&&(l<512||u<512)||"manual"===b&&d*f<262144)&&(w="var(--status-working-color)"),{activeLayerColor:"mask"===y?"var(--status-working-color)":"inherit",activeLayerString:y.charAt(0).toUpperCase()+y.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:"(".concat(Xwe(p),", ").concat(Xwe(v),")"),boundingBoxDimensionsString:"".concat(l,"×").concat(u),scaledBoundingBoxDimensionsString:"".concat(d,"×").concat(f),canvasCoordinatesString:"".concat(Xwe(i),"×").concat(Xwe(a)),canvasDimensionsString:"".concat(n,"×").concat(r),canvasScaleString:Math.round(100*g),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:"auto"!==b,shouldShowScaledBoundingBox:"none"!==b}}),{memoizeOptions:{resultEqualityCheck:dae}}),Jwe=function(){var e=kie(Qwe),t=e.activeLayerColor,n=e.activeLayerString,r=e.boundingBoxColor,o=e.boundingBoxCoordinatesString,i=e.boundingBoxDimensionsString,a=e.scaledBoundingBoxDimensionsString,s=e.shouldShowScaledBoundingBox,l=e.canvasCoordinatesString,u=e.canvasDimensionsString,c=e.canvasScaleString,d=e.shouldShowCanvasDebugInfo,f=e.shouldShowBoundingBox,h=o8().t;return ro("div",{className:"canvas-status-text",children:[no("div",{style:{color:t},children:"".concat(h("unifiedcanvas:activeLayer"),": ").concat(n)}),no("div",{children:"".concat(h("unifiedcanvas:canvasScale"),": ").concat(c,"%")}),f&&no("div",{style:{color:r},children:"".concat(h("unifiedcanvas:boundingBox"),": ").concat(i)}),s&&no("div",{style:{color:r},children:"".concat(h("unifiedcanvas:scaledBoundingBox"),": ").concat(a)}),d&&ro(to,{children:[no("div",{children:"".concat(h("unifiedcanvas:boundingBoxPosition"),": ").concat(o)}),no("div",{children:"".concat(h("unifiedcanvas:canvasDimensions"),": ").concat(u)}),no("div",{children:"".concat(h("unifiedcanvas:canvasPosition"),": ").concat(l)}),no(Kwe,{})]})]})},eke=QX(Lde,(function(e){var t=e.boundingBoxCoordinates,n=e.boundingBoxDimensions,r=e.stageScale,o=e.isDrawing,i=e.isTransformingBoundingBox,a=e.isMovingBoundingBox,s=e.tool;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:i,stageScale:r,shouldSnapToGrid:e.shouldSnapToGrid,tool:s,hitStrokeWidth:20/r}}),{memoizeOptions:{resultEqualityCheck:dae}}),tke=function(e){var t=Object.assign({},(Kt(e),e)),n=wie(),r=kie(eke),o=r.boundingBoxCoordinates,i=r.boundingBoxDimensions,a=r.isDrawing,s=r.isMovingBoundingBox,l=r.isTransformingBoundingBox,u=r.stageScale,c=r.shouldSnapToGrid,d=r.tool,f=r.hitStrokeWidth,h=cr.useRef(null),p=cr.useRef(null),v=yn(cr.useState(!1),2),g=v[0],m=v[1];cr.useEffect((function(){var e;h.current&&p.current&&(h.current.nodes([p.current]),null===(e=h.current.getLayer())||void 0===e||e.batchDraw())}),[]);var y=64*u,b=cr.useCallback((function(e){if(c){var t=e.target.x(),r=e.target.y(),o=pK(t,64),i=pK(r,64);e.target.x(o),e.target.y(i),n(u3({x:o,y:i}))}else n(u3({x:Math.floor(e.target.x()),y:Math.floor(e.target.y())}))}),[n,c]),w=cr.useCallback((function(){if(p.current){var e=p.current,t=e.scaleX(),r=e.scaleY(),o=Math.round(e.width()*t),i=Math.round(e.height()*r),a=Math.round(e.x()),s=Math.round(e.y());n(c3({width:o,height:i})),n(u3({x:c?hK(a,64):a,y:c?hK(s,64):s})),e.scaleX(1),e.scaleY(1)}}),[n,c]),k=cr.useCallback((function(e,t,n){var r=e.x%y,o=e.y%y;return{x:hK(t.x,y)+r,y:hK(t.y,y)+o}}),[y]),x=function(){n(C3(!1)),n(x3(!1)),n(k3(!1)),m(!1)},S=function(){n(x3(!0))},C=function(){n(C3(!1)),n(x3(!1)),n(k3(!1)),m(!1)},_=function(){m(!0)},E=function(){n(k3(!0))},P=function(){n(k3(!1))};return ro(Ybe,un(un({},t),{},{children:[no(Zbe,{height:i.height,width:i.width,x:o.x,y:o.y,onMouseEnter:E,onMouseOver:E,onMouseLeave:P,onMouseOut:P}),no(Zbe,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:f,listening:!a&&"move"===d,onDragStart:S,onDragEnd:C,onDragMove:b,onMouseDown:S,onMouseOut:function(){!l&&!s&&m(!1)},onMouseOver:_,onMouseEnter:_,onMouseUp:C,onTransform:w,onTransformEnd:x,ref:p,stroke:g?"rgba(255,255,255,0.7)":"white",strokeWidth:(g?8:1)/u,width:i.width,x:o.x,y:o.y}),no("Transformer",{anchorCornerRadius:3,anchorDragBoundFunc:k,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:"move"===d?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!a&&"move"===d,onDragStart:S,onDragEnd:C,onMouseDown:function(){n(C3(!0))},onMouseUp:x,onTransformEnd:x,ref:h,rotateEnabled:!1})]}))},nke=QX(Lde,(function(e){var t=e.cursorPosition,n=e.brushSize,r=e.colorPickerColor,o=e.maskColor,i=e.brushColor,a=e.tool,s=e.layer,l=e.shouldShowBrush,u=e.isMovingBoundingBox,c=e.isTransformingBoundingBox,d=e.stageScale,f=e.stageDimensions,h=e.boundingBoxCoordinates,p=e.boundingBoxDimensions,v=e.shouldRestrictStrokesToBox?{clipX:h.x,clipY:h.y,clipWidth:p.width,clipHeight:p.height}:{};return{cursorPosition:t,brushX:t?t.x:f.width/2,brushY:t?t.y:f.height/2,radius:n/2,colorPickerOuterRadius:30/d,colorPickerInnerRadius:21/d,maskColorString:Twe(un(un({},o),{},{a:.5})),brushColorString:Twe(i),colorPickerColorString:Twe(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||c||!t)&&l,strokeWidth:1.5/d,dotRadius:1.5/d,clip:v}}),{memoizeOptions:{resultEqualityCheck:dae}}),rke=function(e){var t=Object.assign({},(Kt(e),e)),n=kie(nke),r=n.brushX,o=n.brushY,i=n.radius,a=n.maskColorString,s=n.tool,l=n.layer,u=n.shouldDrawBrushPreview,c=n.dotRadius,d=n.strokeWidth,f=n.brushColorString,h=n.colorPickerColorString,p=n.colorPickerInnerRadius,v=n.colorPickerOuterRadius,g=n.clip;return u?ro(Ybe,un(un(un({listening:!1},g),t),{},{children:[ro(to,"colorPicker"===s?{children:[no(Xbe,{x:r,y:o,radius:v,stroke:f,strokeWidth:10,strokeScaleEnabled:!1}),no(Xbe,{x:r,y:o,radius:p,stroke:h,strokeWidth:10,strokeScaleEnabled:!1})]}:{children:[no(Xbe,{x:r,y:o,radius:i,fill:"mask"===l?a:f,globalCompositeOperation:"eraser"===s?"destination-out":"source-out"}),no(Xbe,{x:r,y:o,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:2*d,strokeEnabled:!0,listening:!1}),no(Xbe,{x:r,y:o,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:d,strokeEnabled:!0,listening:!1})]}),no(Xbe,{x:r,y:o,radius:2*c,fill:"rgba(255,255,255,0.4)",listening:!1}),no(Xbe,{x:r,y:o,radius:c,fill:"rgba(0,0,0,1)",listening:!1})]})):null},oke=QX([Lde,Ode],(function(e,t){var n=e.isMaskEnabled,r=e.stageScale,o=e.shouldShowBoundingBox,i=e.isTransformingBoundingBox,a=e.isMouseOverBoundingBox,s=e.isMovingBoundingBox,l=e.stageDimensions,u=e.stageCoordinates,c=e.tool,d=e.isMovingStage,f=e.shouldShowIntermediates,h=e.shouldShowGrid,p=e.shouldRestrictStrokesToBox,v="none";return"move"===c||t?v=d?"grabbing":"grab":i?v=void 0:p&&!a&&(v="default"),{isMaskEnabled:n,isModifyingBoundingBox:i||s,shouldShowBoundingBox:o,shouldShowGrid:h,stageCoordinates:u,stageCursor:v,stageDimensions:l,stageScale:r,tool:c,isStaging:t,shouldShowIntermediates:f}}),{memoizeOptions:{resultEqualityCheck:dae}}),ike=function(){var e=kie(oke),t=e.isMaskEnabled,n=e.isModifyingBoundingBox,r=e.shouldShowBoundingBox,o=e.shouldShowGrid,i=e.stageCoordinates,a=e.stageCursor,s=e.stageDimensions,l=e.stageScale,u=e.tool,c=e.isStaging,d=e.shouldShowIntermediates;nwe();var f,h=cr.useRef(null),p=cr.useRef(null),v=cr.useCallback((function(e){Poe=e,h.current=e}),[]),g=cr.useCallback((function(e){Eoe=e,p.current=e}),[]),m=cr.useRef({x:0,y:0}),y=cr.useRef(!1),b=function(e){var t=wie(),n=kie(lwe),r=n.isMoveStageKeyHeld,o=n.stageScale;return cr.useCallback((function(n){if(e.current&&!r){n.evt.preventDefault();var i=e.current.getPointerPosition();if(i){var a=(i.x-e.current.x())/o,s=(i.y-e.current.y())/o,l=n.evt.deltaY;n.evt.ctrlKey&&(l=-l);var u=JK(o*Math.pow(.999,l),.1,20),c={x:i.x-a*u,y:i.y-s*u};t(F3(u)),t(B3(c))}}}),[e,r,o,t])}(h),w=function(e){var t=wie(),n=kie(iwe),r=n.tool,o=n.isStaging,i=owe().commitColorUnderCursor;return cr.useCallback((function(n){if(e.current)if(e.current.container().focus(),"move"===r||o)t(S3(!0));else if("colorPicker"!==r){var a=rwe(e.current);a&&(n.evt.preventDefault(),t(b3(!0)),t(Y5([a.x,a.y])))}else i()}),[e,r,o,t,i])}(h),k=function(e,t){var n=wie(),r=kie(swe),o=r.tool,i=r.isDrawing,a=r.isStaging;return cr.useCallback((function(){if("move"===o||a)n(S3(!1));else{if(!t.current&&i&&e.current){var r=rwe(e.current);if(!r)return;n(Z5([r.x,r.y]))}else t.current=!1;n(b3(!1))}}),[t,n,i,a,e,o])}(h,y),x=function(e,t,n){var r=wie(),o=kie(awe),i=o.isDrawing,a=o.tool,s=o.isStaging,l=owe().updateColorUnderCursor;return cr.useCallback((function(){if(e.current){var o=rwe(e.current);o&&(r(g3(o)),n.current=o,"colorPicker"!==a?i&&"move"!==a&&!s&&(t.current=!0,r(Z5([o.x,o.y]))):l())}}),[t,r,i,s,n,e,a,l])}(h,y,m),S=(f=wie(),cr.useCallback((function(){f(e3())}),[f])),C=function(){var e=wie(),t=kie(ewe),n=t.tool,r=t.isStaging,o=t.isMovingBoundingBox;return{handleDragStart:cr.useCallback((function(){"move"!==n&&!r||o||e(S3(!0))}),[e,o,r,n]),handleDragMove:cr.useCallback((function(t){if(("move"===n||r)&&!o){var i={x:t.target.x(),y:t.target.y()};e(B3(i))}}),[e,o,r,n]),handleDragEnd:cr.useCallback((function(){"move"!==n&&!r||o||e(S3(!1))}),[e,o,r,n])}}(),_=C.handleDragStart,E=C.handleDragMove,P=C.handleDragEnd;return no("div",{className:"inpainting-canvas-container",children:ro("div",{className:"inpainting-canvas-wrapper",children:[ro(Jbe,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:un({},a?{cursor:a}:{}),x:i.x,y:i.y,width:s.width,height:s.height,scale:{x:l,y:l},onTouchStart:w,onTouchMove:x,onTouchEnd:k,onMouseDown:w,onMouseLeave:S,onMouseMove:x,onMouseUp:k,onDragStart:_,onDragMove:E,onDragEnd:P,onContextMenu:function(e){return e.evt.preventDefault()},onWheel:b,draggable:("move"===u||c)&&!n,children:[no(qbe,{id:"grid",visible:o,children:no(Owe,{})}),no(qbe,{id:"base",ref:g,listening:!1,imageSmoothingEnabled:!1,children:no(Uwe,{})}),ro(qbe,{id:"mask",visible:t,listening:!1,children:[no(Fwe,{visible:!0,listening:!1}),no(jwe,{listening:!1})]}),no(qbe,{children:no(cwe,{})}),ro(qbe,{id:"preview",imageSmoothingEnabled:!1,children:[!c&&no(rke,{visible:"move"!==u,listening:!1}),no(qwe,{visible:c}),d&&no(Mwe,{}),no(tke,{visible:r&&!c})]})]}),no(Jwe,{}),no(Zwe,{})]})})},ake=QX(Lde,Ade,fae,(function(e,t,n){return{doesCanvasNeedScaling:e.doesCanvasNeedScaling,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:e.isCanvasInitialized}})),ske=function(){var e=wie(),t=kie(ake),n=t.doesCanvasNeedScaling,r=t.activeTabName,o=t.initialCanvasImage,i=t.isCanvasInitialized,a=cr.useRef(null);return cr.useLayoutEffect((function(){window.setTimeout((function(){if(a.current){var t=a.current,n=t.clientWidth,r=t.clientHeight;e(p3({width:n,height:r})),e(i?l3():s3()),e(m3(!1))}}),0)}),[e,o,n,r,i]),no("div",{ref:a,className:"inpainting-canvas-area",children:no(XC,{thickness:"2px",speed:"1s",size:"xl"})})},lke=_K,uke=kK,cke=function(){return lke.Date.now()},dke=$K,fke=Math.max,hke=Math.min;var pke=function(e,t,n){var r,o,i,a,s,l,u=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function p(e){return u=e,s=setTimeout(g,t),c?h(e):a}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=i}function g(){var e=cke();if(v(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?hke(n,i-(e-u)):n}(e))}function m(e){return s=void 0,f&&r?h(e):(r=o=void 0,a)}function y(){var e=cke(),n=v(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return p(l);if(d)return clearTimeout(s),s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=dke(t)||0,uke(n)&&(c=!!n.leading,i=(d="maxWait"in n)?fke(dke(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=o=s=void 0},y.flush=function(){return void 0===s?a:m(cke())},y},vke=QX([Lde,fae,wle],(function(e,t,n){return{canRedo:e.futureLayerStates.length>0&&!n.isProcessing,activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function gke(){var e=wie(),t=kie(vke),n=t.canRedo,r=t.activeTabName,o=o8().t,i=function(){e(r3())};return _ce(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],(function(){i()}),{enabled:function(){return n},preventDefault:!0},[r,n]),no(_ae,{"aria-label":"".concat(o("unifiedcanvas:redo")," (Ctrl+Shift+Z)"),tooltip:"".concat(o("unifiedcanvas:redo")," (Ctrl+Shift+Z)"),icon:no(gde,{}),onClick:i,isDisabled:!n})}var mke=QX([Lde,fae,wle],(function(e,t,n){return{canUndo:e.pastLayerStates.length>0&&!n.isProcessing,activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function yke(){var e=wie(),t=o8().t,n=kie(mke),r=n.canUndo,o=n.activeTabName,i=function(){e(V3())};return _ce(["meta+z","ctrl+z"],(function(){i()}),{enabled:function(){return r},preventDefault:!0},[o,r]),no(_ae,{"aria-label":"".concat(t("unifiedcanvas:undo")," (Ctrl+Z)"),tooltip:"".concat(t("unifiedcanvas:undo")," (Ctrl+Z)"),icon:no(Cde,{}),onClick:i,isDisabled:!r})}var bke=function(e,t,n){var r=document.createElement("img");r.addEventListener("load",(function(){var e=document.createElement("canvas");e.width=t,e.height=n;var o=e.getContext("2d");o&&(o.drawImage(r,0,0),e.toBlob((function(e){e&&navigator.clipboard.write([new ClipboardItem(gn({},e.type,e))])})),e.remove(),r.remove())})),r.src=e},wke=function(e){var t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},kke=function(e,t,n,r){var o=e.scale(),i=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});var a=e.getClientRect(),s=a.x,l=a.y,u=a.width,c=a.height,d=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:s,y:l,width:u,height:c},f=e.toDataURL(d);return e.scale(o),{dataURL:f,boundingBox:{x:i.x,y:i.y,width:u,height:c}}},xke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Ske=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xke;return function(){var t=qt(Ut().mark((function t(n,r){var o,i,a,s,l,u,c,d,f,h,p,v,g,m,y,b,w,k,x,S,C,_,E;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.cropVisible,i=e.cropToBoundingBox,a=e.shouldSaveToGallery,s=e.shouldDownload,l=e.shouldCopy,u=e.shouldSetAsInitialImage,n(O8("Exporting Image")),n(x8(!1)),c=r(),d=c.canvas,f=d.stageScale,h=d.boundingBoxCoordinates,p=d.boundingBoxDimensions,v=d.stageCoordinates,g=Loe()){t.next=10;break}return n(l8(!1)),n(x8(!0)),t.abrupt("return");case 10:if(m=kke(g,f,v,i?un(un({},h),p):void 0),y=m.dataURL,b=m.boundingBox,y){t.next=15;break}return n(l8(!1)),n(x8(!0)),t.abrupt("return");case 15:return(w=new FormData).append("data",JSON.stringify({dataURL:y,filename:"merged_canvas.png",kind:a?"result":"temp",cropVisible:o})),t.next=19,fetch("".concat(window.location.origin,"/upload"),{method:"POST",body:w});case 19:return k=t.sent,t.next=22,k.json();case 22:x=t.sent,S=x.url,C=x.width,_=x.height,E=un({uuid:Xoe(),category:a?"result":"user"},x),s&&(wke(S),n(P8({title:A7.t("toast:downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),l&&(bke(S,C,_),n(P8({title:A7.t("toast:imageCopied"),status:"success",duration:2500,isClosable:!0}))),a&&(n(Z3({image:E,category:"result"})),n(P8({title:A7.t("toast:imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),u&&(n(P3(un(un({kind:"image",layer:"base"},b),{},{image:E}))),n(P8({title:A7.t("toast:canvasMerged"),status:"success",duration:2500,isClosable:!0}))),n(l8(!1)),n(v8(A7.t("common:statusConnected"))),n(x8(!0));case 32:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()};function Cke(){var e=kie(Ode),t=Loe(),n=kie((function(e){return e.system.isProcessing})),r=kie((function(e){return e.canvas.shouldCropToBoundingBoxOnSave})),o=wie(),i=o8().t;_ce(["meta+c","ctrl+c"],(function(){a()}),{enabled:function(){return!e},preventDefault:!0},[t,n]);var a=function(){o(Ske({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return no(_ae,{"aria-label":"".concat(i("unifiedcanvas:copyToClipboard")," (Cmd/Ctrl+C)"),tooltip:"".concat(i("unifiedcanvas:copyToClipboard")," (Cmd/Ctrl+C)"),icon:no(qce,{}),onClick:a,isDisabled:e})}function _ke(){var e=wie(),t=o8().t,n=Loe(),r=kie(Ode),o=kie((function(e){return e.system.isProcessing})),i=kie((function(e){return e.canvas.shouldCropToBoundingBoxOnSave}));_ce(["shift+d"],(function(){a()}),{enabled:function(){return!r},preventDefault:!0},[n,o]);var a=function(){e(Ske({cropVisible:!i,cropToBoundingBox:i,shouldDownload:!0}))};return no(_ae,{"aria-label":"".concat(t("unifiedcanvas:downloadAsImage")," (Shift+D)"),tooltip:"".concat(t("unifiedcanvas:downloadAsImage")," (Shift+D)"),icon:no(Xce,{}),onClick:a,isDisabled:r})}function Eke(){var e=kie(Ode),t=xie().openUploader,n=o8().t;return no(_ae,{"aria-label":n("common:upload"),tooltip:n("common:upload"),icon:no(_de,{}),onClick:t,isDisabled:e})}var Pke=QX([Lde,Ode],(function(e,t){return{layer:e.layer,isMaskEnabled:e.isMaskEnabled,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function Lke(){var e=wie(),t=o8().t,n=kie(Pke),r=n.layer,o=n.isMaskEnabled,i=n.isStaging;_ce(["q"],(function(){e(_3("mask"===r?"base":"mask"))}),{enabled:function(){return!i},preventDefault:!0},[r]);return no(Mae,{tooltip:"".concat(t("unifiedcanvas:layer")," (Q)"),tooltipProps:{hasArrow:!0,placement:"top"},value:r,validValues:D5,onChange:function(t){var n=t.target.value;e(_3(n)),"mask"!==n||o||e(w3(!0))},isDisabled:i})}function Oke(){var e=wie(),t=o8().t,n=Loe(),r=kie(Ode),o=kie((function(e){return e.system.isProcessing}));_ce(["shift+m"],(function(){i()}),{enabled:function(){return!r},preventDefault:!0},[n,o]);var i=function(){e(Ske({cropVisible:!1,shouldSetAsInitialImage:!0}))};return no(_ae,{"aria-label":"".concat(t("unifiedcanvas:mergeVisible")," (Shift+M)"),tooltip:"".concat(t("unifiedcanvas:mergeVisible")," (Shift+M)"),icon:no(sde,{}),onClick:i,isDisabled:r})}function Ake(){var e=kie((function(e){return e.canvas.tool})),t=kie(Ode),n=wie(),r=o8().t;_ce(["v"],(function(){o()}),{enabled:function(){return!t},preventDefault:!0},[]);var o=function(){return n(H3("move"))};return no(_ae,{"aria-label":"".concat(r("unifiedcanvas:move")," (V)"),tooltip:"".concat(r("unifiedcanvas:move")," (V)"),icon:no(Hce,{}),"data-selected":"move"===e||t,onClick:o})}function Mke(){var e=kie((function(e){return e.ui.shouldPinParametersPanel})),t=wie(),n=o8().t;return ro(yP,{flexDirection:"column",gap:"0.5rem",children:[no(_ae,{tooltip:"".concat(n("parameters:showOptionsPanel")," (O)"),tooltipProps:{placement:"top"},"aria-label":n("parameters:showOptionsPanel"),onClick:function(){t(V8(!0)),e&&setTimeout((function(){return t(m3(!0))}),400)},children:no(kde,{})}),no(yP,{children:no(Fye,{iconButton:!0})}),no(yP,{children:no(zye,{width:"100%",height:"40px"})})]})}function Tke(){var e=wie(),t=o8().t,n=kie(Ode);return no(_ae,{"aria-label":t("unifiedcanvas:clearCanvas"),tooltip:t("unifiedcanvas:clearCanvas"),icon:no(Sde,{}),onClick:function(){e(o3()),e(s3())},style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function Ike(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,r=cr.useState(0),o=yn(r,2),i=o[0],a=o[1];return cr.useEffect((function(){var r=setTimeout((function(){1===i&&e(),a(0)}),n);return 2===i&&t(),function(){return clearTimeout(r)}}),[i,e,t,n]),function(){return a((function(e){return e+1}))}}function Rke(){var e=Loe(),t=wie(),n=o8().t;_ce(["r"],(function(){o()}),{enabled:function(){return!0},preventDefault:!0},[e]);var r=Ike((function(){return o(!1)}),(function(){return o(!0)})),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Loe();if(n){var r=n.getClientRect({skipTransform:!0});t(a3({contentRect:r,shouldScaleTo1:e}))}};return no(_ae,{"aria-label":"".concat(n("unifiedcanvas:resetView")," (R)"),tooltip:"".concat(n("unifiedcanvas:resetView")," (R)"),icon:no(Yce,{}),onClick:r})}function Nke(){var e=kie(Ode),t=Loe(),n=kie((function(e){return e.system.isProcessing})),r=kie((function(e){return e.canvas.shouldCropToBoundingBoxOnSave})),o=wie(),i=o8().t;_ce(["shift+s"],(function(){a()}),{enabled:function(){return!e},preventDefault:!0},[t,n]);var a=function(){o(Ske({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return no(_ae,{"aria-label":"".concat(i("unifiedcanvas:saveToGallery")," (Shift+S)"),tooltip:"".concat(i("unifiedcanvas:saveToGallery")," (Shift+S)"),icon:no(mde,{}),onClick:a,isDisabled:e})}var Dke=QX([Lde,Ode,wle],(function(e,t,n){var r=n.isProcessing;return{tool:e.tool,isStaging:t,isProcessing:r}}),{memoizeOptions:{resultEqualityCheck:dae}}),zke=function(){var e=wie(),t=o8().t,n=kie(Dke),r=n.tool,o=n.isStaging;_ce(["b"],(function(){i()}),{enabled:function(){return!o},preventDefault:!0},[]),_ce(["e"],(function(){a()}),{enabled:function(){return!o},preventDefault:!0},[r]),_ce(["c"],(function(){s()}),{enabled:function(){return!o},preventDefault:!0},[r]),_ce(["shift+f"],(function(){l()}),{enabled:function(){return!o},preventDefault:!0}),_ce(["delete","backspace"],(function(){u()}),{enabled:function(){return!o},preventDefault:!0});var i=function(){return e(H3("brush"))},a=function(){return e(H3("eraser"))},s=function(){return e(H3("colorPicker"))},l=function(){return e(G5())},u=function(){return e(U5())};return ro(yP,{flexDirection:"column",gap:"0.5rem",children:[ro(k_,{children:[no(_ae,{"aria-label":"".concat(t("unifiedcanvas:brush")," (B)"),tooltip:"".concat(t("unifiedcanvas:brush")," (B)"),icon:no(cde,{}),"data-selected":"brush"===r&&!o,onClick:i,isDisabled:o}),no(_ae,{"aria-label":"".concat(t("unifiedcanvas:eraser")," (E)"),tooltip:"".concat(t("unifiedcanvas:eraser")," (B)"),icon:no($ce,{}),"data-selected":"eraser"===r&&!o,isDisabled:o,onClick:a})]}),ro(k_,{children:[no(_ae,{"aria-label":"".concat(t("unifiedcanvas:fillBoundingBox")," (Shift+F)"),tooltip:"".concat(t("unifiedcanvas:fillBoundingBox")," (Shift+F)"),icon:no(nde,{}),isDisabled:o,onClick:l}),no(_ae,{"aria-label":"".concat(t("unifiedcanvas:eraseBoundingBox")," (Del/Backspace)"),tooltip:"".concat(t("unifiedcanvas:eraseBoundingBox")," (Del/Backspace)"),icon:no(hde,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:u})]}),no(_ae,{"aria-label":"".concat(t("unifiedcanvas:colorPicker")," (C)"),tooltip:"".concat(t("unifiedcanvas:colorPicker")," (C)"),icon:no(Jce,{}),"data-selected":"colorPicker"===r&&!o,isDisabled:o,onClick:s,width:"max-content"})]})},jke=Cv((function(e,t){var n=e.acceptButtonText,r=void 0===n?"Accept":n,o=e.acceptCallback,i=e.cancelButtonText,a=void 0===i?"Cancel":i,s=e.cancelCallback,l=e.children,u=e.title,c=e.triggerComponent,d=GE(),f=d.isOpen,h=d.onOpen,p=d.onClose,v=cr.useRef(null);return ro(to,{children:[cr.cloneElement(c,{onClick:h,ref:t}),no(oU,{isOpen:f,leastDestructiveRef:v,onClose:p,children:no(rU,{children:ro(iU,{className:"modal",children:[no(tU,{fontSize:"lg",fontWeight:"bold",children:u}),no(YW,{children:l}),ro(eU,{children:[no(b_,{ref:v,onClick:function(){s&&s(),p()},className:"modal-close-btn",children:a}),no(b_,{colorScheme:"red",onClick:function(){o(),p()},ml:3,children:r})]})]})})})]})})),Bke=function(){var e=kie(Ode),t=wie(),n=o8().t;return ro(jke,{title:n("unifiedcanvas:emptyTempImageFolder"),acceptCallback:function(){t(cie()),t(o3()),t(X5())},acceptButtonText:n("unifiedcanvas:emptyFolder"),triggerComponent:no(Eae,{leftIcon:no(Sde,{}),size:"sm",isDisabled:e,children:n("unifiedcanvas:emptyTempImageFolder")}),children:[no("p",{children:n("unifiedcanvas:emptyTempImagesFolderMessage")}),no("br",{}),no("p",{children:n("unifiedcanvas:emptyTempImagesFolderConfirm")})]})},Fke=function(){var e=kie(Ode),t=wie(),n=o8().t;return ro(jke,{title:n("unifiedcanvas:clearCanvasHistory"),acceptCallback:function(){return t(X5())},acceptButtonText:n("unifiedcanvas:clearHistory"),triggerComponent:no(Eae,{size:"sm",leftIcon:no(Sde,{}),isDisabled:e,children:n("unifiedcanvas:clearCanvasHistory")}),children:[no("p",{children:n("unifiedcanvas:clearCanvasHistoryMessage")}),no("br",{}),no("p",{children:n("unifiedcanvas:clearCanvasHistoryConfirm")})]})},Hke=QX([Lde],(function(e){return{shouldAutoSave:e.shouldAutoSave,shouldCropToBoundingBoxOnSave:e.shouldCropToBoundingBoxOnSave,shouldShowCanvasDebugInfo:e.shouldShowCanvasDebugInfo,shouldShowIntermediates:e.shouldShowIntermediates}}),{memoizeOptions:{resultEqualityCheck:dae}}),Vke=function(){var e=wie(),t=o8().t,n=kie(Hke),r=n.shouldAutoSave,o=n.shouldCropToBoundingBoxOnSave,i=n.shouldShowCanvasDebugInfo,a=n.shouldShowIntermediates;return no(Pae,{trigger:"hover",triggerComponent:no(_ae,{tooltip:t("unifiedcanvas:canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedcanvas:canvasSettings"),icon:no(Pde,{})}),children:ro(yP,{direction:"column",gap:"0.5rem",children:[no(pfe,{label:t("unifiedcanvas:showIntermediates"),isChecked:a,onChange:function(t){return e(N3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:r,onChange:function(t){return e(L3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:o,onChange:function(t){return e(O3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:i,onChange:function(t){return e(I3(t.target.checked))}}),no(Fke,{}),no(Bke,{})]})})},Wke=function(){var e=kie((function(e){return e.ui.shouldShowParametersPanel}));return ro(yP,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[no(Lke,{}),no(zke,{}),ro(yP,{gap:"0.5rem",children:[no(Ake,{}),no(Rke,{})]}),ro(yP,{columnGap:"0.5rem",children:[no(Oke,{}),no(Nke,{})]}),ro(yP,{columnGap:"0.5rem",children:[no(Cke,{}),no(_ke,{})]}),ro(yP,{gap:"0.5rem",children:[no(yke,{}),no(gke,{})]}),ro(yP,{gap:"0.5rem",children:[no(Eke,{}),no(Tke,{})]}),no(Vke,{}),!e&&no(Mke,{})]})};function Uke(){var e=wie(),t=kie((function(e){return e.canvas.brushSize})),n=o8().t,r=kie(Ode);return _ce(["BracketLeft"],(function(){e(h3(Math.max(t-5,5)))}),{enabled:function(){return!r},preventDefault:!0},[t]),_ce(["BracketRight"],(function(){e(h3(Math.min(t+5,500)))}),{enabled:function(){return!r},preventDefault:!0},[t]),no(xfe,{label:n("unifiedcanvas:brushSize"),value:t,withInput:!0,onChange:function(t){return e(h3(t))},sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}function Gke(){return(Gke=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}).apply(this,arguments)}function qke(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function Yke(e){var t=cr.useRef(e),n=cr.useRef((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var Zke=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},Xke=function(e){return"touches"in e},$ke=function(e){return e&&e.ownerDocument.defaultView||self},Kke=function(e,t,n){var r=e.getBoundingClientRect(),o=Xke(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:Zke((o.pageX-(r.left+$ke(e).pageXOffset))/r.width),top:Zke((o.pageY-(r.top+$ke(e).pageYOffset))/r.height)}},Qke=function(e){!Xke(e)&&e.preventDefault()},Jke=qr.memo((function(e){var t=e.onMove,n=e.onKey,r=qke(e,["onMove","onKey"]),o=cr.useRef(null),i=Yke(t),a=Yke(n),s=cr.useRef(null),l=cr.useRef(!1),u=cr.useMemo((function(){var e=function(e){Qke(e),(Xke(e)?e.touches.length>0:e.buttons>0)&&o.current?i(Kke(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=$ke(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(Qke(t),!function(e,t){return t&&!Xke(e)}(t,l.current)&&r)){if(Xke(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(Kke(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],d=u[1],f=u[2];return cr.useEffect((function(){return f}),[f]),qr.createElement("div",Gke({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),exe=function(e){return e.filter(Boolean).join(" ")},txe=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=exe(["react-colorful__pointer",e.className]);return qr.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},qr.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},nxe=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},rxe=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:nxe(e.h),s:nxe(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:nxe(o/2),a:nxe(r,2)}},oxe=function(e){var t=rxe(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ixe=function(e){var t=rxe(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},axe=qr.memo((function(e){var t=e.hue,n=e.onChange,r=exe(["react-colorful__hue",e.className]);return qr.createElement("div",{className:r},qr.createElement(Jke,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Zke(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":nxe(t),"aria-valuemax":"360","aria-valuemin":"0"},qr.createElement(txe,{className:"react-colorful__hue-pointer",left:t/360,color:oxe({h:t,s:100,v:100,a:1})})))})),sxe=qr.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:oxe({h:t.h,s:100,v:100,a:1})};return qr.createElement("div",{className:"react-colorful__saturation",style:r},qr.createElement(Jke,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Zke(t.s+100*e.left,0,100),v:Zke(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+nxe(t.s)+"%, Brightness "+nxe(t.v)+"%"},qr.createElement(txe,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:oxe(t)})))})),lxe=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function uxe(e,t,n){var r=Yke(n),o=cr.useState((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=cr.useRef({color:t,hsva:i});cr.useEffect((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),cr.useEffect((function(){var t;lxe(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=cr.useCallback((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var cxe="undefined"!=typeof window?cr.useLayoutEffect:cr.useEffect,dxe=new Map,fxe=function(e){cxe((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!dxe.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',dxe.set(t,n);var r="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},hxe=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+ixe(Object.assign({},n,{a:0}))+", "+ixe(Object.assign({},n,{a:1}))+")"},i=exe(["react-colorful__alpha",t]),a=nxe(100*n.a);return qr.createElement("div",{className:i},qr.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),qr.createElement(Jke,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:Zke(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},qr.createElement(txe,{className:"react-colorful__alpha-pointer",left:n.a,color:ixe(n)})))},pxe=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=qke(e,["className","colorModel","color","onChange"]),s=cr.useRef(null);fxe(s);var l=uxe(n,o,i),u=l[0],c=l[1],d=exe(["react-colorful",t]);return qr.createElement("div",Gke({},a,{ref:s,className:d}),qr.createElement(sxe,{hsva:u,onChange:c}),qr.createElement(axe,{hue:u.h,onChange:c}),qr.createElement(hxe,{hsva:u,onChange:c,className:"react-colorful__last-control"}))},vxe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:nxe(60*(s<0?s+6:s)),s:nxe(i?a/i*100:0),v:nxe(i/255*100),a:o}},fromHsva:function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:nxe(255*[r,s,a,a,l,r][u]),g:nxe(255*[l,r,r,s,a,a][u]),b:nxe(255*[a,a,l,r,r,s][u]),a:nxe(o,2)}},equal:lxe},gxe=function(e){return qr.createElement(pxe,Gke({},e,{colorModel:vxe}))},mxe=function(e){var t=e.styleClass,n=sn(e,Wt);return no(gxe,un({className:"invokeai__color-picker ".concat(t)},n))},yxe=QX([Lde,Ode],(function(e,t){return{brushColor:e.brushColor,maskColor:e.maskColor,layer:e.layer,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function bxe(){var e=wie(),t=kie(yxe),n=t.brushColor,r=t.maskColor,o=t.layer,i=t.isStaging;return _ce(["shift+BracketLeft"],(function(){e(f3(un(un({},n),{},{a:JK(n.a-.05,.05,1)})))}),{enabled:function(){return!i},preventDefault:!0},[n]),_ce(["shift+BracketRight"],(function(){e(f3(un(un({},n),{},{a:JK(n.a+.05,.05,1)})))}),{enabled:function(){return!i},preventDefault:!0},[n]),no(Pae,{trigger:"hover",triggerComponent:no(cP,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:"base"===o?"rgba(".concat(n.r,",").concat(n.g,",").concat(n.b,",").concat(n.a,")"):"mask"===o?"rgba(".concat(r.r,",").concat(r.g,",").concat(r.b,",").concat(r.a,")"):void 0,cursor:"pointer"}}),children:ro(yP,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:["base"===o&&no(mxe,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:function(t){return e(f3(t))}}),"mask"===o&&no(mxe,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:function(t){return e(E3(t))}})]})})}function wxe(){return ro(yP,{columnGap:"1rem",alignItems:"center",children:[no(Uke,{}),no(bxe,{})]})}function kxe(){var e=wie(),t=kie((function(e){return e.canvas.shouldRestrictStrokesToBox})),n=o8().t;return no(pfe,{label:n("unifiedcanvas:betaLimitToBox"),isChecked:t,onChange:function(t){return e(U3(t.target.checked))}})}function xxe(){return ro(yP,{gap:"1rem",alignItems:"center",children:[no(wxe,{}),no(kxe,{})]})}function Sxe(){var e=wie(),t=o8().t;return no(Eae,{size:"sm",leftIcon:no(Sde,{}),onClick:function(){return e($5())},tooltip:"".concat(t("unifiedcanvas:clearMask")," (Shift+C)"),children:t("unifiedcanvas:betaClear")})}function Cxe(){var e=kie((function(e){return e.canvas.isMaskEnabled})),t=wie(),n=o8().t;return no(pfe,{label:"".concat(n("unifiedcanvas:enableMask")," (H)"),isChecked:e,onChange:function(){return t(w3(!e))}})}function _xe(){var e=wie(),t=o8().t,n=kie((function(e){return e.canvas.shouldPreserveMaskedArea}));return no(pfe,{label:t("unifiedcanvas:betaPreserveMasked"),isChecked:n,onChange:function(t){return e(M3(t.target.checked))}})}function Exe(){return ro(yP,{gap:"1rem",alignItems:"center",children:[no(wxe,{}),no(Cxe,{}),no(_xe,{}),no(Sxe,{})]})}function Pxe(){var e=kie((function(e){return e.canvas.shouldDarkenOutsideBoundingBox})),t=wie(),n=o8().t;return no(pfe,{label:n("unifiedcanvas:betaDarkenOutside"),isChecked:e,onChange:function(e){return t(A3(e.target.checked))}})}function Lxe(){var e=kie((function(e){return e.canvas.shouldShowGrid})),t=wie(),n=o8().t;return no(pfe,{label:n("unifiedcanvas:showGrid"),isChecked:e,onChange:function(e){return t(R3(e.target.checked))}})}function Oxe(){var e=kie((function(e){return e.canvas.shouldSnapToGrid})),t=wie(),n=o8().t;return no(pfe,{label:"".concat(n("unifiedcanvas:snapToGrid")," (N)"),isChecked:e,onChange:function(e){return t(j3(e.target.checked))}})}function Axe(){return ro(yP,{alignItems:"center",gap:"1rem",children:[no(Lxe,{}),no(Oxe,{}),no(Pxe,{})]})}var Mxe=QX([Lde],(function(e){return{tool:e.tool,layer:e.layer}}),{memoizeOptions:{resultEqualityCheck:dae}});function Txe(){var e=kie(Mxe),t=e.tool,n=e.layer;return ro(yP,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:["base"==n&&["brush","eraser","colorPicker"].includes(t)&&no(xxe,{}),"mask"==n&&["brush","eraser","colorPicker"].includes(t)&&no(Exe,{}),"move"==t&&no(Axe,{})]})}var Ixe=QX([Lde],(function(e){return{doesCanvasNeedScaling:e.doesCanvasNeedScaling}}),{memoizeOptions:{resultEqualityCheck:dae}}),Rxe=function(){var e=wie(),t=kie(Ixe).doesCanvasNeedScaling;return cr.useLayoutEffect((function(){e(m3(!0));var t=pke((function(){e(m3(!0))}),250);return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[e]),no("div",{className:"workarea-single-view",children:ro(yP,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[no(Wke,{}),ro(yP,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[no(Txe,{}),no(t?ske:ike,{})]})]})})},Nxe=QX([Lde,Ode],(function(e,t){var n=e.maskColor,r=e.layer,o=e.isMaskEnabled,i=e.shouldPreserveMaskedArea;return{layer:r,maskColor:n,maskColorString:Twe(n),isMaskEnabled:o,shouldPreserveMaskedArea:i,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:dae}}),Dxe=function(){var e=wie(),t=o8().t,n=kie(Nxe),r=n.layer,o=n.maskColor,i=n.isMaskEnabled,a=n.shouldPreserveMaskedArea,s=n.isStaging;_ce(["q"],(function(){l()}),{enabled:function(){return!s},preventDefault:!0},[r]),_ce(["shift+c"],(function(){u()}),{enabled:function(){return!s},preventDefault:!0},[]),_ce(["h"],(function(){c()}),{enabled:function(){return!s},preventDefault:!0},[i]);var l=function(){e(_3("mask"===r?"base":"mask"))},u=function(){return e($5())},c=function(){return e(w3(!i))};return no(Pae,{trigger:"hover",triggerComponent:no(k_,{children:no(_ae,{"aria-label":t("unifiedcanvas:maskingOptions"),tooltip:t("unifiedcanvas:maskingOptions"),icon:no(lde,{}),style:"mask"===r?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:s})}),children:ro(yP,{direction:"column",gap:"0.5rem",children:[no(pfe,{label:"".concat(t("unifiedcanvas:enableMask")," (H)"),isChecked:i,onChange:c}),no(pfe,{label:t("unifiedcanvas:preserveMaskedArea"),isChecked:a,onChange:function(t){return e(M3(t.target.checked))}}),no(mxe,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:o,onChange:function(t){return e(E3(t))}}),ro(Eae,{size:"sm",leftIcon:no(Sde,{}),onClick:u,children:[t("unifiedcanvas:clearMask")," (Shift+C)"]})]})})},zxe=QX([Lde],(function(e){return{shouldAutoSave:e.shouldAutoSave,shouldCropToBoundingBoxOnSave:e.shouldCropToBoundingBoxOnSave,shouldDarkenOutsideBoundingBox:e.shouldDarkenOutsideBoundingBox,shouldShowCanvasDebugInfo:e.shouldShowCanvasDebugInfo,shouldShowGrid:e.shouldShowGrid,shouldShowIntermediates:e.shouldShowIntermediates,shouldSnapToGrid:e.shouldSnapToGrid,shouldRestrictStrokesToBox:e.shouldRestrictStrokesToBox}}),{memoizeOptions:{resultEqualityCheck:dae}}),jxe=function(){var e=wie(),t=o8().t,n=kie(zxe),r=n.shouldAutoSave,o=n.shouldCropToBoundingBoxOnSave,i=n.shouldDarkenOutsideBoundingBox,a=n.shouldShowCanvasDebugInfo,s=n.shouldShowGrid,l=n.shouldShowIntermediates,u=n.shouldSnapToGrid,c=n.shouldRestrictStrokesToBox;_ce(["n"],(function(){e(j3(!u))}),{enabled:!0,preventDefault:!0},[u]);return no(Pae,{trigger:"hover",triggerComponent:no(_ae,{tooltip:t("unifiedcanvas:canvasSettings"),"aria-label":t("unifiedcanvas:canvasSettings"),icon:no(Pde,{})}),children:ro(yP,{direction:"column",gap:"0.5rem",children:[no(pfe,{label:t("unifiedcanvas:showIntermediates"),isChecked:l,onChange:function(t){return e(N3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:showGrid"),isChecked:s,onChange:function(t){return e(R3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:snapToGrid"),isChecked:u,onChange:function(t){return e(j3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:darkenOutsideSelection"),isChecked:i,onChange:function(t){return e(A3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:r,onChange:function(t){return e(L3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:o,onChange:function(t){return e(O3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:limitStrokesToBox"),isChecked:c,onChange:function(t){return e(U3(t.target.checked))}}),no(pfe,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:a,onChange:function(t){return e(I3(t.target.checked))}}),no(Fke,{}),no(Bke,{})]})})},Bxe=QX([Lde,Ode,wle],(function(e,t,n){var r=n.isProcessing;return{tool:e.tool,isStaging:t,isProcessing:r,brushColor:e.brushColor,brushSize:e.brushSize}}),{memoizeOptions:{resultEqualityCheck:dae}}),Fxe=function(){var e=wie(),t=kie(Bxe),n=t.tool,r=t.brushColor,o=t.brushSize,i=t.isStaging,a=o8().t;_ce(["b"],(function(){s()}),{enabled:function(){return!i},preventDefault:!0},[]),_ce(["e"],(function(){l()}),{enabled:function(){return!i},preventDefault:!0},[n]),_ce(["c"],(function(){u()}),{enabled:function(){return!i},preventDefault:!0},[n]),_ce(["shift+f"],(function(){c()}),{enabled:function(){return!i},preventDefault:!0}),_ce(["delete","backspace"],(function(){d()}),{enabled:function(){return!i},preventDefault:!0}),_ce(["BracketLeft"],(function(){e(h3(Math.max(o-5,5)))}),{enabled:function(){return!i},preventDefault:!0},[o]),_ce(["BracketRight"],(function(){e(h3(Math.min(o+5,500)))}),{enabled:function(){return!i},preventDefault:!0},[o]),_ce(["shift+BracketLeft"],(function(){e(f3(un(un({},r),{},{a:JK(r.a-.05,.05,1)})))}),{enabled:function(){return!i},preventDefault:!0},[r]),_ce(["shift+BracketRight"],(function(){e(f3(un(un({},r),{},{a:JK(r.a+.05,.05,1)})))}),{enabled:function(){return!i},preventDefault:!0},[r]);var s=function(){return e(H3("brush"))},l=function(){return e(H3("eraser"))},u=function(){return e(H3("colorPicker"))},c=function(){return e(G5())},d=function(){return e(U5())};return ro(k_,{isAttached:!0,children:[no(_ae,{"aria-label":"".concat(a("unifiedcanvas:brush")," (B)"),tooltip:"".concat(a("unifiedcanvas:brush")," (B)"),icon:no(cde,{}),"data-selected":"brush"===n&&!i,onClick:s,isDisabled:i}),no(_ae,{"aria-label":"".concat(a("unifiedcanvas:eraser")," (E)"),tooltip:"".concat(a("unifiedcanvas:eraser")," (E)"),icon:no($ce,{}),"data-selected":"eraser"===n&&!i,isDisabled:i,onClick:l}),no(_ae,{"aria-label":"".concat(a("unifiedcanvas:fillBoundingBox")," (Shift+F)"),tooltip:"".concat(a("unifiedcanvas:fillBoundingBox")," (Shift+F)"),icon:no(nde,{}),isDisabled:i,onClick:c}),no(_ae,{"aria-label":"".concat(a("unifiedcanvas:eraseBoundingBox")," (Del/Backspace)"),tooltip:"".concat(a("unifiedcanvas:eraseBoundingBox")," (Del/Backspace)"),icon:no(hde,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:d}),no(_ae,{"aria-label":"".concat(a("unifiedcanvas:colorPicker")," (C)"),tooltip:"".concat(a("unifiedcanvas:colorPicker")," (C)"),icon:no(Jce,{}),"data-selected":"colorPicker"===n&&!i,isDisabled:i,onClick:u}),no(Pae,{trigger:"hover",triggerComponent:no(_ae,{"aria-label":a("unifiedcanvas:brushOptions"),tooltip:a("unifiedcanvas:brushOptions"),icon:no(kde,{})}),children:ro(yP,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[no(yP,{gap:"1rem",justifyContent:"space-between",children:no(xfe,{label:a("unifiedcanvas:brushSize"),value:o,withInput:!0,onChange:function(t){return e(h3(t))},sliderNumberInputProps:{max:500},inputReadOnly:!1})}),no(mxe,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:function(t){return e(f3(t))}})]})})]})},Hxe=QX([wle,Lde,Ode],(function(e,t,n){var r=e.isProcessing,o=t.tool,i=t.shouldCropToBoundingBoxOnSave,a=t.layer;return{isProcessing:r,isStaging:n,isMaskEnabled:t.isMaskEnabled,tool:o,layer:a,shouldCropToBoundingBoxOnSave:i}}),{memoizeOptions:{resultEqualityCheck:dae}}),Vxe=function(){var e=wie(),t=kie(Hxe),n=t.isProcessing,r=t.isStaging,o=t.isMaskEnabled,i=t.layer,a=t.tool,s=t.shouldCropToBoundingBoxOnSave,l=Loe(),u=o8().t,c=xie().openUploader;_ce(["v"],(function(){d()}),{enabled:function(){return!r},preventDefault:!0},[]),_ce(["r"],(function(){h()}),{enabled:function(){return!0},preventDefault:!0},[l]),_ce(["shift+m"],(function(){p()}),{enabled:function(){return!r},preventDefault:!0},[l,n]),_ce(["shift+s"],(function(){v()}),{enabled:function(){return!r},preventDefault:!0},[l,n]),_ce(["meta+c","ctrl+c"],(function(){g()}),{enabled:function(){return!r},preventDefault:!0},[l,n]),_ce(["shift+d"],(function(){m()}),{enabled:function(){return!r},preventDefault:!0},[l,n]);var d=function(){return e(H3("move"))},f=Ike((function(){return h(!1)}),(function(){return h(!0)})),h=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Loe();if(n){var r=n.getClientRect({skipTransform:!0});e(a3({contentRect:r,shouldScaleTo1:t}))}},p=function(){e(Ske({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=function(){e(Ske({cropVisible:!s,cropToBoundingBox:s,shouldSaveToGallery:!0}))},g=function(){e(Ske({cropVisible:!s,cropToBoundingBox:s,shouldCopy:!0}))},m=function(){e(Ske({cropVisible:!s,cropToBoundingBox:s,shouldDownload:!0}))};return ro("div",{className:"inpainting-settings",children:[no(Mae,{tooltip:"".concat(u("unifiedcanvas:layer")," (Q)"),tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:D5,onChange:function(t){var n=t.target.value;e(_3(n)),"mask"!==n||o||e(w3(!0))},isDisabled:r}),no(Dxe,{}),no(Fxe,{}),ro(k_,{isAttached:!0,children:[no(_ae,{"aria-label":"".concat(u("unifiedcanvas:move")," (V)"),tooltip:"".concat(u("unifiedcanvas:move")," (V)"),icon:no(Hce,{}),"data-selected":"move"===a||r,onClick:d}),no(_ae,{"aria-label":"".concat(u("unifiedcanvas:resetView")," (R)"),tooltip:"".concat(u("unifiedcanvas:resetView")," (R)"),icon:no(Yce,{}),onClick:f})]}),ro(k_,{isAttached:!0,children:[no(_ae,{"aria-label":"".concat(u("unifiedcanvas:mergeVisible")," (Shift+M)"),tooltip:"".concat(u("unifiedcanvas:mergeVisible")," (Shift+M)"),icon:no(sde,{}),onClick:p,isDisabled:r}),no(_ae,{"aria-label":"".concat(u("unifiedcanvas:saveToGallery")," (Shift+S)"),tooltip:"".concat(u("unifiedcanvas:saveToGallery")," (Shift+S)"),icon:no(mde,{}),onClick:v,isDisabled:r}),no(_ae,{"aria-label":"".concat(u("unifiedcanvas:copyToClipboard")," (Cmd/Ctrl+C)"),tooltip:"".concat(u("unifiedcanvas:copyToClipboard")," (Cmd/Ctrl+C)"),icon:no(qce,{}),onClick:g,isDisabled:r}),no(_ae,{"aria-label":"".concat(u("unifiedcanvas:downloadAsImage")," (Shift+D)"),tooltip:"".concat(u("unifiedcanvas:downloadAsImage")," (Shift+D)"),icon:no(Xce,{}),onClick:m,isDisabled:r})]}),ro(k_,{isAttached:!0,children:[no(yke,{}),no(gke,{})]}),ro(k_,{isAttached:!0,children:[no(_ae,{"aria-label":"".concat(u("common:upload")),tooltip:"".concat(u("common:upload")),icon:no(_de,{}),onClick:c,isDisabled:r}),no(_ae,{"aria-label":"".concat(u("unifiedcanvas:clearCanvas")),tooltip:"".concat(u("unifiedcanvas:clearCanvas")),icon:no(Sde,{}),onClick:function(){e(o3()),e(s3())},style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:r})]}),no(k_,{isAttached:!0,children:no(jxe,{})})]})},Wxe=QX([Lde],(function(e){return{doesCanvasNeedScaling:e.doesCanvasNeedScaling}}),{memoizeOptions:{resultEqualityCheck:dae}}),Uxe=function(){var e=wie(),t=kie(Wxe).doesCanvasNeedScaling;return cr.useLayoutEffect((function(){e(m3(!0));var t=pke((function(){e(m3(!0))}),250);return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[e]),no("div",{className:"workarea-single-view",children:no("div",{className:"workarea-split-view-left",children:ro("div",{className:"inpainting-main-area",children:[no(Vxe,{}),no("div",{className:"inpainting-canvas-area",children:no(t?ske:ike,{})})]})})})},Gxe=QX(Lde,(function(e){return{boundingBoxDimensions:e.boundingBoxDimensions,boundingBoxScale:e.boundingBoxScaleMethod}}),{memoizeOptions:{resultEqualityCheck:dae}}),qxe=function(){var e=wie(),t=kie(Gxe).boundingBoxDimensions,n=o8().t;return ro(yP,{direction:"column",gap:"1rem",children:[no(xfe,{label:n("parameters:width"),min:64,max:1024,step:64,value:t.width,onChange:function(n){e(c3(un(un({},t),{},{width:Math.floor(n)})))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:function(){e(c3(un(un({},t),{},{width:Math.floor(512)})))}}),no(xfe,{label:n("parameters:height"),min:64,max:1024,step:64,value:t.height,onChange:function(n){e(c3(un(un({},t),{},{height:Math.floor(n)})))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:function(){e(c3(un(un({},t),{},{height:Math.floor(512)})))}})]})},Yxe=QX([jye,wle,Lde],(function(e,t,n){var r=e.tileSize,o=e.infillMethod,i=t.infill_methods,a=n.boundingBoxScaleMethod;return{boundingBoxScale:a,scaledBoundingBoxDimensions:n.scaledBoundingBoxDimensions,tileSize:r,infillMethod:o,availableInfillMethods:i,isManual:"manual"===a}}),{memoizeOptions:{resultEqualityCheck:dae}}),Zxe=function(){var e=wie(),t=kie(Yxe),n=t.tileSize,r=t.infillMethod,o=t.availableInfillMethods,i=t.boundingBoxScale,a=t.isManual,s=t.scaledBoundingBoxDimensions,l=o8().t;return ro(yP,{direction:"column",gap:"1rem",children:[no(Mae,{label:l("parameters:scaleBeforeProcessing"),validValues:z5,value:i,onChange:function(t){e(d3(t.target.value))}}),no(xfe,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:l("parameters:scaledWidth"),min:64,max:1024,step:64,value:s.width,onChange:function(t){e(W3(un(un({},s),{},{width:Math.floor(t)})))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:function(){e(W3(un(un({},s),{},{width:Math.floor(512)})))}}),no(xfe,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:l("parameters:scaledHeight"),min:64,max:1024,step:64,value:s.height,onChange:function(t){e(W3(un(un({},s),{},{height:Math.floor(t)})))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:function(){e(W3(un(un({},s),{},{height:Math.floor(512)})))}}),no(Mae,{label:l("parameters:infillMethod"),value:r,validValues:o,onChange:function(t){return e(A4(t.target.value))}}),no(xfe,{isInputDisabled:"tile"!==r,isResetDisabled:"tile"!==r,isSliderDisabled:"tile"!==r,sliderMarkRightOffset:-4,label:l("parameters:tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:n,onChange:function(t){e($4(t))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:function(){e($4(32))}})]})};function Xxe(){var e=wie(),t=kie((function(e){return e.generation.seamBlur})),n=o8().t;return no(xfe,{sliderMarkRightOffset:-4,label:n("parameters:seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:function(t){e(j4(t))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:function(){e(j4(16))}})}function $xe(){var e=wie(),t=o8().t,n=kie((function(e){return e.generation.seamSize}));return no(xfe,{sliderMarkRightOffset:-6,label:t("parameters:seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:function(t){e(F4(t))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:function(){return e(F4(96))}})}function Kxe(){var e=o8().t,t=kie((function(e){return e.generation.seamSteps})),n=wie();return no(xfe,{sliderMarkRightOffset:-4,label:e("parameters:seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:function(e){n(H4(e))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:function(){n(H4(30))}})}function Qxe(){var e=wie(),t=o8().t,n=kie((function(e){return e.generation.seamStrength}));return no(xfe,{sliderMarkRightOffset:-7,label:t("parameters:seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:function(t){e(V4(t))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:function(){e(V4(.7))}})}var Jxe=function(){return ro(yP,{direction:"column",gap:"1rem",children:[no($xe,{}),no(Xxe,{}),no(Qxe,{}),no(Kxe,{})]})};function eSe(){var e=o8().t,t={boundingBox:{header:"".concat(e("parameters:boundingBoxHeader")),feature:rye.BOUNDING_BOX,content:no(qxe,{})},seamCorrection:{header:"".concat(e("parameters:seamCorrectionHeader")),feature:rye.SEAM_CORRECTION,content:no(Jxe,{})},infillAndScaling:{header:"".concat(e("parameters:infillScalingHeader")),feature:rye.INFILL_AND_SCALING,content:no(Zxe,{})},seed:{header:"".concat(e("parameters:seed")),feature:rye.SEED,content:no(gye,{})},variations:{header:"".concat(e("parameters:variations")),feature:rye.VARIATIONS,content:no(xye,{}),additionalHeaderComponents:no(yye,{})}};return ro(Xye,{children:[ro(yP,{flexDir:"column",rowGap:"0.5rem",children:[no(qye,{}),no(Uye,{})]}),no(Wye,{}),no(Aye,{}),no(lye,{label:e("parameters:img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),no(Nye,{accordionInfo:t})]})}function tSe(){var e=kie((function(e){return e.ui.shouldUseCanvasBetaLayout}));return no($me,{optionsPanel:no(eSe,{}),styleClass:"inpainting-workarea-overrides",children:no(e?Rxe:Uxe,{})})}var nSe={txt2img:{title:no(xae,{fill:"black",boxSize:"2.5rem"}),workarea:no(obe,{}),tooltip:"Text To Image"},img2img:{title:no(bae,{fill:"black",boxSize:"2.5rem"}),workarea:no(Kye,{}),tooltip:"Image To Image"},unifiedCanvas:{title:no(Cae,{fill:"black",boxSize:"2.5rem"}),workarea:no(tSe,{}),tooltip:"Unified Canvas"},nodes:{title:no(wae,{fill:"black",boxSize:"2.5rem"}),workarea:no(gae,{}),tooltip:"Nodes"},postprocess:{title:no(kae,{fill:"black",boxSize:"2.5rem"}),workarea:no(mae,{}),tooltip:"Post Processing"},training:{title:no(Sae,{fill:"black",boxSize:"2.5rem"}),workarea:no(yae,{}),tooltip:"Training"}};function rSe(){nSe.txt2img.tooltip=A7.t("common:text2img"),nSe.img2img.tooltip=A7.t("common:img2img"),nSe.unifiedCanvas.tooltip=A7.t("common:unifiedCanvas"),nSe.nodes.tooltip=A7.t("common:nodes"),nSe.postprocess.tooltip=A7.t("common:postProcessing"),nSe.training.tooltip=A7.t("common:training")}function oSe(){var e=kie(hae),t=kie((function(e){return e.lightbox.isLightboxOpen}));!function(e){var t=o8().i18n,n=localStorage.getItem("i18nextLng");qr.useEffect((function(){e()}),[e]),qr.useEffect((function(){t.on("languageChanged",(function(){e()}))}),[e,t,n])}(rSe);var n=wie();_ce("1",(function(){n(z8(0))})),_ce("2",(function(){n(z8(1))})),_ce("3",(function(){n(z8(2))})),_ce("4",(function(){n(z8(3))})),_ce("5",(function(){n(z8(4))})),_ce("6",(function(){n(z8(5))})),_ce("z",(function(){n(p4(!t))}),[t]);var r,o;return ro(Uq,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:function(e){n(z8(e))},children:[no("div",{className:"app-tabs-list",children:(o=[],Object.keys(nSe).forEach((function(e){o.push(no(kY,{hasArrow:!0,label:nSe[e].tooltip,placement:"right",children:no(Xq,{children:nSe[e].title})},e))})),o)}),no(Zq,{className:"app-tabs-panels",children:t?no(qme,{}):(r=[],Object.keys(nSe).forEach((function(e){r.push(no(Yq,{className:"app-tabs-panel",children:nSe[e].workarea},e))})),r)})]})}var iSe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function aSe(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=iSe.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var sSe=[".DS_Store","Thumbs.db"];function lSe(e){return"object"===kn(e)&&null!==e}function uSe(e){return hSe(e.target.files).map((function(e){return aSe(e)}))}function cSe(e){return XS(this,void 0,void 0,(function(){return $S(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return aSe(e)}))]}}))}))}function dSe(e,t){return XS(this,void 0,void 0,(function(){var n;return $S(this,(function(r){switch(r.label){case 0:return e.items?(n=hSe(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(pSe))]):[3,2];case 1:return[2,fSe(vSe(r.sent()))];case 2:return[2,fSe(hSe(e.files).map((function(e){return aSe(e)})))]}}))}))}function fSe(e){return e.filter((function(e){return-1===sSe.indexOf(e.name)}))}function hSe(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function pSe(e){if("function"!=typeof e.webkitGetAsEntry)return gSe(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ySe(t):gSe(e)}function vSe(e){return e.reduce((function(e,t){return QS(QS([],KS(e),!1),KS(Array.isArray(t)?vSe(t):[t]),!1)}),[])}function gSe(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=aSe(t);return Promise.resolve(n)}function mSe(e){return XS(this,void 0,void 0,(function(){return $S(this,(function(t){return[2,e.isDirectory?ySe(e):bSe(e)]}))}))}function ySe(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return XS(i,void 0,void 0,(function(){var i,a,s;return $S(this,(function(l){switch(l.label){case 0:if(t.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=l.sent(),e(i),[3,4];case 3:return a=l.sent(),n(a),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(mSe)),r.push(s),o(),l.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function bSe(e){return XS(this,void 0,void 0,(function(){return $S(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=aSe(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}function wSe(e){return function(e){if(Array.isArray(e))return ESe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_Se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kSe(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 xSe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kSe(Object(n),!0).forEach((function(t){SSe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kSe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CSe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(COe){s=!0,o=COe}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||_Se(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 _Se(e,t){if(e){if("string"==typeof e)return ESe(e,t);var n=Object.prototype.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)?ESe(e,t):void 0}}function ESe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PSe=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},LSe=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},OSe=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},ASe={code:"too-many-files",message:"Too many files"};function MSe(e,t){var n="application/x-moz-file"===e.type||function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}(e,t);return[n,n?null:PSe(t)]}function TSe(e,t,n){if(ISe(e.size))if(ISe(t)&&ISe(n)){if(e.size>n)return[!1,LSe(n)];if(e.size<t)return[!1,OSe(t)]}else{if(ISe(t)&&e.size<t)return[!1,OSe(t)];if(ISe(n)&&e.size>n)return[!1,LSe(n)]}return[!0,null]}function ISe(e){return null!=e}function RSe(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=CSe(MSe(e,n),1)[0],i=CSe(TSe(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}function NSe(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function DSe(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function zSe(e){e.preventDefault()}function jSe(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function BSe(e){return-1!==e.indexOf("Edge/")}function FSe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return jSe(e)||BSe(e)}function HSe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!NSe(e)&&t&&t.apply(void 0,[e].concat(r)),NSe(e)}))}}function VSe(){return"showOpenFilePicker"in window}function WSe(e){if(ISe(e)){var t=Object.entries(e).filter((function(e){var t=CSe(e,2),n=t[0],r=t[1],o=!0;return YSe(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(ZSe)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=CSe(t,2),r=n[0],o=n[1];return xSe(xSe({},e),{},SSe({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function USe(e){if(ISe(e))return Object.entries(e).reduce((function(e,t){var n=CSe(t,2),r=n[0],o=n[1];return[].concat(wSe(e),[r],wSe(o))}),[]).filter((function(e){return YSe(e)||ZSe(e)})).join(",")}function GSe(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function qSe(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function YSe(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function ZSe(e){return/^.*\.[\w]+$/.test(e)}var XSe=["children"],$Se=["open"],KSe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],QSe=["refKey","onChange","onClick"];function JSe(e){return function(e){if(Array.isArray(e))return nCe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tCe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eCe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(COe){s=!0,o=COe}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||tCe(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 tCe(e,t){if(e){if("string"==typeof e)return nCe(e,t);var n=Object.prototype.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)?nCe(e,t):void 0}}function nCe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rCe(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 oCe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rCe(Object(n),!0).forEach((function(t){iCe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rCe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iCe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aCe(e,t){if(null==e)return{};var n,r,o=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,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sCe=cr.forwardRef((function(e,t){var n=e.children,r=cCe(aCe(e,XSe)),o=r.open,i=aCe(r,$Se);return cr.useImperativeHandle(t,(function(){return{open:o}}),[o]),qr.createElement(cr.Fragment,null,n(oCe(oCe({},i),{},{open:o})))}));sCe.displayName="Dropzone";var lCe={disabled:!1,getFilesFromEvent:function(e){return XS(this,void 0,void 0,(function(){return $S(this,(function(t){return lSe(e)&&function(e){return lSe(e)}(e.dataTransfer)?[2,dSe(e.dataTransfer,e.type)]:function(e){return lSe(e)&&lSe(e.target)}(e)?[2,uSe(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,cSe(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};sCe.defaultProps=lCe,sCe.propTypes={children:_H.func,accept:_H.objectOf(_H.arrayOf(_H.string)),multiple:_H.bool,preventDropOnDocument:_H.bool,noClick:_H.bool,noKeyboard:_H.bool,noDrag:_H.bool,noDragEventsBubbling:_H.bool,minSize:_H.number,maxSize:_H.number,maxFiles:_H.number,disabled:_H.bool,getFilesFromEvent:_H.func,onFileDialogCancel:_H.func,onFileDialogOpen:_H.func,useFsAccessApi:_H.bool,autoFocus:_H.bool,onDragEnter:_H.func,onDragLeave:_H.func,onDragOver:_H.func,onDrop:_H.func,onDropAccepted:_H.func,onDropRejected:_H.func,onError:_H.func,validator:_H.func};var uCe={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cCe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=oCe(oCe({},lCe),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,v=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,k=t.noKeyboard,x=t.noDrag,S=t.noDragEventsBubbling,C=t.onError,_=t.validator,E=cr.useMemo((function(){return USe(n)}),[n]),P=cr.useMemo((function(){return WSe(n)}),[n]),L=cr.useMemo((function(){return"function"==typeof g?g:fCe}),[g]),O=cr.useMemo((function(){return"function"==typeof v?v:fCe}),[v]),A=cr.useRef(null),M=cr.useRef(null),T=cr.useReducer(dCe,uCe),I=eCe(T,2),R=I[0],N=I[1],D=R.isFocused,z=R.isFileDialogActive,j=cr.useRef("undefined"!=typeof window&&window.isSecureContext&&m&&VSe()),B=function(){!j.current&&z&&setTimeout((function(){M.current&&(M.current.files.length||(N({type:"closeDialog"}),O()))}),300)};cr.useEffect((function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}}),[M,z,O,j]);var F=cr.useRef([]),H=function(e){A.current&&A.current.contains(e.target)||(e.preventDefault(),F.current=[])};cr.useEffect((function(){return b&&(document.addEventListener("dragover",zSe,!1),document.addEventListener("drop",H,!1)),function(){b&&(document.removeEventListener("dragover",zSe),document.removeEventListener("drop",H))}}),[A,b]),cr.useEffect((function(){return!r&&y&&A.current&&A.current.focus(),function(){}}),[A,y,r]);var V=cr.useCallback((function(e){C?C(e):console.error(e)}),[C]),W=cr.useCallback((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[].concat(JSe(F.current),[e.target]),DSe(e)&&Promise.resolve(o(e)).then((function(t){if(!NSe(e)||S){var n=t.length,r=n>0&&RSe({files:t,accept:E,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:_});N({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return V(e)}))}),[o,u,V,S,E,a,i,s,l,_]),U=cr.useCallback((function(e){e.preventDefault(),e.persist(),ne(e);var t=DSe(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&d&&d(e),!1}),[d,S]),G=cr.useCallback((function(e){e.preventDefault(),e.persist(),ne(e);var t=F.current.filter((function(e){return A.current&&A.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),F.current=t,t.length>0||(N({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),DSe(e)&&c&&c(e))}),[A,c,S]),q=cr.useCallback((function(e,t){var n=[],r=[];e.forEach((function(e){var t=eCe(MSe(e,E),2),o=t[0],s=t[1],l=eCe(TSe(e,a,i),2),u=l[0],c=l[1],d=_?_(e):null;if(o&&u&&!d)n.push(e);else{var f=[s,c];d&&(f=f.concat(d)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!s&&n.length>1||s&&l>=1&&n.length>l)&&(n.forEach((function(e){r.push({file:e,errors:[ASe]})})),n.splice(0)),N({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&p&&p(r,t),n.length>0&&h&&h(n,t)}),[N,s,E,a,i,l,f,h,p,_]),Y=cr.useCallback((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[],DSe(e)&&Promise.resolve(o(e)).then((function(t){NSe(e)&&!S||q(t,e)})).catch((function(e){return V(e)})),N({type:"reset"})}),[o,q,V,S]),Z=cr.useCallback((function(){if(j.current){N({type:"openDialog"}),L();var e={multiple:s,types:P};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){q(e,null),N({type:"closeDialog"})})).catch((function(e){GSe(e)?(O(e),N({type:"closeDialog"})):qSe(e)?(j.current=!1,M.current?(M.current.value=null,M.current.click()):V(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):V(e)}))}else M.current&&(N({type:"openDialog"}),L(),M.current.value=null,M.current.click())}),[N,L,O,m,q,V,P,s]),X=cr.useCallback((function(e){A.current&&A.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),Z()))}),[A,Z]),$=cr.useCallback((function(){N({type:"focus"})}),[]),K=cr.useCallback((function(){N({type:"blur"})}),[]),Q=cr.useCallback((function(){w||(FSe()?setTimeout(Z,0):Z())}),[w,Z]),J=function(e){return r?null:e},ee=function(e){return k?null:J(e)},te=function(e){return x?null:J(e)},ne=function(e){S&&e.stopPropagation()},re=cr.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,u=e.onDragEnter,c=e.onDragOver,d=e.onDragLeave,f=e.onDrop,h=aCe(e,KSe);return oCe(oCe(iCe({onKeyDown:ee(HSe(i,X)),onFocus:ee(HSe(a,$)),onBlur:ee(HSe(s,K)),onClick:J(HSe(l,Q)),onDragEnter:te(HSe(u,W)),onDragOver:te(HSe(c,U)),onDragLeave:te(HSe(d,G)),onDrop:te(HSe(f,Y)),role:"string"==typeof o&&""!==o?o:"presentation"},n,A),r||k?{}:{tabIndex:0}),h)}}),[A,X,$,K,Q,W,U,G,Y,k,x,r]),oe=cr.useCallback((function(e){e.stopPropagation()}),[]),ie=cr.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=aCe(e,QSe),a=iCe({accept:E,multiple:s,type:"file",style:{display:"none"},onChange:J(HSe(r,Y)),onClick:J(HSe(o,oe)),tabIndex:-1},n,M);return oCe(oCe({},a),i)}}),[M,n,s,Y,r]);return oCe(oCe({},R),{},{isFocused:D&&!r,getRootProps:re,getInputProps:ie,rootRef:A,inputRef:M,open:J(Z)})}function dCe(e,t){switch(t.type){case"focus":return oCe(oCe({},e),{},{isFocused:!0});case"blur":return oCe(oCe({},e),{},{isFocused:!1});case"openDialog":return oCe(oCe({},uCe),{},{isFileDialogActive:!0});case"closeDialog":return oCe(oCe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return oCe(oCe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return oCe(oCe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return oCe({},uCe);default:return e}}function fCe(){}var hCe=function(e){var t=e.isDragAccept,n=e.isDragReject,r=e.overlaySecondaryText,o=e.setIsHandlingUpload;return _ce("esc",(function(){o(!1)})),ro("div",{className:"dropzone-container",children:[t&&no("div",{className:"dropzone-overlay is-drag-accept",children:ro(xP,{size:"lg",children:["Upload Image",r]})}),n&&ro("div",{className:"dropzone-overlay is-drag-reject",children:[no(xP,{size:"lg",children:"Invalid Upload"}),no(xP,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},pCe=function(e){var t=e.children,n=wie(),r=kie(fae),o=cY({}),i=o8().t,a=yn(cr.useState(!1),2),s=a[0],l=a[1],u=xie().setOpenUploader,c=cr.useCallback((function(e){l(!0);var t=e.errors.reduce((function(e,t){return"".concat(e,"\n").concat(t.message)}),"");o({title:i("toast:uploadFailed"),description:t,status:"error",isClosable:!0})}),[i,o]),d=cr.useCallback(function(){var e=qt(Ut().mark((function e(t){return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n(vae({imageFile:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n]),f=cCe({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:cr.useCallback((function(e,t){t.forEach((function(e){c(e)})),e.forEach((function(e){d(e)}))}),[d,c]),onDragOver:function(){return l(!0)},maxFiles:1}),h=f.getRootProps,p=f.getInputProps,v=f.isDragAccept,g=f.isDragReject,m=f.isDragActive,y=f.open;u(y),cr.useEffect((function(){var e=function(e){var t,r=null===(t=e.clipboardData)||void 0===t?void 0:t.items;if(r){var a,s=[],l=xn(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;"file"===u.kind&&["image/png","image/jpg"].includes(u.type)&&s.push(u)}}catch(COe){l.e(COe)}finally{l.f()}if(s.length)if(e.stopImmediatePropagation(),s.length>1)o({description:i("toast:uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});else{var c=s[0].getAsFile();c?n(vae({imageFile:c})):o({description:i("toast:uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0})}}};return document.addEventListener("paste",e),function(){document.removeEventListener("paste",e)}}),[i,n,o,r]);var b=["img2img","unifiedCanvas"].includes(r)?" to ".concat(nSe[r].tooltip):"";return no(bie.Provider,{value:y,children:ro("div",un(un({},h({style:{}})),{},{onKeyDown:function(e){e.key},children:[no("input",un({},p())),t,m&&s&&no(hCe,{isDragAccept:v,isDragReject:g,overlaySecondaryText:b,setIsHandlingUpload:l})]}))})},vCe=QX(wle,(function(e){return e.log}),{memoizeOptions:{resultEqualityCheck:function(e,t){return e.length===t.length}}}),gCe=QX(wle,(function(e){return{shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}}),{memoizeOptions:{resultEqualityCheck:dae}}),mCe=function(){var e=wie(),t=kie(vCe),n=kie(gCe),r=n.shouldShowLogViewer,o=n.hasError,i=n.wasErrorSeen,a=yn(cr.useState(!0),2),s=a[0],l=a[1],u=cr.useRef(null);cr.useLayoutEffect((function(){null!==u.current&&s&&(u.current.scrollTop=u.current.scrollHeight)}),[s,t,r]);_ce("`",(function(){e(c8(!r))}),[r]),_ce("esc",(function(){e(c8(!1))}));return ro(to,{children:[r&&no(hfe,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:no("div",{className:"console",ref:u,onScroll:function(){u.current&&s&&u.current.scrollTop<u.current.scrollHeight-u.current.clientHeight&&l(!1)},children:t.map((function(e,t){var n=e.timestamp,r=e.message,o=e.level;return ro("div",{className:"console-entry console-".concat(o,"-color"),children:[ro("p",{className:"console-timestamp",children:[n,":"]}),no("p",{className:"console-message",children:r})]},t)}))})}),r&&no(kY,{hasArrow:!0,label:s?"Autoscroll On":"Autoscroll Off",children:no(x_,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":s,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:no(Dce,{}),onClick:function(){return l(!s)}})}),no(kY,{hasArrow:!0,label:r?"Hide Console":"Show Console",children:no(x_,{className:"console-toggle-icon-button","data-error-seen":o||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:no(r?ude:Gce,{}),onClick:function(){e(w8()),e(c8(!r))}})})]})},yCe=QX(wle,(function(e){return{isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}}),{memoizeOptions:{resultEqualityCheck:dae}}),bCe=function(){var e=kie(yCe),t=e.isProcessing,n=e.currentStep,r=e.totalSteps,o=e.currentStatusHasSteps,i=n?Math.round(100*n/r):0;return no(vG,{value:i,isIndeterminate:t&&!o,className:"progress-bar"})};function wCe(e){var t=e.title,n=e.hotkey,r=e.description;return ro("div",{className:"hotkey-modal-item",children:[ro("div",{className:"hotkey-info",children:[no("p",{className:"hotkey-title",children:t}),r&&no("p",{className:"hotkey-description",children:r})]}),no("div",{className:"hotkey-key",children:n})]})}function kCe(e){var t=e.children,n=GE(),r=n.isOpen,o=n.onOpen,i=n.onClose,a=o8().t,s=[{title:a("hotkeys:invoke.title"),desc:a("hotkeys:invoke.desc"),hotkey:"Ctrl+Enter"},{title:a("hotkeys:cancel.title"),desc:a("hotkeys:cancel.desc"),hotkey:"Shift+X"},{title:a("hotkeys:focusPrompt.title"),desc:a("hotkeys:focusPrompt.desc"),hotkey:"Alt+A"},{title:a("hotkeys:toggleOptions.title"),desc:a("hotkeys:toggleOptions.desc"),hotkey:"O"},{title:a("hotkeys:pinOptions.title"),desc:a("hotkeys:pinOptions.desc"),hotkey:"Shift+O"},{title:a("hotkeys:toggleViewer.title"),desc:a("hotkeys:toggleViewer.desc"),hotkey:"Z"},{title:a("hotkeys:toggleGallery.title"),desc:a("hotkeys:toggleGallery.desc"),hotkey:"G"},{title:a("hotkeys:maximizeWorkSpace.title"),desc:a("hotkeys:maximizeWorkSpace.desc"),hotkey:"F"},{title:a("hotkeys:changeTabs.title"),desc:a("hotkeys:changeTabs.desc"),hotkey:"1-5"},{title:a("hotkeys:consoleToggle.title"),desc:a("hotkeys:consoleToggle.desc"),hotkey:"`"}],l=[{title:a("hotkeys:setPrompt.title"),desc:a("hotkeys:setPrompt.desc"),hotkey:"P"},{title:a("hotkeys:setSeed.title"),desc:a("hotkeys:setSeed.desc"),hotkey:"S"},{title:a("hotkeys:setParameters.title"),desc:a("hotkeys:setParameters.desc"),hotkey:"A"},{title:a("hotkeys:restoreFaces.title"),desc:a("hotkeys:restoreFaces.desc"),hotkey:"Shift+R"},{title:a("hotkeys:upscale.title"),desc:a("hotkeys:upscale.desc"),hotkey:"Shift+U"},{title:a("hotkeys:showInfo.title"),desc:a("hotkeys:showInfo.desc"),hotkey:"I"},{title:a("hotkeys:sendToImageToImage.title"),desc:a("hotkeys:sendToImageToImage.desc"),hotkey:"Shift+I"},{title:a("hotkeys:deleteImage.title"),desc:a("hotkeys:deleteImage.desc"),hotkey:"Del"},{title:a("hotkeys:closePanels.title"),desc:a("hotkeys:closePanels.desc"),hotkey:"Esc"}],u=[{title:a("hotkeys:previousImage.title"),desc:a("hotkeys:previousImage.desc"),hotkey:"Arrow Left"},{title:a("hotkeys:nextImage.title"),desc:a("hotkeys:nextImage.desc"),hotkey:"Arrow Right"},{title:a("hotkeys:toggleGalleryPin.title"),desc:a("hotkeys:toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:a("hotkeys:increaseGalleryThumbSize.title"),desc:a("hotkeys:increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:a("hotkeys:decreaseGalleryThumbSize.title"),desc:a("hotkeys:decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],c=[{title:a("hotkeys:selectBrush.title"),desc:a("hotkeys:selectBrush.desc"),hotkey:"B"},{title:a("hotkeys:selectEraser.title"),desc:a("hotkeys:selectEraser.desc"),hotkey:"E"},{title:a("hotkeys:decreaseBrushSize.title"),desc:a("hotkeys:decreaseBrushSize.desc"),hotkey:"["},{title:a("hotkeys:increaseBrushSize.title"),desc:a("hotkeys:increaseBrushSize.desc"),hotkey:"]"},{title:a("hotkeys:decreaseBrushOpacity.title"),desc:a("hotkeys:decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:a("hotkeys:increaseBrushOpacity.title"),desc:a("hotkeys:increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:a("hotkeys:moveTool.title"),desc:a("hotkeys:moveTool.desc"),hotkey:"V"},{title:a("hotkeys:fillBoundingBox.title"),desc:a("hotkeys:fillBoundingBox.desc"),hotkey:"Shift + F"},{title:a("hotkeys:eraseBoundingBox.title"),desc:a("hotkeys:eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:a("hotkeys:colorPicker.title"),desc:a("hotkeys:colorPicker.desc"),hotkey:"C"},{title:a("hotkeys:toggleSnap.title"),desc:a("hotkeys:toggleSnap.desc"),hotkey:"N"},{title:a("hotkeys:quickToggleMove.title"),desc:a("hotkeys:quickToggleMove.desc"),hotkey:"Hold Space"},{title:a("hotkeys:toggleLayer.title"),desc:a("hotkeys:toggleLayer.desc"),hotkey:"Q"},{title:a("hotkeys:clearMask.title"),desc:a("hotkeys:clearMask.desc"),hotkey:"Shift+C"},{title:a("hotkeys:hideMask.title"),desc:a("hotkeys:hideMask.desc"),hotkey:"H"},{title:a("hotkeys:showHideBoundingBox.title"),desc:a("hotkeys:showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:a("hotkeys:mergeVisible.title"),desc:a("hotkeys:mergeVisible.desc"),hotkey:"Shift+M"},{title:a("hotkeys:saveToGallery.title"),desc:a("hotkeys:saveToGallery.desc"),hotkey:"Shift+S"},{title:a("hotkeys:copyToClipboard.title"),desc:a("hotkeys:copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:a("hotkeys:downloadImage.title"),desc:a("hotkeys:downloadImage.desc"),hotkey:"Shift+D"},{title:a("hotkeys:undoStroke.title"),desc:a("hotkeys:undoStroke.desc"),hotkey:"Ctrl+Z"},{title:a("hotkeys:redoStroke.title"),desc:a("hotkeys:redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:a("hotkeys:resetView.title"),desc:a("hotkeys:resetView.desc"),hotkey:"R"},{title:a("hotkeys:previousStagingImage.title"),desc:a("hotkeys:previousStagingImage.desc"),hotkey:"Arrow Left"},{title:a("hotkeys:nextStagingImage.title"),desc:a("hotkeys:nextStagingImage.desc"),hotkey:"Arrow Right"},{title:a("hotkeys:acceptStagingImage.title"),desc:a("hotkeys:acceptStagingImage.desc"),hotkey:"Enter"}],d=function(e){var t=[];return e.forEach((function(e,n){t.push(no(wCe,{title:e.title,description:e.desc,hotkey:e.hotkey},n))})),no("div",{className:"hotkey-modal-category",children:t})};return ro(to,{children:[cr.cloneElement(t,{onClick:o}),ro(qW,{isOpen:r,onClose:i,children:[no(rU,{}),ro(JW,{className:" modal hotkeys-modal",children:[no(ZW,{className:"modal-close-btn"}),no("h1",{children:"Keyboard Shorcuts"}),no("div",{className:"hotkeys-modal-items",children:ro(YC,{allowMultiple:!0,children:[ro(GC,{children:[ro(jC,{className:"hotkeys-modal-button",children:[no("h2",{children:a("hotkeys:appHotkeys")}),no(UC,{})]}),no(qC,{children:d(s)})]}),ro(GC,{children:[ro(jC,{className:"hotkeys-modal-button",children:[no("h2",{children:a("hotkeys:generalHotkeys")}),no(UC,{})]}),no(qC,{children:d(l)})]}),ro(GC,{children:[ro(jC,{className:"hotkeys-modal-button",children:[no("h2",{children:a("hotkeys:galleryHotkeys")}),no(UC,{})]}),no(qC,{children:d(u)})]}),ro(GC,{children:[ro(jC,{className:"hotkeys-modal-button",children:[no("h2",{children:a("hotkeys:unifiedCanvasHotkeys")}),no(UC,{})]}),no(qC,{children:d(c)})]})]})})]})]})]})}var xCe=Array.isArray,SCe=Object.keys,CCe=Object.prototype.hasOwnProperty,_Ce="undefined"!=typeof Element;function ECe(e,t){if(e===t)return!0;if(e&&t&&"object"==kn(e)&&"object"==kn(t)){var n,r,o,i=xCe(e),a=xCe(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!ECe(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 u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var d=SCe(e);if((r=d.length)!==SCe(t).length)return!1;for(n=r;0!=n--;)if(!CCe.call(t,d[n]))return!1;if(_Ce&&e instanceof Element&&t instanceof Element)return e===t;for(n=r;0!=n--;)if(!("_owner"===(o=d[n])&&e.$$typeof||ECe(e[o],t[o])))return!1;return!0}return e!=e&&t!=t}var PCe=function(e,t){try{return ECe(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}},LCe=function(e){return function(e){return!!e&&"object"===kn(e)}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===OCe}(e)}(e)};var OCe="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ACe(e,t){return!1!==t.clone&&t.isMergeableObject(e)?TCe((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function MCe(e,t,n){return e.concat(t).map((function(e){return ACe(e,n)}))}function TCe(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||MCe,n.isMergeableObject=n.isMergeableObject||LCe;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]=ACe(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=TCe(e[o],t[o],n):r[o]=ACe(t[o],n)})),r}(e,t,n):ACe(t,n)}TCe.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return TCe(e,n,t)}),{})};var ICe=TCe,RCe="object"==("undefined"==typeof global?"undefined":kn(global))&&global&&global.Object===Object&&global,NCe="object"==("undefined"==typeof self?"undefined":kn(self))&&self&&self.Object===Object&&self,DCe=RCe||NCe||Function("return this")(),zCe=DCe.Symbol,jCe=Object.prototype,BCe=jCe.hasOwnProperty,FCe=jCe.toString,HCe=zCe?zCe.toStringTag:void 0;var VCe=Object.prototype.toString;var WCe=zCe?zCe.toStringTag:void 0;function UCe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":WCe&&WCe in Object(e)?function(e){var t=BCe.call(e,HCe),n=e[HCe];try{e[HCe]=void 0;var r=!0}catch(Dhe){}var o=FCe.call(e);return r&&(t?e[HCe]=n:delete e[HCe]),o}(e):function(e){return VCe.call(e)}(e)}function GCe(e,t){return function(n){return e(t(n))}}var qCe=GCe(Object.getPrototypeOf,Object);function YCe(e){return null!=e&&"object"==kn(e)}var ZCe=Function.prototype,XCe=Object.prototype,$Ce=ZCe.toString,KCe=XCe.hasOwnProperty,QCe=$Ce.call(Object);function JCe(e){if(!YCe(e)||"[object Object]"!=UCe(e))return!1;var t=qCe(e);if(null===t)return!0;var n=KCe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$Ce.call(n)==QCe}function e_e(e,t){return e===t||e!=e&&t!=t}function t_e(e,t){for(var n=e.length;n--;)if(e_e(e[n][0],t))return n;return-1}var n_e=Array.prototype.splice;function r_e(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 o_e(e){var t=kn(e);return null!=e&&("object"==t||"function"==t)}r_e.prototype.clear=function(){this.__data__=[],this.size=0},r_e.prototype.delete=function(e){var t=this.__data__,n=t_e(t,e);return!(n<0)&&(n==t.length-1?t.pop():n_e.call(t,n,1),--this.size,!0)},r_e.prototype.get=function(e){var t=this.__data__,n=t_e(t,e);return n<0?void 0:t[n][1]},r_e.prototype.has=function(e){return t_e(this.__data__,e)>-1},r_e.prototype.set=function(e,t){var n=this.__data__,r=t_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function i_e(e){if(!o_e(e))return!1;var t=UCe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var a_e=DCe["__core-js_shared__"],s_e=function(){var e=/[^.]+$/.exec(a_e&&a_e.keys&&a_e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var l_e=Function.prototype.toString;function u_e(e){if(null!=e){try{return l_e.call(e)}catch(Dhe){}try{return e+""}catch(Dhe){}}return""}var c_e=/^\[object .+?Constructor\]$/,d_e=Function.prototype,f_e=Object.prototype,h_e=d_e.toString,p_e=f_e.hasOwnProperty,v_e=RegExp("^"+h_e.call(p_e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g_e(e){return!(!o_e(e)||(t=e,s_e&&s_e in t))&&(i_e(e)?v_e:c_e).test(u_e(e));var t}function m_e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return g_e(n)?n:void 0}var y_e=m_e(DCe,"Map"),b_e=m_e(Object,"create");var w_e=Object.prototype.hasOwnProperty;var k_e=Object.prototype.hasOwnProperty;function x_e(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 S_e(e,t){var n=e.__data__;return function(e){var t=kn(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C_e(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])}}x_e.prototype.clear=function(){this.__data__=b_e?b_e(null):{},this.size=0},x_e.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},x_e.prototype.get=function(e){var t=this.__data__;if(b_e){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return w_e.call(t,e)?t[e]:void 0},x_e.prototype.has=function(e){var t=this.__data__;return b_e?void 0!==t[e]:k_e.call(t,e)},x_e.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=b_e&&void 0===t?"__lodash_hash_undefined__":t,this},C_e.prototype.clear=function(){this.size=0,this.__data__={hash:new x_e,map:new(y_e||r_e),string:new x_e}},C_e.prototype.delete=function(e){var t=S_e(this,e).delete(e);return this.size-=t?1:0,t},C_e.prototype.get=function(e){return S_e(this,e).get(e)},C_e.prototype.has=function(e){return S_e(this,e).has(e)},C_e.prototype.set=function(e,t){var n=S_e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function __e(e){var t=this.__data__=new r_e(e);this.size=t.size}__e.prototype.clear=function(){this.__data__=new r_e,this.size=0},__e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},__e.prototype.get=function(e){return this.__data__.get(e)},__e.prototype.has=function(e){return this.__data__.has(e)},__e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r_e){var r=n.__data__;if(!y_e||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new C_e(r)}return n.set(e,t),this.size=n.size,this};var E_e=function(){try{var e=m_e(Object,"defineProperty");return e({},"",{}),e}catch(Dhe){}}();function P_e(e,t,n){"__proto__"==t&&E_e?E_e(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var L_e=Object.prototype.hasOwnProperty;function O_e(e,t,n){var r=e[t];L_e.call(e,t)&&e_e(r,n)&&(void 0!==n||t in e)||P_e(e,t,n)}function A_e(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?P_e(n,s,l):O_e(n,s,l)}return n}function M_e(e){return YCe(e)&&"[object Arguments]"==UCe(e)}var T_e=Object.prototype,I_e=T_e.hasOwnProperty,R_e=T_e.propertyIsEnumerable,N_e=M_e(function(){return arguments}())?M_e:function(e){return YCe(e)&&I_e.call(e,"callee")&&!R_e.call(e,"callee")},D_e=N_e,z_e=Array.isArray;var j_e="object"==kn(Gt)&&Gt&&!Gt.nodeType&&Gt,B_e=j_e&&"object"==kn(Zt)&&Zt&&!Zt.nodeType&&Zt,F_e=B_e&&B_e.exports===j_e?DCe.Buffer:void 0,H_e=(F_e?F_e.isBuffer:void 0)||function(){return!1},V_e=/^(?:0|[1-9]\d*)$/;function W_e(e,t){var n=kn(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&V_e.test(e))&&e>-1&&e%1==0&&e<t}function U_e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var G_e={};function q_e(e){return function(t){return e(t)}}G_e["[object Float32Array]"]=G_e["[object Float64Array]"]=G_e["[object Int8Array]"]=G_e["[object Int16Array]"]=G_e["[object Int32Array]"]=G_e["[object Uint8Array]"]=G_e["[object Uint8ClampedArray]"]=G_e["[object Uint16Array]"]=G_e["[object Uint32Array]"]=!0,G_e["[object Arguments]"]=G_e["[object Array]"]=G_e["[object ArrayBuffer]"]=G_e["[object Boolean]"]=G_e["[object DataView]"]=G_e["[object Date]"]=G_e["[object Error]"]=G_e["[object Function]"]=G_e["[object Map]"]=G_e["[object Number]"]=G_e["[object Object]"]=G_e["[object RegExp]"]=G_e["[object Set]"]=G_e["[object String]"]=G_e["[object WeakMap]"]=!1;var Y_e="object"==kn(Gt)&&Gt&&!Gt.nodeType&&Gt,Z_e=Y_e&&"object"==kn(Zt)&&Zt&&!Zt.nodeType&&Zt,X_e=Z_e&&Z_e.exports===Y_e&&RCe.process,$_e=function(){try{var e=Z_e&&Z_e.require&&Z_e.require("util").types;return e||X_e&&X_e.binding&&X_e.binding("util")}catch(Dhe){}}(),K_e=$_e,Q_e=K_e&&K_e.isTypedArray,J_e=Q_e?q_e(Q_e):function(e){return YCe(e)&&U_e(e.length)&&!!G_e[UCe(e)]},eEe=J_e,tEe=Object.prototype.hasOwnProperty;function nEe(e,t){var n=z_e(e),r=!n&&D_e(e),o=!n&&!r&&H_e(e),i=!n&&!r&&!o&&eEe(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 u in e)!t&&!tEe.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||W_e(u,l))||s.push(u);return s}var rEe=Object.prototype;function oEe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||rEe)}var iEe=GCe(Object.keys,Object),aEe=Object.prototype.hasOwnProperty;function sEe(e){return null!=e&&U_e(e.length)&&!i_e(e)}function lEe(e){return sEe(e)?nEe(e):function(e){if(!oEe(e))return iEe(e);var t=[];for(var n in Object(e))aEe.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var uEe=Object.prototype.hasOwnProperty;function cEe(e){if(!o_e(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=oEe(e),n=[];for(var r in e)("constructor"!=r||!t&&uEe.call(e,r))&&n.push(r);return n}function dEe(e){return sEe(e)?nEe(e,!0):cEe(e)}var fEe="object"==kn(Gt)&&Gt&&!Gt.nodeType&&Gt,hEe=fEe&&"object"==kn(Zt)&&Zt&&!Zt.nodeType&&Zt,pEe=hEe&&hEe.exports===fEe?DCe.Buffer:void 0,vEe=pEe?pEe.allocUnsafe:void 0;function gEe(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function mEe(){return[]}var yEe=Object.prototype.propertyIsEnumerable,bEe=Object.getOwnPropertySymbols,wEe=bEe?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}(bEe(e),(function(t){return yEe.call(e,t)})))}:mEe,kEe=wEe;function xEe(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var SEe=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)xEe(t,kEe(e)),e=qCe(e);return t}:mEe;function CEe(e,t,n){var r=t(e);return z_e(e)?r:xEe(r,n(e))}function _Ee(e){return CEe(e,lEe,kEe)}function EEe(e){return CEe(e,dEe,SEe)}var PEe=m_e(DCe,"DataView"),LEe=m_e(DCe,"Promise"),OEe=m_e(DCe,"Set"),AEe=m_e(DCe,"WeakMap"),MEe="[object Map]",TEe="[object Promise]",IEe="[object Set]",REe="[object WeakMap]",NEe="[object DataView]",DEe=u_e(PEe),zEe=u_e(y_e),jEe=u_e(LEe),BEe=u_e(OEe),FEe=u_e(AEe),HEe=UCe;(PEe&&HEe(new PEe(new ArrayBuffer(1)))!=NEe||y_e&&HEe(new y_e)!=MEe||LEe&&HEe(LEe.resolve())!=TEe||OEe&&HEe(new OEe)!=IEe||AEe&&HEe(new AEe)!=REe)&&(HEe=function(e){var t=UCe(e),n="[object Object]"==t?e.constructor:void 0,r=n?u_e(n):"";if(r)switch(r){case DEe:return NEe;case zEe:return MEe;case jEe:return TEe;case BEe:return IEe;case FEe:return REe}return t});var VEe=HEe,WEe=Object.prototype.hasOwnProperty;var UEe=DCe.Uint8Array;function GEe(e){var t=new e.constructor(e.byteLength);return new UEe(t).set(new UEe(e)),t}var qEe=/\w*$/;var YEe=zCe?zCe.prototype:void 0,ZEe=YEe?YEe.valueOf:void 0;function XEe(e,t,n){var r,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return GEe(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?GEe(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?GEe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,qEe.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=e,ZEe?Object(ZEe.call(r)):{}}}var $Ee=Object.create,KEe=function(){function e(){}return function(t){if(!o_e(t))return{};if($Ee)return $Ee(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var QEe=K_e&&K_e.isMap,JEe=QEe?q_e(QEe):function(e){return YCe(e)&&"[object Map]"==VEe(e)},ePe=JEe;var tPe=K_e&&K_e.isSet,nPe=tPe?q_e(tPe):function(e){return YCe(e)&&"[object Set]"==VEe(e)},rPe=nPe,oPe="[object Arguments]",iPe="[object Function]",aPe="[object Object]",sPe={};function lPe(e,t,n,r,o,i){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!o_e(e))return e;var c=z_e(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&WEe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return gEe(e,a)}else{var d=VEe(e),f=d==iPe||"[object GeneratorFunction]"==d;if(H_e(e))return function(e,t){if(t)return e.slice();var n=e.length,r=vEe?vEe(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==aPe||d==oPe||f&&!o){if(a=l||f?{}:function(e){return"function"!=typeof e.constructor||oEe(e)?{}:KEe(qCe(e))}(e),!s)return l?function(e,t){return A_e(e,SEe(e),t)}(e,function(e,t){return e&&A_e(t,dEe(t),e)}(a,e)):function(e,t){return A_e(e,kEe(e),t)}(e,function(e,t){return e&&A_e(t,lEe(t),e)}(a,e))}else{if(!sPe[d])return o?e:{};a=XEe(e,d,s)}}i||(i=new __e);var h=i.get(e);if(h)return h;i.set(e,a),rPe(e)?e.forEach((function(r){a.add(lPe(r,t,n,r,e,i))})):ePe(e)&&e.forEach((function(r,o){a.set(o,lPe(r,t,n,o,e,i))}));var p=c?void 0:(u?l?EEe:_Ee:l?dEe:lEe)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(p||e,(function(r,o){p&&(r=e[o=r]),O_e(a,o,lPe(r,t,n,o,e,i))})),a}sPe[oPe]=sPe["[object Array]"]=sPe["[object ArrayBuffer]"]=sPe["[object DataView]"]=sPe["[object Boolean]"]=sPe["[object Date]"]=sPe["[object Float32Array]"]=sPe["[object Float64Array]"]=sPe["[object Int8Array]"]=sPe["[object Int16Array]"]=sPe["[object Int32Array]"]=sPe["[object Map]"]=sPe["[object Number]"]=sPe[aPe]=sPe["[object RegExp]"]=sPe["[object Set]"]=sPe["[object String]"]=sPe["[object Symbol]"]=sPe["[object Uint8Array]"]=sPe["[object Uint8ClampedArray]"]=sPe["[object Uint16Array]"]=sPe["[object Uint32Array]"]=!0,sPe["[object Error]"]=sPe[iPe]=sPe["[object WeakMap]"]=!1;function uPe(e){return lPe(e,4)}function cPe(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 dPe(e){return"symbol"==kn(e)||YCe(e)&&"[object Symbol]"==UCe(e)}function fPe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){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(fPe.Cache||C_e),n}fPe.Cache=C_e;var hPe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pPe=/\\(\\)?/g,vPe=function(e){var t=fPe(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(hPe,(function(e,n,r,o){t.push(r?o.replace(pPe,"$1"):n||e)})),t})),gPe=vPe;function mPe(e){if("string"==typeof e||dPe(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}var yPe=zCe?zCe.prototype:void 0,bPe=yPe?yPe.toString:void 0;function wPe(e){if("string"==typeof e)return e;if(z_e(e))return cPe(e,wPe)+"";if(dPe(e))return bPe?bPe.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function kPe(e){return z_e(e)?cPe(e,mPe):dPe(e)?[e]:gEe(gPe(function(e){return null==e?"":wPe(e)}(e)))}function xPe(e){return lPe(e,5)}function SPe(){return SPe=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},SPe.apply(this,arguments)}function CPe(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}function _Pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var EPe=function(e){return Array.isArray(e)&&0===e.length},PPe=function(e){return"function"==typeof e},LPe=function(e){return null!==e&&"object"===kn(e)},OPe=function(e){return String(Math.floor(Number(e)))===e},APe=function(e){return"[object String]"===Object.prototype.toString.call(e)},MPe=function(e){return 0===cr.Children.count(e)},TPe=function(e){return LPe(e)&&PPe(e.then)};function IPe(e,t,n,r){void 0===r&&(r=0);for(var o=kPe(t);e&&r<o.length;)e=e[o[r++]];return void 0===e?n:e}function RPe(e,t,n){for(var r=uPe(e),o=r,i=0,a=kPe(t);i<a.length-1;i++){var s=a[i],l=IPe(e,a.slice(0,i+1));if(l&&(LPe(l)||Array.isArray(l)))o=o[s]=uPe(l);else{var u=a[i+1];o=o[s]=OPe(u)&&Number(u)>=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 NPe(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];LPe(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},NPe(s,t,n,r[a])):r[a]=t}return r}var DPe=cr.createContext(void 0);DPe.displayName="FormikContext";var zPe=DPe.Provider;function jPe(){var e=cr.useContext(DPe);return e}function BPe(e,t){switch(t.type){case"SET_VALUES":return SPe({},e,{values:t.payload});case"SET_TOUCHED":return SPe({},e,{touched:t.payload});case"SET_ERRORS":return PCe(e.errors,t.payload)?e:SPe({},e,{errors:t.payload});case"SET_STATUS":return SPe({},e,{status:t.payload});case"SET_ISSUBMITTING":return SPe({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return SPe({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return SPe({},e,{values:RPe(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return SPe({},e,{touched:RPe(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return SPe({},e,{errors:RPe(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return SPe({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return SPe({},e,{touched:NPe(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return SPe({},e,{isSubmitting:!1});default:return e}}DPe.Consumer;var FPe={},HPe={};function VPe(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,s=e.isInitialValid,l=e.enableReinitialize,u=void 0!==l&&l,c=e.onSubmit,d=CPe(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=SPe({validateOnChange:n,validateOnBlur:o,validateOnMount:a,onSubmit:c},d),h=cr.useRef(f.initialValues),p=cr.useRef(f.initialErrors||FPe),v=cr.useRef(f.initialTouched||HPe),g=cr.useRef(f.initialStatus),m=cr.useRef(!1),y=cr.useRef({});cr.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]);var b=cr.useReducer(BPe,{values:f.initialValues,errors:f.initialErrors||FPe,touched:f.initialTouched||HPe,status:f.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),w=b[0],k=b[1],x=cr.useCallback((function(e,t){return new Promise((function(n,r){var o=f.validate(e,t);null==o?n(FPe):TPe(o)?o.then((function(e){n(e||FPe)}),(function(e){r(e)})):n(o)}))}),[f.validate]),S=cr.useCallback((function(e,t){var n=f.validationSchema,r=PPe(n)?n(t):n,o=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var o=UPe(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){o.then((function(){e(FPe)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return RPe(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;IPe(t,a.path)||(t=RPe(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[f.validationSchema]),C=cr.useCallback((function(e,t){return new Promise((function(n){return n(y.current[e].validate(t))}))}),[]),_=cr.useCallback((function(e){var t=Object.keys(y.current).filter((function(e){return PPe(y.current[e].validate)})),n=t.length>0?t.map((function(t){return C(t,IPe(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=RPe(e,t[r],n)),e}),{})}))}),[C]),E=cr.useCallback((function(e){return Promise.all([_(e),f.validationSchema?S(e):{},f.validate?x(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return ICe.all([t,n,r],{arrayMerge:GPe})}))}),[f.validate,f.validationSchema,_,x,S]),P=YPe((function(e){return void 0===e&&(e=w.values),k({type:"SET_ISVALIDATING",payload:!0}),E(e).then((function(e){return m.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:e})),e}))}));cr.useEffect((function(){a&&!0===m.current&&PCe(h.current,f.initialValues)&&P(h.current)}),[a,P]);var L=cr.useCallback((function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:p.current?p.current:f.initialErrors||{},r=e&&e.touched?e.touched:v.current?v.current:f.initialTouched||{},o=e&&e.status?e.status:g.current?g.current:f.initialStatus;h.current=t,p.current=n,v.current=r,g.current=o;var i=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(f.onReset){var a=f.onReset(w.values,Y);TPe(a)?a.then(i):i()}else i()}),[f.initialErrors,f.initialStatus,f.initialTouched]);cr.useEffect((function(){!0!==m.current||PCe(h.current,f.initialValues)||(u&&(h.current=f.initialValues,L()),a&&P(h.current))}),[u,f.initialValues,L,a,P]),cr.useEffect((function(){u&&!0===m.current&&!PCe(p.current,f.initialErrors)&&(p.current=f.initialErrors||FPe,k({type:"SET_ERRORS",payload:f.initialErrors||FPe}))}),[u,f.initialErrors]),cr.useEffect((function(){u&&!0===m.current&&!PCe(v.current,f.initialTouched)&&(v.current=f.initialTouched||HPe,k({type:"SET_TOUCHED",payload:f.initialTouched||HPe}))}),[u,f.initialTouched]),cr.useEffect((function(){u&&!0===m.current&&!PCe(g.current,f.initialStatus)&&(g.current=f.initialStatus,k({type:"SET_STATUS",payload:f.initialStatus}))}),[u,f.initialStatus,f.initialTouched]);var O=YPe((function(e){if(y.current[e]&&PPe(y.current[e].validate)){var t=IPe(w.values,e),n=y.current[e].validate(t);return TPe(n)?(k({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),k({type:"SET_ISVALIDATING",payload:!1})}))):(k({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return f.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),S(w.values,e).then((function(e){return e})).then((function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),k({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),A=cr.useCallback((function(e,t){var n=t.validate;y.current[e]={validate:n}}),[]),M=cr.useCallback((function(e){delete y.current[e]}),[]),T=YPe((function(e,t){return k({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?P(w.values):Promise.resolve()})),I=cr.useCallback((function(e){k({type:"SET_ERRORS",payload:e})}),[]),R=YPe((function(e,t){var r=PPe(e)?e(w.values):e;return k({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?P(r):Promise.resolve()})),N=cr.useCallback((function(e,t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),D=YPe((function(e,t,r){return k({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?P(RPe(w.values,e,t)):Promise.resolve()})),z=cr.useCallback((function(e,t){var n,r=t,o=e;if(!APe(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,s=i.name,l=i.id,u=i.value,c=i.checked,d=(i.outerHTML,i.options),f=i.multiple;r=t||(s||l),o=/number|range/.test(a)?(n=parseFloat(u),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,o=(i=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!o)return r.concat(n);if(!o)return r;return r.slice(0,i).concat(r.slice(i+1))}(IPe(w.values,r),c,u):d&&f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):u}r&&D(r,o)}),[D,w.values]),j=YPe((function(e){if(APe(e))return function(t){return z(t,e)};z(e)})),B=YPe((function(e,t,n){return void 0===t&&(t=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?P(w.values):Promise.resolve()})),F=cr.useCallback((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||(r||o));B(i,!0)}),[B]),H=YPe((function(e){if(APe(e))return function(t){return F(t,e)};F(e)})),V=cr.useCallback((function(e){PPe(e)?k({type:"SET_FORMIK_STATE",payload:e}):k({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),W=cr.useCallback((function(e){k({type:"SET_STATUS",payload:e})}),[]),U=cr.useCallback((function(e){k({type:"SET_ISSUBMITTING",payload:e})}),[]),G=YPe((function(){return k({type:"SUBMIT_ATTEMPT"}),P().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Z()))return}catch(r){throw r}return Promise.resolve(n).then((function(e){return m.current&&k({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(m.current)throw k({type:"SUBMIT_FAILURE"}),e}))}if(m.current&&(k({type:"SUBMIT_FAILURE"}),t))throw e}))})),q=YPe((function(e){e&&e.preventDefault&&PPe(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&PPe(e.stopPropagation)&&e.stopPropagation(),G().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:L,validateForm:P,validateField:O,setErrors:I,setFieldError:N,setFieldTouched:B,setFieldValue:D,setStatus:W,setSubmitting:U,setTouched:T,setValues:R,setFormikState:V,submitForm:G},Z=YPe((function(){return c(w.values,Y)})),X=YPe((function(e){e&&e.preventDefault&&PPe(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&PPe(e.stopPropagation)&&e.stopPropagation(),L()})),$=cr.useCallback((function(e){return{value:IPe(w.values,e),error:IPe(w.errors,e),touched:!!IPe(w.touched,e),initialValue:IPe(h.current,e),initialTouched:!!IPe(v.current,e),initialError:IPe(p.current,e)}}),[w.errors,w.touched,w.values]),K=cr.useCallback((function(e){return{setValue:function(t,n){return D(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return N(e,t)}}}),[D,B,N]),Q=cr.useCallback((function(e){var t=LPe(e),n=t?e.name:e,r=IPe(w.values,n),o={name:n,value:r,onChange:j,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,j,w.values]),J=cr.useMemo((function(){return!PCe(h.current,w.values)}),[h.current,w.values]),ee=cr.useMemo((function(){return void 0!==s?J?w.errors&&0===Object.keys(w.errors).length:!1!==s&&PPe(s)?s(f):s:w.errors&&0===Object.keys(w.errors).length}),[s,J,w.errors,f]);return SPe({},w,{initialValues:h.current,initialErrors:p.current,initialTouched:v.current,initialStatus:g.current,handleBlur:H,handleChange:j,handleReset:X,handleSubmit:q,resetForm:L,setErrors:I,setFormikState:V,setFieldTouched:B,setFieldValue:D,setFieldError:N,setStatus:W,setSubmitting:U,setTouched:T,setValues:R,submitForm:G,validateForm:P,validateField:O,isValid:ee,dirty:J,unregisterField:M,registerField:A,getFieldProps:Q,getFieldMeta:$,getFieldHelpers:K,validateOnBlur:o,validateOnChange:n,validateOnMount:a})}function WPe(e){var t=VPe(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return cr.useImperativeHandle(i,(function(){return t})),cr.createElement(zPe,{value:t},n?cr.createElement(n,t):o?o(t):r?PPe(r)?r(t):MPe(r)?null:cr.Children.only(r):null)}function UPe(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)||JCe(e)?UPe(e):""!==e?e:void 0})):JCe(e[r])?t[r]=UPe(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function GPe(e,t,n){var r=e.slice();return t.forEach((function(t,o){if(void 0===r[o]){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?ICe(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=ICe(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var qPe="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?cr.useLayoutEffect:cr.useEffect;function YPe(e){var t=cr.useRef(e);return qPe((function(){t.current=e})),cr.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)}),[])}function ZPe(e){var t=e.validate,n=e.name,r=e.render,o=e.children,i=e.as,a=e.component,s=CPe(e,["validate","name","render","children","as","component"]),l=CPe(jPe(),["validate","validationSchema"]),u=l.registerField,c=l.unregisterField;cr.useEffect((function(){return u(n,{validate:t}),function(){c(n)}}),[u,c,n,t]);var d=l.getFieldProps(SPe({name:n},s)),f=l.getFieldMeta(n),h={field:d,form:l};if(r)return r(SPe({},h,{meta:f}));if(PPe(o))return o(SPe({},h,{meta:f}));if(a){if("string"==typeof a){var p=s.innerRef,v=CPe(s,["innerRef"]);return cr.createElement(a,SPe({ref:p},d,v),o)}return cr.createElement(a,SPe({field:d,form:l},s),o)}var g=i||"input";if("string"==typeof g){var m=s.innerRef,y=CPe(s,["innerRef"]);return cr.createElement(g,SPe({ref:m},d,y),o)}return cr.createElement(g,SPe({},d,s),o)}cr.forwardRef((function(e,t){var n=e.action,r=CPe(e,["action"]),o=null!=n?n:"#",i=jPe(),a=i.handleReset,s=i.handleSubmit;return cr.createElement("form",Object.assign({onSubmit:s,ref:t,onReset:a,action:o},r))})).displayName="Form";var XPe=function(e,t,n){var r=$Pe(e);return r.splice(t,0,n),r},$Pe=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(SPe({},e,{length:t+1}))}return[]},KPe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var o=n.props,i=o.name;(0,o.formik.setFormikState)((function(n){var o="function"==typeof r?r:e,a="function"==typeof t?t:e,s=RPe(n.values,i,e(IPe(n.values,i))),l=r?o(IPe(n.errors,i)):void 0,u=t?a(IPe(n.touched,i)):void 0;return EPe(l)&&(l=void 0),EPe(u)&&(u=void 0),SPe({},n,{values:s,errors:r?RPe(n.errors,i,l):n.errors,touched:t?RPe(n.touched,i,u):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat($Pe(t),[xPe(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=$Pe(e),o=r[t];return r[t]=r[n],r[n]=o,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=$Pe(e),o=r[t];return r.splice(t,1),r.splice(n,0,o),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return XPe(n,e,t)}),(function(t){return XPe(t,e,null)}),(function(t){return XPe(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=$Pe(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(_Pe(n)),n.pop=n.pop.bind(_Pe(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!PCe(IPe(e.formik.values,e.name),IPe(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},o.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?$Pe(n):[];return t||(t=r[e]),PPe(r.splice)&&r.splice(e,1),r}),!0,!0),t},o.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},o.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,o=t.children,i=t.name,a=SPe({},e,{form:CPe(t.formik,["validate","validationSchema"]),name:i});return n?cr.createElement(n,a):r?r(a):o?"function"==typeof o?o(a):MPe(o)?null:cr.Children.only(o):null},r}(cr.Component);KPe.defaultProps={validateOnChange:!0};var QPe=e0,JPe=_se,eLe=w0,tLe=kK,nLe=Pse;var rLe=function(e,t,n,r){if(!tLe(e))return e;for(var o=-1,i=(t=JPe(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=nLe(t[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var c=s[l];void 0===(u=r?r(c,l,s):void 0)&&(u=tLe(c)?c:eLe(t[o+1])?[]:{})}QPe(s,l,u),s=s[l]}return e},oLe=Ase,iLe=rLe,aLe=_se;var sLe=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=oLe(e,a);n(s,a)&&iLe(i,aLe(a,e),s)}return i},lLe=fse,uLe=fle,cLe=sLe,dLe=Q1;var fLe=function(e,t){if(null==e)return{};var n=lLe(dLe(e),(function(e){return[e]}));return t=uLe(t),cLe(e,n,(function(e,n){return t(e,n[0])}))},hLe=QX([wle],(function(e){var t=e.openModel;return{model_list:e.model_list,openModel:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function pLe(){var e=kie(hLe),t=e.openModel,n=e.model_list,r=kie((function(e){return e.system.isProcessing})),o=wie(),i=o8().t,a=yn(cr.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"}),2),s=a[0],l=a[1];cr.useEffect((function(){if(t){var e,r,o,i,a,s,u,c=fLe(n,(function(e,n){return dae(n,t)}));l({name:t,description:null===(e=c[t])||void 0===e?void 0:e.description,config:null===(r=c[t])||void 0===r?void 0:r.config,weights:null===(o=c[t])||void 0===o?void 0:o.weights,vae:null===(i=c[t])||void 0===i?void 0:i.vae,width:null===(a=c[t])||void 0===a?void 0:a.width,height:null===(s=c[t])||void 0===s?void 0:s.height,default:null===(u=c[t])||void 0===u?void 0:u.default,format:"ckpt"})}}),[n,t]);return t?ro(yP,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[no(yP,{alignItems:"center",children:no(jP,{fontSize:"lg",fontWeight:"bold",children:t})}),no(yP,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:no(WPe,{enableReinitialize:!0,initialValues:s,onSubmit:function(e){o(aie(un(un({},e),{},{width:Number(e.width),height:Number(e.height)})))},children:function(e){var t=e.handleSubmit,n=e.errors,o=e.touched;return no("form",{onSubmit:t,children:ro(zP,{rowGap:"0.5rem",alignItems:"start",children:[ro(I_,{isInvalid:!!n.description&&o.description,isRequired:!0,children:[no(V_,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"description",name:"description",type:"text",width:"lg"}),n.description&&o.description?no(F_,{children:n.description}):no(R_,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),ro(I_,{isInvalid:!!n.config&&o.config,isRequired:!0,children:[no(V_,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:config")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"config",name:"config",type:"text",width:"lg"}),n.config&&o.config?no(F_,{children:n.config}):no(R_,{margin:0,children:i("modelmanager:configValidationMsg")})]})]}),ro(I_,{isInvalid:!!n.weights&&o.weights,isRequired:!0,children:[no(V_,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:modelLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"weights",name:"weights",type:"text",width:"lg"}),n.weights&&o.weights?no(F_,{children:n.weights}):no(R_,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!!n.vae&&o.vae,children:[no(V_,{htmlFor:"vae",fontSize:"sm",children:i("modelmanager:vaeLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae",name:"vae",type:"text",width:"lg"}),n.vae&&o.vae?no(F_,{children:n.vae}):no(R_,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),ro(DP,{width:"100%",children:[ro(I_,{isInvalid:!!n.width&&o.width,children:[no(V_,{htmlFor:"width",fontSize:"sm",children:i("modelmanager:width")}),ro(zP,{alignItems:"start",children:[no(ZPe,{id:"width",name:"width",children:function(e){var t=e.field,n=e.form;return no(Aae,{id:"width",name:"width",min:64,max:2048,step:64,value:n.values.width,onChange:function(e){return n.setFieldValue(t.name,Number(e))}})}}),n.width&&o.width?no(F_,{children:n.width}):no(R_,{margin:0,children:i("modelmanager:widthValidationMsg")})]})]}),ro(I_,{isInvalid:!!n.height&&o.height,children:[no(V_,{htmlFor:"height",fontSize:"sm",children:i("modelmanager:height")}),ro(zP,{alignItems:"start",children:[no(ZPe,{id:"height",name:"height",children:function(e){var t=e.field,n=e.form;return no(Aae,{id:"height",name:"height",min:64,max:2048,step:64,value:n.values.height,onChange:function(e){return n.setFieldValue(t.name,Number(e))}})}}),n.height&&o.height?no(F_,{children:n.height}):no(R_,{margin:0,children:i("modelmanager:heightValidationMsg")})]})]})]}),no(Eae,{type:"submit",className:"modal-close-btn",isLoading:r,children:i("modelmanager:updateModel")})]})})}})})]}):no(yP,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:no(jP,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}var vLe=QX([wle],(function(e){var t=e.openModel;return{model_list:e.model_list,openModel:t}}),{memoizeOptions:{resultEqualityCheck:dae}});function gLe(){var e=kie(vLe),t=e.openModel,n=e.model_list,r=kie((function(e){return e.system.isProcessing})),o=wie(),i=o8().t,a=yn(cr.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"}),2),s=a[0],l=a[1];cr.useEffect((function(){if(t){var e,r,o,i,a,s,u,c,d,f,h,p,v,g,m,y,b=fLe(n,(function(e,n){return dae(n,t)}));l({name:t,description:null===(e=b[t])||void 0===e?void 0:e.description,path:null!==(r=b[t])&&void 0!==r&&r.path&&"None"!==(null===(o=b[t])||void 0===o?void 0:o.path)?null===(i=b[t])||void 0===i?void 0:i.path:"",repo_id:null!==(a=b[t])&&void 0!==a&&a.repo_id&&"None"!==(null===(s=b[t])||void 0===s?void 0:s.repo_id)?null===(u=b[t])||void 0===u?void 0:u.repo_id:"",vae:{repo_id:null!==(c=b[t])&&void 0!==c&&null!==(d=c.vae)&&void 0!==d&&d.repo_id?null===(f=b[t])||void 0===f||null===(h=f.vae)||void 0===h?void 0:h.repo_id:"",path:null!==(p=b[t])&&void 0!==p&&null!==(v=p.vae)&&void 0!==v&&v.path?null===(g=b[t])||void 0===g||null===(m=g.vae)||void 0===m?void 0:m.path:""},default:null===(y=b[t])||void 0===y?void 0:y.default,format:"diffusers"})}}),[n,t]);return t?ro(yP,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[no(yP,{alignItems:"center",children:no(jP,{fontSize:"lg",fontWeight:"bold",children:t})}),no(yP,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:no(WPe,{enableReinitialize:!0,initialValues:s,onSubmit:function(e){var t=e;""===e.path&&delete t.path,""===e.repo_id&&delete t.repo_id,""===e.vae.path&&delete t.vae.path,""===e.vae.repo_id&&delete t.vae.repo_id,o(aie(e))},children:function(e){var t,n,o,a,s,l,u,c,d,f,h=e.handleSubmit,p=e.errors,v=e.touched;return no("form",{onSubmit:h,children:ro(zP,{rowGap:"0.5rem",alignItems:"start",children:[ro(I_,{isInvalid:!!p.description&&v.description,isRequired:!0,children:[no(V_,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"description",name:"description",type:"text",width:"lg"}),p.description&&v.description?no(F_,{children:p.description}):no(R_,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),ro(I_,{isInvalid:!!p.path&&v.path,isRequired:!0,children:[no(V_,{htmlFor:"path",fontSize:"sm",children:i("modelmanager:modelLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"path",name:"path",type:"text",width:"lg"}),p.path&&v.path?no(F_,{children:p.path}):no(R_,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!!p.repo_id&&v.repo_id,children:[no(V_,{htmlFor:"repo_id",fontSize:"sm",children:i("modelmanager:repo_id")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"repo_id",name:"repo_id",type:"text",width:"lg"}),p.repo_id&&v.repo_id?no(F_,{children:p.repo_id}):no(R_,{margin:0,children:i("modelmanager:repoIDValidationMsg")})]})]}),ro(I_,{isInvalid:!(null===(t=p.vae)||void 0===t||!t.path)&&(null===(n=v.vae)||void 0===n?void 0:n.path),children:[no(V_,{htmlFor:"vae.path",fontSize:"sm",children:i("modelmanager:vaeLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae.path",name:"vae.path",type:"text",width:"lg"}),null!==(o=p.vae)&&void 0!==o&&o.path&&null!==(a=v.vae)&&void 0!==a&&a.path?no(F_,{children:null===(s=p.vae)||void 0===s?void 0:s.path}):no(R_,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!(null===(l=p.vae)||void 0===l||!l.repo_id)&&(null===(u=v.vae)||void 0===u?void 0:u.repo_id),children:[no(V_,{htmlFor:"vae.repo_id",fontSize:"sm",children:i("modelmanager:vaeRepoID")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"lg"}),null!==(c=p.vae)&&void 0!==c&&c.repo_id&&null!==(d=v.vae)&&void 0!==d&&d.repo_id?no(F_,{children:null===(f=p.vae)||void 0===f?void 0:f.repo_id}):no(R_,{margin:0,children:i("modelmanager:vaeRepoIDValidationMsg")})]})]}),no(Eae,{type:"submit",className:"modal-close-btn",isLoading:r,children:i("modelmanager:updateModel")})]})})}})})]}):no(yP,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:no(jP,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}var mLe=Qse;var yLe=function(e){return"function"==typeof e?e:mLe},bLe=YJ,wLe=Bae,kLe=yLe,xLe=v0;var SLe=function(e,t){return(xLe(e)?bLe:wLe)(e,kLe(t))};var CLe=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var _Le=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i},ELe=Ase,PLe=_Le;var LLe=function(e,t){return t.length<2?e:ELe(e,PLe(t,0,-1))},OLe=_se,ALe=CLe,MLe=LLe,TLe=Pse;var ILe=function(e,t){return t=OLe(t,e),null==(e=MLe(e,t))||delete e[TLe(ALe(t))]},RLe=ILe,NLe=w0,DLe=Array.prototype.splice;var zLe=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;NLe(o)?DLe.call(e,o,1):RLe(e,o)}}return e},jLe=fle,BLe=zLe;var FLe=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=jLe(t);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return BLe(e,o),n},HLe=QX([wle],(function(e){var t=e.model_list,n=[];return SLe(t,(function(e){n.push(e.weights)})),n}));function VLe(){var e=o8().t;return no(cP,{position:"absolute",zIndex:2,right:4,top:4,fontSize:"0.7rem",fontWeight:"bold",backgroundColor:"var(--accent-color)",padding:"0.2rem 0.5rem",borderRadius:"0.2rem",alignItems:"center",children:e("modelmanager:modelExists")})}function WLe(e){var t=e.model,n=e.modelsToAdd,r=e.setModelsToAdd,o=kie(HLe);return ro(cP,{position:"relative",children:[o.includes(t.location)?no(VLe,{}):null,no(pfe,{value:t.name,label:no(to,{children:ro(zP,{alignItems:"start",children:[no("p",{style:{fontWeight:"bold"},children:t.name}),no("p",{style:{fontStyle:"italic"},children:t.location})]})}),isChecked:n.includes(t.name),isDisabled:o.includes(t.location),onChange:function(e){n.includes(e.target.value)?r(FLe(n,(function(t){return t!==e.target.value}))):r([].concat(cn(n),[e.target.value]))},padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",_checked:{backgroundColor:"var(--accent-color)",color:"var(--text-color)"},_disabled:{backgroundColor:"var(--background-color-secondary)"}})]})}function ULe(){var e,t,n=wie(),r=o8().t,o=kie((function(e){return e.system.searchFolder})),i=kie((function(e){return e.system.foundModels})),a=kie(HLe),s=kie((function(e){return e.ui.shouldShowExistingModelsInSearch})),l=kie((function(e){return e.system.isProcessing})),u=yn(qr.useState([]),2),c=u[0],d=u[1];return ro(to,{children:[o?ro(yP,{flexDirection:"column",padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",rowGap:"0.5rem",position:"relative",children:[no("p",{style:{fontWeight:"bold",fontSize:"0.8rem",backgroundColor:"var(--background-color-secondary)",padding:"0.2rem 1rem",width:"max-content",borderRadius:"0.2rem"},children:r("modelmanager:checkpointFolder")}),no("p",{style:{fontWeight:"bold",fontSize:"0.8rem",maxWidth:"80%"},children:o}),no(_ae,{"aria-label":r("modelmanager:scanAgain"),tooltip:r("modelmanager:scanAgain"),icon:no(mfe,{}),position:"absolute",right:16,fontSize:18,disabled:l,onClick:function(){return n(iie(o))}}),no(_ae,{"aria-label":r("modelmanager:clearCheckpointFolder"),icon:no(hde,{style:{transform:"rotate(45deg)"}}),position:"absolute",right:5,onClick:function(){n(A8(null)),n(M8(null)),d([])}})]}):no(WPe,{initialValues:{checkpointFolder:""},onSubmit:function(e){!function(e){n(iie(e.checkpointFolder))}(e)},children:function(e){var t=e.handleSubmit;return no("form",{onSubmit:t,children:ro(DP,{columnGap:"0.5rem",children:[no(I_,{isRequired:!0,width:"max-content",children:no(ZPe,{as:bye,id:"checkpointFolder",name:"checkpointFolder",type:"text",width:"lg",size:"md",label:r("modelmanager:checkpointFolder")})}),no(_ae,{icon:no(_fe,{}),"aria-label":r("modelmanager:findModels"),tooltip:r("modelmanager:findModels"),type:"submit",disabled:l})]})})}}),i&&ro(yP,{flexDirection:"column",rowGap:"1rem",children:[ro(yP,{justifyContent:"space-between",alignItems:"center",children:[ro("p",{children:[r("modelmanager:modelsFound"),": ",i.length]}),ro("p",{children:[r("modelmanager:selected"),": ",c.length]})]}),ro(yP,{columnGap:"0.5rem",justifyContent:"space-between",children:[ro(yP,{columnGap:"0.5rem",children:[no(Eae,{isDisabled:c.length===i.length,onClick:function(){d([]),i&&i.forEach((function(e){a.includes(e.location)||d((function(t){return[].concat(cn(t),[e.name])}))}))},children:r("modelmanager:selectAll")}),no(Eae,{isDisabled:0===c.length,onClick:function(){d([])},children:r("modelmanager:deselectAll")}),no(pfe,{label:r("modelmanager:showExisting"),isChecked:s,onChange:function(){return n(q8(!s))}})]}),no(Eae,{isDisabled:0===c.length,onClick:function(){var e=null==i?void 0:i.filter((function(e){return c.includes(e.name)}));null==e||e.forEach((function(e){var t={name:e.name,description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:e.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};n(aie(t))})),d([])},backgroundColor:c.length>0?"var(--accent-color) !important":"",children:r("modelmanager:addSelected")})]}),ro(yP,{rowGap:"1rem",flexDirection:"column",maxHeight:"18rem",overflowY:"scroll",paddingRight:"1rem",paddingLeft:"0.2rem",borderRadius:"0.2rem",children:[i.length>0?0===c.length&&no(jP,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",margin:"0 0.5rem 0 1rem",textAlign:"center",backgroundColor:"var(--notice-color)",boxShadow:"0 0 200px 6px var(--notice-color)",marginTop:"1rem",width:"max-content",children:r("modelmanager:selectAndAdd")}):no(jP,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",textAlign:"center",backgroundColor:"var(--status-bad-color)",children:r("modelmanager:noModelsFound")}),(e=[],t=[],i&&i.forEach((function(n,r){a.includes(n.location)?t.push(no(WLe,{model:n,modelsToAdd:c,setModelsToAdd:d},r)):e.push(no(WLe,{model:n,modelsToAdd:c,setModelsToAdd:d},r))})),ro(to,{children:[e,s&&t]}))]})]})]})}function GLe(){var e=wie(),t=o8().t,n=kie((function(e){return e.system.isProcessing}));function r(e){var n;return function(e){return/\s/.test(e)}(e)&&(n=t("modelmanager:cannotUseSpaces")),n}var o=yn(qr.useState(!1),2),i=o[0],a=o[1];return ro(to,{children:[no(_ae,{"aria-label":t("common:back"),tooltip:t("common:back"),onClick:function(){return e(Y8(null))},width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:no(vfe,{})}),no(ULe,{}),no(pfe,{label:t("modelmanager:addManually"),isChecked:i,onChange:function(){return a(!i)}}),i&&no(WPe,{initialValues:{name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},onSubmit:function(t){e(aie(t)),e(Y8(null))},children:function(e){var o=e.handleSubmit,i=e.errors,a=e.touched;return no("form",{onSubmit:o,children:ro(zP,{rowGap:"0.5rem",children:[no(jP,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelmanager:manual")}),ro(I_,{isInvalid:!!i.name&&a.name,isRequired:!0,children:[no(V_,{htmlFor:"name",fontSize:"sm",children:t("modelmanager:name")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"name",name:"name",type:"text",validate:r,width:"2xl"}),i.name&&a.name?no(F_,{children:i.name}):no(R_,{margin:0,children:t("modelmanager:nameValidationMsg")})]})]}),ro(I_,{isInvalid:!!i.description&&a.description,isRequired:!0,children:[no(V_,{htmlFor:"description",fontSize:"sm",children:t("modelmanager:description")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"description",name:"description",type:"text",width:"2xl"}),i.description&&a.description?no(F_,{children:i.description}):no(R_,{margin:0,children:t("modelmanager:descriptionValidationMsg")})]})]}),ro(I_,{isInvalid:!!i.config&&a.config,isRequired:!0,children:[no(V_,{htmlFor:"config",fontSize:"sm",children:t("modelmanager:config")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"config",name:"config",type:"text",width:"2xl"}),i.config&&a.config?no(F_,{children:i.config}):no(R_,{margin:0,children:t("modelmanager:configValidationMsg")})]})]}),ro(I_,{isInvalid:!!i.weights&&a.weights,isRequired:!0,children:[no(V_,{htmlFor:"config",fontSize:"sm",children:t("modelmanager:modelLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"weights",name:"weights",type:"text",width:"2xl"}),i.weights&&a.weights?no(F_,{children:i.weights}):no(R_,{margin:0,children:t("modelmanager:modelLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!!i.vae&&a.vae,children:[no(V_,{htmlFor:"vae",fontSize:"sm",children:t("modelmanager:vaeLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae",name:"vae",type:"text",width:"2xl"}),i.vae&&a.vae?no(F_,{children:i.vae}):no(R_,{margin:0,children:t("modelmanager:vaeLocationValidationMsg")})]})]}),ro(DP,{width:"100%",children:[ro(I_,{isInvalid:!!i.width&&a.width,children:[no(V_,{htmlFor:"width",fontSize:"sm",children:t("modelmanager:width")}),ro(zP,{alignItems:"start",children:[no(ZPe,{id:"width",name:"width",children:function(e){var t=e.field,n=e.form;return no(Aae,{id:"width",name:"width",min:64,max:2048,step:64,width:"90%",value:n.values.width,onChange:function(e){return n.setFieldValue(t.name,Number(e))}})}}),i.width&&a.width?no(F_,{children:i.width}):no(R_,{margin:0,children:t("modelmanager:widthValidationMsg")})]})]}),ro(I_,{isInvalid:!!i.height&&a.height,children:[no(V_,{htmlFor:"height",fontSize:"sm",children:t("modelmanager:height")}),ro(zP,{alignItems:"start",children:[no(ZPe,{id:"height",name:"height",children:function(e){var t=e.field,n=e.form;return no(Aae,{id:"height",name:"height",min:64,max:2048,width:"90%",step:64,value:n.values.height,onChange:function(e){return n.setFieldValue(t.name,Number(e))}})}}),i.height&&a.height?no(F_,{children:i.height}):no(R_,{margin:0,children:t("modelmanager:heightValidationMsg")})]})]})]}),no(Eae,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelmanager:addModel")})]})})}})]})}function qLe(e){var t=e.children;return no(yP,{flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.5rem",rowGap:"1rem",width:"100%",children:t})}function YLe(){var e=wie(),t=o8().t,n=kie((function(e){return e.system.isProcessing}));function r(e){var n;return function(e){return/\s/.test(e)}(e)&&(n=t("modelmanager:cannotUseSpaces")),n}return ro(yP,{children:[no(_ae,{"aria-label":t("common:back"),tooltip:t("common:back"),onClick:function(){return e(Y8(null))},width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:no(vfe,{})}),no(WPe,{initialValues:{name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},onSubmit:function(t){var n=t;""===t.path&&delete n.path,""===t.repo_id&&delete n.repo_id,""===t.vae.path&&delete n.vae.path,""===t.vae.repo_id&&delete n.vae.repo_id,e(aie(n)),e(Y8(null))},children:function(e){var o,i,a,s,l,u,c,d,f,h,p=e.handleSubmit,v=e.errors,g=e.touched;return no("form",{onSubmit:p,children:ro(zP,{rowGap:"0.5rem",children:[no(qLe,{children:ro(I_,{isInvalid:!!v.name&&g.name,isRequired:!0,children:[no(V_,{htmlFor:"name",fontSize:"sm",children:t("modelmanager:name")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"name",name:"name",type:"text",validate:r,width:"2xl",isRequired:!0}),v.name&&g.name?no(F_,{children:v.name}):no(R_,{margin:0,children:t("modelmanager:nameValidationMsg")})]})]})}),no(qLe,{children:ro(I_,{isInvalid:!!v.description&&g.description,isRequired:!0,children:[no(V_,{htmlFor:"description",fontSize:"sm",children:t("modelmanager:description")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),v.description&&g.description?no(F_,{children:v.description}):no(R_,{margin:0,children:t("modelmanager:descriptionValidationMsg")})]})]})}),ro(qLe,{children:[no(jP,{fontWeight:"bold",fontSize:"sm",children:t("modelmanager:formMessageDiffusersModelLocation")}),no(jP,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelmanager:formMessageDiffusersModelLocationDesc")}),ro(I_,{isInvalid:!!v.path&&g.path,children:[no(V_,{htmlFor:"path",fontSize:"sm",children:t("modelmanager:modelLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"path",name:"path",type:"text",width:"2xl"}),v.path&&g.path?no(F_,{children:v.path}):no(R_,{margin:0,children:t("modelmanager:modelLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!!v.repo_id&&g.repo_id,children:[no(V_,{htmlFor:"repo_id",fontSize:"sm",children:t("modelmanager:repo_id")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),v.repo_id&&g.repo_id?no(F_,{children:v.repo_id}):no(R_,{margin:0,children:t("modelmanager:repoIDValidationMsg")})]})]})]}),ro(qLe,{children:[no(jP,{fontWeight:"bold",children:t("modelmanager:formMessageDiffusersVAELocation")}),no(jP,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelmanager:formMessageDiffusersVAELocationDesc")}),ro(I_,{isInvalid:!(null===(o=v.vae)||void 0===o||!o.path)&&(null===(i=g.vae)||void 0===i?void 0:i.path),children:[no(V_,{htmlFor:"vae.path",fontSize:"sm",children:t("modelmanager:vaeLocation")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),null!==(a=v.vae)&&void 0!==a&&a.path&&null!==(s=g.vae)&&void 0!==s&&s.path?no(F_,{children:null===(l=v.vae)||void 0===l?void 0:l.path}):no(R_,{margin:0,children:t("modelmanager:vaeLocationValidationMsg")})]})]}),ro(I_,{isInvalid:!(null===(u=v.vae)||void 0===u||!u.repo_id)&&(null===(c=g.vae)||void 0===c?void 0:c.repo_id),children:[no(V_,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelmanager:vaeRepoID")}),ro(zP,{alignItems:"start",children:[no(ZPe,{as:bye,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),null!==(d=v.vae)&&void 0!==d&&d.repo_id&&null!==(f=g.vae)&&void 0!==f&&f.repo_id?no(F_,{children:null===(h=v.vae)||void 0===h?void 0:h.repo_id}):no(R_,{margin:0,children:t("modelmanager:vaeRepoIDValidationMsg")})]})]})]}),no(Eae,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelmanager:addModel")})]})})}})]})}function ZLe(e){var t=e.text,n=e.onClick;return no(yP,{position:"relative",width:"50%",height:"200px",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",justifyContent:"center",alignItems:"center",_hover:{cursor:"pointer",backgroundColor:"var(--accent-color)"},onClick:n,children:no(jP,{fontWeight:"bold",children:t})})}function XLe(){var e=GE(),t=e.isOpen,n=e.onOpen,r=e.onClose,o=kie((function(e){return e.ui.addNewModelUIOption})),i=wie(),a=o8().t;return ro(to,{children:[no(Eae,{"aria-label":a("modelmanager:addNewModel"),tooltip:a("modelmanager:addNewModel"),onClick:n,className:"modal-close-btn",size:"sm",children:ro(yP,{columnGap:"0.5rem",alignItems:"center",children:[no(hde,{}),a("modelmanager:addNew")]})}),ro(qW,{isOpen:t,onClose:function(){r(),i(Y8(null))},size:"3xl",closeOnOverlayClick:!1,children:[no(rU,{}),ro(JW,{className:"modal add-model-modal",fontFamily:"Inter",children:[no(tU,{children:a("modelmanager:addNewModel")}),no(ZW,{marginTop:"0.3rem"}),ro(YW,{className:"add-model-modal-body",children:[null==o&&ro(yP,{columnGap:"1rem",children:[no(ZLe,{text:a("modelmanager:addCheckpointModel"),onClick:function(){return i(Y8("ckpt"))}}),no(ZLe,{text:a("modelmanager:addDiffuserModel"),onClick:function(){return i(Y8("diffusers"))}})]}),"ckpt"==o&&no(GLe,{}),"diffusers"==o&&no(YLe,{})]})]})]})]})}function $Le(e){var t=kie((function(e){return e.system})),n=t.isProcessing,r=t.isConnected,o=kie((function(e){return e.system.openModel})),i=o8().t,a=wie(),s=e.name,l=e.status,u=e.description,c=function(){a(T8(s))};return ro(yP,{alignItems:"center",padding:"0.5rem 0.5rem",borderRadius:"0.2rem",backgroundColor:s===o?"var(--accent-color)":"",_hover:{backgroundColor:s===o?"var(--accent-color)":"var(--background-color)"},children:[no(cP,{onClick:c,cursor:"pointer",children:no(kY,{label:u,hasArrow:!0,placement:"bottom",children:no(jP,{fontWeight:"bold",children:s})})}),no(TP,{onClick:c,cursor:"pointer"}),ro(yP,{gap:2,alignItems:"center",children:[no(jP,{color:function(){switch(l){case"active":return"var(--status-good-color)";case"cached":return"var(--status-working-color)";case"not loaded":return"var(--text-color-secondary)"}}(),children:l}),no(b_,{size:"sm",onClick:function(){a(lie(s))},isDisabled:"active"===l||n||!r,className:"modal-close-btn",children:i("modelmanager:load")}),no(_ae,{icon:no(Bde,{}),size:"sm",onClick:c,"aria-label":"Modify Config",isDisabled:"active"===l||n||!r,className:" modal-close-btn"}),no(jke,{title:i("modelmanager:deleteModel"),acceptCallback:function(){a(sie(s)),a(T8(null))},acceptButtonText:i("modelmanager:delete"),triggerComponent:no(_ae,{icon:no(jde,{}),size:"sm","aria-label":i("modelmanager:deleteConfig"),isDisabled:"active"===l||n||!r,className:" modal-close-btn",style:{backgroundColor:"var(--btn-delete-image)"}}),children:ro(yP,{rowGap:"1rem",flexDirection:"column",children:[no("p",{style:{fontWeight:"bold"},children:i("modelmanager:deleteMsg1")}),no("p",{style:{color:"var(--text-color-secondary"},children:i("modelmanager:deleteMsg2")})]})})]})]})}var KLe=Bae,QLe=Q0;var JLe=function(e,t){var n=-1,r=QLe(e)?Array(e.length):[];return KLe(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},eOe=fse,tOe=fle,nOe=JLe,rOe=v0;var oOe=function(e,t){return(rOe(e)?eOe:nOe)(e,tOe(t))},iOe=QX(wle,(function(e){var t=oOe(e.model_list,(function(e,t){return un({name:t},e)}));return t}),{memoizeOptions:{resultEqualityCheck:dae}});function aOe(e){var t=e.label,n=e.isActive,r=e.onClick;return no(Eae,{onClick:r,isActive:n,_active:{backgroundColor:"var(--accent-color)",_hover:{backgroundColor:"var(--accent-color)"}},size:"sm",children:t})}var sOe=function(){var e=kie(iOe),t=yn(cr.useState(""),2),n=t[0],r=t[1],o=yn(cr.useState("all"),2),i=o[0],a=o[1],s=yn(cr.useTransition(),2),l=(s[0],s[1]),u=o8().t,c=cr.useMemo((function(){var t=[],r=[],o=[],a=[];return e.forEach((function(e,s){e.name.toLowerCase().includes(n.toLowerCase())&&(o.push(no($Le,{name:e.name,status:e.status,description:e.description},s)),e.format===i&&a.push(no($Le,{name:e.name,status:e.status,description:e.description},s))),"diffusers"!==e.format?t.push(no($Le,{name:e.name,status:e.status,description:e.description},s)):r.push(no($Le,{name:e.name,status:e.status,description:e.description},s))})),""!==n?no(cP,"all"===i?{marginTop:"1rem",children:o}:{marginTop:"1rem",children:a}):ro(yP,{flexDirection:"column",rowGap:"1.5rem",children:["all"===i&&ro(to,{children:[ro(cP,{children:[no(jP,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",margin:"1rem 0",width:"max-content",fontSize:"14",children:u("modelmanager:checkpointModels")}),t]}),ro(cP,{children:[no(jP,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",marginBottom:"0.5rem",width:"max-content",fontSize:"14",children:u("modelmanager:diffusersModels")}),r]})]}),"ckpt"===i&&no(yP,{flexDirection:"column",marginTop:"1rem",children:t}),"diffusers"===i&&no(yP,{flexDirection:"column",marginTop:"1rem",children:r})]})}),[e,n,u,i]);return ro(yP,{flexDirection:"column",rowGap:"2rem",width:"50%",minWidth:"50%",children:[ro(yP,{justifyContent:"space-between",children:[no(jP,{fontSize:"1.4rem",fontWeight:"bold",children:u("modelmanager:availableModels")}),no(XLe,{})]}),no(bye,{onChange:function(e){l((function(){r(e.target.value)}))},label:u("modelmanager:search")}),ro(yP,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-360,overflow:"scroll",paddingRight:"1rem",children:[ro(yP,{columnGap:"0.5rem",children:[no(aOe,{label:u("modelmanager:allModels"),onClick:function(){return a("all")},isActive:"all"===i}),no(aOe,{label:u("modelmanager:checkpointModels"),onClick:function(){return a("ckpt")},isActive:"ckpt"===i}),no(aOe,{label:u("modelmanager:diffusersModels"),onClick:function(){return a("diffusers")},isActive:"diffusers"===i})]}),c]})]})};function lOe(e){var t=e.children,n=GE(),r=n.isOpen,o=n.onOpen,i=n.onClose,a=kie((function(e){return e.system.model_list})),s=kie((function(e){return e.system.openModel})),l=o8().t;return ro(to,{children:[cr.cloneElement(t,{onClick:o}),ro(qW,{isOpen:r,onClose:i,size:"6xl",children:[no(rU,{}),ro(JW,{className:"modal",fontFamily:"Inter",children:[no(ZW,{className:"modal-close-btn"}),no(tU,{fontWeight:"bold",children:l("modelmanager:modelManager")}),ro(yP,{padding:"0 1.5rem 1.5rem 1.5rem",width:"100%",columnGap:"2rem",children:[no(sOe,{}),s&&"diffusers"===a[s].format?no(gLe,{}):no(pLe,{})]})]})]})]})}var uOe=QX([wle],(function(e){var t=e.isProcessing,n=e.model_list,r=oOe(n,(function(e,t){return t}));return{models:r,isProcessing:t}}),{memoizeOptions:{resultEqualityCheck:dae}}),cOe=function(){var e=wie(),t=kie(uOe),n=t.models,r=t.isProcessing,o=kie(xle);return no(yP,{style:{paddingLeft:"0.3rem"},children:no(Mae,{style:{fontSize:"0.8rem"},tooltip:o.description,isDisabled:r,value:o.name,validValues:n,onChange:function(t){e(lie(t.target.value))}})})},dOe=QX([wle,pae],(function(e,t){var n=e.shouldDisplayInProgressType,r=e.shouldConfirmOnDelete,o=e.shouldDisplayGuides,i=e.model_list,a=e.saveIntermediatesInterval,s=e.enableImageDebugging,l=t.shouldUseCanvasBetaLayout;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,models:oOe(i,(function(e,t){return t})),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l}}),{memoizeOptions:{resultEqualityCheck:dae}}),fOe=function(e){var t=e.children,n=wie(),r=o8().t,o=kie((function(e){return e.generation.steps})),i=GE(),a=i.isOpen,s=i.onOpen,l=i.onClose,u=GE(),c=u.isOpen,d=u.onOpen,f=u.onClose,h=kie(dOe),p=h.shouldDisplayInProgressType,v=h.shouldConfirmOnDelete,g=h.shouldDisplayGuides,m=h.saveIntermediatesInterval,y=h.enableImageDebugging,b=h.shouldUseCanvasBetaLayout;return ro(to,{children:[cr.cloneElement(t,{onClick:s}),ro(qW,{isOpen:a,onClose:l,size:"lg",children:[no(rU,{}),ro(JW,{className:"modal settings-modal",children:[no(tU,{className:"settings-modal-header",children:r("common:settingsLabel")}),no(ZW,{className:"modal-close-btn"}),ro(YW,{className:"settings-modal-content",children:[ro("div",{className:"settings-modal-items",children:[ro("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[no(Mae,{label:r("settings:displayInProgress"),validValues:wte,value:p,onChange:function(e){return n(s8(e.target.value))}}),"full-res"===p&&no(Aae,{label:r("settings:saveSteps"),min:1,max:o,step:1,onChange:function(e){e>o&&(e=o),e<1&&(e=1),n(C8(e))},value:m,width:"auto",textAlign:"center"})]}),no(iye,{styleClass:"settings-modal-item",label:r("settings:confirmOnDelete"),isChecked:v,onChange:function(e){return n(f8(e.target.checked))}}),no(iye,{styleClass:"settings-modal-item",label:r("settings:displayHelpIcons"),isChecked:g,onChange:function(e){return n(m8(e.target.checked))}}),no(iye,{styleClass:"settings-modal-item",label:r("settings:useCanvasBeta"),isChecked:b,onChange:function(e){return n(G8(e.target.checked))}})]}),ro("div",{className:"settings-modal-items",children:[no("h2",{style:{fontWeight:"bold"},children:"Developer"}),no(iye,{styleClass:"settings-modal-item",label:r("settings:enableImageDebugging"),isChecked:y,onChange:function(e){return n(_8(e.target.checked))}})]}),ro("div",{className:"settings-modal-reset",children:[no(xP,{size:"md",children:r("settings:resetWebUI")}),no(b_,{colorScheme:"red",onClick:function(){yie.purge().then((function(){l(),d()}))},children:r("settings:resetWebUI")}),no(jP,{children:r("settings:resetWebUIDesc1")}),no(jP,{children:r("settings:resetWebUIDesc2")})]})]}),no(eU,{children:no(b_,{onClick:l,className:"modal-close-btn",children:r("common:close")})})]})]}),ro(qW,{closeOnOverlayClick:!1,isOpen:c,onClose:f,isCentered:!0,children:[no(rU,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),no(JW,{children:no(YW,{pb:6,pt:6,children:no(yP,{justifyContent:"center",children:no(jP,{fontSize:"lg",children:no(jP,{children:r("settings:resetComplete")})})})})})]})]})},hOe=QX(wle,(function(e){return{isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}}),{memoizeOptions:{resultEqualityCheck:dae}}),pOe=function(){var e,t=kie(hOe),n=t.isConnected,r=t.isProcessing,o=t.currentIteration,i=t.totalIterations,a=t.currentStatus,s=t.hasError,l=t.wasErrorSeen,u=wie(),c=o8().t;e=n&&!s?"status-good":"status-bad";var d=a;[c("common:statusGenerating"),c("common:statusPreparing"),c("common:statusSavingImage"),c("common:statusRestoringFaces"),c("common:statusUpscaling")].includes(d)&&(e="status-working"),d&&r&&i>1&&(d="".concat(c(d)," (").concat(o,"/").concat(i,")"));return no(kY,{label:s&&!l?"Click to clear, check logs for details":void 0,children:no(jP,{cursor:s&&!l?"pointer":"initial",onClick:function(){!s&&l||u(w8())},className:"status ".concat(e),children:c(d)})})};function vOe(){var e=o8().t,t=ao(),n=t.setColorMode,r=t.colorMode,o=wie(),i=kie((function(e){return e.ui.currentTheme})),a={dark:e("common:darkTheme"),light:e("common:lightTheme"),green:e("common:greenTheme")};cr.useEffect((function(){r!==i&&n(i)}),[n,r,i]);var s;return no(Pae,{trigger:"hover",triggerComponent:no(_ae,{"aria-label":e("common:themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:no(dde,{})}),children:no(zP,{align:"stretch",children:(s=[],Object.keys(a).forEach((function(e){s.push(no(Eae,{style:{width:"6rem"},leftIcon:i===e?no(Uce,{}):void 0,size:"sm",onClick:function(){return function(e){o(j8(e))}(e)},children:a[e]},e))})),s)})})}function gOe(){var e,t=o8(),n=t.t,r=t.i18n,o={en:n("common:langEnglish"),nl:n("common:langDutch"),fr:n("common:langFrench"),de:n("common:langGerman"),it:n("common:langItalian"),ja:n("common:langJapanese"),pl:n("common:langPolish"),pt_br:n("common:langBrPortuguese"),ru:n("common:langRussian"),zh_cn:n("common:langSimplifiedChinese"),es:n("common:langSpanish"),ua:n("common:langUkranian")};return no(Pae,{trigger:"hover",triggerComponent:no(_ae,{"aria-label":n("common:languagePickerLabel"),tooltip:n("common:languagePickerLabel"),icon:no(ade,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:no(zP,{children:(e=[],Object.keys(o).forEach((function(t){e.push(no(Eae,{"data-selected":localStorage.getItem("i18nextLng")===t,onClick:function(){return r.changeLanguage(t)},className:"modal-close-btn lang-select-btn","aria-label":o[t],tooltip:o[t],size:"sm",minWidth:"200px",children:o[t]},t))})),e)})})}var mOe=function(){var e=o8().t,t=kie((function(e){return e.system.app_version}));return ro("div",{className:"site-header",children:[ro("div",{className:"site-header-left-side",children:[no("img",{src:Yye,alt:"invoke-ai-logo"}),ro(yP,{alignItems:"center",columnGap:"0.6rem",children:[ro(jP,{fontSize:"1.4rem",children:["invoke ",no("strong",{children:"ai"})]}),no(jP,{fontWeight:"bold",color:"var(--text-color-secondary)",marginTop:"0.2rem",children:t})]})]}),ro("div",{className:"site-header-right-side",children:[no(pOe,{}),no(cOe,{}),no(lOe,{children:no(_ae,{"aria-label":e("modelmanager:modelManager"),tooltip:e("modelmanager:modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:no(Zce,{})})}),no(kCe,{children:no(_ae,{"aria-label":e("common:hotkeysLabel"),tooltip:e("common:hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:no(ide,{})})}),no(vOe,{}),no(gOe,{}),no(_ae,{"aria-label":e("common:reportBugLabel"),tooltip:e("common:reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:no(CP,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:no(Wce,{})})}),no(_ae,{"aria-label":e("common:githubLabel"),tooltip:e("common:githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:no(CP,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:no(Nce,{})})}),no(_ae,{"aria-label":e("common:discordLabel"),tooltip:e("common:discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:no(CP,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:no(Rce,{})})}),no(fOe,{children:no(_ae,{"aria-label":e("common:settingsLabel"),tooltip:e("common:settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:no(Pfe,{})})})]})]})};var yOe=QX([Mde,pae,fae],(function(e,t,n){var r=t.shouldPinParametersPanel,o=t.shouldShowParametersPanel,i=t.shouldHoldParametersPanelOpen,a=t.shouldUseCanvasBetaLayout,s=e.shouldShowGallery,l=e.shouldPinGallery,u=e.shouldHoldGalleryOpen,c=a&&"unifiedCanvas"===n;return{shouldPinParametersPanel:r,shouldShowProcessButtons:!(c||r&&o),shouldShowParametersPanelButton:!c&&!(o||i&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),shouldShowParametersPanel:o,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n)}}),{memoizeOptions:{resultEqualityCheck:dae}}),bOe=function(){var e=wie(),t=kie(yOe),n=t.shouldShowParametersPanel,r=t.shouldShowParametersPanelButton,o=t.shouldShowProcessButtons,i=t.shouldPinParametersPanel,a=t.shouldShowGallery,s=t.shouldPinGallery;return _ce("f",(function(){a||n?(e(V8(!1)),e(r4(!1))):(e(V8(!0)),e(r4(!0))),(s||i)&&setTimeout((function(){return e(m3(!0))}),400)}),[a,n]),r?ro("div",{className:"show-hide-button-options",children:[no(_ae,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:function(){e(V8(!0)),i&&setTimeout((function(){return e(m3(!0))}),400)},children:no(kde,{})}),o&&ro(to,{children:[no(Fye,{iconButton:!0}),no(zye,{})]})]}):null},wOe=function(){var e=wie(),t=kie(yOe),n=t.shouldShowGallery,r=t.shouldShowGalleryButton,o=t.shouldPinGallery,i=t.shouldShowParametersPanel,a=t.shouldPinParametersPanel;return _ce("f",(function(){n||i?(e(V8(!1)),e(r4(!1))):(e(V8(!0)),e(r4(!0))),(o||a)&&setTimeout((function(){return e(m3(!0))}),400)}),[n,i]),r?no(_ae,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:function(){e(r4(!0)),o&&e(m3(!0))},children:no(Ofe,{})}):null};!function(){function e(){return e=qt(Ut().mark((function e(){var t,n,r=arguments;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"",e.next=3,fetch(t,{method:"GET",cache:"no-cache"});case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}var t=function(){(function(){return e.apply(this,arguments)})(document.location+"/flaskwebgui-keep-server-alive").then((function(e){return e}))};({}).NODE_ENV&&"production"!=={}.NODE_ENV||document.addEventListener("DOMContentLoaded",(function(){t(),setInterval(t,3e3)}))}();var kOe=function(){var e,t,n;return e=wie(),t=kie(kle),n=cY(),cr.useEffect((function(){t.forEach((function(e){n(e)})),t.length>0&&e(L8())}),[e,n,t]),ro("div",{className:"App",children:[ro(pCe,{children:[no(bCe,{}),ro("div",{className:"app-content",children:[no(mOe,{}),no(oSe,{})]}),no("div",{className:"app-console",children:no(mCe,{})})]}),no(bOe,{}),no(wOe,{})]})},xOe=function(){return no(yP,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:no(XC,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})})},SOe=hs({key:"invokeai-style-cache",prepend:!0});CY.createRoot(document.getElementById("root")).render(no(qr.StrictMode,{children:no(CZ,{store:mie,children:no(jZ,{loading:no(xOe,{}),persistor:yie,children:no(il,{value:SOe,children:no(SY,{children:no(qr.Suspense,{fallback:no(xOe,{}),children:no(kOe,{})})})})})})}))}}}))}();
|